iobroker.javascript 10.0.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -12
- package/admin/assets/AiChatPanel-C_WbKMGX.js +242 -0
- package/admin/assets/AiDiffView-BtXbDWZ8.js +1 -0
- package/admin/assets/Debugger-DAdJnEhw.js +15 -0
- package/admin/assets/Error-DQ1pzKcf.js +1 -0
- package/admin/assets/Import-BjMtH6Gk.js +1 -0
- package/admin/assets/RulesEditor-dDRPHw4X.js +1 -0
- package/admin/assets/RulesEditor-k-DMHotH.css +1 -0
- package/admin/assets/{ScriptEditor-BGIuoNei.js → ScriptEditor-CZSc7rwE.js} +2 -2
- package/admin/assets/ScriptEditorVanillaMonaco-DEKg14_A.js +3 -0
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-DPmwd_G2.js +1 -0
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-C8inUeKt.js +1243 -0
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-VcQjt7_9.js +9 -0
- package/admin/assets/aiPromptBuilder-D5FDo74i.js +1 -0
- package/admin/assets/blockly-DBw-ytY1.js +1047 -0
- package/admin/assets/blocks_action-BqfWEwpf.js +1 -0
- package/admin/assets/blocks_convert-CX0i-JfS.js +3 -0
- package/admin/assets/blocks_logic-D-QSzw95.js +1 -0
- package/admin/assets/blocks_number-D7JuNYsw.js +1 -0
- package/admin/assets/blocks_object-C9DzAlc7.js +1 -0
- package/admin/assets/blocks_procedures-BJMz6HWW.js +3 -0
- package/admin/assets/blocks_sendto-DRh7lk9o.js +5 -0
- package/admin/assets/blocks_switch-BfmboMex.js +2 -0
- package/admin/assets/blocks_system-B-78JfAc.js +1 -0
- package/admin/assets/blocks_text-CGbR0Ozw.js +1 -0
- package/admin/assets/blocks_time-5vS2geJg.js +1 -0
- package/admin/assets/blocks_timeout-BdaTywfN.js +1 -0
- package/admin/assets/blocks_trigger-D8kgHKbg.js +2 -0
- package/admin/assets/blocks_words-BhHIf_1o.js +1 -0
- package/admin/assets/{cronHoverProvider-pKJkSevo.js → cronHoverProvider-DpgESCox.js} +1 -1
- package/admin/assets/dist-CaOsN0XW.js +4 -0
- package/admin/assets/field_cron-B40zwSfJ.js +1 -0
- package/admin/assets/field_oid-KfoBnEM9.js +1 -0
- package/admin/assets/field_script-yXhe1iCp.js +1 -0
- package/admin/assets/helpers-B0ByElPJ.js +1 -0
- package/admin/assets/hostInit-9REPDUe7.js +1 -0
- package/admin/assets/index-07o_WKsX.js +726 -0
- package/admin/assets/index-Z8Hkv58g.css +1 -0
- package/admin/assets/{inlineChatWidget-ZaisTOLh.js → inlineChatWidget-B9y_gQcH.js} +2 -2
- package/admin/assets/{inlineDiffController-hTwHHqcc.js → inlineDiffController-C07CdIFo.js} +2 -2
- package/admin/assets/{mf-entry-bootstrap-0-d6052b31.js → mf-entry-bootstrap-0-efcb49d3.js} +7 -2
- package/admin/assets/stateHoverProvider-CqeoOjXs.js +9 -0
- package/admin/assets/{virtualExposes-Ed0lGq7k.js → virtualExposes-DgGB-18P.js} +1 -1
- package/admin/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-BwSvIKEV.js +1 -0
- package/admin/assets/virtual_mf-exposes___mfe_internal__iobroker_javascript__remoteEntry_js-ChiJXsfH.js +1 -0
- package/admin/custom/assets/Components-BCQTjBgm.js +1 -0
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-BuAc8OyX.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BGJv4zZP.js +1 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-CGb5Cofy.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-B4E6MFJ4.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BVCIAgbo.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-aRlxyEhq.js} +78 -78
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-DQwzYx75.js +1494 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__leaflet__loadShare__.js-h-rCw3iz.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__leaflet__loadShare__.js-n2zIPi0L.js} +1 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-xxszBNje.js +9 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__date_mf_2_fns__prebuild__-Cb5TR7FB.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__date_mf_2_fns__prebuild__-Tq7tesSS.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__leaflet__prebuild__-DARUoA03.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__leaflet__prebuild__-BeF0jEWM.js} +1 -1
- package/admin/custom/assets/hostInit-CHwrowP4.js +1 -0
- package/admin/custom/assets/{index-uEKAoVT7.js → index-Cm6xl9K4.js} +1 -1
- package/admin/custom/assets/{lib-Yj8cfN0A.js → lib-bhrFL6jR.js} +1 -1
- package/admin/custom/assets/{mf-entry-bootstrap-0-77793feb.js → mf-entry-bootstrap-0-f08941e2.js} +7 -2
- package/admin/custom/assets/{setYear-DJ9FbdkO.js → setYear-DzTZ2h9A.js} +1 -1
- package/admin/custom/assets/virtualExposes-B5LJmnfO.js +1 -0
- package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-ML-chjs6.js +1 -0
- package/admin/custom/assets/virtual_mf-exposes___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-C3ImybiM.js +2 -0
- package/admin/custom/customComponents.js +12 -1
- package/admin/custom/i18n/de.json +11 -1
- package/admin/custom/i18n/en.json +11 -1
- package/admin/custom/i18n/es.json +11 -1
- package/admin/custom/i18n/fr.json +11 -1
- package/admin/custom/i18n/it.json +11 -1
- package/admin/custom/i18n/nl.json +11 -1
- package/admin/custom/i18n/pl.json +11 -1
- package/admin/custom/i18n/pt.json +11 -1
- package/admin/custom/i18n/ru.json +11 -1
- package/admin/custom/i18n/uk.json +11 -1
- package/admin/custom/i18n/zh-cn.json +11 -1
- package/admin/google-blockly/VERSION +1 -0
- package/admin/google-blockly/media/drop.mp3 +0 -0
- package/admin/google-blockly/msg/js/de.js +332 -56
- package/admin/google-blockly/msg/js/en.js +319 -43
- package/admin/google-blockly/msg/js/es.js +319 -42
- package/admin/google-blockly/msg/js/fr.js +315 -39
- package/admin/google-blockly/msg/js/it.js +327 -51
- package/admin/google-blockly/msg/js/nl.js +376 -100
- package/admin/google-blockly/msg/js/pl.js +318 -42
- package/admin/google-blockly/msg/js/pt.js +318 -42
- package/admin/google-blockly/msg/js/ru.js +320 -44
- package/admin/google-blockly/msg/js/uk.js +326 -50
- package/admin/google-blockly/msg/js/zh-cn.js +322 -46
- package/admin/i18n/de.json +51 -26
- package/admin/i18n/en.json +50 -25
- package/admin/i18n/es.json +51 -18
- package/admin/i18n/fr.json +50 -17
- package/admin/i18n/it.json +50 -17
- package/admin/i18n/nl.json +50 -17
- package/admin/i18n/pl.json +51 -18
- package/admin/i18n/pt.json +50 -17
- package/admin/i18n/ru.json +50 -17
- package/admin/i18n/uk.json +50 -17
- package/admin/i18n/zh-cn.json +50 -17
- package/admin/jsonConfig.json +398 -0
- package/admin/mf-manifest.json +1 -1
- package/admin/mf-stats.json +1 -1
- package/admin/remoteEntry.js +12 -1
- package/admin/tab.html +6 -98
- package/build/lib/javascript.d.ts +48 -0
- package/build/lib/mirror.js +9 -0
- package/build/lib/mirror.js.map +1 -1
- package/build/lib/sandbox.js +37 -0
- package/build/lib/sandbox.js.map +1 -1
- package/build/lib/secrets.js +220 -0
- package/build/lib/secrets.js.map +1 -0
- package/build/lib/typescriptSettings.js +112 -2
- package/build/lib/typescriptSettings.js.map +1 -1
- package/build/lib/typescriptTools.js +168 -43
- package/build/lib/typescriptTools.js.map +1 -1
- package/build/main.js +61 -5
- package/build/main.js.map +1 -1
- package/build/types.d.ts +48 -0
- package/docs/en/blockly.md +29 -0
- package/docs/en/javascript.md +72 -0
- package/docs/en/upgrade-guide.md +3 -0
- package/io-package.json +59 -28
- package/package.json +8 -3
- package/admin/assets/AiChatPanel-p0KAg6Cs.js +0 -237
- package/admin/assets/AiDiffView-BPTLnNx1.js +0 -1
- package/admin/assets/AiScriptAnalyzer--BHML2rN.js +0 -9
- package/admin/assets/BlocklyEditor-CAjVMhYT.js +0 -81
- package/admin/assets/ContextWrapper-BVc8wTK_.css +0 -1
- package/admin/assets/ContextWrapper-D9CrnNKs.js +0 -127
- package/admin/assets/Debugger-SjROokFI.js +0 -15
- package/admin/assets/Error-DDfrxAt2.js +0 -1
- package/admin/assets/Import-DpTg1Jow.js +0 -1
- package/admin/assets/RulesEditor-BSRFWpEm.css +0 -1
- package/admin/assets/RulesEditor-D0hgrcBc.js +0 -1
- package/admin/assets/ScriptEditorVanillaMonaco-DyMQtoTQ.js +0 -3
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-DWJotR1B.js +0 -1
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-CxICLr5Z.js +0 -1243
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BBAXJaqI.js +0 -9
- package/admin/assets/aiCodeLensProvider-hyAmut0e.js +0 -4
- package/admin/assets/aiPromptBuilder-Bs27qOHT.js +0 -7
- package/admin/assets/blocklyDarkTheme-DEiAX5DT.js +0 -1
- package/admin/assets/dist-uw5orDgd.js +0 -4
- package/admin/assets/hostInit-BFg5u9hY.js +0 -1
- package/admin/assets/index-B1gICjdq.js +0 -192
- package/admin/assets/index-BHhhebRG.css +0 -1
- package/admin/assets/mjs-DWqivHEk.js +0 -90
- package/admin/assets/stateHoverProvider-C7DawIs-.js +0 -9
- package/admin/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-BYs71IQF.js +0 -1
- package/admin/assets/virtual_mf-exposes___mfe_internal__iobroker_javascript__remoteEntry_js-DnnXQRkG.js +0 -1
- package/admin/custom/assets/Components-BrDyDHXh.js +0 -1
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-CyYJM2-v.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BdzCssLn.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-BkB0anQX.js +0 -1494
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BotqDuw-.js +0 -9
- package/admin/custom/assets/hostInit-DJx2uXXy.js +0 -1
- package/admin/custom/assets/virtualExposes-CxDjLoYu.js +0 -1
- package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-BU-ugy_7.js +0 -1
- package/admin/custom/assets/virtual_mf-exposes-ssr___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-BEfZbrf7.js +0 -2
- package/admin/custom/assets/virtual_mf-exposes___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-CTeZ0Jpm.js +0 -2
- package/admin/google-blockly/blockly_compressed.js +0 -1679
- package/admin/google-blockly/blocks_compressed.js +0 -193
- package/admin/google-blockly/javascript_compressed.js +0 -264
- package/admin/google-blockly/msg/messages.js +0 -1630
- package/admin/google-blockly/own/blocks_action.js +0 -765
- package/admin/google-blockly/own/blocks_convert.js +0 -480
- package/admin/google-blockly/own/blocks_logic.js +0 -459
- package/admin/google-blockly/own/blocks_number.js +0 -30
- package/admin/google-blockly/own/blocks_object.js +0 -402
- package/admin/google-blockly/own/blocks_procedures.js +0 -688
- package/admin/google-blockly/own/blocks_sendto.js +0 -702
- package/admin/google-blockly/own/blocks_switch.js +0 -257
- package/admin/google-blockly/own/blocks_system.js +0 -1409
- package/admin/google-blockly/own/blocks_text.js +0 -104
- package/admin/google-blockly/own/blocks_time.js +0 -639
- package/admin/google-blockly/own/blocks_timeout.js +0 -551
- package/admin/google-blockly/own/blocks_trigger.js +0 -1791
- package/admin/google-blockly/own/blocks_words.js +0 -708
- package/admin/google-blockly/own/field_cron.js +0 -158
- package/admin/google-blockly/own/field_oid.js +0 -642
- package/admin/google-blockly/own/field_script.js +0 -159
|
@@ -1,1494 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./lib-Yj8cfN0A.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,O as f,P as p,S as m,T as h,V as g,_,b as v,j as y,k as b,p as x,v as S,w as C,x as w,y as T}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BdzCssLn.js";import{$ as E,$n as D,$t as O,A as k,An as A,Ar as j,At as M,B as N,Bn as ee,Br as P,Bt as F,C as te,Cn as I,Cr as L,Ct as R,D as z,Dn as ne,Dr as re,Dt as ie,E as ae,En as B,Er as oe,Et as se,F as ce,Fn as le,Fr as V,Ft as H,G as ue,Gn as de,Gt as U,H as fe,Hn as pe,Hr as W,Ht as me,I as he,Ir as ge,It as _e,J as ve,Jn as ye,Jt as be,K as xe,Kn as Se,Kt as Ce,L as we,Ln as Te,Lr as Ee,Lt as De,M as Oe,Mn as ke,Mr as Ae,N as je,Nn as Me,Nr as Ne,Nt as Pe,O as Fe,On as Ie,Or as Le,Ot as Re,P as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qn as We,Qt as Ge,R as Ke,Rn as qe,Rr as Je,Rt as Ye,S as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Tn as tt,Tr as G,Tt as nt,U as rt,Un as it,Ut as at,V as ot,Vn as st,Vt as ct,W as lt,Wn as ut,Wr as dt,Wt as ft,X as pt,Xn as mt,Xt as ht,Y as gt,Yn as _t,Yt as vt,Z as yt,Zn as bt,Zt as xt,_ as St,_n as Ct,_r as wt,_t as Tt,a as Et,an as Dt,ar as Ot,at as kt,b as At,bn as jt,br as Mt,bt as Nt,c as Pt,cn as Ft,cr as It,ct as Lt,d as Rt,dn as zt,dr as Bt,dt as Vt,en as Ht,er as Ut,et as Wt,f as Gt,fn as Kt,fr as qt,ft as Jt,g as Yt,gn as Xt,gr as Zt,gt as Qt,h as $t,hn as en,hr as tn,ht as nn,i as rn,in as an,ir as on,it as sn,j as cn,jn as ln,jr as un,jt as dn,k as fn,kn as pn,kr as mn,kt as hn,l as K,ln as gn,lr as _n,lt as vn,m as yn,mn as bn,mr as xn,mt as Sn,n as Cn,nn as wn,nr as Tn,nt as En,o as Dn,on as On,or as kn,ot as An,p as jn,pn as Mn,pr as Nn,pt as Pn,q as Fn,qn as In,qt as Ln,r as Rn,rn as zn,rr as Bn,rt as Vn,s as Hn,sn as Un,sr as Wn,st as Gn,t as Kn,tn as qn,tr as Jn,tt as Yn,u as Xn,un as Zn,ur as Qn,ut as $n,vn as er,vr as q,vt as tr,w as nr,wn as rr,wr as ir,wt as ar,x as or,xn as sr,xr as J,xt as cr,y as lr,yn as ur,yt as dr,z as fr,zn as pr,zr as Y,zt as mr}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BVCIAgbo.js";var hr=`FEDERATION_DEBUG`,gr={AT:`@`,HYPHEN:`-`,SLASH:`/`},_r={[gr.AT]:`scope_`,[gr.HYPHEN]:`_`,[gr.SLASH]:`__`};_r[gr.AT],gr.AT,_r[gr.HYPHEN],gr.HYPHEN,_r[gr.SLASH],gr.SLASH;var vr=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function yr(){return!0}function br(){var e;return typeof navigator<`u`&&((e=navigator)==null?void 0:e.product)===`ReactNative`}function xr(){try{if(yr()&&window.localStorage)return!!localStorage.getItem(hr)}catch{return!1}return!1}function Sr(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:xr()}var Cr=`[ Federation Runtime ]`,wr=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function Tr(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!yr()&&!br()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``)}var Er=e=>{console.warn(`${Cr}: ${e}`)};function Dr(e){try{return JSON.stringify(e,null,2)}catch{return``}}var Or=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function kr(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function Ar(e,t={}){var n;let{remotes:r={},overrides:i={},version:a}=t,o,s=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&a?kr(a):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(i),l={};Object.keys(r).length||(l=((n=e.remotes)==null?void 0:n.reduce((e,t)=>{let n,r=t.federationContainerName;return n=c.includes(r)?i[r]:`version`in t?t.version:t.entry,e[r]={matchedVersion:n},e},{}))||{}),Object.keys(r).forEach(e=>l[e]={matchedVersion:c.includes(e)?i[e]:r[e]});let{remoteEntry:{path:u,name:d,type:f},types:p={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:m},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:_}=e,v={version:a||``,buildVersion:m,globalName:h,remoteEntry:Or(u,d),remoteEntryType:f,remoteTypes:Or(p.path,p.name),remoteTypesZip:p.zip||``,remoteTypesAPI:p.api||``,remotesInfo:l,shared:e==null?void 0:e.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:_==null?void 0:_.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(o={...v,publicPath:s()},typeof e.metaData.ssrPublicPath==`string`&&(o.ssrPublicPath=e.metaData.ssrPublicPath)):o={...v,getPublicPath:s()},g){let e=Or(g.path,g.name);o.ssrRemoteEntry=e,o.ssrRemoteEntryType=g.type||`commonjs-module`}return o}function jr(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var Mr=`[ Module Federation ]`,Nr=console,Pr=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function Fr(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
3
|
-
`),n=t.filter(e=>!Pr.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
4
|
-
`)}`:void 0}catch{return}}var Ir=class{constructor(e,t=Nr){this.prefix=e,this.delegate=t??Nr}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??Nr}emit(e,t){let n=this.delegate,r=Sr()?Fr():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=Nr[e];if(typeof t==`function`){t.call(Nr,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){Sr()&&this.emit(`debug`,e)}};function Lr(e){return new Ir(e)}function Rr(e){let t=new Ir(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}Lr(Mr),Rr(Mr);async function zr(e,t){try{return await e()}catch(e){!t&&Er(e);return}}function Br(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function Vr(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&Br(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=(n==null?void 0:n.type)===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&Br(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if((r==null?void 0:r.type)===`error`){let t=Error(r!=null&&r.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(t))}else o?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(o)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,zr(()=>{let{needDeleteScript:n=!0}=e;n&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function Hr(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&Br(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e!=null&&e.cb&&(e==null||e.cb())}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if((r==null?void 0:r.type)===`error`){let t=Error(r!=null&&r.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(t))}else e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,zr(()=>{let{needDeleteLink:n=!0}=e;n&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function Ur(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=Vr({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var Wr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,Gr=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(Wr(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
5
|
-
`)};function Kr(e,t,n,r,i,a){return r(Gr(e,t,n,i))}var qr=`[ Federation Runtime ]`,Jr=Lr(qr);function Yr(e,t,n,r,i){e||(n===void 0?Xr(t):Xr(t,n,r,void 0,i))}function Xr(e,t,n,r,i){if(t!==void 0)return Kr(e,t,n??{},e=>{throw Error(`${qr}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(qr)||(a.message=`${qr}: ${a.message}`),a):Error(`${qr}: ${a}`)}function Zr(e){e instanceof Error&&(e.message.startsWith(qr)||(e.message=`${qr}: ${e.message}`)),Jr.warn(e)}function Qr(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function $r(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ei(e){return e.entry!==void 0}function ti(e){return!e.entry.includes(`.json`)}function ni(e){return e&&typeof e==`object`}var ri=Object.prototype.toString;function ii(e){return ri.call(e)===`[object Object]`}function ai(e){return Array.isArray(e)?e:[e]}function oi(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var si=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},ci=typeof globalThis==`object`?globalThis:window,li=(()=>{try{return document.defaultView}catch{return ci}})(),ui=li;function di(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function fi(e,t){return Object.hasOwnProperty.call(e,t)}fi(ci,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||di(ci,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var pi=ci.__GLOBAL_LOADING_REMOTE_ENTRY__;function mi(e){fi(e,`__VMOK__`)&&!fi(e,`__FEDERATION__`)&&di(e,`__FEDERATION__`,e.__VMOK__),fi(e,`__FEDERATION__`)||(di(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),di(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}mi(ci),mi(li);function hi(){ci.__FEDERATION__.__GLOBAL_PLUGIN__=[],ci.__FEDERATION__.__INSTANCES__=[],ci.__FEDERATION__.moduleInfo={},ci.__FEDERATION__.__SHARE__={},ci.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(pi).forEach(e=>{delete pi[e]})}function gi(e){ci.__FEDERATION__.__INSTANCES__.push(e)}function _i(){return ci.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function vi(e,t=Sr()){t&&(ci.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,ci.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.8.1`)}function yi(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}Xr(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var bi=()=>li.__FEDERATION__.moduleInfo,xi=(e,t)=>{let n=yi(t,$r(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=$r(n),i=yi(li.__FEDERATION__.moduleInfo,r).value;if((i==null?void 0:i.version)===t)return i}},Si=e=>xi(e,li.__FEDERATION__.moduleInfo),Ci=(e,t)=>{let n=$r(e);return li.__FEDERATION__.moduleInfo[n]=t,li.__FEDERATION__.moduleInfo},wi=e=>(li.__FEDERATION__.moduleInfo={...li.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete li.__FEDERATION__.moduleInfo[e]}),Ti=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:ci[n]}},Ei=e=>{let{__GLOBAL_PLUGIN__:t}=li.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):Zr(`The plugin ${e.name} has been registered.`)})},Di=()=>li.__FEDERATION__.__GLOBAL_PLUGIN__,Oi=e=>ci.__FEDERATION__.__PRELOADED_MAP__.get(e),ki=e=>ci.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Ai=`[0-9A-Za-z-]+`,ji=`(?:\\+(${Ai}(?:\\.${Ai})*))`,Mi=`0|[1-9]\\d*`,Ni=`[0-9]+`,Pi=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Fi=`(?:${Ni}|${Pi})`,Ii=`(?:-?(${Fi}(?:\\.${Fi})*))`,Li=`(?:${Mi}|${Pi})`,Ri=`(?:-(${Li}(?:\\.${Li})*))`,zi=`${Mi}|x|X|\\*`,Bi=`[v=\\s]*(${zi})(?:\\.(${zi})(?:\\.(${zi})(?:${Ri})?${ji}?)?)?`,Vi=`^\\s*(${Bi})\\s+-\\s+(${Bi})\\s*$`,Hi=`[v=\\s]*${`(${Ni})\\.(${Ni})\\.(${Ni})`}${Ii}?${ji}?`,Ui=`((?:<|>)?=?)`,Wi=`(\\s*)${Ui}\\s*(${Hi}|${Bi})`,Gi=`(?:~>?)`,Ki=`(\\s*)${Gi}\\s+`,qi=`(?:\\^)`,Ji=`(\\s*)${qi}\\s+`,Yi=`(<|>)?=?\\s*\\*`,Xi=`^${qi}${Bi}$`,Zi=`v?${`(${Mi})\\.(${Mi})\\.(${Mi})`}${Ri}?${ji}?`,Qi=`^${Gi}${Bi}$`,$i=`^${Ui}\\s*${Bi}$`,ea=`^${Ui}\\s*(${Zi})$|^$`,ta=`^\\s*>=\\s*0.0.0\\s*$`;function na(e){return new RegExp(e)}function ra(e){return!e||e.toLowerCase()===`x`||e===`*`}function ia(...e){return t=>e.reduce((e,t)=>t(e),t)}function aa(e){return e.match(na(ea))}function oa(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function sa(e){return e.replace(na(Vi),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=ra(n)?``:ra(r)?`>=${n}.0.0`:ra(i)?`>=${n}.${r}.0`:`>=${t}`,s=ra(c)?``:ra(l)?`<${Number(c)+1}.0.0-0`:ra(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function ca(e){return e.replace(na(Wi),`$1$2$3`)}function la(e){return e.replace(na(Ki),`$1~`)}function ua(e){return e.replace(na(Ji),`$1^`)}function da(e){return e.trim().split(/\s+/).map(e=>e.replace(na(Xi),(e,t,n,r,i)=>ra(t)?``:ra(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ra(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function fa(e){return e.trim().split(/\s+/).map(e=>e.replace(na(Qi),(e,t,n,r,i)=>ra(t)?``:ra(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ra(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function pa(e){return e.split(/\s+/).map(e=>e.trim().replace(na($i),(e,t,n,r,i,a)=>{let o=ra(n),s=o||ra(r),c=s||ra(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function ma(e){return e.trim().replace(na(Yi),``)}function ha(e){return e.trim().replace(na(ta),``)}function ga(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function _a(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?ga(t,i):-1:1}return 0}function va(e,t){return ga(e.major,t.major)||ga(e.minor,t.minor)||ga(e.patch,t.patch)||_a(e,t)}function ya(e,t){return e.version===t.version}function ba(e,t){switch(e.operator){case``:case`=`:return ya(e,t);case`>`:return va(e,t)<0;case`>=`:return ya(e,t)||va(e,t)<0;case`<`:return va(e,t)>0;case`<=`:return ya(e,t)||va(e,t)>0;case void 0:return!0;default:return!1}}function xa(e){return ia(da,fa,pa,ma)(e)}function Sa(e){return ia(sa,ca,la,ua)(e.trim()).split(/\s+/).join(` `)}function Ca(e,t){if(!e)return!1;let n=aa(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:oa(i,a,o,s),major:i,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Sa(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>xa(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>ha(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=aa(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!ba({operator:n,version:oa(r,a,o,s),major:r,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var wa=`default`,Ta=`global`;function Ea(e,t,n,r){var i,a;let o;return o=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{Xr(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(i=e.shareConfig)!=null&&i.eager&&(a=e.treeShaking)!=null&&a.mode&&Xr(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??vr.UNKNOWN,useIn:[]}:void 0}}function Da(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=ai(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(Ea(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function Oa(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===vr.NO_USE?!1:n===vr.CALCULATED?!0:r===`runtime-infer`?!t||Na(e,t):!1}function ka(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!Ca(n(e),`<=${n(t)}`)}var Aa=(e,t)=>{let n=t||function(e,t){return ka(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},ja=e=>!!e.loaded||typeof e.lib==`function`,Ma=e=>!!e.loading,Na=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pa(e,t,n,r){let i=e[t][n],a=``,o=Oa(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!ja(i[e].treeShaking)&&ka(e,t):!1:!0:!ja(i[e])&&ka(e,t)};if(o){if(a=Aa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Aa(e[t][n],s),useTreesShaking:o}}var Fa=e=>ja(e)||Ma(e);function Ia(e,t,n,r){let i=e[t][n],a=``,o=Oa(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(Fa(i[t].treeShaking))return!Fa(i[e].treeShaking)||!!ka(e,t);if(Fa(i[e].treeShaking))return!1}return Fa(i[t])?!Fa(i[e])||!!ka(e,t):!Fa(i[e])&&ka(e,t)};if(o){if(a=Aa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Aa(e[t][n],s),useTreesShaking:o}}function La(e){return e===`loaded-first`?Ia:Pa}function Ra(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=wa,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=La(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:ui.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!Ca(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?Xr(e):Zr(e)}return{shared:r,useTreesShaking:u}}{if(c===!1||c===`*`||Ca(l,c))return{shared:r,useTreesShaking:u};let n=Oa(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(Oa(i.treeShaking,s==null?void 0:s.usedExports)&&Ca(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(Ca(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function za(){return ui.__FEDERATION__.__SHARE__}function Ba(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=(n==null?void 0:n.resolver)??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[Aa(t,function(e,n){return!ja(t[e])&&ka(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n==null?void 0:n.customShareInfo)}var Va=(e,t)=>{e.useIn||=[],Qr(e.useIn,t)};function Ha(e,t){return t&&e.treeShaking?e.treeShaking:e}function Ua(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Wa(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ga(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ka=`RUNTIME-001`,qa=`RUNTIME-002`,Ja=`RUNTIME-003`,Ya=`RUNTIME-004`,Xa=`RUNTIME-005`,Za=`RUNTIME-006`,Qa=`RUNTIME-007`,$a=`RUNTIME-008`,eo=`RUNTIME-009`,to=`RUNTIME-010`,no=`RUNTIME-011`,ro=`RUNTIME-012`,io=`RUNTIME-013`,ao=`RUNTIME-014`,oo=`RUNTIME-015`,so=`TYPE-001`,co=`BUILD-001`,lo=`BUILD-002`,uo={[Ka]:`Failed to get remoteEntry exports.`,[qa]:`The remote entry interface does not contain "init"`,[Ja]:`Failed to get manifest.`,[Ya]:`Failed to locate remote.`,[Xa]:`Invalid loadShareSync function call from bundler runtime`,[Za]:`Invalid loadShareSync function call from runtime`,[Qa]:`Failed to get remote snapshot.`,[$a]:`Failed to load script resources.`,[eo]:`Please call createInstance first.`,[to]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[no]:`The remoteEntry URL is missing from the remote snapshot.`,[ro]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[io]:`The manifest is not a valid Module Federation manifest.`,[ao]:`The remote does not expose the requested module.`,[oo]:`Remote container initialization failed.`},fo={[so]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},po={[co]:`Failed to find expose module.`,[lo]:`PublicPath is required in prod mode.`};({...uo,...fo,...po});var mo=`.then(callbacks[0]).catch(callbacks[1])`;function ho(e){return e===`esm`||e===`module`}async function go({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${e}")${mo}`)([n,r]):i(()=>import(e).then(n),[],import.meta.url).catch(r)}catch(t){Xr(`Failed to load ESM entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}async function _o({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${mo}`)([n,r])}catch(t){Xr(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function vo(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ti(e,t);return i||Xr(Ka,uo,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function yo({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ti(e,t);if(s)return s;let c=a?a(n):n;return Ur(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>vo(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);Xr($a,uo,{remoteName:e,resourceUrl:c},n)})}async function bo({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return ho(c)?go({entry:a,remoteEntryExports:t}):c===`system`?_o({entry:a,remoteEntryExports:t}):yo({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function xo(e){let{entry:t,name:n}=e;return wr(n,t)}async function So(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=xo(r);if(n)return n;if(!pi[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;pi[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||bo({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=xo(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>So({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:pi,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return pi[s]}function Co(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function wo(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function To(e,t){let n=Di(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e!=null&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function Eo(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function Do(e){var t,n;let r={};for(let[t,n]of Object.entries(e.shared)){var i,a,o,s;let e=n[0];e&&(r[t]={version:e.version,singleton:(i=e.shareConfig)==null?void 0:i.singleton,requiredVersion:((a=e.shareConfig)==null?void 0:a.requiredVersion)===!1?!1:(o=e.shareConfig)==null?void 0:o.requiredVersion,eager:e.eager,strictVersion:(s=e.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((t=e.remotes)==null?void 0:t.length)>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:((n=e.remotes)==null?void 0:n.map(Eo))??[],shared:r}}}function Oo(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function ko(e,t){return t.map(t=>{let n=Ga(e,t.nameOrAlias);return Yr(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&Dr({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Oo(t)}})}function Ao(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function jo(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function Mo(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function No(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i!=null&&i.remoteEntryExports)return Mo(r,a,`cached`);try{if(!await So({origin:e,remoteInfo:n,remoteEntryExports:i==null?void 0:i.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return Mo(r,a,`success`)}catch(e){return Mo(r,a,jo(e)?`timeout`:`error`,e)}}function Po({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=Hr({url:n,cb:()=>{o(Mo(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Fo({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=Vr({url:n,cb:()=>{a(Mo(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Io(e,t){return{...e,resourceType:t}}function Lo(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(No(t,e,r,Io(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,context:Io(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:Io(i,`css`)}))})}let n=Fo,l={fetchpriority:`high`,type:`text/javascript`};r?(n=Po,l={rel:`preload`,as:`script`}):ho(e.type)&&(n=Po,l={rel:`modulepreload`,fetchpriority:`high`}),o.forEach(r=>{c.push(n({host:t,remoteInfo:e,url:r,attrs:l,context:Io(i,`js`)}))})}return Promise.all(c)}var Ro={global:{Global:ui,nativeGlobal:li,resetFederationGlobalInfo:hi,setGlobalFederationInstance:gi,getGlobalFederationConstructor:_i,setGlobalFederationConstructor:vi,getInfoWithoutType:yi,getGlobalSnapshot:bi,getTargetSnapshotInfoByModuleInfo:xi,getGlobalSnapshotInfoByModuleInfo:Si,setGlobalSnapshotInfoByModuleInfo:Ci,addGlobalSnapshot:wi,getRemoteEntryExports:Ti,registerGlobalPlugins:Ei,getGlobalHostPlugins:Di,getPreloaded:Oi,setPreloaded:ki},share:{getRegisteredShare:Ra,getGlobalShareScope:za},utils:{matchRemoteWithNameAndExpose:Wa,preloadAssets:Lo,getRemoteInfo:Co}};function zo(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Bo(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Vo=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await So({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:Ua(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return Yr(t,`remoteEntryExports is undefined \n ${Dr(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=Bo(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});(i==null?void 0:i.init)===void 0&&Xr(qa,uo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,Do(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){Xr(oo,uo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,Do(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||Xr(ao,uo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:zo(r)},void 0,Do(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=si(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},Ho=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){Yr(ii(e),`Plugin configuration is invalid.`);let n=e.name;if(Yr(n,`A name must be provided by the plugin.`),!this.registerPlugins[n]){var r;this.registerPlugins[n]=e,(r=e.apply)==null||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)})}}removePlugin(e){Yr(e,`A name is required.`);let t=this.registerPlugins[e];Yr(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}},Uo=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},Wo=class extends Uo{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Go(e,t){if(!ni(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Ko=class extends Uo{constructor(e){super(),this.onerror=Xr,this.type=e}emit(e){ni(e)||Xr(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Go(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){Zr(e),this.onerror(e)}return e}},qo=class extends Uo{constructor(e){super(),this.onerror=Xr,this.type=e}emit(e){ni(e)||Xr(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(Zr(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Go(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},Jo=`Remote loading is disabled by experiments.optimization.disableRemote.`,Yo=class{constructor(){this.hooks=new Ho({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error(Jo)}preloadRemote(){throw Error(Jo)}registerRemotes(){throw Error(Jo)}getRemoteModuleAndOptions(){throw Error(Jo)}initRawContainer(){throw Error(Jo)}};function Xo(e,t){let n=oi(t);n.url||Xr(no,uo,{remoteName:e.name});let r=Tr(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Zo(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ei(t)||!ti(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Ua(t.name,r)});Xo(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Lo(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Qo(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function $o(e,t,n,r,i={},a){let{value:o}=yi(e,$r(t)),s=a||o;if(s&&!jr(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Qo(r),a=s.remotesInfo[r];$o(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var es=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function ts(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if($o(r,n,(t,n,r)=>{var i;let c;if(r)c=d;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;c=Oo(e)}else if(f===!0)c=d;else return;let l=Tr(t,oi(t).url);l&&s.push({name:n.name,moduleInfo:{name:n.name,entry:l,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:l});let u=`modules`in t?t.modules:[],p=Ao(c.exposes);p.length&&`modules`in t&&(u=t==null||(i=t.modules)==null?void 0:i.reduce((e,t)=>((p==null?void 0:p.indexOf(t.moduleName))!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>Tr(t,e));return c.filter?n.filter(c.filter):n}if(u){let r=u.length;for(let i=0;i<r;i++){let r=u[i],s=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:s,name:n.name,remoteSnapshot:t,preloadConfig:c,remote:n,origin:e}),!Oi(s)&&(c.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):c.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),ki(s))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=Ra(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{var n;let r=(n=u.shared)==null?void 0:n[e.sharedName];if(!r)return;let i=e.version?r.find(t=>t.version===e.version):r;i&&ai(i).forEach(n=>{t(n,e)})})}let p=o.filter(e=>!c.has(e)&&!es(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!es(`link`,e)),jsAssetsWithoutEntry:p,entryAssets:s.filter(e=>!es(`script`,e.url))}}var ns=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ei(i)&&ti(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Xo(r,o),ts(t,n,r,a,o))}}};function rs(e,t){let n=Si({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&yi(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:bi(),remoteSnapshot:Si({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:bi(),remoteSnapshot:Si({name:e.name,version:`version`in e?e.version:void 0})}}var is=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ho({beforeLoadRemoteSnapshot:new Wo(`beforeLoadRemoteSnapshot`),loadSnapshot:new qo(`loadGlobalSnapshot`),loadRemoteSnapshot:new qo(`loadRemoteSnapshot`),afterLoadSnapshot:new qo(`afterLoadSnapshot`)}),this.manifestLoading=ui.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=Si({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},wi({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!yi(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i==null?void 0:i.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c)if(jr(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Ci({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}else if(ei(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Ci(e,r);u=r,d=i}else Xr(Qa,uo,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Do(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return rs(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=Co(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],Xr(Ja,uo,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,Do(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&Xr(io,uo,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,Do(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=Ar(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},as=class{constructor(){this.hooks=new Ho({})}},os=class{constructor(e){this.hooks=new Ho({beforeRegisterShare:new Ko(`beforeRegisterShare`),afterResolve:new qo(`afterResolve`),beforeLoadShare:new qo(`beforeLoadShare`),loadShare:new Wo,afterLoadShare:new Uo(`afterLoadShare`),errorLoadShare:new Uo(`errorLoadShare`),resolveShare:new Ko(`resolveShare`),initContainerShareScopeMap:new Ko(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){Zr(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){Zr(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Da(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{var i;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),(i=this.shareScopeMap[r])!=null&&i[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Ba({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r!=null&&r.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,Yr(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=Ra(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=Ha(o,s);if(t.lib)return Va(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,Va(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}{let r=(async()=>{let e=await t.get();return Va(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=Oa(a.treeShaking),i=Ha(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,Va(i,n.options.name);let{shared:r,useTreesShaking:o}=Ra(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=Ha(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=wa,t){let{host:n}=this,r=t==null?void 0:t.from,i=t==null?void 0:t.strategy,a=t==null?void 0:t.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{var n;let{version:r,eager:i}=t;l[e]=l[e]||{};let a=l[e],o=a[r]&&Ha(a[r]),s=!!(o&&(`eager`in o&&o.eager||`shareConfig`in o&&(n=o.shareConfig)!=null&&n.eager));(!o||o.strategy!==`loaded-first`&&!o.loaded&&(!i==!s?c>a[r].from:i))&&(a[r]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r!=null&&r.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Ba({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r!=null&&r.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=Ra(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return Va(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return Va(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&Xr((t==null?void 0:t.from)===`build`?Xa:Za,uo,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}Xr(Za,uo,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=za(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},ss=class{constructor(){this.shareScopeMap={},this.hooks=new Ho({afterResolve:new qo(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},cs=class{constructor(e){this.hooks=new Ho({beforeRegisterRemote:new Ko(`beforeRegisterRemote`),registerRemote:new Ko(`registerRemote`),beforeRequest:new qo(`beforeRequest`),afterMatchRemote:new Wo(`afterMatchRemote`),onLoad:new Wo(`onLoad`),afterLoadRemote:new Wo(`afterLoadRemote`),handlePreloadModule:new Uo(`handlePreloadModule`),errorLoadRemote:new Wo(`errorLoadRemote`),beforePreloadRemote:new Wo(`beforePreloadRemote`),generatePreloadAssets:new Wo(`generatePreloadAssets`),afterPreloadRemote:new Wo(`afterPreloadRemote`),loadEntry:new Wo}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Wa(n.options.remotes,e),i=e,a=r==null?void 0:r.expose,o=r?Co(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:h}=u;i=m,a=p,o=Co(f);let g=await c.get(m,p,t,h),_=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?g:void 0,exposeModuleFactory:r?void 0:g,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof _==`function`?_:g}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=ko(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Ua(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=Co(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Lo(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Vo({host:r,remoteInfo:Co({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Wa(t.options.remotes,i);if(!a)try{Xr(Ya,uo,{hostName:t.options.name,requestId:i},void 0,Do(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=Co(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;Yr(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Vo(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>{var n;return e.alias&&(t.name.startsWith(e.alias)||((n=t.alias)==null?void 0:n.startsWith(e.alias)))});Yr(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=wa,e.type||=Ta};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n!=null&&n.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),Er(o.join(` `)))}}removeRemote(e){try{let{host:n}=this,{name:r}=e,i=n.options.remotes.findIndex(e=>e.name===r);i!==-1&&n.options.remotes.splice(i,1);let a=yi(ci.__FEDERATION__.moduleInfo,$r(e)).key;delete ci.__FEDERATION__.moduleInfo[a],`entry`in e&&(n.snapshotHandler.manifestCache.delete(e.entry),delete ui.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:o}=rs(e,n);if(o){let t=o&&`remotesInfo`in o&&o.remotesInfo&&yi(o.remotesInfo,e.name).key;t&&delete o.remotesInfo[t]}let s=n.moduleCache.get(e.name);if(s){var t;let r=s.remoteInfo,i=r.entryGlobalName;ci[i]&&((t=Object.getOwnPropertyDescriptor(ci,i))!=null&&t.configurable?delete ci[i]:ci[i]=void 0);let a=xo(s.remoteInfo);pi[a]&&delete pi[a];let o=r.buildVersion?wr(r.name,r.buildVersion):r.name,c=ci.__FEDERATION__.__INSTANCES__.findIndex(e=>r.buildVersion?e.options.id===o:e.name===o);if(c!==-1){let e=ci.__FEDERATION__.__INSTANCES__[c];o=e.options.id||o;let t=za(),n=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===r.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==r.name),c.useIn.length?n=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),n&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{var a;(a=t[e])==null||(a=a[n])==null||(a=a[r])==null||delete a[i]}),ci.__FEDERATION__.__INSTANCES__.splice(c,1)}n.moduleCache.delete(e.name)}}catch(e){Jr.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},ls=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,us=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ds=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,fs=class{constructor(e){this.hooks=new Ho({beforeInit:new Ko(`beforeInit`),init:new Uo,beforeInitContainer:new qo(`beforeInitContainer`),initContainer:new qo(`initContainer`)}),this.version=`2.8.1`,this.moduleCache=new Map,this.loaderHook=new Ho({getModuleInfo:new Uo,createScript:new Uo,createLink:new Uo,fetch:new Wo,loadEntryError:new Wo,afterLoadEntry:new Wo(`afterLoadEntry`),beforeInitRemote:new Wo(`beforeInitRemote`),afterInitRemote:new Wo(`afterInitRemote`),beforeGetExpose:new Wo(`beforeGetExpose`),afterGetExpose:new Wo(`afterGetExpose`),beforeExecuteFactory:new Wo(`beforeExecuteFactory`),afterExecuteFactory:new Wo(`afterExecuteFactory`),getModuleFactory:new Wo}),this.bridgeHook=new Ho({beforeBridgeRender:new Uo,afterBridgeRender:new Uo,beforeBridgeDestroy:new Uo,afterBridgeDestroy:new Uo});let t=us&&ls?[Zo(),ns()]:[],n={id:wo(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=us?new is(this):new as,this.sharedHandler=ds?new os(this):new ss,this.remoteHandler=us?new cs(this):new Yo,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&Xr(Gr(to,uo)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=wa,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=ds?Da(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=To(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},ps=Ro;function ms(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function hs(e,t){let n=ms();return ci.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function gs(e){let t=new((_i())||fs)({id:`${e.name}@${e.version||Date.now()}`,...e});return gi(t),t}var _s=null;function vs(e){let t=hs(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),_s||=t,t):(_s=gs(n),_s)}function ys(...e){return Yr(_s,eo,uo),_s.loadRemote.apply(_s,e)}function bs(...e){return Yr(_s,eo,uo),_s.registerRemotes.apply(_s,e)}vi(fs);var xs=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),"a",{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),S=e(function(e){var r=b(`src`),i=`toString`,a=(``+x).split(i);n.inspectSource=function(e){return x.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||x.call(this)})}),C=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},w=function(e,t,n){if(C(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},T=`prototype`,E=function(e,r,i){var a=e&E.F,o=e&E.G,s=e&E.S,c=e&E.P,l=e&E.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[T],d=o?n:n[r]||(n[r]={}),f=d[T]||(d[T]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?w(g,t):c&&typeof g==`function`?w(Function.call,g):g,u&&S(u,p,g,e&E.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var D=E,O=Math.ceil,k=Math.floor,A=function(e){return isNaN(e=+e)?0:(e>0?k:O)(e)},j=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},M=function(e){return function(t,n){var r=String(j(t)),i=A(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);D(D.P,`String`,{codePointAt:function(e){return M(this,e)}}),n.String.codePointAt;var N=Math.max,ee=Math.min,P=function(e,t){return e=A(e),e<0?N(e+t,0):ee(e,t)},F=String.fromCharCode,te=String.fromCodePoint;D(D.S+D.F*(!!te&&te.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],P(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?F(a):F(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var I={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},L={isSpaceSeparator:function(e){return typeof e==`string`&&I.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||I.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||I.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},R,z,ne,re,ie,ae,B,oe,se,ce=function(e,t){R=String(e),z=`start`,ne=[],re=0,ie=1,ae=0,B=void 0,oe=void 0,se=void 0;do B=fe(),be[z]();while(B.type!==`eof`);return typeof t==`function`?le({"":se},``,t):se};function le(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=le(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=le(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var V,H,ue,de,U;function fe(){for(V=`default`,H=``,ue=!1,de=1;;){U=pe();var e=me[V]();if(e)return e}}function pe(){if(R[re])return String.fromCodePoint(R.codePointAt(re))}function W(){var e=pe();return e===`
|
|
6
|
-
`?(ie++,ae=0):e?ae+=e.length:ae++,e&&(re+=e.length),e}var me={default:function(){switch(U){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
|
|
7
|
-
`:case`\r`:case`\u2028`:case`\u2029`:W();return;case`/`:W(),V=`comment`;return;case void 0:return W(),he(`eof`)}if(L.isSpaceSeparator(U)){W();return}return me[z]()},comment:function(){switch(U){case`*`:W(),V=`multiLineComment`;return;case`/`:W(),V=`singleLineComment`;return}throw Ce(W())},multiLineComment:function(){switch(U){case`*`:W(),V=`multiLineCommentAsterisk`;return;case void 0:throw Ce(W())}W()},multiLineCommentAsterisk:function(){switch(U){case`*`:W();return;case`/`:W(),V=`default`;return;case void 0:throw Ce(W())}W(),V=`multiLineComment`},singleLineComment:function(){switch(U){case`
|
|
8
|
-
`:case`\r`:case`\u2028`:case`\u2029`:W(),V=`default`;return;case void 0:return W(),he(`eof`)}W()},value:function(){switch(U){case`{`:case`[`:return he(`punctuator`,W());case`n`:return W(),ge(`ull`),he(`null`,null);case`t`:return W(),ge(`rue`),he(`boolean`,!0);case`f`:return W(),ge(`alse`),he(`boolean`,!1);case`-`:case`+`:W()===`-`&&(de=-1),V=`sign`;return;case`.`:H=W(),V=`decimalPointLeading`;return;case`0`:H=W(),V=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:H=W(),V=`decimalInteger`;return;case`I`:return W(),ge(`nfinity`),he(`numeric`,1/0);case`N`:return W(),ge(`aN`),he(`numeric`,NaN);case`"`:case`'`:ue=W()===`"`,H=``,V=`string`;return}throw Ce(W())},identifierNameStartEscape:function(){if(U!==`u`)throw Ce(W());W();var e=ye();switch(e){case`$`:case`_`:break;default:if(!L.isIdStartChar(e))throw Te()}H+=e,V=`identifierName`},identifierName:function(){switch(U){case`$`:case`_`:case``:case``:H+=W();return;case`\\`:W(),V=`identifierNameEscape`;return}if(L.isIdContinueChar(U)){H+=W();return}return he(`identifier`,H)},identifierNameEscape:function(){if(U!==`u`)throw Ce(W());W();var e=ye();switch(e){case`$`:case`_`:case``:case``:break;default:if(!L.isIdContinueChar(e))throw Te()}H+=e,V=`identifierName`},sign:function(){switch(U){case`.`:H=W(),V=`decimalPointLeading`;return;case`0`:H=W(),V=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:H=W(),V=`decimalInteger`;return;case`I`:return W(),ge(`nfinity`),he(`numeric`,de*(1/0));case`N`:return W(),ge(`aN`),he(`numeric`,NaN)}throw Ce(W())},zero:function(){switch(U){case`.`:H+=W(),V=`decimalPoint`;return;case`e`:case`E`:H+=W(),V=`decimalExponent`;return;case`x`:case`X`:H+=W(),V=`hexadecimal`;return}return he(`numeric`,de*0)},decimalInteger:function(){switch(U){case`.`:H+=W(),V=`decimalPoint`;return;case`e`:case`E`:H+=W(),V=`decimalExponent`;return}if(L.isDigit(U)){H+=W();return}return he(`numeric`,de*Number(H))},decimalPointLeading:function(){if(L.isDigit(U)){H+=W(),V=`decimalFraction`;return}throw Ce(W())},decimalPoint:function(){switch(U){case`e`:case`E`:H+=W(),V=`decimalExponent`;return}if(L.isDigit(U)){H+=W(),V=`decimalFraction`;return}return he(`numeric`,de*Number(H))},decimalFraction:function(){switch(U){case`e`:case`E`:H+=W(),V=`decimalExponent`;return}if(L.isDigit(U)){H+=W();return}return he(`numeric`,de*Number(H))},decimalExponent:function(){switch(U){case`+`:case`-`:H+=W(),V=`decimalExponentSign`;return}if(L.isDigit(U)){H+=W(),V=`decimalExponentInteger`;return}throw Ce(W())},decimalExponentSign:function(){if(L.isDigit(U)){H+=W(),V=`decimalExponentInteger`;return}throw Ce(W())},decimalExponentInteger:function(){if(L.isDigit(U)){H+=W();return}return he(`numeric`,de*Number(H))},hexadecimal:function(){if(L.isHexDigit(U)){H+=W(),V=`hexadecimalInteger`;return}throw Ce(W())},hexadecimalInteger:function(){if(L.isHexDigit(U)){H+=W();return}return he(`numeric`,de*Number(H))},string:function(){switch(U){case`\\`:W(),H+=_e();return;case`"`:if(ue)return W(),he(`string`,H);H+=W();return;case`'`:if(!ue)return W(),he(`string`,H);H+=W();return;case`
|
|
9
|
-
`:case`\r`:throw Ce(W());case`\u2028`:case`\u2029`:Ee(U);break;case void 0:throw Ce(W())}H+=W()},start:function(){switch(U){case`{`:case`[`:return he(`punctuator`,W())}V=`value`},beforePropertyName:function(){switch(U){case`$`:case`_`:H=W(),V=`identifierName`;return;case`\\`:W(),V=`identifierNameStartEscape`;return;case`}`:return he(`punctuator`,W());case`"`:case`'`:ue=W()===`"`,V=`string`;return}if(L.isIdStartChar(U)){H+=W(),V=`identifierName`;return}throw Ce(W())},afterPropertyName:function(){if(U===`:`)return he(`punctuator`,W());throw Ce(W())},beforePropertyValue:function(){V=`value`},afterPropertyValue:function(){switch(U){case`,`:case`}`:return he(`punctuator`,W())}throw Ce(W())},beforeArrayValue:function(){if(U===`]`)return he(`punctuator`,W());V=`value`},afterArrayValue:function(){switch(U){case`,`:case`]`:return he(`punctuator`,W())}throw Ce(W())},end:function(){throw Ce(W())}};function he(e,t){return{type:e,value:t,line:ie,column:ae}}function ge(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(pe()!==r)throw Ce(W());W()}}function _e(){switch(pe()){case`b`:return W(),`\b`;case`f`:return W(),`\f`;case`n`:return W(),`
|
|
10
|
-
`;case`r`:return W(),`\r`;case`t`:return W(),` `;case`v`:return W(),`\v`;case`0`:if(W(),L.isDigit(pe()))throw Ce(W());return`\0`;case`x`:return W(),ve();case`u`:return W(),ye();case`
|
|
11
|
-
`:case`\u2028`:case`\u2029`:return W(),``;case`\r`:return W(),pe()===`
|
|
12
|
-
`&&W(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw Ce(W());case void 0:throw Ce(W())}return W()}function ve(){var e=``,t=pe();if(!L.isHexDigit(t)||(e+=W(),t=pe(),!L.isHexDigit(t)))throw Ce(W());return e+=W(),String.fromCodePoint(parseInt(e,16))}function ye(){for(var e=``,t=4;t-->0;){var n=pe();if(!L.isHexDigit(n))throw Ce(W());e+=W()}return String.fromCodePoint(parseInt(e,16))}var be={start:function(){if(B.type===`eof`)throw we();xe()},beforePropertyName:function(){switch(B.type){case`identifier`:case`string`:oe=B.value,z=`afterPropertyName`;return;case`punctuator`:Se();return;case`eof`:throw we()}},afterPropertyName:function(){if(B.type===`eof`)throw we();z=`beforePropertyValue`},beforePropertyValue:function(){if(B.type===`eof`)throw we();xe()},beforeArrayValue:function(){if(B.type===`eof`)throw we();if(B.type===`punctuator`&&B.value===`]`){Se();return}xe()},afterPropertyValue:function(){if(B.type===`eof`)throw we();switch(B.value){case`,`:z=`beforePropertyName`;return;case`}`:Se()}},afterArrayValue:function(){if(B.type===`eof`)throw we();switch(B.value){case`,`:z=`beforeArrayValue`;return;case`]`:Se()}},end:function(){}};function xe(){var e;switch(B.type){case`punctuator`:switch(B.value){case`{`:e={};break;case`[`:e=[]}break;case`null`:case`boolean`:case`numeric`:case`string`:e=B.value}if(se===void 0)se=e;else{var t=ne[ne.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,oe,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)ne.push(e),z=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{var n=ne[ne.length-1];z=n==null?`end`:Array.isArray(n)?`afterArrayValue`:`afterPropertyValue`}}function Se(){ne.pop();var e=ne[ne.length-1];z=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function Ce(e){return Oe(e===void 0?`JSON5: invalid end of input at `+ie+`:`+ae:`JSON5: invalid character '`+De(e)+`' at `+ie+`:`+ae)}function we(){return Oe(`JSON5: invalid end of input at `+ie+`:`+ae)}function Te(){return ae-=5,Oe(`JSON5: invalid identifier character at `+ie+`:`+ae)}function Ee(e){console.warn(`JSON5: '`+De(e)+`' in strings is not valid ECMAScript; consider escaping`)}function De(e){var t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){var n=e.charCodeAt(0).toString(16);return`\\x`+(`00`+n).substring(n.length)}return e}function Oe(e){var t=SyntaxError(e);return t.lineNumber=ie,t.columnNumber=ae,t}return{parse:ce,stringify:function(e,t,n){var r=[],i=``,a,o,s=``,c;if(typeof t==`object`&&t&&!Array.isArray(t)&&(n=t.space,c=t.quote,t=t.replacer),typeof t==`function`)o=t;else if(Array.isArray(t)){a=[];for(var l=0,u=t;l<u.length;l+=1){var d=u[l],f=void 0;typeof d==`string`?f=d:(typeof d==`number`||d instanceof String||d instanceof Number)&&(f=String(d)),f!==void 0&&a.indexOf(f)<0&&a.push(f)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n==`number`?n>0&&(n=Math.min(10,Math.floor(n)),s=` `.substr(0,n)):typeof n==`string`&&(s=n.substr(0,10)),p(``,{"":e});function p(e,t){var n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),o&&(n=o.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return m(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?_(n):h(n)}function m(e){for(var t={"'":.1,'"':.2},n={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},r=``,i=0;i<e.length;i++){var a=e[i];switch(a){case`'`:case`"`:t[a]++,r+=a;continue;case`\0`:if(L.isDigit(e[i+1])){r+=`\\x00`;continue}}if(n[a]){r+=n[a];continue}if(a<` `){var o=a.charCodeAt(0).toString(16);r+=`\\x`+(`00`+o).substring(o.length);continue}r+=a}var s=c||Object.keys(t).reduce(function(e,n){return t[e]<t[n]?e:n});return r=r.replace(new RegExp(s,`g`),n[s]),s+r+s}function h(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=a||Object.keys(e),o=[],c=0,l=n;c<l.length;c+=1){var u=l[c],d=p(u,e);if(d!==void 0){var f=g(u)+`:`;s!==``&&(f+=` `),f+=d,o.push(f)}}var m;if(o.length===0)m=`{}`;else{var h;if(s===``)h=o.join(`,`),m=`{`+h+`}`;else{var _=`,
|
|
13
|
-
`+i;h=o.join(_),m=`{
|
|
14
|
-
`+i+h+`,
|
|
15
|
-
`+t+`}`}}return r.pop(),i=t,m}function g(e){if(e.length===0)return m(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!L.isIdStartChar(t))return m(e,!0);for(var n=t.length;n<e.length;n++)if(!L.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return m(e,!0);return e}function _(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=[],a=0;a<e.length;a++){var o=p(String(a),e);n.push(o===void 0?`null`:o)}var c;if(n.length===0)c=`[]`;else if(s===``)c=`[`+n.join(`,`)+`]`;else{var l=`,
|
|
16
|
-
`+i,u=n.join(l);c=`[
|
|
17
|
-
`+i+u+`,
|
|
18
|
-
`+t+`]`}return r.pop(),i=t,c}}}}))})),Ss=r(((e,t)=>{t.exports={}})),Cs=r(((t,n)=>{(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global<`u`&&global.crypto&&(r=global.crypto),!r&&typeof e==`function`)try{r=Ss()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t==n?e.length*4:t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),ws=r(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(Cs()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})}));dt();var Ts=n(xs()),Es=n(ws());g();var Ds=window.innerWidth<=600?12:void 0,Os={add:()=>_.createElement(Re,null),auth:()=>_.createElement(Yn,null),backlight:()=>_.createElement(E,null),book:()=>_.createElement(vn,null),delete:()=>_.createElement(we,null),dimmer:()=>_.createElement(cn,null),edit:()=>_.createElement(fr,null),error:()=>_.createElement(N,null),group:()=>_.createElement(yt,null),help:()=>_.createElement(Ue,null),identify:()=>_.createElement(ve,null),info:()=>_.createElement(Wt,null),light:()=>_.createElement(Vn,null),lines:()=>_.createElement(R,null),next:()=>_.createElement(hn,null),open:()=>_.createElement(Sn,null),pair:()=>_.createElement(sn,null),pause:()=>_.createElement(nn,null),play:()=>_.createElement(Tt,null),previous:()=>_.createElement(M,null),qrcode:()=>_.createElement(cr,null),refresh:()=>_.createElement($e,null),save:()=>_.createElement(ar,null),search:()=>_.createElement(nt,null),send:()=>_.createElement(se,null),settings:()=>_.createElement(ie,null),socket:()=>_.createElement(tr,null),stop:()=>_.createElement(dn,null),unpair:()=>_.createElement(kt,null),upload:()=>_.createElement(Xe,null),user:()=>_.createElement(Qt,null),warning:()=>_.createElement(ae,null),web:()=>_.createElement(dr,null)};function ks(e){return Object.prototype.toString.call(e)===`[object Object]`}var X=class e extends s{constructor(t){super(t),q(this,`defaultValue`,void 0),q(this,`isError`,void 0),q(this,`lang`,void 0),q(this,`defaultSendToDone`,void 0),q(this,`sendToTimeout`,void 0),q(this,`noPlaceRequired`,void 0),q(this,`reportedHidden`,!1),q(this,`calculateTimeout`,null),q(this,`AsyncFunction`,void 0),q(this,`onUpdate`,t=>{let n=e.getValue(t||this.props.data,this.props.attr)||``;this.state.value===n?this.forceUpdate():this.setState({value:n})}),q(this,`getObject`,async e=>{try{var t,n;return await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,e))||null}catch(e){return console.error(e),null}}),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=K.getLanguage(),t.schema&&(t.custom?t.schema.defaultFunc||(this.defaultValue=t.schema.default):t.schema.type!==`state`&&!t.schema.defaultFunc&&(this.defaultValue=t.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t;if((t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):this.props.schema.type!==`state`&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`))),this.props.attr){var n,r;(n=(r=this.props.oContext).registerOnForceUpdate)==null||n.call(r,this.props.attr,this.onUpdate)}let i=[`select`,`autocomplete`,`autocompleteSendTo`];if(this.defaultValue!==void 0&&this.props.attr){let t=e.getValue(this.props.data,this.props.attr);(t===void 0||i.includes(this.props.schema.type)&&(t===``||t===null))&&setTimeout(()=>{this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(e.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))},100)}else this.props.schema.defaultSendTo&&this.defaultSendTo().catch(e=>console.error(e))}async defaultSendTo(){if(this.props.alive&&this.props.schema.defaultSendTo){this.defaultSendToDone=!0;let t=this.props.schema.data;if(t===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{t=JSON.parse(e)}catch{console.error(`Cannot parse json data: ${e}`)}}else t={attr:this.props.attr,value:e.getValue(this.props.data,this.props.attr)};t===void 0&&(t=null);let n=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(n!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${n}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,n));return}}try{let r=await this.props.oContext.socket.sendTo(n,this.props.schema.defaultSendTo,t);r!=null&&this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,r,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(e.setValue(this.props.data,this.props.attr,r),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))}catch(e){console.error(e)}}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,K.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()))}componentWillUnmount(){if(this.props.attr){var e,t;(e=(t=this.props.oContext).registerOnForceUpdate)==null||e.call(t,this.props.attr)}this.sendToTimeout&&=(clearTimeout(this.sendToTimeout),null),this.calculateTimeout&&=(clearTimeout(this.calculateTimeout),null)}static getValue(t,n){if(!n)return;if(typeof n==`string`)return e.getValue(t,n.split(`.`));if(n.length===1)return t[n[0]];let r=n.shift();if(typeof r==`string`&&typeof t[r]==`object`)return e.getValue(t[r],n)}static setValue(t,n,r){if(n){if(typeof n==`string`){e.setValue(t,n.split(`.`),r);return}if(n.length===1)r===null?delete t[n[0]]:t[n[0]]=r;else{let i=n.shift();if(typeof i!=`string`)return;(!t[i]||typeof t[i]==`object`)&&(t[i]=t[i]||{}),e.setValue(t[i],n,r)}}}getText(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:K.t(e);return n.includes("${")?this.getPattern(n,void 0,t):n}if(e&&typeof e==`object`){let n=e;return n.func?typeof n.func==`object`?this.getPattern(n.func[this.lang]||n.func.en||``,void 0,!0):this.getPattern(n.func,void 0,t):e[this.lang]||e.en||``}return e.toString()}async getTextAsync(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:K.t(e);return n.includes("${")?this.getPatternAsync(n,null,t):n}return ks(e)?e.func?typeof e.func==`object`?this.getPatternAsync(e.func[this.lang]||e.func.en||``,null,!0):this.getPatternAsync(e.func,null,t):e[this.lang]||e.en||``:e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let t=this.state.confirmData||this.props.schema.confirm;if(!t)return null;let n=null;return t.type===`warning`?n=_.createElement(ae,null):t.type===`error`?n=_.createElement(N,null):t.type===`info`&&(n=_.createElement(Wt,null)),_.createElement(Cn,{title:this.getText(t.title)||K.t(`jc_Please confirm`),text:this.getText(t.text),ok:this.getText(t.ok)||K.t(`jc_Ok`),cancel:this.getText(t.cancel)||K.t(`jc_Cancel`),icon:n||void 0,onClose:t=>this.setState({confirmDialog:!1},()=>{if(t){if(this.state.confirmCallback){let e=this.state.confirmCallback;this.setState({confirmCallback:null},()=>e(!0));return}let t=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&e.setValue(t,this.state.confirmDepAttr,this.state.confirmDepNewValue),e.setValue(t,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(t))}else{let e=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{e&&e(!1)})}})})}getIcon(e){if(e||=this.props.schema.icon,!e)return null;let t=Os[e];return t?t():((e.endsWith(`.png`)||e.endsWith(`.svg`)||e.endsWith(`.jpg`))&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),_.createElement(Pt,{src:e,style:{width:22,height:22}}))}onChangeAsync(e,t){return new Promise(n=>{let r=this.onChange(e,t,n);r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))})}async onChange(t,n,r){let i=JSON.parse(JSON.stringify(this.props.data));if(e.setValue(i,t,n),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmData:null},()=>{typeof r==`function`?r():e()})});if(this.props.schema.confirmDependsOn)for(let a=0;a<this.props.schema.confirmDependsOn.length;a++){let o=this.props.schema.confirmDependsOn[a];if(o.confirm){let a=e.getValue(i,o.attr);if(await this.execute(o.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{if(!o.confirm)throw Error(`Cannot set value: confirm is not defined for ${o.attr}`);this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmDepNewValue:a,confirmDepAttr:o.attr,confirmData:o.confirm},()=>{typeof r==`function`?r():e()})})}}let a=[];if(this.props.schema.onChangeDependsOn)for(let t=0;t<this.props.schema.onChangeDependsOn.length;t++){let n=this.props.schema.onChangeDependsOn[t];if(n.onChange){let t=e.getValue(i,n.attr),r;r=this.props.custom?await this.executeCustom(n.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(n.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`),r!==t&&n.attr&&(e.setValue(i,n.attr,r),a.push(n.attr))}}if(this.props.schema.hiddenDependsOn)for(let e=0;e<this.props.schema.hiddenDependsOn.length;e++){let t=this.props.schema.hiddenDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.labelDependsOn)for(let e=0;e<this.props.schema.labelDependsOn.length;e++){let t=this.props.schema.labelDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.helpDependsOn)for(let e=0;e<this.props.schema.helpDependsOn.length;e++){let t=this.props.schema.helpDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.onChange&&!this.props.schema.onChange.ignoreOwnChanges){let t=e.getValue(i,this.props.attr),n=this.props.custom?await this.executeCustom(this.props.schema.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(this.props.schema.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`);n!==t&&e.setValue(i,this.props.attr,n)}return this.props.custom?(this.props.onChange(t,n,()=>r==null?void 0:r()),a!=null&&a.length&&a.forEach((t,n)=>setTimeout(()=>this.props.onChange(t,e.getValue(i,t)),n*50))):this.props.onChange(i,void 0,()=>{a.length&&this.props.oContext.forceUpdate(a,i),r==null||r()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?<![\w$.])getObject\(/g,(t,n)=>{let r=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(r)?t:`await ${t}`})}debugLog(e,t,n,r){var i,a;if(!((i=this.props.schema)!=null&&i.debug))return;let o=this.props.attr||((a=this.props.schema)==null?void 0:a.attr)||``,s=`%c[jsonConfig]%c ${o?`${o} → `:``}${e}`,c={function:t,result:n,data:r??this.props.data,arrayIndex:this.props.arrayIndex};n instanceof Error?console.error(s,`background:#b71c1c;color:#fff;border-radius:3px;padding:1px 4px`,`color:#e53935`,c):console.log(s,`background:#33691e;color:#fff;border-radius:3px;padding:1px 4px`,`color:#7cb342`,c)}async execute(t,n,r,i,a,o){let s;if(ks(t))s=t.func;else if(typeof t==`string`)s=t;else return t;if(!s)return n;s.includes(`getObject(`)&&(s=e.ensureAwaitGetObject(s));try{let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`_alive`,`_common`,`_socket`,`_instance`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,s.includes(`return`)?s:`return ${s}`)(r||this.props.data||{},this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,i,a||{},this.props.changed,window.location.href,this.getObject);return this.debugLog(o||`JS function`,s,e,r),e}catch(e){return this.debugLog(o||`JS function`,s,e instanceof Error?e:Error(String(e)),r),console.error(`Cannot execute ${JSON.stringify(t)}: ${e}`),n}}async executeCustom(t,n,r,i,a,o,s){let c;if(ks(t))c=t.func;else if(typeof t==`string`)c=t;else return t;if(!c)return null;c.includes(`getObject(`)&&(c=e.ensureAwaitGetObject(c));try{let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,c.includes(`return`)?c:`return ${c}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,i||{},r||{},this.props.oContext.socket,a,o||{},this.props.changed,window.location.href,this.getObject);return this.debugLog(s||`JS function`,c,e,n),e}catch(e){return this.debugLog(s||`JS function`,c,e instanceof Error?e:Error(String(e)),n),console.error(`Cannot execute ${c}: ${e}`),null}}async calculate(e){let t,n,r,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default),{error:t,disabled:n,hidden:r,defaultValue:i}}onError(e,t){var n,r;e&&(t?this.isError[e]=t:delete this.isError[e]),(n=(r=this.props).onError)==null||n.call(r,e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},this.getText(e,n)):(e=this.getText(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?$t.renderTextWithA(e):e)}async renderHelpAsync(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},await this.getTextAsync(e,n)):(e=await this.getTextAsync(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?$t.renderTextWithA(e):e)}static escapeString(t,n){return typeof t==`string`?(t=t.replace(/`/g,"\\`"),t=t.replace(/\${([^}]+)}/g,(t,r)=>{if(r&&typeof r==`string`&&r.startsWith(`data.`)){let t=e.getValue(n,r.replace(/^data\./,``));if(typeof t==`string`&&(t.includes(`\\`)||t.includes(`"`)))return`\${${r}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return t}),t):``}async getPatternAsync(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&(i=e.ensureAwaitGetObject(i));try{if(this.props.custom){let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`getObject`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:K.t(t)}let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`getObject`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:K.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}getPattern(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&console.warn(`It is not possible to use getObject function in text patterns: ${i}`);try{if(this.props.custom){let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:K.t(t)}let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href);return r?t:K.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;let e=this.props.schema;if(!e)return;let{error:t,disabled:n,hidden:r,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==r||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:r,defaultValue:i}})},50)}render(){let e=this.props.schema;if(!e||this.props.expertMode===!1&&e.expertMode||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.defaultSendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),e.hideOnlyControl){let t=_.createElement(Ct,{size:{xs:e.xs||Ds,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:`left`,...e.style,...this.props.oContext.themeType===`dark`?e.darkStyle:{}}});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!0))},10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!1))},10)),e.validatorNoSaveOnError&&this.props.attr&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:!e.validatorErrorText||K.t(e.validatorErrorText)},setTimeout(e=>Object.keys(e).forEach(t=>this.props.onError(t,e[t])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));let t=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled||!1,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return t;let n=_.createElement(Ct,{title:this.getText(e.tooltip),size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:`left`,width:e.type===`divider`||e.type===`header`?e.width||`100%`:void 0,...e.style,...this.props.oContext.themeType===`dark`?e.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?_.createElement(Ct,{container:!0,style:{width:`100%`}},_.createElement(Ct,{sx:{flex:1}},t),_.createElement(Ct,null,_.createElement(Ge,{disabled:this.state.calculatedValues.disabled,variant:`outlined`,onClick:()=>this.defaultSendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):K.t(`jc_Request data by instance`)},this.getText(this.props.schema.button)))):t);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),this.renderDialogConfirm(),n):this.state.confirmDialog?_.createElement(_.Fragment,null,this.renderDialogConfirm(),n):n}};q(X,`DIFFERENT_VALUE`,`__different__`),q(X,`DIFFERENT_LABEL`,`jc___different__`),q(X,`NONE_VALUE`,``),q(X,`NONE_LABEL`,`jc_none`),g();var As={fullWidth:{width:`100%`},accordionSummary:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`}),accordionTitle:{},toolbar:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`,borderRadius:`3px`}),tooltip:{pointerEvents:`none`}},js=class extends X{constructor(e){super(e),q(this,`typingTimer`,null),q(this,`onAccordionError`,e=>(t,n)=>{let r={...this.state.accordionErrors};r[e]||(r[e]={}),t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({accordionErrors:r}),this.props.onError(t,n)}),q(this,`hasAccordionErrors`,e=>!!this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0),q(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),q(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),q(this,`onChangeWrapper`,e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(e=>{if(this.typingTimer=null,this.props.attr){let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(e))}},300,e)}),q(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))}),q(this,`onExport`,()=>{let{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,r=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,`-`)}.json`,i=document.createElement(`a`);i.setAttribute(`href`,n),i.setAttribute(`download`,r),i.click()}),q(this,`onImport`,e=>{let t=document.createElement(`input`);t.type=`file`,t.accept=`.json`,t.onchange=t=>{var n;let r=(n=t.target.files)==null?void 0:n[0];if(!r)return;let i=new FileReader;i.onload=t=>{try{var n;let r=JSON.parse((n=t.target)==null?void 0:n.result);if(!Array.isArray(r)){alert(K.t(`jc_Invalid JSON format. Expected an array.`));return}let i;i=e?r:[...this.state.value,...r],this.setState({value:i,activeIndex:-1},()=>this.onChangeWrapper(i))}catch{alert(K.t(`jc_Invalid JSON file.`))}},i.readAsText(r)},t.click()}),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),super.componentWillUnmount()}itemAccordion(e,t){let{value:n}=this.state,{schema:r}=this.props,i={type:`panel`,items:r.items.reduce((e,t)=>(t.attr&&(e[t.attr]=t),e),{}),style:{marginLeft:`-8px`,marginTop:`10px`,marginBottom:`10px`}};return _.createElement(yk,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(e,r)=>{if(typeof e==`string`&&e){let i=JSON.parse(JSON.stringify(n));i[t][e]=r,this.setState({value:i},()=>this.onChangeWrapper(i))}},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);let r=this.state.activeIndex-1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);let r=this.state.activeIndex+1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}renderItem(){let{schema:e}=this.props,{value:t}=this.state;return t?_.createElement(ln,null,e.label||!e.noDelete?_.createElement(Ce,{variant:`dense`},e.label?_.createElement(be,{variant:`h6`,id:`tableTitle`,component:`div`},this.getText(e.label)):null,e.noDelete?null:_.createElement(_.Fragment,null,_.createElement(Ln,{title:K.t(`jc_Export configuration section`)},_.createElement(ur,{size:`small`,color:`primary`,onClick:this.onExport},_.createElement(lt,null))),_.createElement(Ln,{title:K.t(`jc_Import and replace configuration section`)},_.createElement(ur,{size:`small`,color:`primary`,onClick:()=>this.onImport(!0)},_.createElement(ue,null))),_.createElement(Ln,{title:K.t(`jc_Import and add configuration section`)},_.createElement(ur,{size:`small`,color:`primary`,onClick:()=>this.onImport(!1)},_.createElement(k,null))),_.createElement(ur,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(Re,null)))):null,t.map((n,r)=>_.createElement(Pe,{key:`${n}_${r}`,expanded:this.state.activeIndex===r,onChange:(e,t)=>this.setState({activeIndex:t?r:-1})},_.createElement(Zn,{expandIcon:_.createElement(ot,null),sx:$t.getStyle(this.props.oContext.theme,As.fullWidth,As.accordionSummary)},_.createElement(ht,{sx:{display:`flex`,alignItems:`center`,gap:1,width:`100%`}},e.titleAttr&&_.createElement(be,{style:As.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(r)&&_.createElement(N,{sx:{fontSize:20,color:`error.main`}}))),_.createElement(zn,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[r],r),_.createElement(Ce,{sx:As.toolbar},r?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(r)},_.createElement($n,null))):_.createElement(`div`,{style:As.buttonEmpty}),r<t.length-1?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(r)},_.createElement(An,null))):_.createElement(`div`,{style:As.buttonEmpty}),e.noDelete?null:_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(r)},_.createElement(we,null))),e.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(r)},_.createElement(he,null))):null)))),!e.noDelete&&t.length>0?_.createElement(Ce,{variant:`dense`,sx:As.rootTool},_.createElement(ur,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(Re,null))):null,e.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}};g();var Ms={root:{width:`100%`},notAlive:{color:`#a30000`}},Ns=class extends X{constructor(...e){super(...e),q(this,`aliveId`,null),q(this,`checkTimeout`,null),q(this,`onAliveChanged`,(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})})}async componentDidMount(){await super.componentDidMount();let e=await this.getInstance();this.aliveId=`${e}.alive`;let t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val),instance:e},async()=>{this.aliveId&&await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith(`system.adapter.`)&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){var e;if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;let t=(e=this.state.instance)==null?void 0:e.replace(/^system\.adapter\./,``);return _.createElement(`div`,{style:{...Ms.root,...this.state.alive?void 0:Ms.notAlive}},this.state.alive?this.props.schema.textAlive===void 0?K.t(`jc_Instance %s is alive`,t):this.props.schema.textAlive?K.t(this.props.schema.textAlive,t):``:this.props.schema.textNotAlive===void 0?K.t(`jc_Instance %s is not alive`,t):this.props.schema.textNotAlive?K.t(this.props.schema.textNotAlive,t):``)}};g();var Ps=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)));if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)n.value!==X.DIFFERENT_VALUE&&(e[n.value]=this.getText(n.label));this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)?(t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n,r=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE?([...this.state.value].filter(e=>!r.find(t=>typeof t==`object`?t.value===e:t===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>typeof e==`object`?e.value==this.state.value:e==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),_.createElement(A,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:r,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||this.getText(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},getOptionLabel:e=>typeof e==`object`?this.getText((e==null?void 0:e.label)??``):``,renderInput:n=>_.createElement(ft,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}};g();var Fs=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async askInstance(){let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof e==`string`&&(n=JSON.parse(e))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});let r=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(r!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${r}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,r));return}}this.props.oContext.socket.sendTo(r,this.props.schema.command||`send`,n).then(n=>{n&&Array.isArray(n)&&n.forEach(e=>t.push(typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(e=>{console.error(`Error in autocompleteSendTo:`,e),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n,r=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_LABEL?([...this.state.value].filter(e=>!r.find(t=>t.value===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>e.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),r.length?_.createElement(A,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:r,disabled:t,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||String(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},getOptionLabel:e=>this.getText(typeof e==`object`?(e==null?void 0:e.label)??``:e),onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},renderInput:n=>_.createElement(ft,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{input:{...n.slotProps.input,endAdornment:_.createElement(_.Fragment,null,this.state.loading?_.createElement(sr,{position:`end`},_.createElement(wn,{size:20})):null,t?null:n.slotProps.input.endAdornment)}}})}):_.createElement(ft,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?_.createElement(sr,{position:`end`},_.createElement(wn,{size:20})):null}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Is={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,marginLeft:4,minWidth:48}},Ls=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,showDialog:!1})}renderItem(e,t){let{schema:n,attr:r}=this.props,{value:i,showDialog:a}=this.state;return _.createElement(Mn,{style:Is.fullWidth,variant:`standard`},n.label?_.createElement(Ze,{shrink:!0},this.getText(n.label)):null,_.createElement(`div`,{style:Is.flex},_.createElement(ft,{variant:`standard`,fullWidth:!0,value:i??``,error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(r,t))}}),_.createElement(Ge,{color:`grey`,disabled:t,style:Is.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showDialog:!0})},`...`)),a?_.createElement(Rn,{title:K.t(`jc_Define schedule`),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:K.t(`jc_Cancel`),ok:K.t(`jc_Ok`),theme:this.props.oContext.theme,onOk:e=>this.setState({showDialog:!1,value:e},()=>this.onChange(r,e))}):null)}};g();var Rs=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=(await this.props.oContext.socket.getCertificates()).filter(e=>{let t=this.props.attr.toLowerCase();return t.includes(e.type)||e.type===`public`&&t.includes(`cert`)||e.type===`private`&&(t.includes(`priv`)||t.includes(`key`))?!0:!!(e.type===`chained`&&(t.includes(`chain`)||t.includes(`ca`)))}).map(e=>({label:e.name,value:e.name}));t.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Mn,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),onChange:e=>this.setState({value:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var zs={fullWidth:{width:`100%`},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}},Bs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.props.oContext.socket.getCertificates(),n=[],r=[],i=[],a,o=await this.getCachedObject(`system.certificates`);a=o!=null&&(e=o.native)!=null&&e.collections?Object.keys(o.native.collections):null,t.forEach(e=>{e.type===`public`?n.push({label:e.name,value:e.name}):e.type===`private`?r.push({label:e.name,value:e.name}):e.type===`chained`?i.push({label:e.name,value:e.name}):(n.push({label:e.name,value:e.name}),r.push({label:e.name,value:e.name}),i.push({label:e.name,value:e.name}))}),n.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),r.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),i.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:i,certsPrivateOptions:r,collectionsOptions:a})}renderItem(e,t){var n,r,i,a,o,s,c;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;let l=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString(),u=X.getValue(this.props.data,this.props.schema.certPublicName||`certPublic`),d=X.getValue(this.props.data,this.props.schema.certPrivateName||`certPrivate`),f=X.getValue(this.props.data,this.props.schema.certChainedName||`certChained`),p=(n=this.state.certsPublicOptions)==null?void 0:n.find(e=>e.value===u),m=(r=this.state.certsPrivateOptions)==null?void 0:r.find(e=>e.value===d),h=(i=this.state.certsChainOptions)==null?void 0:i.find(e=>e.value===f);return _.createElement(`div`,{style:zs.fullWidth},this.state.collectionsOptions?_.createElement(Mn,{style:zs.leWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},`Let's encrypt`),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:l,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(Ie,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},K.t(`jc_Do not use let's encrypt`)),_.createElement(Ie,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},K.t(`jc_Use all available let's encrypt certificates`)),(a=this.state.collectionsOptions)==null?void 0:a.map(e=>_.createElement(Ie,{key:e,value:e},e)))):null,this.state.collectionsOptions?_.createElement(`br`,null):null,this.state.collectionsOptions&&l!==`false`?_.createElement(`div`,null,K.t(`jc_Fallback custom certificates`)):null,_.createElement(Mn,{style:zs.certWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Public certificate`)),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:u||``,renderValue:()=>this.getText(p==null?void 0:p.label,!0),onChange:e=>this.onChange(this.props.schema.certPublicName||`certPublic`,e.target.value)},(o=this.state.certsPublicOptions)==null?void 0:o.map((e,t)=>_.createElement(Ie,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Mn,{style:zs.certWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Private certificate`)),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:d||``,renderValue:()=>this.getText(m==null?void 0:m.label,!0),onChange:e=>this.onChange(this.props.schema.certPrivateName||`certPrivate`,e.target.value)},(s=this.state.certsPrivateOptions)==null?void 0:s.map((e,t)=>_.createElement(Ie,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Mn,{style:zs.certWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Chained certificate`)),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:f||``,renderValue:()=>this.getText(h==null?void 0:h.label,!0),onChange:e=>this.onChange(this.props.schema.certChainedName||`certChained`,e.target.value)},(c=this.state.certsChainOptions)==null?void 0:c.map((e,t)=>_.createElement(Ie,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))))}};g();var Vs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t,n=await this.getCachedObject(`system.certificates`);t=n!=null&&(e=n.native)!=null&&e.collections?Object.keys(n.native.collections):[],this.setState({collectionsOptions:t})}renderItem(e,t){var n;if(!this.state.collectionsOptions)return null;let r=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString();return _.createElement(Mn,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:r,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(Ie,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},K.t(`jc_Do not use let's encrypt`)),_.createElement(Ie,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},K.t(`jc_Use all available let's encrypt certificates`)),(n=this.state.collectionsOptions)==null?void 0:n.map(e=>_.createElement(Ie,{key:e,value:e},e))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Hs=class extends X{async componentDidMount(){await super.componentDidMount();let e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{let t=await this.props.oContext.socket.sendTo(e,`checkDocker`,null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||``,errorDocker:t?t.daemonRunning?``:K.t(`jc_Docker is not installed or not running`):K.t(`jc_No response from admin`)})})}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr);return this.state.requesting?_.createElement(wn,null):this.state.errorDocker&&!n?_.createElement(en,{style:{color:`orange`}},K.t(`jc_Docker is not available`),`:\xA0`,K.t(`jc_${this.state.errorDocker}`).replace(/^jc_/,``)):_.createElement(Mn,{style:{width:`100%`},variant:`standard`},_.createElement(bn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(Ht,{checked:!!n,onChange:e=>{this.props.attr&&this.onChange(this.props.attr,e.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:_.createElement(en,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Us=`system.credentials.`,Ws=1,Gs=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],Ks={email:`E-mail`,cloud:`Cloud`,ai:`AI`,aws:`AWS`,azure:`Azure`,custom:`Custom`},qs={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]},Js={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function Ys(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${window.btoa(n)}`}var Xs={anthropic:Ys(Js.anthropic,`#d97757`),chatgpt:Ys(Js.chatgpt,`#74aa9c`),gemini:Ys(Js.gemini,`#8e75b2`),email:Ys(Js.email,`#2196f3`),login:Ys(Js.login,`#9e9e9e`),key:Ys(Js.key,`#ffc107`),aws:Ys(Js.aws,`#ff9900`),azure:Ys(Js.azure,`#0089d6`)},Zs={anthropic:{label:`Anthropic`,icon:Xs.anthropic,form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:Xs.chatgpt,form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:Xs.gemini,form:`key`,type:`ai`,name:`gemini`},aws:{label:`AWS`,icon:Xs.aws,form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:Xs.azure,form:`azure`,type:`azure`,name:`azure`},email:{label:`E-mail`,icon:Xs.email,form:`login`,type:`email`},login:{label:`Login & password`,icon:Xs.login,form:`login`,type:null},key:{label:`Key`,icon:Xs.key,form:`key`,type:null}};function Qs(e,t,n){return _.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},e!=null&&e.icon?_.createElement(Pt,{src:e.icon,style:{width:20,height:20}}):n?_.createElement(`span`,{style:{width:20,height:20,flexShrink:0}}):null,t)}var $s=class e extends X{async componentDidMount(){if(await super.componentDidMount(),!this.props.attr)throw Error(`Missing attribute attribute`);let e=X.getValue(this.props.data,this.props.attr),t=await this.readCredentials();this.setState({value:e,selectOptions:t})}async readCredentials(){let t=[];try{let n=await this.props.oContext.socket.getObjectViewSystem(`config`,Us,`${Us}香`);t=Object.values(n).filter(e=>{var t;return!!e&&(!this.props.schema.credentialType||((t=e.native)==null?void 0:t.type)===this.props.schema.credentialType)}).map(t=>{var n;return{label:e.getCredentialName(t),value:t._id,icon:typeof((n=t.common)==null?void 0:n.icon)==`string`?t.common.icon:void 0}}).sort((e,t)=>e.label.localeCompare(t.label))}catch(e){console.error(`Cannot read credentials: ${e}`)}return t.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),t}static getCredentialName(e){var t;let n=(t=e.common)==null?void 0:t.name,r;return r=n&&typeof n==`object`?n[K.getLanguage()]||n.en||Object.values(n)[0]||``:n||``,r||e._id.substring(19)}templateKeys(){let e=this.props.schema.credentialType;return Object.keys(Zs).filter(t=>{let n=Zs[t];return!e||n.type===e||n.type===null})}selectTemplate(e){let t=Zs[e];this.setState({addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``})}openAddDialog(){let e=this.templateKeys()[0],t=Zs[e];this.setState({addOpen:!0,addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``,addSaving:!1})}async createCredential(){let e=Zs[this.state.addTemplate||``],t=(this.state.addName||``).trim().replace($t.FORBIDDEN_CHARS,`_`);if(!t){this.setState({addError:K.t(`jc_A unique name is required`)});return}let n=`${Us}${t}`;if((this.state.selectOptions||[]).find(e=>e.value===n)){this.setState({addError:K.t(`jc_A credential with this name already exists`)});return}let r=(e==null?void 0:e.form)||`login`,i=qs[r],a=this.state.addFields||{};if(i.some(e=>e.required&&!(a[e.name]||``).trim())){this.setState({addError:K.t(`jc_Please fill in all required fields`)});return}let o=(e==null?void 0:e.type)||this.props.schema.credentialType||this.state.addType||`custom`;this.setState({addSaving:!0,addError:``});try{let s=this.props.oContext.socket,c={type:o,form:r,version:Ws,encryptedFields:i.filter(e=>e.encrypted).map(e=>e.name)};for(let e of i){let t=a[e.name]||``;c[e.name]=e.encrypted&&t?await s.encrypt(t):t}let l={_id:n,type:`config`,common:{name:t,...e!=null&&e.icon?{icon:e.icon}:{}},native:c,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}};await s.setObject(n,l);let u=this.state.selectOptions||[],d=u.find(e=>e.value===X.NONE_VALUE),f=u.filter(e=>e.value!==X.NONE_VALUE);f.push({label:t,value:n,icon:e==null?void 0:e.icon}),f.sort((e,t)=>e.label.localeCompare(t.label));let p=d?[d,...f]:f;this.setState({addOpen:!1,addSaving:!1,selectOptions:p,value:n},()=>this.onChange(this.props.attr,n))}catch(e){this.setState({addSaving:!1,addError:K.t(`jc_Cannot create credential: %s`,e.toString())})}}renderAddDialog(){if(!this.state.addOpen)return null;let e=Zs[this.state.addTemplate||``],t=qs[(e==null?void 0:e.form)||`login`],n=`${Us}${(this.state.addName||``).trim().replace($t.FORBIDDEN_CHARS,`_`)}`,r=!this.props.schema.credentialType&&(e==null?void 0:e.type)===null;return _.createElement(Dt,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1})},_.createElement(gn,null,K.t(`jc_Add credential`)),_.createElement(Un,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8}},_.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Template`)),_.createElement(Be,{variant:`standard`,value:this.state.addTemplate||``,onChange:e=>this.selectTemplate(e.target.value)},this.templateKeys().map(e=>_.createElement(Ie,{key:e,value:e},_.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},_.createElement(`img`,{src:Zs[e].icon,width:20,height:20,alt:``}),K.t(Zs[e].label)))))),r?_.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Credential type`)),_.createElement(Be,{variant:`standard`,value:this.state.addType||`custom`,onChange:e=>this.setState({addType:e.target.value})},Gs.map(e=>_.createElement(Ie,{key:e,value:e},K.t(Ks[e]))))):null,_.createElement(ft,{variant:`standard`,fullWidth:!0,label:K.t(`jc_Name`),value:this.state.addName||``,error:!!this.state.addError,helperText:this.state.addName?n:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value,addError:``})}),t.map(e=>{var t;let n=((t=this.state.addFields)==null?void 0:t[e.name])||``;if(e.type===`select`){let t=e.options?[...e.options]:[];return n&&!t.find(e=>e.value===n)&&t.unshift({value:n}),_.createElement(ft,{key:e.name,select:!0,variant:`standard`,fullWidth:!0,required:e.required,label:K.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})},t.map(e=>_.createElement(Ie,{key:e.value,value:e.value},e.label||e.value)))}return _.createElement(ft,{key:e.name,variant:`standard`,fullWidth:!0,type:e.type===`password`?`password`:`text`,required:e.required,label:K.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:e.type===`password`?`new-password`:`off`}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})})}),this.state.addError?_.createElement(er,{severity:`error`},this.state.addError):null),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,color:`primary`,disabled:!!this.state.addSaving||!(this.state.addName||``).trim(),startIcon:_.createElement(Oe,null),onClick:()=>this.createCredential()},K.t(`jc_Create`)),_.createElement(Ge,{variant:`contained`,color:`grey`,disabled:!!this.state.addSaving,startIcon:_.createElement(je,null),onClick:()=>this.setState({addOpen:!1})},K.t(`jc_Cancel`))))}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value),a=this.state.value&&this.state.value!==X.NONE_VALUE&&!i?this.state.value:null,o=this.state.selectOptions.some(e=>!!e.icon),s=!this.props.schema.disableCreation;return _.createElement(`div`,{style:{display:`flex`,alignItems:`flex-end`,gap:4,width:`100%`}},_.createElement(Mn,{style:{flex:1,minWidth:0},variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e||!!a,displayEmpty:!0,disabled:!!t,value:this.state.value||X.NONE_VALUE,renderValue:()=>a||Qs(i,this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),o),onChange:e=>this.setState({value:e.target.value===X.NONE_VALUE?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},Qs(e,this.getText(e.label,this.props.schema.noTranslation!==!1),o)))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),s?_.createElement(ur,{size:`small`,disabled:!!t,title:K.t(`jc_Add credential`),onClick:()=>this.openAddDialog()},_.createElement(Re,null)):null,this.renderAddDialog())}};g();var ec={fullWidth:{width:`100%`},icon:{width:24,height:24,marginRight:4},licLabel:{fontWeight:`bold`,minWidth:100,marginRight:10,textTransform:`capitalize`,display:`inline-block`},licValue:{fontWeight:`normal`},errorTitle:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`}),okTitle:e=>({color:e.palette.mode===`dark`?`#6fd56f`:`#007c00`}),errorText:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`,mb:`30px`})},tc=class e extends X{async componentDidMount(){await super.componentDidMount(),this.setState({_error:``,running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[_.createElement(`div`,{key:`error`},e)],e.push(_.createElement(Ge,{key:`button`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`iobroker.net`)),this.state.allLicenses.length?e.push(_.createElement(mr,{key:`table`},_.createElement(_e,{size:`small`},_.createElement(F,null,_.createElement(ct,null,_.createElement(Ye,null,K.t(`jc_Product`)),_.createElement(Ye,null,K.t(`jc_Version`)),_.createElement(Ye,null,`UUID`),_.createElement(Ye,null,K.t(`jc_ValidTill`)),_.createElement(Ye,null,K.t(`jc_Commercial`)),_.createElement(Ye,null,`ID`))),_.createElement(De,null,this.state.allLicenses.map(e=>_.createElement(ct,{key:e.id},_.createElement(Ye,{sx:e.validName?null:ec.errorText},e.license.product),_.createElement(Ye,{sx:e.validVersion?null:ec.errorText},e.license.version),_.createElement(Ye,{sx:e.validUuid?null:ec.errorText},e.license.uuid||`--`),_.createElement(Ye,{sx:e.validTill?null:ec.errorText},e.license.validTill&&e.license.validTill!==`0000-00-00 00:00:00`?new Date(e.license.validTill).toLocaleDateString():`--`),_.createElement(Ye,null,e.license.invoice===`free`?`-`:e.license.invoice===`MANUALLY_CREATED`?`✓`:e.license.invoice),_.createElement(Ye,null,e.id))))))):(e.push(_.createElement(`div`,{key:`text1`},K.t(`jc_No one license found in license manager`))),e.push(_.createElement(`div`,{key:`text2`},K.t(`jc_Please create license`))))),_.createElement(Dt,{open:!0,maxWidth:`xl`,fullWidth:this.props.fullWidth===void 0||this.props.fullWidth,onClick:()=>this.setState({_error:``,allLicenses:null})},_.createElement(gn,null,K.t(`jc_Error`)),_.createElement(Un,null,_.createElement(Ft,null,e)),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,onClick:()=>this.setState({_error:``,allLicenses:null}),color:`primary`,autoFocus:!0,startIcon:_.createElement(Oe,null)},K.t(`jc_Ok`))))}return null}renderMessageDialog(){if(this.state.showLicenseData){let e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(t[n]!==null&&t[n]!==void 0)if(typeof t[n]==`object`){let r=t[n];Object.keys(r).forEach(t=>{r[t]!==null&&r[t]!==void 0&&(typeof r[t]==`object`?e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},t,`:`),JSON.stringify(r[t],null,2))):e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},n,` -`,t,`:`),r[t].toString())))})}else e.push(_.createElement(`div`,{key:n},_.createElement(`div`,{style:ec.licLabel},n.replace(/_/g,` `),`:`),t[n].toString()))}),e.push(_.createElement(`div`,{key:`checked`},_.createElement(`div`,{style:ec.licLabel},K.t(`jc_Checked`),`:`),this.state.licenseOfflineCheck?K.t(`jc_locally`):K.t(`jc_via internet`))),_.createElement(Dt,{open:!0,onClose:()=>this.setState({showLicenseData:null})},_.createElement(gn,null,_.createElement(ht,{component:`span`,sx:this.state.result?ec.okTitle:ec.errorTitle},K.t(`jc_License %s`,this.state.result?`OK`:`INVALID`))),_.createElement(Un,null,this.state.showLinkToProfile?_.createElement(Ge,{variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`https://iobroker.net`):null,this.state._error?_.createElement(ht,{component:`div`,sx:ec.errorText},this.state._error):null,e),_.createElement(On,null,_.createElement(Ge,{onClick:()=>this.setState({showLicenseData:null,_error:``}),color:`primary`,variant:`contained`},K.t(`jc_Close`))))}return null}static parseJwt(e){let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``));try{return JSON.parse(n)}catch{return null}}static isVersionValid(e,t,n,r){if(!t||!e)return!0;let[i]=e.split(`.`);return t.startsWith(`>=`)||t.startsWith(`<=`)?parseInt(t.substring(2,10)):t.startsWith(`>`)||t.startsWith(`<`)||t.startsWith(`=`)?parseInt(t.substring(1,10)):t.startsWith(`==`)?parseInt(t.substring(2,10)):t.startsWith(`===`)&&parseInt(t.substring(3,10)),!0}async findInLicenseManager(t){var n;let r=await this.getCachedObject(`system.licenses`),i=[];if(r!=null&&(n=r.native)!=null&&(n=n.licenses)!=null&&n.length){let n=null,s=Date.now(),c;if(this.props.schema.uuid){var a;let e=await this.getCachedObject(`system.meta.uuid`);c=e==null||(a=e.native)==null?void 0:a.uuid}let l;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${t}`);l=e==null||(o=e.common)==null?void 0:o.version}if(r.native.licenses.forEach(r=>{let a=!r.validTill||r.validTill===`0000-00-00 00:00:00`||new Date(r.validTill).getTime()>s,o=(r.product||``).split(`.`),u=o[1]===t||t===`vis-2`&&o[1]===`vis`,d=!c||!r.uuid||r.uuid===c,f=e.isVersionValid(l,r.version,r.invoice,t);(!n||r.invoice!==`free`)&&a&&u&&d&&f&&(n=r),i.push({id:r.id,validName:u,validUuid:d,validVersion:f,validTill:a,license:r})}),n){let e=i.find(e=>e.id===(n==null?void 0:n.id));e&&(e.used=!0)}}return i}async checkLicense(t,n){let r;if(this.props.schema.uuid){var i;let e=await this.getCachedObject(`system.meta.uuid`);r=e==null||(i=e.native)==null?void 0:i.uuid}let a;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${n}`);a=e==null||(o=e.common)==null?void 0:o.version}let s=new AbortController,c=setTimeout(()=>{c=null,s.abort()},5e3);try{let i=await window.fetch(`https://iobroker.net/api/v1/public/cert/`,{method:`POST`,body:JSON.stringify({json:t,uuid:r}),headers:{"Content-Type":`text/plain`},signal:s.signal});c&&clearTimeout(c);let o=await i.text(),l;try{l=JSON.parse(o)}catch{}if(l!=null&&l.error)try{let n=e.parseJwt(t),r=K.t(`jc_${(n==null?void 0:n.error)||l.error||`Unknown error`}`).replace(/^jc_/,``);return this.setState({_error:r,licenseOfflineCheck:!1,showLicenseData:n,result:!1,running:!1})}catch{return console.log(`Cannot parse license`),this.setState({_error:l.error,result:!1,running:!1})}{let i=null;try{i=e.parseJwt(t)}catch{}if(l){let t=l.validTill||l.valid_till;if(t&&t!==`0000-00-00 00:00:00`&&new Date(t).getTime()<Date.now())return this.setState({_error:K.t(`jc_License expired on %s`,new Date(t).toLocaleString()),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1});let o=(l.name||``).split(`.`);return o[1]===n||o[1]===`vis`&&n===`vis-2`?r&&!l.uuid&&n===`vis-2`?this.setState({_error:K.t(`jc_License must be converted`,l.uuid),showLinkToProfile:!0,licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):r&&l.uuid&&l.uuid!==r?this.setState({_error:K.t(`jc_Serial number (UUID) "%s" in license is for other device.`,l.uuid),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):e.isVersionValid(a,l.version,l.invoice,n)?this.setState({licenseOfflineCheck:!1,showLicenseData:i,result:!0,running:!1}):this.setState({_error:K.t(`jc_License is for version %s, but required version is %s`,l.version,this.props.schema.version),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):this.setState({_error:K.t(`jc_License for other product "%s"`,l.name),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1})}throw Error(`jc_Invalid answer from server`)}}catch(i){var l;if((i==null||(l=i.response)==null?void 0:l.status)===404)return this.setState({_error:K.t(`jc_License does not exist`),result:!1,running:!1});try{let i=e.parseJwt(t),o=((i==null?void 0:i.name)||``).split(`.`);return i!=null&&i.valid_till&&i.valid_till!==`0000-00-00 00:00:00`&&new Date(i.valid_till).getTime()<Date.now()?this.setState({_error:K.t(`jc_License expired on %s`,new Date(i.valid_till).toLocaleString()),showLicenseData:i,licenseOfflineCheck:!0,running:!1,result:!1}):o[1]===n?r&&i!=null&&i.uuid&&i.uuid!==r?this.setState({_error:K.t(`jc_Serial number (UUID) "%s" in license is for other device.`,i==null?void 0:i.uuid),showLicenseData:i,licenseOfflineCheck:!0,result:!1,running:!1}):e.isVersionValid(a,i==null?void 0:i.version,i==null?void 0:i.invoice,n)?this.setState({running:!1,result:!0,licenseOfflineCheck:!0,showLicenseData:i}):this.setState({_error:K.t(`jc_License is for version %s, but required version is %s`,i==null?void 0:i.version,this.props.schema.version),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1}):this.setState({_error:K.t(`jc_License for other product "%s"`,i==null?void 0:i.name),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1})}catch{return this.setState({_error:K.t(`jc_Cannot decode license`),result:!1,licenseOfflineCheck:!0,running:!1})}}}renderAskForUpdate(){return this.state.askForUpdate?_.createElement(Cn,{text:K.t(`jc_License not found in license manager. Do you want to read licenses from iobroker.net?`),ok:K.t(`jc_Yes`),onClose:async e=>{if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(``,``)}catch(e){window.alert(K.t(`jc_Cannot read licenses: %s`,e));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){let t=this.props.oContext.adapterName===`vis-2`?`vis`:this.props.oContext.adapterName;this.setState({running:!0});let n,r;if(this.props.data.useLicenseManager){if(r=await this.findInLicenseManager(t),n=r.find(e=>e.used),n&&=n.license.json,!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:K.t(`jc_Suitable license not found in license manager`),result:!1,running:!1,allLicenses:r||null}):this.setState({_error:K.t(`jc_Please enter the license`),result:!1,running:!1})}renderItem(){return _.createElement(`div`,{style:ec.fullWidth},_.createElement(Ge,{variant:this.props.schema.variant||`outlined`,color:this.props.schema.color||`primary`,style:ec.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:_.createElement(se,null),onClick:()=>this._onClick()},this.state.running?_.createElement(wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||`jc_Check license`,this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}};g();var nc=class extends X{renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Array.isArray(n);return _.createElement(Mn,{style:{width:`100%`},variant:`standard`},_.createElement(bn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(Ht,{indeterminate:r,checked:!!n,onChange:e=>{if(this.props.attr){let t;t=r?this.onChange(this.props.attr,!0):this.onChange(this.props.attr,e.target.checked),t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),_.createElement(en,{style:{color:`red`}},e?this.props.schema.validatorErrorText?K.t(this.props.schema.validatorErrorText):K.t(`jc_Error`):null),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var rc={standard:jt,filled:Kt,outlined:pn},ic=e=>{let t=e.palette.mode===`light`,n=t?`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 ${e.palette.primary[t?`dark`:`light`]}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},"&$focused:after":{transform:`scaleX(1)`},"&$error:after":{borderBottomColor:e.palette.error.main,transform:`scaleX(1)`},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${e.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:`dotted`}},error:{"&:after":{backgroundColor:e.palette.error.main,transform:`scaleX(1)`}},chip:{margin:`0 8px 8px 0`,float:`left`},marginDense:{}}},ac={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},oc=({value:e,isFocused:t,isDisabled:n,isReadOnly:r,handleClick:i,handleDelete:a,style:o},s)=>_.createElement(qn,{key:s,style:{...o,pointerEvents:n||r?`none`:void 0,backgroundColor:t?re[300]:void 0},onClick:i,onDelete:a,label:e}),sc=class extends _.Component{constructor(e){super(e),q(this,`labelRef`,void 0),q(this,`labelNode`,null),q(this,`input`,void 0),q(this,`newChipKeyCodes`,void 0),q(this,`newChipKeys`,void 0),q(this,`actualInput`,null),q(this,`inputBlurTimeout`,null),q(this,`_keyPressed`,!1),q(this,`_preventChipCreation`,!1),q(this,`styles`,{}),q(this,`styleTheme`,null),q(this,`focus`,()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})}),q(this,`handleInputBlur`,e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});let t=e.target.value,n;switch(this.props.blurBehavior||`clear`){case`add-or-clear`:n={clearInputOnFail:!0};case`add`:if(this.props.delayBeforeAdd){let e=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{let r=(this.props.value||this.state.chips).length;e===r?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case`clear`:this.clearInput()}}),q(this,`handleInputFocus`,e=>{var t,n;this.setState({isFocused:!0}),(t=(n=this.props).onFocus)==null||t.call(n,e)}),q(this,`handleKeyDown`,e=>{let{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;let n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case ac.BACKSPACE:e.target.value===``&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case ac.DELETE:e.target.value===``&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case ac.LEFT_ARROW:t===null&&e.target.value===``&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case ac.RIGHT_ARROW:t!==null&&t<n.length-1?this.setState({focusedChip:t+1}):this.setState({focusedChip:null});break;default:this.setState({focusedChip:null})}}),q(this,`handleKeyUp`,e=>{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)}),q(this,`handleUpdateInput`,e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)}),q(this,`setActualInputRef`,e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)}),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:``,isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||`standard`},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||[`Enter`],this.labelRef=_.createRef(),this.input=_.createRef()}componentDidMount(){this.state.variant===`outlined`&&(this.labelNode=this.labelRef.current,this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue=``)),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:``}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();let n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{let e=this.state.chips.slice();if(e.splice(t,1)){let n=this.state.focusedChip;this.state.focusedChip===t?n=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(n=this.state.focusedChip-1),this.updateChips(e,{focusedChip:n})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput(``)}updateInput(e){this.setState({inputValue:e})}render(){let{alwaysShowPlaceholder:e,chipRenderer:t=oc,className:n,disabled:r,disableUnderline:i,error:a,FormHelperTextProps:o,fullWidth:s,fullWidthInput:c,helperText:l,id:u,InputProps:d={},InputLabelProps:f={},inputValue:p,label:m,placeholder:h,readOnly:g,required:v,rootRef:y,value:b,margin:x}=this.props,S=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=$t.getStyle(this.props.theme,ic));let C=b||this.state.chips||[];Array.isArray(C)||(C=(C||``).toString().split(/[,\s]+/).map(e=>e.trim()));let w=p??this.state.inputValue,T=(this.props.value||w).length||w.length,E=typeof f.shrink==`boolean`?f.shrink:m!==null&&(T||this.state.isFocused||C.length),D=C.map((e,n)=>t({value:e,isDisabled:!!r,isReadOnly:!!g,isFocused:this.state.focusedChip===n,handleClick:()=>this.setState({focusedChip:n}),handleDelete:()=>this.handleDeleteChip(e,n),style:this.styles.chip},n.toString())),O={};S===`outlined`&&(O.notched=!!E,O.labelWidth=E&&this.labelNode&&this.labelNode.offsetWidth||0),S===`standard`?d.disableUnderline=!0:O.startAdornment=D;let k=rc[S];return _.createElement(Mn,{ref:y,fullWidth:s,className:n,sx:{...this.styles.root,...x===`dense`?this.styles.marginDense:{}},error:a,required:C.length>0?void 0:v,onClick:this.focus,disabled:r,variant:S,component:`div`,margin:x},m&&_.createElement(Ze,{htmlFor:u,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!E,focused:this.state.isFocused,variant:S,ref:this.labelRef,required:v,component:`label`,...f},m),_.createElement(ht,{component:`div`,id:`input-chip-container`,sx:{...this.styles[S],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&S===`standard`?this.styles.underline:void 0,...r?this.styles.disabled:void 0,...m?this.styles.labeled:void 0,...a?this.styles.error:void 0}},S===`standard`&&D,_.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[S]} ${m?`mui-chip-with-label`:`mui-chip-no-label`}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[S]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:u,value:w,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:r,fullWidth:c,placeholder:!T&&(E||m==null)||e?h:void 0,readOnly:g,...d,...O})),l&&_.createElement(en,{...o,className:o==null?void 0:o.className,style:this.styles.helperText},l))}};g();var cc=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t);if(this.props.schema.delimiter&&typeof n==`string`){let e=n.split(this.props.schema.delimiter).map(e=>e.trim()).filter(e=>e);this.setState({value:e})}else this.setState({value:n||[]})}renderItem(e,t){let{attr:n,schema:r}=this.props,{value:i}=this.state;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(sc,{value:i,disabled:!!t,label:this.getText(r.label),error:!!e,onAdd:e=>{let t=JSON.parse(JSON.stringify(i));t.push(e),this.setState({value:t},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,t.join(`${this.props.schema.delimiter} `)):this.onChange(n,t),e instanceof Promise&&e.catch(e=>console.error(e))}})},theme:this.props.oContext.theme,onDelete:(e,t)=>{let r=JSON.parse(JSON.stringify(i));r.splice(t,1),this.setState({value:r},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,r.join(`${this.props.schema.delimiter} `)):this.onChange(n,r),e instanceof Promise&&e.catch(e=>console.error(e))}})}}),_.createElement(en,null,K.t(`jc_Press ENTER Key to add new item`)),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var lc=class extends X{renderColorDialog(){return this.state.showColorDialog?_.createElement(Dt,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},_.createElement(or,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.props.attr&&this.onChange(this.props.attr,this.state.colorDialogValue))})):null}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=$t.isUseBright(n);return _.createElement(_.Fragment,null,this.renderColorDialog(),_.createElement(ft,{variant:`standard`,disabled:!!t,style:{minWidth:100,width:`calc(100% - 8px)`},label:this.getText(this.props.schema.label),value:n||``,onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||``}),onChange:e=>{let t=e.target.value,n=this.props.attr&&this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(e=>console.error(`Cannot set value: ${e}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:r?`#FFF`:`#000`},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?_.createElement(ur,{tabIndex:-1,size:`small`,onClick:e=>{e.stopPropagation();let t=this.props.attr&&this.onChange(this.props.attr,``);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},_.createElement(je,null)):void 0},inputLabel:{shrink:!0}}}))}};g();var uc={width:{width:`calc(100% - 85px)`},width50:{width:120,marginRight:5}},dc=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e});let t={};this.props.schema.useSystemName&&(t.useSystem=!!X.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=X.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=X.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!X.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{e=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude))if(window.alert(K.t(`jc_Used system settings`)),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{let t=e.common.latitude+(this.props.schema.divider||`,`)+e.common.longitude;this.setState({value:t},()=>{let e=this.props.attr&&this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}else window.alert(K.t(`jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser`))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||``),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||``)});else{let t=e.coords.latitude+(this.props.schema.divider||`,`)+e.coords.longitude;this.setState({value:t},()=>{let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return _.createElement(_.Fragment,null,this.props.schema.useSystemName?_.createElement(bn,{control:_.createElement(Ht,{checked:!!this.state.useSystem,onChange:e=>{let t=e.target.checked;t&&this.getSystemCoordinates().catch(e=>console.error(`Cannot determine coordinates: ${e}`)),this.setState({useSystem:t},()=>this.onChange(this.props.schema.useSystemName,t))}}),label:K.t(`jc_Use system settings for position`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ft,{variant:`standard`,style:uc.width50,value:this.state.longitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({longitude:t},()=>{let e=this.onChange(this.props.schema.longitudeName,(t||``).trim());e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})},label:K.t(`jc_Longitude`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ft,{variant:`standard`,style:uc.width50,value:this.state.latitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({latitude:t},()=>this.onChange(this.props.schema.latitudeName,(t||``).trim()))},label:K.t(`jc_Latitude`)}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?_.createElement(ft,{variant:`standard`,style:uc.width,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:_.createElement(zt,{size:`small`,onClick:()=>this.getCoordinates(),title:K.t(`jc_Take browser position`),style:{marginRight:4}},_.createElement(Gn,null)),this.state.useSystem?null:_.createElement(zt,{size:`small`,onClick:()=>this.getSystemCoordinates(),title:K.t(`jc_Take position from system settings`)},_.createElement(pt,null)))}};g();var fc=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Custom component "${this.props.name}" from "${this.props.url||`unknown URL`}" crashed while rendering. It was probably built for an older admin version.`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&(e.name!==this.props.name||e.url!==this.props.url)&&this.setState({error:null})}render(){return this.state.error?_.createElement(Xn,{type:`error`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},K.t(`jc_Cannot display the custom component "%s"`,this.props.name)),_.createElement(`div`,null,K.t(`jc_It was probably built for an older admin version. Please update the adapter.`)),_.createElement(`div`,{style:{marginTop:8,fontStyle:`italic`,wordBreak:`break-word`}},this.state.error.message||String(this.state.error)))):_.createElement(_.Fragment,null,this.props.children)}},pc=`@iobroker/gui-components`,mc=`@iobroker/adapter-react-v5`,hc=5e3,gc=new Map;async function _c(e){let t=e.lastIndexOf(`/`),n=`${t===-1?e:e.substring(0,t)}/mf-manifest.json`,r=gc.get(n);return r||(r=(async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),hc);try{let t=await fetch(n,{signal:e.signal});return t.ok?await t.json():null}catch{return null}finally{clearTimeout(t)}})(),gc.set(n,r)),r}function vc(e){let t=e==null?void 0:e.shared;return Array.isArray(t)?t.some(e=>(e==null?void 0:e.name)===mc)?mc:t.some(e=>(e==null?void 0:e.name)===pc)?pc:null:null}async function yc(e,t){let n=vc(await _c(e));return n===mc?{compatible:!1,declared:1,tooNew:!1}:typeof t==`number`&&Number.isFinite(t)?{compatible:t===2,declared:t,tooNew:t>2}:n===pc?{compatible:!0,declared:2,tooNew:!1}:{compatible:!1,declared:1,tooNew:!1}}g(),vs({name:`iobroker_admin`,shared:{},remotes:[]});var bc=class e extends X{constructor(e){super(e),Object.assign(this.state,{Component:null,error:``,incompatible:null})}async componentDidMount(){if(!this.props.schema.url){console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`URL is empty. Cannot load custom component!`});return}let t;t=this.props.schema.url.startsWith(`http:`)||this.props.schema.url.startsWith(`https:`)?this.props.schema.url:this.props.schema.url.startsWith(`./`)?`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,``)}`:`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;let[n,r,...i]=this.props.schema.name.split(`/`),a=i.join(`/`);if(!t){console.error(`Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema`);return}if(!n||!r||!a){console.error(`Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema`);return}let o=await yc(t,this.props.schema.guiApi);if(!o.compatible){console.warn(`Custom component "${this.props.schema.name}" from "${t}" was not started: it targets GUI API generation ${o.declared}, but this admin provides generation 2.`),this.setState({incompatible:o});return}let s=e.runningLoads[`${t}!${r}`];if(!(s instanceof Promise)){let i;if(this.props.schema.i18n===!0){let e=t.lastIndexOf(`/`),n;n=e===-1?t:t.substring(0,e);let r=K.getLanguage(),a=`${n}/i18n/${r}.json`;i=fetch(a).then(e=>e.json()).then(e=>K.extendTranslations(e,r)).catch(e=>{if(r!==`en`){fetch(`${n}/i18n/en.json`).then(e=>e.json()).then(e=>K.extendTranslations(e,r)).catch(e=>console.log(`Cannot load i18n "${a}": ${e}`));return}console.log(`Cannot load i18n "${a}": ${e}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n==`object`)try{K.extendTranslations(this.props.schema.i18n)}catch(e){console.error(`Cannot import i18n: ${e}`)}try{console.log(t,n,r,a),bs([{name:n,entry:t,type:`module`}]),s=ys(`${n}/${r}`),i instanceof Promise&&(s=Promise.all([s,i]).then(e=>e[0])),e.runningLoads[`${t}!${r}`]=s}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}try{var c;let e=(c=await s)==null?void 0:c.default;if(e!=null&&e[a])this.setState({Component:e[a]});else{let t=Object.keys(e||{});console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${t.join(`, `)}`})}}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}renderIncompatible(e){return _.createElement(Xn,{type:`warning`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},K.t(`jc_Custom component "%s" was not started`,this.props.schema.name)),_.createElement(`div`,null,e.tooNew?K.t(`jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,e.declared,2):K.t(`jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,e.declared,2))))}render(){let e=this.state.Component,t=this.props.schema||{},n=e?_.createElement(fc,{name:t.name,url:t.url},_.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate})):this.state.incompatible?this.renderIncompatible(this.state.incompatible):this.state.error?_.createElement(`div`,null,this.state.error):_.createElement(I,null);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),n):n}};q(bc,`runningLoads`,{});function xc(e,...t){let n=new URL(`https://mui.com/x/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}function Z(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sc=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:x({},e)}}}}),Cc={previousMonth:`Previous month`,nextMonth:`Next month`,openPreviousView:`Open previous view`,openNextView:`Open next view`,calendarViewSwitchingButtonAriaLabel:e=>e===`year`?`year view is open, switch to calendar view`:`calendar view is open, switch to year view`,start:`Start`,end:`End`,startDate:`Start date`,startTime:`Start time`,endDate:`End date`,endTime:`End time`,cancelButtonLabel:`Cancel`,clearButtonLabel:`Clear`,okButtonLabel:`OK`,todayButtonLabel:`Today`,nextStepButtonLabel:`Next`,datePickerToolbarTitle:`Select date`,dateTimePickerToolbarTitle:`Select date & time`,timePickerToolbarTitle:`Select time`,dateRangePickerToolbarTitle:`Select date range`,timeRangePickerToolbarTitle:`Select time range`,clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:`No time selected`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:`Week number`,calendarWeekNumberHeaderText:`#`,calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:`Choose date`,openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:`Choose time`,openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:`Choose range`,fieldClearLabel:`Clear`,timeTableLabel:`pick time`,dateTableLabel:`pick date`,fieldYearPlaceholder:e=>`Y`.repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType===`letter`?`MMMM`:`MM`,fieldDayPlaceholder:()=>`DD`,fieldWeekDayPlaceholder:e=>e.contentType===`letter`?`EEEE`:`EE`,fieldHoursPlaceholder:()=>`hh`,fieldMinutesPlaceholder:()=>`mm`,fieldSecondsPlaceholder:()=>`ss`,fieldMeridiemPlaceholder:()=>`aa`,year:`Year`,month:`Month`,day:`Day`,weekDay:`Week day`,hours:`Hours`,minutes:`Minutes`,seconds:`Seconds`,meridiem:`Meridiem`,empty:`Empty`},wc=Cc;Sc(Cc),g();var Tc=[`localeText`],Ec=v(null),Dc=function(e){let{localeText:t}=e,n=Z(e,Tc),{adapter:r,localeText:i}=b(Ec)??{adapter:void 0,localeText:void 0},{children:a,dateAdapter:o,dateFormats:s,dateLibInstance:c,adapterLocale:l,localeText:u}=Mt({props:n,name:`MuiLocalizationProvider`}),d=p(()=>x({},u,i,t),[u,i,t]),f=p(()=>{if(!o)return r||null;let e=new o({locale:l,formats:s,instance:c});if(!e.isMUIAdapter)throw Error(xc(143));return e},[o,l,s,c,r]),m=p(()=>f?{minDate:f.date(`1900-01-01T00:00:00.000`),maxDate:f.date(`2099-12-31T00:00:00.000`)}:null,[f]),h=p(()=>({adapter:f,defaultDates:m,localeText:d}),[m,f,d]);return Y(Ec.Provider,{value:h,children:a})};g();var Oc=()=>{let e=b(Ec);if(e===null)throw Error(xc(149));if(e.adapter===null)throw Error(xc(150));let t=p(()=>x({},wc,e.localeText),[e.localeText]);return p(()=>x({},e,{localeText:t}),[e,t])},kc=()=>Oc().adapter,Ac=()=>Oc().localeText,jc=[`disablePast`,`disableFuture`,`minDate`,`maxDate`,`shouldDisableDate`,`shouldDisableMonth`,`shouldDisableYear`],Mc=[`disablePast`,`disableFuture`,`minTime`,`maxTime`,`shouldDisableTime`,`minutesStep`,`ampm`,`disableIgnoringDatePartForTimeValidation`],Nc=[`minDateTime`,`maxDateTime`],Pc=[...jc,...Mc,...Nc],Fc=e=>Pc.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});g();var Ic=[`value`,`defaultValue`,`referenceDate`,`format`,`formatDensity`,`onChange`,`timezone`,`onError`,`shouldRespectLeadingZeros`,`selectedSections`,`onSelectedSectionsChange`,`fieldRef`,`startFieldRef`,`endFieldRef`,`disabled`,`readOnly`,`dateSeparator`,`autoFocus`,`focused`],Lc=(e,t)=>p(()=>{let n=x({},e),r={},i=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Ic.forEach(i),t===`date`?jc.forEach(i):t===`time`?Mc.forEach(i):t===`date-time`&&(jc.forEach(i),Mc.forEach(i),Nc.forEach(i)),{forwardedProps:n,internalProps:r}},[e,t]),Rc=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),zc=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i=n??r,a;if(e!=null)a=e;else if(i.includes(t))a=t;else if(i.length>0)a=i[0];else throw Error(xc(153));return{views:i,openTo:a}},Bc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Vc=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:a,adapter:o,timezone:s})=>{let c=Bc(o,o.date(void 0,s),e);n&&o.isBefore(i,c)&&(i=c),t&&o.isAfter(r,c)&&(r=c);let l=e,u=e;for(o.isBefore(e,i)&&(l=i,u=null),o.isAfter(e,r)&&(u&&=r,l=null);l||u;){if(l&&o.isAfter(l,r)&&(l=null),u&&o.isBefore(u,i)&&(u=null),l){if(!a(l))return l;l=o.addDays(l,1)}if(u){if(!a(u))return u;u=o.addDays(u,-1)}}return null},Hc=(e,t)=>e.isValid(t)?t:null,Uc=(e,t,n)=>t==null||!e.isValid(t)?n:t,Wc=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null||e.isEqual(t,n),Gc=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},Kc=(e,t,n)=>n===`date`?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),qc=(e,t)=>{let n=e.setHours(e.date(),t===`am`?2:14);return e.format(n,`meridiem`)},Jc=[`year`,`month`,`day`],Yc=e=>Jc.includes(e),Xc=(e,{format:t,views:n},r)=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`year`])?i.year:Rc(n,[`month`])?i.month:Rc(n,[`day`])?i.dayOfMonth:Rc(n,[`month`,`year`])?`${i.month} ${i.year}`:Rc(n,[`day`,`month`])?`${i.month} ${i.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?i.normalDateWithWeekday:i.normalDate:i.keyboardDate},Zc=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},Qc=[`hours`,`minutes`,`seconds`],$c=[`hours`,`minutes`,`seconds`,`meridiem`],el=e=>Qc.includes(e),tl=e=>$c.includes(e),nl=(e,t)=>e?t.getHours(e)>=12?`pm`:`am`:null,rl=(e,t,n)=>n&&(e>=12?`pm`:`am`)!==t?t===`am`?e-12:e+12:e,il=(e,t,n,r)=>{let i=rl(r.getHours(e),t,n);return r.setHours(e,i)},al=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),ol=(e,t)=>(n,r)=>e?t.isAfter(n,r):al(n,t)>al(r,t),sl=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`hours`])?r?`${i.hours12h} ${i.meridiem}`:i.hours24h:Rc(n,[`minutes`])?i.minutes:Rc(n,[`seconds`])?i.seconds:Rc(n,[`minutes`,`seconds`])?`${i.minutes}:${i.seconds}`:Rc(n,[`hours`,`minutes`,`seconds`])?r?`${i.hours12h}:${i.minutes}:${i.seconds} ${i.meridiem}`:`${i.hours24h}:${i.minutes}:${i.seconds}`:r?`${i.hours12h}:${i.minutes} ${i.meridiem}`:`${i.hours24h}:${i.minutes}`},cl=(e,t)=>{let n=e.formatTokenMap[t];if(n==null)throw Error(xc(157,t));return typeof n==`string`?{type:n,contentType:n===`meridiem`?`letter`:`digit`,maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},ll=(e,t)=>{let n=[],r=e.date(void 0,`default`),i=e.startOfWeek(r),a=e.endOfWeek(r),o=i;for(;e.isBefore(o,a);)n.push(o),o=e.addDays(o,1);return n.map(n=>e.formatByString(n,t))},ul=(e,t,n,r)=>{switch(n){case`month`:return Gc(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case`weekDay`:return ll(e,r);case`meridiem`:{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},dl=`s`,fl=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],pl=e=>{let t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),dl)===`0`?fl:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),dl))},ml=(e,t)=>{if(t[0]===`0`)return e;let n=[],r=``;for(let i=0;i<e.length;i+=1){r+=e[i];let a=t.indexOf(r);a>-1&&(n.push(a.toString()),r=``)}return n.join(``)},hl=(e,t)=>t[0]===`0`?e:e.split(``).map(e=>t[Number(e)]).join(``),gl=(e,t)=>{let n=ml(e,t);return n!==` `&&!Number.isNaN(Number(n))},_l=(e,t)=>Number(e).toString().padStart(t,`0`),vl=(e,t,n,r,i)=>{if(i.type===`day`&&i.contentType===`digit-with-letter`){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let a=t.toString();return i.hasLeadingZerosInInput&&(a=_l(a,i.maxLength)),hl(a,r)},yl=(e,t,n)=>{let r=e.value||e.placeholder,i=t===`non-input`?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t===`non-input`&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(ml(r,n)).toString()),[`input-rtl`,`input-ltr`].includes(t)&&e.contentType===`digit`&&!i&&r.length===1&&(r=`${r}\u200e`),t===`input-rtl`&&(r=`\u2068${r}\u2069`),r},bl=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),xl=(e,t)=>e.formatByString(e.date(void 0,`system`),t).length===4,Sl=(e,t,n,r)=>{if(t!==`digit`)return!1;let i=e.date(void 0,`default`);switch(n){case`year`:return e.lib===`dayjs`&&r===`YY`||e.formatByString(e.setYear(i,1),r).startsWith(`0`);case`month`:return e.formatByString(e.startOfYear(i),r).length>1;case`day`:return e.formatByString(e.startOfMonth(i),r).length>1;case`weekDay`:return e.formatByString(e.startOfWeek(i),r).length>1;case`hours`:return e.formatByString(e.setHours(i,1),r).length>1;case`minutes`:return e.formatByString(e.setMinutes(i,1),r).length>1;case`seconds`:return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error(xc(158))}},Cl=(e,t,n)=>{let r=t.some(e=>e.type===`day`),i=[],a=[];for(let e=0;e<t.length;e+=1){let o=t[e];r&&o.type===`weekDay`||(i.push(o.format),a.push(yl(o,`non-input`,n)))}let o=i.join(` `),s=a.join(` `);return e.parse(s,o)},wl=e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),Tl=(e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:o,longestMonth:s}=Gc(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:xl(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):o,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if(n===`digit`){let n=ll(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(a),o=Number(ml(e.formatByString(e.startOfDay(r),n),t)),s=Number(ml(e.formatByString(e.endOfDay(r),n),t));return s===i?o>i?{minimum:1,maximum:o}:{minimum:0,maximum:i}:o===0?{minimum:0,maximum:s}:{minimum:1,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},El=(e,t,n,r)=>{switch(t.type){case`year`:return e.setYear(r,e.getYear(n));case`month`:return e.setMonth(r,e.getMonth(n));case`weekDay`:{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=_l(r,t.maxLength));let i=ll(e,t.format),a=i.indexOf(r),o=i.indexOf(t.value)-a;return e.addDays(n,o)}case`day`:return e.setDate(r,e.getDate(n));case`meridiem`:return il(r,e.getHours(n)<12?`am`:`pm`,!0,e);case`hours`:return e.setHours(r,e.getHours(n));case`minutes`:return e.setMinutes(r,e.getMinutes(n));case`seconds`:return e.setSeconds(r,e.getSeconds(n));default:return r}},Dl={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Ol=(e,t,n,r,i)=>[...n].sort((e,t)=>Dl[e.type]-Dl[t.type]).reduce((n,r)=>!i||r.modified?El(e,r,t,n):n,r),kl=e=>{let t={};return e.forEach((n,r)=>{let i=r===0?null:r-1,a=r===e.length-1?null:r+1;t[r]={leftIndex:i,rightIndex:a}}),{neighbors:t,startIndex:0,endIndex:e.length-1}},Al=(e,t)=>{if(e==null)return null;if(e===`all`)return`all`;if(typeof e==`string`){let n=t.findIndex(t=>t.type===e);return n===-1?null:n}return e},jl=({adapter:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),--n,n<0)throw Error(xc(154));return i},Ml=({adapter:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,a=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,`g`),o=null;for(;o=a.exec(t);)n.push({start:o.index,end:a.lastIndex-1});return n},Nl=(e,t,n,r)=>{switch(n.type){case`year`:return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,`default`),r).length,format:r});case`month`:return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case`day`:return t.fieldDayPlaceholder({format:r});case`weekDay`:return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case`hours`:return t.fieldHoursPlaceholder({format:r});case`minutes`:return t.fieldMinutesPlaceholder({format:r});case`seconds`:return t.fieldSecondsPlaceholder({format:r});case`meridiem`:return t.fieldMeridiemPlaceholder({format:r});default:return r}},Pl=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:a,token:o,startSeparator:s})=>{if(o===``)throw Error(xc(155));let c=cl(e,o),l=Sl(e,c.contentType,c.type,o),u=n?l:c.contentType===`digit`,d=e.isValid(t),f=d?e.formatByString(t,o):``,p=null;if(u)if(l)p=f===``?e.formatByString(a,o).length:f.length;else{if(c.maxLength==null)throw Error(xc(156,o));p=c.maxLength,d&&(f=hl(_l(ml(f,i),p),i))}return x({},c,{format:o,maxLength:p,value:f,placeholder:Nl(e,r,c,o),hasLeadingZerosInFormat:l,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:``,modified:!1})},Fl=e=>{let{adapter:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),a=[],o=``,s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),c=/^([a-zA-Z]+)/,l=RegExp(`^(${s.join(`|`)})*$`),u=RegExp(`^(${s.join(`|`)})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),f=0;for(;f<n.length;){var p;let t=d(f),r=t!=null,s=(p=c.exec(n.slice(f)))==null?void 0:p[1];if(!r&&s!=null&&l.test(s)){let t=s;for(;t.length>0;){let n=u.exec(t)[1];t=t.slice(n.length),a.push(Pl(x({},e,{now:i,token:n,startSeparator:o}))),o=``}f+=s.length}else{let e=n[f];r&&(t==null?void 0:t.start)===f||(t==null?void 0:t.end)===f||(a.length===0?o+=e:(a[a.length-1].endSeparator+=e,a[a.length-1].isEndFormatSeparator=!0)),f+=1}}return a.length===0&&o.length>0&&a.push({type:`empty`,contentType:`letter`,maxLength:null,format:``,value:``,placeholder:``,hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:o,endSeparator:``,modified:!1}),a},Il=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&r!==null&&r.includes(` `)&&(r=`\u2069${r}\u2066`),t===`spacious`&&[`/`,`.`,`-`].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}),Ll=e=>{let t=jl(e);e.isRtl&&(t=t.split(` `).reverse().join(` `));let n=Ml(x({},e,{expandedFormat:t})),r=Fl(x({},e,{expandedFormat:t,escapedParts:n}));return Il(x({},e,{sections:r}))};g();var Rl=v(null),zl=()=>{let e=b(Rl);if(e==null)throw Error(xc(151));return e};g();var Bl=()=>b(Rl);g();var Vl=(e={})=>{let t=Bl(),n=kc(),r=Ac(),i=p(()=>pl(n),[n]),{format:a=(t==null?void 0:t.fieldFormat)??n.formats.fullDate}=e;return p(()=>Ll({adapter:n,format:a,formatDensity:`dense`,isRtl:!1,shouldRespectLeadingZeros:!0,localeText:r,localizedDigits:i,date:null}).map(e=>`${e.startSeparator}${e.placeholder}${e.endSeparator}`).join(``),[n,r,i,a])};g();var Hl=v(()=>!0);function Ul(){return b(Hl)}g();var Wl=v(null);function Gl(){return b(Wl)}g();var Kl=v(null),ql=v({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:`desktop`,pickerOrientation:`portrait`},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>`UI`,triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function Jl(e){let{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:i,isValidContextValue:a,localeText:o,children:s}=e;return Y(Rl.Provider,{value:t,children:Y(Kl.Provider,{value:n,children:Y(ql.Provider,{value:r,children:Y(Wl.Provider,{value:i,children:Y(Hl.Provider,{value:a,children:Y(Dc,{localeText:o,children:s})})})})})})}g();var Yl=()=>{let e=b(Kl);if(e==null)throw Error(xc(148));return e};g();var Xl=()=>Oc().defaultDates,Zl=e=>{let t=kc(),n=l(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};g();var Ql=wt(Y(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),$l=wt(Y(`path`,{d:`M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z`}),`ArrowLeft`),eu=wt(Y(`path`,{d:`M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z`}),`ArrowRight`),tu=wt(Y(`path`,{d:`M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z`}),`Calendar`),nu=wt(P(y,{children:[Y(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),Y(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Clock`),ru=wt(Y(`path`,{d:`M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z`}),`DateRange`),iu=wt(P(y,{children:[Y(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),Y(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Time`),au=wt(Y(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`);function ou(e){return Ve(`MuiPickersArrowSwitcher`,e)}Ne(`MuiPickersArrowSwitcher`,[`root`,`spacer`,`button`,`previousIconButton`,`nextIconButton`,`leftArrowIcon`,`rightArrowIcon`]),g();var su=()=>b(ql);g();var cu=[`children`,`className`,`slots`,`slotProps`,`isNextDisabled`,`isNextHidden`,`onGoToNext`,`nextLabel`,`isPreviousDisabled`,`isPreviousHidden`,`onGoToPrevious`,`previousLabel`,`labelId`,`classes`],lu=[`ownerState`],uu=[`ownerState`],du=J(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Root`})({display:`flex`}),fu=J(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Spacer`})(({theme:e})=>({width:e.spacing(3)})),pu=J(Qn,{name:`MuiPickersArrowSwitcher`,slot:`Button`})({variants:[{props:{isButtonHidden:!0},style:{visibility:`hidden`}}]}),mu=e=>Le({root:[`root`],spacer:[`spacer`],button:[`button`],previousIconButton:[`previousIconButton`],nextIconButton:[`nextIconButton`],leftArrowIcon:[`leftArrowIcon`],rightArrowIcon:[`rightArrowIcon`]},ou,e),hu=o(function(e,t){let n=j(),r=Mt({props:e,name:`MuiPickersArrowSwitcher`}),{children:i,className:a,slots:o,slotProps:s,isNextDisabled:c,isNextHidden:l,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:m,previousLabel:h,labelId:g,classes:_}=r,v=Z(r,cu),{ownerState:y}=su(),b=mu(_),S={isDisabled:c,isHidden:l,goTo:u,label:d},C={isDisabled:f,isHidden:p,goTo:m,label:h},w=(o==null?void 0:o.previousIconButton)??pu,T=It({elementType:w,externalSlotProps:s==null?void 0:s.previousIconButton,additionalProps:{size:`medium`,title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:`end`,onClick:C.goTo},ownerState:x({},y,{isButtonHidden:C.isHidden??!1}),className:V(b.button,b.previousIconButton)}),E=(o==null?void 0:o.nextIconButton)??pu,D=It({elementType:E,externalSlotProps:s==null?void 0:s.nextIconButton,additionalProps:{size:`medium`,title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:`start`,onClick:S.goTo},ownerState:x({},y,{isButtonHidden:S.isHidden??!1}),className:V(b.button,b.nextIconButton)}),O=(o==null?void 0:o.leftArrowIcon)??$l,k=Z(It({elementType:O,externalSlotProps:s==null?void 0:s.leftArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.leftArrowIcon}),lu),A=(o==null?void 0:o.rightArrowIcon)??eu,M=Z(It({elementType:A,externalSlotProps:s==null?void 0:s.rightArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.rightArrowIcon}),uu);return P(du,x({ref:t,className:V(b.root,a),ownerState:y},v,{children:[Y(w,x({},T,{children:n?Y(A,x({},M)):Y(O,x({},k))})),i?Y(_n,{variant:`subtitle1`,component:`span`,id:g,children:i}):Y(fu,{className:b.spacer,ownerState:y}),Y(E,x({},D,{children:n?Y(O,x({},k)):Y(A,x({},M))}))]}))}),gu={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function _u(e){let{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(t==null)return gu;let i=t.findIndex(t=>n(e.view,t)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(x({},e,{step:a}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}g();function vu({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){let d=l(n),f=l(i),p=l(i.includes(n)?n:i[0]),[m,h]=Zt({name:`useViews`,state:`view`,controlled:r,default:p.current}),g=l(o?m:null),[_,v]=Zt({name:`useViews`,state:`focusedView`,controlled:s,default:g.current}),y=u?u({setView:h,view:m,defaultView:p.current,views:i}):gu;a(()=>{(d.current&&d.current!==n||f.current&&f.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),f.current=i,d.current=n)},[n,h,m,i]);let b=i.indexOf(m),S=i[b-1]??null,C=i[b+1]??null,w=G((e,t)=>{v(t?e:t=>e===t?null:t),c==null||c(e,t)}),T=G(e=>{w(e,!0),e!==m&&(h(e),t&&t(e))}),E=G(()=>{C&&T(C)}),D=G((t,n,r)=>{let a=n===`finish`,o=r?i.indexOf(r)<i.length-1:!!C;e(t,a&&o?`partial`:n,r);let s=null;if(r!=null&&r!==m?s=r:a&&(s=m),s==null)return;let c=i[i.indexOf(s)+1];c==null||!y.areViewsInSameStep(s,c)||T(c)});return x({},y,{view:m,setView:T,focusedView:_,setFocusedView:w,nextView:C,previousView:S,defaultView:i.includes(n)?n:i[0],goToNextView:E,setValueAndGoToNextView:D})}g();function yu(e,{disableFuture:t,maxDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isBefore(a,n)?a:n);return!i.isAfter(o,e)},[t,n,e,i,r])}function bu(e,{disablePast:t,minDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isAfter(a,n)?a:n);return!i.isBefore(o,i.startOfMonth(e))},[t,n,e,i,r])}function xu(e,t,n,r){let i=kc(),a=p(()=>i.isValid(e)?e:null,[i,e]);return{meridiemMode:nl(a,i),handleMeridiemChange:f(e=>{n(a==null?null:il(a,e,!!t,i),r??`partial`)},[t,a,n,r,i])}}var Su=J(`div`,{slot:`internal`,shouldForwardProp:void 0})({overflow:`hidden`,width:320,maxHeight:336,display:`flex`,flexDirection:`column`,margin:`0 auto`});function Cu(e){return Ve(`MuiTimeClock`,e)}var wu=Ne(`MuiTimeClock`,[`root`,`arrowSwitcher`]),Tu={x:220/2,y:220/2},Eu={x:Tu.x,y:0},Du=Eu.x-Tu.x,Ou=Eu.y-Tu.y,ku=e=>180/Math.PI*e,Au=(e,t,n)=>{let r=t-Tu.x,i=n-Tu.y,a=ku(Math.atan2(Du,Ou)-Math.atan2(r,i));a=Math.round(a/e)*e,a%=360;let o=Math.floor(a/e)||0,s=r**2+i**2;return{value:o,distance:Math.sqrt(s)}},ju=(e,t,n=1)=>{let{value:r}=Au(n*6,e,t);return r=r*n%60,r},Mu=(e,t,n)=>{let{value:r,distance:i}=Au(30,e,t),a=r||12;return n?a%=12:i<220/2-36&&(a+=12,a%=24),a};function Nu(e){return Ve(`MuiClockPointer`,e)}var Pu=Ne(`MuiClockPointer`,[`root`,`thumb`]);g();var Fu=[`className`,`classes`,`isBetweenTwoClockValues`,`isInner`,`type`,`viewValue`],Iu=e=>Le({root:[`root`],thumb:[`thumb`]},Nu,e),Lu=J(`div`,{name:`MuiClockPointer`,slot:`Root`})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,left:`calc(50% - 1px)`,bottom:`50%`,transformOrigin:`center bottom 0px`,variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create([`transform`,`height`])}}]})),Ru=J(`div`,{name:`MuiClockPointer`,slot:`Thumb`})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:`50%`,position:`absolute`,top:-21,left:`calc(50% - ${36/2}px)`,border:`${32/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:`content-box`,variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function zu(e){let t=Mt({props:e,name:`MuiClockPointer`}),{className:n,classes:r,isBetweenTwoClockValues:i,isInner:o,type:s,viewValue:c}=t,u=Z(t,Fu),d=l(s);a(()=>{d.current=s},[s]);let{ownerState:f}=su(),p=x({},f,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:i}),m=Iu(r);return Y(Lu,x({style:(()=>{let e=360/(s===`hours`?12:60)*c;return s===`hours`&&c>12&&(e-=360),{height:Math.round((o?.26:.4)*220),transform:`rotateZ(${e}deg)`}})(),className:V(m.root,n),ownerState:p},u,{children:Y(Ru,{ownerState:p,className:m.thumb})}))}function Bu(e){return Ve(`MuiClock`,e)}var Vu=Ne(`MuiClock`,[`root`,`clock`,`wrapper`,`squareMask`,`pin`,`amButton`,`pmButton`,`meridiemText`,`selected`]);g();var Hu=(e,t)=>{let n={root:[`root`],clock:[`clock`],wrapper:[`wrapper`],squareMask:[`squareMask`],pin:[`pin`],amButton:[`amButton`,t.clockMeridiemMode===`am`&&`selected`],pmButton:[`pmButton`,t.clockMeridiemMode===`pm`&&`selected`],meridiemText:[`meridiemText`]};return Le(n,Bu,e)},Uu=J(`div`,{name:`MuiClock`,slot:`Root`})(({theme:e})=>({display:`flex`,justifyContent:`center`,alignItems:`center`,margin:e.spacing(2)})),Wu=J(`div`,{name:`MuiClock`,slot:`Clock`})({backgroundColor:`rgba(0,0,0,.07)`,borderRadius:`50%`,height:220,width:220,flexShrink:0,position:`relative`,pointerEvents:`none`}),Gu=J(`div`,{name:`MuiClock`,slot:`Wrapper`})({"&:focus":{outline:`none`}}),Ku=J(`div`,{name:`MuiClock`,slot:`SquareMask`})({width:`100%`,height:`100%`,position:`absolute`,pointerEvents:`auto`,outline:0,touchAction:`none`,userSelect:`none`,variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:`pointer`,borderRadius:`50%`},"&:active":{cursor:`move`}}}]}),qu=J(`div`,{name:`MuiClock`,slot:`Pin`})(({theme:e})=>({width:6,height:6,borderRadius:`50%`,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`})),Ju=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Yu=J(Qn,{name:`MuiClock`,slot:`AmButton`})(({theme:e})=>x({},Ju(e,`am`),{position:`absolute`,left:8})),Xu=J(Qn,{name:`MuiClock`,slot:`PmButton`})(({theme:e})=>x({},Ju(e,`pm`),{position:`absolute`,right:8})),Zu=J(_n,{name:`MuiClock`,slot:`MeridiemText`})({overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`});function Qu(e){let{ampm:t,ampmInClock:n,autoFocus:r,children:i,value:o,handleMeridiemChange:s,isTimeDisabled:c,meridiemMode:u,minutesStep:d=1,onChange:f,selectedId:p,type:m,viewValue:h,viewRange:[g,_],disabled:v=!1,readOnly:b,className:S,classes:C}=Mt({props:e,name:`MuiClock`}),w=kc(),T=Ac(),{ownerState:E}=su(),D=x({},E,{isClockDisabled:v,clockMeridiemMode:u}),O=l(!1),k=l(null),A=l(null),j=l(void 0),M=Hu(C,D),N=c(h,m),ee=!t&&m===`hours`&&(h<1||h>12),F=(e,t)=>{v||b||c(e,m)||f(e,t)},te=(e,n)=>{let r=A.current;if(!r)return;let i=r.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=m===`seconds`||m===`minutes`?ju(a,o,d):Mu(a,o,!!t);F(s,n)},I=()=>{var e;O.current=!1,k.current=null,(e=j.current)==null||e.call(j)},L=G(e=>{e.pointerId===k.current&&(e.preventDefault(),te(e,`shallow`))}),R=G(e=>{e.pointerId===k.current&&(I(),te(e,`finish`))}),z=G(e=>{e.pointerId===k.current&&I()}),ne=e=>{if(e.button>0||e.isPrimary===!1||v||b)return;I(),O.current=!0,k.current=e.pointerId;let t=ir(A.current);t.addEventListener(`pointermove`,L),t.addEventListener(`pointerup`,R),t.addEventListener(`pointercancel`,z),j.current=()=>{t.removeEventListener(`pointermove`,L),t.removeEventListener(`pointerup`,R),t.removeEventListener(`pointercancel`,z),j.current=void 0},te(e.nativeEvent,`shallow`)},re=m!==`hours`&&h%5!=0,ie=m===`minutes`?d:1,ae=l(null);un(()=>{r&&ae.current.focus()},[r]),a(()=>()=>{var e;return(e=j.current)==null?void 0:e.call(j)},[]);let B=e=>Math.max(g,Math.min(_,e)),oe=e=>(e+(_+1))%(_+1);return P(Uu,{className:V(M.root,S),children:[P(Wu,{className:M.clock,children:[Y(Ku,{ref:A,onPointerDown:ne,ownerState:D,className:M.squareMask}),!N&&P(y,{children:[Y(qu,{className:M.pin}),o!=null&&Y(zu,{type:m,viewValue:h,isInner:ee,isBetweenTwoClockValues:re})]}),Y(Gu,{"aria-activedescendant":p,"aria-label":T.clockLabelText(m,o==null?null:w.format(o,t?`fullTime12h`:`fullTime24h`)),ref:ae,role:`listbox`,onKeyDown:e=>{if(!O.current)switch(e.key){case`Home`:F(g,`partial`),e.preventDefault();break;case`End`:F(_,`partial`),e.preventDefault();break;case`ArrowUp`:F(oe(h+ie),`partial`),e.preventDefault();break;case`ArrowDown`:F(oe(h-ie),`partial`),e.preventDefault();break;case`PageUp`:F(B(h+5),`partial`),e.preventDefault();break;case`PageDown`:F(B(h-5),`partial`),e.preventDefault();break;case`Enter`:case` `:F(h,`finish`),e.preventDefault()}},tabIndex:0,className:M.wrapper,children:i})]}),t&&n&&P(y,{children:[Y(Yu,{onClick:b?void 0:()=>s(`am`),disabled:v||u===null,ownerState:D,className:M.amButton,title:qc(w,`am`),children:Y(Zu,{variant:`caption`,className:M.meridiemText,children:qc(w,`am`)})}),Y(Xu,{disabled:v||u===null,onClick:b?void 0:()=>s(`pm`),ownerState:D,className:M.pmButton,title:qc(w,`pm`),children:Y(Zu,{variant:`caption`,className:M.meridiemText,children:qc(w,`pm`)})})]})]})}function $u(e){return Ve(`MuiClockNumber`,e)}var ed=Ne(`MuiClockNumber`,[`root`,`selected`,`disabled`]);g();var td=[`className`,`classes`,`disabled`,`index`,`inner`,`label`,`selected`],nd=(e,t)=>{let n={root:[`root`,t.isClockNumberSelected&&`selected`,t.isClockNumberDisabled&&`disabled`]};return Le(n,$u,e)},rd=J(`span`,{name:`MuiClockNumber`,slot:`Root`,overridesResolver:(e,t)=>[t.root,{[`&.${ed.disabled}`]:t.disabled},{[`&.${ed.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:`absolute`,left:`calc((100% - 36px) / 2)`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,borderRadius:`50%`,color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${ed.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${ed.disabled}`]:{pointerEvents:`none`,color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:x({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function id(e){let t=Mt({props:e,name:`MuiClockNumber`}),{className:n,classes:r,disabled:i,index:a,inner:o,label:s,selected:c}=t,l=Z(t,td),{ownerState:u}=su(),d=x({},u,{isClockNumberInInnerRing:o,isClockNumberSelected:c,isClockNumberDisabled:i}),f=nd(r,d),p=a%12/12*Math.PI*2-Math.PI/2,m=182/2*(o?.65:1),h=Math.round(Math.cos(p)*m),g=Math.round(Math.sin(p)*m);return Y(rd,x({className:V(f.root,n),"aria-disabled":i?!0:void 0,"aria-selected":c?!0:void 0,role:`option`,style:{transform:`translate(${h}px, ${g+184/2}px`},ownerState:d},l,{children:s}))}g();var ad=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:a})=>{let o=t?a.getHours(t):null,s=[],c=+!!e,l=e?12:23,u=t=>o===null?!1:e?t===12?o===12||o===0:o===t||o-12===t:o===t;for(let t=c;t<=l;t+=1){let o=t.toString();t===0&&(o=`00`);let c=!e&&(t===0||t>12);o=a.formatNumber(o);let l=u(t);s.push(Y(id,{id:l?i:void 0,index:t,inner:c,selected:l,disabled:r(t),label:o,"aria-label":n(o)},t))}return s},od=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let a=e.formatNumber;return[[5,a(`05`)],[10,a(`10`)],[15,a(`15`)],[20,a(`20`)],[25,a(`25`)],[30,a(`30`)],[35,a(`35`)],[40,a(`40`)],[45,a(`45`)],[50,a(`50`)],[55,a(`55`)],[0,a(`00`)]].map(([e,a],o)=>{let s=e===t;return Y(id,{label:a,id:s?i:void 0,index:o+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)})};g();var sd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:a,valueManager:o})=>{let s=kc(),[c,l]=Zt({name:e,state:`value`,controlled:n,default:r??o.emptyValue}),u=p(()=>o.getTimezone(s,c),[s,o,c]),d=G(e=>u==null?e:o.setTimezone(s,u,e)),f=p(()=>t||u||(i?s.getTimezone(Array.isArray(i)?i[0]:i):`default`),[t,u,i,s]);return{value:p(()=>o.setTimezone(s,f,c),[o,s,f,c]),handleValueChange:G((e,...t)=>{let n=d(e);l(n),a==null||a(n,...t)}),timezone:f}},cd={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},ld=e=>Math.max(...e.map(e=>cd[e.type]??1)),ud=(e,t,n)=>{if(t===cd.year)return e.startOfYear(n);if(t===cd.month)return e.startOfMonth(n);if(t===cd.day)return e.startOfDay(n);let r=n;return t<cd.minutes&&(r=e.setMinutes(r,0)),t<cd.seconds&&(r=e.setSeconds(r,0)),t<cd.milliseconds&&(r=e.setMilliseconds(r,0)),r},dd=({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let a=i?i():ud(t,n,Kc(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=ud(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=ud(t,n,e.maxDate));let o=ol(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&o(e.minTime,a)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Bc(t,a,e.minTime))),e.maxTime!=null&&o(a,e.maxTime)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Bc(t,a,e.maxTime))),a},fd=[`value`,`referenceDate`],pd={emptyValue:null,getTodayValue:Kc,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Z(e,fd);return r.adapter.isValid(t)?t:n??dd(r)},cleanValue:Hc,areValuesEqual:Wc,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},md={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getHiddenInputValueFromSections:wl,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>x({},e,{value:``}))};g();var hd=({value:e,referenceDate:t,adapter:n,props:r,timezone:i})=>{let a=p(()=>pd.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:cd.day,timezone:i,getTodayDate:()=>Kc(n,i,`date`)}),[t,i]);return e??a};g();var gd=`ampm.ampmInClock.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.showViewSwitcher.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.timezone`.split(`.`),_d=e=>Le({root:[`root`],arrowSwitcher:[`arrowSwitcher`]},Cu,e),vd=J(Su,{name:`MuiTimeClock`,slot:`Root`})({display:`flex`,flexDirection:`column`,position:`relative`}),yd=J(hu,{name:`MuiTimeClock`,slot:`ArrowSwitcher`})({position:`absolute`,right:12,top:15}),bd=[`hours`,`minutes`],xd=o(function(e,t){let n=kc(),r=Mt({props:e,name:`MuiTimeClock`}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:o,slots:s,slotProps:c,value:l,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:_,disablePast:v,minutesStep:y=1,shouldDisableTime:b,showViewSwitcher:S,onChange:C,view:w,views:T=bd,openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,timezone:ee}=r,F=Z(r,gd),{value:te,handleValueChange:I,timezone:L}=sd({name:`TimeClock`,timezone:ee,value:l,defaultValue:u,referenceDate:d,onChange:C,valueManager:pd}),R=hd({value:te,referenceDate:d,adapter:n,props:r,timezone:L}),z=Ac(),ne=Zl(L),re=mn(),{ownerState:ie}=su(),{view:ae,setView:B,previousView:oe,nextView:se,setValueAndGoToNextView:ce}=vu({view:w,views:T,openTo:E,onViewChange:D,onChange:I,focusedView:O,onFocusedViewChange:k}),{meridiemMode:le,handleMeridiemChange:H}=xu(R,i,ce),ue=f((e,t)=>{let r=ol(m,n),a=t===`hours`||t===`minutes`&&T.includes(`seconds`),o=({start:e,end:t})=>!(g&&r(g,t)||h&&r(e,h)||_&&r(e,ne)||v&&r(ne,a?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(b)switch(t){case`hours`:return!b(n.setHours(R,e),`hours`);case`minutes`:return!b(n.setMinutes(R,e),`minutes`);case`seconds`:return!b(n.setSeconds(R,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,le,i),r=n.setHours(R,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(R,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case`seconds`:{let t=n.setSeconds(R,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[i,R,m,h,le,g,y,b,n,_,v,ne,T]),de=p(()=>{switch(ae){case`hours`:{let e=(e,t)=>{let r=rl(e,le,i);ce(n.setHours(R,r),t,`hours`)},t=n.getHours(R),r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:ad({value:te,adapter:n,ampm:i,onChange:e,getClockNumberText:z.hoursClockNumberText,isDisabled:e=>M||ue(e,`hours`),selectedId:re}),viewRange:r}}case`minutes`:{let e=n.getMinutes(R),t=(e,t)=>{ce(n.setMinutes(R,e),t,`minutes`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:z.minutesClockNumberText,isDisabled:e=>M||ue(e,`minutes`),selectedId:re}),viewRange:[0,59]}}case`seconds`:{let e=n.getSeconds(R),t=(e,t)=>{ce(n.setSeconds(R,e),t,`seconds`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:z.secondsClockNumberText,isDisabled:e=>M||ue(e,`seconds`),selectedId:re}),viewRange:[0,59]}}default:throw Error(xc(147))}},[ae,n,te,i,z.hoursClockNumberText,z.minutesClockNumberText,z.secondsClockNumberText,le,ce,R,ue,re,M]),U=_d(j);return P(vd,x({ref:t,className:V(U.root,A),ownerState:ie},F,{children:[Y(Qu,x({autoFocus:o??!!O,ampmInClock:a&&T.includes(`hours`),value:te,type:ae,ampm:i,minutesStep:y,isTimeDisabled:ue,meridiemMode:le,handleMeridiemChange:H,selectedId:re,disabled:M,readOnly:N},de)),S&&Y(yd,{className:U.arrowSwitcher,slots:s,slotProps:c,onGoToPrevious:()=>B(oe),isPreviousDisabled:!oe,previousLabel:z.openPreviousView,onGoToNext:()=>B(se),isNextDisabled:!se,nextLabel:z.openNextView,ownerState:ie})]}))});function Sd(e){return Ve(`MuiDigitalClock`,e)}var Cd=Ne(`MuiDigitalClock`,[`root`,`list`,`item`]);function wd(e,t){return Array.isArray(t)?t.every(t=>e.indexOf(t)!==-1):e.indexOf(t)!==-1}var Td=e=>{setTimeout(e,0)},Ed=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Ed(t.shadowRoot):t:null},Dd=e=>Ed(ir(e)),Od=e=>Array.from(e.children).indexOf(Dd(e)),kd=`@media (pointer: fine)`;function Ad(e){let t={};for(let n of Object.keys(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=e[n]);return t}function jd(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):t!=null&&e.push(t),e),[])}g();var Md=`ampm.timeStep.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.views.skipDisabled.timezone`.split(`.`),Nd=e=>Le({root:[`root`],list:[`list`],item:[`item`]},Sd,e),Pd=J(Su,{name:`MuiDigitalClock`,slot:`Root`})({overflowY:`auto`,width:`100%`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]}),Fd=J(ut,{name:`MuiDigitalClock`,slot:`List`})({padding:0}),Id=J(it,{name:`MuiDigitalClock`,slot:`Item`,shouldForwardProp:e=>e!==`itemValue`&&e!==`formattedValue`})(({theme:e})=>({padding:`8px 16px`,margin:`2px 4px`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Ld=o(function(e,t){let n=kc(),r=l(null),i=oe(t,r),a=l(null),o=l(null),s=Mt({props:e,name:`MuiDigitalClock`}),{ampm:c=n.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,slots:m,slotProps:h,value:g,defaultValue:_,referenceDate:v,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:b,minTime:S,disableFuture:C,disablePast:w,minutesStep:T=1,shouldDisableTime:E,onChange:D,view:O,openTo:k,onViewChange:A,focusedView:j,onFocusedViewChange:M,className:N,classes:ee,disabled:P,readOnly:F,views:te=[`hours`],skipDisabled:I=!1,timezone:L}=s,R=Z(s,Md),{value:z,handleValueChange:ne,timezone:re}=sd({name:`DigitalClock`,timezone:L,value:g,defaultValue:_,referenceDate:v,onChange:D,valueManager:pd}),ie=Ac(),ae=Zl(re),{ownerState:B}=su(),se=x({},B,{hasDigitalClockAlreadyBeenRendered:!!r.current}),ce=Nd(ee),le=(m==null?void 0:m.digitalClockItem)??Id,H=It({elementType:le,externalSlotProps:h==null?void 0:h.digitalClockItem,ownerState:se,className:ce.item}),ue=hd({value:z,referenceDate:v,adapter:n,props:s,timezone:re}),{setValueAndGoToNextView:de}=vu({view:O,views:te,openTo:k,onViewChange:A,onChange:G(e=>ne(e,`finish`,`hours`)),focusedView:j,onFocusedViewChange:M}),U=G(e=>{de(e,`finish`)});un(()=>{if(r.current===null)return;let e=r.current.querySelector(`[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]`);if(!e)return;let t=e.offsetTop;(d||j)&&e!==o.current&&(o.current=e,e.focus()),r.current.scrollTop=t-4});let fe=f(e=>{let t=ol(y,n);return!!(S&&t(S,e)||b&&t(e,b)||C&&t(e,ae)||w&&t(ae,e))||!(n.getMinutes(e)%T===0&&(!E||!E(e,`hours`)))},[y,n,S,b,C,ae,w,T,E]),pe=p(()=>{let e=[],t=n.startOfDay(ue);for(;n.isSameDay(ue,t);)e.push(t),t=n.addMinutes(t,u);return e},[ue,u,n]),W=pe.findIndex(e=>n.isEqual(e,ue));return Y(Pd,x({ref:i,className:V(ce.root,N),ownerState:se},R,{children:Y(Fd,{ref:a,role:`listbox`,"aria-label":ie.timePickerToolbarTitle,className:ce.list,onKeyDown:e=>{switch(e.key){case`PageUp`:{let t=Od(a.current)-5,n=a.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(a.current)+5,n=a.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:pe.map((e,t)=>{let r=fe(e);if(I&&r)return null;let i=n.isEqual(e,z),a=n.format(e,c?`fullTime12h`:`fullTime24h`);return Y(le,x({onClick:()=>!F&&U(e),selected:i,disabled:P||r,disableRipple:F,role:`option`,"aria-disabled":F,"aria-selected":i,tabIndex:W===t||W===-1&&t===0?0:-1,itemValue:e,formattedValue:a},H,{children:a}),`${e.valueOf()}-${a}`)})})}))});function Rd(e){return Ve(`MuiMultiSectionDigitalClock`,e)}var zd=Ne(`MuiMultiSectionDigitalClock`,[`root`]);function Bd(e){return Ve(`MuiMultiSectionDigitalClockSection`,e)}var Vd=Ne(`MuiMultiSectionDigitalClockSection`,[`root`,`item`]);g();var Hd=[`autoFocus`,`onChange`,`className`,`classes`,`disabled`,`readOnly`,`items`,`active`,`slots`,`slotProps`,`skipDisabled`],Ud=e=>Le({root:[`root`],item:[`item`]},Bd,e),Wd=J(ut,{name:`MuiMultiSectionDigitalClockSection`,slot:`Root`})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:`hidden`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},"@media (pointer: fine)":{"&:hover":{overflowY:`auto`}},"@media (pointer: none), (pointer: coarse)":{overflowY:`auto`},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]})),Gd=J(it,{name:`MuiMultiSectionDigitalClockSection`,slot:`Item`})(({theme:e})=>({padding:8,margin:`2px 4px`,width:48,justifyContent:`center`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Kd=o(function(e,t){let n=l(null),r=oe(t,n),i=l(null),o=l(!1),s=Mt({props:e,name:`MuiMultiSectionDigitalClockSection`}),{autoFocus:c,onChange:u,className:d,classes:f,disabled:p,readOnly:m,items:h,active:g,slots:_,slotProps:v,skipDisabled:y}=s,b=Z(s,Hd),{ownerState:S}=su(),C=x({},S,{hasDigitalClockAlreadyBeenRendered:!!n.current}),w=Ud(f),T=(_==null?void 0:_.digitalClockSectionItem)??Gd;un(()=>{if(n.current===null)return;let e=n.current.querySelector(`[role="option"][tabindex="0"], [role="option"][aria-selected="true"]`);if(!e)return;let t=document.activeElement,r=i.current===e,a=!!t&&n.current.contains(t),s=r&&o.current;if(g&&c&&(!r||s)&&(i.current==null||o.current||a)&&(i.current=e,o.current=!1,e.focus()),r)return;let l=e.offsetTop,u=e.offsetHeight,d=n.current.clientHeight,f=n.current.scrollHeight,p=l-d/2+u/2,m=f-d,h=Math.min(p,m);n.current.scrollTop=Math.max(0,h)});let E=G(e=>{let t=e.relatedTarget,r=t==null?void 0:t.parentElement,a=t==null?void 0:t.getAttribute(`role`),s=(r==null?void 0:r.nodeName)===`UL`&&r!==n.current||a===`gridcell`;o.current=s,i.current&&(r==null?void 0:r.nodeName)===`UL`&&r!==n.current&&(i.current=null)});a(()=>{g||(i.current=null)},[g]);let D=h.findIndex(e=>e.isFocused(e.value)),O=G(e=>{switch(e.key){case`Tab`:o.current=!0;break;case`PageUp`:{let t=Od(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(n.current)+5,r=n.current.children,i=r[Math.min(r.length-1,t)];i&&i.focus(),e.preventDefault();break}}});return Y(Wd,x({ref:r,className:V(w.root,d),ownerState:C,role:`listbox`,onKeyDown:O,onBlur:E},b,{children:h.map((e,t)=>{var n;let r=(n=e.isDisabled)==null?void 0:n.call(e,e.value),i=p||r;if(y&&i)return null;let a=e.isSelected(e.value),o=D===t||D===-1&&t===0?0:-1;return Y(T,x({onClick:()=>!m&&u(e.value),selected:a,disabled:i,disableRipple:m,role:`option`,"aria-disabled":m||i||void 0,"aria-label":e.ariaLabel,"aria-selected":a,tabIndex:o,className:w.item},v==null?void 0:v.digitalClockSectionItem,{children:e.label}),e.label)})}))}),qd=({now:e,value:t,adapter:n,ampm:r,isDisabled:i,resolveAriaLabel:a,timeStep:o,valueOrReferenceDate:s})=>{let c=t?n.getHours(t):null,l=[],u=(e,t)=>{let n=t??c;return n===null?!1:r?e===12?n===12||n===0:n===e||n-12===e:n===e},d=e=>u(e,n.getHours(s)),f=n.setDate(n.setMonth(n.startOfDay(e),0),15),p=r?11:23;for(let e=0;e<=p;e+=o){let t=n.format(n.setHours(f,e),r?`hours12h`:`hours24h`),o=a(parseInt(t,10).toString());t=n.formatNumber(t),l.push({value:e,label:t,isSelected:u,isDisabled:i,isFocused:d,ariaLabel:o})}return l},Jd=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:i,resolveAriaLabel:a,hasValue:o=!0})=>{let s=t=>e!==null&&o&&e===t,c=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,o)=>{let l=r*o;return{value:l,label:t.formatNumber(i(l)),isDisabled:n,isSelected:s,isFocused:c,ariaLabel:a(l.toString())}})]};g();var Yd=`ampm.timeSteps.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.skipDisabled.timezone`.split(`.`),Xd=e=>Le({root:[`root`]},Rd,e),Zd=J(Su,{name:`MuiMultiSectionDigitalClock`,slot:`Root`})(({theme:e})=>({flexDirection:`row`,width:`100%`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Qd=o(function(e,t){let n=kc(),r=j(),i=Mt({props:e,name:`MuiMultiSectionDigitalClock`}),{ampm:a=n.is12HourCycleInCurrentLocale(),timeSteps:o,autoFocus:s,slots:c,slotProps:l,value:u,defaultValue:d,referenceDate:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:_,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:S,onChange:C,view:w,views:T=[`hours`,`minutes`],openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:M,disabled:N,readOnly:ee,skipDisabled:P=!1,timezone:F}=i,te=Z(i,Yd),{value:I,handleValueChange:L,timezone:R}=sd({name:`MultiSectionDigitalClock`,timezone:F,value:u,defaultValue:d,referenceDate:m,onChange:C,valueManager:pd}),z=Ac(),ne=Zl(R),re=p(()=>x({hours:1,minutes:5,seconds:5},o),[o]),ie=hd({value:I,referenceDate:m,adapter:n,props:i,timezone:R}),ae=G((e,t,n)=>L(e,t,n)),B=p(()=>!a||!T.includes(`hours`)||T.includes(`meridiem`)?T:[...T,`meridiem`],[a,T]),{view:oe,setValueAndGoToNextView:se,focusedView:ce}=vu({view:w,views:B,openTo:E,onViewChange:D,onChange:ae,focusedView:O,onFocusedViewChange:k}),{meridiemMode:le,handleMeridiemChange:H}=xu(ie,a,G(e=>{se(e,`finish`,`meridiem`)}),`finish`),ue=f((e,t)=>{let r=ol(h,n),i=t===`hours`||t===`minutes`&&B.includes(`seconds`),o=({start:e,end:t})=>!(_&&r(_,t)||g&&r(e,g)||v&&r(e,ne)||y&&r(ne,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(S)switch(t){case`hours`:return!S(n.setHours(ie,e),`hours`);case`minutes`:return!S(n.setMinutes(ie,e),`minutes`);case`seconds`:return!S(n.setSeconds(ie,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,le,a),r=n.setHours(ie,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(ie,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case`seconds`:{let t=n.setSeconds(ie,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[a,ie,h,g,le,_,b,S,n,v,y,ne,B]),de=f(e=>{switch(e){case`hours`:return{onChange:e=>{let t=rl(e,le,a);se(n.setHours(ie,t),`finish`,`hours`)},items:qd({now:ne,value:I,ampm:a,adapter:n,isDisabled:e=>ue(e,`hours`),timeStep:re.hours,resolveAriaLabel:z.hoursClockNumberText,valueOrReferenceDate:ie})};case`minutes`:return{onChange:e=>{se(n.setMinutes(ie,e),`finish`,`minutes`)},items:Jd({value:n.getMinutes(ie),adapter:n,isDisabled:e=>ue(e,`minutes`),resolveLabel:e=>n.format(n.setMinutes(ne,e),`minutes`),timeStep:re.minutes,hasValue:!!I,resolveAriaLabel:z.minutesClockNumberText})};case`seconds`:return{onChange:e=>{se(n.setSeconds(ie,e),`finish`,`seconds`)},items:Jd({value:n.getSeconds(ie),adapter:n,isDisabled:e=>ue(e,`seconds`),resolveLabel:e=>n.format(n.setSeconds(ne,e),`seconds`),timeStep:re.seconds,hasValue:!!I,resolveAriaLabel:z.secondsClockNumberText})};case`meridiem`:{let e=qc(n,`am`),t=qc(n,`pm`);return{onChange:H,items:[{value:`am`,label:e,isSelected:()=>!!I&&le===`am`,isFocused:()=>!!ie&&le===`am`,ariaLabel:e},{value:`pm`,label:t,isSelected:()=>!!I&&le===`pm`,isFocused:()=>!!ie&&le===`pm`,ariaLabel:t}]}}default:throw Error(xc(144,e))}},[ne,I,a,n,re.hours,re.minutes,re.seconds,z.hoursClockNumberText,z.minutesClockNumberText,z.secondsClockNumberText,le,se,ie,ue,H]),U=p(()=>{if(!r)return B;let e=B.filter(e=>e!==`meridiem`);return e.reverse(),B.includes(`meridiem`)&&e.push(`meridiem`),e},[r,B]),fe=p(()=>B.reduce((e,t)=>x({},e,{[t]:de(t)}),{}),[B,de]),{ownerState:pe}=su(),W=Xd(M);return Y(Zd,x({ref:t,className:V(W.root,A),ownerState:pe,role:`group`},te,{children:U.map(e=>Y(Kd,{items:fe[e].items,onChange:fe[e].onChange,active:oe===e,autoFocus:s||ce===e,disabled:N,readOnly:ee,slots:c,slotProps:l,skipDisabled:P,"aria-label":z.selectViewText(e)},e))}))});function $d(e){return Ve(`MuiPickerDay`,e)}var ef=Ne(`MuiPickerDay`,[`root`,`dayOutsideMonth`,`today`,`selected`,`disabled`,`fillerCell`]);g();function tf(e){let{disabled:t,selected:n,today:r,outsideCurrentMonth:i,day:a,disableHighlightToday:o,showDaysOutsideCurrentMonth:s}=e,c=kc(),{ownerState:l}=su();return p(()=>x({},l,{day:a,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:i??!1,isDayStartOfWeek:c.isSameDay(a,c.startOfWeek(a)),isDayEndOfWeek:c.isSameDay(a,c.endOfWeek(a)),disableHighlightToday:o??!1,showDaysOutsideCurrentMonth:s??!1}),[c,l,a,n,t,r,i,o,s])}g();var nf=[`autoFocus`,`className`,`classes`,`hidden`,`isAnimating`,`onClick`,`onDaySelect`,`onFocus`,`onBlur`,`onKeyDown`,`onMouseDown`,`onMouseEnter`,`children`,`isFirstVisibleCell`,`isLastVisibleCell`,`day`,`selected`,`disabled`,`today`,`outsideCurrentMonth`,`disableHighlightToday`,`showDaysOutsideCurrentMonth`,`isVisuallySelected`,`isDayFillerCell`],rf=(e,t)=>{let{isDaySelected:n,disableHighlightToday:r,isDayCurrent:i,isDayDisabled:a,isDayOutsideMonth:o,isDayFillerCell:s}=e;return Le({root:[`root`,n&&!s&&`selected`,a&&`disabled`,!r&&i&&!n&&!s&&`today`,o&&`dayOutsideMonth`,s&&`fillerCell`]},$d,t)},af=J(Bt,{name:`MuiPickerDay`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&t.dayOutsideMonth,n.isDayFillerCell&&t.fillerCell]}})(({theme:e})=>x({"--PickerDay-horizontalMargin":`2px`,"--PickerDay-size":`36px`},e.typography.caption,{lineHeight:1,display:`flex`,width:`var(--PickerDay-size)`,height:`var(--PickerDay-size)`,borderRadius:`calc(var(--PickerDay-size) / 2)`,padding:0,backgroundColor:`transparent`,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)},marginLeft:`var(--PickerDay-horizontalMargin)`,marginRight:`var(--PickerDay-horizontalMargin)`,variants:[{props:{isDaySelected:!0},style:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:focus, &:hover":{willChange:`background-color`,backgroundColor:(e.vars||e).palette.primary.dark},[`&.${ef.disabled}`]:{opacity:.6}}},{props:{isDayDisabled:!0},style:{color:(e.vars||e).palette.text.disabled}},{props:{isDayFillerCell:!0},style:{opacity:0,pointerEvents:`none`}},{props:{isDayOutsideMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{isDayCurrent:!0,isDaySelected:!1},style:{outline:`1px solid ${(e.vars||e).palette.text.secondary}`,outlineOffset:-1}}]})),of=()=>{},sf=h(o(function(e,t){let n=Mt({props:e,name:`MuiPickerDay`}),r=kc(),{autoFocus:i=!1,className:a,classes:o,isAnimating:s,onClick:c,onDaySelect:u,onFocus:d=of,onBlur:f=of,onKeyDown:p=of,onMouseDown:m=of,onMouseEnter:h=of,children:g,day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w,isDayFillerCell:T}=n,E=Z(n,nf),D=tf({day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w}),O=x({},D,{isDayFillerCell:T??(S&&!w)}),k=rf(O,o),A=l(null),j=oe(A,t);return un(()=>{i&&!y&&!s&&!S&&A.current.focus()},[i,y,s,S]),O.isDayFillerCell?Y(af,{ref:j,role:E.role,ownerState:O,className:V(k.root,a),as:`div`}):Y(af,x({ref:j,centerRipple:!0,disabled:y,tabIndex:v?0:-1,onKeyDown:e=>p(e,_),onFocus:e=>d(e,_),onBlur:e=>f(e,_),onMouseEnter:e=>h(e,_),onClick:e=>{e.defaultMuiPrevented=!0,y||u(_),S&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{m(e),S&&e.preventDefault()}},E,{ownerState:O,className:V(k.root,a),children:g??r.format(_,`dayOfMonth`)}))})),cf=e=>e.saveQuery!=null,lf=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:i,setTempAndroidValueStr:a,updateSectionValue:o}})=>{let s=kc(),c=({keyPressed:e,sectionIndex:t},r,a)=>{let o=e.toLowerCase(),s=n.sections[t];if(n.characterQuery!=null&&(!a||a(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){let e=`${n.characterQuery.value}${o}`,a=r(e,s);if(!cf(a))return i({sectionIndex:t,value:e,sectionType:s.type}),a}let c=r(o,s);return cf(c)&&!c.saveQuery?(i(null),null):(i({sectionIndex:t,value:o,sectionType:s.type}),cf(c)?null:c)},l=e=>{let t=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return r.length===0?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:r.length===1}},n=(e,n,i,a)=>{let o=e=>ul(s,r,n.type,e);if(n.contentType===`letter`)return t(n.format,o(n.format),e);if(i&&a!=null&&cl(s,i).contentType===`letter`){let n=o(i),r=t(i,n,e);return cf(r)?{saveQuery:!1}:x({},r,{sectionValue:a(r.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case`month`:return n(e,t,s.formats.month,e=>bl(s,e,s.formats.month,t.format));case`weekDay`:return n(e,t,s.formats.weekday,(e,t)=>t.indexOf(e).toString());case`meridiem`:return n(e,t);default:return{saveQuery:!1}}})},u=n=>{let r=({queryValue:n,skipIfBelowMinimum:r,section:i})=>{let a=ml(n,e),o=Number(a),c=t[i.type]({currentDate:null,format:i.format,contentType:i.contentType});if(o>c.maximum)return{saveQuery:!1};if(r&&o<c.minimum)return{saveQuery:!0};let l=o*10>c.maximum||a.length===c.maximum.toString().length;return{sectionValue:vl(s,o,c,e,i),shouldGoToNextSection:l}};return c(n,(e,t)=>{if(t.contentType===`digit`||t.contentType===`digit-with-letter`)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if(t.type===`month`){let n=Sl(s,`digit`,`month`,`MM`),i=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:`MM`,hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:`digit`,maxLength:2}});if(cf(i))return i;let a=bl(s,i.sectionValue,`MM`,t.format);return x({},i,{sectionValue:a})}if(t.type===`weekDay`){let n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});if(cf(n))return n;let i=ll(s,t.format)[Number(n.sectionValue)-1];return x({},n,{sectionValue:i})}return{saveQuery:!1}},t=>gl(t,e))};return G(t=>{let r=n.sections[t.sectionIndex],i=gl(t.keyPressed,e)?u(x({},t,{keyPressed:hl(t.keyPressed,e)})):l(t);if(i==null){a(null);return}o({section:r,newSectionValue:i.sectionValue,shouldGoToNextSection:i.shouldGoToNextSection})})},uf=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;let{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:o,disablePast:s,disableFuture:c,minDate:l,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return`invalidDate`;case!!(i&&i(t)):return`shouldDisableDate`;case!!(a&&a(t)):return`shouldDisableMonth`;case!!(o&&o(t)):return`shouldDisableYear`;case!!(c&&r.isAfterDay(t,d)):return`disableFuture`;case!!(s&&r.isBeforeDay(t,d)):return`disablePast`;case!!(l&&r.isBeforeDay(t,l)):return`minDate`;case!!(u&&r.isAfterDay(t,u)):return`maxDate`;default:return null}};uf.valueManager=pd;var df=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;let{minTime:i,maxTime:a,minutesStep:o,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:l,disableFuture:u}=r,d=e.date(void 0,n),f=ol(c,e);switch(!0){case!e.isValid(t):return`invalidDate`;case!!(i&&f(i,t)):return`minTime`;case!!(a&&f(t,a)):return`maxTime`;case!!(u&&e.isAfter(t,d)):return`disableFuture`;case!!(l&&e.isBefore(t,d)):return`disablePast`;case!!(s&&s(t,`hours`)):return`shouldDisableTime-hours`;case!!(s&&s(t,`minutes`)):return`shouldDisableTime-minutes`;case!!(s&&s(t,`seconds`)):return`shouldDisableTime-seconds`;case!!(o&&e.getMinutes(t)%o!==0):return`minutesStep`;default:return null}};df.valueManager=pd;var ff=({adapter:e,value:t,timezone:n,props:r})=>{let i=uf({adapter:e,value:t,timezone:n,props:r});return i===null?df({adapter:e,value:t,timezone:n,props:r}):i};ff.valueManager=pd,g();function pf(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,s=kc(),c=l(n.valueManager.defaultErrorState),u=n({adapter:s,value:r,timezone:i,props:t}),d=n.valueManager.hasError(u);return a(()=>{o&&!n.valueManager.isSameError(u,c.current)&&o(u,r),c.current=u},[n,o,u,r]),{validationError:u,hasValidationError:d,getValidationErrorForNewValue:G(e=>n({adapter:s,value:e,timezone:i,props:t}))}}g();var mf=5e3,hf=e=>{var t;let n=kc(),r=Ac(),i=j(),{manager:{validator:o,valueType:s,internal_valueManager:c,internal_fieldValueManager:d},internalPropsWithDefaults:m,internalPropsWithDefaults:{value:h,defaultValue:g,referenceDate:_,onChange:v,format:y,formatDensity:b=`dense`,selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:w=!1,timezone:T},forwardedProps:{error:E}}=e,{value:D,handleValueChange:O,timezone:k}=sd({name:`a field component`,timezone:T,value:h,defaultValue:g,referenceDate:_,onChange:v,valueManager:c}),A=l(D);a(()=>{A.current=D},[D]);let{hasValidationError:M}=pf({props:m,validator:o,timezone:k,value:D,onError:m.onError}),N=p(()=>pl(n),[n]),ee=p(()=>Tl(n,N,k),[n,N,k]),P=f(e=>d.getSectionsFromValue(e,e=>Ll({adapter:n,localeText:r,localizedDigits:N,format:y,date:e,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i})),[d,y,r,N,i,w,n,b]),[F,te]=u(()=>{let e=P(D),t={sections:e,lastExternalValue:D,lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},tempValueStrAndroid:null,characterQuery:null},r=ld(e),a=c.getInitialReferenceValue({referenceDate:_,value:D,adapter:n,props:m,granularity:r,timezone:k});return x({},t,{referenceValue:a})}),[I,L]=Zt({controlled:S,default:null,name:`useField`,state:`selectedSections`}),R=e=>{L(e),C==null||C(e)},z=p(()=>Al(I,F.sections),[I,F.sections]),ne=z===`all`?0:z,re=p(()=>kl(F.sections),[F.sections]),ie=p(()=>F.sections.every(e=>e.value===``),[F.sections]),ae=p(()=>{if(ne!=null)return!1;let e=F.sections.filter(e=>e.value!==``);return e.length>0&&F.sections.length-e.length>0},[F.sections,ne]),B=p(()=>E===void 0?M||ae:E,[M,ae,E]),oe=e=>{let t={validationError:o({adapter:n,value:e,timezone:k,props:m})};O(e,t)},se=(e,t)=>{let n=[...F.sections];return n[e]=x({},n[e],{value:t,modified:!0}),n},ce=l(null),le=qt(),V=e=>{ne!=null&&(ce.current={sectionIndex:ne,value:e},le.start(0,()=>{ce.current=null}))},H=()=>{c.areValuesEqual(n,D,c.emptyValue)?te(e=>x({},e,{sections:e.sections.map(e=>x({},e,{value:``})),tempValueStrAndroid:null,characterQuery:null})):(te(e=>x({},e,{characterQuery:null})),oe(c.emptyValue))},ue=()=>{if(ne==null)return;let e=F.sections[ne];e.value!==``&&(V(``),d.getDateFromSection(D,e)===null?te(e=>x({},e,{sections:se(ne,``),tempValueStrAndroid:null,characterQuery:null})):(te(e=>x({},e,{characterQuery:null})),oe(d.updateDateInValue(D,e,null))))},de=e=>{let t=d.parseValueStr(e,F.referenceValue,(e,t)=>{let a=n.parse(e,y);if(!n.isValid(a))return null;let o=Ll({adapter:n,localeText:r,localizedDigits:N,format:y,date:a,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i});return Ol(n,a,o,t,!1)});oe(t)},U=qt(),fe=({section:e,newSectionValue:t,shouldGoToNextSection:r})=>{le.clear(),U.clear();let i=d.getDateFromSection(D,e);r&&ne<F.sections.length-1&&R(ne+1);let a=se(ne,t),o=d.getDateSectionsFromValue(a,e),s=Cl(n,o,N);if(n.isValid(s)){let t=Ol(n,s,o,d.getDateFromSection(F.referenceValue,e),!0);return i??U.start(0,()=>{A.current===D&&te(t=>x({},t,{sections:d.clearDateSections(F.sections,e),tempValueStrAndroid:null}))}),oe(d.updateDateInValue(D,e,t))}return o.every(e=>e.value!==``)&&(i==null||n.isValid(i))?(V(t),oe(d.updateDateInValue(D,e,s))):(i!=null&&(V(t),oe(d.updateDateInValue(D,e,s))),te(e=>x({},e,{sections:a,tempValueStrAndroid:null})))},pe=e=>te(t=>x({},t,{tempValueStrAndroid:e})),W=G(e=>{te(t=>x({},t,{characterQuery:e}))});if(D!==F.lastExternalValue){let e=ce.current!=null&&!n.isValid(d.getDateFromSection(D,F.sections[ce.current.sectionIndex])),t;t=e?se(ce.current.sectionIndex,ce.current.value):P(D),te(r=>x({},r,{lastExternalValue:D,sections:t,sectionsDependencies:{format:y,isRtl:i,locale:n.locale},referenceValue:e?r.referenceValue:d.updateReferenceValue(n,D,r.referenceValue),tempValueStrAndroid:null}))}if(i!==F.lastSectionsDependencies.isRtl||y!==F.lastSectionsDependencies.format||n.locale!==F.lastSectionsDependencies.locale){let e=P(D);te(t=>x({},t,{lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}F.characterQuery!=null&&!B&&ne==null&&W(null),F.characterQuery!=null&&((t=F.sections[F.characterQuery.sectionIndex])==null?void 0:t.type)!==F.characterQuery.sectionType&&W(null),a(()=>{ce.current!=null&&(ce.current=null)});let me=qt();return a(()=>(F.characterQuery!=null&&me.start(mf,()=>W(null)),()=>{}),[F.characterQuery,W,me]),a(()=>{F.tempValueStrAndroid!=null&&ne!=null&&ue()},[F.sections]),{activeSectionIndex:ne,areAllSectionsEmpty:ie,error:B,localizedDigits:N,parsedSelectedSections:z,sectionOrder:re,sectionsValueBoundaries:ee,state:F,timezone:k,value:D,clearValue:H,clearActiveSection:ue,setCharacterQuery:W,setSelectedSections:R,setTempAndroidValueStr:pe,updateSectionValue:fe,updateValueFromValueStr:de,getSectionsFromValue:P}};g();function gf(e){let{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,i=Bl(),a=Gl(),o=oe(n.fieldRef,r?null:a==null?void 0:a.internalFieldRef,r?null:a==null?void 0:a.fieldRef),s=i==null?void 0:i.setValue,c=f((e,t)=>s==null?void 0:s(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(p(()=>a!=null&&i!=null?x({value:i.value,onChange:c,timezone:i.timezone,disabled:i.disabled,readOnly:i.readOnly,autoFocus:i.autoFocus&&!i.open,focused:i.open?!0:void 0,format:i.fieldFormat,formatDensity:a.formatDensity,selectedSections:a.selectedSections,onSelectedSectionsChange:a.onSelectedSectionsChange,fieldRef:o},n):n,[i,a,n,c,o]))}function _f(e){let{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:i}}=e;if(!n.isReady())return;let a=ir(n.getRoot()).getSelection();if(!a)return;if(r==null){a.rangeCount>0&&a.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(a.getRangeAt(0).startContainer)&&a.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Dd(n.getRoot())))return;let o=new window.Range,s;s=r===`all`?n.getRoot():i.sections[r].type===`empty`?n.getSectionContainer(r):n.getSectionContent(r),o.selectNodeContents(s),s.focus(),a.removeAllRanges(),a.addRange(o)}function vf(e){let{manager:{internal_fieldValueManager:t},focused:n,setFocused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,sectionOrder:u,state:d,value:f,activeSectionIndex:p,localizedDigits:m,timezone:h,clearValue:g,clearActiveSection:_,setCharacterQuery:v,setSelectedSections:y,updateValueFromValueStr:b,updateSectionValue:x},internalPropsWithDefaults:{disabled:S=!1,readOnly:C=!1,minutesStep:w}}=e,T=kc(),E=G(e=>{var n;if(!S)switch(!0){case(e.ctrlKey||e.metaKey)&&(((n=e.key)==null?void 0:n.toUpperCase())===`A`||String.fromCharCode(e.keyCode)===`A`)&&!e.shiftKey&&!e.altKey:e.preventDefault(),y(`all`);break;case e.key===`ArrowRight`:if(e.preventDefault(),c==null)y(u.startIndex);else if(c===`all`)y(u.endIndex);else{let e=u.neighbors[c].rightIndex;e!==null&&y(e)}break;case e.key===`ArrowLeft`:if(e.preventDefault(),c==null)y(u.endIndex);else if(c===`all`)y(u.startIndex);else{let e=u.neighbors[c].leftIndex;e!==null&&y(e)}break;case e.key===`Delete`:if(e.preventDefault(),C)break;c==null||c===`all`?g():_();break;case[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key):{if(e.preventDefault(),C||p==null)break;c===`all`&&y(p);let n=d.sections[p],r=xf(T,h,n,e.key,l,m,t.getDateFromSection(f,n),{minutesStep:w});x({section:n,newSectionValue:r,shouldGoToNextSection:!1});break}}}),D=qt(),O=G(()=>{if(!(S||!i.isReady())){if(c===`all`){r(!0),D.start(0,()=>{let e=document.getSelection();if(!e||e.rangeCount===0){y(u.startIndex);return}let t=e.getRangeAt(0).startOffset;if(t===0){y(u.startIndex);return}let n=0,r=0;for(;r<t&&n<d.sections.length;){let e=d.sections[n];n+=1,r+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}y(n-1)});return}n||(r(!0),c??y(u.startIndex))}}),k=G(e=>{if(S||!i.isReady()||c===`all`||e.button!==0)return;let t=e.target,n=i.getRoot();if(!n.contains(t))return;let a=t.closest(`[data-sectionindex]`),o=a?Number(a.dataset.sectionindex):yf(n,e.clientX);o==null||!Number.isInteger(o)||(e.preventDefault(),r(!0),y(o))}),A=G(e=>{if(!i.isReady()||c!==`all`)return;let t=e.target.textContent??``;i.getRoot().innerHTML=d.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),_f({focused:n,domGetters:i,stateResponse:a}),t.length===0||t.charCodeAt(0)===10?(g(),y(`all`)):t.length>1?b(t):(c===`all`&&y(0),o({keyPressed:t,sectionIndex:0}))}),j=G(e=>{if(C||c!==`all`){e.preventDefault();return}let t=e.clipboardData.getData(`text`);e.preventDefault(),v(null),b(t)}),M=G(()=>{if(n||S||!i.isReady())return;let e=Dd(i.getRoot());r(!0),i.getSectionIndexFromDOMElement(e)??y(u.startIndex)});return{onKeyDown:E,onBlur:G(()=>{setTimeout(()=>{if(!i.isReady())return;let e=Dd(i.getRoot());i.getRoot().contains(e)||(r(!1),y(null))})}),onFocus:M,onClick:O,onMouseDown:k,onPaste:j,onInput:A,contentEditable:c===`all`,tabIndex:s.disabled||c===0?-1:0}}function yf(e,t){let n=e.querySelectorAll(`[role="spinbutton"]`);if(n.length===0)return null;let r=0,i=1/0;for(let e=0;e<n.length;e+=1){let a=n[e].getBoundingClientRect(),o=(a.left+a.right)/2,s=Math.abs(t-o);s<i&&(i=s,r=e)}return r}function bf(e){switch(e){case`ArrowUp`:return 1;case`ArrowDown`:return-1;case`PageUp`:return 5;case`PageDown`:return-5;default:return 0}}function xf(e,t,n,r,i,a,o,s){let c=bf(r),l=r===`Home`,u=r===`End`,d=n.value===``||l||u;return n.contentType===`digit`||n.contentType===`digit-with-letter`?(()=>{let r=i[n.type]({currentDate:o,format:n.format,contentType:n.contentType}),f=t=>vl(e,t,r,a,n),p=n.type===`minutes`&&s!=null&&s.minutesStep?s.minutesStep:1,m;if(d){if(n.type===`year`&&!u&&!l)return e.formatByString(e.date(void 0,t),n.format);m=c>0||l?r.minimum:r.maximum}else m=parseInt(ml(n.value,a),10)+c*p;return m%p!==0&&((c<0||l)&&(m+=p-(p+m)%p),(c>0||u)&&(m-=m%p)),m>r.maximum?f(r.minimum+(m-r.maximum-1)%(r.maximum-r.minimum+1)):m<r.minimum?f(r.maximum-(r.minimum-m-1)%(r.maximum-r.minimum+1)):f(m)})():(()=>{let r=ul(e,t,n.type,n.format);return r.length===0?n.value:d?c>0||l?r[0]:r[r.length-1]:r[((r.indexOf(n.value)+c)%r.length+r.length)%r.length]})()}g();function Sf(e){let{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:i}}=e,a=G(e=>{i(e.target.value)});return{value:p(()=>n?``:t.getHiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:a}}g();function Cf(e){let{stateResponse:{parsedSelectedSections:t,setSelectedSections:n},internalPropsWithDefaults:{disabled:r=!1}}=e,i=G(e=>{if(r||e.isDefaultPrevented())return;let i=Number(e.currentTarget.dataset.sectionindex);Number.isInteger(i)&&t!==i&&n(i)});return f(e=>({"data-sectionindex":e,onClick:i}),[i])}g();function wf(e){let t=kc(),n=Ac(),{focused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,state:u,value:d,localizedDigits:p,clearActiveSection:m,setCharacterQuery:h,setSelectedSections:g,updateSectionValue:_,updateValueFromValueStr:v},internalPropsWithDefaults:{disabled:y=!1,readOnly:b=!1}}=e,x=c===`all`,S=!x&&!y&&!b,C=G(e=>{if(!i.isReady())return;let t=u.sections[e];i.getSectionContent(e).innerHTML=t.value||t.placeholder,_f({focused:r,domGetters:i,stateResponse:a})}),w=G(e=>{if(!i.isReady())return;let t=e.target,n=t.textContent??``,r=i.getSectionIndexFromDOMElement(t),a=u.sections[r];if(b){C(r);return}if(n.length===0){if(a.value===``){C(r);return}let t=e.nativeEvent.inputType;if(t===`insertParagraph`||t===`insertLineBreak`){C(r);return}C(r),m();return}o({keyPressed:n,sectionIndex:r}),C(r)}),T=G(e=>{e.preventDefault()}),E=G(e=>{if(e.preventDefault(),b||y||typeof c!=`number`)return;let t=u.sections[c],n=e.clipboardData.getData(`text`),r=/^[a-zA-Z]+$/.test(n),i=/^[0-9]+$/.test(n),a=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);t.contentType===`letter`&&r||t.contentType===`digit`&&i||t.contentType===`digit-with-letter`&&a?(h(null),_({section:t,newSectionValue:n,shouldGoToNextSection:!0})):!r&&!i&&(h(null),v(n))}),D=G(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`none`}),O=f(e=>()=>{y||g(e)},[y,g]);return f((e,r)=>{let i=l[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:w,onPaste:E,onMouseUp:T,onDragOver:D,onFocus:O(r),"aria-readonly":b,"aria-valuenow":Ef(e,t,p),"aria-valuemin":i.minimum,"aria-valuemax":i.maximum,"aria-valuetext":e.value?Tf(e,t,p):n.empty,"aria-label":n[e.type],"aria-disabled":y,tabIndex:!S||x||r>0?-1:0,contentEditable:!x&&!y&&!b,role:`spinbutton`,"data-range-position":e.dateName||void 0,spellCheck:!S&&void 0,autoCapitalize:S?`none`:void 0,autoCorrect:S?`off`:void 0,children:e.value||e.placeholder,inputMode:e.contentType===`letter`?`text`:`numeric`}},[l,x,y,b,S,n,t,p,w,E,T,D,O,s,d])}function Tf(e,t,n){if(e.value)switch(e.type){case`month`:{if(e.contentType===`digit`){let r=t.setMonth(t.date(),Number(ml(e.value,n))-1);return t.isValid(r)?t.format(r,`month`):``}let r=t.parse(e.value,e.format);return r&&t.isValid(r)?t.format(r,`month`):void 0}case`day`:if(e.contentType===`digit`){let r=t.setDate(t.startOfYear(t.date()),Number(ml(e.value,n)));return t.isValid(r)?t.format(r,`dayOfMonth`):``}return e.value;case`weekDay`:return;default:return}}function Ef(e,t,n){if(!e.value)return;let r=ml(e.value,n);switch(e.type){case`weekDay`:return e.contentType===`letter`?void 0:Number(r);case`meridiem`:{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?+(t.getHours(n)>=12):void 0}case`day`:return e.contentType===`digit-with-letter`?parseInt(r,10):Number(r);case`month`:{if(e.contentType===`digit`)return Number(r);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType===`letter`?void 0:Number(r)}}g();var Df=e=>{let{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:i,internal_useOpenPickerButtonAriaLabel:o}}=e,{internalProps:s,forwardedProps:c}=Lc(t,i),f=gf({manager:n,internalProps:s,skipContextFieldRefAssignment:r}),{sectionListRef:m,onBlur:h,onClick:g,onMouseDown:_,onFocus:v,onInput:y,onPaste:b,onKeyDown:S,onClear:C,clearable:w}=c,{disabled:T=!1,readOnly:E=!1,autoFocus:D=!1,focused:O,fieldRef:k}=f,A=l(null),j=oe(m,A),M=p(()=>({isReady:()=>A.current!=null,getRoot:()=>A.current.getRoot(),getSectionContainer:e=>A.current.getSectionContainer(e),getSectionContent:e=>A.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>A.current.getSectionIndexFromDOMElement(e)}),[A]),N=hf({manager:n,internalPropsWithDefaults:f,forwardedProps:c}),{areAllSectionsEmpty:ee,error:P,parsedSelectedSections:F,sectionOrder:te,state:I,value:L,clearValue:R,setSelectedSections:z}=N,ne=lf({stateResponse:N}),re=o(L),[ie,ae]=u(!1);function B(e=0){if(T||!A.current||Of(A)!=null)return;let t=Al(e,I.sections);ae(!0),A.current.getSectionContent(t).focus()}let se=vf({manager:n,internalPropsWithDefaults:f,stateResponse:N,applyCharacterEditing:ne,focused:ie,setFocused:ae,domGetters:M}),ce=Sf({manager:n,stateResponse:N}),le=Cf({stateResponse:N,internalPropsWithDefaults:f}),V=wf({manager:n,stateResponse:N,applyCharacterEditing:ne,internalPropsWithDefaults:f,domGetters:M,focused:ie}),H=G(e=>{S==null||S(e),se.onKeyDown(e)}),ue=G(e=>{se.onBlur(e);let t=e.relatedTarget;M.isReady()&&t instanceof Node&&M.getRoot().contains(t)||h==null||h(e)}),de=G(e=>{se.onFocus(e);let t=e.relatedTarget;M.isReady()&&t instanceof Node&&M.getRoot().contains(t)||v==null||v(e)}),U=G(e=>{e.isDefaultPrevented()||(g==null||g(e),se.onClick(e))}),fe=G(e=>{e.isDefaultPrevented()||(_==null||_(e),se.onMouseDown(e))}),pe=G(e=>{b==null||b(e),se.onPaste(e)}),W=G(e=>{y==null||y(e),se.onInput(e)}),me=G((e,...t)=>{e.preventDefault(),C==null||C(e,...t),R(),kf(A)?z(te.startIndex):B(0)}),he=p(()=>I.sections.map((e,t)=>{let n=V(e,t);return{container:le(t),content:n,before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n[`data-range-position`]:void 0}}}),[I.sections,le,V]);return a(()=>{if(A.current==null)throw Error(xc(249));D&&!T&&A.current.getSectionContent(te.startIndex).focus()},[]),un(()=>{if(!(!ie||!A.current)){if(F===`all`)A.current.getRoot().focus();else if(typeof F==`number`){let e=A.current.getSectionContent(F);e&&e.focus()}}},[F,ie]),un(()=>{_f({focused:ie,domGetters:M,stateResponse:N})}),d(k,()=>({getSections:()=>I.sections,getActiveSectionIndex:()=>Of(A),setSelectedSections:e=>{if(T||!A.current)return;let t=Al(e,I.sections);ae((t===`all`?0:t)!==null),z(e)},focusField:B,isFieldFocused:()=>kf(A),clearValue:R})),x({},c,se,{onBlur:ue,onClick:U,onMouseDown:fe,onFocus:de,onInput:W,onPaste:pe,onKeyDown:H,onClear:me},ce,{error:P,clearable:!!(w&&!ee&&!E&&!T),focused:O??ie,sectionListRef:j,elements:he,areAllSectionsEmpty:ee,disabled:T,readOnly:E,autoFocus:D,openPickerAriaLabel:re})};function Of(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!n||!e.current||!e.current.getRoot().contains(n)?null:e.current.getSectionIndexFromDOMElement(n)}function kf(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!!e.current&&e.current.getRoot().contains(n)}g();function Af(){return p(()=>({valueType:`date`,validator:uf,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Mf,internal_useOpenPickerButtonAriaLabel:jf}),[])}function jf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Mf(e){let t=kc(),n=Nf(e);return p(()=>x({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Nf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:Uc(t,e.minDate,n.minDate),maxDate:Uc(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}g();function Pf(e={}){let{ampm:t}=e;return p(()=>({valueType:`time`,validator:df,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:If,internal_useOpenPickerButtonAriaLabel:Ff(t)}),[t])}function Ff(e){return function(t){let n=kc(),r=Ac();return p(()=>{let i=e??n.is12HourCycleInCurrentLocale()?`fullTime12h`:`fullTime24h`,a=n.isValid(t)?n.format(t,i):null;return r.openTimePickerDialogue(a)},[t,r,n])}}function If(e){let t=kc(),n=Lf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function Lf(e){return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}g();function Rf(){return p(()=>({valueType:`date-time`,validator:ff,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Bf,internal_useOpenPickerButtonAriaLabel:zf}),[])}function zf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Bf(e){let t=kc(),n=Vf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function Vf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:Uc(t,e.minDateTime??e.minDate,n.minDate),maxDate:Uc(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}var Hf=e=>Df({manager:Af(),props:e});g();function Uf(e){let{ownerState:t}=su(),n=j();return p(()=>x({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?`rtl`:`ltr`}),[t,e.disabled,e.readOnly,e.required,n])}function Wf(e){return Ve(`MuiPickersTextField`,e)}var Gf=Ne(`MuiPickersTextField`,[`root`,`focused`,`disabled`,`error`,`required`]);function Kf(e){return Ve(`MuiPickersInputBase`,e)}var qf=Ne(`MuiPickersInputBase`,[`root`,`focused`,`disabled`,`readOnly`,`error`,`notchedOutline`,`sectionsContainer`,`sectionContent`,`sectionBefore`,`sectionAfter`,`adornedStart`,`adornedEnd`,`input`,`inputSizeSmall`,`activeBar`]);function Jf(e){return Ve(`MuiPickersSectionList`,e)}var Yf=Ne(`MuiPickersSectionList`,[`root`,`section`,`sectionContent`]);g();var Xf=[`slots`,`slotProps`,`elements`,`sectionListRef`,`classes`],Zf=J(`div`,{name:`MuiPickersSectionList`,slot:`Root`})({direction:`ltr /*! @noflip */`,outline:`none`}),Qf=J(`span`,{name:`MuiPickersSectionList`,slot:`Section`})({}),$f=J(`span`,{name:`MuiPickersSectionList`,slot:`SectionSeparator`})({whiteSpace:`pre`}),ep=J(`span`,{name:`MuiPickersSectionList`,slot:`SectionContent`})({outline:`none`}),tp=e=>Le({root:[`root`],section:[`section`],sectionContent:[`sectionContent`]},Jf,e);function np(e){let{slots:t,slotProps:n,element:r,classes:i}=e,{ownerState:a}=su(),o=(t==null?void 0:t.section)??Qf,s=It({elementType:o,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:i.section,ownerState:a}),c=(t==null?void 0:t.sectionContent)??ep,u=It({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:a}),d=(t==null?void 0:t.sectionSeparator)??$f,f=It({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:x({},a,{separatorPosition:`before`})}),p=It({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:x({},a,{separatorPosition:`after`})}),m=l(null),h=oe(u.ref,m);return P(o,x({},s,{children:[Y(d,x({},f)),Y(c,x({},u,{ref:h,onBlur:e=>{let t=e.relatedTarget,n=e.currentTarget.closest(`.${Yf.root}`);if(n&&t instanceof Node&&n.contains(t)){e.stopPropagation();return}}})),Y(d,x({},p))]}))}var rp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersSectionList`}),{slots:r,slotProps:i,elements:a,sectionListRef:o,classes:s}=n,c=Z(n,Xf),u=tp(s),{ownerState:f}=su(),p=l(null),m=oe(t,p),h=e=>{if(!p.current)throw Error(xc(145,e));return p.current};d(o,()=>({getRoot(){return h(`getRoot`)},getSectionContainer(e){return h(`getSectionContainer`).querySelector(`.${Yf.section}[data-sectionindex="${e}"]`)},getSectionContent(e){return h(`getSectionContent`).querySelector(`.${Yf.section}[data-sectionindex="${e}"] .${Yf.sectionContent}`)},getSectionIndexFromDOMElement(e){let t=h(`getSectionIndexFromDOMElement`);if(e==null||!t.contains(e))return null;let n=null;return e.classList.contains(Yf.section)?n=e:e.classList.contains(Yf.sectionContent)&&(n=e.parentElement),n==null?null:Number(n.dataset.sectionindex)}}));let g=(r==null?void 0:r.root)??Zf,_=It({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return Y(g,x({},_,{children:_.contentEditable?a.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(``):Y(y,{children:a.map((e,t)=>Y(np,{slots:r,slotProps:i,element:e,classes:u},t))})}))});g();var ip=v(null),ap=()=>{let e=b(ip);if(e==null)throw Error(xc(146));return e};g();var op=`elements.areAllSectionsEmpty.defaultValue.label.value.onChange.id.autoFocus.endAdornment.startAdornment.renderSuffix.slots.slotProps.contentEditable.tabIndex.onInput.onPaste.onKeyDown.fullWidth.name.readOnly.inputRef.sectionListRef.onFocus.onBlur.classes.ownerState`.split(`.`),sp=[`ref`];function cp(e,t){return n=>{let r=xn(e,n)??{};return x({},r,{className:V(t,r.className)})}}var lp=e=>Math.round(e*1e5)/1e5,up=J(`div`,{name:`MuiPickersInputBase`,slot:`Root`})(({theme:e})=>x({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:`text`,padding:0,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,boxSizing:`border-box`,letterSpacing:`${lp(.15/16)}em`,[`&.${qf.disabled}`]:{color:(e.vars||e).palette.action.disabled,cursor:`default`},variants:[{props:{isInputInFullWidth:!0},style:{width:`100%`}}]})),dp=J(Zf,{name:`MuiPickersInputBase`,slot:`SectionsContainer`})(({theme:e})=>({padding:`4px 0 5px`,fontFamily:e.typography.fontFamily,fontSize:`inherit`,lineHeight:`1.4375em`,flexGrow:1,outline:`none`,display:`flex`,flexWrap:`nowrap`,overflow:`hidden`,letterSpacing:`inherit`,width:`182px`,variants:[{props:{fieldDirection:`rtl`},style:{justifyContent:`end`}},{props:{inputSize:`small`},style:{paddingTop:1}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode===`light`?.42:.5}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0,hasStartAdornment:!1,inputHasLabel:!0,isLabelShrunk:!1},style:{opacity:0}}]})),fp=J(Qf,{name:`MuiPickersInputBase`,slot:`Section`})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`,letterSpacing:`inherit`,lineHeight:`1.4375em`,display:`inline-block`,whiteSpace:`nowrap`})),pp=J(ep,{name:`MuiPickersInputBase`,slot:`SectionContent`,overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:`1.4375em`,letterSpacing:`inherit`,width:`fit-content`,outline:`none`,"@supports (-webkit-app-region: drag)":{[`.${qf.root}:not(:focus-within) &`]:{WebkitUserModify:`read-only`,userSelect:`none`}}})),mp=J($f,{name:`MuiPickersInputBase`,slot:`Separator`})(()=>({whiteSpace:`pre`,letterSpacing:`inherit`})),hp=J(`input`,{name:`MuiPickersInputBase`,slot:`Input`,overridesResolver:(e,t)=>t.hiddenInput})(x({},pe)),gp=J(`div`,{name:`MuiPickersInputBase`,slot:`ActiveBar`})(({theme:e,ownerState:t})=>({display:`none`,position:`absolute`,height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create([`width`,`left`],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:`block`},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),_p=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:i,hasFieldError:a,inputSize:o,isInputInFullWidth:s,inputColor:c,hasStartAdornment:l,hasEndAdornment:u}=t,d={root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`readOnly`,a&&`error`,s&&`fullWidth`,`color${ge(c)}`,o===`small`&&`inputSizeSmall`,l&&`adornedStart`,u&&`adornedEnd`],notchedOutline:[`notchedOutline`],input:[`input`],sectionsContainer:[`sectionsContainer`],sectionContent:[`sectionContent`],sectionBefore:[`sectionBefore`],sectionAfter:[`sectionAfter`],activeBar:[`activeBar`]};return Le(d,Kf,e)};function vp(e,t,n,r){if(e.content[`data-range-position`]!==void 0){var i;let e=(i=t.current)==null?void 0:i.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}function yp(e,t){var n,r,i;let a=0;if(((n=t.current)==null?void 0:n.getAttribute(`data-active-range-position`))===`end`)for(let n=e.length-1;n>=e.length/2;--n)a+=vp(e[n],t,n,`end`);else for(let n=0;n<e.length/2;n+=1)a+=vp(e[n],t,n,`start`);return{activeBarWidth:a,sectionOffsets:[((r=t.current)==null||(r=r.querySelector(`[data-sectionindex="0"]`))==null?void 0:r.offsetLeft)||0,((i=t.current)==null||(i=i.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:i.offsetLeft)||0]}}var bp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersInputBase`}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:s,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:m,contentEditable:h,tabIndex:g,onInput:_,onPaste:v,onKeyDown:y,name:b,readOnly:S,inputRef:C,sectionListRef:w,onFocus:T,onBlur:E,classes:D,ownerState:O}=n,k=Z(n,op),A=ap(),j=l(null),M=l(null),N=l([]),ee=oe(t,j),F=L();if(!F)throw Error(xc(152));let te=O??A,I=e=>{var t;(t=F.onFocus)==null||t.call(F,e),T==null||T(e)},R=e=>{I(e)},z=e=>{if(y==null||y(e),e.key===`Enter`&&!e.defaultMuiPrevented){var t,n;if((t=j.current)!=null&&t.dataset.multiInput)return;let r=(n=j.current)==null?void 0:n.closest(`form`),i=r==null?void 0:r.querySelector(`[type="submit"]`);if(!r||!i)return;e.preventDefault(),r.requestSubmit(i)}},ne=e=>{var t;(t=F.onBlur)==null||t.call(F,e),E==null||E(e)};a(()=>{F&&F.setAdornedStart(!!d)},[F,d]),a(()=>{F&&(i?F.onEmpty():F.onFilled())},[F,i]);let re=_p(D,te),ie=(p==null?void 0:p.root)||up,ae=It({elementType:ie,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:k,additionalProps:{"aria-invalid":F.error,ref:ee},className:re.root,ownerState:te}),B=(p==null?void 0:p.input)||dp,se=(p==null?void 0:p.htmlInput)||hp,ce=It({elementType:se,externalSlotProps:m==null?void 0:m.htmlInput,ownerState:te}),{ref:le}=ce,V=Z(ce,sp),H=oe(le,C),ue=r.some(e=>e.content[`data-range-position`]!==void 0);return a(()=>{if(!ue||!te.isPickerOpen)return;let{activeBarWidth:e,sectionOffsets:t}=yp(r,j);N.current=[t[0],t[1]],M.current&&(M.current.style.width=`${e}px`)},[r,ue,te.isPickerOpen]),P(ie,x({},ae,{children:[d,Y(rp,{sectionListRef:w,elements:r,contentEditable:h,tabIndex:g,className:re.sectionsContainer,onFocus:I,onBlur:ne,onInput:_,onPaste:v,onKeyDown:z,slots:{root:B,section:fp,sectionContent:pp,sectionSeparator:mp},slotProps:{root:x({},m==null?void 0:m.input,{ownerState:te}),sectionContent:cp(m==null?void 0:m.sectionContent,qf.sectionContent),sectionSeparator:({separatorPosition:e})=>({className:e===`before`?qf.sectionBefore:qf.sectionAfter})}}),u,f?f(x({},F)):null,Y(se,x({name:b,className:re.input,value:o,onChange:s,id:c,"aria-hidden":`true`,tabIndex:-1,readOnly:S,required:F.required,disabled:F.disabled,onFocus:R},V,{ref:H})),ue&&Y(gp,{className:re.activeBar,ref:M,ownerState:{sectionOffsets:N.current}})]}))});function xp(e){return Ve(`MuiPickersOutlinedInput`,e)}var Sp=x({},qf,Ne(`MuiPickersOutlinedInput`,[`root`,`notchedOutline`,`input`]));g();var Cp=[`children`,`className`,`label`,`notched`,`shrink`],wp=J(`fieldset`,{name:`MuiPickersOutlinedInput`,slot:`NotchedOutline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`,borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}}),Tp=J(`span`,{slot:`internal`,shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`})),Ep=J(`legend`,{slot:`internal`,shouldForwardProp:e=>Ae(e)&&e!==`notched`})(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Dp(e){let{className:t,label:n,notched:r}=e,i=Z(e,Cp),a=ap();return Y(wp,x({"aria-hidden":!0,className:t},i,{ownerState:a,children:Y(Ep,{ownerState:a,notched:r,children:n?Y(Tp,{children:n}):Y(Tp,{className:`notranslate`,children:``})})}))}g();var Op=[`label`,`autoFocus`,`ownerState`,`classes`,`notched`,`slots`,`slotProps`],kp=J(up,{name:`MuiPickersOutlinedInput`,slot:`Root`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{padding:`0 14px`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Sp.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Sp.focused} .${Sp.notchedOutline}`]:{borderStyle:`solid`,borderWidth:2},[`&.${Sp.error} .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Sp.disabled}`]:{[`& .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},variants:Object.keys((e.vars??e).palette).filter(t=>{var n;return((n=(e.vars??e).palette[t])==null?void 0:n.main)??!1}).map(t=>({props:{inputColor:t},style:{[`&.${Sp.focused}:not(.${Sp.error}) .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),Ap=J(dp,{name:`MuiPickersOutlinedInput`,slot:`SectionsContainer`})({padding:`16.5px 0`,variants:[{props:{inputSize:`small`},style:{padding:`8.5px 0`}}]}),jp=e=>{let t=Le({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},xp,e);return x({},e,t)},Mp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersOutlinedInput`}),{label:r,classes:i,notched:a,slots:o,slotProps:s}=n,c=Z(n,Op),l=L(),u=jp(i);return Y(bp,x({},c,{slots:x({root:kp,input:Ap},o),slotProps:s,renderSuffix:e=>{let t=a===void 0?!!(e.adornedStart||e.focused||e.filled):a;return Y(Dp,{shrink:t,notched:t,className:u.notchedOutline,label:r!=null&&r!==``&&l!=null&&l.required?P(y,{children:[r,` `,`*`]}):r})},label:r,classes:u,ref:t}))});Mp.muiName=`Input`;function Np(e){return Ve(`MuiPickersFilledInput`,e)}var Pp=x({},qf,Ne(`MuiPickersFilledInput`,[`root`,`underline`,`input`]));g();var Fp=[`label`,`autoFocus`,`disableUnderline`,`hiddenLabel`,`classes`,`slots`,`slotProps`],Ip=J(up,{name:`MuiPickersFilledInput`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Pp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Pp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>{var n;return{props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t])==null?void 0:n.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Pp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Pp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Pp.disabled}, .${Pp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Pp.disabled}:before`]:{borderBottomStyle:`dotted`}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),Lp=J(dp,{name:`MuiPickersFilledInput`,slot:`sectionsContainer`,shouldForwardProp:e=>Ae(e)&&e!==`hiddenLabel`})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:`small`},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:`small`},style:{paddingTop:8,paddingBottom:9}}]}),Rp=(e,t)=>{let{inputHasUnderline:n}=t,r=Le({root:[`root`,n&&`underline`],input:[`input`]},Np,e);return x({},e,r)},zp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersFilledInput`}),{label:r,disableUnderline:i=!1,hiddenLabel:a=!1,classes:o,slots:s,slotProps:c}=n,l=Z(n,Fp),u=ap(),d=x({},u,{inputHasUnderline:!i}),f=Rp(o,d);return Y(bp,x({},l,{slots:x({root:Ip,input:Lp},s),slotProps:x({},c,{root:x({disableUnderline:i},c==null?void 0:c.root),input:x({hiddenLabel:a},c==null?void 0:c.input)}),label:r,classes:f,ref:t,ownerState:d}))});zp.muiName=`Input`;function Bp(e){return Ve(`MuiPickersFilledInput`,e)}var Vp=x({},qf,Ne(`MuiPickersInput`,[`root`,`underline`,`input`]));g();var Hp=[`label`,`autoFocus`,`disableUnderline`,`ownerState`,`classes`,`slots`,`slotProps`],Up=J(up,{name:`MuiPickersInput`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:`red`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Vp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Vp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Vp.disabled}, .${Vp.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Vp.disabled}:before`]:{borderBottomStyle:`dotted`}}}]}}),Wp=(e,t)=>{let{inputHasUnderline:n}=t,r=Le({root:[`root`,!n&&`underline`],input:[`input`]},Bp,e);return x({},e,r)},Gp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersInput`}),{label:r,disableUnderline:i=!1,classes:a,slots:o,slotProps:s}=n,c=Z(n,Hp),l=ap(),u=x({},l,{inputHasUnderline:!i}),d=Wp(a,u);return Y(bp,x({},c,{slots:x({root:Up},o),slotProps:x({},s,{root:x({disableUnderline:i},s==null?void 0:s.root)}),ownerState:u,label:r,classes:d,ref:t}))});Gp.muiName=`Input`,g();var Kp=`onFocus.onBlur.className.classes.color.disabled.error.variant.required.hiddenLabel.inputRef.sectionListRef.elements.areAllSectionsEmpty.onClick.onMouseDown.onKeyDown.onKeyUp.onPaste.onInput.endAdornment.startAdornment.tabIndex.contentEditable.focused.value.onChange.fullWidth.id.name.helperText.label.slots.slotProps.data-active-range-position`.split(`.`),qp={standard:Gp,filled:zp,outlined:Mp},Jp=J(bt,{name:`MuiPickersTextField`,slot:`Root`})({maxWidth:`100%`}),Yp=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:i}=t;return Le({root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`required`]},Wf,e)},Xp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersTextField`}),{onFocus:r,onBlur:i,className:a,classes:o,color:s=`primary`,disabled:c=!1,error:u=!1,variant:d=`outlined`,required:f=!1,hiddenLabel:m=!1,inputRef:h,sectionListRef:g,elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onPaste:w,onInput:T,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,focused:A,value:j,onChange:M,fullWidth:N,id:ee,name:F,helperText:te,label:I,slots:L,slotProps:R,"data-active-range-position":z}=n,ne=Z(n,Kp),re=l(null),ie=oe(t,re),ae=mn(ee),B=te&&ae?`${ae}-helper-text`:void 0,se=I&&ae?`${ae}-label`:void 0,ce=R==null?void 0:R.input,le=R==null?void 0:R.inputLabel,V=Uf({disabled:n.disabled,required:n.required,readOnly:ce==null?void 0:ce.readOnly}),H=p(()=>x({},V,{isFieldValueEmpty:v,isFieldFocused:A??!1,hasFieldError:u??!1,inputSize:n.size??`medium`,inputColor:s??`primary`,isInputInFullWidth:N??!1,hasStartAdornment:!!(D??(ce==null?void 0:ce.startAdornment)),hasEndAdornment:!!(E??(ce==null?void 0:ce.endAdornment)),inputHasLabel:!!I,isLabelShrunk:!!(le!=null&&le.shrink)}),[V,v,A,u,n.size,s,N,D,E,ce==null?void 0:ce.startAdornment,ce==null?void 0:ce.endAdornment,I,le==null?void 0:le.shrink]),ue=Yp(o,H),de=(L==null?void 0:L.input)??qp[d],U=(L==null?void 0:L.root)??Jp,fe=(L==null?void 0:L.inputLabel)??In,pe=(L==null?void 0:L.formHelperText)??mt,W={};d===`outlined`?(le&&le.shrink!==void 0&&(W.notched=le.shrink),W.label=I):d===`filled`&&(W.hiddenLabel=m);let me=It({elementType:U,externalSlotProps:R==null?void 0:R.root,externalForwardedProps:x({},ne,{className:a}),additionalProps:{ref:ie,focused:A,disabled:c,variant:d,error:u,color:s,fullWidth:N,required:f},className:ue.root,ownerState:H});return Y(ip.Provider,{value:H,children:P(U,x({},me,{children:[I!=null&&I!==``&&Y(fe,x({htmlFor:ae,id:se},le,{children:I})),Y(de,x({elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onInput:T,onPaste:w,onFocus:r,onBlur:i,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,value:j,onChange:M,id:ae,fullWidth:N,inputRef:h,sectionListRef:g,label:I,name:F,role:`group`,"aria-labelledby":se,"aria-describedby":B,"aria-live":B?`polite`:void 0,"data-active-range-position":z},W,ce,{slots:x({},ce==null?void 0:ce.slots,(L==null?void 0:L.htmlInput)!==void 0&&{htmlInput:L.htmlInput}),slotProps:x({},ce==null?void 0:ce.slotProps,(R==null?void 0:R.htmlInput)!==void 0&&{htmlInput:R.htmlInput})})),te&&Y(pe,x({id:B},R==null?void 0:R.formHelperText,{children:te}))]}))})});g();var Zp=[`readOnly`,`onClear`,`clearable`,`clearButtonPosition`,`openPickerButtonPosition`,`openPickerAriaLabel`,`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],Qp=[`ownerState`],$p=[`ownerState`],em=[`ownerState`],tm=[`ownerState`],nm=[`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],rm=e=>{var t;let n=e,{readOnly:r,onClear:i,clearable:a,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,InputProps:l,inputProps:u,InputLabelProps:d,FormHelperTextProps:f}=n,p=Z(n,Zp);return{clearable:a,onClear:i,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,textFieldProps:x({},p,{slotProps:x({},p==null?void 0:p.slotProps,{input:x({},p==null||(t=p.slotProps)==null?void 0:t.input,{readOnly:r})})})}},im=v({slots:{},slotProps:{},inputRef:void 0});function am(e){var t;let{fieldResponse:n,defaultOpenPickerIcon:r}=e,i=Ac(),a=Bl(),o=b(im),{textFieldProps:s,onClear:c,clearable:l,openPickerAriaLabel:u,clearButtonPosition:d=`end`,openPickerButtonPosition:f=`end`}=rm(n),p=Uf(s),m=G(e=>{e.preventDefault(),a==null||a.setOpen(!0)}),h=a?a.triggerStatus:`hidden`,g=l?d:null,_=h===`hidden`?null:f,v=o.slots.textField??Xp,y=o.slots.inputAdornment??ye,S=Z(It({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`start`},ownerState:x({},p,{position:`start`})}),Qp),C=Z(It({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`end`},ownerState:x({},p,{position:`end`})}),$p),w=o.slots.openPickerButton??Qn,T=Z(It({elementType:w,externalSlotProps:o.slotProps.openPickerButton,additionalProps:{disabled:h===`disabled`,onClick:m,"aria-label":u,"data-mui-picker-open-button":`true`,edge:s.variant!==`standard`&&_},ownerState:p}),em),E=o.slots.openPickerIcon??r,D=It({elementType:E,externalSlotProps:o.slotProps.openPickerIcon,ownerState:p}),O=o.slots.clearButton??Qn,k=Z(It({elementType:O,externalSlotProps:o.slotProps.clearButton,className:`clearButton`,additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:n.disabled||n.readOnly,edge:s.variant!==`standard`&&g!==_&&g},ownerState:p}),tm),A=o.slots.clearIcon??au,j=It({elementType:A,externalSlotProps:o.slotProps.clearIcon,additionalProps:{fontSize:`small`},ownerState:p});s.ref=oe(s.ref,a==null?void 0:a.rootRef);let M=(t=s.slotProps)==null?void 0:t.input,N={},ee=oe(M==null?void 0:M.ref,a==null?void 0:a.triggerRef);return a&&(N.ref=ee),!(M!=null&&M.startAdornment)&&(g===`start`||_===`start`)&&(N.startAdornment=P(y,x({},S,{children:[_===`start`&&Y(w,x({},T,{children:Y(E,x({},D))})),g===`start`&&Y(O,x({},k,{children:Y(A,x({},j))}))]}))),!(M!=null&&M.endAdornment)&&(g===`end`||_===`end`)&&(N.endAdornment=P(y,x({},C,{children:[g===`end`&&Y(O,x({},k,{children:Y(A,x({},j))})),_===`end`&&Y(w,x({},T,{children:Y(E,x({},D))}))]}))),!N.endAdornment&&!N.startAdornment&&o.slots.inputAdornment&&(N.endAdornment=Y(y,x({},C))),g!=null&&(s.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s.sx)?s.sx:[s.sx]]),s.slotProps=x({},s.slotProps,{input:x({},M,N)}),Y(v,x({},s))}function om(e,t){return e?t?n=>x({},xn(t,n),xn(e,n)):e:t}function sm(e){let{ref:t,externalForwardedProps:n,slotProps:r}=e,i=b(im),a=Bl(),o=Uf(n),s=n??{},{InputProps:c,inputProps:l,InputLabelProps:u,FormHelperTextProps:d}=s,f=Z(s,nm),p=It({elementType:Xp,externalSlotProps:om(i.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:f,additionalProps:{ref:t,sx:a==null?void 0:a.rootSx,label:a==null?void 0:a.label,name:a==null?void 0:a.name,className:a==null?void 0:a.rootClassName,inputRef:i.inputRef},ownerState:o});if(a&&a.keepOpenDuringFieldFocus&&a.triggerStatus===`enabled`&&!a.open&&!a.readOnly&&!a.disabled){let e=p.onFocus,t=p.onMouseDown,n=e=>{var t;let n=e.nativeEvent??e,r=n==null||(t=n.composedPath)==null?void 0:t.call(n);if(Array.isArray(r)){for(let e of r)if(e&&e.getAttribute&&e.getAttribute(`data-mui-picker-open-button`)===`true`)return!0}let i=e.target;return i&&i.closest?!!i.closest(`[data-mui-picker-open-button="true"]`):!1};p.onFocus=t=>{e==null||e(t),!t.isDefaultPrevented()&&!n(t)&&a.setOpen(!0)},p.onMouseDown=e=>{t==null||t(e),!e.isDefaultPrevented()&&!n(e)&&a.setOpen(!0)}}return p}function cm(e){let{slots:t={},slotProps:n={},inputRef:r,children:i}=e,a=p(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return Y(im.Provider,{value:a,children:i})}g();var lm=[`slots`,`slotProps`],um=o(function(e,t){let n=Mt({props:e,name:`MuiDateField`}),{slots:r,slotProps:i}=n,a=Z(n,lm),o=Hf(sm({slotProps:i,ref:t,externalForwardedProps:a}));return Y(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:Y(am,{fieldResponse:o,defaultOpenPickerIcon:tu})})}),dm=e=>Df({manager:Pf(e),props:e});g();var fm=[`slots`,`slotProps`],pm=o(function(e,t){let n=Mt({props:e,name:`MuiTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,fm),o=dm(sm({slotProps:i,ref:t,externalForwardedProps:a}));return Y(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:Y(am,{fieldResponse:o,defaultOpenPickerIcon:nu})})}),mm=e=>Df({manager:Rf(),props:e});g();var hm=[`slots`,`slotProps`],gm=o(function(e,t){let n=Mt({props:e,name:`MuiDateTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,hm),o=mm(sm({slotProps:i,ref:t,externalForwardedProps:a}));return Y(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:Y(am,{fieldResponse:o,defaultOpenPickerIcon:tu})})});g();var _m=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o,timezone:s})=>{let c=kc();return f(l=>uf({adapter:c,value:l,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o}})!==null,[c,e,t,n,r,i,a,o,s])};g();var vm=(e,t)=>(n,r)=>{switch(r.type){case`setVisibleDate`:return x({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case`changeMonthTimezone`:{let e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let i=t.setTimezone(n.currentMonth,e);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),x({},n,{currentMonth:i})}case`finishMonthSwitchingAnimation`:return x({},n,{isMonthSwitchingAnimating:!1});default:throw Error(`missing support`)}},ym=e=>{let{value:t,referenceDate:n,disableFuture:r,disablePast:i,maxDate:o,minDate:s,onMonthChange:u,onYearChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:g,getCurrentMonthFromVisibleDate:_}=e,v=kc(),y=l(vm(!!m,v)).current,b=p(()=>pd.getInitialReferenceValue({value:t,adapter:v,timezone:g,props:e,referenceDate:n,granularity:cd.day}),[n,g]),[x,S]=c(y,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:v.setDate(b,1),slideDirection:`left`}),C=_m({shouldDisableDate:h,minDate:s,maxDate:o,disableFuture:r,disablePast:i,timezone:g});return a(()=>{S({type:`changeMonthTimezone`,newTimezone:v.getTimezone(b)})},[b,v]),{referenceDate:b,calendarState:x,setVisibleDate:G(({target:e,reason:t})=>{if(t===`cell-interaction`&&x.focusedDay!=null&&v.isSameDay(e,x.focusedDay))return;let n=t===`cell-interaction`,a,c;if(t===`cell-interaction`)a=_(e,x.currentMonth),c=e;else if(a=v.isSameMonth(e,x.currentMonth)?x.currentMonth:v.startOfMonth(e),c=e,C(c)){let t=v.startOfMonth(e),n=v.endOfMonth(e);c=Vc({adapter:v,date:c,minDate:v.isBefore(s,t)?t:s,maxDate:v.isAfter(o,n)?n:o,disablePast:i,disableFuture:r,isDateDisabled:C,timezone:g})}let l=!v.isSameMonth(x.currentMonth,a),f=!v.isSameYear(x.currentMonth,a);l&&(u==null||u(a)),f&&(d==null||d(v.startOfYear(a))),S({type:`setVisibleDate`,month:a,direction:v.isAfterDay(a,x.currentMonth)?`left`:`right`,focusedDay:x.focusedDay!=null&&c!=null&&v.isSameDay(c,x.focusedDay)?x.focusedDay:c,skipAnimation:n})}),isDateDisabled:C,onMonthSwitchingAnimationEnd:f(()=>{S({type:`finishMonthSwitchingAnimation`})},[])}};function bm(e,t){return bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bm(e,t)}function xm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bm(e,t)}function Sm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Cm(e,t){e.classList?e.classList.add(t):Sm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function wm(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Tm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=wm(e.className,t):e.setAttribute(`class`,wm(e.className&&e.className.baseVal||``,t))}var Em={disabled:!1},Dm=function(e){return e.scrollTop};g();var Om=`unmounted`,km=`exited`,Am=`entering`,jm=`entered`,Mm=`exiting`,Nm=function(e){xm(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=km,r.appearStatus=Am):o=jm:o=t.unmountOnExit||t.mountOnEnter?Om:km,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:km}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Am):(n===`entering`||n===`entered`)&&(t=Mm)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:W.findDOMNode(this);n&&Dm(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Om})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[W.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Em.disabled){this.safeSetState({status:jm},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Am},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:jm},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:W.findDOMNode(this);if(!t||Em.disabled){this.safeSetState({status:km},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Mm},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:km},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:W.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Z(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return _.createElement(tn.Provider,{value:null},typeof n==`function`?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);Nm.contextType=tn,Nm.propTypes={};function Pm(){}Nm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pm,onEntering:Pm,onEntered:Pm,onExit:Pm,onExiting:Pm,onExited:Pm},Nm.UNMOUNTED=Om,Nm.EXITED=km,Nm.ENTERING=Am,Nm.ENTERED=jm,Nm.EXITING=Mm,g();var Fm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Cm(e,t)})},Im=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Tm(e,t)})},Lm=function(e){xm(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Dm(e),r&&(this.appliedClasses[t][n]=r,Fm(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Im(e,r),i&&Im(e,i),a&&Im(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Z(e,[`classNames`]);return _.createElement(Nm,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_.Component);Lm.defaultProps={classNames:``},Lm.propTypes={};function Rm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}g();function zm(e,t){var n=function(e){return t&&C(e)?t(e):e},r=Object.create(null);return e&&S.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Bm(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Vm(e,t,n){return n[t]==null?e.props[t]:n[t]}function Hm(e,t){return zm(e.children,function(n){return T(n,{onExited:t.bind(null,n),in:!0,appear:Vm(n,`appear`,e),enter:Vm(n,`enter`,e),exit:Vm(n,`exit`,e)})})}function Um(e,t,n){var r=zm(e.children),i=Bm(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(C(o)){var s=a in t,c=a in r,l=t[a],u=C(l)&&!l.props.in;c&&(!s||u)?i[a]=T(o,{onExited:n.bind(null,o),in:!0,exit:Vm(o,`exit`,e),enter:Vm(o,`enter`,e)}):!c&&s&&!u?i[a]=T(o,{in:!1}):c&&s&&C(l)&&(i[a]=T(o,{onExited:n.bind(null,o),in:l.props.in,exit:Vm(o,`exit`,e),enter:Vm(o,`enter`,e)}))}}),i}g();var Wm=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Gm={component:`div`,childFactory:function(e){return e}},Km=function(e){xm(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Rm(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Hm(e,r):Um(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=zm(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Z(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Wm(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?_.createElement(tn.Provider,{value:i},a):_.createElement(tn.Provider,{value:i},_.createElement(t,r,a))},t}(_.Component);Km.propTypes={},Km.defaultProps=Gm;var qm=e=>Ve(`MuiPickersFadeTransitionGroup`,e),Jm=Ne(`MuiPickersFadeTransitionGroup`,[`root`]);g();var Ym=[`children`],Xm=e=>Le({root:[`root`]},qm,e),Zm=J(Km,{name:`MuiPickersFadeTransitionGroup`,slot:`Root`})({display:`block`,position:`relative`});function Qm(e){let t=Mt({props:e,name:`MuiPickersFadeTransitionGroup`}),{className:n,reduceAnimations:r,transKey:i,classes:a}=t,{children:o}=t,s=Z(t,Ym),c=Xm(a),l=Qe();return r?o:Y(Zm,{className:V(c.root,n),ownerState:s,children:Y(Ot,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:o},i)})}var $m=e=>Ve(`MuiPickersSlideTransition`,e),eh=Ne(`MuiPickersSlideTransition`,[`root`,`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`]);g();var th=[`children`,`className`,`reduceAnimations`,`slideDirection`,`transKey`,`classes`],nh=(e,t)=>{let{slideDirection:n}=t,r={root:[`root`],exit:[`slideExit`],enterActive:[`slideEnterActive`],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Le(r,$m,e)},rh=[`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`],ih=J(Km,{name:`MuiPickersSlideTransition`,slot:`Root`,overridesResolver:(e,t)=>rh.reduce((e,n)=>(e.push({[`.${eh[n]}`]:t[n]}),e),[t.root])})(({theme:e})=>{let t=e.transitions.create(`transform`,{duration:e.transitions.duration.complex,easing:`cubic-bezier(0.35, 0.8, 0.4, 1)`});return{display:`block`,position:`relative`,overflowX:`hidden`,"& > *":{position:`absolute`,top:0,right:0,left:0},[`& .${eh[`slideEnter-left`]}`]:{willChange:`transform`,transform:`translate(100%)`,zIndex:1},[`& .${eh[`slideEnter-right`]}`]:{willChange:`transform`,transform:`translate(-100%)`,zIndex:1},[`& .${eh.slideEnterActive}`]:{transform:`translate(0%)`,transition:t},[`& .${eh.slideExit}`]:{transform:`translate(0%)`},[`& .${eh[`slideExitActiveLeft-left`]}`]:{willChange:`transform`,transform:`translate(-100%)`,transition:t,zIndex:0},[`& .${eh[`slideExitActiveLeft-right`]}`]:{willChange:`transform`,transform:`translate(100%)`,transition:t,zIndex:0}}});function ah(e){let t=Mt({props:e,name:`MuiPickersSlideTransition`}),{children:n,className:r,reduceAnimations:i,slideDirection:a,transKey:o,classes:s}=t,c=Z(t,th),{ownerState:l}=su(),u=x({},l,{slideDirection:a}),d=nh(s,u),f=Qe();if(i)return Y(`div`,{className:V(d.root,r),children:n});let p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return Y(ih,{className:V(d.root,r),childFactory:e=>T(e,{classNames:p}),role:`none`,ownerState:u,children:Y(Lm,x({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},c,{children:n}),o)})}var oh=e=>Ve(`MuiDayCalendar`,e),sh=Ne(`MuiDayCalendar`,[`root`,`header`,`weekDayLabel`,`loadingContainer`,`slideTransition`,`monthContainer`,`weekContainer`,`weekNumberLabel`,`weekNumber`]);g();var ch=[`parentProps`,`day`,`focusedDay`,`selectedDays`,`isDateDisabled`,`currentMonthNumber`,`isViewFocused`],lh=[`ownerState`],uh=e=>Le({root:[`root`],header:[`header`],weekDayLabel:[`weekDayLabel`],loadingContainer:[`loadingContainer`],slideTransition:[`slideTransition`],monthContainer:[`monthContainer`],weekContainer:[`weekContainer`],weekNumberLabel:[`weekNumberLabel`],weekNumber:[`weekNumber`]},oh,e),dh=240,fh=J(`div`,{name:`MuiDayCalendar`,slot:`Root`})({}),ph=J(`div`,{name:`MuiDayCalendar`,slot:`Header`})({display:`flex`,justifyContent:`center`,alignItems:`center`}),mh=J(_n,{name:`MuiDayCalendar`,slot:`WeekDayLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.secondary})),hh=J(_n,{name:`MuiDayCalendar`,slot:`WeekNumberLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.disabled})),gh=J(_n,{name:`MuiDayCalendar`,slot:`WeekNumber`})(({theme:e})=>x({},e.typography.caption,{width:36,height:36,padding:0,margin:`0 2px`,color:(e.vars||e).palette.text.disabled,fontSize:`0.75rem`,alignItems:`center`,justifyContent:`center`,display:`inline-flex`})),_h=J(`div`,{name:`MuiDayCalendar`,slot:`LoadingContainer`})({display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:dh}),vh=J(ah,{name:`MuiDayCalendar`,slot:`SlideTransition`})({minHeight:dh}),yh=J(`div`,{name:`MuiDayCalendar`,slot:`MonthContainer`})({overflow:`hidden`}),bh=J(`div`,{name:`MuiDayCalendar`,slot:`WeekContainer`})({margin:`2px 0`,display:`flex`,justifyContent:`center`});function xh(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:o,isViewFocused:s}=e,c=Z(e,ch),{currentMonth:l,disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:m,slots:h,slotProps:g,timezone:_}=t,v=kc(),y=Zl(_),b=r!=null&&v.isSameDay(n,r),S=s&&b,C=i.some(e=>v.isSameDay(e,n)),w=v.isSameDay(n,y),T=p(()=>u||a(n),[u,a,n]),E=p(()=>v.getMonth(n)!==o,[v,n,o]),D=tf({day:n,selected:C,disabled:T,today:w,outsideCurrentMonth:E,disableHighlightToday:d,showDaysOutsideCurrentMonth:m}),O=(h==null?void 0:h.day)??sf,k=Z(It({elementType:O,externalSlotProps:g==null?void 0:g.day,additionalProps:x({disableHighlightToday:d,showDaysOutsideCurrentMonth:m,role:`gridcell`,isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:x({},D,{day:n,isDayDisabled:T,isDaySelected:C})}),lh),A=p(()=>{let e=v.startOfMonth(l);return m?v.isSameDay(n,v.startOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]),j=p(()=>{let e=v.endOfMonth(l);return m?v.isSameDay(n,v.endOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]);return Y(O,x({},k,{day:n,disabled:T,autoFocus:!E&&S,today:w,outsideCurrentMonth:E,isFirstVisibleCell:A,isLastVisibleCell:j,selected:C,tabIndex:b?0:-1,"aria-selected":C,"aria-current":w?`date`:void 0}))}function Sh(e){let t=Mt({props:e,name:`MuiDayCalendar`}),n=kc(),{onFocusedDayChange:r,className:i,classes:a,currentMonth:o,selectedDays:s,focusedDay:c,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:g=()=>Y(`span`,{children:`…`}),slideDirection:_,TransitionProps:v,disablePast:y,disableFuture:b,minDate:S,maxDate:C,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:D=e=>n.format(e,`weekdayShort`).charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:k,gridLabelId:A,displayWeekNumber:M,fixedWeekNumber:N,timezone:ee}=t,F=Zl(ee),te=uh(a),I=j(),L=_m({shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,minDate:S,maxDate:C,disablePast:y,disableFuture:b,timezone:ee}),R=Ac(),z=G(e=>{f||u(e)}),ne=e=>{L(e)||(r(e),k==null||k(!0))},re=G((e,t)=>{switch(e.key){case`ArrowUp`:ne(n.addDays(t,-7)),e.preventDefault();break;case`ArrowDown`:ne(n.addDays(t,7)),e.preventDefault();break;case`ArrowLeft`:{let r=n.addDays(t,I?1:-1),i=n.addMonths(t,I?1:-1),a=Vc({adapter:n,date:r,minDate:I?r:n.startOfMonth(i),maxDate:I?n.endOfMonth(i):r,isDateDisabled:L,timezone:ee});ne(a||r),e.preventDefault();break}case`ArrowRight`:{let r=n.addDays(t,I?-1:1),i=n.addMonths(t,I?-1:1),a=Vc({adapter:n,date:r,minDate:I?n.startOfMonth(i):r,maxDate:I?r:n.endOfMonth(i),isDateDisabled:L,timezone:ee});ne(a||r),e.preventDefault();break}case`Home`:ne(n.startOfWeek(t)),e.preventDefault();break;case`End`:ne(n.endOfWeek(t)),e.preventDefault();break;case`PageUp`:ne(n.addMonths(t,1)),e.preventDefault();break;case`PageDown`:ne(n.addMonths(t,-1)),e.preventDefault();break;case`Enter`:case` `:z(t),e.preventDefault()}}),ie=G((e,t)=>ne(t)),ae=G((e,t)=>{c!=null&&n.isSameDay(c,t)&&(k==null||k(!1))}),B=n.getMonth(o),oe=n.getYear(o),se=p(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),ce=`${oe}-${B}`,le=p(()=>m(),[ce]),H=p(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;N&&e.length<N;){let r=n.getWeekArray(t),i=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(+!!i).forEach(t=>{e.length<N&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,N,n]);return P(fh,{role:`grid`,"aria-labelledby":A,className:te.root,children:[P(ph,{role:`row`,className:te.header,children:[M&&Y(hh,{variant:`caption`,role:`columnheader`,"aria-label":R.calendarWeekNumberHeaderLabel,className:te.weekNumberLabel,children:R.calendarWeekNumberHeaderText}),Zc(n,F).map((e,t)=>Y(mh,{variant:`caption`,role:`columnheader`,"aria-label":n.format(e,`weekday`),className:te.weekDayLabel,children:D(e)},t.toString()))]}),l?Y(_h,{className:te.loadingContainer,children:g()}):Y(vh,x({transKey:ce,onExited:d,reduceAnimations:h,slideDirection:_,className:V(i,te.slideTransition)},v,{nodeRef:le,children:Y(yh,{ref:le,role:`rowgroup`,className:te.monthContainer,children:H.map((e,r)=>P(bh,{role:`row`,className:te.weekContainer,"aria-rowindex":r+1,children:[M&&Y(gh,{className:te.weekNumber,role:`rowheader`,"aria-label":R.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:R.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>Y(xh,{parentProps:t,day:e,selectedDays:se,isViewFocused:O,focusedDay:c,onKeyDown:re,onFocus:ie,onBlur:ae,onDaySelect:z,isDateDisabled:L,currentMonthNumber:B,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Ch(e){return Ve(`MuiMonthCalendar`,e)}var wh=Ne(`MuiMonthCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Th=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Eh=(e,t)=>{let n={button:[`button`,t.isMonthDisabled&&`disabled`,t.isMonthSelected&&`selected`]};return Le(n,Ch,e)},Dh=J(`button`,{name:`MuiMonthCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${wh.disabled}`]:t.disabled},{[`&.${wh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${wh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${wh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Oh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Th),m=l(null),{ownerState:h}=su(),g=x({},h,{isMonthDisabled:r,isMonthSelected:i}),_=Eh(n,g);un(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.monthButton)??Dh,y=It({elementType:v,externalSlotProps:f==null?void 0:f.monthButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return Y(v,x({},y))});g();var kh=[`autoFocus`,`className`,`currentMonth`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`shouldDisableMonth`,`readOnly`,`disableHighlightToday`,`onMonthFocus`,`hasFocus`,`onFocusedViewChange`,`monthsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Ah=e=>Le({root:[`root`]},Ch,e);function jh(e,t){let n=Mt({props:e,name:t}),r=Nf(n);return x({},n,r,{monthsPerRow:n.monthsPerRow??3})}var Mh=(e,t,n,r,i)=>!!(e===t&&r&&i.isSameYear(n,r)),Nh=J(`div`,{name:`MuiMonthCalendar`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`monthsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:16,padding:`8px 0`,width:320,boxSizing:`border-box`,variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),Ph=o(function(e,t){let n=jh(e,`MuiMonthCalendar`),{autoFocus:r,className:i,currentMonth:o,classes:s,value:c,defaultValue:l,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,shouldDisableMonth:b,readOnly:S,onMonthFocus:C,hasFocus:w,onFocusedViewChange:T,monthsPerRow:E,timezone:D,gridLabelId:O,slots:k,slotProps:A}=n,M=Z(n,kh),{value:N,handleValueChange:ee,timezone:P}=sd({name:`MonthCalendar`,timezone:D,value:c,defaultValue:l,referenceDate:d,onChange:y,valueManager:pd}),F=Zl(P),te=j(),I=kc(),{ownerState:L}=su(),R=p(()=>pd.getInitialReferenceValue({value:N,adapter:I,props:n,timezone:P,referenceDate:d,granularity:cd.month}),[]),z=Ah(s),ne=p(()=>I.getMonth(F),[I,F]),re=p(()=>N==null?null:I.getMonth(N),[N,I]),[ie,ae]=u(()=>re||I.getMonth(R)),[B,oe]=Zt({name:`MonthCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),se=G(e=>{oe(e),T&&T(e)}),ce=f(e=>{let t=I.startOfMonth(g&&I.isAfter(F,v)?F:v),n=I.startOfMonth(h&&I.isBefore(F,_)?F:_),r=I.startOfMonth(e);return I.isBefore(r,t)||I.isAfter(r,n)?!0:b?b(r):!1},[h,g,_,v,F,b,I]),le=G((e,t)=>{if(S)return;let n=(N&&o&&!I.isSameYear(N,o)?I.setYear(N,I.getYear(o)):N)??o??R,r=I.setMonth(n,t);ee(r)}),H=G(e=>{ce(I.setMonth(N??o??R,e))||(ae(e),se(!0),C&&C(e))});a(()=>{ae(e=>re!==null&&e!==re?re:e)},[re]);let ue=G((e,t)=>{switch(e.key){case`ArrowUp`:H((12+t-3)%12),e.preventDefault();break;case`ArrowDown`:H((12+t+3)%12),e.preventDefault();break;case`ArrowLeft`:H((12+t+(te?1:-1))%12),e.preventDefault();break;case`ArrowRight`:H((12+t+(te?-1:1))%12),e.preventDefault();break;case`Enter`:case` `:le(e,t),e.preventDefault()}}),de=G((e,t)=>{H(t)}),U=G((e,t)=>{ie===t&&se(!1)});return Y(Nh,x({ref:t,className:V(z.root,i),ownerState:L,role:`radiogroup`,"aria-labelledby":O,monthsPerRow:E},M,{children:Gc(I,o??N??R).map(e=>{let t=I.getMonth(e),n=I.format(e,`monthShort`),r=I.format(e,`month`),i=Mh(t,re,e,N,I),a=m||ce(e);return Y(Oh,{selected:i,value:t,onClick:le,onKeyDown:ue,autoFocus:B&&t===ie,disabled:a,tabIndex:t===ie&&!a?0:-1,onFocus:de,onBlur:U,"aria-current":Mh(t,ne,e,F,I)?`date`:void 0,"aria-label":r,slots:k,slotProps:A,classes:s,children:n},n)})}))});function Fh(e){return Ve(`MuiYearCalendar`,e)}var Ih=Ne(`MuiYearCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Lh=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Rh=(e,t)=>{let n={button:[`button`,t.isYearDisabled&&`disabled`,t.isYearSelected&&`selected`]};return Le(n,Fh,e)},zh=J(`button`,{name:`MuiYearCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Ih.disabled}`]:t.disabled},{[`&.${Ih.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.focusOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Ih.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ih.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Bh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Lh),m=l(null),{ownerState:h}=su(),g=x({},h,{isYearDisabled:r,isYearSelected:i}),_=Rh(n,g);un(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.yearButton)??zh,y=It({elementType:v,externalSlotProps:f==null?void 0:f.yearButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return Y(v,x({},y))});g();var Vh=[`autoFocus`,`className`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`readOnly`,`shouldDisableYear`,`disableHighlightToday`,`onYearFocus`,`hasFocus`,`onFocusedViewChange`,`yearsOrder`,`yearsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Hh=e=>Le({root:[`root`]},Fh,e);function Uh(e,t){let n=Mt({props:e,name:t}),r=Nf(n);return x({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??`asc`})}var Wh=J(`div`,{name:`MuiYearCalendar`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`yearsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:12,padding:`6px 0`,overflowY:`auto`,height:`100%`,width:320,maxHeight:280,boxSizing:`border-box`,position:`relative`,variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:`0 2px`}}]}),Gh=J(`div`,{name:`MuiYearCalendar`,slot:`ButtonFiller`})({height:36,width:72}),Kh=o(function(e,t){let n=Uh(e,`MuiYearCalendar`),{autoFocus:r,className:i,classes:o,value:s,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,readOnly:b,shouldDisableYear:S,onYearFocus:C,hasFocus:w,onFocusedViewChange:T,yearsOrder:E,yearsPerRow:D,timezone:O,gridLabelId:k,slots:A,slotProps:M}=n,N=Z(n,Vh),{value:ee,handleValueChange:F,timezone:te}=sd({name:`YearCalendar`,timezone:O,value:s,defaultValue:c,referenceDate:d,onChange:y,valueManager:pd}),I=Zl(te),L=j(),R=kc(),{ownerState:z}=su(),ne=p(()=>pd.getInitialReferenceValue({value:ee,adapter:R,props:n,timezone:te,referenceDate:d,granularity:cd.year}),[]),re=Hh(o),ie=p(()=>R.getYear(I),[R,I]),ae=p(()=>ee==null?null:R.getYear(ee),[ee,R]),[B,se]=u(()=>ae||R.getYear(ne)),[ce,le]=Zt({name:`YearCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),H=G(e=>{le(e),T&&T(e)}),ue=f(e=>{if(g&&R.isBeforeYear(e,I)||h&&R.isAfterYear(e,I)||v&&R.isBeforeYear(e,v)||_&&R.isAfterYear(e,_))return!0;if(!S)return!1;let t=R.startOfYear(e);return S(t)},[h,g,_,v,I,S,R]),de=G((e,t)=>{if(b)return;let n=R.setYear(ee??ne,t);F(n)}),U=G(e=>{ue(R.setYear(ee??ne,e))||(se(e),H(!0),C==null||C(e))});a(()=>{se(e=>ae!==null&&e!==ae?ae:e)},[ae]);let fe=E===`desc`?D*-1:D*1,pe=L&&E===`asc`||!L&&E===`desc`?-1:1,W=G((e,t)=>{switch(e.key){case`ArrowUp`:U(t-fe),e.preventDefault();break;case`ArrowDown`:U(t+fe),e.preventDefault();break;case`ArrowLeft`:U(t-pe),e.preventDefault();break;case`ArrowRight`:U(t+pe),e.preventDefault();break;case`Enter`:case` `:de(e,t),e.preventDefault()}}),me=G((e,t)=>{U(t)}),he=G((e,t)=>{B===t&&H(!1)}),ge=l(null),_e=oe(t,ge);a(()=>{if(r||ge.current===null)return;let e=ge.current.querySelector(`[tabindex="0"]`);if(!e)return;let t=e.offsetHeight,n=e.offsetTop,i=ge.current.clientHeight,a=ge.current.scrollTop,o=n+t;t>i||n<a||(ge.current.scrollTop=o-i/2-t/2)},[r]);let ve=R.getYearRange([v,_]);E===`desc`&&ve.reverse();let ye=D-ve.length%D;return ye===D&&(ye=0),P(Wh,x({ref:_e,className:V(re.root,i),ownerState:z,role:`radiogroup`,"aria-labelledby":k,yearsPerRow:D},N,{children:[ve.map(e=>{let t=R.getYear(e),n=t===ae,r=m||ue(e);return Y(Bh,{selected:n,value:t,onClick:de,onKeyDown:W,autoFocus:ce&&t===B,disabled:r,tabIndex:t===B&&!r?0:-1,onFocus:me,onBlur:he,"aria-current":ie===t?`date`:void 0,slots:A,slotProps:M,classes:o,children:R.format(e,`year`)},R.format(e,`year`))}),Array.from({length:ye},(e,t)=>Y(Gh,{},t))]}))}),qh=e=>Ve(`MuiPickersCalendarHeader`,e),Jh=Ne(`MuiPickersCalendarHeader`,[`root`,`labelContainer`,`label`,`switchViewButton`,`switchViewIcon`]);g();var Yh=[`slots`,`slotProps`,`currentMonth`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onMonthChange`,`onViewChange`,`view`,`reduceAnimations`,`views`,`labelId`,`className`,`classes`,`timezone`,`format`],Xh=[`ownerState`],Zh=e=>Le({root:[`root`],labelContainer:[`labelContainer`],label:[`label`],switchViewButton:[`switchViewButton`],switchViewIcon:[`switchViewIcon`]},qh,e),Qh=J(`div`,{name:`MuiPickersCalendarHeader`,slot:`Root`})({display:`flex`,alignItems:`center`,marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),$h=J(`div`,{name:`MuiPickersCalendarHeader`,slot:`LabelContainer`})(({theme:e})=>x({display:`flex`,overflow:`hidden`,alignItems:`center`,cursor:`pointer`,marginRight:`auto`},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),eg=J(`div`,{name:`MuiPickersCalendarHeader`,slot:`Label`})({marginRight:6}),tg=J(Qn,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewButton`})({marginRight:`auto`,variants:[{props:{view:`year`},style:{[`.${Jh.switchViewIcon}`]:{transform:`rotate(180deg)`}}}]}),ng=J(Ql,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewIcon`})(({theme:e})=>({willChange:`transform`,transition:e.transitions.create(`transform`),transform:`rotate(0deg)`})),rg=o(function(e,t){let n=Ac(),r=kc(),i=Mt({props:e,name:`MuiPickersCalendarHeader`}),{slots:a,slotProps:o,currentMonth:s,disabled:c,disableFuture:l,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:m,view:h,reduceAnimations:g,views:_,labelId:v,className:y,classes:b,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,w=Z(i,Yh),{ownerState:T}=su(),E=Zh(b),D=(a==null?void 0:a.switchViewButton)??tg,O=It({elementType:D,externalSlotProps:o==null?void 0:o.switchViewButton,additionalProps:{size:`small`,"aria-label":n.calendarViewSwitchingButtonAriaLabel(h)},ownerState:x({},T,{view:h}),className:E.switchViewButton}),k=(a==null?void 0:a.switchViewIcon)??ng,A=Z(It({elementType:k,externalSlotProps:o==null?void 0:o.switchViewIcon,ownerState:T,className:E.switchViewIcon}),Xh),j=()=>p(r.addMonths(s,1)),M=()=>p(r.addMonths(s,-1)),N=yu(s,{disableFuture:l,maxDate:d,timezone:S}),ee=bu(s,{disablePast:u,minDate:f,timezone:S}),F=()=>{if(!(_.length===1||!m||c))if(_.length===2)m(_.find(e=>e!==h)||_[0]);else{let e=+(_.indexOf(h)===0);m(_[e])}};if(_.length===1&&_[0]===`year`)return null;let te=r.formatByString(s,C);return P(Qh,x({},w,{ownerState:T,className:V(E.root,y),ref:t,children:[P($h,{role:`none`,onClick:F,ownerState:T,"aria-live":`polite`,className:E.labelContainer,children:[Y(Qm,{reduceAnimations:g,transKey:te,children:Y(eg,{id:v,ownerState:T,className:E.label,children:te})}),_.length>1&&!c&&Y(D,x({},O,{children:Y(k,x({},A))}))]}),Y(Ot,{in:h===`day`,appear:!g,enter:!g,children:Y(hu,{slots:a,slotProps:o,onGoToPrevious:M,isPreviousDisabled:ee,previousLabel:n.previousMonth,onGoToNext:j,isNextDisabled:N,nextLabel:n.nextMonth})})]}))}),ig=`@media (prefers-reduced-motion: reduce)`,ag=typeof navigator<`u`&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),og=ag&&ag[1]?parseInt(ag[1],10):null,sg=ag&&ag[2]?parseInt(ag[2],10):null,cg=og&&og<10||sg&&sg<13||!1;function lg(e){let t=Te(ig,{defaultMatches:!1});return e??(t||cg)}var ug=e=>Ve(`MuiDateCalendar`,e),dg=Ne(`MuiDateCalendar`,[`root`,`viewTransitionContainer`]);g();var fg=`autoFocus.onViewChange.value.defaultValue.referenceDate.disableFuture.disablePast.onChange.onYearChange.onMonthChange.reduceAnimations.shouldDisableDate.shouldDisableMonth.shouldDisableYear.view.views.openTo.className.classes.disabled.readOnly.minDate.maxDate.disableHighlightToday.focusedView.onFocusedViewChange.showDaysOutsideCurrentMonth.fixedWeekNumber.dayOfWeekFormatter.slots.slotProps.loading.renderLoading.displayWeekNumber.yearsOrder.yearsPerRow.monthsPerRow.timezone`.split(`.`),pg=e=>Le({root:[`root`],viewTransitionContainer:[`viewTransitionContainer`]},ug,e);function mg(e,t){let n=Mt({props:e,name:t}),r=lg(n.reduceAnimations),i=Nf(n);return x({},n,i,{loading:n.loading??!1,openTo:n.openTo??`day`,views:n.views??[`year`,`day`],reduceAnimations:r,renderLoading:n.renderLoading??(()=>Y(`span`,{children:`…`}))})}var hg=J(Su,{name:`MuiDateCalendar`,slot:`Root`})({display:`flex`,flexDirection:`column`,height:336}),gg=J(Qm,{name:`MuiDateCalendar`,slot:`ViewTransitionContainer`})({}),_g=o(function(e,t){let n=kc(),{ownerState:r}=su(),i=mn(),o=mg(e,`MuiDateCalendar`),{autoFocus:s,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:m,disablePast:h,onChange:g,onMonthChange:_,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,view:C,views:w,openTo:T,className:E,classes:D,disabled:O,readOnly:k,minDate:A,maxDate:j,disableHighlightToday:M,focusedView:N,onFocusedViewChange:ee,showDaysOutsideCurrentMonth:F,fixedWeekNumber:te,dayOfWeekFormatter:I,slots:L,slotProps:R,loading:z,renderLoading:ne,displayWeekNumber:re,yearsOrder:ie,yearsPerRow:ae,monthsPerRow:B,timezone:oe}=o,se=Z(o,fg),{value:ce,handleValueChange:le,timezone:H}=sd({name:`DateCalendar`,timezone:oe,value:u,defaultValue:d,referenceDate:f,onChange:g,valueManager:pd}),{view:ue,setView:de,focusedView:U,setFocusedView:fe,goToNextView:pe,setValueAndGoToNextView:W}=vu({view:C,views:w,openTo:T,onChange:le,onViewChange:c,autoFocus:s,focusedView:N,onFocusedViewChange:ee}),{referenceDate:me,calendarState:he,setVisibleDate:ge,isDateDisabled:_e,onMonthSwitchingAnimationEnd:ve}=ym({value:ce,referenceDate:f,reduceAnimations:v,onMonthChange:_,minDate:A,maxDate:j,shouldDisableDate:y,disablePast:h,disableFuture:m,timezone:H,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),ye=O&&ce||A,be=O&&ce||j,xe=`${i}-grid-label`,Se=U!==null,Ce=(L==null?void 0:L.calendarHeader)??rg,we=It({elementType:Ce,externalSlotProps:R==null?void 0:R.calendarHeader,additionalProps:{views:w,view:ue,currentMonth:he.currentMonth,onViewChange:de,onMonthChange:e=>ge({target:e,reason:`header-navigation`}),minDate:ye,maxDate:be,disabled:O,disablePast:h,disableFuture:m,reduceAnimations:v,timezone:H,labelId:xe},ownerState:r}),Te=G(e=>{let t=n.startOfMonth(e),r=n.endOfMonth(e),i=_e(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:_e,timezone:H}):e;i?(W(i,`finish`),ge({target:i,reason:`cell-interaction`})):(pe(),ge({target:t,reason:`cell-interaction`}))}),Ee=G(e=>{let t=n.startOfYear(e),r=n.endOfYear(e),i=_e(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:_e,timezone:H}):e;i?(W(i,`finish`),ge({target:i,reason:`cell-interaction`})):(pe(),ge({target:t,reason:`cell-interaction`}))}),De=G(e=>le(e&&Bc(n,e,ce??me),`finish`,ue));a(()=>{n.isValid(ce)&&ge({target:ce,reason:`controlled-value-change`})},[ce]);let Oe=pg(D),ke={disablePast:h,disableFuture:m,maxDate:j,minDate:A},Ae={disableHighlightToday:M,readOnly:k,disabled:O,timezone:H,gridLabelId:xe,slots:L,slotProps:R},je=l(ue);a(()=>{je.current!==ue&&(U===je.current&&fe(ue,!0),je.current=ue)},[U,fe,ue]);let Me=p(()=>[ce],[ce]);return P(hg,x({ref:t,className:V(Oe.root,E),ownerState:r},se,{children:[Y(Ce,x({},we,{slots:L,slotProps:R})),Y(gg,{reduceAnimations:v,className:Oe.viewTransitionContainer,transKey:ue,ownerState:r,children:P(`div`,{children:[ue===`year`&&Y(Kh,x({},ke,Ae,{value:ce,onChange:Ee,shouldDisableYear:S,hasFocus:Se,onFocusedViewChange:e=>fe(`year`,e),yearsOrder:ie,yearsPerRow:ae,referenceDate:me})),ue===`month`&&Y(Ph,x({},ke,Ae,{currentMonth:he.currentMonth,hasFocus:Se,className:E,value:ce,onChange:Te,shouldDisableMonth:b,onFocusedViewChange:e=>fe(`month`,e),monthsPerRow:B,referenceDate:me})),ue===`day`&&Y(Sh,x({},he,ke,Ae,{onMonthSwitchingAnimationEnd:ve,hasFocus:Se,onFocusedDayChange:e=>ge({target:e,reason:`cell-interaction`}),reduceAnimations:v,selectedDays:Me,onSelectedDaysChange:De,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,onFocusedViewChange:e=>fe(`day`,e),showDaysOutsideCurrentMonth:F,fixedWeekNumber:te,dayOfWeekFormatter:I,displayWeekNumber:re,loading:z,renderLoading:ne}))]})})]}))}),vg=e=>Ve(`MuiDayCalendarSkeleton`,e),yg=Ne(`MuiDayCalendarSkeleton`,[`root`,`week`,`daySkeleton`]);g();var bg=[`className`,`classes`],xg=e=>Le({root:[`root`],week:[`week`],daySkeleton:[`daySkeleton`]},vg,e),Sg=J(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Root`})({alignSelf:`start`}),Cg=J(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Week`})({margin:`2px 0`,display:`flex`,justifyContent:`center`}),wg=J(st,{name:`MuiDayCalendarSkeleton`,slot:`DaySkeleton`})({margin:`0 2px`,'&[data-day-in-month="0"]':{visibility:`hidden`}}),Tg=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function Eg(e){let t=Mt({props:e,name:`MuiDayCalendarSkeleton`}),{className:n,classes:r}=t,i=Z(t,bg),a=xg(r);return Y(Sg,x({className:V(a.root,n),ownerState:t},i,{children:Tg.map((e,t)=>Y(Cg,{className:a.week,children:e.map((e,t)=>Y(wg,{variant:`circular`,width:36,height:36,className:a.daySkeleton,"data-day-in-month":e},t))},t))}))}function Dg(e){return Ve(`MuiPickersToolbar`,e)}var Og=Ne(`MuiPickersToolbar`,[`root`,`title`,`content`]);g();function kg(){let{ownerState:e}=su(),t=j();return p(()=>x({},e,{toolbarDirection:t?`rtl`:`ltr`}),[e,t])}g();var Ag=[`children`,`className`,`classes`,`toolbarTitle`,`hidden`,`titleId`,`classes`,`landscapeDirection`],jg=e=>Le({root:[`root`],title:[`title`],content:[`content`]},Dg,e),Mg=J(`div`,{name:`MuiPickersToolbar`,slot:`Root`})(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`space-between`,padding:e.spacing(2,3),variants:[{props:{pickerOrientation:`landscape`},style:{height:`auto`,maxWidth:160,padding:16,justifyContent:`flex-start`,flexWrap:`wrap`}}]})),Ng=J(`div`,{name:`MuiPickersToolbar`,slot:`Content`,shouldForwardProp:e=>Ae(e)&&e!==`landscapeDirection`})({display:`flex`,flexWrap:`wrap`,width:`100%`,flex:1,justifyContent:`space-between`,alignItems:`center`,flexDirection:`row`,variants:[{props:{pickerOrientation:`landscape`},style:{justifyContent:`flex-start`,alignItems:`flex-start`,flexDirection:`column`}},{props:{pickerOrientation:`landscape`,landscapeDirection:`row`},style:{flexDirection:`row`}}]}),Pg=o(function(e,t){let n=Mt({props:e,name:`MuiPickersToolbar`}),{children:r,className:i,classes:a,toolbarTitle:o,hidden:s,titleId:c,landscapeDirection:l}=n,u=Z(n,Ag),d=kg(),f=jg(a);return s?null:P(Mg,x({ref:t,className:V(f.root,i),ownerState:d},u,{children:[Y(_n,{variant:`overline`,id:c,className:f.title,sx:{color:`text.secondary`},children:o}),Y(Ng,{className:f.content,ownerState:d,landscapeDirection:l,children:r})]}))});function Fg(e){return Ve(`MuiDatePickerToolbar`,e)}var Ig=Ne(`MuiDatePickerToolbar`,[`root`,`title`]);g();var Lg=[`toolbarFormat`,`toolbarPlaceholder`,`className`,`classes`],Rg=e=>Le({root:[`root`],title:[`title`]},Fg,e),zg=J(Pg,{name:`MuiDatePickerToolbar`,slot:`Root`})({}),Bg=J(_n,{name:`MuiDatePickerToolbar`,slot:`Title`})({variants:[{props:{pickerOrientation:`landscape`},style:{margin:`auto 16px auto auto`}}]}),Vg=o(function(e,t){let n=Mt({props:e,name:`MuiDatePickerToolbar`}),{toolbarFormat:r,toolbarPlaceholder:i=`––`,className:a,classes:o}=n,s=Z(n,Lg),c=kc(),{value:l,views:u,orientation:d}=zl(),f=Ac(),m=kg(),h=Rg(o),g=p(()=>{if(!c.isValid(l))return i;let e=Xc(c,{format:r,views:u},!0);return c.formatByString(l,e)},[l,r,i,c,u]);return Y(zg,x({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:V(h.root,a)},s,{children:Y(Bg,{variant:`h4`,align:d===`landscape`?`left`:`center`,ownerState:m,className:h.title,children:g})}))});g();function Hg(e,t){let n=Mt({props:e,name:t}),r=Nf(n),i=p(()=>{var e;return((e=n.localeText)==null?void 0:e.toolbarTitle)==null?n.localeText:x({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return x({},n,r,{localeText:i},zc({views:n.views,openTo:n.openTo,defaultViews:[`year`,`day`],defaultOpenTo:`day`}),{slots:x({toolbar:Vg},n.slots)})}var Ug=e=>e.type===`hidden`;function Wg(e){let{nodeName:t}=e;return!!([`BUTTON`,`DETAILS`,`EMBED`,`IFRAME`,`KEYGEN`,`LABEL`,`SELECT`,`TEXTAREA`].includes(t)||t===`A`&&e.hasAttribute(`href`)||e instanceof HTMLInputElement&&!Ug(e)||[`AUDIO`,`VIDEO`].includes(t)&&e.hasAttribute(`controls`)||[`IMG`,`OBJECT`].includes(t)&&e.hasAttribute(`usemap`)||e.hasAttribute(`tabindex`)&&e.tabIndex>-1)}function Gg(e){return Ve(`MuiPickerPopper`,e)}Ne(`MuiPickerPopper`,[`root`,`paper`]),g();var Kg=[`PaperComponent`,`ownerState`,`children`,`paperSlotProps`,`paperClasses`,`onPaperClick`,`onPaperTouchStart`],qg=e=>Le({root:[`root`],paper:[`paper`]},Gg,e),Jg=J(Wn,{name:`MuiPickerPopper`,slot:`Root`})(({theme:e})=>({zIndex:e.zIndex.modal})),Yg=J(Nn,{name:`MuiPickerPopper`,slot:`Paper`})({outline:0,transformOrigin:`top center`,variants:[{props:({popperPlacement:e})=>new Set([`top`,`top-start`,`top-end`]).has(e),style:{transformOrigin:`bottom center`}}]});function Xg(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Zg(e,t){let n=l(!1),r=l(!1),i=l(null),o=l(!1);a(()=>{if(!e)return;function t(){o.current=!0}return document.addEventListener(`mousedown`,t,!0),document.addEventListener(`touchstart`,t,!0),()=>{document.removeEventListener(`mousedown`,t,!0),document.removeEventListener(`touchstart`,t,!0),o.current=!1}},[e]);let s=G(e=>{if(!o.current){r.current=!1;return}let a=r.current;r.current=!1;let s=ir(i.current);if(!i.current||`clientX`in e&&Xg(e,s))return;if(n.current){n.current=!1;return}let c;c=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),!c&&!a&&t(e)}),c=e=>{e.defaultMuiPrevented||(r.current=!0)};return a(()=>{if(e){let e=ir(i.current),t=()=>{n.current=!0};return e.addEventListener(`touchstart`,s),e.addEventListener(`touchmove`,t),()=>{e.removeEventListener(`touchstart`,s),e.removeEventListener(`touchmove`,t)}}},[e,s]),a(()=>{if(e){let e=ir(i.current);return e.addEventListener(`click`,s),()=>{e.removeEventListener(`click`,s),r.current=!1}}},[e,s]),[i,c,c]}var Qg=o((e,t)=>{let{PaperComponent:n,ownerState:r,children:i,paperSlotProps:a,paperClasses:o,onPaperClick:s,onPaperTouchStart:c}=e,l=Z(e,Kg),u=It({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:o,ownerState:r});return Y(n,x({},l,u,{onClick:e=>{var t;s(e),(t=u.onClick)==null||t.call(u,e)},onTouchStart:e=>{var t;c(e),(t=u.onTouchStart)==null||t.call(u,e)},ownerState:r,children:i}))}),$g=e=>{let t=e instanceof HTMLElement?e:null;return t?Wg(t):!1};function e_(e){let{children:t,placement:n=`bottom-start`,slots:r,slotProps:i,classes:o}=Mt({props:e,name:`MuiPickerPopper`}),{open:s,popupRef:c,reduceAnimations:u,keepOpenDuringFieldFocus:d}=zl(),{ownerState:f,rootRefObject:m}=su(),{dismissViews:h,getCurrentViewMode:g,onPopperExited:_,triggerElement:v,viewContainerRole:y}=su();a(()=>{function e(e){s&&e.key===`Escape`&&h()}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[h,s]);let b=l(null);a(()=>{y!==`tooltip`&&g()!==`field`&&(s?b.current=Dd(m.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,y,g,m]);let S=qg(o),[C,w,T]=Zg(s,G(e=>{d&&v&&e&&`target`in e&&v.contains(e.target)||(y===`tooltip`?Td(()=>{var e,t;(e=m.current)!=null&&e.contains(Dd(m.current))||(t=c.current)!=null&&t.contains(Dd(c.current))||h()}):(e.composedPath().some($g)&&(b.current=null),h()))})),E=l(null),D=oe(E,c),O=oe(D,C),k=e=>{e.key===`Escape`&&(e.stopPropagation(),h())},A=(r==null?void 0:r.desktopTransition)??u?Ot:_t,j=(r==null?void 0:r.desktopTrapFocus)??Bn,M=(r==null?void 0:r.desktopPaper)??Yg,N=(r==null?void 0:r.popper)??Jg,ee=It({elementType:N,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:y??void 0,open:s,placement:n,anchorEl:v,onKeyDown:k},className:S.root,ownerState:f}),P=p(()=>x({},f,{popperPlacement:ee.placement}),[f,ee.placement]);return Y(N,x({},ee,{children:({TransitionProps:e})=>Y(j,x({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:y===`tooltip`},i==null?void 0:i.desktopTrapFocus,{children:Y(A,x({},e,i==null?void 0:i.desktopTransition,{onExited:t=>{var n,r,a;_==null||_(),i==null||(n=i.desktopTransition)==null||(r=n.onExited)==null||r.call(n,t),e==null||(a=e.onExited)==null||a.call(e)},children:Y(Qg,{PaperComponent:M,ownerState:P,ref:O,onPaperClick:w,onPaperTouchStart:T,paperClasses:S.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:t})}))}))}))}g();function t_(){return typeof window>`u`?`portrait`:window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?`landscape`:`portrait`:window.orientation&&Math.abs(Number(window.orientation))===90?`landscape`:`portrait`}function n_(e,t){let[n,r]=u(t_);return un(()=>{let e=()=>{r(t_())};return window.addEventListener(`orientationchange`,e),()=>{window.removeEventListener(`orientationchange`,e)}},[]),wd(e,[`hours`,`minutes`,`seconds`])?`portrait`:t??n}g();function r_(e){let{props:t,valueManager:n,validator:r}=e,{value:i,defaultValue:o,onChange:s,referenceDate:c,timezone:d,onAccept:f,closeOnSelect:m,open:h,onOpen:g,onClose:_}=t,{current:v}=l(o),{current:y}=l(i!==void 0),{current:b}=l(h!==void 0),S=kc(),{timezone:C,value:w,handleValueChange:T}=sd({name:`a picker component`,timezone:d,value:i,defaultValue:v,referenceDate:c,onChange:s,valueManager:n}),[E,D]=u(()=>({open:!1,lastExternalValue:w,clockShallowValue:void 0,lastCommittedValue:w,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:O}=pf({props:t,validator:r,timezone:C,value:w,onError:t.onError}),k=G(e=>{let t=typeof e==`function`?e(E.open):e;b||D(e=>x({},e,{open:t})),t&&g&&g(),t||_==null||_()}),A=G((e,t)=>{let{changeImportance:r=`accept`,skipPublicationIfPristine:i=!1,validationError:a,shortcut:o,source:s,shouldClose:c=r===`accept`}=t??{},l,u;!i&&!y&&!E.hasBeenModifiedSinceMount?(l=!0,u=r===`accept`):(l=!n.areValuesEqual(S,e,w),u=r===`accept`&&!n.areValuesEqual(S,e,E.lastCommittedValue)),D(t=>x({},t,{clockShallowValue:l?void 0:t.clockShallowValue,lastCommittedValue:u?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let d=null,p=()=>{if(!d){let t;t=s||(o?`view`:`unknown`),d={validationError:a??O(e),source:t},o&&(d.shortcut=o)}return d};l&&T(e,p()),u&&f&&f(e,p()),c&&k(!1)});w!==E.lastExternalValue&&D(e=>x({},e,{lastExternalValue:w,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));let j=G((e,t=`partial`)=>{if(t===`shallow`){D(t=>x({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}));return}A(e,{changeImportance:t===`finish`&&m?`accept`:`set`,source:`view`})});return a(()=>{if(b){if(h===void 0)throw Error(xc(160));D(e=>x({},e,{open:h}))}},[b,h]),{timezone:C,state:E,setValue:A,setValueFromView:j,setOpen:k,value:w,viewValue:p(()=>n.cleanValue(S,E.clockShallowValue===void 0?w:E.clockShallowValue),[S,n,E.clockShallowValue,w])}}g();var i_=[`className`,`sx`],a_=({ref:e,props:t,valueManager:n,valueType:r,variant:i,validator:a,onPopperExited:o,autoFocusView:s,rendererInterceptor:c,localeText:d,viewContainerRole:f,getStepNavigation:m})=>{let{views:h,view:g,openTo:_,onViewChange:v,viewRenderers:y,reduceAnimations:b,orientation:S,disableOpenPicker:C,closeOnSelect:w,disabled:T,readOnly:E,formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,format:A,label:j,autoFocus:M,name:N,keepOpenDuringFieldFocus:ee}=t,{className:P,sx:F}=t,te=Z(t,i_),I=mn(),L=kc(),R=lg(b),z=n_(h,S),{current:ne}=l(_??null),[re,ie]=u(null),ae=l(null),B=l(null),se=l(null),ce=oe(e,se),{timezone:le,state:V,setOpen:H,setValue:ue,setValueFromView:de,value:U,viewValue:fe}=r_({props:t,valueManager:n,validator:a}),{view:pe,setView:W,defaultView:me,focusedView:he,setFocusedView:ge,setValueAndGoToNextView:_e,goToNextStep:ve,hasNextStep:ye,hasSeveralSteps:be}=vu({view:g,views:h,openTo:_,onChange:de,onViewChange:v,autoFocus:s,getStepNavigation:m}),xe=G(()=>{var e;U===null&&(e=B.current)!=null&&e.clearValue&&B.current.clearValue(),ue(n.emptyValue,{source:`view`})}),Se=G(()=>ue(n.getTodayValue(L,le,r),{source:`view`})),Ce=G(()=>ue(U,{source:`view`})),we=G(()=>ue(V.lastCommittedValue,{skipPublicationIfPristine:!0,source:`view`})),Te=G(()=>{ue(U,{skipPublicationIfPristine:!0,source:`view`})}),{hasUIView:Ee,viewModeLookup:De,timeViewsCount:Oe}=p(()=>h.reduce((e,t)=>{let n=y[t]==null?`field`:`UI`;return e.viewModeLookup[t]=n,n===`UI`&&(e.hasUIView=!0,el(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[y,h]),ke=De[pe],Ae=G(()=>ke),[je,Me]=u(ke===`UI`?pe:null);je!==pe&&De[pe]===`UI`&&Me(pe),un(()=>{ke===`field`&&V.open&&(H(!1),setTimeout(()=>{var e,t;B==null||(e=B.current)==null||e.setSelectedSections(pe),B==null||(t=B.current)==null||t.focusField(pe)}))},[pe]),un(()=>{if(!V.open)return;let e=pe;ke===`field`&&je!=null&&(e=je),e!==me&&De[e]===`UI`&&De[me]===`UI`&&(e=me),e!==pe&&W(e),ge(e,!0)},[V.open]);let Ne=p(()=>({isPickerValueEmpty:n.areValuesEqual(L,U,n.emptyValue),isPickerOpen:V.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:z,pickerVariant:i}),[L,n,U,V.open,z,i,t.disabled,t.readOnly]),Pe=p(()=>C||!Ee?`hidden`:T||E?`disabled`:`enabled`,[C,Ee,T,E]),Fe=G(ve),Ie=p(()=>w&&!be?[]:[`cancel`,`nextOrAccept`],[w,be]),Le=p(()=>({setValue:ue,setOpen:H,clearValue:xe,setValueToToday:Se,acceptValueChanges:Ce,cancelValueChanges:we,setView:W,goToNextStep:Fe}),[ue,H,xe,Se,Ce,we,W,Fe]);return{providerProps:{localeText:d,contextValue:p(()=>x({},Le,{value:U,timezone:le,open:V.open,views:h,view:je,initialView:ne,disabled:T??!1,readOnly:E??!1,autoFocus:M??!1,variant:i,orientation:z,popupRef:ae,reduceAnimations:R,triggerRef:ie,triggerStatus:Pe,keepOpenDuringFieldFocus:!!ee,hasNextStep:ye,fieldFormat:A??``,name:N,label:j,rootSx:F,rootRef:ce,rootClassName:P}),[Le,U,ce,i,z,R,T,E,A,P,N,j,F,Pe,ee,ye,le,V.open,je,h,ne,M]),privateContextValue:p(()=>({dismissViews:Te,ownerState:Ne,hasUIView:Ee,getCurrentViewMode:Ae,rootRefObject:se,labelId:I,triggerElement:re,viewContainerRole:f,defaultActionBarActions:Ie,onPopperExited:o}),[Te,Ne,Ee,Ae,I,re,f,Ie,o]),actionsContextValue:Le,fieldPrivateContextValue:p(()=>({formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,internalFieldRef:B}),[D,O,k,B]),isValidContextValue:e=>{let r=a({adapter:L,value:e,timezone:le,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(je==null)return null;let e=y[je];if(e==null)return null;let t=x({},te,{views:h,timezone:le,value:fe,onChange:_e,view:je,onViewChange:W,showViewSwitcher:Oe>1,timeViewsCount:Oe},f===`tooltip`?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:he,onFocusedViewChange:ge});return c?Y(c,{viewRenderers:y,popperView:je,rendererProps:t}):e(t)},ownerState:Ne}};function o_(e){return Ve(`MuiPickersLayout`,e)}var s_=Ne(`MuiPickersLayout`,[`root`,`landscape`,`contentWrapper`,`toolbar`,`actionBar`,`tabs`,`shortcuts`]);g();var c_=[`actions`],l_=J(Ut,{name:`MuiPickersLayout`,slot:`ActionBar`})({});function u_(e){let{actions:t}=e,n=Z(e,c_),r=Ac(),{clearValue:i,setValueToToday:a,acceptValueChanges:o,cancelValueChanges:s,goToNextStep:c,hasNextStep:l}=zl();if(t==null||t.length===0)return null;let u=t==null?void 0:t.map(e=>{switch(e){case`clear`:return Y(on,{onClick:i,children:r.clearButtonLabel},e);case`cancel`:return Y(on,{onClick:s,children:r.cancelButtonLabel},e);case`accept`:return Y(on,{onClick:o,children:r.okButtonLabel},e);case`today`:return Y(on,{onClick:a,children:r.todayButtonLabel},e);case`next`:return Y(on,{onClick:c,children:r.nextStepButtonLabel},e);case`nextOrAccept`:return l?Y(on,{onClick:c,children:r.nextStepButtonLabel},e):Y(on,{onClick:o,children:r.okButtonLabel},e);default:return null}});return Y(l_,x({},n,{children:u}))}var d_=h(u_),f_=[`items`,`changeImportance`],p_=[`getValue`],m_=J(Se,{name:`MuiPickersLayout`,slot:`Shortcuts`})({});function h_(e){let{items:t,changeImportance:n=`accept`}=e,r=Z(e,f_),{setValue:i}=Yl(),a=Ul();if(t==null||t.length===0)return null;let o=t.map(e=>{let{getValue:t}=e,r=Z(e,p_),o=t({isValid:a});return x({},r,{label:r.label,onClick:()=>{i(o,{changeImportance:n,shortcut:r,source:`view`})},disabled:!a(o)})});return Y(m_,x({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:`auto`},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:o.map(e=>Y(de,{children:Y(kn,x({},e))},e.id??e.label))}))}g();var g_=[`ownerState`];function __(e){return e.view!==null}var v_=(e,t)=>{let{pickerOrientation:n}=t;return Le({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`],toolbar:[`toolbar`],actionBar:[`actionBar`],tabs:[`tabs`],landscape:[`landscape`],shortcuts:[`shortcuts`]},o_,e)},y_=e=>{let{ownerState:t,defaultActionBarActions:n}=su(),{view:r}=zl(),i=j(),{children:a,slots:o,slotProps:s,classes:c}=e,l=p(()=>x({},t,{layoutDirection:i?`rtl`:`ltr`,hasShortcuts:!1}),[t,i]),u=v_(c,l),d=(o==null?void 0:o.actionBar)??d_,f=Z(It({elementType:d,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:l}),g_),m=Y(d,x({},f)),h=o==null?void 0:o.toolbar,g=It({elementType:h,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:l}),_=__(g)&&h?Y(h,x({},g)):null,v=a,y=o==null?void 0:o.tabs,b=r&&y?Y(y,x({className:u.tabs},s==null?void 0:s.tabs)):null,S=(o==null?void 0:o.shortcuts)??h_,C=It({elementType:S,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:l}),w=Array.isArray(C==null?void 0:C.items)&&C.items.length>0;return{toolbar:_,content:v,tabs:b,actionBar:m,shortcuts:r&&S?Y(S,x({},C)):null,ownerState:x({},l,{hasShortcuts:w})}};g();var b_=[`sx`,`className`,`classes`,`children`,`slots`,`slotProps`],x_=(e,t)=>{let{pickerOrientation:n}=t;return Le({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`]},o_,e)},S_=J(`div`,{name:`MuiPickersLayout`,slot:`Root`})({display:`grid`,gridAutoColumns:`max-content auto max-content`,gridAutoRows:`max-content auto max-content`,[`& .${s_.actionBar}`]:{gridColumn:`1 / 4`,gridRow:3},variants:[{props:{pickerOrientation:`landscape`,hasShortcuts:!1},style:{[`& .${s_.toolbar}`]:{gridColumn:1,gridRow:`1 / 3`}}},{props:{pickerOrientation:`landscape`,hasShortcuts:!0},style:{[`& .${s_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1,maxWidth:`max-content`},[`& .${s_.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:`portrait`},style:{[`& .${s_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1},[`& .${s_.shortcuts}`]:{gridColumn:1,gridRow:`2 / 3`}}},{props:{hasShortcuts:!0,layoutDirection:`rtl`},style:{[`& .${s_.shortcuts}`]:{gridColumn:4}}}]}),C_=J(`div`,{name:`MuiPickersLayout`,slot:`ContentWrapper`})({gridColumn:`2 / 4`,gridRow:2,display:`flex`,flexDirection:`column`}),w_=o(function(e,t){let n=Mt({props:e,name:`MuiPickersLayout`}),{toolbar:r,content:i,tabs:a,actionBar:o,shortcuts:s,ownerState:c}=y_(n),{orientation:l,variant:u}=zl(),{sx:d,className:f,classes:p}=n,m=Z(n,b_),h=x_(p,c);return P(S_,x({ref:t,sx:d,className:V(h.root,f),ownerState:c},m,{children:[l===`landscape`?s:r,l===`landscape`?r:s,Y(C_,{className:h.contentWrapper,ownerState:c,children:u===`desktop`?P(y,{children:[i,a]}):P(y,{children:[a,i]})}),o]}))});function T_(e){let{steps:t}=e;return _u({steps:t,isViewMatchingStep:(e,t)=>t.views==null||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:i})=>{let a=e.views==null?t:e.views.find(e=>i.includes(e));a!==r&&n(a)}})}var E_=[`props`,`steps`],D_=[`ownerState`],O_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,E_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=T_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=a_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`desktop`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(It({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),D_),v=a.layout??w_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),popper:x({"aria-labelledby":y},o==null?void 0:o.popper)});return{renderPicker:()=>P(Jl,x({},d,{children:[Y(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),Y(e_,{slots:a,slotProps:b,children:Y(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}},k_=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:te})=>Y(_g,{view:e,onViewChange:t,views:n.filter(Yc),focusedView:r&&Yc(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:te});g();var A_=o(function(e,t){var n;let r=kc(),i=Hg(e,`MuiDesktopDatePicker`),a=x({day:k_,month:k_,year:k_},i.viewRenderers),{renderPicker:o}=O_({ref:t,props:x({},i,{closeOnSelect:i.closeOnSelect??!0,viewRenderers:a,format:Xc(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:x({field:um},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},xn((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!0},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var j_=J(Jn,{slot:`internal`})({[`& .${Tn.container}`]:{outline:0},[`& .${Tn.paper}`]:{outline:0,minWidth:320}}),M_=J(D,{slot:`internal`})({"&:first-of-type":{padding:0}});function N_(e){var t,n;let{children:r,slots:i,slotProps:a}=e,{open:o}=zl(),{dismissViews:s,onPopperExited:c}=su(),l=(i==null?void 0:i.dialog)??j_;return Y(l,x({open:o,onClose:()=>{s(),c==null||c()}},a==null?void 0:a.dialog,{PaperComponent:i==null?void 0:i.mobilePaper,slots:x({transition:(i==null?void 0:i.mobileTransition)??Ot},a==null||(t=a.dialog)==null?void 0:t.slots),slotProps:x({transition:a==null?void 0:a.mobileTransition,paper:a==null?void 0:a.mobilePaper},a==null||(n=a.dialog)==null?void 0:n.slotProps),children:Y(M_,{children:r})}))}var P_=[`props`,`steps`],F_=[`ownerState`],I_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,P_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=T_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=a_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`mobile`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(It({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),F_),v=a.layout??w_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),mobilePaper:x({"aria-labelledby":y},o==null?void 0:o.mobilePaper)});return{renderPicker:()=>P(Jl,x({},d,{children:[Y(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),Y(N_,{slots:a,slotProps:b,children:Y(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}};g();var L_=o(function(e,t){var n;let r=kc(),i=Hg(e,`MuiMobileDatePicker`),a=x({day:k_,month:k_,year:k_},i.viewRenderers),{renderPicker:o}=I_({ref:t,props:x({},i,{viewRenderers:a,format:Xc(r,i,!1),slots:x({field:um},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},xn((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var R_=[`desktopModeMediaQuery`],z_=o(function(e,t){let n=Mt({props:e,name:`MuiDatePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,R_);return Te(r,{defaultMatches:!0})?Y(A_,x({ref:t},i)):Y(L_,x({ref:t},i))}),B_=[`props`,`steps`],V_=J(w_,{slot:`internal`})(({theme:e})=>({overflow:`hidden`,minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),H_=e=>{let{props:t,steps:n}=e,r=Z(e,B_),{localeText:i,slots:a,slotProps:o,displayStaticWrapperAs:s,autoFocus:c}=t,l=T_({steps:n}),{providerProps:u,renderCurrentView:d}=a_(x({},r,{props:t,variant:s,autoFocusView:c??!1,viewContainerRole:null,localeText:i,getStepNavigation:l})),f=(a==null?void 0:a.layout)??V_;return{renderPicker:()=>{var e,n;return Y(Jl,x({},u,{children:Y(f,x({},Ad(t),o==null?void 0:o.layout,{slots:a,slotProps:o,sx:jd(u.contextValue.rootSx,o==null||(e=o.layout)==null?void 0:e.sx),className:V(u.contextValue.rootClassName,o==null||(n=o.layout)==null?void 0:n.className),ref:u.contextValue.rootRef,children:d()}))}))}}};g();var U_=o(function(e,t){var n;let r=Hg(e,`MuiStaticDatePicker`),i=r.displayStaticWrapperAs??`mobile`,a=x({day:k_,month:k_,year:k_},r.viewRenderers),{renderPicker:o}=H_({ref:t,props:x({},r,{viewRenderers:a,displayStaticWrapperAs:i,yearsPerRow:r.yearsPerRow??(i===`mobile`?3:4),slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});function W_(e){return Ve(`MuiPickersToolbarText`,e)}var G_=Ne(`MuiPickersToolbarText`,[`root`]);g();var K_=[`className`,`classes`,`selected`,`value`],q_=e=>Le({root:[`root`]},W_,e),J_=J(_n,{name:`MuiPickersToolbarText`,slot:`Root`})(({theme:e})=>({transition:e.transitions.create(`color`),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),Y_=o(function(e,t){let n=Mt({props:e,name:`MuiPickersToolbarText`}),{className:r,classes:i,selected:a,value:o}=n,s=Z(n,K_),c=q_(i);return Y(J_,x({ref:t,className:V(c.root,r),component:`span`,ownerState:n},a&&{"data-selected":!0},s,{children:o}))});g();var X_=[`align`,`className`,`classes`,`selected`,`typographyClassName`,`value`,`variant`,`width`],Z_=e=>Le({root:[`root`]},Dg,e),Q_=J(on,{name:`MuiPickersToolbarButton`,slot:`Root`})({padding:0,minWidth:16,textTransform:`none`}),$_=o(function(e,t){let n=Mt({props:e,name:`MuiPickersToolbarButton`}),{align:r,className:i,classes:a,selected:o,typographyClassName:s,value:c,variant:l,width:u}=n,d=Z(n,X_),f=Z_(a);return Y(Q_,x({variant:`text`,ref:t,className:V(f.root,i),ownerState:n},u?{sx:{width:u}}:{},d,{children:Y(Y_,{align:r,className:s,variant:l,value:c,selected:o})}))});function ev(e){return Ve(`MuiTimePickerToolbar`,e)}var tv=Ne(`MuiTimePickerToolbar`,[`root`,`separator`,`hourMinuteLabel`,`hourMinuteLabelLandscape`,`hourMinuteLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]),nv=[`ampm`,`ampmInClock`,`className`,`classes`],rv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return Le({root:[`root`],separator:[`separator`],hourMinuteLabel:[`hourMinuteLabel`,n===`landscape`&&`hourMinuteLabelLandscape`,r===`rtl`&&`hourMinuteLabelReverse`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},ev,e)},iv=J(Pg,{name:`MuiTimePickerToolbar`,slot:`Root`})({}),av=J(Y_,{name:`MuiTimePickerToolbar`,slot:`Separator`})({outline:0,margin:`0 4px 0 2px`,cursor:`default`}),ov=J(`div`,{name:`MuiTimePickerToolbar`,slot:`HourMinuteLabel`,overridesResolver:(e,t)=>[{[`&.${tv.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${tv.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:`flex`,justifyContent:`flex-end`,alignItems:`flex-end`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{pickerOrientation:`landscape`},style:{marginTop:`auto`}}]}),sv=J(`div`,{name:`MuiTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${tv.ampmLabel}`]:t.ampmLabel},{[`&.${tv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${tv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,flexBasis:`100%`}}]});function cv(e){let t=Mt({props:e,name:`MuiTimePickerToolbar`}),{ampm:n,ampmInClock:r,className:i,classes:a}=t,o=Z(t,nv),s=kc(),c=Ac(),l=kg(),u=rv(a,l),{value:d,setValue:f,disabled:p,readOnly:m,view:h,setView:g,views:_}=zl(),v=!!(n&&!r&&_.includes(`hours`)),{meridiemMode:y,handleMeridiemChange:b}=xu(d,n,e=>f(e,{changeImportance:`set`,source:`view`})),S=e=>s.isValid(d)?s.format(d,e):`--`,C=Y(av,{tabIndex:-1,value:`:`,variant:`h3`,selected:!1,className:u.separator});return P(iv,x({landscapeDirection:`row`,toolbarTitle:c.timePickerToolbarTitle,ownerState:l,className:V(u.root,i)},o,{children:[P(ov,{className:u.hourMinuteLabel,ownerState:l,children:[wd(_,`hours`)&&Y($_,{tabIndex:-1,variant:`h3`,onClick:()=>g(`hours`),selected:h===`hours`,value:S(n?`hours12h`:`hours24h`)}),wd(_,[`hours`,`minutes`])&&C,wd(_,`minutes`)&&Y($_,{tabIndex:-1,variant:`h3`,onClick:()=>g(`minutes`),selected:h===`minutes`,value:S(`minutes`)}),wd(_,[`minutes`,`seconds`])&&C,wd(_,`seconds`)&&Y($_,{variant:`h3`,onClick:()=>g(`seconds`),selected:h===`seconds`,value:S(`seconds`)})]}),v&&P(sv,{className:u.ampmSelection,ownerState:l,children:[Y($_,{disableRipple:!0,variant:`subtitle2`,selected:y===`am`,typographyClassName:u.ampmLabel,value:qc(s,`am`),onClick:m?void 0:()=>b(`am`),disabled:p}),Y($_,{disableRipple:!0,variant:`subtitle2`,selected:y===`pm`,typographyClassName:u.ampmLabel,value:qc(s,`pm`),onClick:m?void 0:()=>b(`pm`),disabled:p})]})]}))}g();function lv(e,t){var n;let r=kc(),i=Mt({props:e,name:t}),a=Lf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{timePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]);return x({},i,a,{ampm:o,localeText:s},zc({views:i.views,openTo:i.openTo,defaultViews:[`hours`,`minutes`],defaultOpenTo:`hours`}),{slots:x({toolbar:cv},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o,ampmInClock:i.ampmInClock},(n=i.slotProps)==null?void 0:n.toolbar)})})}var uv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D})=>Y(xd,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D}),dv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>Y(Ld,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeStep:T==null?void 0:T.minutes,skipDisabled:E,timezone:D}),fv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>Y(Qd,{view:e,onViewChange:t,focusedView:n&&tl(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D}),pv=[`views`,`format`],mv=(e,t,n)=>{let{views:r,format:i}=t,a=Z(t,pv);if(i)return i;let o=[],s=[];if(r.forEach(e=>{el(e)?s.push(e):Yc(e)&&o.push(e)}),s.length===0)return Xc(e,x({views:o},a),!1);if(o.length===0)return sl(e,x({views:s},a));let c=sl(e,x({views:s},a));return`${n?e.formats.keyboardDate:Xc(e,x({views:o},a),!1)} ${c}`},hv=(e,t,n)=>n?t.filter(e=>!tl(e)||e===`hours`):e?[...t,`meridiem`]:t,gv=(e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t;function _v({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){let i=e??24,a=x({hours:1,minutes:5,seconds:5},n),o=gv(a,i);return{thresholdToRenderTimeInASingleColumn:i,timeSteps:a,shouldRenderTimeInASingleColumn:o,views:hv(t,r,o)}}g();var vv=o(function(e,t){var n,r;let i=kc(),a=lv(e,`MuiDesktopTimePicker`),{shouldRenderTimeInASingleColumn:o,views:s,timeSteps:c}=_v(a),l=o?dv:fv,u=x({hours:l,minutes:l,seconds:l,meridiem:l},a.viewRenderers),d=a.ampmInClock??!0,f=((n=u.hours)==null?void 0:n.name)===fv.name?s:s.filter(e=>e!==`meridiem`),{renderPicker:p}=O_({ref:t,props:x({},a,{ampmInClock:d,timeSteps:c,viewRenderers:u,format:sl(i,a),views:o?[`hours`]:f,slots:x({field:pm},a.slots),slotProps:x({},a.slotProps,{field:e=>{var t;return x({},xn((t=a.slotProps)==null?void 0:t.field,e),Fc(a))},toolbar:x({hidden:!0,ampmInClock:d},(r=a.slotProps)==null?void 0:r.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return p()});g();var yv=o(function(e,t){var n;let r=kc(),i=lv(e,`MuiMobileTimePicker`),a=x({hours:uv,minutes:uv,seconds:uv},i.viewRenderers),o=i.ampmInClock??!1,{renderPicker:s}=I_({ref:t,props:x({},i,{ampmInClock:o,viewRenderers:a,format:sl(r,i),slots:x({field:pm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},xn((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1,ampmInClock:o},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});g();var bv=[`desktopModeMediaQuery`],xv=o(function(e,t){let n=Mt({props:e,name:`MuiTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,bv);return Te(r,{defaultMatches:!0})?Y(vv,x({ref:t},i)):Y(yv,x({ref:t},i))});g();var Sv=o(function(e,t){var n;let r=lv(e,`MuiStaticTimePicker`),i=r.displayStaticWrapperAs??`mobile`,a=r.ampmInClock??i===`desktop`,o=x({hours:uv,minutes:uv,seconds:uv},r.viewRenderers),{renderPicker:s}=H_({ref:t,props:x({},r,{viewRenderers:o,displayStaticWrapperAs:i,ampmInClock:a,slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`,ampmInClock:a},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});function Cv(e){return Ve(`MuiDateTimePickerTabs`,e)}var wv=Ne(`MuiDateTimePickerTabs`,[`root`]);g();var Tv=[`dateIcon`,`timeIcon`,`hidden`,`className`,`classes`,`sx`],Ev=e=>Yc(e)?`date`:`time`,Dv=e=>e===`date`?`day`:`hours`,Ov=e=>Le({root:[`root`]},Cv,e),kv=J(qe,{name:`MuiDateTimePickerTabs`,slot:`Root`})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${pr.indicator}`]:{bottom:`auto`,top:0}}})),Av=function(e){let t=Mt({props:e,name:`MuiDateTimePickerTabs`}),{dateIcon:n=Y(ru,{}),timeIcon:r=Y(iu,{}),hidden:i=typeof window>`u`||window.innerHeight<667,className:a,classes:o,sx:s}=t,c=Z(t,Tv),l=Ac(),{ownerState:u}=su(),{view:d,setView:f}=zl(),p=Ov(o);return i?null:P(kv,x({},c,{ownerState:u,variant:`fullWidth`,value:Ev(d),onChange:(e,t)=>{f(Dv(t))},className:V(a,p.root),sx:s,children:[Y(ee,{value:`date`,"aria-label":l.dateTableLabel,icon:Y(y,{children:n})}),Y(ee,{value:`time`,"aria-label":l.timeTableLabel,icon:Y(y,{children:r})})]}))};function jv(e){return Ve(`MuiDateTimePickerToolbar`,e)}var Mv=Ne(`MuiDateTimePickerToolbar`,[`root`,`dateContainer`,`timeContainer`,`timeDigitsContainer`,`separator`,`timeLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]);g();var Nv=[`ampm`,`ampmInClock`,`toolbarFormat`,`toolbarPlaceholder`,`toolbarTitle`,`className`,`classes`],Pv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return Le({root:[`root`],dateContainer:[`dateContainer`],timeContainer:[`timeContainer`,r===`rtl`&&`timeLabelReverse`],timeDigitsContainer:[`timeDigitsContainer`,r===`rtl`&&`timeLabelReverse`],separator:[`separator`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},jv,e)},Fv=J(Pg,{name:`MuiDateTimePickerToolbar`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:`space-around`,position:`relative`,variants:[{props:{toolbarVariant:`desktop`},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Og.content} .${G_.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:`desktop`,pickerOrientation:`landscape`},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{paddingLeft:24,paddingRight:0}}]})),Iv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`DateContainer`})({display:`flex`,flexDirection:`column`,alignItems:`flex-start`}),Lv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeContainer`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})({display:`flex`,flexDirection:`row`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{gap:9,marginRight:4,alignSelf:`flex-end`}},{props:({pickerOrientation:e,toolbarVariant:t})=>e===`landscape`&&t!==`desktop`,style:{flexDirection:`column`}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e===`landscape`&&t!==`desktop`&&n===`rtl`,style:{flexDirection:`column-reverse`}}]}),Rv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeDigitsContainer`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})({display:`flex`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`},style:{gap:1.5}}]}),zv=J(Y_,{name:`MuiDateTimePickerToolbar`,slot:`Separator`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})({margin:`0 4px 0 2px`,cursor:`default`,variants:[{props:{toolbarVariant:`desktop`},style:{margin:0}}]}),Bv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${Mv.ampmLabel}`]:t.ampmLabel},{[`&.${Mv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${Mv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,width:`100%`}}]}),Vv=v(null);function Hv(e){let t=Mt({props:e,name:`MuiDateTimePickerToolbar`}),{ampm:n,ampmInClock:r,toolbarFormat:i,toolbarPlaceholder:a=`––`,toolbarTitle:o,className:s,classes:c}=t,l=Z(t,Nv),{value:u,setValue:d,disabled:f,readOnly:m,variant:h,orientation:g,view:_,setView:v,views:S}=zl(),C=Ac(),w=kg(),T=Pv(c,w),E=kc(),D=b(Vv),O=D?D.value:u,k=D?D.setValue:d,A=D?D.view:_,j=D?D.setView:v,{meridiemMode:M,handleMeridiemChange:N}=xu(O,n,e=>k(e,{changeImportance:`set`,source:`view`})),ee=D!=null&&D.forceDesktopVariant?`desktop`:h,F=ee===`desktop`,te=!!(n&&!r),I=o??C.dateTimePickerToolbarTitle,L=p(()=>E.isValid(O)?i?E.formatByString(O,i):E.format(O,`shortDate`):a,[O,i,a,E]),R=(e,t)=>E.isValid(O)?E.format(O,e):t;return P(Fv,x({className:V(T.root,s),toolbarTitle:I,toolbarVariant:ee},l,{ownerState:w,children:[P(Iv,{className:T.dateContainer,ownerState:w,children:[S.includes(`year`)&&Y($_,{tabIndex:-1,variant:`subtitle1`,onClick:()=>j(`year`),selected:A===`year`,value:R(`year`,`–`)}),S.includes(`day`)&&Y($_,{tabIndex:-1,variant:F?`h5`:`h4`,onClick:()=>j(`day`),selected:A===`day`,value:L})]}),P(Lv,{className:T.timeContainer,ownerState:w,toolbarVariant:ee,children:[P(Rv,{className:T.timeDigitsContainer,ownerState:w,toolbarVariant:ee,children:[S.includes(`hours`)&&P(y,{children:[Y($_,{variant:F?`h5`:`h3`,width:F&&g===`portrait`?48:void 0,onClick:()=>j(`hours`),selected:A===`hours`,value:R(n?`hours12h`:`hours24h`,`--`)}),Y(zv,{variant:F?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),Y($_,{variant:F?`h5`:`h3`,width:F&&g===`portrait`?48:void 0,onClick:()=>j(`minutes`),selected:A===`minutes`||!S.includes(`minutes`)&&A===`hours`,value:R(`minutes`,`--`),disabled:!S.includes(`minutes`)})]}),S.includes(`seconds`)&&P(y,{children:[Y(zv,{variant:F?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),Y($_,{variant:F?`h5`:`h3`,width:F&&g===`portrait`?48:void 0,onClick:()=>j(`seconds`),selected:A===`seconds`,value:R(`seconds`,`--`)})]})]}),te&&!F&&P(Bv,{className:T.ampmSelection,ownerState:w,children:[Y($_,{variant:`subtitle2`,selected:M===`am`,typographyClassName:T.ampmLabel,value:qc(E,`am`),onClick:m?void 0:()=>N(`am`),disabled:f}),Y($_,{variant:`subtitle2`,selected:M===`pm`,typographyClassName:T.ampmLabel,value:qc(E,`pm`),onClick:m?void 0:()=>N(`pm`),disabled:f})]}),n&&F&&Y($_,{variant:`h5`,onClick:()=>j(`meridiem`),selected:A===`meridiem`,value:O&&M?qc(E,M):`--`,width:48})]})]}))}g();function Uv(e,t){var n;let r=kc(),i=Mt({props:e,name:t}),a=Vf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]),{openTo:c,views:l}=zc({views:i.views,openTo:i.openTo,defaultViews:[`year`,`day`,`hours`,`minutes`],defaultOpenTo:`day`}),{shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,timeSteps:m}=_v({thresholdToRenderTimeInASingleColumn:i.thresholdToRenderTimeInASingleColumn,ampm:o,timeSteps:i.timeSteps,views:l}),h=o?[...l,`meridiem`]:l;return x({},i,a,{timeSteps:m,openTo:c,shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,viewsForFormatting:h,ampm:o,localeText:s,orientation:i.orientation??`portrait`,slots:x({toolbar:Hv,tabs:Av},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o},(n=i.slotProps)==null?void 0:n.toolbar)})})}g();var Wv=o(function(e,t){var n;let{toolbar:r,tabs:i,content:a,actionBar:o,shortcuts:s,ownerState:c}=y_(e),{orientation:l}=zl(),{sx:u,className:d,classes:f}=e,p=o&&(((n=o.props.actions)==null?void 0:n.length)??0)>0;return P(S_,{ref:t,className:V(s_.root,f==null?void 0:f.root,d),sx:[{[`& .${s_.tabs}`]:{gridRow:4,gridColumn:`1 / 4`},[`& .${s_.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:c,children:[l===`landscape`?s:r,l===`landscape`?r:s,P(C_,{className:V(s_.contentWrapper,f==null?void 0:f.contentWrapper),ownerState:c,sx:{display:`grid`},children:[a,i,p&&Y(We,{sx:{gridRow:3,gridColumn:`1 / 4`}})]}),o]})});g();var Gv=[`openTo`,`focusedView`,`timeViewsCount`],Kv=function(e){var t,n;let{viewRenderers:r,popperView:i,rendererProps:a}=e,{openTo:o,focusedView:s,timeViewsCount:c}=a,l=Z(a,Gv),u=x({},l,{autoFocus:!1,focusedView:null,sx:[{[`&.${zd.root}`]:{borderBottom:0},[`&.${zd.root}, .${Vd.root}, &.${Cd.root}`]:{maxHeight:336}}]}),d=tl(i),f=d?`day`:i,p=d?i:`hours`;return P(y,{children:[(t=r[f])==null?void 0:t.call(r,x({},a,{view:d?`day`:i,focusedView:s&&Yc(s)?s:null,views:a.views.filter(Yc),sx:[{gridColumn:1},...u.sx]})),c>0&&P(y,{children:[Y(We,{orientation:`vertical`,sx:{gridColumn:2}}),(n=r[p])==null?void 0:n.call(r,x({},u,{view:d?i:`hours`,focusedView:s&&tl(s)?s:null,openTo:tl(o)?o:`hours`,views:a.views.filter(tl),sx:[{gridColumn:3},...u.sx]}))]})]})},qv=o(function(e,t){var n,r,i;let a=kc(),o=Uv(e,`MuiDesktopDateTimePicker`),s=o.shouldRenderTimeInASingleColumn?dv:fv,c=x({day:k_,month:k_,year:k_,hours:s,minutes:s,seconds:s,meridiem:s},o.viewRenderers),l=o.ampmInClock??!0,u=((n=c.hours)==null?void 0:n.name)===fv.name?o.views:o.views.filter(e=>e!==`meridiem`),{renderPicker:d}=O_({ref:t,props:x({},o,{viewRenderers:c,format:mv(a,x({},o,{views:o.viewsForFormatting})),views:u,yearsPerRow:o.yearsPerRow??4,ampmInClock:l,slots:x({field:gm,layout:Wv},o.slots),slotProps:x({},o.slotProps,{field:e=>{var t;return x({},xn((t=o.slotProps)==null?void 0:t.field,e),Fc(o))},toolbar:x({hidden:!0,ampmInClock:l},(r=o.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!0},(i=o.slotProps)==null?void 0:i.tabs)})}),valueManager:pd,valueType:`date-time`,validator:ff,rendererInterceptor:Kv,steps:null});return d()});g();var Jv=[{views:Jc},{views:Qc}],Yv=o(function(e,t){var n,r,i,a,o;let s=kc(),c=Uv(e,`MuiMobileDateTimePicker`),l=c.shouldRenderTimeInASingleColumn?dv:fv,u=x({day:k_,month:k_,year:k_,hours:l,minutes:l,seconds:l,meridiem:l},c.viewRenderers),d=c.ampmInClock??!1,f=((n=u.hours)==null?void 0:n.name)===fv.name?c.views:c.views.filter(e=>e!==`meridiem`),{renderPicker:p}=I_({ref:t,props:x({},c,{viewRenderers:u,format:mv(s,x({},c,{views:c.viewsForFormatting})),views:f,ampmInClock:d,slots:x({field:gm},c.slots),slotProps:x({},c.slotProps,{field:e=>{var t;return x({},xn((t=c.slotProps)==null?void 0:t.field,e),Fc(c))},toolbar:x({hidden:!1,ampmInClock:d},(r=c.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!1},(i=c.slotProps)==null?void 0:i.tabs),layout:x({},(a=c.slotProps)==null?void 0:a.layout,{sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],(o=c.slotProps)==null||(o=o.layout)==null?void 0:o.sx)})})}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Jv});return p()});g();var Xv=[`desktopModeMediaQuery`],Zv=o(function(e,t){let n=Mt({props:e,name:`MuiDateTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,Xv);return Te(r,{defaultMatches:!0})?Y(qv,x({ref:t},i)):Y(Yv,x({ref:t},i))});g();var Qv=[{views:Jc},{views:Qc}],$v=o(function(e,t){var n,r,i;let a=Uv(e,`MuiStaticDateTimePicker`),o=a.displayStaticWrapperAs??`mobile`,s=a.ampmInClock??o===`desktop`,c=a.shouldRenderTimeInASingleColumn?dv:fv,l=x({day:k_,month:k_,year:k_,hours:c,minutes:c,seconds:c,meridiem:c},a.viewRenderers),u=((n=l.hours)==null?void 0:n.name)===fv.name?a.views:a.views.filter(e=>e!==`meridiem`),{renderPicker:d}=H_({ref:t,props:x({},a,{viewRenderers:l,displayStaticWrapperAs:o,views:u,ampmInClock:s,yearsPerRow:a.yearsPerRow??(o===`mobile`?3:4),slotProps:x({},a.slotProps,{tabs:x({hidden:o===`desktop`},(r=a.slotProps)==null?void 0:r.tabs),toolbar:x({hidden:o===`desktop`,ampmInClock:s},(i=a.slotProps)==null?void 0:i.toolbar)}),sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],a==null?void 0:a.sx)}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Qv});return d()}),ey=t({ArrowDropDownIcon:()=>Ql,ArrowLeftIcon:()=>$l,ArrowRightIcon:()=>eu,CalendarIcon:()=>tu,ClearIcon:()=>au,ClockIcon:()=>nu,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>kd,DateCalendar:()=>_g,DateField:()=>um,DatePicker:()=>z_,DatePickerToolbar:()=>Vg,DateRangeIcon:()=>ru,DateTimeField:()=>gm,DateTimePicker:()=>Zv,DateTimePickerTabs:()=>Av,DateTimePickerToolbar:()=>Hv,DayCalendarSkeleton:()=>Eg,DesktopDatePicker:()=>A_,DesktopDateTimePicker:()=>qv,DesktopDateTimePickerLayout:()=>Wv,DesktopTimePicker:()=>vv,DigitalClock:()=>Ld,DigitalClockItem:()=>Id,LocalizationProvider:()=>Dc,MobileDatePicker:()=>L_,MobileDateTimePicker:()=>Yv,MobileTimePicker:()=>yv,MonthCalendar:()=>Ph,MultiSectionDigitalClock:()=>Qd,PickerDay:()=>sf,PickersActionBar:()=>d_,PickersCalendarHeader:()=>rg,PickersFilledInput:()=>zp,PickersInput:()=>Gp,PickersInputBase:()=>bp,PickersLayout:()=>w_,PickersLayoutContentWrapper:()=>C_,PickersLayoutRoot:()=>S_,PickersOutlinedInput:()=>Mp,PickersShortcuts:()=>h_,PickersTextField:()=>Xp,StaticDatePicker:()=>U_,StaticDateTimePicker:()=>$v,StaticTimePicker:()=>Sv,TimeClock:()=>xd,TimeField:()=>pm,TimeIcon:()=>iu,TimePicker:()=>xv,TimePickerToolbar:()=>cv,Unstable_PickersSectionList:()=>rp,Unstable_PickersSectionListRoot:()=>Zf,Unstable_PickersSectionListSection:()=>Qf,Unstable_PickersSectionListSectionContent:()=>ep,Unstable_PickersSectionListSectionSeparator:()=>$f,YearCalendar:()=>Kh,clockClasses:()=>Vu,clockNumberClasses:()=>ed,clockPointerClasses:()=>Pu,dateCalendarClasses:()=>dg,datePickerToolbarClasses:()=>Ig,dateTimePickerTabsClasses:()=>wv,dateTimePickerToolbarClasses:()=>Mv,dayCalendarClasses:()=>sh,dayCalendarSkeletonClasses:()=>yg,digitalClockClasses:()=>Cd,extractValidationProps:()=>Fc,getDateCalendarUtilityClass:()=>ug,getDayCalendarSkeletonUtilityClass:()=>vg,getDigitalClockUtilityClass:()=>Sd,getMonthCalendarUtilityClass:()=>Ch,getMultiSectionDigitalClockUtilityClass:()=>Rd,getPickerDayUtilityClass:()=>$d,getPickersFilledInputUtilityClass:()=>Np,getPickersInputBaseUtilityClass:()=>Kf,getPickersInputUtilityClass:()=>Bp,getPickersOutlinedInputUtilityClass:()=>xp,getPickersSectionListUtilityClass:()=>Jf,getPickersTextFieldUtilityClass:()=>Wf,getTimeClockUtilityClass:()=>Cu,getYearCalendarUtilityClass:()=>Fh,monthCalendarClasses:()=>wh,multiSectionDigitalClockClasses:()=>zd,multiSectionDigitalClockSectionClasses:()=>Vd,pickerDayClasses:()=>ef,pickersCalendarHeaderClasses:()=>Jh,pickersFadeTransitionGroupClasses:()=>Jm,pickersFilledInputClasses:()=>Pp,pickersInputBaseClasses:()=>qf,pickersInputClasses:()=>Vp,pickersLayoutClasses:()=>s_,pickersOutlinedInputClasses:()=>Sp,pickersSectionListClasses:()=>Yf,pickersSlideTransitionClasses:()=>eh,pickersTextFieldClasses:()=>Gf,renderDateViewCalendar:()=>k_,renderDigitalClockTimeView:()=>dv,renderMultiSectionDigitalClockTimeView:()=>fv,renderTimeViewClock:()=>uv,timeClockClasses:()=>wu,timePickerToolbarClasses:()=>tv,unstable_useDateField:()=>Hf,unstable_useDateTimeField:()=>mm,unstable_useTimeField:()=>dm,useDateManager:()=>Af,useDateTimeManager:()=>Rf,useIsValidValue:()=>Ul,useParsedFormat:()=>Vl,usePickerActionsContext:()=>Yl,usePickerAdapter:()=>kc,usePickerContext:()=>zl,usePickerLayout:()=>y_,usePickerTranslations:()=>Ac,useSplitFieldProps:()=>Lc,useTimeManager:()=>Pf,useValidation:()=>pf,validateDate:()=>uf,validateDateTime:()=>ff,validateTime:()=>df,yearCalendarClasses:()=>Ih}),ty=t({ArrowDropDownIcon:()=>Wb,ArrowLeftIcon:()=>Gb,ArrowRightIcon:()=>Kb,CalendarIcon:()=>qb,ClearIcon:()=>Zb,ClockIcon:()=>Jb,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>ny,DateCalendar:()=>Dy,DateField:()=>xy,DatePicker:()=>Hy,DatePickerToolbar:()=>Uy,DateRangeIcon:()=>Yb,DateTimeField:()=>Ty,DateTimePicker:()=>eb,DateTimePickerTabs:()=>tb,DateTimePickerToolbar:()=>rb,DayCalendarSkeleton:()=>zy,DesktopDatePicker:()=>Gy,DesktopDateTimePicker:()=>ab,DesktopDateTimePickerLayout:()=>ob,DesktopTimePicker:()=>Zy,DigitalClock:()=>ly,DigitalClockItem:()=>uy,LocalizationProvider:()=>_y,MobileDatePicker:()=>Ky,MobileDateTimePicker:()=>sb,MobileTimePicker:()=>Qy,MonthCalendar:()=>Ny,MultiSectionDigitalClock:()=>py,PickerDay:()=>vy,PickersActionBar:()=>vb,PickersCalendarHeader:()=>xb,PickersFilledInput:()=>Ob,PickersInput:()=>Tb,PickersInputBase:()=>Pb,PickersLayout:()=>pb,PickersLayoutContentWrapper:()=>hb,PickersLayoutRoot:()=>mb,PickersOutlinedInput:()=>jb,PickersShortcuts:()=>yb,PickersTextField:()=>Sb,StaticDatePicker:()=>qy,StaticDateTimePicker:()=>cb,StaticTimePicker:()=>$y,TimeClock:()=>ry,TimeField:()=>Cy,TimeIcon:()=>Xb,TimePicker:()=>Jy,TimePickerToolbar:()=>Yy,Unstable_PickersSectionList:()=>Lb,Unstable_PickersSectionListRoot:()=>Rb,Unstable_PickersSectionListSection:()=>zb,Unstable_PickersSectionListSectionContent:()=>Vb,Unstable_PickersSectionListSectionSeparator:()=>Bb,YearCalendar:()=>Iy,clockClasses:()=>iy,clockNumberClasses:()=>ay,clockPointerClasses:()=>cy,dateCalendarClasses:()=>ky,datePickerToolbarClasses:()=>Wy,dateTimePickerTabsClasses:()=>nb,dateTimePickerToolbarClasses:()=>ib,dayCalendarClasses:()=>Ay,dayCalendarSkeletonClasses:()=>By,default:()=>px,digitalClockClasses:()=>dy,extractValidationProps:()=>cx,getDateCalendarUtilityClass:()=>Oy,getDayCalendarSkeletonUtilityClass:()=>Vy,getDigitalClockUtilityClass:()=>fy,getMonthCalendarUtilityClass:()=>Fy,getMultiSectionDigitalClockUtilityClass:()=>gy,getPickerDayUtilityClass:()=>yy,getPickersFilledInputUtilityClass:()=>kb,getPickersInputBaseUtilityClass:()=>Ib,getPickersInputUtilityClass:()=>Eb,getPickersOutlinedInputUtilityClass:()=>Mb,getPickersSectionListUtilityClass:()=>Hb,getPickersTextFieldUtilityClass:()=>wb,getTimeClockUtilityClass:()=>sy,getYearCalendarUtilityClass:()=>Ry,monthCalendarClasses:()=>Py,multiSectionDigitalClockClasses:()=>hy,multiSectionDigitalClockSectionClasses:()=>my,pickerDayClasses:()=>by,pickersCalendarHeaderClasses:()=>bb,pickersFadeTransitionGroupClasses:()=>jy,pickersFilledInputClasses:()=>Ab,pickersInputBaseClasses:()=>Fb,pickersInputClasses:()=>Db,pickersLayoutClasses:()=>_b,pickersOutlinedInputClasses:()=>Nb,pickersSectionListClasses:()=>Ub,pickersSlideTransitionClasses:()=>My,pickersTextFieldClasses:()=>Cb,renderDateViewCalendar:()=>lb,renderDigitalClockTimeView:()=>db,renderMultiSectionDigitalClockTimeView:()=>fb,renderTimeViewClock:()=>ub,timeClockClasses:()=>oy,timePickerToolbarClasses:()=>Xy,unstable_useDateField:()=>Sy,unstable_useDateTimeField:()=>Ey,unstable_useTimeField:()=>wy,useDateManager:()=>ux,useDateTimeManager:()=>fx,useIsValidValue:()=>rx,useParsedFormat:()=>ex,usePickerActionsContext:()=>nx,usePickerAdapter:()=>ix,usePickerContext:()=>tx,usePickerLayout:()=>gb,usePickerTranslations:()=>Qb,useSplitFieldProps:()=>$b,useTimeManager:()=>dx,useValidation:()=>lx,validateDate:()=>ax,validateDateTime:()=>sx,validateTime:()=>ox,yearCalendarClasses:()=>Ly}),Q=ey,ny=Q.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,ry=Q.TimeClock,iy=Q.clockClasses,ay=Q.clockNumberClasses,oy=Q.timeClockClasses,sy=Q.getTimeClockUtilityClass,cy=Q.clockPointerClasses,ly=Q.DigitalClock,uy=Q.DigitalClockItem,dy=Q.digitalClockClasses,fy=Q.getDigitalClockUtilityClass,py=Q.MultiSectionDigitalClock,my=Q.multiSectionDigitalClockSectionClasses,hy=Q.multiSectionDigitalClockClasses,gy=Q.getMultiSectionDigitalClockUtilityClass,_y=Q.LocalizationProvider,vy=Q.PickerDay,yy=Q.getPickerDayUtilityClass,by=Q.pickerDayClasses,xy=Q.DateField,Sy=Q.unstable_useDateField,Cy=Q.TimeField,wy=Q.unstable_useTimeField,Ty=Q.DateTimeField,Ey=Q.unstable_useDateTimeField,Dy=Q.DateCalendar,Oy=Q.getDateCalendarUtilityClass,ky=Q.dateCalendarClasses,Ay=Q.dayCalendarClasses,jy=Q.pickersFadeTransitionGroupClasses,My=Q.pickersSlideTransitionClasses,Ny=Q.MonthCalendar,Py=Q.monthCalendarClasses,Fy=Q.getMonthCalendarUtilityClass,Iy=Q.YearCalendar,Ly=Q.yearCalendarClasses,Ry=Q.getYearCalendarUtilityClass,zy=Q.DayCalendarSkeleton,By=Q.dayCalendarSkeletonClasses,Vy=Q.getDayCalendarSkeletonUtilityClass,Hy=Q.DatePicker,Uy=Q.DatePickerToolbar,Wy=Q.datePickerToolbarClasses,Gy=Q.DesktopDatePicker,Ky=Q.MobileDatePicker,qy=Q.StaticDatePicker,Jy=Q.TimePicker,Yy=Q.TimePickerToolbar,Xy=Q.timePickerToolbarClasses,Zy=Q.DesktopTimePicker,Qy=Q.MobileTimePicker,$y=Q.StaticTimePicker,eb=Q.DateTimePicker,tb=Q.DateTimePickerTabs,nb=Q.dateTimePickerTabsClasses,rb=Q.DateTimePickerToolbar,ib=Q.dateTimePickerToolbarClasses,ab=Q.DesktopDateTimePicker,ob=Q.DesktopDateTimePickerLayout,sb=Q.MobileDateTimePicker,cb=Q.StaticDateTimePicker,lb=Q.renderDateViewCalendar,ub=Q.renderTimeViewClock,db=Q.renderDigitalClockTimeView,fb=Q.renderMultiSectionDigitalClockTimeView,pb=Q.PickersLayout,mb=Q.PickersLayoutRoot,hb=Q.PickersLayoutContentWrapper,gb=Q.usePickerLayout,_b=Q.pickersLayoutClasses,vb=Q.PickersActionBar,yb=Q.PickersShortcuts,bb=Q.pickersCalendarHeaderClasses,xb=Q.PickersCalendarHeader,Sb=Q.PickersTextField,Cb=Q.pickersTextFieldClasses,wb=Q.getPickersTextFieldUtilityClass,Tb=Q.PickersInput,Eb=Q.getPickersInputUtilityClass,Db=Q.pickersInputClasses,Ob=Q.PickersFilledInput,kb=Q.getPickersFilledInputUtilityClass,Ab=Q.pickersFilledInputClasses,jb=Q.PickersOutlinedInput,Mb=Q.getPickersOutlinedInputUtilityClass,Nb=Q.pickersOutlinedInputClasses,Pb=Q.PickersInputBase,Fb=Q.pickersInputBaseClasses,Ib=Q.getPickersInputBaseUtilityClass,Lb=Q.Unstable_PickersSectionList,Rb=Q.Unstable_PickersSectionListRoot,zb=Q.Unstable_PickersSectionListSection,Bb=Q.Unstable_PickersSectionListSectionSeparator,Vb=Q.Unstable_PickersSectionListSectionContent,Hb=Q.getPickersSectionListUtilityClass,Ub=Q.pickersSectionListClasses,Wb=Q.ArrowDropDownIcon,Gb=Q.ArrowLeftIcon,Kb=Q.ArrowRightIcon,qb=Q.CalendarIcon,Jb=Q.ClockIcon,Yb=Q.DateRangeIcon,Xb=Q.TimeIcon,Zb=Q.ClearIcon,Qb=Q.usePickerTranslations,$b=Q.useSplitFieldProps,ex=Q.useParsedFormat,tx=Q.usePickerContext,nx=Q.usePickerActionsContext,rx=Q.useIsValidValue,ix=Q.usePickerAdapter,ax=Q.validateDate,ox=Q.validateTime,sx=Q.validateDateTime,cx=Q.extractValidationProps,lx=Q.useValidation,ux=Q.useDateManager,dx=Q.useTimeManager,fx=Q.useDateTimeManager,px=Reflect.get(ey,`default`)??ey,mx=`__mf_module_cache__`;globalThis[mx]||={share:{},remote:{}},globalThis[mx].share||={},globalThis[mx].remote||={};var hx=globalThis[mx];for(let e of Object.keys(hx.share))if(e.startsWith(`default:`)){let t=e.slice(8);hx.share[t]===void 0&&(hx.share[t]=hx.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;hx.share[t]===void 0&&(hx.share[t]=hx.share[e])}var gx=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},_x=Symbol.for(`module-federation.shared-cache-listeners`),vx=e=>{let t=e[_x];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,_x,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},yx=(e,t,n)=>{let r=vx(e);(r[t.canonical]||=new Set).add(n)},bx=Symbol.for(`module-federation.shared-cache-owners`),xx=e=>{let t=e[bx];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,bx,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Sx=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[bx];r===void 0?o&&delete o[t.canonical]:xx(e)[t.canonical]=r;let s=(i=e[_x])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Cx=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},wx=gx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]});wx===void 0&&(wx=Cx(ty),Sx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},wx,`ConfigCustomJavascriptSet`));var Tx,Ex,Dx,Ox=e=>{e.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,e.TimeClock,e.clockClasses,e.clockNumberClasses,e.timeClockClasses,e.getTimeClockUtilityClass,e.clockPointerClasses,e.DigitalClock,e.DigitalClockItem,e.digitalClockClasses,e.getDigitalClockUtilityClass,e.MultiSectionDigitalClock,e.multiSectionDigitalClockSectionClasses,e.multiSectionDigitalClockClasses,e.getMultiSectionDigitalClockUtilityClass,Tx=e.LocalizationProvider,e.PickerDay,e.getPickerDayUtilityClass,e.pickerDayClasses,e.DateField,e.unstable_useDateField,e.TimeField,e.unstable_useTimeField,e.DateTimeField,e.unstable_useDateTimeField,e.DateCalendar,e.getDateCalendarUtilityClass,e.dateCalendarClasses,e.dayCalendarClasses,e.pickersFadeTransitionGroupClasses,e.pickersSlideTransitionClasses,e.MonthCalendar,e.monthCalendarClasses,e.getMonthCalendarUtilityClass,e.YearCalendar,e.yearCalendarClasses,e.getYearCalendarUtilityClass,e.DayCalendarSkeleton,e.dayCalendarSkeletonClasses,e.getDayCalendarSkeletonUtilityClass,Ex=e.DatePicker,e.DatePickerToolbar,e.datePickerToolbarClasses,e.DesktopDatePicker,e.MobileDatePicker,e.StaticDatePicker,Dx=e.TimePicker,e.TimePickerToolbar,e.timePickerToolbarClasses,e.DesktopTimePicker,e.MobileTimePicker,e.StaticTimePicker,e.DateTimePicker,e.DateTimePickerTabs,e.dateTimePickerTabsClasses,e.DateTimePickerToolbar,e.dateTimePickerToolbarClasses,e.DesktopDateTimePicker,e.DesktopDateTimePickerLayout,e.MobileDateTimePicker,e.StaticDateTimePicker,e.renderDateViewCalendar,e.renderTimeViewClock,e.renderDigitalClockTimeView,e.renderMultiSectionDigitalClockTimeView,e.PickersLayout,e.PickersLayoutRoot,e.PickersLayoutContentWrapper,e.usePickerLayout,e.pickersLayoutClasses,e.PickersActionBar,e.PickersShortcuts,e.pickersCalendarHeaderClasses,e.PickersCalendarHeader,e.PickersTextField,e.pickersTextFieldClasses,e.getPickersTextFieldUtilityClass,e.PickersInput,e.getPickersInputUtilityClass,e.pickersInputClasses,e.PickersFilledInput,e.getPickersFilledInputUtilityClass,e.pickersFilledInputClasses,e.PickersOutlinedInput,e.getPickersOutlinedInputUtilityClass,e.pickersOutlinedInputClasses,e.PickersInputBase,e.pickersInputBaseClasses,e.getPickersInputBaseUtilityClass,e.Unstable_PickersSectionList,e.Unstable_PickersSectionListRoot,e.Unstable_PickersSectionListSection,e.Unstable_PickersSectionListSectionSeparator,e.Unstable_PickersSectionListSectionContent,e.getPickersSectionListUtilityClass,e.pickersSectionListClasses,e.ArrowDropDownIcon,e.ArrowLeftIcon,e.ArrowRightIcon,e.CalendarIcon,e.ClockIcon,e.DateRangeIcon,e.TimeIcon,e.ClearIcon,e.usePickerTranslations,e.useSplitFieldProps,e.useParsedFormat,e.usePickerContext,e.usePickerActionsContext,e.useIsValidValue,e.usePickerAdapter,e.validateDate,e.validateTime,e.validateDateTime,e.extractValidationProps,e.useValidation,e.useDateManager,e.useTimeManager,e.useDateTimeManager,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};yx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Ox),Ox(wx),g();var kx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e)try{let t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return _.createElement(Ex,{sx:t=>({width:`100%`,borderBottom:`1px solid ${e?`#F00`:t.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${t.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace(`mm`,`MM`),disabled:!!t,value:this.state.value||null,onChange:e=>this.setState({value:e},()=>{try{if(this.props.attr){let e=this.state.value.toISOString();this.onChange(this.props.attr,e).catch(e=>console.warn(`Error saving value for ${this.props.attr}:`,e))}}catch{}}),label:this.getText(this.props.schema.label)})}};g();var Ax=class extends X{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){let e=this.props.oContext.DeviceManager;return _.createElement(e,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return _.createElement(`div`,null,`DeviceManager not found`)}};g();var jx=n(lr(),1),Mx=typeof jx.default==`function`?jx.default:jx.default.default,Nx=`file-invalid-type`,Px=`file-too-large`,Fx=`file-too-small`,Ix=`too-many-files`;function Lx(e=``){let t=e.split(`,`);return{code:Nx,message:`File type must be ${t.length>1?`one of ${t.join(`, `)}`:t[0]}`}}var Rx=[`KB`,`MB`,`GB`,`TB`,`PB`];function zx(e){if(e<1024)return`${e} ${e===1?`byte`:`bytes`}`;let t=e/1024,n=0;for(;t>=1024&&n<Rx.length-1;)t/=1024,n++;return`${Number(t.toFixed(2))} ${Rx[n]}`}function Bx(e){return{code:Px,message:`File is larger than ${zx(e)}`}}function Vx(e){return{code:Fx,message:`File is smaller than ${zx(e)}`}}var Hx={code:Ix,message:`Too many files`};function Ux(e){return e.type===``&&typeof e.getAsFile==`function`}function Wx(e,t){let n=e.type===`application/x-moz-file`||Mx(e,t??``)||Ux(e);return[n,n?null:Lx(t)]}function Gx(e,t,n){if(Kx(e.size)){if(Kx(t)&&Kx(n)){if(e.size>n)return[!1,Bx(n)];if(e.size<t)return[!1,Vx(t)]}else if(Kx(t)&&e.size<t)return[!1,Vx(t)];else if(Kx(n)&&e.size>n)return[!1,Bx(n)]}return[!0,null]}function Kx(e){return e!=null}function qx(e){return e!=null&&typeof e.then==`function`}function Jx({files:e,accept:t,minSize:n,maxSize:r,multiple:i,maxFiles:a=0,validator:o}){return!i&&e.length>1||i&&a>=1&&e.length>a||e.some(e=>{let[i]=Wx(e,t),[a]=Gx(e,n,r);return!i||!a})?`reject`:o?`unknown`:`accept`}function Yx(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble!==void 0&&e.cancelBubble}function Xx(e){let t=e.dataTransfer??e.clipboardData;return t?Array.prototype.some.call(t.types,e=>e===`Files`||e===`application/x-moz-file`)||Array.prototype.some.call(t.items??[],Zx):!!e.target&&!!e.target.files}function Zx(e){return typeof e==`object`&&!!e&&e.kind===`file`}function Qx(e){e.preventDefault()}function $x(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function eS(e){return e.indexOf(`Edge/`)!==-1}function tS(e=window.navigator.userAgent){return $x(e)||eS(e)}function nS(...e){return(t,...n)=>e.some(e=>(!Yx(t)&&e&&e(t,...n),Yx(t)))}function rS(){return`showOpenFilePicker`in window}function iS(e){return Array.isArray(e)?e:typeof e==`string`?[e]:[]}function aS(e){if(Kx(e))return Array.isArray(e)?e.filter(e=>Kx(e)&&Kx(e.accept)):[{accept:e}]}function oS(e){let t=[],n=Object.keys(e);for(let n of Object.values(e))for(let e of iS(n))t.includes(e)||t.push(e);return t.length>0?t.join(`, `):n.length>0?n.join(`, `):`Files`}function sS(e){let t=aS(e);if(!Kx(t))return;let n={};for(let e of t)for(let[t,r]of Object.entries(e.accept)){let e=n[t]??(n[t]=[]);for(let t of iS(r))e.includes(t)||e.push(t)}return n}function cS(e){let t=aS(e);if(!Kx(t))return;let n=t.map(e=>{let t=Object.entries(e.accept).filter(([e,t])=>{let n=!0;return pS(e)||(console.warn(`Skipped "${e}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),n=!1),(!(Array.isArray(t)||typeof t==`string`)||!iS(t).every(hS))&&(console.warn(`Skipped "${e}" because an invalid file extension was provided.`),n=!1),n}).reduce((e,[t,n])=>(e[t]=iS(n),e),{});return{description:Kx(e.description)&&e.description!==``?e.description:oS(t),accept:t}}).filter(e=>Object.keys(e.accept).length>0);return n.length>0?n:void 0}function lS(e,{omitWildcardMimeTypesWithExtensions:t=!1}={}){if(Kx(e))return Object.entries(e).reduce((e,[n,r])=>{let i=iS(r);return t&&mS(n)&&i.some(hS)?e.push(...i):e.push(n,...i),e},[]).filter(e=>pS(e)||hS(e)).join(`,`)}function uS(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function dS(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function fS(e){return e instanceof DOMException&&e.name===`NotAllowedError`}function pS(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||e===`application/*`||/\w+\/[-+.\w]+/g.test(e)}function mS(e){return e.endsWith(`/*`)}function hS(e){return/^.*\.[\w]+$/.test(e)}var gS=o(({children:e,...t},n)=>{let{open:r,...i}=vS(t);return d(n,()=>({open:r}),[r]),Y(Je,{children:e==null?void 0:e({...i,open:r})})});gS.displayName=`Dropzone`;var _S={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,isDragGlobal:!1,isProcessing:!1,acceptedFiles:[],fileRejections:[]};function vS(e={}){let{accept:t,disabled:n=!1,getFilesFromEvent:r=At,maxSize:i=1/0,minSize:o=0,multiple:s=!0,maxFiles:u=0,onDragEnter:d,onDragLeave:m,onDragOver:h,onDrop:g,onDropAccepted:_,onDropRejected:v,onFileDialogCancel:y,onFileDialogOpen:b,useFsAccessApi:x=!1,autoFocus:S=!1,preventDropOnDocument:C=!0,noClick:w=!1,noKeyboard:T=!1,noDrag:E=!1,noDragEventsBubbling:D=!1,noPaste:O=!1,onError:k,validator:A,getErrorMessage:j}=e,M=p(()=>sS(t),[t]),N=p(()=>lS(M),[M]),ee=p(()=>lS(M,{omitWildcardMimeTypesWithExtensions:!0}),[M]),P=p(()=>cS(t),[t]),F=p(()=>typeof b==`function`?b:bS,[b]),te=p(()=>typeof y==`function`?y:bS,[y]),I=l(null),L=l(null),[R,z]=c(yS,_S),{isFocused:ne,isFileDialogActive:re}=R,ie=l(re);ie.current=re;let ae=l(null),B=f(()=>{var e;(e=ae.current)==null||e.abort();let t=new AbortController;return ae.current=t,z({type:`setProcessing`,isProcessing:!0}),t.signal},[]),oe=f(e=>{e.aborted||z({type:`setProcessing`,isProcessing:!1})},[]),se=l(typeof window<`u`&&window.isSecureContext&&x&&rS()),ce=()=>{!se.current&&re&&setTimeout(()=>{if(L.current){let{files:e}=L.current;e!=null&&e.length||(z({type:`closeDialog`}),te())}},300)};a(()=>(window.addEventListener(`focus`,ce,!1),()=>{window.removeEventListener(`focus`,ce,!1)}),[L,re,te,se]);let le=l([]),V=l([]),H=e=>{I.current&&e.target&&I.current.contains(e.target)&&e.defaultPrevented||(e.preventDefault(),le.current=[])};a(()=>(C&&(document.addEventListener(`dragover`,Qx,!1),document.addEventListener(`drop`,H,!1)),()=>{C&&(document.removeEventListener(`dragover`,Qx),document.removeEventListener(`drop`,H))}),[I,C]),a(()=>{let e=e=>{e.target&&(V.current=[...V.current,e.target]),Xx(e)&&z({isDragGlobal:!0,type:`setDragGlobal`})},t=e=>{V.current=V.current.filter(t=>t!==e.target&&t!==null),!(V.current.length>0)&&z({isDragGlobal:!1,type:`setDragGlobal`})},n=()=>{V.current=[],z({isDragGlobal:!1,type:`setDragGlobal`})},r=()=>{V.current=[],z({isDragGlobal:!1,type:`setDragGlobal`})};return document.addEventListener(`dragenter`,e,!1),document.addEventListener(`dragleave`,t,!1),document.addEventListener(`dragend`,n,!1),document.addEventListener(`drop`,r,!1),()=>{document.removeEventListener(`dragenter`,e),document.removeEventListener(`dragleave`,t),document.removeEventListener(`dragend`,n),document.removeEventListener(`drop`,r)}},[I]),a(()=>(!n&&S&&I.current&&I.current.focus(),()=>{}),[I,S,n]);let ue=f(e=>{k?k(e):console.error(e)},[k]),de=f(e=>{var t;e.preventDefault(),(t=e.persist)==null||t.call(e),we(e),!ie.current&&(le.current=[...le.current,e.target],Xx(e)&&Promise.resolve(r(e)).then(t=>{if(Yx(e)&&!D)return;let n=t.length>0?Jx({files:t,accept:N,minSize:o,maxSize:i,multiple:s,maxFiles:u,validator:A}):null;z({isDragAccept:n===`accept`,isDragReject:n===`reject`,isDragUnknown:n===`unknown`,isDragActive:!0,type:`setDraggedFiles`}),d&&d(e)}).catch(e=>ue(e)))},[r,d,ue,D,N,o,i,s,u,A]),U=f(e=>{var t;if(e.preventDefault(),(t=e.persist)==null||t.call(e),we(e),ie.current)return!1;let n=Xx(e);if(n&&e.dataTransfer)try{e.dataTransfer.dropEffect=`copy`}catch{}return n&&h&&h(e),!1},[h,D]),fe=f(e=>{var t;e.preventDefault(),(t=e.persist)==null||t.call(e),we(e);let n=le.current.filter(e=>{var t;return(t=I.current)==null?void 0:t.contains(e)}),r=n.indexOf(e.target);r!==-1&&n.splice(r,1),le.current=n,!(n.length>0)&&(z({type:`setDraggedFiles`,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1}),Xx(e)&&m&&m(e))},[I,m,D]),pe=f(async(e,t,n)=>{let r=(e,t)=>j?{...e,message:j(e,t)}:e,a=e=>{let n=[],i=[];e.forEach(({file:e,accepted:t,acceptError:a,sizeMatch:o,sizeError:s,customErrors:c})=>{if(t&&o&&!c)n.push(e);else{let t=[a,s];c&&(t=t.concat(c)),i.push({file:e,errors:t.filter(e=>e!=null).map(t=>r(t,e))})}});let a=s?u>=1?u:1/0:1;n.length>a&&n.splice(a).forEach(e=>{i.push({file:e,errors:[r(Hx,e)]})}),z({acceptedFiles:n,fileRejections:i,type:`setFiles`}),g&&g(n,i,t),i.length>0&&v&&v(i,t),n.length>0&&_&&_(n,t)},c=e.map(e=>{let[t,n]=Wx(e,ee),[r,a]=Gx(e,o,i);return{file:e,accepted:t,acceptError:n,sizeMatch:r,sizeError:a,customErrors:A?A(e):null}});if(!c.some(({customErrors:e})=>qx(e))){a(c);return}let l;try{l=await Promise.all(c.map(async({customErrors:e,...t})=>({...t,customErrors:await e})))}catch(e){n.aborted||(oe(n),ue(e));return}n.aborted||a(l)},[z,s,ee,o,i,u,g,_,v,A,j,ue,oe]),W=f(e=>{var t;if(e.preventDefault(),(t=e.persist)==null||t.call(e),we(e),le.current=[],!(ie.current&&e.dataTransfer)&&(z({type:`reset`}),Xx(e))){let t=B();Promise.resolve(r(e)).then(n=>{if(!t.aborted){if(Yx(e)&&!D){oe(t);return}return pe(n,e,t)}}).catch(e=>{t.aborted||(oe(t),ue(e))})}},[r,pe,ue,D,B,oe]),me=f(e=>{var t;if(!Xx(e))return;e.preventDefault(),(t=e.persist)==null||t.call(e),we(e);let n=B();Promise.resolve(r(e)).then(t=>{if(!n.aborted){if(Yx(e)&&!D){oe(n);return}return pe(t,e,n)}}).catch(e=>{n.aborted||(oe(n),ue(e))})},[r,pe,ue,D,B,oe]),he=f(()=>{if(se.current){z({type:`openDialog`}),F();let e={multiple:s,types:P},t;window.showOpenFilePicker(e).then(e=>(t=B(),r(e))).then(e=>{if(z({type:`closeDialog`}),!t.aborted)return pe(e,null,t)}).catch(e=>{t&&oe(t),uS(e)?(te(e),z({type:`closeDialog`})):dS(e)||fS(e)?(se.current=!1,L.current?(L.current.value=``,L.current.click()):ue(Error(`Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.`))):ue(e)});return}L.current&&(z({type:`openDialog`}),F(),L.current.value=``,L.current.click())},[z,F,te,x,pe,ue,P,s,B,oe]),ge=f(e=>{var t;(t=I.current)!=null&&t.isEqualNode(e.target)&&(e.key===` `||e.key===`Enter`||e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),he())},[I,he]),_e=f(()=>{z({type:`focus`})},[]),ve=f(()=>{z({type:`blur`})},[]),ye=f(()=>{w||(tS()?setTimeout(he,0):he())},[w,he]),be=e=>n?null:e,xe=e=>T?null:be(e),Se=e=>E?null:be(e),Ce=e=>O?null:be(e),we=e=>{D&&e.stopPropagation()},Te=p(()=>({refKey:e=`ref`,role:t,onKeyDown:r,onFocus:i,onBlur:a,onClick:o,onDragEnter:s,onDragOver:c,onDragLeave:l,onDrop:u,onPaste:d,...f}={})=>({onKeyDown:xe(nS(r,ge)),onFocus:xe(nS(i,_e)),onBlur:xe(nS(a,ve)),onClick:be(nS(o,ye)),onDragEnter:Se(nS(s,de)),onDragOver:Se(nS(c,U)),onDragLeave:Se(nS(l,fe)),onDrop:Se(nS(u,W)),onPaste:Ce(nS(d,me)),role:typeof t==`string`&&t!==``?t:`presentation`,[e]:I,...!n&&!T?{tabIndex:0}:{},...n?{"aria-disabled":!0}:{},...f}),[I,ge,_e,ve,ye,de,U,fe,W,me,T,E,O,n]),Ee=f(e=>{e.stopPropagation()},[]),De=p(()=>({refKey:e=`ref`,onChange:t,onClick:n,...r}={})=>({accept:ee,multiple:s,type:`file`,"aria-label":`file upload`,style:{border:0,display:`block`,height:0,margin:0,opacity:0,overflow:`hidden`,padding:0,width:0},onChange:be(nS(t,W)),onClick:be(nS(n,Ee)),tabIndex:-1,[e]:L,...r}),[L,t,s,W,n]);return{...R,isFocused:ne&&!n,getRootProps:Te,getInputProps:De,rootRef:I,inputRef:L,open:be(he)}}function yS(e,t){switch(t.type){case`focus`:return{...e,isFocused:!0};case`blur`:return{...e,isFocused:!1};case`openDialog`:return{..._S,isFileDialogActive:!0};case`closeDialog`:return{...e,isFileDialogActive:!1};case`setDraggedFiles`:return{...e,isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject,isDragUnknown:t.isDragUnknown};case`setProcessing`:return{...e,isProcessing:t.isProcessing};case`setFiles`:return{...e,acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isProcessing:!1,isDragReject:!1,isDragUnknown:!1};case`setDragGlobal`:return{...e,isDragGlobal:t.isDragGlobal};case`reset`:return{..._S};default:return e}}function bS(){}g();var xS={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 42px)`},fullWidthTwoButtons:{width:`calc(100% - 84px)`},fullWidthThreeButtons:{width:`calc(100% - 126x)`},dropZone:{width:`100%`,height:`100%`,position:`absolute`},dropZoneEmpty:{},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadDiv:{position:`relative`,width:`100%`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`100%`,height:`100%`,position:`absolute`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},disabledOpacity:{opacity:.3,cursor:`default`},error:{border:`2px solid red`},deleteButton:{},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},SS=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],CS=[`mp3`,`ogg`,`wav`,`aac`],wS=[`avi`,`mp4`,`mov`],TS=[`txt`,`log`,`html`,`htm`],ES=[`json`,`js`,`ts`],DS=class e extends X{constructor(e){super(e),q(this,`dropzoneRef`,void 0),q(this,`imagePrefix`,void 0),q(this,`objectID`,void 0),q(this,`path`,void 0),q(this,`onFolderChanged`,(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(e=>console.error(`Cannot update files: ${e}`))}),this.state={...this.state,deleteFile:``},this.dropzoneRef=_.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??`./files`}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||`0_userdata.0`).replace(`%INSTANCE%`,(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload||``,this.path&&(this.path===`/`?this.path=``:this.path.endsWith(`/`)||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`))})}componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){let e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{let i=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,``));for(let a=0;a<i.length;a++){let o=i[a];if(o.isDir)await this.readFolder(`${e+o.file}/`,t,n);else{let i=!1;if(i=n===`*.*`&&o.file.includes(`.`)||!n||n===`*`||n===`.*`&&o.file.startsWith(`.`)?!0:RegExp(`^${n.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(o.file),i){var r;t.push({name:e+o.file,size:(r=o.stats)!=null&&r.size?$t.formatBytes(o.stats.size):`--`})}}}}catch(t){console.error(`Cannot read "${e}": ${t}`)}return t}async readFiles(e){let t=[];e||=this.props.schema.pattern,e||=`**/*.*`;let n,r=e.lastIndexOf(`/`);if(n=r===-1?e:e.substring(r+1),e.startsWith(`**`))await this.readFolder(`/`,t,n);else{let r=e.lastIndexOf(`/`);if(r===-1)await this.readFolder(`/`,t,n);else{let i=e.substring(0,r+1);await this.readFolder(i,t,n)}}return t}onDrop(e){let t=e[0],n=new FileReader,r=this.props.schema.maxSize||2097152;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>r){window.alert(K.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(r/1024)));return}let e=n.result;if(e===null){console.error(`Cannot read file ${t.name}`);return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,e).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(e=>window.alert(`Cannot upload file: ${e}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?_.createElement(Cn,{title:K.t(`jc_Are you sure?`),text:K.t(`jc_File will be deleted`),ok:K.t(`jc_Delete`),cancel:K.t(`jc_Cancel`),onClose:e=>{let t=this.state.deleteFile;this.setState({deleteFile:``},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(e=>window.alert(`Cannot delete file: ${e}`))})}}):null}static base64ToArrayBuffer(e){let t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}loadFile(){return this.props.oContext.socket.readFile(this.objectID,this.state.value,!0)}play(){this.loadFile().then(t=>{if(typeof AudioContext<`u`){let n=new AudioContext,r=e.base64ToArrayBuffer(t.file);n.decodeAudioData(r,e=>{let t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getFileIcon(e){return e!=null&&e.extension?SS.includes(e.extension)?_.createElement(`div`,{style:{...xS.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):CS.includes(e.extension)?_.createElement(Jt,null):TS.includes(e.extension)?_.createElement(Vt,null):wS.includes(e.extension)?_.createElement(te,null):ES.includes(e.extension)?_.createElement(ce,null):null:null}renderItem(e,t){if(!this.state.files)return null;let n=[];this.props.schema.withFolder||this.state.files.forEach(e=>{let t=e.name.lastIndexOf(`/`);if(t===-1)n.includes(`/`)||n.push(`/`);else{let r=e.name.substring(0,t+1);n.includes(r)||n.push(r)}});let r=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&n.length===1?`${e.name.substring(n[0].length)}`:`${e.name}${this.props.schema.noSize?``:`(${e.size})`}`,extension:e.name.toLowerCase().split(`.`).pop()}));this.props.schema.noNone||r.unshift({label:K.t(`jc_none`),value:``});let i=r.find(e=>e.value===this.state.value),a=0;this.props.schema.upload&&a++,this.props.schema.refresh&&a++;let o=this.state.value&&(this.state.value.endsWith(`.mp3`)||this.state.value.endsWith(`.ogg`)||this.state.value.endsWith(`.wav`));o&&a++;let s=_.createElement(`div`,{style:xS.fullWidth},_.createElement(Mn,{variant:`standard`,style:{width:`calc(100% - ${a*42}px)`}},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>_.createElement(_.Fragment,null,this.getFileIcon(i),_.createElement(`span`,null,(i==null?void 0:i.label)||``)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},r.map(e=>_.createElement(Ie,{key:e.value,value:e.value},_.createElement(rr,null,this.getFileIcon(e)),_.createElement(tt,null,e.label),this.props.schema.delete&&e.value?_.createElement(ur,{style:xS.deleteButton,size:`small`,onClick:t=>{t.stopPropagation(),this.setState({deleteFile:e.value})}},_.createElement(we,null)):null))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&_.createElement(ur,{onClick:()=>this.updateFiles()},_.createElement($e,null)),this.props.schema.upload&&_.createElement(ur,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},_.createElement(Xe,null)),o&&_.createElement(ur,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Tt,null)));if(!this.props.schema.upload)return _.createElement(_.Fragment,null,s,this.renderDeleteDialog());let c={"*/*":[]};if(this.props.schema.fileTypes===`image`?c={"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:this.props.schema.fileTypes===`audio`?c={"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:this.props.schema.fileTypes===`text`&&(c={"text/plain":[`.txt`]}),this.props.schema.pattern){let e=(this.props.schema.pattern.split(`/`).pop()||``).toLowerCase().replace(/.*\./,``);c=e===`png`||e===`jpg`||e===`svg`||e===`gif`||e===`apng`||e===`avif`||e===`webp`?{"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:e===`mp3`||e===`ogg`||e===`wav`?{"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:e===`ics`?{"text/calendar":[`.ics`]}:e===`txt`?{"text/plain":[`.txt`]}:e===`pem`?{"text/plain":[`.pem`]}:{"*/*":[`.${e}`]}}return _.createElement(gS,{ref:this.dropzoneRef,multiple:!1,accept:c,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2097152,onDragEnter:()=>{this.setState({uploadFile:`dragging`})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||K.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:n})=>_.createElement(`div`,{style:{...xS.uploadDiv,...this.state.uploadFile===`dragging`?xS.uploadDivDragging:void 0,...t?xS.disabledOpacity:void 0},...e()},_.createElement(`input`,{...n()}),this.state.uploadFile===`dragging`?_.createElement(`div`,{style:{...xS.uploadCenterDiv,...this.state.uploadError?xS.error:void 0}},_.createElement(`div`,{style:xS.uploadCenterTextAndIcon},_.createElement(Xe,{style:xS.uploadCenterIcon}),_.createElement(`div`,{style:xS.uploadCenterText},this.state.uploadFile===`dragging`?K.t(`jc_Drop file here`):K.t(`jc_Place your files here or click here to open the browse dialog`)))):null,s,this.renderDeleteDialog()))}};g();var OS={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}},kS=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],AS=[`mp3`,`ogg`,`wav`,`aac`],jS=[`avi`,`mp4`,`mov`],MS=[`txt`,`log`,`html`,`htm`],NS=[`json`,`js`,`ts`],PS=class extends X{constructor(...e){super(...e),q(this,`imagePrefix`,`../..`)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??`./files`,this.setState({value:e??``})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||``).toString().trim()?{value:n??``}:null}loadFile(){let e=this.state.value.indexOf(`/`);if(e!==-1){let t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<`u`&&e!=null&&e.file){let t=new AudioContext,n=DS.base64ToArrayBuffer(e.file);t.decodeAudioData(n,e=>{let n=t.createBufferSource();n.buffer=e,n.connect(t.destination),n.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getIcon(){let e=this.state.value.split(`.`).pop().toLowerCase();return kS.includes(e)?_.createElement(`div`,{style:{...OS.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):AS.includes(e)?_.createElement(ur,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Tt,null)):MS.includes(e)?_.createElement(Vt,null):jS.includes(e)?_.createElement(te,null):NS.includes(e)?_.createElement(ce,null):null}renderFileBrowser(){return this.state.showFileBrowser?_.createElement(Hn,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:OS.fullWidth},n,_.createElement(ft,{variant:`standard`,style:n?OS.fullWidthIcon:OS.fullWidthOneButton,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),_.createElement(Ge,{disabled:t,variant:`outlined`,onClick:()=>this.setState({showFileBrowser:!0})},`...`),this.renderFileBrowser())}};g();var FS=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`functions`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.functions.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(jn,{value:n.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(jn,{value:e.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):e.label))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var IS=class extends X{constructor(...e){super(...e),q(this,`iframeRef`,_.createRef()),q(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){let n=this.props.schema.url||X.getValue(this.props.data,this.props.attr);return _.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}}))}};g();var LS=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0),q(this,`iframeRef`,_.createRef()),q(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({url:e||``}))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url?_.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}})):null}};g();var RS=class extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.common)!=null&&e.host&&this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(e=>e.address!==`0.0.0.0`&&e.address!==`::`)),this.props.schema.onlyIp4?e=e.filter(e=>e.family===`ipv4`):this.props.schema.onlyIp6&&(e=e.filter(e=>e.family===`ipv6`)),this.props.schema.noInternal&&(e=e.filter(e=>!e.internal)),e.forEach(e=>{e.address===`0.0.0.0`?e.name=`[IPv4] 0.0.0.0 - ${K.t(`jc_Listen on all IPs`)}`:e.address===`::`&&(e.name=`[IPv6] :: - ${K.t(`jc_Listen on all IPs`)}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr),a=(n=this.state.ips)==null?void 0:n.find(e=>e.address===i);return _.createElement(Mn,{fullWidth:!0,variant:`standard`},this.state.ips&&this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,this.state.ips?_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>(a==null?void 0:a.name)||e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},(r=this.state.ips)==null?void 0:r.map((e,t)=>_.createElement(Ie,{key:t,value:e.address},e.name))):_.createElement(ft,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var zS=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({image:e||``})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?_.createElement(`div`,{style:{width:this.props.schema.width||`100%`,height:this.props.schema.height,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?K.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:_.createElement(Pt,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||`100%`,height:this.props.schema.height}})}};g();var BS=class extends X{constructor(e){super(e),q(this,`index`,void 0),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.attr&&this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port===`3000`&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{let t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return _.createElement(Mn,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(yn,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||262144,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.attr)if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(e=>console.error(e))}),onChange:e=>this.setState({value:e},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else e.startsWith(`data`)&&(e=e.split(`,`)[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,e).catch(e=>console.error(e))}})}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var VS=class extends X{renderItem(){return _.createElement(Xn,{type:this.props.schema.boxType||`info`,closeable:this.props.schema.closeable===void 0||this.props.schema.closeable,storeId:this.props.schema.closed===void 0?`${!!this.props.oContext.adapterName} ${this.props.attr}`:void 0,closed:this.props.schema.closed,style:{width:`100%`,...this.props.schema.style}},this.props.schema.title?_.createElement(ht,{component:`div`,sx:{fontWeight:`bold`,fontSize:`larger`}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}};g();var HS={icon:{width:20,height:20,marginRight:4}},US=class extends X{constructor(...e){super(...e),q(this,`onInstancesUpdate`,(e,t)=>{var n;if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;let r=this.props.schema.long?e:this.props.schema.short?e.split(`.`).pop():e.replace(/^system\.adapter\./,``),i=((n=this.state.selectOptions)==null?void 0:n.findIndex(e=>e.value===r))??-1;if(t){if(this.props.schema.adapter===`_dataSources`&&(!t.common||!t.common.getHistory))return;if(i===-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),n=typeof t.common.name==`object`?t.common.name[K.getLanguage()]||t.common.name.en:t.common.name;e.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(`.`).pop()||``:t._id.replace(/^system\.adapter\./,``),label:`${n} [${t._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${n}/${t.common.icon}`}),e.sort((e,t)=>e.label>t.label?1:e.label<t.label?-1:0),this.setState({selectOptions:e})}}else if(i!==-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),t={};this.state.value===e[i].value&&(t.value=X.NONE_VALUE),e.splice(i,1),t.selectOptions=e,this.setState(t)}})}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.adapter;t===`_dataSources`&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter===`_dataSources`?n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.getHistory}):this.props.schema.adapter?n=n.filter(e=>e==null?void 0:e._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(e=>{var t,n;return(t=this.props.schema.adapters)==null?void 0:t.includes(e==null||(n=e.common)==null?void 0:n.name)})),this.props.schema.onlyEnabled&&(n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.enabled}));let r=n.map(e=>({value:this.props.schema.long?e._id:this.props.schema.short?e._id.split(`.`).pop()||``:e._id.replace(/^system\.adapter\./,``),label:`${e.common.name} [${e._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${e.common.name}/${e.common.icon}`}));r.sort((e,t)=>e.value>t.value?1:e.value<t.value?-1:0),this.props.schema.allowDeactivate!==!1&&r.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.props.schema.all&&r.unshift({label:K.t(`sch_all`),value:`*`}),this.setState({value:e||``,selectOptions:r}),await this.props.oContext.socket.subscribeObject(`system.adapter.${t?`${t}.`:``}*`,this.onInstancesUpdate)}).catch(e=>console.error(`Cannot get instances: ${e}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject(`system.adapter.*`,this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}renderItem(e,t){var n;if(!this.state.selectOptions)return null;let r=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Mn,{fullWidth:!0,key:this.props.attr,variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>_.createElement(`span`,{style:{display:`flex`}},r!=null&&r.icon?_.createElement(Pt,{src:`./${r.icon}`,style:HS.icon}):null,this.getText(r==null?void 0:r.label,!0)),onChange:e=>this.setState({value:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},e.icon?_.createElement(Pt,{src:`./${e.icon}`,style:HS.icon}):null,this.getText(e.label,!0)))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var WS={address:{fontSize:`smaller`,opacity:.5,marginLeft:8}},GS=class extends X{async componentDidMount(){var e;if(await super.componentDidMount(),(e=this.props.common)!=null&&e.host)try{var t,n,r;let e=await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,`system.host.${this.props.common.host}`)),i=[];if(e!=null&&(r=e.native)!=null&&(r=r.hardware)!=null&&r.networkInterfaces){let t=e.native.hardware.networkInterfaces;Object.keys(t).forEach(e=>{var n,r,a,o;if(this.props.schema.ignoreInternal&&!((n=t[e])!=null&&n.find(e=>!e.internal))||this.props.schema.ignoreLoopback&&(r=t[e])!=null&&r.find(e=>e.address===`127.0.0.1`||e.address===`::1`))return;let s=(a=t[e])==null?void 0:a.find(e=>e.family===`IPv4`);s||=(o=t[e])==null?void 0:o.find(e=>e.family===`IPv6`),i.push({value:e,address:(s==null?void 0:s.address)||``})})}this.setState({interfaces:i})}catch(e){window.alert(`Cannot read interfaces: ${e}`)}}renderItem(e,t){var n,r,i;let a=X.getValue(this.props.data,this.props.attr),o=(n=this.state.interfaces)==null?void 0:n.find(e=>e.value===a);return _.createElement(Mn,{fullWidth:!0,variant:`standard`},(r=this.state.interfaces)!=null&&r.length&&this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,(i=this.state.interfaces)!=null&&i.length?_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:a,renderValue:e=>o?_.createElement(`span`,null,o.value,_.createElement(`span`,{style:WS.address},o.address)):e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},this.state.interfaces.map((e,t)=>_.createElement(Ie,{key:t,value:e.value},_.createElement(`span`,null,e.value,_.createElement(`span`,{style:WS.address},e.address))))):_.createElement(ft,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:a,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var KS={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`}},qS=({toggleTranslation:e,noTranslation:t,title:n,fullWidth:r,help:i,maxWidth:o,progress:s,applyDisabled:c,applyButton:l,onClose:d,children:f,titleButtonApply:p,titleButtonClose:m,onApply:h,textInput:g,defaultValue:v,overflowHidden:y})=>{let[b,x]=u(v);a(()=>{x(v)},[v]);let S=xt(),C=vt(S.breakpoints.down(`md`));return _.createElement(Dt,{open:!0,maxWidth:C?!1:o||`md`,fullWidth:!!r,fullScreen:C,onClose:d,sx:{"& .MuiPaper-root":C?{}:KS.modalDialog}},n&&_.createElement(gn,null,n,K.getLanguage()!==`en`&&e?_.createElement(ur,{size:`large`,style:{...KS.languageButton,...t?KS.languageButtonActive:{}},onClick:()=>e(),title:K.t(`jc_Disable/Enable translation`)},_.createElement(En,null)):null),_.createElement(Un,{sx:{...y?KS.overflowHidden:{},...KS.content},style:{paddingTop:8}},g&&_.createElement(ft,{autoComplete:`off`,fullWidth:!0,autoFocus:!0,variant:`outlined`,size:`medium`,multiline:!0,value:b,onChange:e=>x(e.target.value)}),f,i?_.createElement(`div`,null,i):null),_.createElement(On,null,l!==!1&&_.createElement(Ge,{startIcon:_.createElement(Oe,null),disabled:s||c&&v===b,onClick:()=>h==null?void 0:h(g&&b||``),variant:`contained`,color:`primary`},K.t(p||`jc_Ok`)),_.createElement(Ge,{color:`grey`,onClick:()=>d&&d(),disabled:s,variant:`contained`,startIcon:_.createElement(je,null)},K.t(m||`jc_Cancel`))))},JS=n(r(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
|
|
19
|
-
/*# sourceURL=ace/css/`+n+` */`);var l=t.createElement(`style`);l.appendChild(c.createTextNode(e)),n&&(l.id=n),i==c&&(i=t.getDocumentHead(c)),i.insertBefore(l,i.firstChild)}}}if(t.importCssString=c,t.importCssStylsheet=function(e,n){t.buildDom([`link`,{rel:`stylesheet`,href:e}],t.getDocumentHead(n))},t.$fixPositionBug=function(e){var t=e.getBoundingClientRect();if(e.style.left){var n=parseFloat(e.style.left),r=+t.left;Math.abs(n-r)>1&&(e.style.left=2*n-r+`px`)}if(e.style.right){var n=parseFloat(e.style.right),r=window.innerWidth-t.right;Math.abs(n-r)>1&&(e.style.right=2*n-r+`px`)}if(e.style.top){var n=parseFloat(e.style.top),r=+t.top;Math.abs(n-r)>1&&(e.style.top=2*n-r+`px`)}if(e.style.bottom){var n=parseFloat(e.style.bottom),r=window.innerHeight-t.bottom;Math.abs(n-r)>1&&(e.style.bottom=2*n-r+`px`)}},t.scrollbarWidth=function(e){var n=t.createElement(`ace_inner`);n.style.width=`100%`,n.style.minWidth=`0px`,n.style.height=`200px`,n.style.display=`block`;var r=t.createElement(`ace_outer`),i=r.style;i.position=`absolute`,i.left=`-10000px`,i.overflow=`hidden`,i.width=`200px`,i.minWidth=`0px`,i.height=`150px`,i.display=`block`,r.appendChild(n);var a=e&&e.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(r);var o=n.offsetWidth;i.overflow=`scroll`;var s=n.offsetWidth;return o===s&&(s=r.clientWidth),a.removeChild(r),o-s},t.computedStyle=function(e,t){return window.getComputedStyle(e,``)||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!r.isWin||typeof window<`u`&&window.devicePixelRatio>=1.5,r.isChromeOS&&(t.HI_DPI=!1),typeof document<`u`){var l=document.createElement(`div`);t.HI_DPI&&l.style.transform!==void 0&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&l.style.animationName!==void 0&&(t.HAS_CSS_ANIMATION=!0),l=null}t.translate=t.HAS_CSS_TRANSFORMS?function(e,t,n){e.style.transform=`translate(`+Math.round(t)+`px, `+Math.round(n)+`px)`}:function(e,t,n){e.style.top=Math.round(n)+`px`,e.style.left=Math.round(t)+`px`}}),ace.define(`ace/lib/net`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open(`GET`,e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement(`script`);i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){(n||!i.readyState||i.readyState==`loaded`||i.readyState==`complete`)&&(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement(`a`);return t.href=e,t.href}}),ace.define(`ace/lib/oop`,[`require`,`exports`,`module`],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define(`ace/lib/event_emitter`,[`require`,`exports`,`module`],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||={},this._defaultHandlers||={};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!(!n.length&&!r)){(typeof t!=`object`||!t)&&(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=a),n=n.slice();for(var o=0;o<n.length&&(n[o](t,this),!t.propagationStopped);o++);if(r&&!t.defaultPrevented)return r(t,this)}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||=this._defaultHandlers={_disabled_:{}},n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var a=i.indexOf(t);a!=-1&&i.splice(a,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||=this._eventRegistry[e]=[],r.indexOf(t)==-1&&r[n?`unshift`:`push`](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);r!==-1&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define(`ace/lib/report_error`,[`require`,`exports`,`module`],function(e,t,n){t.reportError=function(e,t){var n=Error(e);n.data=t,typeof console==`object`&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define(`ace/lib/default_english_messages`,[`require`,`exports`,`module`],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":`Autocomplete suggestions`,"autocomplete.popup.aria-label":`Autocomplete suggestions`,"autocomplete.popup.item.aria-roledescription":`item`,"autocomplete.loading":`Loading...`,"editor.scroller.aria-roledescription":`editor`,"editor.scroller.aria-label":`Editor content, press Enter to start editing, press Escape to exit`,"editor.gutter.aria-roledescription":`editor gutter`,"editor.gutter.aria-label":`Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit`,"error-marker.good-state":`Looks good!`,"prompt.recently-used":`Recently used`,"prompt.other-commands":`Other commands`,"prompt.no-matching-commands":`No matching commands`,"search-box.find.placeholder":`Search for`,"search-box.find-all.text":`All`,"search-box.replace.placeholder":`Replace with`,"search-box.replace-next.text":`Replace`,"search-box.replace-all.text":`All`,"search-box.toggle-replace.title":`Toggle Replace mode`,"search-box.toggle-regexp.title":`RegExp Search`,"search-box.toggle-case.title":`CaseSensitive Search`,"search-box.toggle-whole-word.title":`Whole Word Search`,"search-box.toggle-in-selection.title":`Search In Selection`,"search-box.search-counter":`$0 of $1`,"text-input.aria-roledescription":`editor`,"text-input.aria-label":`Cursor at row $0`,"gutter.code-folding.range.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.closed.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.open.aria-label":`Toggle code folding, row $0`,"gutter.code-folding.closed.title":`Unfold code`,"gutter.code-folding.open.title":`Fold code`,"gutter.annotation.aria-label.error":`Error, read annotations row $0`,"gutter.annotation.aria-label.warning":`Warning, read annotations row $0`,"gutter.annotation.aria-label.info":`Info, read annotations row $0`,"inline-fold.closed.title":`Unfold code`,"gutter-tooltip.aria-label.error.singular":`error`,"gutter-tooltip.aria-label.error.plural":`errors`,"gutter-tooltip.aria-label.warning.singular":`warning`,"gutter-tooltip.aria-label.warning.plural":`warnings`,"gutter-tooltip.aria-label.info.singular":`information message`,"gutter-tooltip.aria-label.info.plural":`information messages`,"gutter.annotation.aria-label.security":`Security finding, read annotations row $0`,"gutter.annotation.aria-label.hint":`Suggestion, read annotations row $0`,"gutter-tooltip.aria-label.security.singular":`security finding`,"gutter-tooltip.aria-label.security.plural":`security findings`,"gutter-tooltip.aria-label.hint.singular":`suggestion`,"gutter-tooltip.aria-label.hint.plural":`suggestions`,"editor.tooltip.disable-editing":`Editing is disabled`}}),ace.define(`ace/lib/app_config`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/report_error`,`ace/lib/default_english_messages`],function(e,t,n){"no use strict";var r=e("./oop"),i=e("./event_emitter").EventEmitter,a=e("./report_error").reportError,o=e("./default_english_messages").defaultEnglishMessages,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this[`$`+e]!==t){var n=this.$options[e];if(!n)return c(`misspelled option "`+e+`"`);if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this[`$`+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this[`$`+e]:c(`misspelled option "`+e+`"`)}};function c(e){typeof console<`u`&&console.warn&&console.warn.apply(console,arguments)}var l,u,d=function(){function e(){this.$defaultOptions={},l=o,u=`dollarSigns`}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r==`string`&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,`initialValue`in r&&(e[`$`+r.name]=r.initialValue)}),r.implement(e,s),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];`value`in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){l=e,t&&t.placeholders&&(u=t.placeholders)},e.prototype.nls=function(e,t,n){l[e]||(c(`No message found for the key '`+e+`' in messages with id `+l.$id+`, trying to find a translation for the default string '`+t+`'.`),l[t]||c(`No message found for the default string '`+t+`' in the provided messages. Falling back to the default English message.`));var r=l[e]||l[t]||t;return n&&(u===`dollarSigns`&&(r=r.replace(/\$(\$|[\d]+)/g,function(e,t){return t==`$`?`$`:n[t]})),u===`curlyBrackets`&&(r=r.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),r},e}();d.prototype.warn=c,d.prototype.reportError=a,r.implement(d.prototype,i),t.AppConfig=d}),ace.define(`ace/theme/textmate-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-tm .ace_gutter {
|
|
20
|
-
background: #f0f0f0;
|
|
21
|
-
color: #333;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.ace-tm .ace_print-margin {
|
|
25
|
-
width: 1px;
|
|
26
|
-
background: #e8e8e8;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.ace-tm .ace_fold {
|
|
30
|
-
background-color: #6B72E6;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.ace-tm {
|
|
34
|
-
background-color: #FFFFFF;
|
|
35
|
-
color: black;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.ace-tm .ace_cursor {
|
|
39
|
-
color: black;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.ace-tm .ace_invisible {
|
|
43
|
-
color: rgb(191, 191, 191);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.ace-tm .ace_storage,
|
|
47
|
-
.ace-tm .ace_keyword {
|
|
48
|
-
color: blue;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.ace-tm .ace_constant {
|
|
52
|
-
color: rgb(197, 6, 11);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.ace-tm .ace_constant.ace_buildin {
|
|
56
|
-
color: rgb(88, 72, 246);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.ace-tm .ace_constant.ace_language {
|
|
60
|
-
color: rgb(88, 92, 246);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.ace-tm .ace_constant.ace_library {
|
|
64
|
-
color: rgb(6, 150, 14);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.ace-tm .ace_invalid {
|
|
68
|
-
background-color: rgba(255, 0, 0, 0.1);
|
|
69
|
-
color: red;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.ace-tm .ace_support.ace_function {
|
|
73
|
-
color: rgb(60, 76, 114);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.ace-tm .ace_support.ace_constant {
|
|
77
|
-
color: rgb(6, 150, 14);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.ace-tm .ace_support.ace_type,
|
|
81
|
-
.ace-tm .ace_support.ace_class {
|
|
82
|
-
color: rgb(109, 121, 222);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.ace-tm .ace_keyword.ace_operator {
|
|
86
|
-
color: rgb(104, 118, 135);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.ace-tm .ace_string {
|
|
90
|
-
color: rgb(3, 106, 7);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.ace-tm .ace_comment {
|
|
94
|
-
color: rgb(76, 136, 107);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.ace-tm .ace_comment.ace_doc {
|
|
98
|
-
color: rgb(0, 102, 255);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.ace-tm .ace_comment.ace_doc.ace_tag {
|
|
102
|
-
color: rgb(128, 159, 191);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.ace-tm .ace_constant.ace_numeric {
|
|
106
|
-
color: rgb(0, 0, 205);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.ace-tm .ace_variable {
|
|
110
|
-
color: rgb(49, 132, 149);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.ace-tm .ace_xml-pe {
|
|
114
|
-
color: rgb(104, 104, 91);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.ace-tm .ace_entity.ace_name.ace_function {
|
|
118
|
-
color: #0000A2;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
.ace-tm .ace_heading {
|
|
123
|
-
color: rgb(12, 7, 255);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.ace-tm .ace_list {
|
|
127
|
-
color:rgb(185, 6, 144);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.ace-tm .ace_meta.ace_tag {
|
|
131
|
-
color:rgb(0, 22, 142);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.ace-tm .ace_string.ace_regex {
|
|
135
|
-
color: rgb(255, 0, 0)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.ace-tm .ace_marker-layer .ace_selection {
|
|
139
|
-
background: rgb(181, 213, 255);
|
|
140
|
-
}
|
|
141
|
-
.ace-tm.ace_multiselect .ace_selection.ace_start {
|
|
142
|
-
box-shadow: 0 0 3px 0px white;
|
|
143
|
-
}
|
|
144
|
-
.ace-tm .ace_marker-layer .ace_step {
|
|
145
|
-
background: rgb(252, 255, 0);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.ace-tm .ace_marker-layer .ace_stack {
|
|
149
|
-
background: rgb(164, 229, 101);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.ace-tm .ace_marker-layer .ace_bracket {
|
|
153
|
-
margin: -1px 0 0 -1px;
|
|
154
|
-
border: 1px solid rgb(192, 192, 192);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.ace-tm .ace_marker-layer .ace_active-line {
|
|
158
|
-
background: rgba(0, 0, 0, 0.07);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.ace-tm .ace_gutter-active-line {
|
|
162
|
-
background-color : #dcdcdc;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.ace-tm .ace_marker-layer .ace_selected-word {
|
|
166
|
-
background: rgb(250, 250, 255);
|
|
167
|
-
border: 1px solid rgb(200, 200, 250);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.ace-tm .ace_indent-guide {
|
|
171
|
-
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.ace-tm .ace_indent-guide-active {
|
|
175
|
-
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
176
|
-
}
|
|
177
|
-
`}),ace.define(`ace/theme/textmate`,[`require`,`exports`,`module`,`ace/theme/textmate-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-tm`,t.cssText=e("./textmate-css"),t.$id=`ace/theme/textmate`,e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),ace.define(`ace/config`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/lib/net`,`ace/lib/dom`,`ace/lib/app_config`,`ace/theme/textmate`],function(e,t,n){"no use strict";var r=e("./lib/lang"),i=e("./lib/net"),a=e("./lib/dom"),o=e("./lib/app_config").AppConfig;n.exports=t=new o;var s={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:``,suffix:`.js`,$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!s.hasOwnProperty(e))throw Error(`Unknown config key: `+e);return s[e]},t.set=function(e,t){if(s.hasOwnProperty(e))s[e]=t;else if(this.setDefaultValue(``,e,t)==0)throw Error(`Unknown config key: `+e);e==`useStrictCSP`&&a.useStrictCSP(t)},t.all=function(){return r.copyObject(s)},t.$modes={},t.moduleUrl=function(e,t){if(s.$moduleUrls[e])return s.$moduleUrls[e];var n=e.split(`/`);t=t||n[n.length-2]||``;var r=t==`snippets`?`/`:`-`,i=n[n.length-1];if(t==`worker`&&r==`-`){var a=RegExp(`^`+t+`[\\-_]|[\\-_]`+t+`$`,`g`);i=i.replace(a,``)}(!i||i==t)&&n.length>1&&(i=n[n.length-2]);var o=s[t+`Path`];return o==null?o=s.basePath:r==`/`&&(t=r=``),o&&o.slice(-1)!=`/`&&(o+=`/`),o+t+r+i+this.get(`suffix`)},t.setModuleUrl=function(e,t){return s.$moduleUrls[e]=t};var c=function(t,n){if(t===`ace/theme/textmate`||t===`./theme/textmate`)return n(null,e("./theme/textmate"));if(l)return l(t,n);console.error(`loader is not configured`)},l;t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,n){var r;if(Array.isArray(e))var a=e[0],o=e[1];else if(typeof e==`string`)var o=e;var s=function(e){if(e&&!t.$loading[o])return n&&n(e);if(t.$loading[o]||(t.$loading[o]=[]),t.$loading[o].push(n),!(t.$loading[o].length>1)){var r=function(){c(o,function(e,n){n&&(t.$loaded[o]=n),t._emit(`load.module`,{name:o,module:n});var r=t.$loading[o];t.$loading[o]=null,r.forEach(function(e){e&&e(n)})})};if(!t.get(`packaged`))return r();i.loadScript(t.moduleUrl(o,a),r),u()}};if(t.dynamicModules[o])t.dynamicModules[o]().then(function(e){e.default?s(e.default):s(e)});else{try{r=this.$require(o)}catch{}s(r||t.$loaded[o])}},t.$require=function(e){if(typeof n.require==`function`)return n.require(e)},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var u=function(){!s.basePath&&!s.workerPath&&!s.modePath&&!s.themePath&&!Object.keys(s.$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`),u=function(){})};t.version=`1.44.0`}),ace.define(`ace/loader_build`,[`require`,`exports`,`module`,`ace/lib/fixoldbrowsers`,`ace/config`],function(e,t,n){e("./lib/fixoldbrowsers");var r=e("./config");r.setLoader(function(t,n){e([t],function(e){n(null,e)})});var i=(function(){return this||typeof window<`u`&&window})();n.exports=function(t){r.init=a,r.$require=e,t.require=e,typeof define==`function`&&(t.define=define)},a(!0);function a(t){if(!(!i||!i.document)){r.set(`packaged`,t||e.packaged||n.packaged||i.define&&define.packaged);var a={},s=``,c=document.currentScript||document._currentScript,l=c&&c.ownerDocument||document;c&&c.src&&(s=c.src.split(/[?#]/)[0].split(`/`).slice(0,-1).join(`/`)||``);for(var u=l.getElementsByTagName(`script`),d=0;d<u.length;d++){var f=u[d],p=f.src||f.getAttribute(`src`);if(p){for(var m=f.attributes,h=0,g=m.length;h<g;h++){var _=m[h];_.name.indexOf(`data-ace-`)===0&&(a[o(_.name.replace(/^data-ace-/,``))]=_.value)}var v=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);v&&(s=v[1])}}for(var y in s&&(a.base=a.base||s,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)a[y]!==void 0&&r.set(y,a[y])}}function o(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}),ace.define(`ace/range`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return`Range: [`+this.start.row+`/`+this.start.column+`] -> [`+this.end.row+`/`+this.end.column+`]`},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:+(t==0)):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e==`object`?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e==`object`?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0&&!(this.isEnd(e,t)||this.isStart(e,t))},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:+(t>this.end.column):e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)var r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)var i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(r==0)return this;if(r==-1)var i={row:t,column:n};else var a={row:t,column:n};return e.fromPoints(i||this.start,a||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return this.end.column==0?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),ace.define(`ace/lib/keys`,[`require`,`exports`,`module`,`ace/lib/oop`],function(e,t,n){for(var r=e("./oop"),i={MODIFIER_KEYS:{16:`Shift`,17:`Ctrl`,18:`Alt`,224:`Meta`,91:`MetaLeft`,92:`MetaRight`,93:`ContextMenu`},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:`Backspace`,9:`Tab`,13:`Return`,19:`Pause`,27:`Esc`,32:`Space`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,44:`Print`,45:`Insert`,46:`Delete`,"-13":`NumpadEnter`,144:`Numlock`,145:`Scrolllock`},PRINTABLE_KEYS:{32:` `,59:`;`,61:`=`,107:`+`,109:`-`,110:`.`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`,111:`/`,106:`*`}},a={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},o=0;o<10;o++)a[`Digit`+o]=48+o,a[`Numpad`+o]=96+o,i.PRINTABLE_KEYS[48+o]=``+o,i.FUNCTION_KEYS[96+o]=`Numpad`+o;for(var o=65;o<91;o++){var s=String.fromCharCode(o+32);a[`Key`+s.toUpperCase()]=o,i.PRINTABLE_KEYS[o]=s}for(var o=1;o<13;o++)a[`F`+o]=111+o,i.FUNCTION_KEYS[111+o]=`F`+o;var c={Shift:16,Control:17,Alt:18,Meta:224};for(var l in c)a[l]=a[l+`Left`]=a[l+`Right`]=c[l];for(var u in t.$codeToKeyCode=a,i.PRINTABLE_KEYS[173]=`-`,i.FUNCTION_KEYS){var d=i.FUNCTION_KEYS[u].toLowerCase();i[d]=parseInt(u,10)}for(var u in i.PRINTABLE_KEYS){var d=i.PRINTABLE_KEYS[u].toLowerCase();i[d]=parseInt(u,10)}r.mixin(i,i.MODIFIER_KEYS),r.mixin(i,i.PRINTABLE_KEYS),r.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,(function(){for(var e=[`cmd`,`ctrl`,`alt`,`shift`],t=2**e.length;t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join(`-`)+`-`})(),i.KEY_MODS[0]=``,i.KEY_MODS[-1]=`input-`,r.mixin(t,i),t.default=t,t.keyCodeToString=function(e){var t=i[e];return typeof t!=`string`&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define(`ace/lib/event`,[`require`,`exports`,`module`,`ace/lib/keys`,`ace/lib/useragent`],function(e,t,n){var r=e("./keys"),i=e("./useragent"),a=null,o=0,s;function c(){s=!1;try{document.createComment(``).addEventListener(`test`,function(){},{get passive(){return s={passive:!1},!0}})}catch{}}function l(){return s??c(),s}function u(e,t,n){this.elem=e,this.type=t,this.callback=n}u.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var d=t.addListener=function(e,t,n,r){e.addEventListener(t,n,l()),r&&r.$toDestroy.push(new u(e,t,n))},f=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return e.type==`dblclick`?0:e.type==`contextmenu`||i.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var r=e&&e.ownerDocument||document;function i(e){t&&t(e),n&&n(e),f(r,`mousemove`,t),f(r,`mouseup`,i),f(r,`dragstart`,i)}return d(r,`mousemove`,t),d(r,`mouseup`,i),d(r,`dragstart`,i),i},t.addMouseWheelListener=function(e,t,n){d(e,`wheel`,function(e){var n=.15,r=e.deltaX||0,i=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=r*n,e.wheelY=i*n;break;case e.DOM_DELTA_LINE:var a=15;e.wheelX=r*a,e.wheelY=i*a;break;case e.DOM_DELTA_PAGE:var o=150;e.wheelX=r*o,e.wheelY=i*o}t(e)},n)},t.addMultiMouseDownListener=function(e,n,r,a,o){var s=0,c,l,u,f={2:`dblclick`,3:`tripleclick`,4:`quadclick`};function p(e){if(t.getButton(e)===0?e.detail>1?(s++,s>4&&(s=1)):s=1:s=0,i.isIE){var o=Math.abs(e.clientX-c)>5||Math.abs(e.clientY-l)>5;(!u||o)&&(s=1),u&&clearTimeout(u),u=setTimeout(function(){u=null},n[s-1]||600),s==1&&(c=e.clientX,l=e.clientY)}if(e._clicks=s,r[a](`mousedown`,e),s>4)s=0;else if(s>1)return r[a](f[s],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){d(e,`mousedown`,p,o)})};function p(e){return 0|!!e.ctrlKey|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}t.getModifierString=function(e){return r.KEY_MODS[p(e)]};function m(e,t,n){var s=p(t);if(!n&&t.code&&(n=r.$codeToKeyCode[t.code]||n),!i.isMac&&a){if(t.getModifierState&&(t.getModifierState(`OS`)||t.getModifierState(`Win`))&&(s|=8),a.altGr)if((3&s)!=3)a.altGr=0;else return;if(n===18||n===17){var c=t.location;n===17&&c===1?a[n]==1&&(o=t.timeStamp):n===18&&s===3&&c===2&&t.timeStamp-o<50&&(a.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),!(!s&&n===13&&t.location===3&&(e(t,s,-n),t.defaultPrevented))){if(i.isChromeOS&&s&8){if(e(t,s,n),t.defaultPrevented)return;s&=-9}return!s&&!(n in r.FUNCTION_KEYS)&&!(n in r.PRINTABLE_KEYS)?!1:e(t,s,n)}}t.addCommandKeyListener=function(e,n,r){var i=null;d(e,`keydown`,function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=m(n,e,e.keyCode);return i=e.defaultPrevented,t},r),d(e,`keypress`,function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)},r),d(e,`keyup`,function(e){a[e.keyCode]=null},r),a||(h(),d(window,`focus`,h))};function h(){a=Object.create(null)}if(typeof window==`object`&&window.postMessage&&!i.isOldIE){var g=1;t.nextTick=function(e,n){n||=window;var r=`zero-timeout-message-`+g++,i=function(a){a.data==r&&(t.stopPropagation(a),f(n,`message`,i),e())};d(n,`message`,i),n.postMessage(r,`*`)}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function n(){t.$idleBlocked?setTimeout(n,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame=typeof window==`object`&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame=t.nextFrame?t.nextFrame.bind(window):function(e){setTimeout(e,17)}}),ace.define(`ace/clipboard`,[`require`,`exports`,`module`],function(e,t,n){var r;n.exports={lineMode:!1,pasteCancelled:function(){return r&&r>Date.now()-50?!0:r=!1},cancel:function(){r=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(e,t,n){var r=e("../lib/event"),i=e("../config").nls,a=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),c=e("../clipboard"),l=a.isChrome<18,u=a.isIE,d=a.isChrome>63,f=400,p=e("../lib/keys"),m=p.KEY_MODS,h=a.isIOS,g=h?/\s/:/\n/,_=a.isMobile;t.TextInput=function(){function e(e,t){var n=this;this.host=t,this.text=o.createElement(`textarea`),this.text.className=`ace_text-input`,this.text.setAttribute(`wrap`,`off`),this.text.setAttribute(`autocomplete`,`off`),this.text.setAttribute(`autocorrect`,`off`),this.text.setAttribute(`autocapitalize`,`off`),this.text.setAttribute(`spellcheck`,`false`),this.text.style.opacity=`0`,e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle=``,_||(this.text.style.fontSize=`1px`),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue=``,this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=2**53-1,this.rowEnd=-(2**53-1),this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:`textbox`}),r.addListener(this.text,`blur`,function(e){n.ignoreFocusEvents||(t.onBlur(e),n.$isFocused=!1)},t),r.addListener(this.text,`focus`,function(e){if(!n.ignoreFocusEvents){if(n.$isFocused=!0,a.isEdge)try{if(!document.hasFocus())return}catch{}t.onFocus(e),a.isEdge?setTimeout(n.resetSelection.bind(n)):n.resetSelection()}},t),this.$focusScroll=!1,t.on(`beforeEndOperation`,function(){var e=t.curOp,r=e&&e.command&&e.command.name;if(r!=`insertstring`){var i=r&&(e.docChanged||e.selectionChanged);n.inComposition&&i&&(n.lastValue=n.text.value=``,n.onCompositionEnd()),n.resetSelection()}}),t.on(`changeSelection`,this.setAriaLabel.bind(this)),this.resetSelection=h?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,r.addCommandKeyListener(this.text,function(e,r,i){if(!n.inComposition)return t.onCommandKey(e,r,i)},t),r.addListener(this.text,`select`,this.onSelect.bind(this),t),r.addListener(this.text,`input`,this.onInput.bind(this),t),r.addListener(this.text,`cut`,this.onCut.bind(this),t),r.addListener(this.text,`copy`,this.onCopy.bind(this),t),r.addListener(this.text,`paste`,this.onPaste.bind(this),t),(!(`oncut`in this.text)||!(`oncopy`in this.text)||!(`onpaste`in this.text))&&r.addListener(e,`keydown`,function(e){if(!(a.isMac&&!e.metaKey||!e.ctrlKey))switch(e.keyCode){case 67:n.onCopy(e);break;case 86:n.onPaste(e);break;case 88:n.onCut(e)}},t),this.syncComposition=s.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),r.addListener(this.text,`compositionstart`,this.onCompositionStart.bind(this),t),r.addListener(this.text,`compositionupdate`,this.onCompositionUpdate.bind(this),t),r.addListener(this.text,`keyup`,this.onKeyup.bind(this),t),r.addListener(this.text,`keydown`,this.syncComposition.bind(this),t),r.addListener(this.text,`compositionend`,this.onCompositionEnd.bind(this),t),this.closeTimeout,r.addListener(this.text,`mouseup`,this.$onContextMenu.bind(this),t),r.addListener(this.text,`mousedown`,function(e){e.preventDefault(),n.onContextMenuClose()},t),r.addListener(t.renderer.scroller,`contextmenu`,this.$onContextMenu.bind(this),t),r.addListener(this.text,`contextmenu`,this.$onContextMenu.bind(this),t),h&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,n){var r=this,i=null,a=!1;n.addEventListener(`keydown`,function(e){i&&clearTimeout(i),a=!0},!0),n.addEventListener(`keyup`,function(e){i=setTimeout(function(){a=!1},100)},!0);var o=function(e){if(document.activeElement===n&&!(a||r.inComposition||t.$mouseHandler.isMousePressed)&&!r.copied){var i=n.selectionStart,o=n.selectionEnd,s=null,c=0;if(i==0?s=p.up:i==1?s=p.home:o>r.lastSelectionEnd&&r.lastValue[o]==`
|
|
178
|
-
`?s=p.end:i<r.lastSelectionStart&&r.lastValue[i-1]==` `?(s=p.left,c=m.option):i<r.lastSelectionStart||i==r.lastSelectionStart&&r.lastSelectionEnd!=r.lastSelectionStart&&i==o?s=p.left:o>r.lastSelectionEnd&&r.lastValue.slice(0,o).split(`
|
|
179
|
-
`).length>2?s=p.down:o>r.lastSelectionEnd&&r.lastValue[o-1]==` `?(s=p.right,c=m.option):(o>r.lastSelectionEnd||o==r.lastSelectionEnd&&r.lastSelectionEnd!=r.lastSelectionStart&&i==o)&&(s=p.right),i!==o&&(c|=m.shift),s){if(!t.onCommandKey({},c,s)&&t.commands){s=p.keyCodeToString(s);var l=t.commands.findKeyCommand(c,s);l&&t.execCommand(l)}r.lastSelectionStart=i,r.lastSelectionEnd=o,r.resetSelection(``)}}};document.addEventListener(`selectionchange`,o),t.on(`destroy`,function(){document.removeEventListener(`selectionchange`,o)})},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){e.tempStyle&&=(e.text.style.cssText=e.tempStyle,``),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()},0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){e.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},e.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},e.prototype.onCompositionStart=function(e){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){e.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal(`compositionStart`),this.host.on(`mousedown`,this.cancelComposition);var t=this.host.getSelectionRange();t.end.row=t.start.row,t.end.column=t.start.column,this.inComposition.markerRange=t,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value=``,this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},e.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var e=this.text.value;this.sendText(e),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},e.prototype.onCompositionEnd=function(e){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off(`mousedown`,this.cancelComposition),e&&this.onInput())},e.prototype.onCut=function(e){this.doCopy(e,!0)},e.prototype.onCopy=function(e){this.doCopy(e,!1)},e.prototype.onPaste=function(e){var t=this.handleClipboardData(e);c.pasteCancelled()||(typeof t==`string`?(t&&this.host.onPaste(t,e),a.isIE&&setTimeout(this.resetSelection),r.preventDefault(e)):(this.text.value=``,this.pasted=!0))},e.prototype.doCopy=function(e,t){var n=this,i=this.host.getCopyText();if(!i)return r.preventDefault(e);this.handleClipboardData(e,i)?(h&&(this.resetSelection(i),this.copied=i,setTimeout(function(){n.copied=!1},10)),t?this.host.onCut():this.host.onCopy(),r.preventDefault(e)):(this.copied=!0,this.text.value=i,this.text.select(),setTimeout(function(){n.copied=!1,n.resetSelection(),t?n.host.onCut():n.host.onCopy()}))},e.prototype.handleClipboardData=function(e,t,n){var r=e.clipboardData||window.clipboardData;if(!(!r||l)){var i=u||n?`Text`:`text/plain`;try{return t?r.setData(i,t)!==!1:r.getData(i)}catch(e){if(!n)return this.handleClipboardData(e,t,!0)}}},e.prototype.onInput=function(e){if(this.inComposition)return this.onCompositionUpdate();if(e&&e.inputType){if(e.inputType==`historyUndo`)return this.host.execCommand(`undo`);if(e.inputType==`historyRedo`)return this.host.execCommand(`redo`)}var t=this.text.value,n=this.sendText(t,!0);(t.length>f+100||g.test(n)||_&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&=!1,this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,``;for(var n=this.text.selectionStart,r=this.text.selectionEnd,i=this.lastSelectionStart,o=this.lastValue.length-this.lastSelectionEnd,s=e,c=e.length-n,l=e.length-r,u=0;i>0&&this.lastValue[u]==e[u];)u++,i--;for(s=s.slice(u),u=1;o>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==e[e.length-u];)u++,o--;c-=u-1,l-=u-1;var d=s.length-u+1;if(d<0&&(i=-d,d=0),s=s.slice(0,d),!t&&!s&&!c&&!i&&!o&&!l)return``;this.sendingText=!0;var f=!1;return a.isAndroid&&s==`. `&&(s=` `,f=!0),s&&!i&&!o&&!c&&!l||this.commandMode?this.host.onTextInput(s):this.host.onTextInput(s,{extendLeft:i,extendRight:o,restoreStart:c,restoreEnd:l}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=n,this.lastSelectionEnd=r,this.lastRestoreEnd=l,f?`
|
|
180
|
-
`:s},e.prototype.onSelect=function(e){var t=this;this.inComposition||(this.copied?this.copied=!1:function(e){return e.selectionStart===0&&e.selectionEnd>=t.lastValue.length&&e.value===t.lastValue&&t.lastValue&&e.selectionEnd!==t.lastSelectionEnd}(this.text)?(this.host.selectAll(),this.resetSelection()):_&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},e.prototype.$resetSelectionIOS=function(e){if(!(!this.$isFocused||this.copied&&!e||this.sendingText)){e||=``;var t=`
|
|
181
|
-
ab`+e+`cde fg
|
|
182
|
-
`;t!=this.text.value&&(this.text.value=this.lastValue=t);var n=4,r=4+(e.length||+!this.host.selection.isEmpty());(this.lastSelectionStart!=n||this.lastSelectionEnd!=r)&&this.text.setSelectionRange(n,r),this.lastSelectionStart=n,this.lastSelectionEnd=r}},e.prototype.$resetSelection=function(){var e=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var t=0,n=0,r=``,i=function(t,n){for(var r=n,i=1;i<=t-e.rowStart&&i<2*e.numberOfExtraLines+1;i++)r+=e.host.session.getLine(t-i).length+1;return r};if(this.host.session){var a=this.host.selection,o=a.getRange(),s=a.cursor.row;s===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):s===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(s<this.rowStart-1||s>this.rowEnd+1)&&(this.rowStart=s>this.numberOfExtraLines?s-this.numberOfExtraLines:0,this.rowEnd=s>this.numberOfExtraLines?s+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var c=[],l=this.rowStart;l<=this.rowEnd;l++)c.push(this.host.session.getLine(l));if(r=c.join(`
|
|
183
|
-
`),t=i(o.start.row,o.start.column),n=i(o.end.row,o.end.column),o.start.row<this.rowStart){var u=this.host.session.getLine(this.rowStart-1);t=o.start.row<this.rowStart-1?0:t,n+=u.length+1,r=u+`
|
|
184
|
-
`+r}else if(o.end.row>this.rowEnd){var d=this.host.session.getLine(this.rowEnd+1);n=o.end.row>this.rowEnd+1?d.length:o.end.column,n+=r.length+1,r=r+`
|
|
185
|
-
`+d}else _&&s>0&&(r=`
|
|
186
|
-
`+r,n+=1,t+=1);r.length>f&&(t<f&&n<f?r=r.slice(0,f):(r=`
|
|
187
|
-
`,t==n?t=n=0:(t=0,n=1)));var p=r+`
|
|
188
|
-
|
|
189
|
-
`;p!=this.lastValue&&(this.text.value=this.lastValue=p,this.lastSelectionStart=this.lastSelectionEnd=p.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=n||this.lastSelectionStart!=t||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(t,n),this.lastSelectionStart=t,this.lastSelectionEnd=n}catch{}this.inComposition=!1}},e.prototype.setHost=function(e){this.host=e},e.prototype.setNumberOfExtraLines=function(e){if(this.rowStart=2**53-1,this.rowEnd=-(2**53-1),e<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=e},e.prototype.setAriaLabel=function(){var e=``;if(this.host.$textInputAriaLabel&&(e+=`${this.host.$textInputAriaLabel}, `),this.host.session){var t=this.host.session.selection.cursor.row;e+=i(`text-input.aria-label`,`Cursor at row $0`,[t+1])}this.text.setAttribute(`aria-label`,e)},e.prototype.setAriaOptions=function(e){e.activeDescendant?(this.text.setAttribute(`aria-haspopup`,`true`),this.text.setAttribute(`aria-autocomplete`,e.inline?`both`:`list`),this.text.setAttribute(`aria-activedescendant`,e.activeDescendant)):(this.text.setAttribute(`aria-haspopup`,`false`),this.text.setAttribute(`aria-autocomplete`,`both`),this.text.removeAttribute(`aria-activedescendant`)),e.role&&this.text.setAttribute(`role`,e.role),e.setLabel&&(this.text.setAttribute(`aria-roledescription`,i(`text-input.aria-roledescription`,`editor`)),this.setAriaLabel())},e.prototype.focus=function(){var e=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||d||this.$focusScroll==`browser`)return this.text.focus({preventScroll:!0});var t=this.text.style.top;this.text.style.position=`fixed`,this.text.style.top=`0px`;try{var n=this.text.getBoundingClientRect().top!=0}catch{return}var r=[];if(n)for(var i=this.text.parentElement;i&&i.nodeType==1;)r.push(i),i.setAttribute(`ace_nocontext`,`true`),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;this.text.focus({preventScroll:!0}),n&&r.forEach(function(e){e.removeAttribute(`ace_nocontext`)}),setTimeout(function(){e.text.style.position=``,e.text.style.top==`0px`&&(e.text.style.top=t)},0)},e.prototype.blur=function(){this.text.blur()},e.prototype.isFocused=function(){return this.$isFocused},e.prototype.setInputHandler=function(e){this.inputHandler=e},e.prototype.getInputHandler=function(){return this.inputHandler},e.prototype.getElement=function(){return this.text},e.prototype.setCommandMode=function(e){this.commandMode=e,this.text.readOnly=!1},e.prototype.setReadOnly=function(e){this.commandMode||(this.text.readOnly=e)},e.prototype.setCopyWithEmptySelection=function(e){},e.prototype.onContextMenu=function(e){this.afterContextMenu=!0,this.resetSelection(),this.host._emit(`nativecontextmenu`,{target:this.host,domEvent:e}),this.moveToMouse(e,!0)},e.prototype.moveToMouse=function(e,t){var n=this;this.tempStyle||=this.text.style.cssText,this.text.style.cssText=(t?`z-index:100000;`:``)+(a.isIE?`opacity:0.1;`:``)+`text-indent: -`+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+`px;`;var i=this.host.container.getBoundingClientRect(),s=o.computedStyle(this.host.container),c=i.top+(parseInt(s.borderTopWidth)||0),l=i.left+(parseInt(s.borderLeftWidth)||0),u=i.bottom-c-this.text.clientHeight-2,d=function(e){o.translate(n.text,e.clientX-l-2,Math.min(e.clientY-c-2,u))};d(e),e.type==`mousedown`&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),a.isWin&&r.capture(this.host.container,d,this.onContextMenuClose.bind(this)))},e.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},e}(),t.$setUserAgentForTests=function(e,t){_=e,h=t}}),ace.define(`ace/mouse/default_handlers`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("../lib/useragent"),i=0,a=550,o=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler(`mousedown`,this.onMouseDown.bind(e)),t.setDefaultHandler(`dblclick`,this.onDoubleClick.bind(e)),t.setDefaultHandler(`tripleclick`,this.onTripleClick.bind(e)),t.setDefaultHandler(`quadclick`,this.onQuadClick.bind(e)),t.setDefaultHandler(`mousewheel`,this.onMouseWheel.bind(e)),[`select`,`startSelect`,`selectEnd`,`selectAllEnd`,`selectByWordsEnd`,`selectByLinesEnd`,`dragWait`,`dragWaitEnd`,`focusWait`].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,`getLineRange`),e.selectByWords=this.extendSelectionBy.bind(e,`getWordRange`)}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,a=e.getButton();if(a!==0){(i.getSelectionRange().isEmpty()||a==1)&&i.selection.moveToPosition(n),a==2&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState(`focusWait`),this.captureMouse(e);return}return this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()},e.prototype.startSelect=function(e,t){e||=this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle(`ace_selecting`),this.setState(`select`))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var i=c(this.$clickSelection,n,t.session);n=i.cursor,e=i.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),i=n.selection[e](r.row,r.column);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(i.start),o=this.$clickSelection.comparePoint(i.end);if(a==-1&&o<=0)t=this.$clickSelection.end,(i.end.row!=r.row||i.end.column!=r.column)&&(r=i.start);else if(o==1&&a>=0)t=this.$clickSelection.start,(i.start.row!=r.row||i.start.column!=r.column)&&(r=i.end);else if(a==-1&&o==1)r=i.end,t=i.start;else{var s=c(this.$clickSelection,r,n.session);r=s.cursor,t=s.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle(`ace_selecting`)},e.prototype.focusWait=function(){(s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>i||Date.now()-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,r=n.session.getBracketRange(t);r?(r.isEmpty()&&(r.start.column--,r.end.column++),this.setState(`select`)):(r=n.selection.getWordRange(t.row,t.column),this.setState(`selectByWords`)),this.$clickSelection=r,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState(`selectByLines`);var r=n.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState(`selectAll`)},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||={t:0,vx:0,vy:0,allowed:0};var n=this.$lastScroll,r=e.domEvent.timeStamp,i=r-n.t,o=i?e.wheelX/i:n.vx,s=i?e.wheelY/i:n.vy;i<a&&(o=(o+n.vx)/2,s=(s+n.vy)/2);var c=Math.abs(o/s),l=!1;if(c>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),c<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?n.allowed=r:r-n.allowed<a&&(Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=r):n.allowed=0),n.t=r,n.vx=o,n.vy=s,l)return t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()}},e}();o.prototype.selectEnd=o.prototype.selectByLinesEnd,o.prototype.selectAllEnd=o.prototype.selectByLinesEnd,o.prototype.selectByWordsEnd=o.prototype.selectByLinesEnd,t.DefaultHandlers=o;function s(e,t,n,r){return Math.sqrt((n-e)**2+(r-t)**2)}function c(e,t,n){if(e.start.row==e.end.row)var r=2*t.column-e.start.column-e.end.column;else if(e.start.row==e.end.row-1&&!e.start.column&&!e.end.column)var r=3*t.column-2*n.getLine(e.start.row).length;else var r=2*t.row-e.start.row-e.end.row;return r<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}}),ace.define(`ace/mouse/mouse_event`,[`require`,`exports`,`module`,`ace/lib/event`,`ace/lib/useragent`],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent");t.MouseEvent=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){r.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){r.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return r.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return i.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}()}),ace.define(`ace/lib/scroll`,[`require`,`exports`,`module`],function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}}),ace.define(`ace/tooltip`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/event`,`ace/range`,`ace/lib/scroll`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=this&&this.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},a=e("./lib/dom");e("./lib/event");var o=e("./range").Range,s=e("./lib/scroll").preventParentScroll,c=`ace_tooltip`,l=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=a.createElement(`div`),this.$element.className=c,this.$element.style.display=`none`,this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+`px`,this.getElement().style.top=t+`px`},e.prototype.setClassName=function(e){a.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.theme&&(this.theme.isDark&&a.removeCssClass(this.getElement(),`ace_dark`),this.theme.cssClass&&a.removeCssClass(this.getElement(),this.theme.cssClass)),e.isDark&&a.addCssClass(this.getElement(),`ace_dark`),e.cssClass&&a.addCssClass(this.getElement(),e.cssClass),this.theme={isDark:e.isDark,cssClass:e.cssClass}},e.prototype.show=function(e,t,n){e!=null&&this.setText(e),t!=null&&n!=null&&this.setPosition(t,n),this.isOpen||=(this.getElement().style.display=`block`,!0)},e.prototype.hide=function(e){this.isOpen&&=(this.getElement().style.display=`none`,this.getElement().className=c,!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),u=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);t!==-1&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,r;this.popups.sort(function(e,t){return t.priority-e.priority});var a=[];try{for(var o=i(this.popups),s=o.next();!s.done;s=o.next()){var c=s.value,l=!0;try{for(var u=(n=void 0,i(a)),d=u.next();!d.done;d=u.next()){var f=d.value;if(this.doPopupsOverlap(f,c)){l=!1;break}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}l?a.push(c):c.hide()}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),r=t.getElement().getBoundingClientRect();return n.left<r.right&&n.right>r.left&&n.top<r.bottom&&n.bottom>r.top},e}());t.popupManager=u,t.Tooltip=l,t.HoverTooltip=function(e){r(t,e);function t(t){t===void 0&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var r=n.getElement();return r.style.whiteSpace=`pre-wrap`,r.style.pointerEvents=`auto`,r.addEventListener(`mouseout`,n.onMouseOut),r.tabIndex=-1,r.addEventListener(`blur`,function(){r.contains(document.activeElement)||this.hide()}.bind(n)),r.addEventListener(`wheel`,s),n}return t.prototype.addToEditor=function(e){e.on(`mousemove`,this.onMouseMove),e.on(`mousedown`,this.hide);var t=e.renderer.getMouseEventTarget();t&&typeof t.removeEventListener==`function`&&t.addEventListener(`mouseout`,this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off(`mousemove`,this.onMouseMove),e.off(`mousedown`,this.hide);var t=e.renderer.getMouseEventTarget();t&&typeof t.removeEventListener==`function`&&t.removeEventListener(`mouseout`,this.onMouseOut,!0),this.timeout&&=(clearTimeout(this.timeout),null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var r=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(r.row,r.column)||n||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;if(this.idleTime-e>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-e);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),r=t.session.getLine(n.row);if(n.column==r.length){var i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),a=t.session.documentToScreenPosition(n.row,n.column);if(a.column!=i.column||a.row!=i.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,r){if(!(r&&r!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var i=e.renderer;this.isOpen||(u.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.range=o.fromPoints(t.start,t.end);var s=i.textToScreenCoordinates(t.start.row,t.start.column),c=i.scroller.getBoundingClientRect();s.pageX<c.left&&(s.pageX=c.left);var l=this.getElement();l.innerHTML=``,l.appendChild(n),l.style.maxHeight=``,l.style.display=`block`,this.$setPosition(e,s,!0,t),a.$fixPositionBug(l)}},t.prototype.$setPosition=function(e,t,n,r){var i=10;n&&this.addMarker(r,e.session);var a=e.renderer,o=this.getElement(),s=o.offsetHeight,c=o.offsetWidth,l=t.pageY,u=t.pageX,d=window.innerHeight-l-a.lineHeight,f=this.$shouldPlaceAbove(s,l,d-i);o.style.maxHeight=(f?l:d)-i+`px`,o.style.top=f?``:l+a.lineHeight+`px`,o.style.bottom=f?window.innerHeight-l+`px`:``,o.style.left=Math.min(u,window.innerWidth-c-i)+`px`},t.prototype.$shouldPlaceAbove=function(e,t,n){return!(t-e<0&&t<n)},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,`ace_highlight-marker`,`text`)},t.prototype.hide=function(e){e&&this.$fromKeyboard&&e.type==`keydown`&&e.code==`Escape`||!e&&document.activeElement==this.getElement()||e&&e.target&&(e.type!=`keydown`||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display=`none`,this.isOpen=!1,u.removePopup(this)))},t.prototype.$registerCloseEvents=function(){window.addEventListener(`keydown`,this.hide,!0),window.addEventListener(`wheel`,this.hide,!0),window.addEventListener(`mousedown`,this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener(`keydown`,this.hide,!0),window.removeEventListener(`wheel`,this.hide,!0),window.removeEventListener(`mousedown`,this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&=(clearTimeout(this.timeout),null),this.lastEvent=null,this.isOpen&&(!e.relatedTarget||this.getElement().contains(e.relatedTarget)||e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains(`ace_content`)||this.hide())},t}(l)}),ace.define(`ace/mouse/default_gutter_handler`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/mouse/mouse_event`,`ace/tooltip`,`ace/config`,`ace/range`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=this&&this.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},a=e("../lib/dom"),o=e("./mouse_event").MouseEvent,s=e("../tooltip").HoverTooltip,c=e("../config").nls,l=e("../range").Range;function u(e){var t=e.editor,n=t.renderer.$gutterLayer;e.$tooltip=new d(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider(function(t,n){var r=t.getDocumentPosition().row;e.$tooltip.showTooltip(r)}),e.editor.setDefaultHandler(`guttermousedown`,function(r){if(!(!t.isFocused()||r.getButton()!=0)&&n.getRegion(r)!=`foldWidgets`){var i=r.getDocumentPosition().row,a=t.session.selection;if(r.getShiftKey())a.selectTo(i,0);else{if(r.domEvent.detail==2)return t.selectAll(),r.preventDefault();e.$clickSelection=t.selection.getLineRange(i)}return e.setState(`selectByLines`),e.captureMouse(r),r.preventDefault()}})}t.GutterHandler=u;var d=function(e){r(t,e);function t(n){var r=e.call(this,n.container)||this;r.id=`gt`+ ++t.$uid,r.editor=n,r.visibleTooltipRow;var i=r.getElement();return i.setAttribute(`role`,`tooltip`),i.setAttribute(`id`,r.id),i.style.pointerEvents=`auto`,r.idleTime=50,r.onDomMouseMove=r.onDomMouseMove.bind(r),r.onDomMouseOut=r.onDomMouseOut.bind(r),r.setClassName(`ace_gutter-tooltip`),r}return t.prototype.onDomMouseMove=function(e){var t=new o(e,this.editor);this.onMouseMove(t,this.editor)},t.prototype.onDomMouseOut=function(e){var t=new o(e,this.editor);this.onMouseOut(t)},t.prototype.addToEditor=function(t){var n=t.renderer.$gutter;n.addEventListener(`mousemove`,this.onDomMouseMove),n.addEventListener(`mouseout`,this.onDomMouseOut),e.prototype.addToEditor.call(this,t)},t.prototype.removeFromEditor=function(t){var n=t.renderer.$gutter;n.removeEventListener(`mousemove`,this.onDomMouseMove),n.removeEventListener(`mouseout`,this.onDomMouseOut),e.prototype.removeFromEditor.call(this,t)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c(`gutter-tooltip.aria-label.error.singular`,`error`),plural:c(`gutter-tooltip.aria-label.error.plural`,`errors`)},security:{singular:c(`gutter-tooltip.aria-label.security.singular`,`security finding`),plural:c(`gutter-tooltip.aria-label.security.plural`,`security findings`)},warning:{singular:c(`gutter-tooltip.aria-label.warning.singular`,`warning`),plural:c(`gutter-tooltip.aria-label.warning.plural`,`warnings`)},info:{singular:c(`gutter-tooltip.aria-label.info.singular`,`information message`),plural:c(`gutter-tooltip.aria-label.info.plural`,`information messages`)},hint:{singular:c(`gutter-tooltip.aria-label.hint.singular`,`suggestion`),plural:c(`gutter-tooltip.aria-label.hint.plural`,`suggestions`)}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,r=this.editor.renderer.$gutterLayer,i=r.$annotations[e],o=i?{displayText:Array.from(i.displayText),type:Array.from(i.type)}:{displayText:[],type:[]},s=r.session.getFoldLine(e);if(s&&r.$showFoldedAnnotations){for(var c={error:[],security:[],warning:[],info:[],hint:[]},u={error:1,security:2,warning:3,info:4,hint:5},d,f=e+1;f<=s.end.row;f++)if(r.$annotations[f])for(var p=0;p<r.$annotations[f].text.length;p++){var m=r.$annotations[f].type[p];c[m].push(r.$annotations[f].text[p]),(!d||u[m]<u[d])&&(d=m)}if([`error`,`security`,`warning`].includes(d)){var h=`${t.annotationsToSummaryString(c)} in folded code.`;o.displayText.push(h),o.type.push(d+`_fold`)}}if(o.displayText.length===0)return this.hide();for(var g={error:[],security:[],warning:[],info:[],hint:[]},_=r.$useSvgGutterIcons?`ace_icon_svg`:`ace_icon`,f=0;f<o.displayText.length;f++){var v=a.createElement(`span`),y=a.createElement(`span`);(n=y.classList).add.apply(n,[`ace_${o.type[f]}`,_]),y.setAttribute(`aria-label`,`${t.annotationLabels[o.type[f].replace(`_fold`,``)].singular}`),y.setAttribute(`role`,`img`),y.appendChild(a.createTextNode(` `)),v.appendChild(y),v.appendChild(a.createTextNode(o.displayText[f])),v.appendChild(a.createElement(`br`)),g[o.type[f].replace(`_fold`,``)].push(v)}var b=a.createElement(`span`);g.error.forEach(function(e){return b.appendChild(e)}),g.security.forEach(function(e){return b.appendChild(e)}),g.warning.forEach(function(e){return b.appendChild(e)}),g.info.forEach(function(e){return b.appendChild(e)}),g.hint.forEach(function(e){return b.appendChild(e)}),b.setAttribute(`aria-live`,`polite`);var x=this.$findLinkedAnnotationNode(e);x&&x.setAttribute(`aria-describedby`,this.id);var S=l.fromPoints({row:e,column:0},{row:e,column:0});this.showForRange(this.editor,S,b),this.visibleTooltipRow=e,this.editor._signal(`showGutterTooltip`,this)},t.prototype.$setPosition=function(t,n,r,i){var a=this.$findCellByRow(i.start.row);if(a){var o=a&&a.element,s=o&&o.querySelector(`.ace_gutter_annotation`);if(s){var c=s.getBoundingClientRect();if(c){var l={pageX:c.right,pageY:c.top};return e.prototype.$setPosition.call(this,t,l,!1,i)}}}},t.prototype.$shouldPlaceAbove=function(e,t,n){return n<e},t.prototype.$findLinkedAnnotationNode=function(e){var t=this.$findCellByRow(e);if(t){var n=t.element;if(n.childNodes.length>2)return n.childNodes[2]}},t.prototype.$findCellByRow=function(e){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(t){return t.row===e})},t.prototype.hide=function(t){if(this.isOpen){if(this.$element.removeAttribute(`aria-live`),this.visibleTooltipRow!=null){var n=this.$findLinkedAnnotationNode(this.visibleTooltipRow);n&&n.removeAttribute(`aria-describedby`)}this.visibleTooltipRow=void 0,this.editor._signal(`hideGutterTooltip`,this),e.prototype.hide.call(this,t)}},t.annotationsToSummaryString=function(e){var n,r,a=[],o=[`error`,`security`,`warning`,`info`,`hint`];try{for(var s=i(o),c=s.next();!c.done;c=s.next()){var l=c.value;if(e[l].length){var u=e[l].length===1?t.annotationLabels[l].singular:t.annotationLabels[l].plural;a.push(`${e[l].length} ${u}`)}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a.join(`, `)},t.prototype.isOutsideOfText=function(e){var t=e.editor.renderer.$gutter.getBoundingClientRect();return!(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom)},t}(s);d.$uid=0,t.GutterTooltip=d}),ace.define(`ace/mouse/dragdrop_handler`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/event`,`ace/lib/useragent`],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/event"),a=e("../lib/useragent"),o=200,s=200,c=5;function l(e){var t=e.editor,n=r.createElement(`div`);n.style.cssText=`top:-100px;position:absolute;z-index:2147483647;opacity:0.5`,n.textContent=`\xA0`,[`dragWait`,`dragWaitEnd`,`startDrag`,`dragReadyEnd`,`onMouseDrag`].forEach(function(t){e[t]=this[t]},this),t.on(`mousedown`,this.onMouseDown.bind(e));var l=t.container,d,f,p,m,h,g,_=0,v,y,b,x,S;this.onDragStart=function(e){if(this.cancelDrag||!l.draggable){var r=this;return setTimeout(function(){r.startSelect(),r.captureMouse(e)},0),e.preventDefault()}h=t.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=t.getReadOnly()?`copy`:`copyMove`,t.container.appendChild(n),i.setDragImage&&i.setDragImage(n,0,0),setTimeout(function(){t.container.removeChild(n)}),i.clearData(),i.setData(`Text`,t.session.getTextRange()),y=!0,this.setState(`drag`)},this.onDragEnd=function(e){if(l.draggable=!1,y=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;!v&&n==`move`&&t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle(`ace_dragging`),this.editor.renderer.setCursorStyle(``)},this.onDragEnter=function(e){if(!(t.getReadOnly()||!A(e.dataTransfer)))return f=e.clientX,p=e.clientY,d||E(),_++,e.dataTransfer.dropEffect=v=j(e),i.preventDefault(e)},this.onDragOver=function(e){if(!(t.getReadOnly()||!A(e.dataTransfer)))return f=e.clientX,p=e.clientY,d||(E(),_++),O!==null&&(O=null),e.dataTransfer.dropEffect=v=j(e),i.preventDefault(e)},this.onDragLeave=function(e){if(_--,_<=0&&d)return D(),v=null,i.preventDefault(e)},this.onDrop=function(e){if(g){var n=e.dataTransfer;if(y)switch(v){case`move`:h=h.contains(g.row,g.column)?{start:g,end:g}:t.moveText(h,g);break;case`copy`:h=t.moveText(h,g,!0)}else{var r=n.getData(`Text`);h={start:g,end:t.session.insert(g,r)},t.focus(),v=null}return D(),i.preventDefault(e)}},i.addListener(l,`dragstart`,this.onDragStart.bind(e),t),i.addListener(l,`dragend`,this.onDragEnd.bind(e),t),i.addListener(l,`dragenter`,this.onDragEnter.bind(e),t),i.addListener(l,`dragover`,this.onDragOver.bind(e),t),i.addListener(l,`dragleave`,this.onDragLeave.bind(e),t),i.addListener(l,`drop`,this.onDrop.bind(e),t);function C(e,n){var r=Date.now(),i=!n||e.row!=n.row,a=!n||e.column!=n.column;!x||i||a?(t.moveCursorToPosition(e),x=r,S={x:f,y:p}):u(S.x,S.y,f,p)>c?x=null:r-x>=s&&(t.renderer.scrollCursorIntoView(),x=null)}function w(e,n){var r=Date.now(),i=t.renderer.layerConfig.lineHeight,a=t.renderer.layerConfig.characterWidth,s=t.renderer.scroller.getBoundingClientRect(),c={x:{left:f-s.left,right:s.right-f},y:{top:p-s.top,bottom:s.bottom-p}},l=Math.min(c.x.left,c.x.right),u=Math.min(c.y.top,c.y.bottom),d={row:e.row,column:e.column};l/a<=2&&(d.column+=c.x.left<c.x.right?-3:2),u/i<=1&&(d.row+=c.y.top<c.y.bottom?-1:1);var m=e.row!=d.row,h=e.column!=d.column,g=!n||e.row!=n.row;m||h&&!g?b?r-b>=o&&t.renderer.scrollCursorIntoView(d):b=r:b=null}function T(){var e=g;g=t.renderer.screenToTextCoordinates(f,p),C(g,e),w(g,e)}function E(){h=t.selection.toOrientedRange(),d=t.session.addMarker(h,`ace_selection`,t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(m),T(),m=setInterval(T,20),_=0,i.addListener(document,`mousemove`,k)}function D(){clearInterval(m),t.session.removeMarker(d),d=null,t.selection.fromOrientedRange(h),t.isFocused()&&!y&&t.$resetCursorStyle(),h=null,g=null,_=0,b=null,x=null,i.removeListener(document,`mousemove`,k)}var O=null;function k(){O??=setTimeout(function(){O!=null&&d&&D()},20)}function A(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return e==`text/plain`||e==`Text`})}function j(e){var t=[`copy`,`copymove`,`all`,`uninitialized`],n=[`move`,`copymove`,`linkmove`,`all`,`uninitialized`],r=a.isMac?e.altKey:e.ctrlKey,i=`uninitialized`;try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch{}var o=`none`;return r&&t.indexOf(i)>=0?o=`copy`:n.indexOf(i)>=0?o=`move`:t.indexOf(i)>=0&&(o=`copy`),o}}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle(`ace_dragging`),this.editor.renderer.setCursorStyle(``),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle(`ace_dragging`);var n=a.isWin?`default`:`move`;e.renderer.setCursorStyle(n),this.setState(`dragReady`)},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&this.state==`dragReady`){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if(this.state===`dragWait`){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),r=e.getButton();if((e.domEvent.detail||1)===1&&r===0&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var i=e.domEvent.target||e.domEvent.srcElement;if(`unselectable`in i&&(i.unselectable=`on`),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var o=t.container;o.draggable=!0}this.setState(`dragWait`)}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(l.prototype);function u(e,t,n,r){return Math.sqrt((n-e)**2+(r-t)**2)}t.DragdropHandler=l}),ace.define(`ace/mouse/touch_handler`,[`require`,`exports`,`module`,`ace/mouse/mouse_event`,`ace/lib/event`,`ace/lib/dom`],function(e,t,n){var r=e("./mouse_event").MouseEvent,i=e("../lib/event"),a=e("../lib/dom");t.addTouchListeners=function(e,t){var n=`scroll`,o,s,c,l,u,d,f=0,p,m=0,h=0,g=0,_,v;function y(){var e=window.navigator&&window.navigator.clipboard,r=!1,i=function(){var n=t.getCopyText(),i=t.session.getUndoManager().hasUndo();v.replaceChild(a.buildDom(r?[`span`,!n&&o(`selectall`)&&[`span`,{class:`ace_mobile-button`,action:`selectall`},`Select All`],n&&o(`copy`)&&[`span`,{class:`ace_mobile-button`,action:`copy`},`Copy`],n&&o(`cut`)&&[`span`,{class:`ace_mobile-button`,action:`cut`},`Cut`],e&&o(`paste`)&&[`span`,{class:`ace_mobile-button`,action:`paste`},`Paste`],i&&o(`undo`)&&[`span`,{class:`ace_mobile-button`,action:`undo`},`Undo`],o(`find`)&&[`span`,{class:`ace_mobile-button`,action:`find`},`Find`],o(`openCommandPalette`)&&[`span`,{class:`ace_mobile-button`,action:`openCommandPalette`},`Palette`]]:[`span`]),v.firstChild)},o=function(e){return t.commands.canExecute(e,t)},s=function(n){var a=n.target.getAttribute(`action`);if(a==`more`||!r)return r=!r,i();a==`paste`?e.readText().then(function(e){t.execCommand(a,e)}):a&&((a==`cut`||a==`copy`)&&(e?e.writeText(t.getCopyText()):document.execCommand(`copy`)),t.execCommand(a)),v.firstChild.style.display=`none`,r=!1,a!=`openCommandPalette`&&t.focus()};v=a.buildDom([`div`,{class:`ace_mobile-menu`,onclick:s},[`span`],[`span`,{class:`ace_mobile-button`,action:`more`},`...`]],t.container),v.addEventListener(`touchstart`,function(e){n=`menu`,e.stopPropagation(),e.preventDefault(),t.textInput.focus()}),v.addEventListener(`touchend`,function(e){e.stopPropagation(),e.preventDefault(),s(e)})}function b(){if(!t.getOption(`enableMobileMenu`)){v&&x();return}v||y();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),r=t.renderer.textToScreenCoordinates(0,0).pageX,i=t.renderer.scrollLeft,a=t.container.getBoundingClientRect();v.style.top=n.pageY-a.top-3+`px`,n.pageX-a.left<a.width-70?(v.style.left=``,v.style.right=`10px`):(v.style.right=``,v.style.left=r+i-a.left+`px`),v.style.display=``,v.firstChild.style.display=`none`,t.on(`input`,x)}function x(e){v&&(v.style.display=`none`),t.off(`input`,x)}function S(){u=null,clearTimeout(u);var e=t.selection.getRange(),r=e.contains(p.row,p.column);(e.isEmpty()||!r)&&(t.selection.moveToPosition(p),t.selection.selectWord()),n=`wait`,b()}function C(){u=null,clearTimeout(u),t.selection.moveToPosition(p);var e=m>=2?t.selection.getLineRange(p.row):t.session.getBracketRange(p);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),n=`wait`}i.addListener(e,`contextmenu`,function(e){_&&t.textInput.getElement().focus()},t),i.addListener(e,`touchstart`,function(e){var i=e.touches;if(u||i.length>1){clearTimeout(u),u=null,c=-1,n=`zoom`;return}_=t.$mouseHandler.isMousePressed=!0;var a=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,v=e.timeStamp;l=v;var y=i[0],b=y.clientX,x=y.clientY;if(Math.abs(o-b)+Math.abs(s-x)>a&&(c=-1),o=e.clientX=b,s=e.clientY=x,h=g=0,p=new r(e,t).getDocumentPosition(),v-c<500&&i.length==1&&!f)m++,e.preventDefault(),e.button=0,C();else{m=0;var w=t.selection.cursor,T=t.selection.isEmpty()?w:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(w,!0),D=t.renderer.$cursorLayer.getPixelPosition(T,!0),O=t.renderer.scroller.getBoundingClientRect(),k=t.renderer.layerConfig.offset,A=t.renderer.scrollLeft,j=function(e,t){return e/=d,t=t/a-.75,e*e+t*t};if(e.clientX<O.left){n=`zoom`;return}var M=j(e.clientX-O.left-E.left+A,e.clientY-O.top-E.top+k),N=j(e.clientX-O.left-D.left+A,e.clientY-O.top-D.top+k);M<3.5&&N<3.5&&(n=M>N?`cursor`:`anchor`),n=N<3.5?`anchor`:M<3.5?`cursor`:`scroll`,u=setTimeout(S,450)}c=v},t),i.addListener(e,`touchend`,function(e){_=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),n==`zoom`?(n=``,f=0):u?(t.selection.moveToPosition(p),f=0,b()):n==`scroll`?(w(),x()):b(),clearTimeout(u),u=null},t),i.addListener(e,`touchmove`,function(e){u&&=(clearTimeout(u),null);var i=e.touches;if(!(i.length>1||n==`zoom`)){var a=i[0],c=o-a.clientX,d=s-a.clientY;if(n==`wait`)if(c*c+d*d>4)n=`cursor`;else return e.preventDefault();o=a.clientX,s=a.clientY,e.clientX=a.clientX,e.clientY=a.clientY;var f=e.timeStamp,p=f-l;if(l=f,n==`scroll`){var m=new r(e,t);m.speed=1,m.wheelX=c,m.wheelY=d,10*Math.abs(c)<Math.abs(d)&&(c=0),10*Math.abs(d)<Math.abs(c)&&(d=0),p!=0&&(h=c/p,g=d/p),t._emit(`mousewheel`,m),m.propagationStopped||(h=g=0)}else{var _=new r(e,t).getDocumentPosition();n==`cursor`?t.selection.moveCursorToPosition(_):n==`anchor`&&t.selection.setSelectionAnchor(_.row,_.column),t.renderer.scrollCursorIntoView(_),e.preventDefault()}}},t);function w(){f+=60,d=setInterval(function(){f--<=0&&(clearInterval(d),d=null),Math.abs(h)<.01&&(h=0),Math.abs(g)<.01&&(g=0),f<20&&(h=.9*h),f<20&&(g=.9*g);var e=t.session.getScrollTop();t.renderer.scrollBy(10*h,10*g),e==t.session.getScrollTop()&&(f=0)},10)}}}),ace.define(`ace/mouse/mouse_handler`,[`require`,`exports`,`module`,`ace/lib/event`,`ace/lib/useragent`,`ace/mouse/default_handlers`,`ace/mouse/default_gutter_handler`,`ace/mouse/mouse_event`,`ace/mouse/dragdrop_handler`,`ace/mouse/touch_handler`,`ace/config`],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent"),a=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,c=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,u=e("../config"),d=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new a(this),new o(this),new c(this);var n=function(t){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus(),setTimeout(function(){e.isFocused()||e.focus()})},s=e.renderer.getMouseEventTarget();r.addListener(s,`click`,this.onMouseEvent.bind(this,`click`),e),r.addListener(s,`mousemove`,this.onMouseMove.bind(this,`mousemove`),e),r.addMultiMouseDownListener([s,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,`onMouseEvent`,e),r.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,`mousewheel`),e),l(e.container,e);var u=e.renderer.$gutter;r.addListener(u,`mousedown`,this.onMouseEvent.bind(this,`guttermousedown`),e),r.addListener(u,`click`,this.onMouseEvent.bind(this,`gutterclick`),e),r.addListener(u,`dblclick`,this.onMouseEvent.bind(this,`gutterdblclick`),e),r.addListener(u,`mousemove`,this.onMouseEvent.bind(this,`guttermousemove`),e),r.addListener(s,`mousedown`,n,e),r.addListener(u,`mousedown`,n,e),i.isIE&&e.renderer.scrollBarV&&(r.addListener(e.renderer.scrollBarV.element,`mousedown`,n,e),r.addListener(e.renderer.scrollBarH.element,`mousedown`,n,e)),e.on(`mousemove`,function(n){if(!(t.state||t.$dragDelay||!t.$dragEnabled)){var r=e.renderer.screenToTextCoordinates(n.x,n.y),i=e.session.selection.getRange(),a=e.renderer;!i.isEmpty()&&i.insideStart(r.row,r.column)?a.setCursorStyle(`default`):a.setCursorStyle(``)}},e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new s(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!n||!n.length||this.editor._emit(e,new s(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=this.$scrollSpeed*2,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,a=this.editor.renderer;a.$isMousePressed=!0;var o=this,c=!0,l=function(e){if(e){if(i.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new s(e,o.editor),o.$mouseMoved=!0}},u=function(e){n.off(`beforeEndOperation`,p),c=!1,n.session&&d(),o[o.state+`End`]&&o[o.state+`End`](e),o.state=``,o.isMousePressed=a.$isMousePressed=!1,a.$keepTextAreaAtCursor&&a.$moveTextAreaToCursor(),o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent(`mouseup`,e),n.endOperation()},d=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1},f=function(){c&&(d(),r.nextFrame(f))};if(i.isOldIE&&e.domEvent.type==`dblclick`)return setTimeout(function(){u(e)});var p=function(e){o.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(o[o.state+`End`]&&o[o.state+`End`](),o.state=``,o.releaseMouse())};n.on(`beforeEndOperation`,p),n.startOperation({command:{name:`mouse`}}),o.$onCaptureMouseMove=l,o.releaseMouse=r.capture(this.editor.container,l,u),f()},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&t.domEvent.type!=`contextmenu`||(this.editor.off(`nativecontextmenu`,e),t&&t.domEvent&&r.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on(`nativecontextmenu`,e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e}();d.prototype.releaseMouse=null,u.defineOptions(d.prototype,`mouseHandler`,{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),t.MouseHandler=d}),ace.define(`ace/mouse/fold_handler`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("../lib/dom");t.FoldHandler=function(){function e(e){e.on(`click`,function(t){var n=t.getDocumentPosition(),i=e.session,a=i.getFoldAt(n.row,n.column,1);a&&(t.getAccelKey()?i.removeFold(a):i.expandFold(a),t.stop());var o=t.domEvent&&t.domEvent.target;o&&r.hasCssClass(o,`ace_inline_button`)&&r.hasCssClass(o,`ace_toggle_wrap`)&&(i.setOption(`wrap`,!i.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on(`gutterclick`,function(t){if(e.renderer.$gutterLayer.getRegion(t)==`foldWidgets`){var n=t.getDocumentPosition().row,r=e.session;r.foldWidgets&&r.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on(`gutterdblclick`,function(t){if(e.renderer.$gutterLayer.getRegion(t)==`foldWidgets`){var n=t.getDocumentPosition().row,r=e.session,i=r.getParentFoldRangeData(n,!0),a=i.range||i.firstRange;if(a){n=a.start.row;var o=r.getFoldAt(n,r.getLine(n).length,1);o?r.removeFold(o):(r.addFold(`...`,a),e.renderer.scrollCursorIntoView({row:a.start.row,column:0}))}t.stop()}})}return e}()}),ace.define(`ace/keyboard/keybinding`,[`require`,`exports`,`module`,`ace/lib/keys`,`ace/lib/event`],function(e,t,n){var r=e("../lib/keys"),i=e("../lib/event");t.KeyBinding=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){typeof e==`function`&&!e.handleKeyboard&&(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);n!=-1&&this.$handlers.splice(n,1),t==null?this.$handlers.push(e):this.$handlers.splice(t,0,e),n==-1&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t!=-1&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||``}).filter(Boolean).join(` `)},e.prototype.$callKeyboardHandlers=function(e,t,n,r){for(var a,o=!1,s=this.$editor.commands,c=this.$handlers.length;c--&&(a=this.$handlers[c].handleKeyboard(this.$data,e,t,n,r),!(!(!a||!a.command)&&(o=a.command==`null`||s.exec(a.command,this.$editor,a.args,r),o&&r&&e!=-1&&a.passEvent!=1&&a.command.passEvent!=1&&i.stopEvent(r),o))););return!o&&e==-1&&(a={command:`insertstring`},o=s.exec(`insertstring`,this.$editor,t)),o&&this.$editor._signal&&this.$editor._signal(`keyboardActivity`,a),o},e.prototype.onCommandKey=function(e,t,n){var i=r.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}()}),ace.define(`ace/lib/bidiutil`,[`require`,`exports`,`module`],function(e,t,n){var r=0,i=0,a=!1,o=!1,s=!1,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,d=1,f=0,p=1,m=2,h=3,g=4,_=5,v=6,y=7,b=8,x=9,S=10,C=11,w=12,T=13,E=14,D=15,O=16,k=17,A=18,j=[A,A,A,A,A,A,A,A,A,v,_,v,b,_,A,A,A,A,A,A,A,A,A,A,A,A,A,A,_,_,_,v,b,g,g,C,C,C,g,g,g,g,g,S,x,S,x,x,m,m,m,m,m,m,m,m,m,m,x,g,g,g,g,g,g,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,g,g,g,g,g,g,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,g,g,g,g,A,A,A,A,A,A,_,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,x,g,C,C,C,C,g,g,g,g,f,g,g,A,g,g,C,C,m,m,g,f,g,g,g,m,f,g,g,g,g,g],M=[b,b,b,b,b,b,b,b,b,b,b,A,A,A,f,p,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b,_,T,E,D,O,k,x,C,C,C,C,C,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,x,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,b];function N(e,t,n,u){var d=r?l:c,f=null,p=null,m=null,h=0,g=null,y=null,x=-1,S=null,C=null,w=[];if(!u)for(S=0,u=[];S<n;S++)u[S]=F(e[S]);for(i=r,a=!1,o=!1,s=!1,C=0;C<n;C++){if(f=h,w[C]=p=P(e,u,w,C),h=d[f][p],g=h&240,h&=15,t[C]=m=d[h][5],g>0)if(g==16){for(S=x;S<C;S++)t[S]=1;x=-1}else x=-1;if(y=d[h][6],y)x==-1&&(x=C);else if(x>-1){for(S=x;S<C;S++)t[S]=m;x=-1}u[C]==_&&(t[C]=0),i|=m}if(s){for(S=0;S<n;S++)if(u[S]==v){t[S]=r;for(var T=S-1;T>=0&&u[T]==b;T--)t[T]=r}}}function ee(e,t,n){if(!(i<e)){if(e==1&&r==d&&!o){n.reverse();return}for(var a=n.length,s=0,c,l,u,f;s<a;){if(t[s]>=e){for(c=s+1;c<a&&t[c]>=e;)c++;for(l=s,u=c-1;l<u;l++,u--)f=n[l],n[l]=n[u],n[u]=f;s=c}s++}}}function P(e,t,n,i){var c=t[i],l,u,d,j;switch(c){case f:case p:a=!1;case g:case h:return c;case m:return a?h:m;case y:return a=!0,p;case b:return g;case x:return i<1||i+1>=t.length||(l=n[i-1])!=m&&l!=h||(u=t[i+1])!=m&&u!=h?g:(a&&(u=h),u==l?u:g);case S:return l=i>0?n[i-1]:_,l==m&&i+1<t.length&&t[i+1]==m?m:g;case C:if(i>0&&n[i-1]==m)return m;if(a)return g;for(j=i+1,d=t.length;j<d&&t[j]==C;)j++;return j<d&&t[j]==m?m:g;case w:for(d=t.length,j=i+1;j<d&&t[j]==w;)j++;if(j<d){var M=e[i],N=M>=1425&&M<=2303||M==64286;if(l=t[j],N&&(l==p||l==y))return p}return i<1||(l=t[i-1])==_?g:n[i-1];case _:return a=!1,o=!0,r;case v:return s=!0,g;case T:case E:case O:case k:case D:a=!1;case A:return g}}function F(e){var t=e.charCodeAt(0),n=t>>8;return n==0?t>191?f:j[t]:n==5?/[\u0591-\u05f4]/.test(e)?p:f:n==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?w:/[\u0660-\u0669\u066b-\u066c]/.test(e)?h:t==1642?C:/[\u06f0-\u06f9]/.test(e)?m:y:n==32&&t<=8287?M[t&255]:n==254&&t>=65136?y:g}t.L=f,t.R=p,t.EN=m,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT=`·`,t.doBidiReorder=function(e,n,i){if(e.length<2)return{};var a=e.split(``),o=Array(a.length),s=Array(a.length),c=[];r=i?d:u,N(a,c,a.length,n);for(var l=0;l<o.length;o[l]=l,l++);ee(2,c,o),ee(1,c,o);for(var l=0;l<o.length-1;l++)n[l]===h?c[l]=t.AN:c[l]===p&&(n[l]>y&&n[l]<T||n[l]===g||n[l]===A)?c[l]=t.ON_R:l>0&&a[l-1]===`ل`&&/\u0622|\u0623|\u0625|\u0627/.test(a[l])&&(c[l-1]=c[l]=t.R_H,l++);a[a.length-1]===t.DOT&&(c[a.length-1]=t.B),a[0]===``&&(c[0]=t.RLE);for(var l=0;l<o.length;l++)s[l]=c[o[l]];return{logicalFromVisual:o,bidiLevels:s}},t.hasBidiCharacters=function(e,t){for(var n=!1,r=0;r<e.length;r++)t[r]=F(e.charAt(r)),!n&&(t[r]==p||t[r]==y||t[r]==h)&&(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),ace.define(`ace/bidihandler`,[`require`,`exports`,`module`,`ace/lib/bidiutil`,`ace/lib/lang`],function(e,t,n){var r=e("./lib/bidiutil"),i=e("./lib/lang"),a=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;t.BidiHandler=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=r,this.charWidths=[],this.EOL=`¬`,this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line=``,this.wrapIndent=0,this.EOF=`¶`,this.RLE=``,this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=a.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return this.seenBidi?(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:e.action==`insert`&&a.test(e.lines.join(`
|
|
190
|
-
`))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,r=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1),n===r);)r=n,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){e===void 0&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1?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[r.L],this.line=t<a.length?this.line.substring(a[t-1],a[t]):this.line.substring(a[a.length-1])):this.line=this.line.substring(0,a[t]),t==a.length&&(this.line+=this.showInvisibles?n:r.DOT))}else this.line+=this.showInvisibles?n:r.DOT;var o=this.session,s=0,c;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return e===` `||o.isFullWidth(e.charCodeAt(0))?(c=e===` `?o.getScreenTabSize(t+s):2,s+=c-1,i.stringRepeat(r.DOT,c)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==r.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];this.bidiMap=r.hasBidiCharacters(this.line,e)||this.isRtlDir?r.doBidiReorder(this.line,e,this.isRtlDir):{}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth(`ה`);this.charWidths[r.L]=this.charWidths[r.EN]=this.charWidths[r.ON_R]=t,this.charWidths[r.R]=this.charWidths[r.AN]=n,this.charWidths[r.R_H]=n*.45,this.charWidths[r.B]=this.charWidths[r.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return this.$isRtl?!0:e==null?this.isRtlDir:this.session.getLine(e).charAt(0)==this.RLE},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),r=e.selection.getSelectionAnchor().row;r<=n.row;r++)!t&&e.session.getLine(r).charAt(0)===e.session.$bidiHandler.RLE?e.session.doc.removeInLine(r,0,1):t&&e.session.getLine(r).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:r},e.session.$bidiHandler.RLE)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=+(this.line.charAt(0)===this.RLE),n=e>t?this.session.getOverwrite()?e:e-1:t,i=r.getVisualFromLogicalIdx(n,this.bidiMap),a=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&e<=t&&a[i]%2!=0&&i++;for(var s=0;s<i;s++)o+=this.charWidths[a[s]];return!this.session.getOverwrite()&&e>t&&a[i]%2==0&&(o+=this.charWidths[a[i]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},e.prototype.getSelections=function(e,t){var n=this.bidiMap,r=n.bidiLevels,i,a=[],o=0,s=Math.min(e,t)-this.wrapIndent,c=Math.max(e,t)-this.wrapIndent,l=!1,u=!1,d=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,p=0;p<r.length;p++)f=n.logicalFromVisual[p],i=r[p],l=f>=s&&f<c,l&&!u?d=o:!l&&u&&a.push({left:d,width:o-d}),o+=this.charWidths[i],u=l;if(l&&p===r.length&&a.push({left:d,width:o-d}),this.isRtlDir)for(var m=0;m<a.length;m++)a[m].left+=this.rtlLineOffset;return a},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,e=Math.max(e,0),n=0,r=0,i=this.bidiMap.bidiLevels,a=this.charWidths[i[r]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);e>n+a/2;){if(n+=a,r===i.length-1){a=0;break}a=this.charWidths[i[++r]]}return r>0&&i[r-1]%2!=0&&i[r]%2==0?(e<n&&r--,t=this.bidiMap.logicalFromVisual[r]):r>0&&i[r-1]%2==0&&i[r]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[r]:this.bidiMap.logicalFromVisual[r-1]):this.isRtlDir&&r===i.length-1&&a===0&&i[r-1]%2==0||!this.isRtlDir&&r===0&&i[r]%2!=0?t=1+this.bidiMap.logicalFromVisual[r]:(r>0&&i[r-1]%2!=0&&a!==0&&r--,t=this.bidiMap.logicalFromVisual[r]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent},e}()}),ace.define(`ace/selection`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/range`],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),a=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,s=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on(`change`,function(e){t.$cursorChanged=!0,t.$silent||t._emit(`changeCursor`),!t.$isEmpty&&!t.$silent&&t._emit(`changeSelection`),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.anchor.on(`change`,function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._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(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},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 e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?o.fromPoints(t,t):this.isBackwards()?o.fromPoints(t,e):o.fromPoints(e,t)},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(e,t){var n=t?e.end:e.start,r=t?e.start:e.end;this.$setSelection(n.row,n.column,r.row,r.column)},e.prototype.$setSelection=function(e,t,n,r){if(!this.$silent){var i=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,r),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit(`changeCursor`),(this.$cursorChanged||this.$anchorChanged||i!=this.$isEmpty||a)&&this._emit(`changeSelection`)}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},e.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},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(e,t){if(t===void 0){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n=typeof e==`number`?e:this.lead.row,r,i=this.session.getFoldLine(n);return i?(n=i.start.row,r=i.end.row):r=n,t===!0?new o(n,0,r,this.session.getLine(r).length):new o(n,0,r+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(e,t,n){var r=e.column,i=e.column+t;return n<0&&(r=e.column-t,i=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(r,i).split(` `).length-1==t},e.prototype.moveCursorLeft=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(e.column===0)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e=this.lead.getPosition(),t;if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize(),e=this.lead;this.wouldMoveIntoSoftTab(e,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),r=this.session.screenToDocumentPosition(n,0),i=this.session.getDisplayLine(e,null,r.row,r.column).match(/^\s*/);i[0].length!=t&&!this.session.$useEmacsStyleLineStart&&(r.column+=i[0].length),this.moveCursorToPosition(r)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var r=n.search(/\s+$/);r>0&&(t.column=r)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(e,t,1);if(i){this.moveCursorTo(i.end.row,i.end.column);return}if(this.session.nonTokenRe.exec(r)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,r=n.substring(t)),t>=n.length){this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(r)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)},e.prototype.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1)){this.moveCursorTo(n.start.row,n.start.column);return}var r=this.session.getFoldStringAt(e,t,-1);r??=this.doc.getLine(e).substring(0,t);var a=i.stringReverse(r);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(a)&&(t-=this.session.nonTokenRe.lastIndex,a=a.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),t<=0){this.moveCursorTo(e,0),this.moveCursorLeft(),e>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(a)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)},e.prototype.$shortWordEndIndex=function(e){var t=0,n,r=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(e))t=this.session.tokenRe.lastIndex;else{for(;(n=e[t])&&r.test(n);)t++;if(t<1){for(i.lastIndex=0;(n=e[t])&&!i.test(n);)if(i.lastIndex=0,t++,r.test(n))if(t>2){t--;break}else{for(;(n=e[t])&&r.test(n);)t++;if(t>2)break}}}return i.lastIndex=0,t},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),r=n.substring(t),i=this.session.getFoldAt(e,t,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(t==n.length){var a=this.doc.getLength();do e++,r=this.doc.getLine(e);while(e<a&&/^\s*$/.test(r));/^\s+/.test(r)||(r=``),t=0}var o=this.$shortWordEndIndex(r);this.moveCursorTo(e,t+o)},e.prototype.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column,n;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var r=this.session.getLine(e).substring(0,t);if(t===0){do e--,r=this.doc.getLine(e);while(e>0&&/^\s*$/.test(r));t=r.length,/\s+$/.test(r)||(r=``)}var a=i.stringReverse(r),o=this.$shortWordEndIndex(a);return this.moveCursorTo(e,t-o)},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(e,t){var n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r;if(t===0&&(e!==0&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(r=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(r/this.session.$bidiHandler.charWidths[0])):r=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),e!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];e<0?e-=i.rowsAbove||0:e>0&&(e+=i.rowCount-(i.rowsAbove||0))}var a=this.session.screenToDocumentPosition(n.row+e,n.column,r);e!==0&&t===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+t,t===0)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var r=this.session.getFoldAt(e,t,1);r&&(e=r.start.row,t=r.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?--t:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var r=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(r.row,r.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return o.fromPoints(t,n)}catch{return o.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},e.prototype.fromJSON=function(e){if(e.start==null)if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=o.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}else e=e[0];this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();s.prototype.setSelectionAnchor=s.prototype.setAnchor,s.prototype.getSelectionAnchor=s.prototype.getAnchor,s.prototype.setSelectionRange=s.prototype.setRange,r.implement(s.prototype,a),t.Selection=s}),ace.define(`ace/tokenizer`,[`require`,`exports`,`module`,`ace/lib/report_error`],function(e,t,n){var r=e("./lib/report_error").reportError,i=2e3,a=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],r=[],i=0,a=this.matchMappings[t]={defaultToken:`text`},o=`g`,s=[],c=0;c<n.length;c++){var l=n[c];if(l.defaultToken&&(a.defaultToken=l.defaultToken),l.caseInsensitive&&o.indexOf(`i`)===-1&&(o+=`i`),l.unicode&&o.indexOf(`u`)===-1&&(o+=`u`),l.regex!=null){l.regex instanceof RegExp&&(l.regex=l.regex.toString().slice(1,-1));var u=l.regex,d=RegExp(`(?:(`+u+`)|(.))`).exec(`a`).length-2;Array.isArray(l.token)?l.token.length==1||d==1?l.token=l.token[0]:d-1==l.token.length?(l.tokenArray=l.token,l.token=null,l.onMatch=this.$arrayTokens):(this.reportError(`number of classes and regexp groups doesn't match`,{rule:l,groupCount:d-1}),l.token=l.token[0]):typeof l.token==`function`&&!l.onMatch&&(l.onMatch=d>1?this.$applyToken:l.token),d>1&&(/\\\d/.test(l.regex)?u=l.regex.replace(/\\([0-9]+)/g,function(e,t){return`\\`+(parseInt(t,10)+i+1)}):(d=1,u=this.removeCapturingGroups(l.regex)),!l.splitRegex&&typeof l.token!=`string`&&s.push(l)),a[i]=c,i+=d,r.push(u),l.onMatch||=null}}r.length||(a[0]=0,r.push(`$`)),s.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=RegExp(`(`+r.join(`)|(`)+`)|($)`,o)}}return e.prototype.$setMaxTokenCount=function(e){i=e|0},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if(typeof n==`string`)return[{type:n,value:e}];for(var r=[],i=0,a=n.length;i<a;i++)t[i]&&(r[r.length]={type:n[i],value:t[i]});return r},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return`text`;for(var n=[],r=this.tokenArray,i=0,a=r.length;i<a;i++)t[i+1]&&(n[n.length]={type:r[i],value:t[i+1]});return n},e.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?`(?:`:e})},e.prototype.createSplitterRegexp=function(e,t){if(e.indexOf(`(?=`)!=-1){var n=0,r=!1,i={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,a,o,s,c){return r?r=s!=`]`:s?r=!0:o?(n==i.stack&&(i.end=c+1,i.stack=-1),n--):a&&(n++,a.length!=1&&(i.stack=n,i.start=c)),e}),i.end!=null&&/^\)*$/.test(e.substr(i.end))&&(e=e.substring(0,i.start)+e.substr(i.end))}return e.charAt(0)!=`^`&&(e=`^`+e),e.charAt(e.length-1)!=`$`&&(e+=`$`),new RegExp(e,(t||``).replace(`g`,``))},e.prototype.getLineTokens=function(e,t){if(t&&typeof t!=`string`){var n=t.slice(0);t=n[0],t===`#tmp`&&(n.shift(),t=n.shift())}else var n=[];var r=t||`start`,a=this.states[r];a||=(r=`start`,this.states[r]);var o=this.matchMappings[r],s=this.regExps[r];s.lastIndex=0;for(var c,l=[],u=0,d=0,f={type:null,value:``};c=s.exec(e);){var p=o.defaultToken,m=null,h=c[0],g=s.lastIndex;if(g-h.length>u){var _=e.substring(u,g-h.length);f.type==p?f.value+=_:(f.type&&l.push(f),f={type:p,value:_})}for(var v=0;v<c.length-2;v++)if(c[v+1]!==void 0){m=a[o[v]],p=m.onMatch?m.onMatch(h,r,n,e):m.token,m.next&&(r=typeof m.next==`string`?m.next:m.next(r,n),a=this.states[r],a||=(this.reportError(`state doesn't exist`,r),r=`start`,this.states[r]),o=this.matchMappings[r],u=g,s=this.regExps[r],s.lastIndex=g),m.consumeLineEnd&&(u=g);break}if(h){if(typeof p==`string`)(!m||m.merge!==!1)&&f.type===p?f.value+=h:(f.type&&l.push(f),f={type:p,value:h});else if(p){f.type&&l.push(f),f={type:null,value:``};for(var v=0;v<p.length;v++)l.push(p[v])}}if(u==e.length)break;if(u=g,d++>i){for(d>2*e.length&&this.reportError(`infinite loop with in ace tokenizer`,{startState:t,line:e});u<e.length;)f.type&&l.push(f),f={value:e.substring(u,u+=500),type:`overflow`};r=`start`,n=[];break}}return f.type&&l.push(f),n.length>1&&n[0]!==r&&n.unshift(`#tmp`,r),{tokens:l,state:n.length?n:r}},e}();a.prototype.reportError=r,t.Tokenizer=a}),ace.define(`ace/mode/text_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){var r=e("../lib/deep_copy").deepCopy,i=function(){this.$rules={start:[{token:`empty_line`,regex:`^$`},{defaultToken:`text`}]}};(function(){this.addRules=function(e,t){if(!t){for(var n in e)this.$rules[n]=e[n];return}for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var a=r[i];(a.next||a.onMatch)&&(typeof a.next==`string`&&a.next.indexOf(t)!==0&&(a.next=t+a.next),a.nextState&&a.nextState.indexOf(t)!==0&&(a.nextState=t+a.nextState))}this.$rules[t+n]=r}},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,a){var o=typeof e==`function`?new e().getRules():e;if(i)for(var s=0;s<i.length;s++)i[s]=t+i[s];else for(var c in i=[],o)i.push(t+c);if(this.addRules(o,t),n)for(var l=Array.prototype[a?`push`:`unshift`],s=0;s<i.length;s++)l.apply(this.$rules[i[s]],r(n));this.$embeds||=[],this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return(e!=`start`||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||`start`};this.normalizeRules=function(){var n=0,r=this.$rules;function i(a){var o=r[a];o.processed=!0;for(var s=0;s<o.length;s++){var c=o[s],l=null;Array.isArray(c)&&(l=c,c={}),!c.regex&&c.start&&(c.regex=c.start,c.next||(c.next=[]),c.next.push({defaultToken:c.token},{token:c.token+`.end`,regex:c.end||c.start,next:`pop`}),c.token+=`.start`,c.push=!0);var u=c.next||c.push;if(u&&Array.isArray(u)){var d=c.stateName;d||(d=c.token,typeof d!=`string`&&(d=d[0]||``),r[d]&&(d+=n++)),r[d]=u,c.next=d,i(d)}else u==`pop`&&(c.next=t);if(c.push&&(c.nextState=c.next||c.push,c.next=e,delete c.push),c.rules)for(var f in c.rules)r[f]?r[f].push&&r[f].push.apply(r[f],c.rules[f]):r[f]=c.rules[f];var p=typeof c==`string`?c:c.include;if(p&&(p===`$self`&&(p=`start`),l=Array.isArray(p)?p.map(function(e){return r[e]}):r[p]),l){var m=[s,1].concat(l);c.noEscape&&(m=m.filter(function(e){return!e.next})),o.splice.apply(o,m),s--}c.keywordMap&&(c.token=this.createKeywordMapper(c.keywordMap,c.defaultToken||`text`,c.caseInsensitive),delete c.defaultToken)}}Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,n,r){var i=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach(function(t){for(var a=e[t].split(r||`|`),o=a.length;o--;){var s=a[o];this.$keywordList.push(s),n&&(s=s.toLowerCase()),i[s]=t}},this),e=null,n?function(e){return i[e.toLowerCase()]||t}:function(e){return i[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i}),ace.define(`ace/mode/behaviour`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){this.$behaviours={}};(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if(typeof e==`function`)var n=new e().getBehaviours(t);else var n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(r.prototype),t.Behaviour=r}),ace.define(`ace/token_iterator`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e("./range").Range;t.TokenIterator=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var r=e.getTokenAt(t,n);this.$tokenIndex=r?r.index:-1}return e.prototype.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){this.$tokenIndex+=1;for(var e;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e||=this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==void 0)return n;for(n=0;t>0;)--t,n+=e[t].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)},e}()}),ace.define(`ace/mode/behaviour/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/behaviour`,`ace/token_iterator`,`ace/lib/lang`],function(e,t,n){var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),s=[`text`,`paren.rparen`,`rparen`,`paren`,`punctuation.operator`],c=[`text`,`paren.rparen`,`rparen`,`paren`,`punctuation.operator`,`comment`],l,u={},d={'"':`"`,"'":`'`},f=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return l=u[t];l=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:``,maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:``,maybeInsertedLineEnd:``}},p=function(e,t,n,r){var i=e.end.row-e.start.row;return{text:n+t+r,selection:[0,e.start.column+1,i,e.end.column+ +!i]}},m=function(e){e||={},this.add(`braces`,`insertion`,function(t,n,r,i,a){var s=r.getCursorPosition(),c=i.doc.getLine(s.row);if(a==`{`){f(r);var u=r.getSelectionRange(),d=i.doc.getTextRange(u),h=i.getTokenAt(s.row,s.column);if(d!==``&&d!==`{`&&r.getWrapBehavioursEnabled())return p(u,d,`{`,`}`);if(h&&/(?:string)\.quasi|\.xml/.test(h.type))return[/tag\-(?:open|name)/,/attribute\-name/].some(function(e){return e.test(h.type)})||/(string)\.quasi/.test(h.type)&&h.value[s.column-h.start-1]!==`$`?void 0:(m.recordAutoInsert(r,i,`}`),{text:`{}`,selection:[1,1]});if(m.isSaneInsertion(r,i))return/[\]\}\)]/.test(c[s.column])||r.inMultiSelectMode||e.braces?(m.recordAutoInsert(r,i,`}`),{text:`{}`,selection:[1,1]}):(m.recordMaybeInsert(r,i,`{`),{text:`{`,selection:[1,1]})}else if(a==`}`){f(r);var g=c.substring(s.column,s.column+1);if(g==`}`&&i.$findOpeningBracket(`}`,{column:s.column+1,row:s.row})!==null&&m.isAutoInsertedClosing(s,c,a))return m.popAutoInsertedClosing(),{text:``,selection:[1,1]}}else if(a==`
|
|
191
|
-
`||a==`\r
|
|
192
|
-
`){f(r);var _=``;m.isMaybeInsertedClosing(s,c)&&(_=o.stringRepeat(`}`,l.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var g=c.substring(s.column,s.column+1);if(g===`}`){var v=i.findMatchingBracket({row:s.row,column:s.column+1},`}`);if(!v)return null;var y=this.$getIndent(i.getLine(v.row))}else if(_)var y=this.$getIndent(c);else{m.clearMaybeInsertedClosing();return}var b=y+i.getTabString();return{text:`
|
|
193
|
-
`+b+`
|
|
194
|
-
`+y+_,selection:[1,b.length,1,b.length]}}else m.clearMaybeInsertedClosing()}),this.add(`braces`,`deletion`,function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&a==`{`){if(f(n),r.doc.getLine(i.start.row).substring(i.end.column,i.end.column+1)==`}`)return i.end.column++,i;l.maybeInsertedBrackets--}}),this.add(`parens`,`insertion`,function(e,t,n,r,i){if(i==`(`){f(n);var a=n.getSelectionRange(),o=r.doc.getTextRange(a);if(o!==``&&n.getWrapBehavioursEnabled())return p(a,o,`(`,`)`);if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,`)`),{text:`()`,selection:[1,1]}}else if(i==`)`){f(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row);if(c.substring(s.column,s.column+1)==`)`&&r.$findOpeningBracket(`)`,{column:s.column+1,row:s.row})!==null&&m.isAutoInsertedClosing(s,c,i))return m.popAutoInsertedClosing(),{text:``,selection:[1,1]}}}),this.add(`parens`,`deletion`,function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&a==`(`&&(f(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==`)`))return i.end.column++,i}),this.add(`brackets`,`insertion`,function(e,t,n,r,i){if(i==`[`){f(n);var a=n.getSelectionRange(),o=r.doc.getTextRange(a);if(o!==``&&n.getWrapBehavioursEnabled())return p(a,o,`[`,`]`);if(m.isSaneInsertion(n,r))return m.recordAutoInsert(n,r,`]`),{text:`[]`,selection:[1,1]}}else if(i==`]`){f(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row);if(c.substring(s.column,s.column+1)==`]`&&r.$findOpeningBracket(`]`,{column:s.column+1,row:s.row})!==null&&m.isAutoInsertedClosing(s,c,i))return m.popAutoInsertedClosing(),{text:``,selection:[1,1]}}}),this.add(`brackets`,`deletion`,function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&a==`[`&&(f(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==`]`))return i.end.column++,i}),this.add(`string_dquotes`,`insertion`,function(e,t,n,r,i){var a=r.$mode.$quotes||d;if(i.length==1&&a[i]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(i)!=-1)return;f(n);var o=i,s=n.getSelectionRange(),c=r.doc.getTextRange(s);if(c!==``&&(c.length!=1||!a[c])&&n.getWrapBehavioursEnabled())return p(s,c,o,o);if(!c){var l=n.getCursorPosition(),u=r.doc.getLine(l.row),m=u.substring(l.column-1,l.column),h=u.substring(l.column,l.column+1),g=r.getTokenAt(l.row,l.column),_=r.getTokenAt(l.row,l.column+1);if(m==`\\`&&g&&/escape/.test(g.type))return null;var v=g&&/string|escape/.test(g.type),y=!_||/string|escape/.test(_.type),b;if(h==o)b=v!==y,b&&/string\.end/.test(_.type)&&(b=!1);else{if(v&&!y||v&&y)return null;var x=r.$mode.tokenRe;x.lastIndex=0;var S=x.test(m);x.lastIndex=0;var C=x.test(h),w=r.$mode.$pairQuotesAfter;if(!(w&&w[o]&&w[o].test(m))&&S||C||h&&!/[\s;,.})\]\\]/.test(h))return null;var T=u[l.column-2];if(m==o&&(T==o||x.test(T)))return null;b=!0}return{text:b?o+o:``,selection:[1,1]}}}}),this.add(`string_dquotes`,`deletion`,function(e,t,n,r,i){var a=r.$mode.$quotes||d,o=r.doc.getTextRange(i);if(!i.isMultiLine()&&a.hasOwnProperty(o)&&(f(n),r.doc.getLine(i.start.row).substring(i.start.column+1,i.start.column+2)==o))return i.end.column++,i}),e.closeDocComment!==!1&&this.add(`doc comment end`,`insertion`,function(e,t,n,r,i){if(e===`doc-start`&&(i===`
|
|
195
|
-
`||i===`\r
|
|
196
|
-
`)&&n.selection.isEmpty()){var a=n.getCursorPosition();if(a.column===0)return;for(var o=r.doc.getLine(a.row),s=r.doc.getLine(a.row+1),c=r.getTokens(a.row),l=0,u=0;u<c.length;u++){l+=c[u].value.length;var d=c[u];if(l>=a.column){if(l===a.column){if(!/\.doc/.test(d.type))return;if(/\*\//.test(d.value)){var f=c[u+1];if(!f||!/\.doc/.test(f.type))return}}var p=a.column-(l-d.value.length),m=d.value.indexOf(`*/`),h=d.value.indexOf(`/**`,m>-1?m+2:0);if(h!==-1&&p>h&&p<h+3||m!==-1&&h!==-1&&p>=m&&p<=h||!/\.doc/.test(d.type))return;break}}var g=this.$getIndent(o);if(/\s*\*/.test(s))return/^\s*\*/.test(o)?{text:i+g+`* `,selection:[1,2+g.length,1,2+g.length]}:{text:i+g+` * `,selection:[1,3+g.length,1,3+g.length]};if(/\/\*\*/.test(o.substring(0,a.column)))return{text:i+g+` * `+i+` `+g+`*/`,selection:[1,4+g.length,1,4+g.length]}}})};m.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||`text`,s)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var i=new a(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||`text`,s))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||`text`,c)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=r.row,l.autoInsertedLineEnd=n+i.substr(r.column),l.autoInsertedBrackets++},m.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=r.row,l.maybeInsertedLineStart=i.substr(0,r.column)+n,l.maybeInsertedLineEnd=i.substr(r.column),l.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(e,t,n){return l.autoInsertedBrackets>0&&e.row===l.autoInsertedRow&&n===l.autoInsertedLineEnd[0]&&t.substr(e.column)===l.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(e,t){return l.maybeInsertedBrackets>0&&e.row===l.maybeInsertedRow&&t.substr(e.column)===l.maybeInsertedLineEnd&&t.substr(0,e.column)==l.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},r.inherits(m,i),t.CstyleBehaviour=m}),ace.define(`ace/unicode`,[`require`,`exports`,`module`],function(e,t,n){for(var r=[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],i=0,a=[],o=0;o<r.length;o+=2)a.push(i+=r[o]),r[o+1]&&a.push(45,i+=r[o+1]);t.wordChars=String.fromCharCode.apply(null,a)}),ace.define(`ace/mode/text`,[`require`,`exports`,`module`,`ace/config`,`ace/tokenizer`,`ace/mode/text_highlight_rules`,`ace/mode/behaviour/cstyle`,`ace/unicode`,`ace/lib/lang`,`ace/token_iterator`,`ace/range`],function(e,t,n){var r=e("../config"),i=e("../tokenizer").Tokenizer,a=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour/cstyle").CstyleBehaviour,s=e("../unicode"),c=e("../lib/lang"),l=e("../token_iterator").TokenIterator,u=e("../range").Range,d=function(){this.HighlightRules=a};(function(){this.$defaultBehaviour=new o,this.tokenRe=RegExp(`^[`+s.wordChars+`\\$_]+`,`g`),this.nonTokenRe=RegExp(`^(?:[^`+s.wordChars+`\\$_]|\\s])+`,`g`),this.getTokenizer=function(){return this.$tokenizer||=(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart=``,this.blockComment=``,this.toggleCommentLines=function(e,t,n,r){var i=t.doc,a=!0,o=!0,s=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var d=this.lineCommentStart.map(c.escapeRegExp).join(`|`),f=this.lineCommentStart[0];else var d=c.escapeRegExp(this.lineCommentStart),f=this.lineCommentStart;d=RegExp(`^(\\s*)(?:`+d+`) ?`),u=t.getUseSoftTabs();var p=function(e,t){var n=e.match(d);if(n){var r=n[1].length,a=n[0].length;!_(e,r,a)&&n[0][a-1]==` `&&a--,i.removeInLine(t,r,a)}},m=f+` `,h=function(e,t){(!a||/\S/.test(e))&&(_(e,s,s)?i.insertInLine({row:t,column:s},m):i.insertInLine({row:t,column:s},f))},g=function(e,t){return d.test(e)},_=function(e,t,n){for(var r=0;t--&&e.charAt(t)==` `;)r++;if(r%l!=0)return!1;for(var r=0;e.charAt(n++)==` `;)r++;return l>2?r%l!=l-1:r%l==0}}else{if(!this.blockComment)return!1;var f=this.blockComment.start,v=this.blockComment.end,d=RegExp(`^(\\s*)(?:`+c.escapeRegExp(f)+`)`),y=RegExp(`(?:`+c.escapeRegExp(v)+`)\\s*$`),h=function(e,t){g(e,t)||(!a||/\S/.test(e))&&(i.insertInLine({row:t,column:e.length},v),i.insertInLine({row:t,column:s},f))},p=function(e,t){var n;(n=e.match(y))&&i.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(d))&&i.removeInLine(t,n[1].length,n[0].length)},g=function(e,n){if(d.test(e))return!0;for(var r=t.getTokens(n),i=0;i<r.length;i++)if(r[i].type===`comment`)return!0}}function b(e){for(var t=n;t<=r;t++)e(i.getLine(t),t)}var x=1/0;b(function(e,t){var n=e.search(/\S/);n===-1?x>e.length&&(x=e.length):(n<s&&(s=n),o&&!g(e,t)&&(o=!1))}),s==1/0&&(s=x,a=!1,o=!1),u&&s%l!=0&&(s=Math.floor(s/l)*l),b(o?p:h)},this.toggleBlockComment=function(e,t,n,r){var i=this.blockComment;if(i){!i.start&&i[0]&&(i=i[0]);var a=new l(t,r.row,r.column),o=a.getCurrentToken();t.selection;var s=t.selection.toOrientedRange(),c,d;if(o&&/comment/.test(o.type)){for(var f,p;o&&/comment/.test(o.type);){var m=o.value.indexOf(i.start);if(m!=-1){var h=a.getCurrentTokenRow(),g=a.getCurrentTokenColumn()+m;f=new u(h,g,h,g+i.start.length);break}o=a.stepBackward()}for(var a=new l(t,r.row,r.column),o=a.getCurrentToken();o&&/comment/.test(o.type);){var m=o.value.indexOf(i.end);if(m!=-1){var h=a.getCurrentTokenRow(),g=a.getCurrentTokenColumn()+m;p=new u(h,g,h,g+i.end.length);break}o=a.stepForward()}p&&t.remove(p),f&&(t.remove(f),c=f.start.row,d=-i.start.length)}else d=i.start.length,c=n.start.row,t.insert(n.end,i.end),t.insert(n.start,i.start);s.start.row==c&&(s.start.column+=d),s.end.row==c&&(s.end.column+=d),t.selection.fromOrientedRange(s)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,a=r.$modes[i];a||(r.$modes[i]=a=new n),r.$modes[t]||(r.$modes[t]=a),this.$embeds.push(t),this.$modes[t]=a}for(var o=[`toggleBlockComment`,`toggleCommentLines`,`getNextLineIndent`,`checkOutdent`,`autoOutdent`,`transformAction`,`getCompletions`],s=function(e){(function(t){var n=o[e],r=t[n];t[o[e]]=function(){return this.$delegator(n,arguments,r)}})(c)},c=this,t=0;t<o.length;t++)s(t)},this.$delegator=function(e,t,n){var r=t[0]||`start`;if(typeof r!=`string`){if(Array.isArray(r[2])){var i=r[2][r[2].length-1],a=this.$modes[i];if(a)return a[e].apply(a,[r[1]].concat([].slice.call(t,1)))}r=r[0]||`start`}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s=r.split(this.$embeds[o]);if(!s[0]&&s[1]){t[0]=s[1];var a=this.$modes[this.$embeds[o]];return a[e].apply(a,t)}}var c=n.apply(this,t);return n?c:void 0},this.transformAction=function(e,t,n,r,i){if(this.$behaviour){var a=this.$behaviour.getBehaviours();for(var o in a)if(a[o][t]){var s=a[o][t].apply(this,arguments);if(s)return s}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(var r in t)for(var i=t[r],a=0,o=i.length;a<o;a++)if(typeof i[a].token==`string`)/keyword|support|storage/.test(i[a].token)&&n.push(i[a].regex);else if(typeof i[a].token==`object`){for(var s=0,c=i[a].token.length;s<c;s++)if(/keyword|support|storage/.test(i[a].token[s])){var r=i[a].regex.match(/\(.+?\)/g)[s];n.push(r.substr(1,r.length-2))}}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,r){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:`keyword`}})},this.$id=`ace/mode/text`}).call(d.prototype),t.Mode=d}),ace.define(`ace/line_widgets`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("./lib/dom");t.LineWidgets=function(){function e(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on(`change`,this.updateOnChange),this.session.on(`changeFold`,this.updateOnFold),this.session.on(`changeEditor`,this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return!this.$useWrapMode||!this.$wrapData[e]?1+t:this.$wrapData[e].length+1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on(`beforeRender`,this.measureWidgets),e.renderer.on(`afterRender`,this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off(`beforeRender`,this.measureWidgets),t.renderer.off(`afterRender`,this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(!(!n||!e.action)){for(var r=e.data,i=r.start.row,a=r.end.row,o=e.action==`add`,s=i+1;s<a;s++)n[s]&&(n[s].hidden=o);n[a]&&(o?n[i]?n[a].hidden=o:n[i]=n[a]:(n[i]==n[a]&&(n[i]=void 0),n[a].hidden=o))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,r=e.end.row-n;if(r!==0)if(e.action==`remove`){var i=t.splice(n+1,r);!t[n]&&i[i.length-1]&&(t[n]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var a=Array(r);t[n]&&t[n].column!=null&&e.start.column>t[n].column&&n++,a.unshift(n,0),t.splice.apply(t,a),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,n){if(e)for(t=!1,e.row=n;e.$oldWidget;)e.$oldWidget.row=n,e=e.$oldWidget}),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=r.createElement(`div`),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=r.createElement(`div`),e.el.textContent=e.text),e.el&&(r.addCssClass(e.el,`ace_lineWidgetContainer`),e.className&&r.addCssClass(e.el,e.className),e.el.style.position=`absolute`,e.el.style.zIndex=`5`,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=`3`),e.pixelHeight??=e.el.offsetHeight),e.rowCount??=e.pixelHeight/t.layerConfig.lineHeight;var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var i=this.session.lineWidgets;e.row==n.end.row&&!i[n.start.row]?i[n.start.row]=e:e.hidden=!0}return this.session._emit(`changeFold`,{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch{}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit(`changeFold`,{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],r=[];n;)r.push(n),n=n.$oldWidget;return r},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,r=t.layerConfig;if(!(!n||!n.length)){for(var i=1/0,a=0;a<n.length;a++){var o=n[a];if(!(!o||!o.el)&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,t.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/r.characterWidth));var s=o.h/r.lineHeight;o.coverLine&&(s-=this.session.getRowLineCount(o.row),s<0&&(s=0)),o.rowCount!=s&&(o.rowCount=s,o.row<i&&(i=o.row))}}i!=1/0&&(this.session._emit(`changeFold`,{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,r=this.session.lineWidgets;if(r){for(var i=Math.min(this.firstRow,n.firstRow),a=Math.max(this.lastRow,n.lastRow,r.length);i>0&&!r[i];)i--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var o=i;o<=a;o++){var s=r[o];if(!(!s||!s.el)){if(s.hidden){s.el.style.top=-100-(s.pixelHeight||0)+`px`;continue}s._inDocument||(s._inDocument=!0,t.container.appendChild(s.el));var c=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;s.coverLine||(c+=n.lineHeight*this.session.getRowLineCount(s.row)),s.el.style.top=c-n.offset+`px`;var l=s.coverGutter?0:t.gutterWidth;s.fixedWidth||(l-=t.scrollLeft),s.el.style.left=l+`px`,s.fullWidth&&s.screenWidth&&(s.el.style.minWidth=n.width+2*n.padding+`px`),s.fixedWidth?s.el.style.right=t.scrollBar.getWidth()+`px`:s.el.style.right=``}}}},e}()}),ace.define(`ace/apply_delta`,[`require`,`exports`,`module`],function(e,t,n){t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,a=e[r]||``;switch(t.action){case`insert`:if(t.lines.length===1)e[r]=a.substring(0,i)+t.lines[0]+a.substring(i);else{var o=[r,1].concat(t.lines);e.splice.apply(e,o),e[r]=a.substring(0,i)+e[r],e[r+t.lines.length-1]+=a.substring(i)}break;case`remove`:var s=t.end.column,c=t.end.row;r===c?e[r]=a.substring(0,i)+a.substring(s):e.splice(r,c-r+1,a.substring(0,i)+e[c].substring(s))}}}),ace.define(`ace/anchor`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/event_emitter`],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,a=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof t==`number`?this.setPosition(t,n):this.setPosition(t.row,t.column)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if((e.start.row!=e.end.row||e.start.row==this.row)&&!(e.start.row>this.row)){var t=s(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var r=n?{row:e,column:t}:this.$clipPositionToDocument(e,t);if(this.row!=r.row||this.column!=r.column){var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal(`change`,{old:i,value:r})}},e.prototype.detach=function(){this.document.off(`change`,this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on(`change`,this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();a.prototype.$insertRight=!1,r.implement(a.prototype,i);function o(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function s(e,t,n){var r=e.action==`insert`,i=(r?1:-1)*(e.end.row-e.start.row),a=(r?1:-1)*(e.end.column-e.start.column),s=e.start,c=r?s:e.end;return o(t,s,n)?{row:t.row,column:t.column}:o(c,t,!n)?{row:t.row+i,column:t.column+(t.row==c.row?a:0)}:{row:s.row,column:s.column}}t.Anchor=a}),ace.define(`ace/document`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/apply_delta`,`ace/lib/event_emitter`,`ace/range`,`ace/anchor`],function(e,t,n){var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,a=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,s=e("./anchor").Anchor,c=function(){function e(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 e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||``)},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new s(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:`
|
|
197
|
-
`,this._signal(`changeNewLineMode`)},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case`windows`:return`\r
|
|
198
|
-
`;case`unix`:return`
|
|
199
|
-
`;default:return this.$autoNewLine||`
|
|
200
|
-
`}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal(`changeNewLineMode`))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return e==`\r
|
|
201
|
-
`||e==`\r`||e==`
|
|
202
|
-
`},e.prototype.getLine=function(e){return this.$lines[e]||``},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.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 n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn(`Use of document.insertLines is deprecated. Use the insertFullLines method instead.`),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn(`Use of document.removeLines is deprecated. Use the removeFullLines method instead.`),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn(`Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.`),this.insertMergedLines(e,[``,``])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:`insert`,lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();e===void 0?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var r=this.getLine(e);return t??=r.length,t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.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},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([``]),n=0):(t=[``].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:`insert`,lines:t}),this.clonePos(r)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:`remove`,lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:`remove`,lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,a=n?this.getLine(i).length:0,s=r?t+1:t,c=new o(i,a,s,r?0:this.getLine(s).length),l=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:`remove`,lines:this.getLinesForRange(c)}),l},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:`remove`,lines:[``,``]})},e.prototype.replace=function(e,t){return e instanceof o||(e=o.fromPoints(e.start,e.end)),t.length===0&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n=e.action==`insert`;(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal(`change`,e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action==`remove`&&e.start.row<t&&e.end.row<t||e.action==`insert`&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,r=n.length-t+1,i=e.start.row,a=e.start.column,o=0,s=0;o<r;o=s){s+=t-1;var c=n.slice(o,s);c.push(``),this.applyDelta({start:this.pos(i+o,a),end:this.pos(i+s,a=0),action:e.action,lines:c},!0)}e.lines=n.slice(o),e.start.row=i+o,e.start.column=a,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action==`insert`?`remove`:`insert`,lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=t||0,a=n.length;i<a;i++)if(e-=n[i].length+r,e<0)return{row:i,column:e+n[i].length+r};return{row:a-1,column:e+n[a-1].length+r}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,a=Math.min(e.row,n.length),o=t||0;o<a;++o)i+=n[o].length+r;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();c.prototype.$autoNewLine=``,c.prototype.$newLineMode=`auto`,r.implement(c.prototype,a),t.Document=c}),ace.define(`ace/background_tokenizer`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/event_emitter`],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,a=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,r=-1,i=n.doc,a=t;n.lines[t];)t++;var o=i.getLength(),s=0;for(n.running=!1;t<o;){n.$tokenizeRow(t),r=t;do t++;while(n.lines[t]);if(s++,s%5==0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,r==-1&&(r=t),a<=r&&n.fireUpdateEvent(a,r)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal(`update`,{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||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)},e.prototype.scheduleStart=function(){this.running||=setTimeout(this.$worker,700)},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.lines[t]=null;else if(e.action==`remove`)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.lines.splice.apply(this.lines,r),this.states.splice.apply(this.states,r)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||`start`},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],r=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+``==r.state+``?this.currentLine==e&&(this.currentLine=e+1):(this.states[e]=r.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)),this.lines[e]=r.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();r.implement(a.prototype,i),t.BackgroundTokenizer=a}),ace.define(`ace/search_highlight`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/range`],function(e,t,n){var r=e("./lib/lang"),i=e("./range").Range,a=function(){function e(e,t,n){n===void 0&&(n=`text`),this.setRegexp(e),this.clazz=t,this.type=n,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+``!=e+``&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,a){if(this.regExp){for(var o=a.firstRow,s=a.lastRow,c={},l=n.$editor&&n.$editor.$search,u=l&&l.$isMultilineSearch(n.$editor.getLastSearchOptions()),d=o;d<=s;d++){var f=this.cache[d];if(f==null||n.getValue().length!=this.docLen){if(u){f=[];var p=l.$multiLineForward(n,this.regExp,d,s);if(p){var m=p.endRow<=s?p.endRow-1:s;m>d&&(d=m),f.push(new i(p.startRow,p.startCol,p.endRow,p.endCol))}f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES))}else f=r.getMatchOffsets(n.getLine(d),this.regExp),f.length>this.MAX_RANGES&&(f=f.slice(0,this.MAX_RANGES)),f=f.map(function(e){return new i(d,e.offset,d,e.offset+e.length)});this.cache[d]=f.length?f:``}if(f.length!==0)for(var h=f.length;h--;){var g=f[h].toScreenRange(n),_=g.toString();c[_]||(c[_]=!0,t.drawSingleLineMarker(e,g,this.clazz,a))}}this.docLen=n.getValue().length}},e}();a.prototype.MAX_RANGES=500,t.SearchHighlight=a}),ace.define(`ace/undomanager`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),t===!1||!this.lastDeltas){this.lastDeltas=[];var r=this.$undoStack.length;r>this.$undoDepth-1&&this.$undoStack.splice(0,r-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}(e.action==`remove`||e.action==`insert`)&&(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){t??=this.$rev+1;for(var n=this.$undoStack,r=n.length;r--;){var i=n[r][0];if(i.id<=e)break;i.id<t&&(i.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,r=n.length;r--;){var i=n[r];if(i.rev<e)return t&&(i=n[r+1]),i}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){t??=this.$rev+1;for(var n=this.$undoStack,r=null,i=0,a=n.length;a--;){var o=n[a][0];if(o.id<t&&!r&&(r=a+1),o.id<=e){i=a+1;break}}return n.slice(i,r)},e.prototype.getChangedRanges=function(e,t){t??=this.$rev+1},e.prototype.getChangedLines=function(e,t){t??=this.$rev+1},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(i(n,n.length)){e||=this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var r=n.pop(),a=null;return r&&(a=e.undoChanges(r,t),this.$redoStack.push(r),this.$syncRev()),this.$fromUndo=!1,a}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||=this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);v(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var r=this.$redoStack.pop(),i=null;return r&&(i=e.redoChanges(r,t),this.$undoStack.push(r),this.$syncRev()),this.$fromUndo=!1,i},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){e??=this.$rev,this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?l(e):l(this.$undoStack)+`
|
|
203
|
-
---
|
|
204
|
-
`+l(this.$redoStack)},e}();r.prototype.hasUndo=r.prototype.canUndo,r.prototype.hasRedo=r.prototype.canRedo,r.prototype.isClean=r.prototype.isAtBookmark,r.prototype.markClean=r.prototype.bookmark;function i(e,t){for(var n=t;n--;){var r=e[n];if(r&&!r[0].ignore){for(;n<t-1;){var i=f(e[n],e[n+1]);e[n]=i[0],e[n+1]=i[1],n++}return!0}}}var a=e("./range").Range,o=a.comparePoints;a.comparePoints;function s(e){return{row:e.row,column:e.column}}function c(e){return{start:s(e.start),end:s(e.end),action:e.action,lines:e.lines.slice()}}function l(e){if(e||=this,Array.isArray(e))return e.map(l).join(`
|
|
205
|
-
`);var t=``;return e.action?(t=e.action==`insert`?`+`:`-`,t+=`[`+e.lines+`]`):e.value&&(t=Array.isArray(e.value)?e.value.map(u).join(`
|
|
206
|
-
`):u(e.value)),e.start&&(t+=u(e)),(e.id||e.rev)&&(t+=` (`+(e.id||e.rev)+`)`),t}function u(e){return e.start.row+`:`+e.start.column+`=>`+e.end.row+`:`+e.end.column}function d(e,t){var n=e.action==`insert`,r=t.action==`insert`;if(n&&r)if(o(t.start,e.end)>=0)m(t,e,-1);else if(o(t.start,e.start)<=0)m(e,t,1);else return null;else if(n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else if(o(t.end,e.start)<=0)m(e,t,-1);else return null;else if(!n&&r)if(o(t.start,e.start)>=0)m(t,e,1);else if(o(t.start,e.start)<=0)m(e,t,1);else return null;else if(!n&&!r)if(o(t.start,e.start)>=0)m(t,e,1);else if(o(t.end,e.start)<=0)m(e,t,-1);else return null;return[t,e]}function f(e,t){for(var n=e.length;n--;)for(var r=0;r<t.length;r++)if(!d(e[n],t[r])){for(;n<e.length;){for(;r--;)d(t[r],e[n]);r=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function p(e,t){var n=e.action==`insert`,r=t.action==`insert`;if(n&&r)o(e.start,t.start)<0?m(t,e,1):m(e,t,1);else if(n&&!r)o(e.start,t.end)>=0?m(e,t,-1):(o(e.start,t.start)<=0||m(e,a.fromPoints(t.start,e.start),-1),m(t,e,1));else if(!n&&r)o(t.start,e.end)>=0?m(t,e,-1):(o(t.start,e.start)<=0||m(t,a.fromPoints(e.start,t.start),-1),m(e,t,1));else if(!n&&!r)if(o(t.start,e.end)>=0)m(t,e,-1);else if(o(t.end,e.start)<=0)m(e,t,-1);else{var i,s;return o(e.start,t.start)<0&&(i=e,e=g(e,t.start)),o(e.end,t.end)>0&&(s=g(e,t.end)),h(t.end,e.start,e.end,-1),s&&!i&&(e.lines=s.lines,e.start=s.start,e.end=s.end,s=e),[t,i,s].filter(Boolean)}return[t,e]}function m(e,t,n){h(e.start,t.start,t.end,n),h(e.end,t.start,t.end,n)}function h(e,t,n,r){e.row==(r==1?t:n).row&&(e.column+=r*(n.column-t.column)),e.row+=r*(n.row-t.row)}function g(e,t){var n=e.lines,r=e.end;e.end=s(t);var i=e.end.row-e.start.row,a=n.splice(i,n.length),o=i?t.column:t.column-e.start.column;return n.push(a[0].substring(0,o)),a[0]=a[0].substr(o),{start:s(t),end:r,lines:a,action:e.action}}function _(e,t){t=c(t);for(var n=e.length;n--;){for(var r=e[n],i=0;i<r.length;i++){var a=r[i],o=p(a,t);t=o[0],o.length!=2&&(o[2]?(r.splice(i+1,1,o[1],o[2]),i++):o[1]||(r.splice(i,1),i--))}r.length||e.splice(n,1)}return e}function v(e,t){for(var n=0;n<t.length;n++)for(var r=t[n],i=0;i<r.length;i++)_(e,r[i])}t.UndoManager=r}),ace.define(`ace/edit_session/fold_line`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e("../range").Range;t.FoldLine=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw Error(`Can't add a fold to this FoldLine as it has no connection`);this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else if(e.end.row==this.start.row)this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column;else throw Error(`Trying to add fold to FoldRow that doesn't have a matching row`);e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var r=0,i=this.folds,a,o,s,c=!0;t??(t=this.end.row,n=this.end.column);for(var l=0;l<i.length;l++){if(a=i[l],o=a.range.compareStart(t,n),o==-1){e(null,t,n,r,c);return}if(s=e(null,a.start.row,a.start.column,r,c),s=!s&&e(a.placeholder,a.start.row,a.start.column,r),s||o===0)return;c=!a.sameRow,r=a.end.column}e(null,t,n,r,c)},e.prototype.getNextFoldTo=function(e,t){for(var n,r,i=0;i<this.folds.length;i++){if(n=this.folds[i],r=n.range.compareEnd(e,t),r==-1)return{fold:n,kind:`after`};if(r===0)return{fold:n,kind:`inside`}}return null},e.prototype.addRemoveChars=function(e,t,n){var r=this.getNextFoldTo(e,t),i,a;if(r){if(i=r.fold,r.kind==`inside`&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){a=this.folds;var o=a.indexOf(i);for(o===0&&(this.start.column+=n);o<a.length;o++){if(i=a[o],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}}},e.prototype.split=function(t,n){var r=this.getNextFoldTo(t,n);if(!r||r.kind==`inside`)return null;var i=r.fold,a=this.folds,o=this.foldData,s=a.indexOf(i),c=a[s-1];this.end.row=c.end.row,this.end.column=c.end.column,a=a.splice(s,a.length-s);var l=new e(o,a);return o.splice(o.indexOf(this)+1,0,l),l},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var r=this.foldData;r.splice(r.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+`: [`];return this.folds.forEach(function(t){e.push(` `+t.toString())}),e.push(`]`),e.join(`
|
|
207
|
-
`)},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var r=this.folds[n];if(e-=r.start.column-t,e<0)return{row:r.start.row,column:r.start.column+e};if(e-=r.placeholder.length,e<0)return r.start;t=r.end.column}return{row:this.end.row,column:this.end.column+e}},e}()}),ace.define(`ace/range_list`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e("./range").Range.comparePoints,i=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,a=n||0;a<i.length;a++){var o=i[a],s=r(e,o.end);if(!(s>0)){var c=r(e,o.start);return s===0?t&&c!==0?-a-2:a:c>0||c===0&&!t?a:-a-1}}return-a-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var r=this.pointIndex(e.end,t,n);return r<0?r=-r-1:r++,this.ranges.splice(n,r-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return r(e.start,t.start)});for(var n=t[0],i,a=1;a<t.length;a++){i=n,n=t[a];var o=r(i.end,n.start);o<0||o==0&&!i.isEmpty()&&!n.isEmpty()||(r(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),t.splice(a,1),e.push(n),n=i,a--)}return this.ranges=t,e},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var r=this.pointIndex({row:e,column:0});r<0&&(r=-r-1);var i=this.pointIndex({row:t,column:0},r);i<0&&(i=-i-1);for(var a=[],o=r;o<i;o++)a.push(n[o]);return a},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on(`change`,this.onChange)},e.prototype.detach=function(){this.session&&=(this.session.removeListener(`change`,this.onChange),null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,r=t.row,i=n.row,a=this.ranges,o=0,s=a.length;o<s;o++){var c=a[o];if(c.end.row>=r)break}if(e.action==`insert`)for(var l=i-r,u=-t.column+n.column;o<s;o++){var c=a[o];if(c.start.row>r)break;if(c.start.row==r&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=u,c.start.row+=l)),c.end.row==r&&c.end.column>=t.column){if(c.end.column==t.column&&this.$bias<0)continue;c.end.column==t.column&&u>0&&o<s-1&&c.end.column>c.start.column&&c.end.column==a[o+1].start.column&&(c.end.column-=u),c.end.column+=u,c.end.row+=l}}else for(var l=r-i,u=t.column-n.column;o<s;o++){var c=a[o];if(c.start.row>i)break;c.end.row<i&&(r<c.end.row||r==c.end.row&&t.column<c.end.column)?(c.end.row=r,c.end.column=t.column):c.end.row==i?c.end.column<=n.column?(l||c.end.column>t.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=u,c.end.row+=l):c.end.row>i&&(c.end.row+=l),c.start.row<i&&(r<c.start.row||r==c.start.row&&t.column<c.start.column)?(c.start.row=r,c.start.column=t.column):c.start.row==i?c.start.column<=n.column?(l||c.start.column>t.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=u,c.start.row+=l):c.start.row>i&&(c.start.row+=l)}if(l!=0&&o<s)for(;o<s;o++){var c=a[o];c.start.row+=l,c.end.row+=l}},e}();i.prototype.comparePoints=r,t.RangeList=i}),ace.define(`ace/edit_session/fold`,[`require`,`exports`,`module`,`ace/range_list`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=function(e){r(t,e);function t(t,n){var r=e.call(this)||this;return r.foldLine=null,r.placeholder=n,r.range=t,r.start=t.start,r.end=t.end,r.sameRow=t.start.row==t.end.row,r.subFolds=r.ranges=[],r}return t.prototype.toString=function(){return`"`+this.placeholder+`" `+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},t.prototype.clone=function(){var e=new t(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(t){e.subFolds.push(t.clone())}),e.collapseChildren=this.collapseChildren,e},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){o(e,this.start);for(var t=e.start.row,n=e.start.column,r=0,i=-1;r<this.subFolds.length&&(i=this.subFolds[r].range.compare(t,n),i==1);r++);var a=this.subFolds[r],s=0;if(i==0){if(a.range.containsRange(e))return a.addSubFold(e);s=1}for(var t=e.range.end.row,n=e.range.end.column,c=r,i=-1;c<this.subFolds.length&&(i=this.subFolds[c].range.compare(t,n),i==1);c++);i==0&&c++;for(var l=this.subFolds.splice(r,c-r,e),u=i==0?l.length-1:l.length,d=s;d<u;d++)e.addSubFold(l[d]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return c(e,this.start)},t}(e("../range_list").RangeList);function a(e,t){e.row-=t.row,e.row==0&&(e.column-=t.column)}function o(e,t){a(e.start,t),a(e.end,t)}function s(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row}function c(e,t){s(e.start,t),s(e.end,t)}t.Fold=i}),ace.define(`ace/edit_session/folding`,[`require`,`exports`,`module`,`ace/range`,`ace/edit_session/fold_line`,`ace/edit_session/fold`,`ace/token_iterator`,`ace/mouse/mouse_event`],function(e,t,n){var r=e("../range").Range,i=e("./fold_line").FoldLine,a=e("./fold").Fold,o=e("../token_iterator").TokenIterator,s=e("../mouse/mouse_event").MouseEvent;function c(){this.getFoldAt=function(e,t,n){var r=this.getFoldLine(e);if(!r)return null;for(var i=r.folds,a=0;a<i.length;a++){var o=i[a].range;if(o.contains(e,t)){if(n==1&&o.isEnd(e,t)&&!o.isEmpty()||n==-1&&o.isStart(e,t)&&!o.isEmpty())continue;return i[a]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,r=this.$foldData,i=[];t.column+=1,--n.column;for(var a=0;a<r.length;a++){var o=r[a].range.compareRange(e);if(o!=2){if(o==-2)break;for(var s=r[a].folds,c=0;c<s.length;c++){var l=s[c];if(o=l.range.compareRange(e),o==-2)break;if(o!=2){if(o==42)break;i.push(l)}}}}return--t.column,n.column+=1,i},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)}else var t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var r=0;r<t[n].folds.length;r++)e.push(t[n].folds[r]);return e},this.getFoldStringAt=function(e,t,n,r){if(r||=this.getFoldLine(e),!r)return null;for(var i={end:{column:0}},a,o,s=0;s<r.folds.length;s++){o=r.folds[s];var c=o.range.compareEnd(e,t);if(c==-1){a=this.getLine(o.start.row).substring(i.end.column,o.start.column);break}if(c===0)return null;i=o}return a||=this.getLine(o.start.row).substring(i.end.column),n==-1?a.substring(0,t-i.end.column):n==1?a.substring(t-i.end.column):a},this.getFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0);r<n.length;r++){var i=n[r];if(i.start.row<=e&&i.end.row>=e)return i;if(i.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,r=0;for(t&&(r=n.indexOf(t)),r==-1&&(r=0);r<n.length;r++){var i=n[r];if(i.end.row>=e)return i}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,r=t-e+1,i=0;i<n.length;i++){var a=n[i],o=a.end.row,s=a.start.row;if(o>=t){s<t&&(s>=e?r-=t-s:r=0);break}o>=e&&(r-=s>=e?o-s:o-e+1)}return r},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n=this.$foldData,r=!1,o;e instanceof a?o=e:(o=new a(t,e),o.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,c=o.start.column,l=o.end.row,u=o.end.column,d=this.getFoldAt(s,c,1),f=this.getFoldAt(l,u,-1);if(d&&f==d)return d.addSubFold(o);d&&!d.range.isStart(s,c)&&this.removeFold(d),f&&!f.range.isEnd(l,u)&&this.removeFold(f);var p=this.getFoldsInRange(o.range);p.length>0&&(this.removeFolds(p),o.collapseChildren||p.forEach(function(e){o.addSubFold(e)}));for(var m=0;m<n.length;m++){var h=n[m];if(l==h.start.row){h.addFold(o),r=!0;break}if(s==h.end.row){if(h.addFold(o),r=!0,!o.sameRow){var g=n[m+1];if(g&&g.start.row==l){h.merge(g);break}}break}if(l<=h.start.row)break}return r||(h=this.$addFoldLine(new i(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(h.start.row,h.start.row):this.$updateRowLengthCache(h.start.row,h.start.row),this.$modified=!0,this._signal(`changeFold`,{data:o,action:`add`}),o},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,r=t.end.row,i=this.$foldData,a=t.folds;if(a.length==1)i.splice(i.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))a.pop(),t.end.row=a[a.length-1].end.row,t.end.column=a[a.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))a.shift(),t.start.row=a[0].start.row,t.start.column=a[0].start.column;else if(e.sameRow)a.splice(a.indexOf(e),1);else{var o=t.split(e.start.row,e.start.column);a=o.folds,a.shift(),o.start.row=a[0].start.row,o.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,r):this.$updateRowLengthCache(n,r)),this.$modified=!0,this._signal(`changeFold`,{data:e,action:`remove`})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach(function(t){e.restoreRange(t),this.addFold(t)},this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,i;if(e==null)n=new r(0,0,this.getLength(),0),t??=!0;else if(typeof e==`number`)n=new r(e,0,e,this.getLine(e).length);else if(`row`in e)n=r.fromPoints(e,e);else if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;else n=e;i=this.getFoldsInRangeList(n);for(var a=i;i.length==1&&r.comparePoints(i[0].start,n.start)<0&&r.comparePoints(i[0].end,n.end)>0;)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(t==0?this.expandFolds(i):this.removeFolds(i),a.length)return a},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,r,i){r??=e.start.row,i??=0,t??=e.end.row,n??=this.getLine(t).length;var a=this.doc,o=``;return e.walk(function(e,t,n,s){if(!(t<r)){if(t==r){if(n<i)return;s=Math.max(i,s)}o+=e??a.getLine(t).substring(s,n)}},t,n),o},this.getDisplayLine=function(e,t,n,r){var i=this.getFoldLine(e);if(i)return this.getFoldDisplayLine(i,e,t,n,r);var a=this.doc.getLine(e);return a.substring(r||0,t||a.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map(function(t){var n=t.folds.map(function(e){return e.clone()});return new i(e,n)}),e},this.toggleFold=function(e){var t=this.selection.getRange(),n,r;if(t.isEmpty()){var i=t.start;if(n=this.getFoldAt(i.row,i.column),n){this.expandFold(n);return}if(e){var a=this.getFoldLine(i.row);a&&this.expandFolds(a.folds);return}(r=this.findMatchingBracket(i))?t.comparePoint(r)==1?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:i.row,column:i.column+1}))?(t.comparePoint(r)==1?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(i.row,i.column)||t}else{var o=this.getFoldsInRange(t);if(e&&o.length){this.expandFolds(o);return}o.length==1&&(n=o[0])}if(n||=this.getFoldAt(t.start.row,t.start.column),n&&n.range.toString()==t.toString()){this.expandFold(n);return}var s=`...`;if(!t.isMultiLine()){if(s=this.getTextRange(t),s.length<4)return;s=s.trim().substring(0,2)+`..`}this.addFold(s,t)},this.getCommentFoldRange=function(e,t,n){var i=new o(this,e,t),a=i.getCurrentToken(),s=a&&a.type;if(a&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s==`comment`&&(s+=`|doc-start|\\.doc`);var c=new RegExp(s),l=new r;if(n!=1){do a=i.stepBackward();while(a&&c.test(a.type));a=i.stepForward()}l.start.row=i.getCurrentTokenRow(),l.start.column=i.getCurrentTokenColumn()+a.value.length,i=new o(this,e,t);var u=this.getState(i.$row);if(n!=-1){var d=-1;do if(a=i.stepForward(),d==-1){var f=this.getState(i.$row);u.toString()!==f.toString()&&(d=i.$row)}else if(i.$row>d)break;while(a&&c.test(a.type));a=i.stepBackward()}else a=i.getCurrentToken();return l.end.row=i.getCurrentTokenRow(),l.end.column=i.getCurrentTokenColumn(),l.start.row==l.end.row&&l.start.column>l.end.column?void 0:l}},this.foldAll=function(e,t,n,r){n??=1e5;var i=this.foldWidgets;if(i){t||=this.getLength(),e||=0;for(var a=e;a<t;a++)if(i[a]??(i[a]=this.getFoldWidget(a)),i[a]==`start`&&!(r&&!r(a))){var o=this.getFoldWidgetRange(a);o&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e&&(a=o.end.row,o.collapseChildren=n,this.addFold(`...`,o))}}},this.foldToLevel=function(e){for(this.foldAll();e-->0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,function(t){for(var n=e.getTokens(t),r=0;r<n.length;r++){var i=n[r];if(!(i.type==`text`&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle=`markbegin`,this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw Error(`invalid fold style: `+e+`[`+Object.keys(this.$foldStyles).join(`, `)+`]`);if(this.$foldStyle!=e){this.$foldStyle=e,e==`manual`&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off(`change`,this.$updateFoldWidgets),this.off(`tokenizerUpdate`,this.$tokenizerUpdateFoldWidgets),this._signal(`changeAnnotation`),!e||this.$foldStyle==`manual`){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on(`change`,this.$updateFoldWidgets),this.on(`tokenizerUpdate`,this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var r=e-1,i;r>=0;){var a=n[r];if(a??=n[r]=this.getFoldWidget(r),a==`start`){var o=this.getFoldWidgetRange(r);if(i||=o,o&&o.end.row>=e)break}r--}return{range:r!==-1&&o,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof s&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var r=t.target||t.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=` ace_invalid`)}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),r=this.getLine(e),i=n===`end`?-1:1,a=this.getFoldAt(e,i===-1?0:r.length,i);if(a)return t.children||t.all?this.removeFold(a):this.expandFold(a),a;var o=this.getFoldWidgetRange(e,!0);if(o&&!o.isMultiLine()&&(a=this.getFoldAt(o.start.row,o.start.column,1),a&&o.isEqual(a.range)))return this.removeFold(a),a;if(t.siblings){var s=this.getParentFoldRangeData(e);if(s.range)var c=s.range.start.row+1,l=s.range.end.row;this.foldAll(c,l,t.all?1e4:0)}else t.children?(l=o?o.end.row:this.getLength(),this.foldAll(e+1,l,t.all?1e4:0)):o&&(t.all&&(o.collapseChildren=1e4),this.addFold(`...`,o));return o}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var r=this.getParentFoldRangeData(t,!0);if(n=r.range||r.firstRange,n){t=n.start.row;var i=this.getFoldAt(t,this.getLine(t).length,1);i?this.removeFold(i):this.addFold(`...`,n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(n===0)this.foldWidgets[t]=null;else if(e.action==`remove`)this.foldWidgets.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,r)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}t.Folding=c}),ace.define(`ace/edit_session/bracket_match`,[`require`,`exports`,`module`,`ace/token_iterator`,`ace/range`],function(e,t,n){var r=e("../token_iterator").TokenIterator,i=e("../range").Range;function a(){this.findMatchingBracket=function(e,t){if(e.column==0)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(n==``)return null;var r=n.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e):null},this.getBracketRange=function(e){var t=this.getLine(e.row),n=!0,r,a=t.charAt(e.column-1),o=a&&a.match(/([\(\[\{])|([\)\]\}])/);if(o||(a=t.charAt(e.column),e={row:e.row,column:e.column+1},o=a&&a.match(/([\(\[\{])|([\)\]\}])/),n=!1),!o)return null;if(o[1]){var s=this.$findClosingBracket(o[1],e);if(!s)return null;r=i.fromPoints(e,s),n||(r.end.column++,r.start.column--),r.cursor=r.end}else{var s=this.$findOpeningBracket(o[2],e);if(!s)return null;r=i.fromPoints(s,e),n||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),r=/([\(\[\{])|([\)\]\}])/,a=!t&&n.charAt(e.column-1),o=a&&a.match(r);if(o||=(a=(t===void 0||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},a&&a.match(r)),!o)return null;var s=new i(e.row,e.column-1,e.row,e.column),c=o[1]?this.$findClosingBracket(o[1],e):this.$findOpeningBracket(o[2],e);return c?[s,new i(c.row,c.column,c.row,c.column+1)]:[s]},this.$brackets={")":`(`,"(":`)`,"]":`[`,"[":`]`,"{":`}`,"}":`{`,"<":`>`,">":`<`},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],a=1,o=new r(this,t.row,t.column),s=o.getCurrentToken();if(s||=o.stepForward(),s){n||=RegExp(`(\\.?`+s.type.replace(`.`,`\\.`).replace(`rparen`,`.paren`).replace(/\b(?:end)\b/,`(?:start|begin|end)`).replace(/-close\b/,`-(close|open)`)+`)+`);for(var c=t.column-o.getCurrentTokenColumn()-2,l=s.value;;){for(;c>=0;){var u=l.charAt(c);if(u==i){if(--a,a==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else u==e&&(a+=1);--c}do s=o.stepBackward();while(s&&!n.test(s.type));if(s==null)break;l=s.value,c=l.length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],a=1,o=new r(this,t.row,t.column),s=o.getCurrentToken();if(s||=o.stepForward(),s){n||=RegExp(`(\\.?`+s.type.replace(`.`,`\\.`).replace(`lparen`,`.paren`).replace(/\b(?:start|begin)\b/,`(?:start|begin|end)`).replace(/-open\b/,`-(close|open)`)+`)+`);for(var c=t.column-o.getCurrentTokenColumn();;){for(var l=s.value,u=l.length;c<u;){var d=l.charAt(c);if(d==i){if(--a,a==0)return{row:o.getCurrentTokenRow(),column:c+o.getCurrentTokenColumn()}}else d==e&&(a+=1);c+=1}do s=o.stepForward();while(s&&!n.test(s.type));if(s==null)break;c=0}return null}},this.getMatchingTags=function(e){var t=new r(this,e.row,e.column),n=this.$findTagName(t);if(n)return t.stepBackward().value===`<`?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,r=!1;if(t&&t.type.indexOf(`tag-name`)===-1)do t=r?e.stepBackward():e.stepForward(),t&&(t.value===`/>`?r=!0:t.type.indexOf(`tag-name`)!==-1&&(n=!0));while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,r=t.value,a=t.value,o=0,s=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var c=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),l=!1;do{if(n=t,n.type.indexOf(`tag-close`)!==-1&&!l){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);l=!0}if(t=e.stepForward(),t){if(t.value===`>`&&!l){var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);l=!0}if(t.type.indexOf(`tag-name`)!==-1){if(r=t.value,a===r){if(n.value===`<`)o++;else if(n.value===`</`&&(o--,o<0)){e.stepBackward();var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var f=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t.type.indexOf(`tag-close`)===-1&&(t=e.stepForward()),t&&t.value===`>`)var p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);else return}}}else if(a===r&&t.value===`/>`&&(o--,o<0))var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),f=d,p=f,u=new i(c.end.row,c.end.column,c.end.row,c.end.column+1)}}while(t&&o>=0);if(s&&u&&d&&p&&c&&f)return{openTag:new i(s.start.row,s.start.column,u.end.row,u.end.column),closeTag:new i(d.start.row,d.start.column,p.end.row,p.end.column),openTagName:c,closeTagName:f}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),r=t.value,a=0,o=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),c=s+2,l=new i(o,s,o,c);e.stepForward();var u=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t.type.indexOf(`tag-close`)===-1&&(t=e.stepForward()),!(!t||t.value!==`>`)){var d=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do if(t=n,o=e.getCurrentTokenRow(),s=e.getCurrentTokenColumn(),c=s+t.value.length,n=e.stepBackward(),t){if(t.type.indexOf(`tag-name`)!==-1){if(r===t.value)if(n.value===`<`){if(a++,a>0){var f=new i(o,s,o,c),p=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do t=e.stepForward();while(t&&t.value!==`>`);var m=new i(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else n.value===`</`&&a--}else if(t.value===`/>`){for(var h=0,g=n;g;){if(g.type.indexOf(`tag-name`)!==-1&&g.value===r){a--;break}if(g.value===`<`)break;g=e.stepBackward(),h++}for(var _=0;_<h;_++)e.stepForward()}}while(n&&a<=0);if(p&&m&&l&&d&&f&&u)return{openTag:new i(p.start.row,p.start.column,m.end.row,m.end.column),closeTag:new i(l.start.row,l.start.column,d.end.row,d.end.column),openTagName:f,closeTagName:u}}}}t.BracketMatch=a}),ace.define(`ace/edit_session`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/bidihandler`,`ace/config`,`ace/lib/event_emitter`,`ace/selection`,`ace/mode/text`,`ace/range`,`ace/line_widgets`,`ace/document`,`ace/background_tokenizer`,`ace/search_highlight`,`ace/undomanager`,`ace/edit_session/folding`,`ace/edit_session/bracket_match`],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/lang"),a=e("./bidihandler").BidiHandler,o=e("./config"),s=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,l=e("./mode/text").Mode,u=e("./range").Range,d=e("./line_widgets").LineWidgets,f=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,m=e("./search_highlight").SearchHighlight,h=e("./undomanager").UndoManager,g=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id=`session`+ ++e.$uid,this.$foldData.toString=function(){return this.join(`
|
|
208
|
-
`)},this.$gutterCustomWidgets={},this.bgTokenizer=new p(new l().getTokenizer(),this);var r=this;this.bgTokenizer.on(`update`,function(e){r._signal(`tokenizerUpdate`,e)}),this.on(`changeFold`,this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof t!=`object`||!t.getLine)&&(t=new f(t)),this.setDocument(t),this.selection=new c(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on(`changeSelection`,this.$onSelectionChange),this.selection.on(`changeCursor`,this.$onSelectionChange),this.$bidiHandler=new a(this),o.resetOptions(this),this.setMode(n),o._signal(`session`,this),this.destroyed=!1,this.$initOperationListeners()}return e.prototype.$initOperationListeners=function(){var e=this;this.curOp=null,this.on(`change`,function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.docChanged=!0},!0),this.on(`changeSelection`,function(){e.curOp||(e.startOperation(),e.curOp.selectionBefore=e.$lastSel),e.curOp.selectionChanged=!0},!0),this.$operationResetTimer=i.delayedCall(this.endOperation.bind(this,!0))},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||={},this.$operationResetTimer.schedule(),this.curOp={command:e.command||{},args:e.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal(`startOperation`,e)},e.prototype.endOperation=function(e){if(this.curOp){if(e&&e.returnValue===!1){this.curOp=null,this._signal(`endOperation`,e);return}if(e==1&&this.curOp.command&&this.curOp.command.name==`mouse`)return;var t=this.selection.toJSON();this.curOp.selectionAfter=t,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(t),this._signal(`beforeEndOperation`),this.prevOp=this.curOp,this.curOp=null,this._signal(`endOperation`,e)}},e.prototype.setDocument=function(e){this.doc&&this.doc.off(`change`,this.$onChange),this.doc=e,e.on(`change`,this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},Object.defineProperty(e.prototype,"widgetManager",{get:function(){var e=new d(this);return this.widgetManager=e,this.$editor&&e.attach(this.$editor),e},set:function(e){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:e})},enumerable:!1,configurable:!0}),e.prototype.$resetRowCache=function(e){if(!e){this.$docRowCache=[],this.$screenRowCache=[];return}var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+r>>1,a=e[i];if(t>a)n=i+1;else if(t<a)r=i-1;else return i}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:`removeFolds`,folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal(`change`,e)},e.prototype.onSelectionChange=function(){this._signal(`changeSelection`)},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){typeof t==`string`&&(t=JSON.parse(t));var n=new h;n.$undoStack=t.history.$undoStack,n.$redoStack=t.history.$redoStack,n.mark=t.history.mark,n.$rev=t.history.rev;var r=new e(t.value);return t.folds.forEach(function(e){r.addFold(`...`,u.fromPoints(e.start,e.end))}),r.setAnnotations(t.annotations),r.setBreakpoints(t.breakpoints),r.setMode(t.mode),r.setScrollLeft(t.scrollLeft),r.setScrollTop(t.scrollTop),r.setUndoManager(n),r.selection.fromJSON(t.selection),r},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(e){return e.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),r,i=0;if(t==null){var a=n.length-1;i=this.getLine(e).length}else for(var a=0;a<n.length&&(i+=n[a].value.length,!(i>=t));a++);return r=n[a],r?(r.index=a,r.start=i-r.value.length,r):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(` `,this.getTabSize()):` `},e.prototype.setUseSoftTabs=function(e){this.setOption(`useSoftTabs`,e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption(`tabSize`,e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption(`navigateWithinSoftTabs`,e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption(`overwrite`,e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=``),this.$decorations[e]+=` `+t,this._signal(`changeBreakpoint`,{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||``).replace(` `+t,``),this._signal(`changeBreakpoint`,{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]=`ace_breakpoint`;this._signal(`changeBreakpoint`,{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal(`changeBreakpoint`,{})},e.prototype.setBreakpoint=function(e,t){t===void 0&&(t=`ace_breakpoint`),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal(`changeBreakpoint`,{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal(`changeBreakpoint`,{})},e.prototype.addMarker=function(e,t,n,r){var i=this.$markerId++,a={range:e,type:n||`line`,renderer:typeof n==`function`?n:null,clazz:t,inFront:!!r,id:i};return r?(this.$frontMarkers[i]=a,this._signal(`changeFrontMarker`)):(this.$backMarkers[i]=a,this._signal(`changeBackMarker`)),i},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal(`changeFrontMarker`)):(this.$backMarkers[n]=e,this._signal(`changeBackMarker`)),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;delete n[e],this._signal(t.inFront?`changeFrontMarker`:`changeBackMarker`)}},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new m(null,`ace_selected-word`,`text`);this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,r){typeof t!=`number`&&(n=t,t=e),n||=`ace_step`;var i=new u(e,0,t,1/0);return i.id=this.addMarker(i,n,`fullLine`,r),i},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal(`changeAnnotation`,{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:`
|
|
209
|
-
`},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),r=!1;if(t>0&&(r=!!n.charAt(t-1).match(this.tokenRe)),r||=!!n.charAt(t).match(this.tokenRe),r)var i=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))var i=/\s/;else var i=this.nonTokenRe;var a=t;if(a>0){do a--;while(a>=0&&n.charAt(a).match(i));a++}for(var o=t;o<n.length&&n.charAt(o).match(i);)o++;return new u(e,a,e,o)},e.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),r=this.getLine(n.end.row);r.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption(`useWorker`,e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal(`tokenizerUpdate`,e)},e.prototype.setMode=function(e,t){if(e&&typeof e==`object`){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,r=n.path}else r=e||`ace/mode/text`;if(this.$modes[`ace/mode/text`]||(this.$modes[`ace/mode/text`]=new l),this.$modes[r]&&!n){this.$onChangeMode(this.$modes[r]),t&&t();return}this.$modeId=r,o.loadModule([`mode`,r],function(e){if(!this.destroyed){if(this.$modeId!==r)return t&&t();this.$modes[r]&&!n?this.$onChangeMode(this.$modes[r]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[r]=e,e.$id=r),this.$onChangeMode(e)),t&&t()}}.bind(this)),this.$mode||this.$onChangeMode(this.$modes[`ace/mode/text`],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var r=e.getTokenizer();if(r.on!==void 0){var i=this.onReloadTokenizer.bind(this);r.on(`update`,i)}this.bgTokenizer.setTokenizer(r),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit(`changeMode`,{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&=(this.$worker.terminate(),null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){o.warn(`Could not load worker`,e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal(`changeScrollTop`,e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal(`changeScrollLeft`,e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach(function(t){t&&t.screenWidth>e&&(e=t.screenWidth)}),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,r=0,i=0,a=this.$foldData[i],o=a?a.start.row:1/0,s=t.length,c=0;c<s;c++){if(c>o){if(c=a.end.row+1,c>=s)break;a=this.$foldData[i++],o=a?a.start.row:1/0}n[c]??(n[c]=this.$getStringScreenWidth(t[c])[0]),n[c]>r&&(r=n[c])}this.screenWidth=r}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;n!=-1;n--){var r=e[n];r.action==`insert`||r.action==`remove`?this.doc.revertDelta(r):r.folds&&this.addFolds(r.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var r=e[n];(r.action==`insert`||r.action==`remove`)&&this.doc.$safeApplyDelta(r)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?e.action!==`insert`:e.action===`insert`}for(var r,i,a=0;a<e.length;a++){var o=e[a];if(o.start){if(!r){r=n(o)?u.fromPoints(o.start,o.end):u.fromPoints(o.start,o.start);continue}n(o)?(i=o.start,r.compare(i.row,i.column)==-1&&r.setStart(i),i=o.end,r.compare(i.row,i.column)==1&&r.setEnd(i)):(i=o.start,r.compare(i.row,i.column)==-1&&(r=u.fromPoints(o.start,o.start)))}}return r},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var r=this.getTextRange(e),i=this.getFoldsInRange(e),a=u.fromPoints(t,t);if(!n){this.remove(e);var o=e.start.row-e.end.row,s=o?-e.end.column:e.start.column-e.end.column;s&&(a.start.row==e.end.row&&a.start.column>e.end.column&&(a.start.column+=s),a.end.row==e.end.row&&a.end.column>e.end.column&&(a.end.column+=s)),o&&a.start.row>=e.end.row&&(a.start.row+=o,a.end.row+=o)}if(a.end=this.insert(a.start,r),i.length){var c=e.start,l=a.start,o=l.row-c.row,s=l.column-c.column;this.addFolds(i.map(function(e){return e=e.clone(),e.start.row==c.row&&(e.start.column+=s),e.end.row==c.row&&(e.end.column+=s),e.start.row+=o,e.end.row+=o,e}))}return a},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var r=e;r<=t;r++)this.doc.insertInLine({row:r,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),r=this.getTabSize(),i=t.start.row;i<=t.end.row;++i){var a=this.getLine(i);n.start.row=i,n.end.row=i;for(var o=0;o<r&&a.charAt(o)==` `;++o);o<r&&a.charAt(o)==` `?(n.start.column=o,n.end.column=o+1):(n.start.column=0,n.end.column=o),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){var r=this.getRowFoldStart(e+n);if(r<0)return 0;var i=r-e}else if(n>0){var r=this.getRowFoldEnd(t+n);if(r>this.doc.getLength()-1)return 0;var i=r-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var i=t-e+1}var a=new u(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(a).map(function(e){return e=e.clone(),e.start.row+=i,e.end.row+=i,e}),s=n==0?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,s),o.length&&this.addFolds(o),i},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal(`changeWrapMode`)}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){(this.$wrapLimitRange.min!==e||this.$wrapLimitRange.max!==t)&&(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal(`changeWrapMode`))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var r=this.$constrainWrapLimit(e,n.min,n.max);return r!=this.$wrapLimit&&r>1&&(this.$wrapLimit=r,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal(`changeWrapLimit`)),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,r=e.start,i=e.end,a=r.row,o=i.row,s=o-a,c=null;if(this.$updating=!0,s!=0)if(n===`remove`){this[t?`$wrapData`:`$rowLengthCache`].splice(a,s);var l=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var u=this.getFoldLine(i.row),d=0;if(u){u.addRemoveChars(i.row,i.column,r.column-i.column),u.shiftRow(-s);var f=this.getFoldLine(a);f&&f!==u&&(f.merge(u),u=f),d=l.indexOf(u)+1}for(;d<l.length;d++){var u=l[d];u.start.row>=i.row&&u.shiftRow(-s)}o=a}else{var p=Array(s);p.unshift(a,0);var m=t?this.$wrapData:this.$rowLengthCache;m.splice.apply(m,p);var l=this.$foldData,u=this.getFoldLine(a),d=0;if(u){var h=u.range.compareInside(r.row,r.column);h==0?(u=u.split(r.row,r.column),u&&(u.shiftRow(s),u.addRemoveChars(o,0,i.column-r.column))):h==-1&&(u.addRemoveChars(a,0,i.column-r.column),u.shiftRow(s)),d=l.indexOf(u)+1}for(;d<l.length;d++){var u=l[d];u.start.row>=a&&u.shiftRow(s)}}else{s=Math.abs(e.start.column-e.end.column),n===`remove`&&(c=this.getFoldsInRange(e),this.removeFolds(c),s=-s);var u=this.getFoldLine(a);u&&u.addRemoveChars(a,r.column,s)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error(`doc.getLength() and $wrapData.length have to be the same!`),this.$updating=!1,t?this.$updateWrapData(a,o):this.$updateRowLengthCache(a,o),c},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n=this.doc.getAllLines(),r=this.getTabSize(),i=this.$wrapData,a=this.$wrapLimit,o,s,c=e;for(t=Math.min(t,n.length-1);c<=t;)s=this.getFoldLine(c,s),s?(o=[],s.walk(function(e,t,r,i){var a;if(e!=null){a=this.$getDisplayTokens(e,o.length),a[0]=y;for(var s=1;s<a.length;s++)a[s]=b}else a=this.$getDisplayTokens(n[t].substring(i,r),o.length);o=o.concat(a)}.bind(this),s.end.row,n[s.end.row].length+1),i[s.start.row]=this.$computeWrapSplits(o,a,r),c=s.end.row+1):(o=this.$getDisplayTokens(n[c]),i[c]=this.$computeWrapSplits(o,a,r),c++)},e.prototype.$computeWrapSplits=function(e,t,n){if(e.length==0)return[];var r=[],i=e.length,a=0,o=0,s=this.$wrapAsCode,c=this.$indentedSoftWrap,l=t<=Math.max(2*n,8)||c===!1?0:Math.floor(t/2);function u(){var t=0;if(l===0)return t;if(c)for(var r=0;r<e.length;r++){var i=e[r];if(i==S)t+=1;else if(i==C)t+=n;else if(i==w)continue;else break}return s&&c!==!1&&(t+=n),Math.min(t,l)}function d(t){for(var n=t-a,i=a;i<t;i++){var s=e[i];(s===12||s===2)&&--n}r.length||(f=u(),r.indent=f),o+=n,r.push(o),a=t}for(var f=0;i-a>t-f;){var p=a+t-f;if(e[p-1]>=S&&e[p]>=S){d(p);continue}if(e[p]==y||e[p]==b){for(;p!=a-1&&e[p]!=y;p--);if(p>a){d(p);continue}for(p=a+t;p<e.length&&e[p]==b;p++);if(p==e.length)break;d(p);continue}for(var m=Math.max(p-(t-(t>>2)),a-1);p>m&&e[p]<y;)p--;if(s){for(;p>m&&e[p]<y;)p--;for(;p>m&&e[p]==x;)p--}else for(;p>m&&e[p]<S;)p--;if(p>m){d(++p);continue}p=a+t,e[p]==v&&p--,d(p-f)}return r},e.prototype.$getDisplayTokens=function(e,t){var n=[],r;t||=0;for(var i=0;i<e.length;i++){var a=e.charCodeAt(i);if(a==9){r=this.getScreenTabSize(n.length+t),n.push(C);for(var o=1;o<r;o++)n.push(w)}else a==32?n.push(S):a>39&&a<48||a>57&&a<64?n.push(x):a>=4352&&T(a)?n.push(_,v):n.push(_)}return n},e.prototype.$getStringScreenWidth=function(e,t,n){if(t==0)return[0,0];t??=1/0,n||=0;var r,i;for(i=0;i<e.length&&(r=e.charCodeAt(i),r==9?n+=this.getScreenTabSize(n):r>=4352&&T(r)?n+=2:n+=1,!(n>t));i++);return[n,i]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),!this.$useWrapMode||!this.$wrapData[e]?t:this.$wrapData[e].length+t},e.prototype.getRowLineCount=function(e){return!this.$useWrapMode||!this.$wrapData[e]?1:this.$wrapData[e].length+1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){if(this.$useWrapMode)return this.$wrapData[e]},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var r,i=0,a=0,o,s=0,c=0,l=this.$screenRowCache,u=this.$getRowCacheIndex(l,e),d=l.length;if(d&&u>=0)var s=l[u],i=this.$docRowCache[u],f=e>l[d-1];else var f=!d;for(var p=this.getLength()-1,m=this.getNextFoldLine(i),h=m?m.start.row:1/0;s<=e&&(c=this.getRowLength(i),!(s+c>e||i>=p));)s+=c,i++,i>h&&(i=m.end.row+1,m=this.getNextFoldLine(i,m),h=m?m.start.row:1/0),f&&(this.$docRowCache.push(i),this.$screenRowCache.push(s));if(m&&m.start.row<=i)r=this.getFoldDisplayLine(m),i=m.start.row;else if(s+c<=e||i>p)return{row:p,column:this.getLine(p).length};else r=this.getLine(i),m=null;var g=0,_=Math.floor(e-s);if(this.$useWrapMode){var v=this.$wrapData[i];v&&(o=v[_],_>0&&v.length&&(g=v.indent,a=v[_-1]||v[v.length-1],r=r.substring(a)))}return n!==void 0&&this.$bidiHandler.isBidiRow(s+_,i,_)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(r,t-g)[1],this.$useWrapMode&&a>=o&&(a=o-1),m?m.idxToPosition(a):{row:i,column:a}},e.prototype.documentToScreenPosition=function(e,t){if(t===void 0)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var r=0,i=null,a=null;a=this.getFoldAt(e,t,1),a&&(e=a.start.row,t=a.start.column);var o,s=0,c=this.$docRowCache,l=this.$getRowCacheIndex(c,e),u=c.length;if(u&&l>=0)var s=c[l],r=this.$screenRowCache[l],d=e>c[u-1];else var d=!u;for(var f=this.getNextFoldLine(s),p=f?f.start.row:1/0;s<e;){if(s>=p){if(o=f.end.row+1,o>e)break;f=this.getNextFoldLine(o,f),p=f?f.start.row:1/0}else o=s+1;r+=this.getRowLength(s),s=o,d&&(this.$docRowCache.push(s),this.$screenRowCache.push(r))}var m=``;f&&s>=p?(m=this.getFoldDisplayLine(f,e,t),i=f.start.row):(m=this.getLine(e).substring(0,t),i=e);var h=0;if(this.$useWrapMode){var g=this.$wrapData[i];if(g){for(var _=0;m.length>=g[_];)r++,_++;m=m.substring(g[_-1]||0,m.length),h=_>0?g.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(r+=this.lineWidgets[s].rowsAbove),{row:r,column:h+this.$getStringScreenWidth(m)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,r=0,i=0,t=this.$foldData[i++],a=t?t.start.row:1/0;r<n;){var o=this.$wrapData[r];e+=o?o.length+1:1,r++,r>a&&(r=t.end.row+1,t=this.$foldData[i++],a=t?t.start.row:1/0)}else{e=this.getLength();for(var s=this.$foldData,i=0;i<s.length;i++)t=s[i],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,r){if(n===0)return[0,0];n||=1/0,r||=0;var i,a;for(a=0;a<t.length&&(i=t.charAt(a),r+=i===` `?this.getScreenTabSize(r):e.getCharacterWidth(i),!(r>n));a++);return[r,a]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return e.column===0?e.row===0?``:this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||=(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),!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()},e}();g.$uid=0,g.prototype.$modes=o.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=T,r.implement(g.prototype,s);var _=1,v=2,y=3,b=4,x=9,S=10,C=11,w=12;function T(e){return e<4352?!1:e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510}e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),o.defineOptions(g.prototype,`session`,{wrap:{set:function(e){if(!e||e==`off`?e=!1:e==`free`?e=!0:e==`printMargin`?e=-1:typeof e==`string`&&(e=parseInt(e,10)||!1),this.$wrap!=e)if(this.$wrap=e,!e)this.setUseWrapMode(!1);else{var t=typeof e==`number`?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?`printMargin`:this.getWrapLimitRange().min?this.$wrap:`free`:`off`},handlesSet:!0},wrapMethod:{set:function(e){e=e==`auto`?this.$mode.type!=`text`:e!=`text`,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,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(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){e=parseInt(e),e>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal(`changeTabSize`))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal(`changeOverwrite`)},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g}),ace.define(`ace/search`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/lib/oop`,`ace/range`],function(e,t,n){var r=e("./lib/lang"),i=e("./lib/oop"),a=e("./range").Range,o=function(){function e(){this.$options={}}return e.prototype.set=function(e){return i.mixin(this.$options,e),this},e.prototype.getOptions=function(){return r.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var r=null;return n.forEach(function(e,n,i,o){return r=new a(e,n,i,o),n==o&&t.start&&t.start.start&&t.skipCurrent!=0&&r.isEqual(t.start)?(r=null,!1):!0}),r},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],s=t.re;if(t.$isMultiLine){var c=s.length,l=i.length-c,u;outer:for(var d=s.offset||0;d<=l;d++){for(var f=0;f<c;f++)if(i[d+f].search(s[f])==-1)continue outer;var p=i[d],m=i[d+c-1],h=p.length-p.match(s[0])[0].length,g=m.match(s[c-1])[0].length;u&&u.end.row===d&&u.end.column>h||(o.push(u=new a(d,h,d+c-1,g)),c>2&&(d=d+c-2))}}else for(var _,v=0;v<i.length;v++)if(this.$isMultilineSearch(t)){var y=i.length-1;if(_=this.$multiLineForward(e,s,v,y),_){var b=_.endRow<=y?_.endRow-1:y;b>v&&(v=b),o.push(new a(_.startRow,_.startCol,_.endRow,_.endCol))}}else{_=r.getMatchOffsets(i[v],s);for(var f=0;f<_.length;f++){var x=_[f];o.push(new a(v,x.offset,v,x.offset+x.length))}}if(n){for(var S=n.start.column,C=n.end.column,v=0,f=o.length-1;v<f&&o[v].start.column<S&&o[v].start.row==0;)v++;for(var w=n.end.row-n.start.row;v<f&&o[f].end.column>C&&o[f].end.row==w;)f--;for(o=o.slice(v,f+1),v=0,f=o.length;v<f;v++)o[v].start.row+=n.start.row,o[v].end.row+=n.start.row}return o},e.prototype.parseReplaceString=function(e){for(var t={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},n=``,r=0,i=e.length;r<i;r++){var a=e.charCodeAt(r);if(a===t.Backslash){if(r++,r>=i){n+=`\\`;break}switch(e.charCodeAt(r)){case t.Backslash:n+=`\\`;break;case t.n:n+=`
|
|
210
|
-
`;break;case t.t:n+=` `}continue}if(a===t.DollarSign){if(r++,r>=i){n+=`$`;break}var o=e.charCodeAt(r);if(o===t.DollarSign){n+=`$$`;continue}if(o===t.Digit0||o===t.Ampersand){n+=`$&`;continue}if(t.Digit1<=o&&o<=t.Digit9){n+=`$`+e[r];continue}}n+=e[r]}return n||e},e.prototype.replace=function(e,t){var n=this.$options,r=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(r){var i=this.$isMultilineSearch(n);i&&(e=e.replace(/\r\n|\r|\n/g,`
|
|
211
|
-
`));var a=r.exec(e);if(!a||!i&&a[0].length!=e.length)return null;if(t=n.regExp?this.parseReplaceString(t):t.replace(/\$/g,`$$$$`),t=e.replace(r,t),n.preserveCase){t=t.split(``);for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join(``)}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=r.escapeRegExp(n));var i=e.caseSensitive?`gm`:`gmi`;try{new RegExp(n,`u`),e.$supportsUnicodeFlag=!0,i+=`u`}catch{e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=s(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,i);try{var a=new RegExp(n,i)}catch{a=!1}return e.re=a},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,`$
|
|
212
|
-
^`).split(`
|
|
213
|
-
`),r=[],i=0;i<n.length;i++)try{r.push(new RegExp(n[i],t))}catch{return!1}return r},e.prototype.$isMultilineSearch=function(e){return e.re&&/\\r\\n|\\r|\\n/.test(e.re.source)&&e.regExp&&!e.$isMultiLine},e.prototype.$multiLineForward=function(e,t,n,r){for(var i,a=l(e,n),o=n;o<=r;){for(var s=0;s<a&&!(o>r);s++){var c=e.getLine(o++);i=i==null?c:i+`
|
|
214
|
-
`+c}var u=t.exec(i);if(t.lastIndex=0,u){var d=i.slice(0,u.index).split(`
|
|
215
|
-
`),f=u[0].split(`
|
|
216
|
-
`),p=n+d.length-1,m=d[d.length-1].length;return{startRow:p,startCol:m,endRow:p+f.length-1,endCol:f.length==1?m+f[0].length:f[f.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,n,r,i){for(var a,o=l(e,r),s=e.getLine(r).length-n,u=r;u>=i;){for(var d=0;d<o&&u>=i;d++){var f=e.getLine(u--);a=a==null?f:f+`
|
|
217
|
-
`+a}var p=c(a,t,s);if(p){var m=a.slice(0,p.index).split(`
|
|
218
|
-
`),h=p[0].split(`
|
|
219
|
-
`),g=u+m.length,_=m[m.length-1].length;return{startRow:g,startCol:_,endRow:g+h.length-1,endCol:h.length==1?_+h[0].length:h[h.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var i=this.$isMultilineSearch(t),a=this.$multiLineForward,o=this.$multiLineBackward,s=t.backwards==1,c=t.skipCurrent!=0,l=n.unicode,u=t.range,d=t.start;d||=u?u[s?`end`:`start`]:e.selection.getRange(),d.start&&(d=d[c==s?`start`:`end`]);var f=u?u.start.row:0,p=u?u.end.row:e.getLength()-1;if(s)var m=function(e){var n=d.row;if(!g(n,d.column,e)){for(n--;n>=f;n--)if(g(n,Number.MAX_VALUE,e))return;if(t.wrap!=0){for(n=p,f=d.row;n>=f;n--)if(g(n,Number.MAX_VALUE,e))return}}};else var m=function(e){var n=d.row;if(!g(n,d.column,e)){for(n+=1;n<=p;n++)if(g(n,0,e))return;if(t.wrap!=0){for(n=f,p=d.row;n<=p;n++)if(g(n,0,e))return}}};if(t.$isMultiLine)var h=n.length,g=function(t,r,i){var a=s?t-h+1:t;if(!(a<0||a+h>e.getLength())){var o=e.getLine(a),c=o.search(n[0]);if(!(!s&&c<r||c===-1)){for(var l=1;l<h;l++)if(o=e.getLine(a+l),o.search(n[l])==-1)return;var u=o.match(n[h-1])[0].length;if(!(s&&u>r)&&i(a,c,a+h-1,u))return!0}}};else if(s)var g=function(t,a,s){if(i){var c=o(e,n,a,t,f);if(!c)return!1;if(s(c.startRow,c.startCol,c.endRow,c.endCol))return!0}else{var u=e.getLine(t),d=[],p,m=0;for(n.lastIndex=0;p=n.exec(u);){var h=p[0].length;if(m=p.index,!h){if(m>=u.length)break;n.lastIndex=m+=r.skipEmptyMatch(u,m,l)}if(p.index+h>a)break;d.push(p.index,h)}for(var g=d.length-1;g>=0;g-=2){var _=d[g-1],h=d[g];if(s(t,_,t,_+h))return!0}}};else var g=function(t,o,s){if(n.lastIndex=o,i){var c=a(e,n,t,p);if(c){var u=c.endRow<=p?c.endRow-1:p;u>t&&(t=u)}if(!c)return!1;if(s(c.startRow,c.startCol,c.endRow,c.endCol))return!0}else for(var d=e.getLine(t),f,m;m=n.exec(d);){var h=m[0].length;if(f=m.index,s(t,f,t,f+h))return!0;if(!h&&(n.lastIndex=f+=r.skipEmptyMatch(d,f,l),f>=d.length))return!1}};return{forEach:m}},e}();function s(e,t){var n=r.supportsLookbehind();function i(e,r){return r===void 0&&(r=!0),(n&&t.$supportsUnicodeFlag?RegExp(`[\\p{L}\\p{N}_]`,`u`):RegExp(`\\w`)).test(e)||t.regExp?n&&t.$supportsUnicodeFlag?r?`(?<=^|[^\\p{L}\\p{N}_])`:`(?=[^\\p{L}\\p{N}_]|$)`:`\\b`:``}var a=Array.from(e),o=a[0],s=a[a.length-1];return i(o)+e+i(s,!1)}function c(e,t,n){for(var r=null,i=0;i<=e.length;){t.lastIndex=i;var a=t.exec(e);if(!a)break;var o=a.index+a[0].length;if(o>e.length-n)break;(!r||o>r.index+r[0].length)&&(r=a),i=a.index+1}return r}function l(e,t){var n=5e3,r={row:t,column:0},i=e.doc.positionToIndex(r)+n;return e.doc.indexToPosition(i).row+1}t.Search=o}),ace.define(`ace/keyboard/hash_handler`,[`require`,`exports`,`module`,`ace/lib/keys`,`ace/lib/useragent`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e("../lib/keys"),a=e("../lib/useragent"),o=i.KEY_MODS,s=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(a.isMac?`mac`:`win`),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&(typeof e==`string`?e:e.name);e=this.commands[n],t||delete this.commands[n];var r=this.commandKeyBinding;for(var i in r){var a=r[i];if(a==e)delete r[i];else if(Array.isArray(a)){var o=a.indexOf(e);o!=-1&&(a.splice(o,1),a.length==1&&(r[i]=a[0]))}}},e.prototype.bindKey=function(e,t,n){if(typeof e==`object`&&e&&(n??=e.position,e=e[this.platform]),e){if(typeof t==`function`)return this.addCommand({exec:t,bindKey:e,name:t.name||e});e.split(`|`).forEach(function(e){var r=``;if(e.indexOf(` `)!=-1){var i=e.split(/\s+/);e=i.pop(),i.forEach(function(e){var t=this.parseKeys(e),n=o[t.hashId]+t.key;r+=(r?` `:``)+n,this._addCommandToBinding(r,`chainKeys`)},this),r+=` `}var a=this.parseKeys(e),s=o[a.hashId]+a.key;this._addCommandToBinding(r+s,t,n)},this)}},e.prototype._addCommandToBinding=function(e,t,n){var r=this.commandKeyBinding,i;if(!t)delete r[e];else if(!r[e]||this.$singleCommand)r[e]=t;else{Array.isArray(r[e])?(i=r[e].indexOf(t))!=-1&&r[e].splice(i,1):r[e]=[r[e]],typeof n!=`number`&&(n=c(t));var a=r[e];for(i=0;i<a.length;i++){var o=a[i];if(c(o)>n)break}a.splice(i,0,t)}},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if(typeof n==`string`)return this.bindKey(n,t);typeof n==`function`&&(n={exec:n}),typeof n==`object`&&(n.name||(n.name=t),this.addCommand(n))}},this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else if(!t.length)return{key:n,hashId:-1};else if(t.length==1&&t[0]==`shift`)return{key:n.toUpperCase(),hashId:-1};for(var a=0,o=t.length;o--;){var s=i.KEY_MODS[t[o]];if(s==null)return typeof console<`u`&&console.error(`invalid modifier `+t[o]+` in `+e),!1;a|=s}return{key:n,hashId:a}},e.prototype.findKeyCommand=function(e,t){var n=o[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,r){if(!(r<0)){var i=o[t]+n,a=this.commandKeyBinding[i];return e.$keyChain&&(e.$keyChain+=` `+i,a=this.commandKeyBinding[e.$keyChain]||a),a&&(a==`chainKeys`||a[a.length-1]==`chainKeys`)?(e.$keyChain=e.$keyChain||i,{command:`null`}):(e.$keyChain&&((!t||t==4)&&n.length==1?e.$keyChain=e.$keyChain.slice(0,-i.length-1):(t==-1||r>0)&&(e.$keyChain=``)),{command:a})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||``},e}();function c(e){return typeof e==`object`&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var l=function(e){r(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.$singleCommand=!0,r}return t}(s);l.call=function(e,t,n){s.prototype.$init.call(e,t,n,!0)},s.call=function(e,t,n){s.prototype.$init.call(e,t,n,!1)},t.HashHandler=l,t.MultiHashHandler=s}),ace.define(`ace/commands/command_manager`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/keyboard/hash_handler`,`ace/lib/event_emitter`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e){r(t,e);function t(t,n){var r=e.call(this,n,t)||this;return r.byName=r.commands,r.setDefaultHandler(`exec`,function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)}),r}return t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var r=e.length;r--;)if(this.exec(e[r],t,n))return!0;return!1}typeof e==`string`&&(e=this.commands[e]);var i={editor:t,command:e,args:n};return this.canExecute(e,t)?(i.returnValue=this._emit(`exec`,i),this._signal(`afterExec`,i),i.returnValue!==!1):(this._signal(`commandUnavailable`,i),!1)},t.prototype.canExecute=function(e,t){return typeof e==`string`&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||this.$checkCommandState!=0&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit(`changeStatus`),this.recording?(this.macro.pop(),this.off(`exec`,this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||=function(e){this.macro.push([e.command,e.args])}.bind(this),this.oldMacro=this.macro,this.macro=[],this.on(`exec`,this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t==`string`?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map(function(e){return typeof e[0]!=`string`&&(e[0]=e[0].name),e[1]||(e=e[0]),e})},t}(a);i.implement(s.prototype,o),t.CommandManager=s}),ace.define(`ace/commands/default_commands`,[`require`,`exports`,`module`,`ace/lib/lang`,`ace/config`,`ace/range`],function(e,t,n){var r=e("../lib/lang"),i=e("../config"),a=e("../range").Range;function o(e,t){return{win:e,mac:t}}t.commands=[{name:`showSettingsMenu`,description:`Show settings menu`,bindKey:o(`Ctrl-,`,`Command-,`),exec:function(e){i.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){i.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){i.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){i.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()?e.selection.getLineRange():e.selection.getRange();e._emit(`cut`,t),t.isEmpty()||e.session.remove(t),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){i.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(r.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(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(n.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/,` `).length,c=e.session.doc.getLine(n.row),l=n.row+1;l<=i.row+1;l++){var u=r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));u.length!==0&&(u=` `+u),c+=u}i.row+1<e.session.doc.getLength()-1&&(c+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new a(n.row,0,i.row+2,0),c),s>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+s)):(o=e.session.doc.getLine(n.row).length>o?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:`forEach`,readOnly:!0},{name:`invertSelection`,description:`Invert selection`,bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,r=e.selection.rangeList.ranges,i=[];r.length<1&&(r=[e.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row!==t||r[o].end.column!==n)&&i.push(new a(r[o].end.row,r[o].end.column,t,n)),o===0?(r[o].start.row!==0||r[o].start.column!==0)&&i.push(new a(0,0,r[o].start.row,r[o].start.column)):i.push(new a(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));e.exitMultiSelectMode(),e.clearSelection();for(var o=0;o<i.length;o++)e.selection.addRange(i[o],!1)},readOnly:!0,scrollIntoView:`none`},{name:`addLineAfter`,description:`Add new line after the current line`,exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert(`
|
|
220
|
-
`)},multiSelectAction:`forEach`,scrollIntoView:`cursor`},{name:`addLineBefore`,description:`Add new line before the current line`,exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert(`
|
|
221
|
-
`),t.row===0&&e.navigateUp()},multiSelectAction:`forEach`,scrollIntoView:`cursor`},{name:`openCommandPallete`,exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:`commands`})},readOnly:!0},{name:`openCommandPalette`,description:`Open command palette`,bindKey:o(`F1`,`F1`),exec:function(e){e.prompt({$type:`commands`})},readOnly:!0},{name:`modeSelect`,description:`Change language mode...`,bindKey:o(null,null),exec:function(e){e.prompt({$type:`modes`})},readOnly:!0}];for(var s=1;s<9;s++)t.commands.push({name:`foldToLevel`+s,description:`Fold To Level `+s,level:s,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:`center`,readOnly:!0})}),ace.define(`ace/keyboard/gutter_handler`,[`require`,`exports`,`module`,`ace/lib/keys`],function(e,t,n){var r=e("../lib/keys");t.GutterKeyboardHandler=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return e.prototype.addListener=function(){this.element.addEventListener(`keydown`,this.$onGutterKeyDown.bind(this)),this.element.addEventListener(`focusout`,this.$blurGutter.bind(this)),this.editor.on(`mousewheel`,this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener(`keydown`,this.$onGutterKeyDown.bind(this)),this.element.removeEventListener(`focusout`,this.$blurGutter.bind(this)),this.editor.off(`mousewheel`,this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen){e.preventDefault(),e.keyCode===r.escape&&this.annotationTooltip.hide();return}if(e.target===this.element){if(e.keyCode!=r.enter)return;e.preventDefault();var t=this.editor.getCursorPosition().row;this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldLaneWidget(e),n=this.$findNearestAnnotation(e);if(t!==null||n!==null){if(this.$findClosestNumber(t,n,e)===t){if(this.activeLane=`fold`,this.activeRowIndex=t,this.$isCustomWidgetVisible(t)){this.$focusCustomWidget(this.activeRowIndex);return}this.$focusFoldWidget(this.activeRowIndex);return}this.activeRowIndex=n,this.activeLane=`annotation`,this.$focusAnnotation(this.activeRowIndex)}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal(`gutterkeydown`,new i(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode===r.tab){e.preventDefault();return}if(e.keyCode===r.escape){e.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(e.keyCode===r.up){switch(e.preventDefault(),this.activeLane){case`fold`:this.$moveFoldWidgetUp();break;case`annotation`:this.$moveAnnotationUp()}return}if(e.keyCode===r.down){switch(e.preventDefault(),this.activeLane){case`fold`:this.$moveFoldWidgetDown();break;case`annotation`:this.$moveAnnotationDown()}return}if(e.keyCode===r.left){e.preventDefault(),this.$switchLane(`annotation`);return}if(e.keyCode===r.right){e.preventDefault(),this.$switchLane(`fold`);return}if(e.keyCode===r.enter||e.keyCode===r.space){switch(e.preventDefault(),this.activeLane){case`fold`:var t=this.$rowIndexToRow(this.activeRowIndex),n=this.editor.session.$gutterCustomWidgets[t];if(n)n.callbacks&&n.callbacks.onClick&&n.callbacks.onClick(e,t);else if(this.gutterLayer.session.foldWidgets[t]===`start`){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]===`end`)break;return;case`annotation`:this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0}return}},e.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case`fold`:this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case`annotation`:this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=this.$getFoldWidget(e).style.display!==`none`;return t&&n},e.prototype.$isCustomWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=!!this.$getCustomWidget(e);return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n=this.$getAnnotation(e).style.display!==`none`;return t&&n},e.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},e.prototype.$getCustomWidget=function(e){return this.lines.get(e).element.childNodes[3]},e.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},e.prototype.$findNearestFoldLaneWidget=function(e){if(this.$isCustomWidgetVisible(e)||this.$isFoldWidgetVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(t++,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},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t<this.lines.getLength()-1;){if(t++,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},e.prototype.$focusFoldWidget=function(e){if(e!=null){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(e!=null){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(e!=null){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.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}},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)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}},e.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isAnnotationVisible(e)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);return}},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(e++,this.$isAnnotationVisible(e)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,this.$focusAnnotation(this.activeRowIndex);return}},e.prototype.$findClosestNumber=function(e,t,n){return e===null?t:t===null||Math.abs(n-e)<=Math.abs(n-t)?e:t},e.prototype.$switchLane=function(e){switch(e){case`annotation`:if(this.activeLane===`annotation`)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(t==null)break;this.activeLane=`annotation`,this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case`fold`:if(this.activeLane===`fold`)break;var n=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(n===null)break;this.activeLane=`fold`,this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$isCustomWidgetVisible(n)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex)}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},e}();var i=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return r.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane===`annotation`},e.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane===`fold`},e}();t.GutterKeyboardEvent=i}),ace.define(`ace/editor`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/lang`,`ace/lib/useragent`,`ace/keyboard/textinput`,`ace/mouse/mouse_handler`,`ace/mouse/fold_handler`,`ace/keyboard/keybinding`,`ace/edit_session`,`ace/search`,`ace/range`,`ace/lib/event_emitter`,`ace/commands/command_manager`,`ace/commands/default_commands`,`ace/config`,`ace/token_iterator`,`ace/keyboard/gutter_handler`,`ace/config`,`ace/clipboard`,`ace/lib/keys`,`ace/lib/event`,`ace/tooltip`],function(e,t,n){var r=this&&this.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},i=e("./lib/oop"),a=e("./lib/dom"),o=e("./lib/lang"),s=e("./lib/useragent"),c=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,d=e("./keyboard/keybinding").KeyBinding,f=e("./edit_session").EditSession,p=e("./search").Search,m=e("./range").Range,h=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,_=e("./commands/default_commands").commands,v=e("./config"),y=e("./token_iterator").TokenIterator,b=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,S=e("./clipboard"),C=e("./lib/keys"),w=e("./lib/event"),T=e("./tooltip").HoverTooltip,E=function(){function e(t,n,r){this.id=`editor`+ ++e.$uid,this.session,this.$toDestroy=[];var i=t.getContainerElement();this.container=i,this.renderer=t,this.commands=new g(s.isMac?`mac`:`win`,_),typeof document==`object`&&(this.textInput=new c(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new u(this)),this.keyBinding=new d(this),this.$search=new p().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(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(n||r&&r.session||new f(``)),v.resetOptions(this),r&&this.setOptions(r),v._signal(`editor`,this)}return e.prototype.$initOperationListeners=function(){this.commands.on(`exec`,this.startOperation.bind(this),!0),this.commands.on(`afterExec`,this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&e.returnValue===!1){this.curOp=null;return}if(this._signal(`beforeEndOperation`),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case`center-animate`:n=`animate`;case`center`:this.renderer.scrollCursorIntoView(null,.5);break;case`animate`:case`cursor`:this.renderer.scrollCursorIntoView();break;case`selectionPart`:var r=this.selection.getRange(),i=this.renderer.layerConfig;(r.start.row>=i.lastRow||r.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}n==`animate`&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,r=t.command&&e.command.name==t.command.name;if(e.command.name==`insertstring`){var i=e.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),r=r&&this.mergeNextCommand&&(!/\s/.test(i)||/\s/.test(t.args)),this.mergeNextCommand=!0}else r&&=n.indexOf(e.command.name)!==-1;this.$mergeUndoDeltas!=`always`&&Date.now()-this.sequenceStartTime>2e3&&(r=!1),r?this.session.mergeUndoDeltas=!0:n.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&typeof e==`string`&&e!=`ace`){this.$keybindingId=e;var n=this;v.loadModule([`keybinding`,e],function(r){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(r&&r.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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 n=this.session.getSelection();n.off(`changeCursor`,this.$onCursorChange),n.off(`changeSelection`,this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on(`change`,this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on(`changeMode`,this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on(`tokenizerUpdate`,this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on(`changeTabSize`,this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on(`changeWrapLimit`,this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on(`changeWrapMode`,this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.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=e.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(e)),this._signal(`changeSession`,{session:e,oldSession:t}),this.curOp=null,t&&t._signal(`changeEditor`,{oldEditor:this}),t&&(t.$editor=null),e&&e._signal(`changeEditor`,{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?t==1?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption(`fontSize`)||a.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption(`fontSize`,e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(!(!t||t.destroyed)){t.$bracketHighlight&&=(t.$bracketHighlight.markerIds.forEach(function(e){t.removeMarker(e)}),null);var n=e.getCursorPosition(),r=e.getKeyboardHandler(),i=r&&r.$getDirectionForHighlight&&r.$getDirectionForHighlight(e),a=t.getMatchingBracketRanges(n,i);if(!a){var o=new y(t,n.row,n.column).getCurrentToken();if(o&&/\b(?:tag-open|tag-name)/.test(o.type)){var s=t.getMatchingTags(n);s&&(a=[s.openTagName.isEmpty()?s.openTag:s.openTagName,s.closeTagName.isEmpty()?s.closeTag:s.closeTagName])}}if(!a&&t.$mode.getMatching&&(a=t.$mode.getMatching(e.session)),!a){e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide();return}var c=`ace_bracket`;Array.isArray(a)?a.length==1&&(c=`ace_error_bracket`):a=[a],a.length==2&&(m.comparePoints(a[0].end,a[1].start)==0?a=[m.fromPoints(a[0].start,a[1].end)]:m.comparePoints(a[0].start,a[1].end)==0&&(a=[m.fromPoints(a[1].start,a[0].end)])),t.$bracketHighlight={ranges:a,markerIds:a.map(function(e){return t.addMarker(e,c,`text`)})},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}},50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit(`focus`,e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit(`blur`,e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal(`change`,e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal(`changeSelection`)},e.prototype.$updateHighlightActiveLine=function(){var e=this.getSession(),t;if(this.$highlightActiveLine&&((this.$selectionStyle!=`line`||!this.selection.isMultiLine())&&(t=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(t=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new m(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,`ace_active-line`,`screenLine`),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal(`changeBackMarker`))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),r=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,`ace_selection`,r)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal(`changeSelection`)},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!(t.isEmpty()||t.isMultiLine())){var n=t.start.column,r=t.end.column,i=e.getLine(t.start.row),a=i.substring(n,r);if(!(a.length>5e3||!/[\w\d]/.test(a))){var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:a}),s=i.substring(n-1,r+1);if(o.test(s))return o}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit(`changeMode`,e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var r=this.selection.getAllRanges(),i=0;i<r.length;i++){var a=r[i];i&&r[i-1].start.row==a.start.row||(e+=this.session.getLine(a.start.row)+t)}}var o={text:e};return this._signal(`copy`,o),S.lineMode=n?o.text:!1,o.text},e.prototype.onCopy=function(){this.commands.exec(`copy`,this)},e.prototype.onCut=function(){this.commands.exec(`cut`,this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec(`paste`,this,n)},e.prototype.$handlePaste=function(e){typeof e==`string`&&(e={text:e}),this._signal(`paste`,e);var t=e.text,n=t===S.lineMode,r=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?r.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach(function(e){r.insert({row:e.start.row,column:0},t)});else{var i=t.split(/\r\n|\r|\n/),a=this.selection.rangeList.ranges,o=i.length==2&&(!i[0]||!i[1]);if(i.length!=a.length||o)return this.commands.exec(`insertstring`,this,t);for(var s=a.length;s--;){var c=a[s];c.isEmpty()||r.remove(c),r.insert(c.start,i[s])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,r=n.getMode(),i=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var a=r.transformAction(n.getState(i.row),`insertion`,this,n,e);a&&(e!==a.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=a.text)}if(e==` `&&(e=this.session.getTabString()),!this.selection.isEmpty()){var o=this.getSelectionRange();i=this.session.remove(o),this.clearSelection()}else if(this.session.getOverwrite()&&e.indexOf(`
|
|
222
|
-
`)==-1){var o=m.fromPoints(i,i);o.end.column+=e.length,this.session.remove(o)}if(e==`
|
|
223
|
-
`||e==`\r
|
|
224
|
-
`){var s=n.getLine(i.row);if(i.column>s.search(/\S|$/)){var c=s.substr(i.column).search(/\S|$/);n.doc.removeInLine(i.row,i.column,i.column+c)}}this.clearSelection();var l=i.column,u=n.getState(i.row),s=n.getLine(i.row),d=r.checkOutdent(u,s,e);if(n.insert(i,e),a&&a.selection&&(a.selection.length==2?this.selection.setSelectionRange(new m(i.row,l+a.selection[0],i.row,l+a.selection[1])):this.selection.setSelectionRange(new m(i.row+a.selection[0],a.selection[1],i.row+a.selection[2],a.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var f=r.getNextLineIndent(u,s.slice(0,i.column),n.getTabString());n.insert({row:i.row+1,column:0},f)}d&&r.autoOutdent(u,n,i.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new m(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),r=``,i=``,a=``,o=e.getTabString(),s=0;s<n.length;s++)for(var c=n[s].start.row,l=n[s].end.row,u=c;u<=l;u++){u>0&&(r=e.getState(u-1),i=e.getLine(u-1),a=t.getNextLineIndent(r,i,o));var d=e.getLine(u),f=t.$getIndent(d);if(a!==f){if(f.length>0){var p=new m(u,0,u,f.length);e.remove(p)}a.length>0&&e.insert({row:u,column:0},a)}t.autoOutdent(r,e,u)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:`insertstring`}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){if(t.extendLeft||t.extendRight){var n=this.selection.getRange();n.start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove()}if((e||!this.selection.isEmpty())&&this.insert(e,!0),t.restoreStart||t.restoreEnd){var n=this.selection.getRange();n.start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n)}},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption(`scrollSpeed`,e)},e.prototype.getScrollSpeed=function(){return this.getOption(`scrollSpeed`)},e.prototype.setDragDelay=function(e){this.setOption(`dragDelay`,e)},e.prototype.getDragDelay=function(){return this.getOption(`dragDelay`)},e.prototype.setSelectionStyle=function(e){this.setOption(`selectionStyle`,e)},e.prototype.getSelectionStyle=function(){return this.getOption(`selectionStyle`)},e.prototype.setHighlightActiveLine=function(e){this.setOption(`highlightActiveLine`,e)},e.prototype.getHighlightActiveLine=function(){return this.getOption(`highlightActiveLine`)},e.prototype.setHighlightGutterLine=function(e){this.setOption(`highlightGutterLine`,e)},e.prototype.getHighlightGutterLine=function(){return this.getOption(`highlightGutterLine`)},e.prototype.setHighlightSelectedWord=function(e){this.setOption(`highlightSelectedWord`,e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption(`readOnly`,e)},e.prototype.getReadOnly=function(){return this.getOption(`readOnly`)},e.prototype.setBehavioursEnabled=function(e){this.setOption(`behavioursEnabled`,e)},e.prototype.getBehavioursEnabled=function(){return this.getOption(`behavioursEnabled`)},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption(`wrapBehavioursEnabled`,e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption(`wrapBehavioursEnabled`)},e.prototype.setShowFoldWidgets=function(e){this.setOption(`showFoldWidgets`,e)},e.prototype.getShowFoldWidgets=function(){return this.getOption(`showFoldWidgets`)},e.prototype.setFadeFoldWidgets=function(e){this.setOption(`fadeFoldWidgets`,e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption(`fadeFoldWidgets`)},e.prototype.remove=function(e){this.selection.isEmpty()&&(e==`left`?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,r=n.getState(t.start.row),i=n.getMode().transformAction(r,`deletion`,this,n,t);if(t.end.column===0){var a=n.getTextRange(t);if(a[a.length-1]==`
|
|
225
|
-
`){var o=n.getLine(t.end.row);/^\s+$/.test(o)&&(t.end.column=o.length)}}i&&(t=i)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert(`
|
|
226
|
-
`),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(t!==0){var n=this.session.getLine(e.row),r,i;t<n.length?(r=n.charAt(t)+n.charAt(t-1),i=new m(e.row,t-1,e.row,t+1)):(r=n.charAt(t-1)+n.charAt(t-2),i=new m(e.row,t-2,e.row,t)),this.session.replace(i,r),this.session.selection.moveToPosition(i.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,` `);return}if(t.start.column<t.end.column){var r=e.getTextRange(t);if(!/^\s+$/.test(r)){var n=this.$getSelectedRows();e.indentRows(n.first,n.last,` `);return}}var i=e.getLine(t.start.row),a=t.start,s=e.getTabSize(),c=e.documentToScreenColumn(a.row,a.column);if(this.session.getUseSoftTabs())var l=s-c%s,u=o.stringRepeat(` `,l);else{for(var l=c%s;i[t.start.column-1]==` `&&l;)t.start.column--,l--;this.selection.setSelectionRange(t),u=` `}return this.insert(u)},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,` `)},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],r=e.first;r<=e.last;r++)n.push(t.getLine(r));n.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:+(e.toLowerCase()>t.toLowerCase())});for(var i=new m(0,0,0,0),r=e.first;r<=e.last;r++){var a=t.getLine(r);i.start.row=r,i.end.row=r,i.end.column=a.length,t.replace(i,n[r-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var r=this.session.getLine(e);n.lastIndex<t;){var i=n.exec(r);if(i.index<=t&&i.index+i[0].length>=t)return{value:i[0],start:i.index,end:i.index+i[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,r=new m(t,n-1,t,n),i=this.session.getTextRange(r);if(!isNaN(parseFloat(i))&&isFinite(i)){var a=this.getNumberAt(t,n);if(a){var o=a.value.indexOf(`.`)>=0?a.start+a.value.indexOf(`.`)+1:a.end,s=a.start+a.value.length-o,c=parseFloat(a.value);c*=10**s,o!==a.end&&n<o?e*=10**(a.end-n-1):e*=10**(a.end-n),c+=e,c/=10**s;var l=c.toFixed(s),u=new m(t,a.start,t,a.end);this.session.replace(u,l),this.moveCursorTo(t,Math.max(a.start+1,n+l.length-a.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),r=this.selection.getWordRange().start.column,i=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,`$1 `).split(/\s/),a=t-r-1;a<0&&(a=0);var s=0,c=0,l=this;n.match(/[A-Za-z0-9_]+/)&&i.forEach(function(t,i){c=s+t.length,a>=s&&a<=c&&(n=t,l.selection.clearSelection(),l.moveCursorTo(e,s+r),l.selection.selectTo(e,c+r)),s=c});for(var u=this.$toggleWordPairs,d,f=0;f<u.length;f++)for(var p=u[f],m=0;m<=1;m++){var h=+!m,g=n.match(RegExp(`^\\s?_?(`+o.escapeRegExp(p[m])+`)\\s?$`,`i`));g&&n.match(RegExp(`([_]|^|\\s)(`+o.escapeRegExp(g[1])+`)($|\\s)`,`g`))&&(d=n.replace(new RegExp(o.escapeRegExp(p[m]),`i`),function(e){var t=p[h];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[h].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(d),d=``)}},e.prototype.findLinkAt=function(e,t){var n,i,a=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),o=t;o<0&&(o=0);var s=0,c=0,l;try{for(var u=r(a),d=u.next();!d.done;d=u.next()){var f=d.value;if(c=s+f.length,o>=s&&o<=c&&f.match(/((?:https?|ftp):\/\/[\S]+)/)){l=f.replace(/[\s:.,'";}\]]+$/,``);break}s=c}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,`_blank`),t!=null},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),r=e.isBackwards();if(n.isEmpty()){var i=n.start.row;t.duplicateLines(i,i)}else{var a=r?n.start:n.end,o=t.insert(a,t.getTextRange(n));n.start=a,n.end=o,e.setSelectionRange(n,r)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,r,i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var a=i.toOrientedRange();n=this.$getSelectedRows(a),r=this.session.$moveLines(n.first,n.last,t?0:e),t&&e==-1&&(r=0),a.moveBy(r,0),i.fromOrientedRange(a)}else{var o=i.rangeList.ranges;i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var s=0,c=0,l=o.length,u=0;u<l;u++){var d=u;o[u].moveBy(s,0),n=this.$getSelectedRows(o[u]);for(var f=n.first,p=n.last;++u<l;){c&&o[u].moveBy(c,0);var m=this.$getSelectedRows(o[u]);if(t&&m.first!=p||!t&&m.first>p+1)break;p=m.last}for(u--,s=this.session.$moveLines(f,p,t?0:e),t&&e==-1&&(d=u+1);d<=u;)o[d].moveBy(s,0),d++;t||(s=0),c+=s}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,r=this.renderer.layerConfig,i=e*Math.floor(r.height/r.lineHeight);t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(i,0)}):t===!1&&(this.selection.moveCursorBy(i,0),this.selection.clearSelection());var a=n.scrollTop;n.scrollBy(0,i*r.lineHeight),t!=null&&n.scrollCursorIntoView(null,.5),n.animateScrolling(a)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,r){this.renderer.scrollToLine(e,t,n,r)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),r=new y(this.session,n.row,n.column),i=r.getCurrentToken(),a=0;i&&i.type.indexOf(`tag-name`)!==-1&&(i=r.stepBackward());var o=i||r.stepForward();if(o){var s,c=!1,l={},u=n.column-o.start,d,f={")":`(`,"(":`(`,"]":`[`,"[":`[`,"{":`{`,"}":`{`};do{if(o.value.match(/[{}()\[\]]/g)){for(;u<o.value.length&&!c;u++)if(f[o.value[u]])switch(d=f[o.value[u]]+`.`+o.type.replace(`rparen`,`lparen`),isNaN(l[d])&&(l[d]=0),o.value[u]){case`(`:case`[`:case`{`:l[d]++;break;case`)`:case`]`:case`}`:l[d]--,l[d]===-1&&(s=`bracket`,c=!0)}}else o.type.indexOf(`tag-name`)!==-1&&(isNaN(l[o.value])&&(l[o.value]=0),i.value===`<`&&a>1?l[o.value]++:i.value===`</`&&l[o.value]--,l[o.value]===-1&&(s=`tag`,c=!0));c||(i=o,a++,o=r.stepForward(),u=0)}while(o&&!c);if(s){var p,h;if(s===`bracket`)p=this.session.getBracketRange(n),p||(p=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1,r.getCurrentTokenRow(),r.getCurrentTokenColumn()+u-1),h=p.start,(t||h.row===n.row&&Math.abs(h.column-n.column)<2)&&(p=this.session.getBracketRange(h)));else if(s===`tag`){if(!o||o.type.indexOf(`tag-name`)===-1)return;if(p=new m(r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2,r.getCurrentTokenRow(),r.getCurrentTokenColumn()-2),p.compare(n.row,n.column)===0){var g=this.session.getMatchingTags(n);g&&(g.openTag.contains(n.row,n.column)?(p=g.closeTag,h=p.start):(p=g.openTag,h=g.closeTag.start.row===n.row&&g.closeTag.start.column===n.column?p.end:p.start))}h||=p.start}h=p&&p.cursor||h,h&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(h.row,h.column):this.selection.moveTo(h.row,h.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e||=1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e||=1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),r=0;return n?(this.$tryReplace(n,e)&&(r=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),r):r},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),r=0;if(!n.length)return r;var i=this.getSelectionRange();this.selection.moveTo(0,0);for(var a=n.length-1;a>=0;--a)this.$tryReplace(n[a],e)&&r++;return this.selection.setSelectionRange(i),r},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),t===null?null:(e.end=this.session.replace(e,t),e)},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||={},typeof e==`string`||e instanceof RegExp?t.needle=e:typeof e==`object`&&i.mixin(t,e);var r=this.selection.getRange();t.needle??(e=this.session.getTextRange(r)||this.$search.$options.needle,e||=(r=this.session.getWordRange(r.start.row,r.start.column),this.session.getTextRange(r)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:r});var a=this.$search.find(this.session);if(t.preventScroll)return a;if(a)return this.revealRange(a,n),a;t.backwards?r.start=r.end:r.end=r.start,this.selection.setRange(r)},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&=(this.$toDestroy.forEach(function(e){e.destroy()}),[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal(`destroy`,this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,r=!1;this.$scrollAnchor||=document.createElement(`div`);var i=this.$scrollAnchor;i.style.cssText=`position:absolute`,this.container.insertBefore(i,this.container.firstChild);var a=this.on(`changeSelection`,function(){r=!0}),o=this.renderer.on(`beforeRender`,function(){r&&(t=n.renderer.container.getBoundingClientRect())}),s=this.renderer.on(`afterRender`,function(){if(r&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,a=e.$cursorLayer.$pixelPos,o=e.layerConfig,s=a.top-o.offset;r=a.top>=0&&s+t.top<0?!0:a.top<o.height&&a.top+t.top+o.lineHeight>window.innerHeight?!1:null,r!=null&&(i.style.top=s+`px`,i.style.left=a.left+`px`,i.style.height=o.lineHeight+`px`,i.scrollIntoView(r)),r=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off(`changeSelection`,a),this.renderer.off(`afterRender`,s),this.renderer.off(`beforeRender`,o))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||`ace`,t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&e!=`wide`,a.setCssClass(t.element,`ace_slim-cursors`,/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var r=this;v.loadModule(`ace/ext/prompt`,function(i){i.prompt(r,e,t,n)})},Object.defineProperty(e.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||=new T(this.container)},set:function(e){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=e},enumerable:!1,configurable:!0}),e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=[`backspace`,`del`,`insertstring`],E.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`],[`&&`,`||`],[`==`,`!=`]],i.implement(E.prototype,h),v.defineOptions(E.prototype,`editor`,{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal(`changeSelectionStyle`,{data:e})},initialValue:`line`},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||=function(e){var n=!1;if(e&&e.type==`keydown`){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(e.key==` `&&e.preventDefault(),n=e.key.length==1),!n)return}else e&&e.type!==`exec`&&(n=!0);if(n){var r=a.createElement(`div`);r.textContent=x(`editor.tooltip.disable-editing`,`Editing is disabled`),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),r)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()};var n=this.textInput.getElement();e?(w.addListener(n,`keydown`,this.$readOnlyCallback,this),this.commands.on(`exec`,this.$readOnlyCallback),this.commands.on(`commandUnavailable`,this.$readOnlyCallback)):(w.removeListener(n,`keydown`,this.$readOnlyCallback),this.commands.off(`exec`,this.$readOnlyCallback),this.commands.off(`commandUnavailable`,this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){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(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?D.attach(this):D.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?D.attach(this):D.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off(`afterRender`,this.$updatePlaceholder),a.removeCssClass(this.container,`ace_hasPlaceholder`),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!e&&!this.renderer.placeholderNode){this.renderer.on(`afterRender`,this.$updatePlaceholder),a.addCssClass(this.container,`ace_hasPlaceholder`);var t=a.createElement(`div`);t.className=`ace_placeholder`,t.textContent=this.$placeholder||``,this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||``)}.bind(this),this.on(`input`,this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t={name:`blurTextInput`,description:`Set focus to the editor content div to allow tabbing through the page`,bindKey:`Esc`,exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}},r;e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName=`ace_keyboard-focus`,this.textInput.getElement().setAttribute(`tabindex`,-1),this.textInput.setNumberOfExtraLines(s.isWin?3:0),this.renderer.scroller.setAttribute(`tabindex`,0),this.renderer.scroller.setAttribute(`role`,`group`),this.renderer.scroller.setAttribute(`aria-roledescription`,x(`editor.scroller.aria-roledescription`,`editor`)),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute(`aria-label`,x(`editor.scroller.aria-label`,`Editor content, press Enter to start editing, press Escape to exit`)),this.renderer.scroller.addEventListener(`keyup`,n.bind(this)),this.commands.addCommand(t),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`,x(`editor.gutter.aria-roledescription`,`editor gutter`)),this.renderer.$gutter.setAttribute(`aria-label`,x(`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),r||=new b(this),r.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`,n.bind(this)),this.commands.removeCommand(t),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),r&&r.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:``},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},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`,firstLineNumber:`session`,overwrite:`session`,newLineMode:`session`,useWorker:`session`,useSoftTabs:`session`,navigateWithinSoftTabs:`session`,tabSize:`session`,wrap:`session`,indentedSoftWrap:`session`,foldStyle:`session`,mode:`session`});var D={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?`·`:``))+``},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on(`changeSelection`,this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off(`changeSelection`,this.update),this.update(null,e)}};t.Editor=E}),ace.define(`ace/layer/lines`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("../lib/dom");t.Lines=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=this.canvasHeight*2+`px`,this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){r.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var r=t.firstRowScreen*t.lineHeight,i=Math.floor(r/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=r.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement(`afterbegin`,e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,i){var a=this.cellCache.pop();if(!a){var o=r.createElement(`div`);i&&i(o),this.element.appendChild(o),a={element:o,text:``,row:e}}return a.row=e,a},e}()}),ace.define(`ace/layer/gutter`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/layer/lines`,`ace/config`],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),a=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,s=e("./lines").Lines,c=e("../config").nls,l=function(){function e(e){this.$showCursorMarker=null,this.element=r.createElement(`div`),this.element.className=`ace_layer ace_gutter-layer`,e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new s(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off(`change`,this.$updateAnnotations),this.session=e,e&&e.on(`change`,this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(`deprecated use session.addGutterDecoration`),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn(`deprecated use session.removeGutterDecoration`),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],r=n.row,i=this.$annotations[r];i||=this.$annotations[r]={text:[],type:[],displayText:[]};var o=n.text,s=n.text,c=n.type;o=o?a.escapeHTML(o):n.html||``,s=s||n.html||``,i.text.indexOf(o)===-1&&(i.text.push(o),i.type.push(c),i.displayText.push(s));var l=n.className;l?i.className=l:c===`error`?i.className=` ace_error`:c===`security`&&!/\bace_error\b/.test(i.className)?i.className=` ace_security`:c===`warning`&&!/\bace_(error|security)\b/.test(i.className)?i.className=` ace_warning`:c===`info`&&!i.className?i.className=` ace_info`:c===`hint`&&!i.className&&(i.className=` ace_hint`)}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(n!==0)if(e.action==`remove`)this.$annotations.splice(t,n+1,null);else{var r=Array(n+1);r.unshift(t,1),this.$annotations.splice.apply(this.$annotations,r)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,r=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=r,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var i=t.getNextFoldLine(n),a=i?i.start.row:1/0,o=null,s=-1,c=n;;){if(c>a&&(c=i.end.row+1,i=t.getNextFoldLine(c,i),a=i?i.start.row:1/0),c>r){for(;this.$lines.getLength()>s+1;)this.$lines.pop();break}o=this.$lines.get(++s),o?o.row=c:(o=this.$lines.createCell(c,e,this.session,u),this.$lines.push(o)),this.$renderCell(o,e,i,c),c++}this._signal(`afterRender`),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,r=t.$firstLineNumber,i=this.$lines.last()?this.$lines.last().text:``;(this.$fixedWidth||t.$useWrapMode)&&(i=t.getLength()+r-1);var a=n?n.getWidth(t,i,e):i.toString().length*e.characterWidth,o=this.$padding||this.$computePadding();a+=o.left+o.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))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace(`ace_gutter-active-line `,``));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var r=t[n];if(r.row>=this.$cursorRow){if(r.row>this.$cursorRow){var i=this.session.getFoldLine(this.$cursorRow);if(n>0&&i&&i.start.row==t[n-1].row)r=t[n-1];else break}r.element.className=`ace_gutter-active-line `+r.element.className,this.$cursorCell=r;break}}}}},e.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=r.createElement(`div`),this.$highlightElement.className=`ace_gutter-cursor`,this.$highlightElement.style.pointerEvents=`none`,this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,n=this.config,i=this.$lines,a=n.firstRowScreen*n.lineHeight,o=Math.floor(a/i.canvasHeight),s=e.documentToScreenRow(t)*n.lineHeight-o*i.canvasHeight;r.setStyle(this.$highlightElement.style,`height`,n.lineHeight+`px`),r.setStyle(this.$highlightElement.style,`top`,s+`px`)}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),r=this.oldLastRow;if(this.oldLastRow=n,!t||r<e.firstRow||n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(r>n)for(var i=this.session.getFoldedRowCount(n+1,r);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>r&&this.$lines.push(this.$renderLines(e,r+1,n)),this.updateLineHighlight(),this._signal(`afterRender`),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){for(var r=[],i=t,a=this.session.getNextFoldLine(i),o=a?a.start.row:1/0;i>o&&(i=a.end.row+1,a=this.session.getNextFoldLine(i,a),o=a?a.start.row:1/0),!(i>n);){var s=this.$lines.createCell(i,e,this.session,u);this.$renderCell(s,e,a,i),r.push(s),i++}return r},e.prototype.$renderCell=function(e,t,n,i){var a=e.element,o=this.session,s=a.childNodes[0],l=a.childNodes[1],u=a.childNodes[2],d=a.childNodes[3],f=u.firstChild,p=o.$firstLineNumber,m=o.$breakpoints,h=o.$decorations,g=o.gutterRenderer||this.$renderer,_=this.$showFoldWidgets&&o.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+`px`,b=this.$useSvgGutterIcons?`ace_gutter-cell_svg-icons `:`ace_gutter-cell `,x=this.$useSvgGutterIcons?`ace_icon_svg`:`ace_icon`,S=(g?g.getText(o,i):i+p).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&i>=v&&this.$cursorRow<=n.end.row)&&(b+=`ace_gutter-active-line `,this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace(`ace_gutter-active-line `,``)),this.$cursorCell=e)),m[i]&&(b+=m[i]),h[i]&&(b+=h[i]),this.$annotations[i]&&i!==v&&(b+=this.$annotations[i].className),_){var C=_[i];C??=_[i]=o.getFoldWidget(i)}if(C){var w=`ace_fold-widget ace_`+C,T=C==`start`&&i==v&&i<n.end.row;if(T){w+=` ace_closed`;for(var E=``,D=!1,O=i+1;O<=n.end.row;O++)if(this.$annotations[O]){if(this.$annotations[O].className===` ace_error`){D=!0,E=` ace_error_fold`;break}this.$annotations[O].className===` ace_security`?(D=!0,E=` ace_security_fold`):this.$annotations[O].className===` ace_warning`&&E!==` ace_security_fold`&&(D=!0,E=` ace_warning_fold`)}b+=E}else w+=` ace_open`;l.className!=w&&(l.className=w),r.setStyle(l.style,`height`,y),r.setStyle(l.style,`display`,`inline-block`),l.setAttribute(`role`,`button`),l.setAttribute(`tabindex`,`-1`);var k=o.getFoldWidgetRange(i);k?l.setAttribute(`aria-label`,c(`gutter.code-folding.range.aria-label`,`Toggle code folding, rows $0 through $1`,[k.start.row+1,k.end.row+1])):n?l.setAttribute(`aria-label`,c(`gutter.code-folding.closed.aria-label`,`Toggle code folding, rows $0 through $1`,[n.start.row+1,n.end.row+1])):l.setAttribute(`aria-label`,c(`gutter.code-folding.open.aria-label`,`Toggle code folding, row $0`,[i+1])),T?(l.setAttribute(`aria-expanded`,`false`),l.setAttribute(`title`,c(`gutter.code-folding.closed.title`,`Unfold code`))):(l.setAttribute(`aria-expanded`,`true`),l.setAttribute(`title`,c(`gutter.code-folding.open.title`,`Fold code`)))}else l&&(r.setStyle(l.style,`display`,`none`),l.setAttribute(`tabindex`,`0`),l.removeAttribute(`role`),l.removeAttribute(`aria-label`));var A=this.session.$gutterCustomWidgets[i];if(A?this.$addCustomWidget(i,A,e):d&&this.$removeCustomWidget(i,e),D&&this.$showFoldedAnnotations){u.className=`ace_gutter_annotation`,f.className=x,f.className+=E,r.setStyle(f.style,`height`,y),r.setStyle(u.style,`display`,`block`),r.setStyle(u.style,`height`,y);var j;switch(E){case` ace_error_fold`:j=c(`gutter.annotation.aria-label.error`,`Error, read annotations row $0`,[S]);break;case` ace_security_fold`:j=c(`gutter.annotation.aria-label.security`,`Security finding, read annotations row $0`,[S]);break;case` ace_warning_fold`:j=c(`gutter.annotation.aria-label.warning`,`Warning, read annotations row $0`,[S])}u.setAttribute(`aria-label`,j),u.setAttribute(`tabindex`,`-1`),u.setAttribute(`role`,`button`)}else if(this.$annotations[i]){u.className=`ace_gutter_annotation`,f.className=x,this.$useSvgGutterIcons?f.className+=this.$annotations[i].className:a.classList.add(this.$annotations[i].className.replace(` `,``)),r.setStyle(f.style,`height`,y),r.setStyle(u.style,`display`,`block`),r.setStyle(u.style,`height`,y);var j;switch(this.$annotations[i].className){case` ace_error`:j=c(`gutter.annotation.aria-label.error`,`Error, read annotations row $0`,[S]);break;case` ace_security`:j=c(`gutter.annotation.aria-label.security`,`Security finding, read annotations row $0`,[S]);break;case` ace_warning`:j=c(`gutter.annotation.aria-label.warning`,`Warning, read annotations row $0`,[S]);break;case` ace_info`:j=c(`gutter.annotation.aria-label.info`,`Info, read annotations row $0`,[S]);break;case` ace_hint`:j=c(`gutter.annotation.aria-label.hint`,`Suggestion, read annotations row $0`,[S])}u.setAttribute(`aria-label`,j),u.setAttribute(`tabindex`,`-1`),u.setAttribute(`role`,`button`)}else r.setStyle(u.style,`display`,`none`),u.removeAttribute(`aria-label`),u.removeAttribute(`role`),u.setAttribute(`tabindex`,`0`);return S!==s.data&&(s.data=S),a.className!=b&&(a.className=b),r.setStyle(e.element.style,`height`,this.$lines.computeLineHeight(i,t,o)+`px`),r.setStyle(e.element.style,`top`,this.$lines.computeLineTop(i,t,o)+`px`),e.text=S,u.style.display===`none`&&l.style.display===`none`&&!A?e.element.setAttribute(`aria-hidden`,!0):e.element.setAttribute(`aria-hidden`,!1),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return``}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?r.addCssClass(this.element,`ace_folding-enabled`):r.removeCssClass(this.element,`ace_folding-enabled`),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$hideFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&r.setStyle(i.style,`display`,`none`)}},e.prototype.$showFoldWidget=function(e,t){var n=t||this.$getGutterCell(e);if(n&&n.element){var i=n.element.childNodes[1];i&&this.session.foldWidgets&&this.session.foldWidgets[n.row]&&r.setStyle(i.style,`display`,`inline-block`)}},e.prototype.$getGutterCell=function(e){var t=this.$lines.cells,n=0,r=t.length-1;if(!(e<t[0].row||e>t[r].row)){for(;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(a.row>e)r=i-1;else if(a.row<e)n=i+1;else return a}return a}},e.prototype.$addCustomWidget=function(e,t,n){var i=t.className,a=t.label,o=t.title,s=t.callbacks;this.session.$gutterCustomWidgets[e]={className:i,label:a,title:o,callbacks:s},this.$hideFoldWidget(e,n);var c=n||this.$getGutterCell(e);if(c&&c.element){var l=c.element.querySelector(`.ace_custom-widget`);l&&l.remove(),l=r.createElement(`span`),l.className=`ace_custom-widget ${i}`,l.setAttribute(`tabindex`,`-1`),l.setAttribute(`role`,`button`),l.setAttribute(`aria-label`,a),l.setAttribute(`title`,o),r.setStyle(l.style,`display`,`inline-block`),r.setStyle(l.style,`height`,`inherit`),s&&s.onClick&&l.addEventListener(`click`,function(t){s.onClick(t,e),t.stopPropagation()}),c.element.appendChild(l)}},e.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var n=t||this.$getGutterCell(e);if(n&&n.element){var r=n.element.querySelector(`.ace_custom-widget`);r&&n.element.removeChild(r)}},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=r.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();if(e.x<t.left+n.left)return`markers`;if(this.$showFoldWidgets&&e.x>n.right-t.right)return`foldWidgets`},e}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer=void 0,l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,i.implement(l.prototype,o);function u(e){var t=document.createTextNode(``);e.appendChild(t);var n=r.createElement(`span`);e.appendChild(n);var i=r.createElement(`span`);e.appendChild(i);var a=r.createElement(`span`);return i.appendChild(a),e}t.Gutter=l}),ace.define(`ace/layer/marker`,[`require`,`exports`,`module`,`ace/range`,`ace/lib/dom`],function(e,t,n){var r=e("../range").Range,i=e("../lib/dom"),a=function(){function e(e){this.element=i.createElement(`div`),this.element.className=`ace_layer ace_marker-layer`,e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement(`div`),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){this.config=e,this.i=0;var t;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(t,this,this.session,e);continue}var i=r.range.clipRows(e.firstRow,e.lastRow);if(!i.isEmpty())if(i=i.toScreenRange(this.session),r.renderer){var a=this.$getTop(i.start.row,e),o=this.$padding+i.start.column*e.characterWidth;r.renderer(t,i,o,a,e)}else r.type==`fullLine`?this.drawFullLineMarker(t,i,r.clazz,e):r.type==`screenLine`?this.drawScreenLineMarker(t,i,r.clazz,e):i.isMultiLine()?r.type==`text`?this.drawTextMarker(t,i,r.clazz,e):this.drawMultiLineMarker(t,i,r.clazz,e):this.drawSingleLineMarker(t,i,r.clazz+` ace_start ace_br15`,e)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,i,a){for(var s=this.session,c=t.start.row,l=t.end.row,u=c,d=0,f=0,p=s.getScreenLastRowColumn(u),m=new r(u,t.start.column,u,f);u<=l;u++)m.start.row=m.end.row=u,m.start.column=u==c?t.start.column:s.getRowWrapIndent(u),m.end.column=p,d=f,f=p,p=u+1<l?s.getScreenLastRowColumn(u+1):u==l?0:t.end.column,this.drawSingleLineMarker(e,m,n+(u==c?` ace_start`:``)+` ace_br`+o(u==c||u==c+1&&t.start.column,d<f,f>p,u==l),i,u==l?0:1,a)},e.prototype.drawMultiLineMarker=function(e,t,n,r,i){var a=this.$padding,o=r.lineHeight,s=this.$getTop(t.start.row,r),c=a+t.start.column*r.characterWidth;if(i||=``,this.session.$bidiHandler.isBidiRow(t.start.row)){var l=t.clone();l.end.row=l.start.row,l.end.column=this.session.getLine(l.start.row).length,this.drawBidiSingleLineMarker(e,l,n+` ace_br1 ace_start`,r,null,i)}else this.elt(n+` ace_br1 ace_start`,`height:`+o+`px;right:`+a+`px;top:`+s+`px;left:`+c+`px;`+(i||``));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var l=t.clone();l.start.row=l.end.row,l.start.column=0,this.drawBidiSingleLineMarker(e,l,n+` ace_br12`,r,null,i)}else{s=this.$getTop(t.end.row,r);var u=t.end.column*r.characterWidth;this.elt(n+` ace_br12`,`height:`+o+`px;width:`+u+`px;top:`+s+`px;left:`+a+`px;`+(i||``))}if(o=(t.end.row-t.start.row-1)*r.lineHeight,!(o<=0)){s=this.$getTop(t.start.row+1,r);var d=!!t.start.column|(t.end.column?0:8);this.elt(n+(d?` ace_br`+d:``),`height:`+o+`px;right:`+a+`px;top:`+s+`px;left:`+a+`px;`+(i||``))}},e.prototype.drawSingleLineMarker=function(e,t,n,r,i,a){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,r,i,a);var o=r.lineHeight,s=(t.end.column+(i||0)-t.start.column)*r.characterWidth,c=this.$getTop(t.start.row,r),l=this.$padding+t.start.column*r.characterWidth;this.elt(n,`height:`+o+`px;width:`+s+`px;top:`+c+`px;left:`+l+`px;`+(a||``))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,r,i,a){var o=r.lineHeight,s=this.$getTop(t.start.row,r),c=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,`height:`+o+`px;width:`+(e.width+(i||0))+`px;top:`+s+`px;left:`+(c+e.left)+`px;`+(a||``))},this)},e.prototype.drawFullLineMarker=function(e,t,n,r,i){var a=this.$getTop(t.start.row,r),o=r.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,r)-a),this.elt(n,`height:`+o+`px;top:`+a+`px;left:0;right:0;`+(i||``))},e.prototype.drawScreenLineMarker=function(e,t,n,r,i){var a=this.$getTop(t.start.row,r),o=r.lineHeight;this.elt(n,`height:`+o+`px;top:`+a+`px;left:0;right:0;`+(i||``))},e}();a.prototype.$padding=0;function o(e,t,n,r){return!!e|(t?2:0)|(n?4:0)|(r?8:0)}t.Marker=a}),ace.define(`ace/layer/text_util`,[`require`,`exports`,`module`],function(e,t,n){var r=new Set([`text`,`rparen`,`lparen`]);t.isTextToken=function(e){return r.has(e)}}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),a=e("../lib/lang"),o=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,c=e("../config").nls,l=e("./text_util").isTextToken,u=function(){function e(e){this.dom=i,this.element=this.dom.createElement(`div`),this.element.className=`ace_layer ace_text-layer`,e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==`
|
|
227
|
-
`&&e.getNewLineMode()!=`windows`?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin=`0 `+e+`px`},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on(`changeCharacterSize`,function(e){this._signal(`changeCharacterSize`,e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,typeof e==`string`?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)if(this.showTabs){var r=this.dom.createElement(`span`);r.className=`ace_invisible ace_invisible_tab`,r.textContent=a.stringRepeat(this.TAB_CHAR,n),t.push(r)}else t.push(this.dom.createTextNode(a.stringRepeat(` `,n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var i=`ace_indent-guide`,o=this.showSpaces?` ace_invisible ace_invisible_space`:``,s=this.showSpaces?a.stringRepeat(this.SPACE_CHAR,this.tabSize):a.stringRepeat(` `,this.tabSize),c=this.showTabs?` ace_invisible ace_invisible_tab`:``,l=this.showTabs?a.stringRepeat(this.TAB_CHAR,this.tabSize):s,r=this.dom.createElement(`span`);r.className=i+o,r.textContent=s,this.$tabStrings[` `]=r;var r=this.dom.createElement(`span`);r.className=i+c,r.textContent=l,this.$tabStrings[` `]=r}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var r=Math.max(t,e.firstRow),i=Math.min(n,e.lastRow),a=this.element.childNodes,o=0,s=e.firstRow;s<r;s++){var c=this.session.getFoldLine(s);if(c)if(c.containsRow(r)){r=c.start.row;break}else s=c.end.row;o++}for(var l=!1,s=r,c=this.session.getNextFoldLine(s),u=c?c.start.row:1/0;s>u&&(s=c.end.row+1,c=this.session.getNextFoldLine(s,c),u=c?c.start.row:1/0),!(s>i);){var d=a[o++];if(d){this.dom.removeChildren(d),this.$renderLine(d,s,s==u&&c),l&&(d.style.top=this.$lines.computeLineTop(s,e,this.session)+`px`);var f=e.lineHeight*this.session.getRowLength(s)+`px`;d.style.height!=f&&(l=!0,d.style.height=f)}s++}if(l)for(;o<this.$lines.cells.length;){var p=this.$lines.cells[o++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+`px`}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,r=t?t.lastRow:-1;if(!t||r<e.firstRow||n<t.firstRow||!t||t.lastRow<e.firstRow||e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var i=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);i>0;i--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var i=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);i>0;i--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){for(var r=[],a=t,o=this.session.getNextFoldLine(a),s=o?o.start.row:1/0;a>s&&(a=o.end.row+1,o=this.session.getNextFoldLine(a,o),s=o?o.start.row:1/0),!(a>n);){var c=this.$lines.createCell(a,e,this.session),l=c.element;this.dom.removeChildren(l),i.setStyle(l.style,`height`,this.$lines.computeLineHeight(a,e,this.session)+`px`),i.setStyle(l.style,`top`,this.$lines.computeLineTop(a,e,this.session)+`px`),this.$renderLine(l,a,a==s&&o),l.className=this.$useLineGroups()?`ace_line_group`:`ace_line`,r.push(c),a++}return r},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,r){for(var i=this,o=/(\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,s=this.dom.createFragment(this.element),u,d=0;u=o.exec(r);){var f=u[1],p=u[2],m=u[3],h=u[4],g=u[5];if(!(!i.showSpaces&&p)){var _=d==u.index?``:r.slice(d,u.index);if(d=u.index+u[0].length,_&&s.appendChild(this.dom.createTextNode(_,this.element)),f){var v=i.session.getScreenTabSize(t+u.index),y=i.$tabStrings[v].cloneNode(!0);y.charCount=1,s.appendChild(y),t+=v-1}else if(p)if(i.showSpaces){var b=this.dom.createElement(`span`);b.className=`ace_invisible ace_invisible_space`,b.textContent=a.stringRepeat(i.SPACE_CHAR,p.length),s.appendChild(b)}else s.appendChild(this.dom.createTextNode(p,this.element));else if(m){var b=this.dom.createElement(`span`);b.className=`ace_invisible ace_invisible_space ace_invalid`,b.textContent=a.stringRepeat(i.SPACE_CHAR,m.length),s.appendChild(b)}else if(h){t+=1;var b=this.dom.createElement(`span`);b.style.width=i.config.characterWidth*2+`px`,b.className=i.showSpaces?`ace_cjk ace_invisible ace_invisible_space`:`ace_cjk`,b.textContent=i.showSpaces?i.SPACE_CHAR:h,s.appendChild(b)}else if(g){t+=1;var b=this.dom.createElement(`span`);b.style.width=i.config.characterWidth*2+`px`,b.className=`ace_cjk`,b.textContent=g,s.appendChild(b)}}}if(s.appendChild(this.dom.createTextNode(d?r.slice(d):r,this.element)),l(n.type))e.appendChild(s);else{var x=`ace_`+n.type.replace(/\./g,` ace_`),b=this.dom.createElement(`span`);n.type==`fold`&&(b.style.width=n.value.length*this.config.characterWidth+`px`,b.setAttribute(`title`,c(`inline-fold.closed.title`,`Unfold code`))),b.className=x,b.appendChild(s),e.appendChild(b)}return t+r.length},e.prototype.renderIndentGuide=function(e,t,n){var r=t.search(this.$indentGuideRe);if(r<=0||r>=n)return t;if(t[0]==` `){r-=r%this.tabSize;for(var i=r/this.tabSize,a=0;a<i;a++)e.appendChild(this.$tabStrings[` `].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(r)}if(t[0]==` `){for(var a=0;a<r;a++){var o=this.$tabStrings[` `].cloneNode(!0);o.charCount=1,e.appendChild(o)}return this.$highlightIndentGuide(),t.substr(r)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,r=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:r,start:t.row},this.session.$bracketHighlight){for(var i=this.session.$bracketHighlight.ranges,a=0;a<i.length;a++)if(t.row!==i[a].start.row){this.$highlightIndentGuideMarker.end=i[a].start.row+1,t.row>i[a].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==``&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var a=t.row+1;a<e.length;a++){var o=e[a],s=/^\s*/.exec(o)[0].length;if(o!==``&&(this.$highlightIndentGuideMarker.end=a,s<=n))break}}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(`.ace_indent-guide-active`),t=0;t<e.length;t++)e[t].classList.remove(`ace_indent-guide-active`)},e.prototype.$setIndentGuideActive=function(e,t){if(this.session.doc.getLine(e.row)!==``){var n=e.element;if(e.element.classList&&e.element.classList.contains(`ace_line_group`))if(e.element.childNodes.length>0)n=e.element.childNodes[0];else return;var r=n.childNodes;if(r){var i=r[t-1];i&&i.classList&&i.classList.contains(`ace_indent-guide`)&&i.classList.add(`ace_indent-guide-active`)}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var n=0;n<e.length;n++){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row>=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}else for(var n=e.length-1;n>=0;n--){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row<this.$highlightIndentGuideMarker.start){if(r.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,t)}}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement(`div`);return t.className=`ace_line`,t.style.height=this.config.lineHeight+`px`,t},e.prototype.$renderWrappedLine=function(e,t,n){var r=0,i=0,o=n[0],s=0,c=this.$createLineElement();e.appendChild(c);for(var l=0;l<t.length;l++){var u=t[l],d=u.value;if(l==0&&this.displayIndentGuides){if(r=d.length,d=this.renderIndentGuide(c,d,o),!d)continue;r-=d.length}if(r+d.length<o)s=this.$renderToken(c,s,u,d),r+=d.length;else{for(;r+d.length>=o;){s=this.$renderToken(c,s,u,d.substring(0,o-r)),d=d.substring(o-r),r=o,c=this.$createLineElement(),e.appendChild(c);var f=this.dom.createTextNode(a.stringRepeat(`\xA0`,n.indent),this.element);f.charCount=0,c.appendChild(f),i++,s=0,o=n[i]||Number.MAX_VALUE}d.length!=0&&(r+=d.length,s=this.$renderToken(c,s,u,d))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(c,s,null,``,!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,r=0;r<t.length;r++){var i=t[r],a=i.value;if(!(r==0&&this.displayIndentGuides&&(a=this.renderIndentGuide(e,a),!a))){if(n+a.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,a);n=this.$renderToken(e,n,i,a)}}},e.prototype.$renderOverflowMessage=function(e,t,n,r,i){n&&this.$renderToken(e,t,n,r.slice(0,this.MAX_LINE_LENGTH-t));var a=this.dom.createElement(`span`);a.className=`ace_inline_button ace_keyword ace_toggle_wrap`,a.textContent=i?`<hide>`:`<click to see more...>`,e.appendChild(a)},e.prototype.$renderLine=function(e,t,n){if(!n&&n!=0&&(n=this.session.getFoldLine(t)),n)var r=this.$getFoldLineTokens(t,n);else var r=this.session.getTokens(t);var i=e;if(r.length){var a=this.session.getRowSplitData(t);if(a&&a.length){this.$renderWrappedLine(e,r,a);var i=e.lastChild}else{var i=e;this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i)),this.$renderSimpleLine(i,r)}}else this.$useLineGroups()&&(i=this.$createLineElement(),e.appendChild(i));if(this.showEOL&&i){n&&(t=n.end.row);var o=this.dom.createElement(`span`);o.className=`ace_invisible ace_invisible_eol`,o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,i.appendChild(o)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,r=[];function i(e,t,n){for(var i=0,a=0;a+e[i].value.length<t;)if(a+=e[i].value.length,i++,i==e.length)return;if(a!=t){var o=e[i].value.substring(t-a);o.length>n-t&&(o=o.substring(0,n-t)),r.push({type:e[i].type,value:o}),a=t+o.length,i+=1}for(;a<n&&i<e.length;){var o=e[i].value;o.length+a>n?r.push({type:e[i].type,value:o.substring(0,n-a)}):r.push(e[i]),a+=o.length,i+=1}}var a=n.getTokens(e);return t.walk(function(e,t,o,s,c){e==null?(c&&(a=n.getTokens(t)),a.length&&i(a,s,o)):r.push({type:`fold`,value:e})},t.end.row,this.session.getLine(t.end.row).length),r},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();u.prototype.EOF_CHAR=`¶`,u.prototype.EOL_CHAR_LF=`¬`,u.prototype.EOL_CHAR_CRLF=`¤`,u.prototype.EOL_CHAR=u.prototype.EOL_CHAR_LF,u.prototype.TAB_CHAR=`—`,u.prototype.SPACE_CHAR=`·`,u.prototype.$padding=0,u.prototype.MAX_LINE_LENGTH=1e4,u.prototype.showInvisibles=!1,u.prototype.showSpaces=!1,u.prototype.showTabs=!1,u.prototype.showEOL=!1,u.prototype.displayIndentGuides=!0,u.prototype.$highlightIndentGuides=!0,u.prototype.$tabStrings=[],u.prototype.destroy={},u.prototype.onChangeTabSize=u.prototype.$computeTabString,r.implement(u.prototype,s),t.Text=u}),ace.define(`ace/layer/cursor`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("../lib/dom"),i=function(){function e(e){this.element=r.createElement(`div`),this.element.className=`ace_layer ace_cursor-layer`,e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),r.addCssClass(this.element,`ace_hidden-cursors`),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)r.setStyle(t[n].style,`opacity`,e?``:`0`)},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+`ms`;this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&r.addCssClass(this.element,`ace_animate-blinking`)}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,r.removeCssClass(this.element,`ace_animate-blinking`)},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,r.setCssClass(this.element,`ace_smooth-blinking`,e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=r.createElement(`div`);return e.className=`ace_cursor`,this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,r.addCssClass(this.element,`ace_hidden-cursors`),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,r.removeCssClass(this.element,`ace_hidden-cursors`),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,r.removeCssClass(this.element,`ace_smooth-blinking`)),e(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&r.addCssClass(this.element,`ace_smooth-blinking`)}.bind(this))),r.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||=this.session.selection.getCursor();var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,i=0;(t===void 0||t.length===0)&&(t=[{cursor:null}]);for(var n=0,a=t.length;n<a;n++){var o=this.getPixelPosition(t[n].cursor,!0);if(!((o.top>e.height+e.offset||o.top<0)&&n>1)){var s=this.cursors[i++]||this.addCursor(),c=s.style;this.drawCursor?this.drawCursor(s,o,e,t[n],this.session):this.isCursorInView(o,e)?(r.setStyle(c,`display`,`block`),r.translate(s,o.left,o.top),r.setStyle(c,`width`,Math.round(e.characterWidth)+`px`),r.setStyle(c,`height`,e.lineHeight+`px`)):r.setStyle(c,`display`,`none`)}}for(;this.cursors.length>i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=o,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?r.addCssClass(this.element,`ace_overwrite-cursors`):r.removeCssClass(this.element,`ace_overwrite-cursors`))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();i.prototype.$padding=0,i.prototype.drawCursor=null,t.Cursor=i}),ace.define(`ace/scrollbar`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/event`,`ace/lib/event_emitter`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e("./lib/oop"),a=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter,c=32768,l=function(){function e(e,t){this.element=a.createElement(`div`),this.element.className=`ace_scrollbar ace_scrollbar`+t,this.element.tabIndex=-1,this.inner=a.createElement(`div`),this.inner.className=`ace_scrollbar-inner`,this.inner.textContent=`\xA0`,this.element.appendChild(this.inner),e.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 e.prototype.setVisible=function(e){this.element.style.display=e?``:`none`,this.isVisible=e,this.coeff=1},e}();i.implement(l.prototype,s);var u=function(e){r(t,e);function t(t,n){var r=e.call(this,t,`-v`)||this;return r.scrollTop=0,r.scrollHeight=0,n.$scrollbarWidth=r.width=a.scrollbarWidth(t.ownerDocument),r.inner.style.width=r.element.style.width=(r.width||15)+5+`px`,r.$minWidth=0,r}return t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit(`scroll`,{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+`px`},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=e+`px`},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(l);u.prototype.setInnerHeight=u.prototype.setScrollHeight;var d=function(e){r(t,e);function t(t,n){var r=e.call(this,t,`-h`)||this;return r.scrollLeft=0,r.height=n.$scrollbarWidth,r.inner.style.height=r.element.style.height=(r.height||15)+5+`px`,r}return t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit(`scroll`,{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+`px`},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+`px`},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+`px`},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(l);t.ScrollBar=u,t.ScrollBarV=u,t.ScrollBarH=d,t.VScrollBar=u,t.HScrollBar=d}),ace.define(`ace/scrollbar_custom`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/dom`,`ace/lib/event`,`ace/lib/event_emitter`],function(e,t,n){var r=this&&this.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e("./lib/oop"),a=e("./lib/dom"),o=e("./lib/event"),s=e("./lib/event_emitter").EventEmitter;a.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
|
|
228
|
-
position: absolute;
|
|
229
|
-
background: rgba(128, 128, 128, 0.6);
|
|
230
|
-
-moz-box-sizing: border-box;
|
|
231
|
-
box-sizing: border-box;
|
|
232
|
-
border: 1px solid #bbb;
|
|
233
|
-
border-radius: 2px;
|
|
234
|
-
z-index: 8;
|
|
235
|
-
}
|
|
236
|
-
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
|
|
237
|
-
position: absolute;
|
|
238
|
-
z-index: 6;
|
|
239
|
-
background: none;
|
|
240
|
-
overflow: hidden!important;
|
|
241
|
-
}
|
|
242
|
-
.ace_editor>.ace_sb-v {
|
|
243
|
-
z-index: 6;
|
|
244
|
-
right: 0;
|
|
245
|
-
top: 0;
|
|
246
|
-
width: 12px;
|
|
247
|
-
}
|
|
248
|
-
.ace_editor>.ace_sb-v div {
|
|
249
|
-
z-index: 8;
|
|
250
|
-
right: 0;
|
|
251
|
-
width: 100%;
|
|
252
|
-
}
|
|
253
|
-
.ace_editor>.ace_sb-h {
|
|
254
|
-
bottom: 0;
|
|
255
|
-
left: 0;
|
|
256
|
-
height: 12px;
|
|
257
|
-
}
|
|
258
|
-
.ace_editor>.ace_sb-h div {
|
|
259
|
-
bottom: 0;
|
|
260
|
-
height: 100%;
|
|
261
|
-
}
|
|
262
|
-
.ace_editor>.ace_sb_grabbed {
|
|
263
|
-
z-index: 8;
|
|
264
|
-
background: #000;
|
|
265
|
-
}`,`ace_scrollbar.css`,!1);var c=function(){function e(e,t){this.element=a.createElement(`div`),this.element.className=`ace_sb`+t,this.inner=a.createElement(`div`),this.inner.className=``,this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addMultiMouseDownListener(this.element,[500,300,300],this,`onMouseDown`)}return e.prototype.setVisible=function(e){this.element.style.display=e?``:`none`,this.isVisible=e,this.coeff=1},e}();i.implement(c.prototype,s);var l=function(e){r(t,e);function t(t,n){var r=e.call(this,t,`-v`)||this;return r.scrollTop=0,r.scrollHeight=0,r.parent=t,r.width=r.VScrollWidth,r.renderer=n,r.inner.style.width=r.element.style.width=(r.width||15)+`px`,r.$minWidth=0,r}return t.prototype.onMouseDown=function(e,t){if(e===`mousedown`&&o.getButton(t)===0&&t.detail!==2){if(t.target===this.inner){var n=this,r=t.clientY,i=function(e){r=e.clientY},a=function(){clearInterval(u)},s=t.clientY,c=this.thumbTop,l=function(){if(r!==void 0){var e=n.scrollTopFromThumbTop(c+r-s);e!==n.scrollTop&&n._emit(`scroll`,{data:e})}};o.capture(this.inner,i,a);var u=setInterval(l,20);return o.preventDefault(t)}var d=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit(`scroll`,{data:this.scrollTopFromThumbTop(d)}),o.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return t>>=0,t<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){this.pageHeight===e&&!t||(this.pageHeight=e,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})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+`px`},t}(c);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var u=function(e){r(t,e);function t(t,n){var r=e.call(this,t,`-h`)||this;return r.scrollLeft=0,r.scrollWidth=0,r.height=r.HScrollHeight,r.inner.style.height=r.element.style.height=(r.height||12)+`px`,r.renderer=n,r}return t.prototype.onMouseDown=function(e,t){if(e===`mousedown`&&o.getButton(t)===0&&t.detail!==2){if(t.target===this.inner){var n=this,r=t.clientX,i=function(e){r=e.clientX},a=function(){clearInterval(u)},s=t.clientX,c=this.thumbLeft,l=function(){if(r!==void 0){var e=n.scrollLeftFromThumbLeft(c+r-s);e!==n.scrollLeft&&n._emit(`scroll`,{data:e})}};o.capture(this.inner,i,a);var u=setInterval(l,20);return o.preventDefault(t)}var d=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit(`scroll`,{data:this.scrollLeftFromThumbLeft(d)}),o.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return t>>=0,t<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+`px`,this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){this.pageWidth===e&&!t||(this.pageWidth=e,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})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+`px`},t}(c);u.prototype.setInnerWidth=u.prototype.setScrollWidth,t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=u,t.VScrollBar=l,t.HScrollBar=u}),ace.define(`ace/renderloop`,[`require`,`exports`,`module`,`ace/lib/event`],function(e,t,n){var r=e("./lib/event");t.RenderLoop=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes|=e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}()}),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(e,t,n){var r=e("../lib/oop"),i=e("../lib/dom"),a=e("../lib/lang"),o=e("../lib/event"),s=e("../lib/useragent"),c=e("../lib/event_emitter").EventEmitter,l=512,u=typeof ResizeObserver==`function`,d=200,f=function(){function e(e){this.el=i.createElement(`div`),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement(`div`),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement(`div`),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=a.stringRepeat(`X`,l),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height=`auto`,e.left=e.top=`0px`,e.visibility=`hidden`,e.position=`absolute`,e.whiteSpace=`pre`,s.isIE<8?e[`font-family`]=`inherit`:e.font=`inherit`,e.overflow=t?`hidden`:`visible`},e.prototype.checkForSizeChanges=function(e){if(e===void 0&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight=`bold`;var t=this.$measureSizes();this.$measureNode.style.fontWeight=``,this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit(`changeCharacterSize`,{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){e.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=o.onIdle(function t(){e.checkForSizeChanges(),o.onIdle(t,500)},500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&=(clearInterval(this.$pollSizeChangesTimer),0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/l};return t.width===0||t.height===0?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=a.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return t===void 0&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return!e||!e.parentElement?1:(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement)},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return[`div`,{style:`position: absolute;top:`+e+`px;left:`+t+`px;`}]};this.els=i.buildDom([e(0,0),e(d,0),e(0,d),e(d,d)],this.el)},e.prototype.transformCoordinates=function(e,t){e&&=a(1/this.$getZoom(this.el),e);function n(e,t,n){var r=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/r,(+e[1]*n[0]-e[0]*n[1])/r]}function r(e,t){return[e[0]-t[0],e[1]-t[1]]}function i(e,t){return[e[0]+t[0],e[1]+t[1]]}function a(e,t){return[e*t[0],e*t[1]]}this.els||this.$initTransformMeasureNodes();function o(e){var t=e.getBoundingClientRect();return[t.left,t.top]}var s=o(this.els[0]),c=o(this.els[1]),l=o(this.els[2]),u=o(this.els[3]),f=n(r(u,c),r(u,l),r(i(c,l),i(u,s))),p=a(1+f[0],r(c,s)),m=a(1+f[1],r(l,s));if(t){var h=t,g=f[0]*h[0]/d+f[1]*h[1]/d+1,_=i(a(h[0],p),a(h[1],m));return i(a(1/g/d,_),s)}var v=r(e,s);return a(d,n(r(p,a(f[0],v)),r(m,a(f[1],v)),v))},e}();f.prototype.$characterSize={width:0,height:0},r.implement(f.prototype,c),t.FontMetrics=f}),ace.define(`ace/css/editor-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`
|
|
266
|
-
.ace_br1 {border-top-left-radius : 3px;}
|
|
267
|
-
.ace_br2 {border-top-right-radius : 3px;}
|
|
268
|
-
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
|
|
269
|
-
.ace_br4 {border-bottom-right-radius: 3px;}
|
|
270
|
-
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
|
|
271
|
-
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
|
|
272
|
-
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
|
|
273
|
-
.ace_br8 {border-bottom-left-radius : 3px;}
|
|
274
|
-
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
|
|
275
|
-
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
|
|
276
|
-
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
277
|
-
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
278
|
-
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
279
|
-
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
280
|
-
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
.ace_editor {
|
|
284
|
-
position: relative;
|
|
285
|
-
overflow: hidden;
|
|
286
|
-
padding: 0;
|
|
287
|
-
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
|
|
288
|
-
direction: ltr;
|
|
289
|
-
text-align: left;
|
|
290
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
291
|
-
forced-color-adjust: none;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.ace_scroller {
|
|
295
|
-
position: absolute;
|
|
296
|
-
overflow: hidden;
|
|
297
|
-
top: 0;
|
|
298
|
-
bottom: 0;
|
|
299
|
-
background-color: inherit;
|
|
300
|
-
-ms-user-select: none;
|
|
301
|
-
-moz-user-select: none;
|
|
302
|
-
-webkit-user-select: none;
|
|
303
|
-
user-select: none;
|
|
304
|
-
cursor: text;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.ace_content {
|
|
308
|
-
position: absolute;
|
|
309
|
-
box-sizing: border-box;
|
|
310
|
-
min-width: 100%;
|
|
311
|
-
contain: style size layout;
|
|
312
|
-
font-variant-ligatures: no-common-ligatures;
|
|
313
|
-
}
|
|
314
|
-
.ace_invisible {
|
|
315
|
-
font-variant-ligatures: none;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.ace_keyboard-focus:focus {
|
|
319
|
-
box-shadow: inset 0 0 0 2px #5E9ED6;
|
|
320
|
-
outline: none;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.ace_dragging .ace_scroller:before{
|
|
324
|
-
position: absolute;
|
|
325
|
-
top: 0;
|
|
326
|
-
left: 0;
|
|
327
|
-
right: 0;
|
|
328
|
-
bottom: 0;
|
|
329
|
-
content: '';
|
|
330
|
-
background: rgba(250, 250, 250, 0.01);
|
|
331
|
-
z-index: 1000;
|
|
332
|
-
}
|
|
333
|
-
.ace_dragging.ace_dark .ace_scroller:before{
|
|
334
|
-
background: rgba(0, 0, 0, 0.01);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.ace_gutter {
|
|
338
|
-
position: absolute;
|
|
339
|
-
overflow : hidden;
|
|
340
|
-
width: auto;
|
|
341
|
-
top: 0;
|
|
342
|
-
bottom: 0;
|
|
343
|
-
left: 0;
|
|
344
|
-
cursor: default;
|
|
345
|
-
z-index: 4;
|
|
346
|
-
-ms-user-select: none;
|
|
347
|
-
-moz-user-select: none;
|
|
348
|
-
-webkit-user-select: none;
|
|
349
|
-
user-select: none;
|
|
350
|
-
contain: style size layout;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.ace_gutter-active-line {
|
|
354
|
-
position: absolute;
|
|
355
|
-
left: 0;
|
|
356
|
-
right: 0;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.ace_scroller.ace_scroll-left:after {
|
|
360
|
-
content: "";
|
|
361
|
-
position: absolute;
|
|
362
|
-
top: 0;
|
|
363
|
-
right: 0;
|
|
364
|
-
bottom: 0;
|
|
365
|
-
left: 0;
|
|
366
|
-
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
|
|
367
|
-
pointer-events: none;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
|
|
371
|
-
position: absolute;
|
|
372
|
-
top: 0;
|
|
373
|
-
left: 0;
|
|
374
|
-
right: 0;
|
|
375
|
-
padding-left: 19px;
|
|
376
|
-
padding-right: 6px;
|
|
377
|
-
background-repeat: no-repeat;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
|
|
381
|
-
margin-left: -14px;
|
|
382
|
-
float: left;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.ace_gutter-cell .ace_gutter_annotation {
|
|
386
|
-
margin-left: -19px;
|
|
387
|
-
float: left;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.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 {
|
|
391
|
-
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==");
|
|
392
|
-
background-repeat: no-repeat;
|
|
393
|
-
background-position: 2px center;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
|
|
397
|
-
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==");
|
|
398
|
-
background-repeat: no-repeat;
|
|
399
|
-
background-position: 2px center;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {
|
|
403
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
|
|
404
|
-
background-repeat: no-repeat;
|
|
405
|
-
background-position: 2px center;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.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 {
|
|
409
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.ace_icon_svg.ace_error {
|
|
413
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
|
|
414
|
-
background-color: crimson;
|
|
415
|
-
}
|
|
416
|
-
.ace_icon_svg.ace_security {
|
|
417
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");
|
|
418
|
-
background-color: crimson;
|
|
419
|
-
}
|
|
420
|
-
.ace_icon_svg.ace_warning {
|
|
421
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
|
|
422
|
-
background-color: darkorange;
|
|
423
|
-
}
|
|
424
|
-
.ace_icon_svg.ace_info {
|
|
425
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
|
|
426
|
-
background-color: royalblue;
|
|
427
|
-
}
|
|
428
|
-
.ace_icon_svg.ace_hint {
|
|
429
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");
|
|
430
|
-
background-color: silver;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.ace_icon_svg.ace_error_fold {
|
|
434
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
435
|
-
background-color: crimson;
|
|
436
|
-
}
|
|
437
|
-
.ace_icon_svg.ace_security_fold {
|
|
438
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
|
|
439
|
-
background-color: crimson;
|
|
440
|
-
}
|
|
441
|
-
.ace_icon_svg.ace_warning_fold {
|
|
442
|
-
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
|
|
443
|
-
background-color: darkorange;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
.ace_scrollbar {
|
|
447
|
-
contain: strict;
|
|
448
|
-
position: absolute;
|
|
449
|
-
right: 0;
|
|
450
|
-
bottom: 0;
|
|
451
|
-
z-index: 6;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.ace_scrollbar-inner {
|
|
455
|
-
position: absolute;
|
|
456
|
-
cursor: text;
|
|
457
|
-
left: 0;
|
|
458
|
-
top: 0;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.ace_scrollbar-v{
|
|
462
|
-
overflow-x: hidden;
|
|
463
|
-
overflow-y: scroll;
|
|
464
|
-
top: 0;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.ace_scrollbar-h {
|
|
468
|
-
overflow-x: scroll;
|
|
469
|
-
overflow-y: hidden;
|
|
470
|
-
left: 0;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.ace_print-margin {
|
|
474
|
-
position: absolute;
|
|
475
|
-
height: 100%;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
.ace_text-input {
|
|
479
|
-
position: absolute;
|
|
480
|
-
z-index: 0;
|
|
481
|
-
width: 0.5em;
|
|
482
|
-
height: 1em;
|
|
483
|
-
opacity: 0;
|
|
484
|
-
background: transparent;
|
|
485
|
-
-moz-appearance: none;
|
|
486
|
-
appearance: none;
|
|
487
|
-
border: none;
|
|
488
|
-
resize: none;
|
|
489
|
-
outline: none;
|
|
490
|
-
overflow: hidden;
|
|
491
|
-
font: inherit;
|
|
492
|
-
padding: 0 1px;
|
|
493
|
-
margin: 0 -1px;
|
|
494
|
-
contain: strict;
|
|
495
|
-
-ms-user-select: text;
|
|
496
|
-
-moz-user-select: text;
|
|
497
|
-
-webkit-user-select: text;
|
|
498
|
-
user-select: text;
|
|
499
|
-
/*with \`pre-line\` chrome inserts instead of space*/
|
|
500
|
-
white-space: pre!important;
|
|
501
|
-
}
|
|
502
|
-
.ace_text-input.ace_composition {
|
|
503
|
-
background: transparent;
|
|
504
|
-
color: inherit;
|
|
505
|
-
z-index: 1000;
|
|
506
|
-
opacity: 1;
|
|
507
|
-
}
|
|
508
|
-
.ace_composition_placeholder { color: transparent }
|
|
509
|
-
.ace_composition_marker {
|
|
510
|
-
border-bottom: 1px solid;
|
|
511
|
-
position: absolute;
|
|
512
|
-
border-radius: 0;
|
|
513
|
-
margin-top: 1px;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
[ace_nocontext=true] {
|
|
517
|
-
transform: none!important;
|
|
518
|
-
filter: none!important;
|
|
519
|
-
clip-path: none!important;
|
|
520
|
-
mask : none!important;
|
|
521
|
-
contain: none!important;
|
|
522
|
-
perspective: none!important;
|
|
523
|
-
mix-blend-mode: initial!important;
|
|
524
|
-
z-index: auto;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.ace_layer {
|
|
528
|
-
z-index: 1;
|
|
529
|
-
position: absolute;
|
|
530
|
-
overflow: hidden;
|
|
531
|
-
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
|
|
532
|
-
word-wrap: normal;
|
|
533
|
-
white-space: pre;
|
|
534
|
-
height: 100%;
|
|
535
|
-
width: 100%;
|
|
536
|
-
box-sizing: border-box;
|
|
537
|
-
/* setting pointer-events: auto; on node under the mouse, which changes
|
|
538
|
-
during scroll, will break mouse wheel scrolling in Safari */
|
|
539
|
-
pointer-events: none;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.ace_gutter-layer {
|
|
543
|
-
position: relative;
|
|
544
|
-
width: auto;
|
|
545
|
-
text-align: right;
|
|
546
|
-
pointer-events: auto;
|
|
547
|
-
height: 1000000px;
|
|
548
|
-
contain: style size layout;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
.ace_text-layer {
|
|
552
|
-
font: inherit !important;
|
|
553
|
-
position: absolute;
|
|
554
|
-
height: 1000000px;
|
|
555
|
-
width: 1000000px;
|
|
556
|
-
contain: style size layout;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
|
|
560
|
-
contain: style size layout;
|
|
561
|
-
position: absolute;
|
|
562
|
-
top: 0;
|
|
563
|
-
left: 0;
|
|
564
|
-
right: 0;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
.ace_hidpi .ace_text-layer,
|
|
568
|
-
.ace_hidpi .ace_gutter-layer,
|
|
569
|
-
.ace_hidpi .ace_content,
|
|
570
|
-
.ace_hidpi .ace_gutter {
|
|
571
|
-
contain: strict;
|
|
572
|
-
}
|
|
573
|
-
.ace_hidpi .ace_text-layer > .ace_line,
|
|
574
|
-
.ace_hidpi .ace_text-layer > .ace_line_group {
|
|
575
|
-
contain: strict;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
.ace_cjk {
|
|
579
|
-
display: inline-block;
|
|
580
|
-
text-align: center;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.ace_cursor-layer {
|
|
584
|
-
z-index: 4;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.ace_cursor {
|
|
588
|
-
z-index: 4;
|
|
589
|
-
position: absolute;
|
|
590
|
-
box-sizing: border-box;
|
|
591
|
-
border-left: 2px solid;
|
|
592
|
-
/* workaround for smooth cursor repaintng whole screen in chrome */
|
|
593
|
-
transform: translatez(0);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
.ace_multiselect .ace_cursor {
|
|
597
|
-
border-left-width: 1px;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
.ace_slim-cursors .ace_cursor {
|
|
601
|
-
border-left-width: 1px;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.ace_overwrite-cursors .ace_cursor {
|
|
605
|
-
border-left-width: 0;
|
|
606
|
-
border-bottom: 1px solid;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
.ace_hidden-cursors .ace_cursor {
|
|
610
|
-
opacity: 0.2;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
|
|
614
|
-
opacity: 0;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
.ace_smooth-blinking .ace_cursor {
|
|
618
|
-
transition: opacity 0.18s;
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
.ace_animate-blinking .ace_cursor {
|
|
622
|
-
animation-duration: 1000ms;
|
|
623
|
-
animation-timing-function: step-end;
|
|
624
|
-
animation-name: blink-ace-animate;
|
|
625
|
-
animation-iteration-count: infinite;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
|
|
629
|
-
animation-duration: 1000ms;
|
|
630
|
-
animation-timing-function: ease-in-out;
|
|
631
|
-
animation-name: blink-ace-animate-smooth;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
@keyframes blink-ace-animate {
|
|
635
|
-
from, to { opacity: 1; }
|
|
636
|
-
60% { opacity: 0; }
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
@keyframes blink-ace-animate-smooth {
|
|
640
|
-
from, to { opacity: 1; }
|
|
641
|
-
45% { opacity: 1; }
|
|
642
|
-
60% { opacity: 0; }
|
|
643
|
-
85% { opacity: 0; }
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
|
|
647
|
-
position: absolute;
|
|
648
|
-
z-index: 3;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
.ace_marker-layer .ace_selection {
|
|
652
|
-
position: absolute;
|
|
653
|
-
z-index: 5;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.ace_marker-layer .ace_bracket {
|
|
657
|
-
position: absolute;
|
|
658
|
-
z-index: 6;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
.ace_marker-layer .ace_error_bracket {
|
|
662
|
-
position: absolute;
|
|
663
|
-
border-bottom: 1px solid #DE5555;
|
|
664
|
-
border-radius: 0;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
.ace_marker-layer .ace_active-line {
|
|
668
|
-
position: absolute;
|
|
669
|
-
z-index: 2;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
.ace_marker-layer .ace_selected-word {
|
|
673
|
-
position: absolute;
|
|
674
|
-
z-index: 4;
|
|
675
|
-
box-sizing: border-box;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.ace_line .ace_fold {
|
|
679
|
-
box-sizing: border-box;
|
|
680
|
-
|
|
681
|
-
display: inline-block;
|
|
682
|
-
height: 11px;
|
|
683
|
-
margin-top: -2px;
|
|
684
|
-
vertical-align: middle;
|
|
685
|
-
|
|
686
|
-
background-image:
|
|
687
|
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
688
|
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
|
|
689
|
-
background-repeat: no-repeat, repeat-x;
|
|
690
|
-
background-position: center center, top left;
|
|
691
|
-
color: transparent;
|
|
692
|
-
|
|
693
|
-
border: 1px solid black;
|
|
694
|
-
border-radius: 2px;
|
|
695
|
-
|
|
696
|
-
cursor: pointer;
|
|
697
|
-
pointer-events: auto;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
.ace_dark .ace_fold {
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
.ace_fold:hover{
|
|
704
|
-
background-image:
|
|
705
|
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
|
|
706
|
-
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
.ace_tooltip {
|
|
710
|
-
background-color: #f5f5f5;
|
|
711
|
-
border: 1px solid gray;
|
|
712
|
-
border-radius: 1px;
|
|
713
|
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
714
|
-
color: black;
|
|
715
|
-
padding: 3px 4px;
|
|
716
|
-
position: fixed;
|
|
717
|
-
z-index: 999999;
|
|
718
|
-
box-sizing: border-box;
|
|
719
|
-
cursor: default;
|
|
720
|
-
white-space: pre-wrap;
|
|
721
|
-
word-wrap: break-word;
|
|
722
|
-
line-height: normal;
|
|
723
|
-
font-style: normal;
|
|
724
|
-
font-weight: normal;
|
|
725
|
-
letter-spacing: normal;
|
|
726
|
-
pointer-events: none;
|
|
727
|
-
overflow: auto;
|
|
728
|
-
max-width: min(33em, 66vw);
|
|
729
|
-
overscroll-behavior: contain;
|
|
730
|
-
}
|
|
731
|
-
.ace_tooltip pre {
|
|
732
|
-
white-space: pre-wrap;
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.ace_tooltip.ace_dark {
|
|
736
|
-
background-color: #636363;
|
|
737
|
-
color: #fff;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
.ace_tooltip:focus {
|
|
741
|
-
outline: 1px solid #5E9ED6;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.ace_icon {
|
|
745
|
-
display: inline-block;
|
|
746
|
-
width: 18px;
|
|
747
|
-
vertical-align: top;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
.ace_icon_svg {
|
|
751
|
-
display: inline-block;
|
|
752
|
-
width: 12px;
|
|
753
|
-
vertical-align: top;
|
|
754
|
-
-webkit-mask-repeat: no-repeat;
|
|
755
|
-
-webkit-mask-size: 12px;
|
|
756
|
-
-webkit-mask-position: center;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
|
|
760
|
-
padding-right: 13px;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
.ace_fold-widget, .ace_custom-widget {
|
|
764
|
-
box-sizing: border-box;
|
|
765
|
-
|
|
766
|
-
margin: 0 -12px 0 1px;
|
|
767
|
-
display: none;
|
|
768
|
-
width: 11px;
|
|
769
|
-
vertical-align: top;
|
|
770
|
-
|
|
771
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
|
|
772
|
-
background-repeat: no-repeat;
|
|
773
|
-
background-position: center;
|
|
774
|
-
|
|
775
|
-
border-radius: 3px;
|
|
776
|
-
|
|
777
|
-
border: 1px solid transparent;
|
|
778
|
-
cursor: pointer;
|
|
779
|
-
pointer-events: auto;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
.ace_custom-widget {
|
|
783
|
-
background: none;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
.ace_folding-enabled .ace_fold-widget {
|
|
787
|
-
display: inline-block;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
.ace_fold-widget.ace_end {
|
|
791
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.ace_fold-widget.ace_closed {
|
|
795
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
.ace_fold-widget:hover {
|
|
799
|
-
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
800
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
801
|
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
.ace_fold-widget:active {
|
|
805
|
-
border: 1px solid rgba(0, 0, 0, 0.4);
|
|
806
|
-
background-color: rgba(0, 0, 0, 0.05);
|
|
807
|
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
|
|
808
|
-
}
|
|
809
|
-
/**
|
|
810
|
-
* Dark version for fold widgets
|
|
811
|
-
*/
|
|
812
|
-
.ace_dark .ace_fold-widget {
|
|
813
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
|
|
814
|
-
}
|
|
815
|
-
.ace_dark .ace_fold-widget.ace_end {
|
|
816
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
|
|
817
|
-
}
|
|
818
|
-
.ace_dark .ace_fold-widget.ace_closed {
|
|
819
|
-
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
|
|
820
|
-
}
|
|
821
|
-
.ace_dark .ace_fold-widget:hover {
|
|
822
|
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
823
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
824
|
-
}
|
|
825
|
-
.ace_dark .ace_fold-widget:active {
|
|
826
|
-
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
.ace_inline_button {
|
|
830
|
-
border: 1px solid lightgray;
|
|
831
|
-
display: inline-block;
|
|
832
|
-
margin: -1px 8px;
|
|
833
|
-
padding: 0 5px;
|
|
834
|
-
pointer-events: auto;
|
|
835
|
-
cursor: pointer;
|
|
836
|
-
}
|
|
837
|
-
.ace_inline_button:hover {
|
|
838
|
-
border-color: gray;
|
|
839
|
-
background: rgba(200,200,200,0.2);
|
|
840
|
-
display: inline-block;
|
|
841
|
-
pointer-events: auto;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
.ace_fold-widget.ace_invalid {
|
|
845
|
-
background-color: #FFB4B4;
|
|
846
|
-
border-color: #DE5555;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
.ace_fade-fold-widgets .ace_fold-widget {
|
|
850
|
-
transition: opacity 0.4s ease 0.05s;
|
|
851
|
-
opacity: 0;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
.ace_fade-fold-widgets:hover .ace_fold-widget {
|
|
855
|
-
transition: opacity 0.05s ease 0.05s;
|
|
856
|
-
opacity:1;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
.ace_underline {
|
|
860
|
-
text-decoration: underline;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
.ace_bold {
|
|
864
|
-
font-weight: bold;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
.ace_nobold .ace_bold {
|
|
868
|
-
font-weight: normal;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
.ace_italic {
|
|
872
|
-
font-style: italic;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
.ace_error-marker {
|
|
877
|
-
background-color: rgba(255, 0, 0,0.2);
|
|
878
|
-
position: absolute;
|
|
879
|
-
z-index: 9;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
.ace_highlight-marker {
|
|
883
|
-
background-color: rgba(255, 255, 0,0.2);
|
|
884
|
-
position: absolute;
|
|
885
|
-
z-index: 8;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
.ace_mobile-menu {
|
|
889
|
-
position: absolute;
|
|
890
|
-
line-height: 1.5;
|
|
891
|
-
border-radius: 4px;
|
|
892
|
-
-ms-user-select: none;
|
|
893
|
-
-moz-user-select: none;
|
|
894
|
-
-webkit-user-select: none;
|
|
895
|
-
user-select: none;
|
|
896
|
-
background: white;
|
|
897
|
-
box-shadow: 1px 3px 2px grey;
|
|
898
|
-
border: 1px solid #dcdcdc;
|
|
899
|
-
color: black;
|
|
900
|
-
}
|
|
901
|
-
.ace_dark > .ace_mobile-menu {
|
|
902
|
-
background: #333;
|
|
903
|
-
color: #ccc;
|
|
904
|
-
box-shadow: 1px 3px 2px grey;
|
|
905
|
-
border: 1px solid #444;
|
|
906
|
-
|
|
907
|
-
}
|
|
908
|
-
.ace_mobile-button {
|
|
909
|
-
padding: 2px;
|
|
910
|
-
cursor: pointer;
|
|
911
|
-
overflow: hidden;
|
|
912
|
-
}
|
|
913
|
-
.ace_mobile-button:hover {
|
|
914
|
-
background-color: #eee;
|
|
915
|
-
opacity:1;
|
|
916
|
-
}
|
|
917
|
-
.ace_mobile-button:active {
|
|
918
|
-
background-color: #ddd;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
.ace_placeholder {
|
|
922
|
-
position: relative;
|
|
923
|
-
font-family: arial;
|
|
924
|
-
transform: scale(0.9);
|
|
925
|
-
transform-origin: left;
|
|
926
|
-
white-space: pre;
|
|
927
|
-
opacity: 0.7;
|
|
928
|
-
margin: 0 10px;
|
|
929
|
-
z-index: 1;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
.ace_ghost_text {
|
|
933
|
-
opacity: 0.5;
|
|
934
|
-
font-style: italic;
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
.ace_ghost_text_container > div {
|
|
938
|
-
white-space: pre;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
.ghost_text_line_wrapped::after {
|
|
942
|
-
content: "↩";
|
|
943
|
-
position: absolute;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
.ace_lineWidgetContainer.ace_ghost_text {
|
|
947
|
-
margin: 0px 4px
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
.ace_screenreader-only {
|
|
951
|
-
position:absolute;
|
|
952
|
-
left:-10000px;
|
|
953
|
-
top:auto;
|
|
954
|
-
width:1px;
|
|
955
|
-
height:1px;
|
|
956
|
-
overflow:hidden;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
.ace_hidden_token {
|
|
960
|
-
display: none;
|
|
961
|
-
}`}),ace.define(`ace/layer/decorators`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/event_emitter`],function(e,t,n){var r=e("../lib/dom"),i=e("../lib/oop"),a=e("../lib/event_emitter").EventEmitter,o=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)`},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=r.createElement(`canvas`),this.canvas.style.top=`0px`,this.canvas.style.right=`0px`,this.canvas.style.zIndex=`7`,this.canvas.style.position=`absolute`},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){if(typeof this.canvas.getContext!=`function`)return;var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(e);var n=this.canvas.getContext(`2d`);function r(e,t){return e.priority<t.priority?-1:+(e.priority>t.priority)}var i=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),i){var a={info:1,warning:2,error:3};i.forEach(function(e){e.priority=a[e.type]||null}),i=i.sort(r);for(var o=0;o<i.length;o++){var s=i[o].row,c=this.getVerticalOffsetForRow(s),l=c+this.lineHeight,u=Math.round(this.heightRatio*c),d=Math.round(this.heightRatio*l),f=Math.round((u+d)/2),p=d-f;p<this.halfMinDecorationHeight&&(p=this.halfMinDecorationHeight),f-p<0&&(f=p),f+p>this.canvasHeight&&(f=this.canvasHeight-p);var m=f-p,h=f+p-m;n.fillStyle=t[i[o].type]||null,n.fillRect(0,m,Math.round(this.oneZoneWidth-1),h)}}var g=this.renderer.session.selection.getCursor();if(g){var _=Math.round(this.getVerticalOffsetForRow(g.row)*this.heightRatio);n.fillStyle=`rgba(0, 0, 0, 0.5)`,n.fillRect(0,_,this.canvasWidth,2)}},e.prototype.getVerticalOffsetForRow=function(e){return e|=0,this.renderer.session.documentToScreenRow(e,0)*this.lineHeight},e.prototype.setDimensions=function(e){e||=this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.heightRatio=this.maxHeight<this.canvasHeight?1:this.canvasHeight/this.maxHeight},e.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},e.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},e}();i.implement(o.prototype,a),t.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(e,t,n){var r=e("./lib/oop"),i=e("./lib/dom"),a=e("./lib/lang"),o=e("./config"),s=e("./layer/gutter").Gutter,c=e("./layer/marker").Marker,l=e("./layer/text").Text,u=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,f=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,m=e("./scrollbar_custom").VScrollBar,h=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,_=e("./lib/event_emitter").EventEmitter,v=e("./css/editor-css"),y=e("./layer/decorators").Decorator,b=e("./lib/useragent"),x=e("./layer/text_util").isTextToken;i.importCssString(v,`ace_editor.css`,!1);var S=function(){function e(e,t){var n=this;this.container=e||i.createElement(`div`),i.addCssClass(this.container,`ace_editor`),i.HI_DPI&&i.addCssClass(this.container,`ace_hidpi`),this.setTheme(t),o.get(`useStrictCSP`)??o.set(`useStrictCSP`,!1),this.$gutter=i.createElement(`div`),this.$gutter.className=`ace_gutter`,this.container.appendChild(this.$gutter),this.$gutter.setAttribute(`aria-hidden`,`true`),this.scroller=i.createElement(`div`),this.scroller.className=`ace_scroller`,this.container.appendChild(this.scroller),this.content=i.createElement(`div`),this.content.className=`ace_content`,this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on(`changeGutterWidth`,this.onGutterResize.bind(this)),this.$markerBack=new c(this.content);var r=this.$textLayer=new l(this.content);this.canvas=r.element,this.$markerFront=new c(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new f(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.on(`scroll`,function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on(`scroll`,function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on(`changeCharacterSize`,function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal(`changeCharacterSize`,e)}),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=!b.isIOS,this.$loop=new h(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 e.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(),i.setStyle(this.scroller.style,`line-height`,this.lineHeight+`px`)},e.prototype.setSession=function(e){this.session&&this.session.doc.off(`changeNewLineMode`,this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(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))},e.prototype.updateLines=function(e,t,n){if(t===void 0&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow)if(n)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,r){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=+!!e;var i=this.container;r||=i.clientHeight||i.scrollHeight,!r&&this.$maxLines&&this.lineHeight>1&&(!i.style.height||i.style.height==`0px`)&&(i.style.height=`1px`,r=i.clientHeight||i.scrollHeight),n||=i.clientWidth||i.scrollWidth;var a=this.$updateCachedSize(e,t,n,r);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!r)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(a|this.$changes,!0):this.$loop.schedule(a|this.$changes),this.resizing&&=0,this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,r){r-=this.$extraHeight||0;var a=0,o=this.$size,s={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};if(r&&(e||o.height!=r)&&(o.height=r,a|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(o.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+`px`,a|=this.CHANGE_SCROLL),n&&(e||o.width!=n)){a|=this.CHANGE_SIZE,o.width=n,t??=this.$showGutter?this.$gutter.offsetWidth:0,this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,`left`,t+`px`),i.setStyle(this.scroller.style,`left`,t+this.margin.left+`px`),o.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,`left`,this.margin.left+`px`);var c=this.scrollBarV.getWidth()+`px`;i.setStyle(this.scrollBarH.element.style,`right`,c),i.setStyle(this.scroller.style,`right`,c),i.setStyle(this.scroller.style,`bottom`,this.scrollBarH.getHeight()),this.scrollBarH.setWidth(o.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(a|=this.CHANGE_FULL)}return o.$dirty=!n||!r,a&&this._signal(`resize`,s),a},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-this.$padding*2,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption(`animatedScroll`,e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption(`showInvisibles`,e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption(`showInvisibles`)},e.prototype.getDisplayIndentGuides=function(){return this.getOption(`displayIndentGuides`)},e.prototype.setDisplayIndentGuides=function(e){this.setOption(`displayIndentGuides`,e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption(`highlightIndentGuides`)},e.prototype.setHighlightIndentGuides=function(e){this.setOption(`highlightIndentGuides`,e)},e.prototype.setShowPrintMargin=function(e){this.setOption(`showPrintMargin`,e)},e.prototype.getShowPrintMargin=function(){return this.getOption(`showPrintMargin`)},e.prototype.setPrintMarginColumn=function(e){this.setOption(`printMarginColumn`,e)},e.prototype.getPrintMarginColumn=function(){return this.getOption(`printMarginColumn`)},e.prototype.getShowGutter=function(){return this.getOption(`showGutter`)},e.prototype.setShowGutter=function(e){return this.setOption(`showGutter`,e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption(`fadeFoldWidgets`)},e.prototype.setFadeFoldWidgets=function(e){this.setOption(`fadeFoldWidgets`,e)},e.prototype.setHighlightGutterLine=function(e){this.setOption(`highlightGutterLine`,e)},e.prototype.getHighlightGutterLine=function(){return this.getOption(`highlightGutterLine`)},e.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var e=i.createElement(`div`);e.className=`ace_layer ace_print-margin-layer`,this.$printMarginEl=i.createElement(`div`),this.$printMarginEl.className=`ace_print-margin`,e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+`px`,t.visibility=this.$showPrintMargin?`visible`:`hidden`,this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(!this.$keepTextAreaAtCursor&&!t){i.translate(this.textarea,-100,0);return}var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var r=this.layerConfig,a=n.top,o=n.left;a-=r.offset;var s=t&&t.useTextareaForIME||b.isMobile?this.lineHeight:1;if(a<0||a>r.height-s){i.translate(this.textarea,0,0);return}var c=1,l=this.$size.height-s;if(!t)a+=this.lineHeight;else if(t.useTextareaForIME){var u=this.textarea.value;c=this.characterWidth*this.session.$getStringScreenWidth(u)[0]}else a+=this.lineHeight+2;o-=this.scrollLeft,o>this.$size.scrollerWidth-c&&(o=this.$size.scrollerWidth-c),o+=this.gutterWidth+this.margin.left,i.setStyle(e,`height`,s+`px`),i.setStyle(e,`width`,c+`px`),i.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-c),Math.min(a,l))}}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,r){var i=this.scrollMargin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,i.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-i.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,r){var i=this.margin;i.top=e|0,i.bottom=t|0,i.right=r|0,i.left=n|0,i.v=i.top+i.bottom,i.h=i.left+i.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption(`hScrollBarAlwaysVisible`,e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption(`vScrollBarAlwaysVisible`,e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&=(e|=this.$changes,0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t){this.$changes|=e;return}if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal(`beforeRender`,e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var r=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;r>0&&(this.scrollTop=r,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var a=n.width+2*this.$padding+`px`,o=n.minHeight+`px`;i.setStyle(this.content.style,`width`,a),i.setStyle(this.content.style,`height`,o)}if(e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?`ace_scroller `:`ace_scroller ace_scroll-left `,this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal(`afterRender`,e);return}if(e&this.CHANGE_SCROLL){this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),this._signal(`afterRender`,e);return}e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal(`afterRender`,e)},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var r=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||r!=this.$vScroll){r!=this.$vScroll&&(this.$vScroll=r,this.scrollBarV.setVisible(r));var i=this.container.clientWidth;this.container.style.height=n+`px`,this.$updateCachedSize(!0,this.$gutterWidth,i,n),this.desiredHeight=n,this._signal(`autosize`)}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,i=this.$getLongestLine(),a=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-i-2*this.$padding<0),o=this.$horizScroll!==a;o&&(this.$horizScroll=a,this.scrollBarH.setVisible(a));var s=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),n=t.height<=2*this.lineHeight);var c=t.scrollerHeight+this.lineHeight,l=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;r+=l;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,r-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,i+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-r+l<0||this.scrollTop>u.top),f=s!==d;f&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var p=this.scrollTop%this.lineHeight,m=Math.ceil(c/this.lineHeight)-1,h=Math.max(0,Math.round((this.scrollTop-p)/this.lineHeight)),g=h+m,_,v,y=this.lineHeight;h=e.screenToDocumentRow(h,0);var b=e.getFoldLine(h);b&&(h=b.start.row),_=e.documentToScreenRow(h,0),v=e.getRowLength(h)*y,g=Math.min(e.screenToDocumentRow(g,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(g)*y+v,p=this.scrollTop-_*y,p<0&&_>0&&(_=Math.max(0,_+Math.floor(p/y)),p=this.scrollTop-_*y);var x=0;return(this.layerConfig.width!=i||o)&&(x=this.CHANGE_H_SCROLL),(o||f)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal(`scrollbarVisibilityChanged`),f&&(i=this.$getLongestLine())),this.layerConfig={width:i,padding:this.$padding,firstRow:h,firstRowScreen:_,lastRow:g,lineHeight:y,characterWidth:this.characterWidth,minHeight:c,maxHeight:r,offset:p,gutterOffset:y?Math.max(0,Math.ceil((p+t.height-t.scrollerHeight)/y)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(i-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(t<n.firstRow)){if(t===1/0){this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n);return}return this.$textLayer.updateLines(n,e,t),!0}}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(this.$size.scrollerHeight!==0){var r=this.$cursorLayer.getPixelPosition(e),i=r.left,a=r.top,o=n&&n.top||0,s=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var c=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;c+o>a?(t&&c+o>a+this.lineHeight&&(a-=t*this.$size.scrollerHeight),a===0&&(a=-this.scrollMargin.top),this.session.setScrollTop(a)):c+this.$size.scrollerHeight-s<a+this.lineHeight&&(t&&c+this.$size.scrollerHeight-s<a-this.lineHeight&&(a+=t*this.$size.scrollerHeight),this.session.setScrollTop(a+this.lineHeight+s-this.$size.scrollerHeight));var l=this.scrollLeft,u=2*this.layerConfig.characterWidth;i-u<l?(i-=u,i<this.$padding+u&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):(i+=u,l+this.$size.scrollerWidth<i+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):l<=this.$padding&&i-l<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){typeof e==`number`&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),r=this.$size.scrollerHeight-this.lineHeight,i=n.top-r*(t||0);return this.session.setScrollTop(i),i},e.prototype.$calcSteps=function(e,t){var n=0,r=this.STEPS,i=[],a=function(e,t,n){return n*((e-1)**3+1)+t};for(n=0;n<r;++n)i.push(a(n/this.STEPS,e,t-e));return i},e.prototype.scrollToLine=function(e,t,n,r){var i=this.$cursorLayer.getPixelPosition({row:e,column:0}).top;t&&(i-=this.$size.scrollerHeight/2);var a=this.scrollTop;this.session.setScrollTop(i),n!==!1&&this.animateScrolling(a,r)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(!this.$animatedScroll)return;var r=this;if(e==n)return;if(this.$scrollAnimation){var i=this.$scrollAnimation.steps;if(i.length&&(e=i[0],e==n))return}var a=r.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:a},clearInterval(this.$timer),r.session.setScrollTop(a.shift()),r.session.$scrollTop=n;function o(){r.$timer=clearInterval(r.$timer),r.$scrollAnimation=null,r.$stopAnimation=!1,t&&t()}this.$timer=setInterval(function(){if(r.$stopAnimation){o();return}if(!r.session)return clearInterval(r.$timer);a.length?(r.session.setScrollTop(a.shift()),r.session.$scrollTop=n):n==null?o():(r.session.$scrollTop=-1,r.session.setScrollTop(n),n=null)},10)},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){if(t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,a=i/this.characterWidth,o=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),s=this.$blockCursor?Math.floor(a):Math.round(a);return{row:o,column:s,side:a-s>0?1:-1,offsetX:i}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var r=this.$fontMetrics.transformCoordinates([e,t]);e=r[1]-this.gutterWidth-this.margin.left,t=r[0]}else n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,a=i/this.characterWidth,o=this.$blockCursor?Math.floor(a):Math.round(a),s=(t+this.scrollTop-n.top)/this.lineHeight;return this.session.screenToDocumentPosition(s,Math.max(o,0),i)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),r=this.session.documentToScreenPosition(e,t),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,e)?this.session.$bidiHandler.getPosLeft(r.column):Math.round(r.column*this.characterWidth)),a=r.row*this.lineHeight;return{pageX:n.left+i-this.scrollLeft,pageY:n.top+a-this.scrollTop}},e.prototype.visualizeFocus=function(){i.addCssClass(this.container,`ace_focus`)},e.prototype.visualizeBlur=function(){i.removeCssClass(this.container,`ace_focus`)},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||=this.textarea.style.cssText,e.useTextareaForIME??=this.$useTextareaForIME,this.$useTextareaForIME?(i.addCssClass(this.textarea,`ace_composition`),this.textarea.style.cssText=``,this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display=`none`):e.markerId=this.session.addMarker(e.markerRange,`ace_composition_marker`,`text`)},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,`composition_placeholder`,t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,`ace_composition`),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=``}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,r=t||{row:n.row,column:n.column};this.removeGhostText();var a=this.$calculateWrappedTextChunks(e,r);this.addToken(a[0].text,`ghost_text`,r.row,r.column),this.$ghostText={text:e,position:{row:r.row,column:r.column}};var o=i.createElement(`div`);if(a.length>1){var s=this.hideTokensAfterPosition(r.row,r.column),c;a.slice(1).forEach(function(e){var t=i.createElement(`div`),n=i.createElement(`span`);n.className=`ace_ghost_text`,e.wrapped&&(t.className=`ghost_text_line_wrapped`),e.text.length===0&&(e.text=` `),n.appendChild(i.createTextNode(e.text)),t.appendChild(n),o.appendChild(t),c=t}),s.forEach(function(e){var t=i.createElement(`span`);x(e.type)||(t.className=`ace_`+e.type.replace(/\./g,` ace_`)),t.appendChild(i.createTextNode(e.value)),c.appendChild(t)}),this.$ghostTextWidget={el:o,row:r.row,column:r.column,className:`ace_ghost_text_container`},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var l=this.$cursorLayer.getPixelPosition(r,!0),u=this.container.getBoundingClientRect().height,d=a.length*this.lineHeight;if(d<u-l.top)return;d<u?this.scrollBy(0,(a.length-1)*this.lineHeight):this.scrollToRow(r.row)}},e.prototype.$calculateWrappedTextChunks=function(e,t){var n=this.$size.scrollerWidth-this.$padding*2,r=Math.floor(n/this.characterWidth)-2;r=r<=0?60:r;for(var i=e.split(/\r?\n/),a=[],o=0;o<i.length;o++){var s=this.session.$getDisplayTokens(i[o],t.column),c=this.session.$computeWrapSplits(s,r,this.session.$tabSize);if(c.length>0){var l=0;c.push(i[o].length);for(var u=0;u<c.length;u++){var d=i[o].slice(l,c[u]);a.push({text:d,wrapped:!0}),l=c[u]}}else a.push({text:i[o],wrapped:!1})}return a},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&=(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,r){var i=this.session;i.bgTokenizer.lines[n]=null;var a={type:t,value:e},o=i.getTokens(n);if(r==null||!o.length)o.push(a);else for(var s=0,c=0;c<o.length;c++){var l=o[c];if(s+=l.value.length,r<=s){var u=l.value.length-(s-r),d=l.value.slice(0,u),f=l.value.slice(u);o.splice(c,1,{type:l.type,value:d},a,{type:l.type,value:f});break}}this.updateLines(n,n)},e.prototype.hideTokensAfterPosition=function(e,t){for(var n=this.session.getTokens(e),r=0,i=!1,a=[],o=0;o<n.length;o++){var s=n[o];if(r+=s.value.length,s.type!==`ghost_text`){if(i){a.push({type:s.type,value:s.value}),s.type=`hidden_token`;continue}r===t&&(i=!0)}}return this.updateLines(e,e),a},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent(`themeChange`,{theme:e}),!e||typeof e==`string`){var r=e||this.$options.theme.initialValue;o.loadModule([`theme`,r],a)}else a(e);function a(r){if(n.$themeId!=e)return t&&t();if(!r||!r.cssClass)throw Error(`couldn't load module `+e+` or it didn't call define`);r.$id&&(n.$themeId=r.$id),i.importCssString(r.cssText,r.cssClass,n.container),n.theme&&i.removeCssClass(n.container,n.theme.cssClass);var a=`padding`in r?r.padding:`padding`in(n.theme||{})?4:n.$padding;if(n.$padding&&a!=n.$padding&&n.setPadding(a),n.$gutterLayer){var o=r.$showGutterCursorMarker;o&&!n.$gutterLayer.$showCursorMarker?n.$gutterLayer.$showCursorMarker=`theme`:!o&&n.$gutterLayer.$showCursorMarker==`theme`&&(n.$gutterLayer.$showCursorMarker=null)}n.$theme=r.cssClass,n.theme=r,i.addCssClass(n.container,r.cssClass),i.setCssClass(n.container,`ace_dark`,r.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent(`themeLoaded`,{theme:r}),t&&t(),b.isSafari&&n.scroller&&(n.scroller.style.background=`red`,n.scroller.style.background=``)}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){i.setCssClass(this.container,e,t!==!1)},e.prototype.unsetStyle=function(e){i.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){i.setStyle(this.scroller.style,`cursor`,e)},e.prototype.setMouseCursor=function(e){i.setStyle(this.scroller.style,`cursor`,e)},e.prototype.attachToShadowRoot=function(){i.importCssString(v,`ace_editor.css`,this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=``,this.setOption(`useResizeObserver`,!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),e===!0?(this.scrollBarV=new m(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener(`scroll`,function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener(`scroll`,function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new y(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new f(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.addEventListener(`scroll`,function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)}),this.scrollBarH.addEventListener(`scroll`,function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)}))},e.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var e=this;this.$resizeTimer=a.delayedCall(function(){e.destroyed||e.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(t){var n=t[0].contentRect.width,r=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-r)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},e}();S.prototype.CHANGE_CURSOR=1,S.prototype.CHANGE_MARKER=2,S.prototype.CHANGE_GUTTER=4,S.prototype.CHANGE_SCROLL=8,S.prototype.CHANGE_LINES=16,S.prototype.CHANGE_TEXT=32,S.prototype.CHANGE_SIZE=64,S.prototype.CHANGE_MARKER_BACK=128,S.prototype.CHANGE_MARKER_FRONT=256,S.prototype.CHANGE_FULL=512,S.prototype.CHANGE_H_SCROLL=1024,S.prototype.$changes=0,S.prototype.$padding=null,S.prototype.$frozen=!1,S.prototype.STEPS=8,r.implement(S.prototype,_),o.defineOptions(S.prototype,`renderer`,{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&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(e){typeof e==`number`&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?`block`:`none`,this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){i.setCssClass(this.$gutter,`ace_fade-fold-widgets`,e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){this.$textLayer.setHighlightIndentGuides(e)==1?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){typeof e==`number`&&(e+=`px`),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:`./theme/textmate`,handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=S}),ace.define(`ace/worker/worker_client`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/net`,`ace/lib/event_emitter`,`ace/config`],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/net"),a=e("../lib/event_emitter").EventEmitter,o=e("../config");function s(e){var t=`importScripts('`+i.qualifyURL(e)+`');`;try{return new Blob([t],{type:`application/javascript`})}catch{var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob(`application/javascript`)}}function c(e){if(typeof Worker>`u`)return{postMessage:function(){},terminate:function(){}};if(o.get(`loadWorkerFromBlob`)){var t=s(e),n=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(n)}return new Worker(e)}var l=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,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(){r.implement(this,a),this.$createWorkerFromOldConfig=function(t,n,r,i,a){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),o.get(`packaged`)||!e.toUrl)i||=o.moduleUrl(n,`worker`);else{var s=this.$normalizePath;i||=s(e.toUrl(`ace/worker/worker.js`,null,`_`));var l={};t.forEach(function(t){l[t]=s(e.toUrl(t,null,`_`).replace(/(\.js)?(\?.*)?$/,``))})}return this.$worker=c(i),a&&this.send(`importScripts`,a),this.$worker.postMessage({init:!0,tlns:l,module:n,classname:r}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case`event`:this._signal(t.name,{data:t.data});break;case`call`:var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case`error`:this.reportError(t.data);break;case`log`:window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.qualifyURL(e)},this.terminate=function(){this._signal(`terminate`,{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off(`change`,this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var r=this.callbackId++;this.callbacks[r]=n,t.push(r)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call(`setValue`,[e.getValue()]),e.on(`change`,this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),e.action==`insert`?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call(`setValue`,[this.$doc.getValue()]):this.emit(`change`,{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var r=null,i=!1,s=Object.create(a),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),r&&(i?setTimeout(d):d())}});u.setEmitSync=function(e){i=e};var d=function(){var e=c.shift();e.command?r[e.command].apply(r,e.args):e.event&&s._signal(e.event,e.data)};return s.postMessage=function(e){u.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:`call`,id:t,data:e})},s.emit=function(e,t){this.postMessage({type:`event`,name:e,data:t})},o.loadModule([`worker`,t],function(e){for(r=new e[n](s);c.length;)d()}),u},t.WorkerClient=l,t.createWorker=c}),ace.define(`ace/placeholder`,[`require`,`exports`,`module`,`ace/range`,`ace/lib/event_emitter`,`ace/lib/oop`],function(e,t,n){var r=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,a=e("./lib/oop"),o=function(){function e(e,t,n,r,i,a){var o=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=i,this.othersClass=a,this.$onUpdate=this.onUpdate.bind(this),this.doc.on(`change`,this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var s=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=s.length,this.setup(),e.selection.on(`changeCursor`,this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new r(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),e.others.push(r)}),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=e.addMarker(new r(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n=e.action===`insert`?t.end.column-t.start.column:t.start.column-t.end.column,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,a=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo){if(e.action===`insert`)for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],c={row:s.row,column:s.column+a};this.doc.insertMergedLines(c,e.lines)}else if(e.action===`remove`)for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],c={row:s.row,column:s.column+a};this.doc.remove(new r(c.row,c.column,c.row,c.column-n))}}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,i){t.removeMarker(n.markerId),n.markerId=t.addMarker(new r(n.row,n.column,n.row,n.column+e.length),i,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},e.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))}},e.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},e.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();a.implement(o.prototype,i),t.PlaceHolder=o}),ace.define(`ace/mouse/multi_select_handler`,[`require`,`exports`,`module`,`ace/lib/event`,`ace/lib/useragent`],function(e,t,n){var r=e("../lib/event"),i=e("../lib/useragent");function a(e,t){return e.row==t.row&&e.column==t.column}function o(e){var t=e.domEvent,n=t.altKey,o=t.shiftKey,s=t.ctrlKey,c=e.getAccelKey(),l=e.getButton();if(s&&i.isMac&&(l=t.button),e.editor.inMultiSelectMode&&l==2){e.editor.textInput.onContextMenu(e.domEvent);return}if(!s&&!n&&!c){l===0&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode();return}if(l===0){var u=e.editor,d=u.selection,f=u.inMultiSelectMode,p=e.getDocumentPosition(),m=d.getCursor(),h=e.inSelection()||d.isEmpty()&&a(p,m),g=e.x,_=e.y,v=function(e){g=e.clientX,_=e.clientY},y=u.session,b=u.renderer.pixelToScreenCoordinates(g,_),x=b,S;if(u.$mouseHandler.$enableJumpToDef)s&&n||c&&n?S=o?`block`:`add`:n&&u.$blockSelectEnabled&&(S=`block`);else if(c&&!n){if(S=`add`,!f&&o)return}else n&&u.$blockSelectEnabled&&(S=`block`);if(S&&i.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),S==`add`){if(!f&&h)return;if(!f){var C=d.toOrientedRange();u.addSelectionMarker(C)}var w=d.rangeList.rangeAtPoint(p);u.inVirtualSelectionMode=!0,o&&(w=null,C=d.ranges[0]||C,u.removeSelectionMarker(C)),u.once(`mouseup`,function(){var e=d.toOrientedRange();w&&e.isEmpty()&&a(w.cursor,e.cursor)?d.substractPoint(e.cursor):(o?d.substractPoint(C.cursor):C&&(u.removeSelectionMarker(C),d.addRange(C)),d.addRange(e)),u.inVirtualSelectionMode=!1})}else if(S==`block`){e.stop(),u.inVirtualSelectionMode=!0;var T,E=[],D=function(){var e=u.renderer.pixelToScreenCoordinates(g,_),t=y.screenToDocumentPosition(e.row,e.column,e.offsetX);a(x,e)&&a(t,d.lead)||(x=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(E),E=d.rectangularRangeBlock(x,b),u.$mouseHandler.$clickSelection&&E.length==1&&E[0].isEmpty()&&(E[0]=u.$mouseHandler.$clickSelection.clone()),E.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};f&&!c?d.toSingleRange():!f&&c&&(T=d.toOrientedRange(),u.addSelectionMarker(T)),o?b=y.documentToScreenPosition(d.lead):d.moveToPosition(p),x={row:-1,column:-1};var O=function(e){D(),clearInterval(A),u.removeSelectionMarkers(E),E.length||(E=[d.toOrientedRange()]),T&&(u.removeSelectionMarker(T),d.toSingleRange(T));for(var t=0;t<E.length;t++)d.addRange(E[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null},k=D;r.capture(u.container,v,O);var A=setInterval(function(){k()},20);return e.preventDefault()}}}t.onMouseDown=o}),ace.define(`ace/commands/multi_select_commands`,[`require`,`exports`,`module`,`ace/keyboard/hash_handler`],function(e,t,n){t.defaultCommands=[{name:`addCursorAbove`,description:`Add cursor above`,exec:function(e){e.selectMoreLines(-1)},bindKey:{win:`Ctrl-Alt-Up`,mac:`Ctrl-Alt-Up`},scrollIntoView:`cursor`,readOnly:!0},{name:`addCursorBelow`,description:`Add cursor below`,exec:function(e){e.selectMoreLines(1)},bindKey:{win:`Ctrl-Alt-Down`,mac:`Ctrl-Alt-Down`},scrollIntoView:`cursor`,readOnly:!0},{name:`addCursorAboveSkipCurrent`,description:`Add cursor above (skip current)`,exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:`Ctrl-Alt-Shift-Up`,mac:`Ctrl-Alt-Shift-Up`},scrollIntoView:`cursor`,readOnly:!0},{name:`addCursorBelowSkipCurrent`,description:`Add cursor below (skip current)`,exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:`Ctrl-Alt-Shift-Down`,mac:`Ctrl-Alt-Shift-Down`},scrollIntoView:`cursor`,readOnly:!0},{name:`selectMoreBefore`,description:`Select more before`,exec:function(e){e.selectMore(-1)},bindKey:{win:`Ctrl-Alt-Left`,mac:`Ctrl-Alt-Left`},scrollIntoView:`cursor`,readOnly:!0},{name:`selectMoreAfter`,description:`Select more after`,exec:function(e){e.selectMore(1)},bindKey:{win:`Ctrl-Alt-Right`,mac:`Ctrl-Alt-Right`},scrollIntoView:`cursor`,readOnly:!0},{name:`selectNextBefore`,description:`Select next before`,exec:function(e){e.selectMore(-1,!0)},bindKey:{win:`Ctrl-Alt-Shift-Left`,mac:`Ctrl-Alt-Shift-Left`},scrollIntoView:`cursor`,readOnly:!0},{name:`selectNextAfter`,description:`Select next after`,exec:function(e){e.selectMore(1,!0)},bindKey:{win:`Ctrl-Alt-Shift-Right`,mac:`Ctrl-Alt-Shift-Right`},scrollIntoView:`cursor`,readOnly:!0},{name:`toggleSplitSelectionIntoLines`,description:`Split selection into lines`,exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:`Ctrl-Alt-L`,mac:`Ctrl-Alt-L`},readOnly:!0},{name:`splitSelectionIntoLines`,description:`Split into lines`,exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:`alignCursors`,description:`Align cursors`,exec:function(e){e.alignCursors()},bindKey:{win:`Ctrl-Alt-A`,mac:`Ctrl-Alt-A`},scrollIntoView:`cursor`},{name:`findAll`,description:`Find all`,exec:function(e){e.findAll()},bindKey:{win:`Ctrl-Alt-K`,mac:`Ctrl-Alt-G`},scrollIntoView:`cursor`,readOnly:!0}],t.multiSelectCommands=[{name:`singleSelection`,description:`Single selection`,bindKey:`esc`,exec:function(e){e.exitMultiSelectMode()},scrollIntoView:`cursor`,readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var r=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new r(t.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(e,t,n){var r=e("./range_list").RangeList,i=e("./range").Range,a=e("./selection").Selection,o=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),c=e("./lib/lang"),l=e("./commands/multi_select_commands");t.commands=l.defaultCommands.concat(l.multiSelectCommands);var u=e("./search").Search,d=new u;function f(e,t,n){return d.$options.wrap=!0,d.$options.needle=t,d.$options.backwards=n==-1,d.find(e)}var p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&this.rangeCount===0){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||=e.end;var r=this.rangeList.add(e);return this.$onAddRange(e),r.length&&this.$onRemoveRange(r),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal(`multiSelect`),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e||=this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[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 t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var r=this.ranges.indexOf(e[n]);this.ranges.splice(r,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)),t||=this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new r,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()],t=[],n=0;n<e.length;n++){var r=e[n],a=r.start.row,o=r.end.row;if(a===o)t.push(r.clone());else{for(t.push(new i(a,r.start.column,a,this.session.getLine(a).length));++a<o;)t.push(this.getLineRange(a,!0));t.push(new i(o,0,o,r.end.column))}n==0&&!this.isBackwards()&&(t=t.reverse())}this.toSingleRange();for(var n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=i.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var r=this.session.documentToScreenPosition(this.cursor),a=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(r,a).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var r=[],a=e.column<t.column;if(a)var o=e.column,s=t.column,c=e.offsetX,l=t.offsetX;else var o=t.column,s=e.column,c=t.offsetX,l=e.offsetX;var u=e.row<t.row;if(u)var d=e.row,f=t.row;else var d=t.row,f=e.row;o<0&&(o=0),d<0&&(d=0),d==f&&(n=!0);for(var p,m=d;m<=f;m++){var g=i.fromPoints(this.session.screenToDocumentPosition(m,o,c),this.session.screenToDocumentPosition(m,s,l));if(g.isEmpty()){if(p&&h(g.end,p))break;p=g.end}g.cursor=a?g.start:g.end,r.push(g)}if(u&&r.reverse(),!n){for(var _=r.length-1;r[_].isEmpty()&&_>0;)_--;if(_>0)for(var v=0;r[v].isEmpty();)v++;for(var y=_;y>=v;y--)r[y].isEmpty()&&r.splice(y,1)}return r}}).call(a.prototype);var m=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||=e.end;var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,`ace_selection`,t),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 t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var r=e[n];if(r.marker){this.session.removeMarker(r.marker);var i=t.indexOf(r);i!=-1&&t.splice(i,1)}}this.session.selectionMarkerCount=t.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(l.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(l.keyboardHandler),this.commands.removeDefaultHandler(`exec`,this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit(`changeSelection`))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)t.multiSelectAction==`forEach`?r=n.forEachSelection(t,e.args):t.multiSelectAction==`forEachLine`?r=n.forEachSelection(t,e.args,!0):t.multiSelectAction==`single`?(n.exitMultiSelectMode(),r=t.exec(n,e.args||{})):r=t.multiSelectAction(n,e.args||{});else{var r=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return r}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var r=n&&n.keepOrder,i=n==1||n&&n.$byLines,o=this.session,s=this.selection,c=s.rangeList,l=(r?s:c).ranges,u;if(!l.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var d=s._eventRegistry;s._eventRegistry={};var f=new a(o);this.inVirtualSelectionMode=!0;for(var p=l.length;p--;){if(i)for(;p>0&&l[p].start.row==l[p-1].end.row;)p--;f.fromOrientedRange(l[p]),f.index=p,this.selection=o.selection=f;var m=e.exec?e.exec(this,t||{}):e(this,t||{});!u&&m!==void 0&&(u=m),f.toOrientedRange(l[p])}f.detach(),this.selection=o.selection=s,this.inVirtualSelectionMode=!1,s._eventRegistry=d,s.mergeOverlappingRanges(),s.ranges[0]&&s.fromOrientedRange(s.ranges[0]);var h=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),h&&h.from==h.to&&this.renderer.animateScrolling(h.from),u}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e=``;if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],r=0;r<t.length;r++)n.push(this.session.getTextRange(t[r]));var i=this.session.getDocument().getNewLineCharacter();e=n.join(i),e.length==(n.length-1)*i.length&&(e=``)}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var r=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;r.row!=t.row||this.session.$clipPositionToDocument(r.row,r.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if(t||={},t.needle=e||t.needle,t.needle==null){var r=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(r)}this.$search.set(t);var i=this.$search.findAll(this.session);if(!i.length)return 0;var a=this.multiSelect;n||a.toSingleRange(i[0]);for(var o=i.length;o--;)a.addRange(i[o],!0);return r&&a.rangeList.rangeAtPoint(r.start)&&a.addRange(r,!0),i.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),r=n.cursor==n.end,a=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(a.column=this.selection.$desiredColumn);var o=this.session.screenToDocumentPosition(a.row+e,a.column);if(n.isEmpty())var s=o;else var c=this.session.documentToScreenPosition(r?n.end:n.start),s=this.session.screenToDocumentPosition(c.row+e,c.column);if(r){var l=i.fromPoints(o,s);l.cursor=l.start}else{var l=i.fromPoints(s,o);l.cursor=l.end}if(l.desiredColumn=a.column,!this.selection.inMultiSelectMode)this.selection.addRange(n);else if(t)var u=n.cursor;this.selection.addRange(l),u&&this.selection.substractPoint(u)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,r=n.ranges,i=r.length;i--;){var a=r[i];if(a.isEmpty()){var o=t.getWordRange(a.start.row,a.start.column);a.start.row=o.start.row,a.start.column=o.start.column,a.end.row=o.end.row,a.end.column=o.end.column}}n.mergeOverlappingRanges();for(var s=[],i=r.length;i--;){var a=r[i];s.unshift(t.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(var i=r.length;i--;){var a=r[i],c=a.clone();t.replace(a,s[i]),a.start.row=c.start.row,a.start.column=c.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var r=this.session,i=r.multiSelect.toOrientedRange();if(!(i.isEmpty()&&(i=r.getWordRange(i.start.row,i.start.column),i.cursor=e==-1?i.start:i.end,this.multiSelect.addRange(i),n))){var a=f(r,r.getTextRange(i),e);a&&(a.cursor=e==-1?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(i.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,r=-1,a=n.filter(function(e){if(e.cursor.row==r)return!0;r=e.cursor.row});if(!n.length||a.length==n.length-1){var o=this.selection.getRange(),s=o.start.row,l=o.end.row,u=s==l;if(u){var d=this.session.getLength(),f;do f=this.session.getLine(l);while(/[=:]/.test(f)&&++l<d);do f=this.session.getLine(s);while(/[=:]/.test(f)&&--s>0);s<0&&(s=0),l>=d&&(l=d-1)}var p=this.session.removeFullLines(s,l);p=this.$reAlignText(p,u),this.session.insert({row:s,column:0},p.join(`
|
|
962
|
-
`)+`
|
|
963
|
-
`),u||(o.start.column=0,o.end.column=p[p.length-1].length),this.selection.setRange(o)}else{a.forEach(function(e){t.substractPoint(e.cursor)});var m=0,h=1/0,g=n.map(function(t){var n=t.cursor,r=e.getLine(n.row).substr(n.column).search(/\S/g);return r==-1&&(r=0),n.column>m&&(m=n.column),r<h&&(h=r),r});n.forEach(function(t,n){var r=t.cursor,a=m-r.column,o=g[n]-h;a>o?e.insert(r,c.stringRepeat(` `,a-o)):e.remove(new i(r.row,r.column,r.row,r.column-a+o)),t.start.column=t.end.column=m,t.start.row=t.end.row=r.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(e,t){var n=!0,r=!0,i,a,o;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?i==null?(i=t[1].length,a=t[2].length,o=t[3].length,t):(i+a+o!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(n=!1),i>t[1].length&&(i=t[1].length),a<t[2].length&&(a=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]}).map(t?l:n?r?u:l:d);function s(e){return c.stringRepeat(` `,e)}function l(e){return e[2]?s(i)+e[2]+s(a-e[2].length+o)+e[4].replace(/^([=:])\s+/,`$1 `):e[0]}function u(e){return e[2]?s(i+a-e[2].length)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,`$1 `):e[0]}function d(e){return e[2]?s(i)+e[2]+s(o)+e[4].replace(/^([=:])\s+/,`$1 `):e[0]}}}).call(m.prototype);function h(e,t){return e.row==t.row&&e.column==t.column}t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off(`addRange`,this.$onAddRange),n.multiSelect.off(`removeRange`,this.$onRemoveRange),n.multiSelect.off(`multiSelect`,this.$onMultiSelect),n.multiSelect.off(`singleSelect`,this.$onSingleSelect),n.multiSelect.lead.off(`change`,this.$checkMultiselectChange),n.multiSelect.anchor.off(`change`,this.$checkMultiselectChange)),t&&(t.multiSelect.on(`addRange`,this.$onAddRange),t.multiSelect.on(`removeRange`,this.$onRemoveRange),t.multiSelect.on(`multiSelect`,this.$onMultiSelect),t.multiSelect.on(`singleSelect`,this.$onSingleSelect),t.multiSelect.lead.on(`change`,this.$checkMultiselectChange),t.multiSelect.anchor.on(`change`,this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function g(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=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on(`changeSession`,e.$multiselectOnSessionChange),e.on(`mousedown`,o),e.commands.addCommands(l.defaultCommands),_(e))}function _(e){if(!e.textInput)return;var t=e.textInput.getElement(),n=!1;s.addListener(t,`keydown`,function(t){var i=t.keyCode==18&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&i?n||=(e.renderer.setMouseCursor(`crosshair`),!0):n&&r()},e),s.addListener(t,`keyup`,r,e),s.addListener(t,`blur`,r,e);function r(t){n&&=(e.renderer.setMouseCursor(``),!1)}}t.MultiSelect=g,e("./config").defineOptions(m.prototype,`editor`,{enableMultiselect:{set:function(e){g(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(e,t,n){var r=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);return this.foldingStartMarker.test(r)?`start`:t==`markbeginend`&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?`end`:``},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,a=e.getLine(t),o=a.search(i);if(o!=-1){for(var s=n||a.length,c=e.getLength(),l=t,u=t;++t<c;){var d=e.getLine(t).search(i);if(d!=-1){if(d<=o){var f=e.getTokenAt(t,0);if(!f||f.type!==`string`)break}u=t}}if(u>l){var p=e.getLine(u).length;return new r(l,s,u,p)}}},this.openingBracketBlock=function(e,t,n,i,a){var o={row:n,column:i+1},s=e.$findClosingBracket(t,o,a);if(s){var c=e.foldWidgets[s.row];return c??=e.getFoldWidget(s.row),c==`start`&&s.row>o.row&&(s.row--,s.column=e.getLine(s.row).length),r.fromPoints(o,s)}},this.closingBracketBlock=function(e,t,n,i,a){var o={row:n,column:i},s=e.$findOpeningBracket(t,o);if(s)return s.column++,o.column--,r.fromPoints(s,o)}}).call(i.prototype)}),ace.define(`ace/ext/error_marker`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/range`,`ace/config`],function(e,t,n){var r=e("../lib/dom"),i=e("../range").Range,a=e("../config").nls;function o(e,t,n){for(var r=0,i=e.length-1;r<=i;){var a=r+i>>1,o=n(t,e[a]);if(o>0)r=a+1;else if(o<0)i=a-1;else return a}return-(r+1)}function s(e,t,n){var r=e.getAnnotations().sort(i.comparePoints);if(r.length){var a=o(r,{row:t,column:-1},i.comparePoints);a<0&&(a=-a-1),a>=r.length?a=n>0?0:r.length-1:a===0&&n<0&&(a=r.length-1);var s=r[a];if(!(!s||!n)){if(s.row===t){do s=r[a+=n];while(s&&s.row===t);if(!s)return r.slice()}var c=[];t=s.row;do c[n<0?`unshift`:`push`](s),s=r[a+=n];while(s&&s.row==t);return c.length&&c}}}t.showErrorMarker=function(e,t){var n=e.session,i=e.getCursorPosition(),o=i.row,c=n.widgetManager.getWidgetsAtRow(o).filter(function(e){return e.type==`errorMarker`})[0];c?c.destroy():o-=t;var l=s(n,o,t),u;if(l){var d=l[0];i.column=(d.pos&&typeof d.column!=`number`?d.pos.sc:d.column)||0,i.row=d.row,u=e.renderer.$gutterLayer.$annotations[i.row]}else if(c)return;else u={displayText:[a(`error-marker.good-state`,`Looks good!`)],className:`ace_ok`};e.session.unfold(i.row),e.selection.moveToPosition(i);var f={row:i.row,fixedWidth:!0,coverGutter:!0,el:r.createElement(`div`),type:`errorMarker`},p=f.el.appendChild(r.createElement(`div`)),m=f.el.appendChild(r.createElement(`div`));m.className=`error_widget_arrow `+u.className;var h=e.renderer.$cursorLayer.getPixelPosition(i).left;m.style.left=h+e.renderer.gutterWidth-5+`px`,f.el.className=`error_widget_wrapper`,p.className=`error_widget `+u.className,u.displayText.forEach(function(e,t){p.appendChild(r.createTextNode(e)),t<u.displayText.length-1&&p.appendChild(r.createElement(`br`))}),p.appendChild(r.createElement(`div`));var g=function(e,t,n){if(t===0&&(n===`esc`||n===`return`))return f.destroy(),{command:`null`}};f.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(f),e.off(`changeSelection`,f.destroy),e.off(`changeSession`,f.destroy),e.off(`mouseup`,f.destroy),e.off(`change`,f.destroy))},e.keyBinding.addKeyboardHandler(g),e.on(`changeSelection`,f.destroy),e.on(`changeSession`,f.destroy),e.on(`mouseup`,f.destroy),e.on(`change`,f.destroy),e.session.widgetManager.addLineWidget(f),f.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:f.el.offsetHeight})},r.importCssString(`
|
|
964
|
-
.error_widget_wrapper {
|
|
965
|
-
background: inherit;
|
|
966
|
-
color: inherit;
|
|
967
|
-
border:none
|
|
968
|
-
}
|
|
969
|
-
.error_widget {
|
|
970
|
-
border-top: solid 2px;
|
|
971
|
-
border-bottom: solid 2px;
|
|
972
|
-
margin: 5px 0;
|
|
973
|
-
padding: 10px 40px;
|
|
974
|
-
white-space: pre-wrap;
|
|
975
|
-
}
|
|
976
|
-
.error_widget.ace_error, .error_widget_arrow.ace_error{
|
|
977
|
-
border-color: #ff5a5a
|
|
978
|
-
}
|
|
979
|
-
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
|
|
980
|
-
border-color: #F1D817
|
|
981
|
-
}
|
|
982
|
-
.error_widget.ace_info, .error_widget_arrow.ace_info{
|
|
983
|
-
border-color: #5a5a5a
|
|
984
|
-
}
|
|
985
|
-
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
|
|
986
|
-
border-color: #5aaa5a
|
|
987
|
-
}
|
|
988
|
-
.error_widget_arrow {
|
|
989
|
-
position: absolute;
|
|
990
|
-
border: solid 5px;
|
|
991
|
-
border-top-color: transparent!important;
|
|
992
|
-
border-right-color: transparent!important;
|
|
993
|
-
border-left-color: transparent!important;
|
|
994
|
-
top: -5px;
|
|
995
|
-
}
|
|
996
|
-
`,`error_marker.css`,!1)}),ace.define(`ace/ace`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/range`,`ace/editor`,`ace/edit_session`,`ace/undomanager`,`ace/virtual_renderer`,`ace/worker/worker_client`,`ace/keyboard/hash_handler`,`ace/placeholder`,`ace/multi_select`,`ace/mode/folding/fold_mode`,`ace/theme/textmate`,`ace/ext/error_marker`,`ace/config`,`ace/loader_build`],function(e,t,n){e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,a=e("./editor").Editor,o=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if(typeof e==`string`){var i=e;if(e=document.getElementById(i),!e)throw Error(`ace.edit can't find div #`+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var o=``;if(e&&/input|textarea/i.test(e.tagName)){var s=e;o=s.value,e=r.createElement(`pre`),s.parentNode.replaceChild(e,s)}else e&&(o=e.textContent,e.innerHTML=``);var l=t.createEditSession(o),u=new a(new c(e),l,n),d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),u.on(`destroy`,function(){d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=a,t.EditSession=o,t.UndoManager=s,t.VirtualRenderer=c,t.version=t.config.version}),(function(){ace.require([`ace/ace`],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=(function(){return this})();for(var i in!r&&typeof window<`u`&&(r=window),!r&&typeof self<`u`&&(r=self),r.ace||(r.ace=n),n)n.hasOwnProperty(i)&&(r.ace[i]=n[i]);r.ace.default=r.ace,typeof t==`object`&&typeof e==`object`&&t&&(t.exports=r.ace)})})()}))(),1),YS=[`minLines`,`maxLines`,`readOnly`,`highlightActiveLine`,`tabSize`,`enableBasicAutocompletion`,`enableLiveAutocompletion`,`enableSnippets`],XS=[`onChange`,`onFocus`,`onInput`,`onBlur`,`onCopy`,`onPaste`,`onSelectionChange`,`onCursorChange`,`onScroll`,`handleOptions`,`updateRef`],ZS=()=>{if(typeof window<`u`&&window.ace){let e=window.ace;return e.acequire=e.require||e.acequire,e}return JS.default},QS=(e,t)=>{let n=null;return function(){let r=this,i=arguments;clearTimeout(n),n=setTimeout(()=>{e.apply(r,i)},t)}},{getOwnPropertyNames:$S,getOwnPropertySymbols:eC}=Object,{hasOwnProperty:tC}=Object.prototype;function nC(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function rC(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function iC(e){return e==null?void 0:e[Symbol.toStringTag]}function aC(e){return $S(e).concat(eC(e))}var oC=Object.hasOwn||((e,t)=>tC.call(e,t));function sC(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var cC=`__v`,lC=`__o`,uC=`_owner`,{getOwnPropertyDescriptor:dC,keys:fC}=Object;function pC(e,t){return e.byteLength===t.byteLength&&EC(new Uint8Array(e),new Uint8Array(t))}function mC(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hC(e,t){return e.byteLength===t.byteLength&&EC(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gC(e,t){return sC(e.getTime(),t.getTime())}function _C(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vC(e,t){return e===t}function yC(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var bC=sC;function xC(e,t,n){let r=fC(e),i=r.length;if(fC(t).length!==i)return!1;for(;i-->0;)if(!OC(e,t,n,r[i]))return!1;return!0}function SC(e,t,n){let r=aC(e),i=r.length;if(aC(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!OC(e,t,n,a)||(o=dC(e,a),s=dC(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function CC(e,t){return sC(e.valueOf(),t.valueOf())}function wC(e,t){return e.source===t.source&&e.flags===t.flags}function TC(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function EC(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function DC(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function OC(e,t,n,r){return(r===uC||r===lC||r===cC)&&(e.$$typeof||t.$$typeof)?!0:oC(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var kC=`[object ArrayBuffer]`,AC=`[object Arguments]`,jC=`[object Boolean]`,MC=`[object DataView]`,NC=`[object Date]`,PC=`[object Error]`,FC=`[object Map]`,IC=`[object Number]`,LC=`[object Object]`,RC=`[object RegExp]`,zC=`[object Set]`,BC=`[object String]`,VC={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},HC=`[object URL]`,UC=Object.prototype.toString;function WC({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=UC.call(h);if(b===NC)return r(h,g,_);if(b===RC)return u(h,g,_);if(b===FC)return o(h,g,_);if(b===zC)return d(h,g,_);if(b===LC)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===HC)return p(h,g,_);if(b===PC)return i(h,g,_);if(b===AC)return c(h,g,_);if(VC[b])return f(h,g,_);if(b===kC)return e(h,g,_);if(b===MC)return n(h,g,_);if(b===jC||b===IC||b===BC)return l(h,g,_);if(m){let e=m[b];if(!e){let t=iC(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function GC({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:pC,areArraysEqual:n?SC:mC,areDataViewsEqual:hC,areDatesEqual:gC,areErrorsEqual:_C,areFunctionsEqual:vC,areMapsEqual:n?nC(yC,SC):yC,areNumbersEqual:bC,areObjectsEqual:n?SC:xC,arePrimitiveWrappersEqual:CC,areRegExpsEqual:wC,areSetsEqual:n?nC(TC,SC):TC,areTypedArraysEqual:n?nC(EC,SC):EC,areUrlsEqual:DC,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=rC(r.areArraysEqual),t=rC(r.areMapsEqual),n=rC(r.areObjectsEqual),i=rC(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function KC(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function qC({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var JC=YC();YC({strict:!0}),YC({circular:!0}),YC({circular:!0,strict:!0}),YC({createInternalComparator:()=>sC}),YC({strict:!0,createInternalComparator:()=>sC}),YC({circular:!0,createInternalComparator:()=>sC}),YC({circular:!0,createInternalComparator:()=>sC,strict:!0});function YC(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=WC(GC(e));return qC({circular:t,comparator:a,createState:r,equals:n?n(a):KC(a),strict:i})}var $=n(Ee(),1);g();var XC=ZS(),ZC=class extends s{constructor(e){super(e),XS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=QS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,onValidate:n,mode:r,focus:i,theme:a,fontSize:o,lineHeight:s,value:c,defaultValue:l,showGutter:u,wrapEnabled:d,showPrintMargin:f,scrollMargin:p=[0,0,0,0],keyboardHandler:m,onLoad:h,commands:g,annotations:_,markers:v,placeholder:y}=this.props;this.editor=XC.edit(this.refEditor),t&&t(XC);let b=Object.keys(this.props.editorProps);for(let e=0;e<b.length;e++)this.editor[b[e]]=this.props.editorProps[b[e]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(p[0],p[1],p[2],p[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof r==`string`?`ace/mode/${r}`:r),a&&a!==``&&this.editor.setTheme(`ace/theme/${a}`),this.editor.setFontSize(typeof o==`number`?`${o}px`:o),s&&(this.editor.container.style.lineHeight=typeof s==`number`?`${s}px`:`${s}`,this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(l||c||``),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(u),this.editor.getSession().setUseWrapMode(d),this.editor.setShowPrintMargin(f),this.editor.on(`focus`,this.onFocus),this.editor.on(`blur`,this.onBlur),this.editor.on(`copy`,this.onCopy),this.editor.on(`paste`,this.onPaste),this.editor.on(`change`,this.onChange),this.editor.on(`input`,this.onInput),y&&this.updatePlaceholder(),this.editor.getSession().selection.on(`changeSelection`,this.onSelectionChange),this.editor.getSession().selection.on(`changeCursor`,this.onCursorChange),n&&this.editor.getSession().on(`changeAnnotation`,()=>{let e=this.editor.getSession().getAnnotations();this.props.onValidate(e)}),this.editor.session.on(`changeScrollTop`,this.onScroll),this.editor.getSession().setAnnotations(_||[]),v&&v.length>0&&this.handleMarkers(v);let x=this.editor.$options;YS.forEach(e=>{x.hasOwnProperty(e)?this.editor.setOption(e,this.props[e]):this.props[e]&&console.warn(`ReactAce: editor option ${e} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`)}),this.handleOptions(this.props),Array.isArray(g)&&g.forEach(e=>{typeof e.exec==`string`?this.editor.commands.bindKey(e.bindKey,e.exec):this.editor.commands.addCommand(e)}),m&&this.editor.setKeyboardHandler(`ace/keyboard/`+m),e&&(this.refEditor.className+=` `+e),h&&h(this.editor),this.editor.resize(),i&&this.editor.focus()}componentDidUpdate(e){let t=e,n=this.props;for(let e=0;e<YS.length;e++){let r=YS[e];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}let r=this.editor&&n.value!=null&&this.editor.getValue()!==n.value;if(r){this.silent=!0;let e=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(e),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode(typeof n.mode==`string`?`ace/mode/${n.mode}`:n.mode),n.theme!==t.theme&&this.editor.setTheme(`ace/theme/`+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize(typeof n.fontSize==`number`?`${n.fontSize}px`:n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight=typeof n.lineHeight==`number`?`${n.lineHeight}px`:n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),JC(n.setOptions,t.setOptions)||this.handleOptions(n),(r||!JC(n.annotations,t.annotations))&&this.editor.getSession().setAnnotations(n.annotations||[]);let i=t.markers||[],a=n.markers||[];JC(i,a)||this.handleMarkers(a),JC(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),(e.height!==this.props.height||e.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()}handleScrollMargins(e=[0,0,0,0]){this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])}componentWillUnmount(){this.editor&&=(this.editor.destroy(),null)}onChange(e){if(this.editor&&this.props.onChange&&!this.silent){let t=this.editor.getValue();this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=this.editor.getSelection();this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=this.editor.getSelection();this.props.onCursorChange(t,e)}}onInput(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()}onFocus(e){this.props.onFocus&&this.props.onFocus(e,this.editor)}onBlur(e){this.props.onBlur&&this.props.onBlur(e,this.editor)}onCopy({text:e}){this.props.onCopy&&this.props.onCopy(e)}onPaste({text:e}){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e){let t=Object.keys(e.setOptions);for(let n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])}handleMarkers(e){let t=this.editor.getSession().getMarkers(!0);for(let e in t)t.hasOwnProperty(e)&&this.editor.getSession().removeMarker(t[e].id);t=this.editor.getSession().getMarkers(!1);for(let e in t)t.hasOwnProperty(e)&&t[e].clazz!==`ace_active-line`&&t[e].clazz!==`ace_selected-word`&&this.editor.getSession().removeMarker(t[e].id);e.forEach(({startRow:e,startCol:t,endRow:n,endCol:r,className:i,type:a,inFront:o=!1})=>{let s=new JS.Range(e,t,n,r);this.editor.getSession().addMarker(s,i,a,o)})}updatePlaceholder(){let e=this.editor,{placeholder:t}=this.props,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?(r=e.renderer.placeholderNode=document.createElement(`div`),r.textContent=t||``,r.className=`ace_comment ace_placeholder`,r.style.padding=`0 9px`,r.style.position=`absolute`,r.style.zIndex=`3`,e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};ZC.propTypes={mode:$.default.oneOfType([$.default.string,$.default.object]),focus:$.default.bool,theme:$.default.string,name:$.default.string,className:$.default.string,height:$.default.string,width:$.default.string,fontSize:$.default.oneOfType([$.default.number,$.default.string]),lineHeight:$.default.oneOfType([$.default.number,$.default.string]),showGutter:$.default.bool,onChange:$.default.func,onCopy:$.default.func,onPaste:$.default.func,onFocus:$.default.func,onInput:$.default.func,onBlur:$.default.func,onScroll:$.default.func,value:$.default.string,defaultValue:$.default.string,onLoad:$.default.func,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,onValidate:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,debounceChangePeriod:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableSnippets:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),navigateToFileEnd:$.default.bool,commands:$.default.array,placeholder:$.default.string},ZC.defaultProps={name:`ace-editor`,focus:!1,mode:``,theme:``,height:`500px`,width:`500px`,fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0};var QC=r(((e,t)=>{ace.define(`ace/split`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/editor`,`ace/virtual_renderer`,`ace/edit_session`],function(e,t,n){var r=e("./lib/oop");e("./lib/lang");var i=e("./lib/event_emitter").EventEmitter,a=e("./editor").Editor,o=e("./virtual_renderer").VirtualRenderer,s=e("./edit_session").EditSession,c=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS=``,this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on(`focus`,function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement(`div`);e.className=this.$editorCSS,e.style.cssText=`position: absolute; top:0px; bottom:0px`,this.$container.appendChild(e);var t=new a(new o(e,this.$theme));return t.on(`focus`,function(){this._emit(`focus`,t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw`The number of splits have to be > 0!`;if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize=``,this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n=t==null?this.$cEditor:this.$editors[t];return this.$editors.some(function(t){return t.session===e})&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE)for(var r=e/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+`px`,n.container.style.top=`0px`,n.container.style.left=i*r+`px`,n.container.style.height=t+`px`,n.resize();else for(var a=t/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+`px`,n.container.style.top=i*a+`px`,n.container.style.left=`0px`,n.container.style.height=a+`px`,n.resize()}}).call(c.prototype),t.Split=c}),ace.define(`ace/ext/split`,[`require`,`exports`,`module`,`ace/ext/split`,`ace/split`],function(e,t,n){n.exports=e("../split")}),(function(){ace.require([`ace/ext/split`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g();var $C=n(QC(),1),ew=ZS(),{Split:tw}=$C.default,nw=class extends s{constructor(e){super(e),XS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=QS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,mode:n,focus:r,theme:i,fontSize:a,value:o,defaultValue:s,cursorStart:c,showGutter:l,wrapEnabled:u,showPrintMargin:d,scrollMargin:f=[0,0,0,0],keyboardHandler:p,onLoad:m,commands:h,annotations:g,markers:_,splits:v}=this.props;this.editor=ew.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme(`ace/theme/${i}`),t&&t(ew);let y=Object.keys(this.props.editorProps),b=new tw(this.editor.container,`ace/theme/${i}`,v);this.editor.env.split=b,this.splitEditor=b.getEditor(0),this.split=b,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);let x=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),b.forEach((e,t)=>{for(let t=0;t<y.length;t++)e[y[t]]=this.props.editorProps[y[t]];let r=s==null?void 0:s[t],m=(o==null?void 0:o[t])??``;e.session.setUndoManager(new ew.UndoManager),e.setTheme(`ace/theme/${i}`),e.renderer.setScrollMargin(f[0],f[1],f[2],f[3]),e.getSession().setMode(`ace/mode/${n}`),e.setFontSize(a),e.renderer.setShowGutter(l),e.getSession().setUseWrapMode(u),e.setShowPrintMargin(d),e.on(`focus`,e=>this.onFocus(e,t)),e.on(`blur`,this.onBlur),e.on(`input`,this.onInput),e.on(`copy`,this.onCopy),e.on(`paste`,this.onPaste),e.on(`change`,this.onChange),e.getSession().selection.on(`changeSelection`,this.onSelectionChange),e.getSession().selection.on(`changeCursor`,this.onCursorChange),e.session.on(`changeScrollTop`,this.onScroll),e.setValue(r===void 0?m:r,c);let v=(g==null?void 0:g[t])??[],b=(_==null?void 0:_[t])??[];e.getSession().setAnnotations(v),b&&b.length>0&&this.handleMarkers(b,e);for(let t=0;t<YS.length;t++){let n=YS[t];x.hasOwnProperty(n)?e.setOption(n,this.props[n]):this.props[n]&&console.warn(`ReactAce: editor option ${n} was activated but not found. Did you need to import a related tool or did you possibly misspell the option?`)}this.handleOptions(this.props,e),Array.isArray(h)&&h.forEach(t=>{typeof t.exec==`string`?e.commands.bindKey(t.bindKey,t.exec):e.commands.addCommand(t)}),p&&e.setKeyboardHandler(`ace/keyboard/`+p)}),e&&(this.refEditor.className+=` `+e),r&&this.splitEditor.focus();let S=this.editor.env.split;S.setOrientation(this.props.orientation===`below`?S.BELOW:S.BESIDE),S.resize(!0),m&&m(S)}componentDidUpdate(e){let t=e,n=this.props,r=this.editor.env.split;if(n.splits!==t.splits&&r.setSplits(n.splits),n.orientation!==t.orientation&&r.setOrientation(n.orientation===`below`?r.BELOW:r.BESIDE),r.forEach((e,r)=>{var i,a,o,s,c;n.mode!==t.mode&&e.getSession().setMode(`ace/mode/`+n.mode),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?e.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):e.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&e.setFontSize(n.fontSize),n.wrapEnabled!==t.wrapEnabled&&e.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&e.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&e.renderer.setShowGutter(n.showGutter);for(let r=0;r<YS.length;r++){let i=YS[r];n[i]!==t[i]&&e.setOption(i,n[i])}JC(n.setOptions,t.setOptions)||this.handleOptions(n,e);let l=((i=n.value)==null?void 0:i[r])??``;if(e.getValue()!==l){this.silent=!0;let t=e.session.selection.toJSON();e.setValue(l,n.cursorStart),e.session.selection.fromJSON(t),this.silent=!1}let u=((a=n.annotations)==null?void 0:a[r])??[];JC(u,((o=t.annotations)==null?void 0:o[r])??[])||e.getSession().setAnnotations(u);let d=((s=n.markers)==null?void 0:s[r])??[];!JC(d,((c=t.markers)==null?void 0:c[r])??[])&&Array.isArray(d)&&this.handleMarkers(d,e)}),n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}n.theme!==t.theme&&r.setTheme(`ace/theme/`+n.theme),n.focus&&!t.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()}componentWillUnmount(){this.editor.destroy(),this.editor=null}onChange(e){if(this.props.onChange&&!this.silent){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getValue())}),this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onCursorChange(t,e)}}onFocus(e,t){this.props.onFocus&&this.props.onFocus(e,t)}onInput(e){this.props.onInput&&this.props.onInput(e)}onBlur(e){this.props.onBlur&&this.props.onBlur(e)}onCopy(e){this.props.onCopy&&this.props.onCopy(e)}onPaste(e){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e,t){let n=Object.keys(e.setOptions);for(let r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])}handleMarkers(e,t){let n=t.getSession().getMarkers(!0);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);n=t.getSession().getMarkers(!1);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);e.forEach(({startRow:e,startCol:n,endRow:r,endCol:i,className:a,type:o,inFront:s=!1})=>{let c=new JS.Range(e,n,r,i);t.getSession().addMarker(c,a,o,s)})}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};nw.propTypes={className:$.default.string,debounceChangePeriod:$.default.number,defaultValue:$.default.arrayOf($.default.string),focus:$.default.bool,fontSize:$.default.oneOfType([$.default.number,$.default.string]),height:$.default.string,mode:$.default.string,name:$.default.string,onBlur:$.default.func,onChange:$.default.func,onCopy:$.default.func,onFocus:$.default.func,onInput:$.default.func,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,orientation:$.default.string,showGutter:$.default.bool,splits:$.default.number,theme:$.default.string,value:$.default.arrayOf($.default.string),width:$.default.string,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),commands:$.default.array},nw.defaultProps={name:`ace-editor`,focus:!1,orientation:`beside`,splits:2,mode:``,theme:``,height:`500px`,width:`500px`,value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};var rw=r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
|
|
997
|
-
`,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&`).replace(o,`<`).replace(s,`>`).replace(c,`¶<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p)}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
|
|
998
|
-
`),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
|
|
999
|
-
`],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `}n[s+1]=o+encodeURI(this.diffs[s][1])+`
|
|
1000
|
-
`}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}));g();var iw=n(rw(),1),aw=class extends s{constructor(e){super(e),this.state={value:this.props.value},this.onChange=this.onChange.bind(this),this.diff=this.diff.bind(this)}componentDidUpdate(){let{value:e}=this.props;e!==this.state.value&&this.setState({value:e})}onChange(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)}diff(){let e=new iw.default,t=this.state.value[0],n=this.state.value[1];if(t.length===0&&n.length===0)return[];let r=e.diff_main(t,n);e.diff_cleanupSemantic(r);let i=this.generateDiffedLines(r);return this.setCodeMarkers(i)}generateDiffedLines(e){let t={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},n={left:[],right:[]},r={left:1,right:1};return e.forEach(e=>{let i=e[0],a=e[1],o=a.split(`
|
|
1001
|
-
`).length-1;if(a.length===0)return;let s=a[0],c=a[a.length-1],l=0;switch(i){case t.DIFF_EQUAL:r.left+=o,r.right+=o;break;case t.DIFF_DELETE:s===`
|
|
1002
|
-
`&&(r.left++,o--),l=o,l===0&&n.right.push({startLine:r.right,endLine:r.right}),c===`
|
|
1003
|
-
`&&--l,n.left.push({startLine:r.left,endLine:r.left+l}),r.left+=o;break;case t.DIFF_INSERT:s===`
|
|
1004
|
-
`&&(r.right++,o--),l=o,l===0&&n.left.push({startLine:r.left,endLine:r.left}),c===`
|
|
1005
|
-
`&&--l,n.right.push({startLine:r.right,endLine:r.right+l}),r.right+=o;break;default:throw Error(`Diff type was not defined.`)}}),n}setCodeMarkers(e={left:[],right:[]}){let t=[],n={left:[],right:[]};for(let t=0;t<e.left.length;t++){let r={startRow:e.left[t].startLine-1,endRow:e.left[t].endLine,type:`text`,className:`codeMarker`};n.left.push(r)}for(let t=0;t<e.right.length;t++){let r={startRow:e.right[t].startLine-1,endRow:e.right[t].endLine,type:`text`,className:`codeMarker`};n.right.push(r)}return t[0]=n.left,t[1]=n.right,t}render(){let e=this.diff();return w(nw,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})}};aw.propTypes={cursorStart:$.default.number,editorProps:$.default.object,enableBasicAutocompletion:$.default.bool,enableLiveAutocompletion:$.default.bool,focus:$.default.bool,fontSize:$.default.number,height:$.default.string,highlightActiveLine:$.default.bool,maxLines:$.default.number,minLines:$.default.number,mode:$.default.string,name:$.default.string,className:$.default.string,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,onChange:$.default.func,orientation:$.default.string,readOnly:$.default.bool,scrollMargin:$.default.array,setOptions:$.default.object,showGutter:$.default.bool,showPrintMargin:$.default.bool,splits:$.default.number,style:$.default.object,tabSize:$.default.number,theme:$.default.string,value:$.default.array,width:$.default.string,wrapEnabled:$.default.bool},aw.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:`500px`,highlightActiveLine:!0,maxLines:null,minLines:null,mode:``,name:`ace-editor`,onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:`beside`,readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:`github`,value:[``,``],width:`500px`,wrapEnabled:!0};var ow=ZC,sw=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json_highlight_rules`).JsonHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(l,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/json_worker`,`JsonWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/json`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/json`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),cw=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/json5_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/json_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./json_highlight_rules`).JsonHighlightRules,a=function(){i.call(this);var e=[{token:`variable`,regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:`variable`,regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:`constant.language.boolean`,regex:/(?:null)\b/},{token:`string`,regex:/'/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/'|$/,next:`start`},{defaultToken:`string`}]},{token:`string`,regex:/"(?![^"]*":)/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/"|$/,next:`start`},{defaultToken:`string`}]},{token:`constant.numeric`,regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(a,i),t.Json5HighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json5`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json5_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json5_highlight_rules`).Json5HighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(c,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id=`ace/mode/json5`}.call(c.prototype),t.Mode=c}),(function(){ace.require([`ace/mode/json5`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),lw=r(((e,t)=>{ace.define(`ace/mode/yaml_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`comment`,regex:`#.*$`},{token:`list.markup`,regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:`list.markup`,regex:/^\s*[\-?](?:$|\s)/},{token:`constant`,regex:`!![\\w//]+`},{token:`constant.language`,regex:`[&\\*][a-zA-Z0-9-_]+`},{token:[`meta.tag`,`keyword`],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:[`meta.tag`,`keyword`],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:`keyword.operator`,regex:`<<\\w*:\\w*`},{token:`keyword.operator`,regex:`-\\s*(?=[{])`},{token:`string`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]`},{token:`string`,regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,``);var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,``).length,a=parseInt(/\d+[\s+-]*$/.exec(r));return a?(i+=a-1,this.next=`mlString`):this.next=`mlStringPre`,n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:`mlString`},{token:`string`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`constant.numeric`,regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:`constant.numeric`,regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:`constant.language.boolean`,regex:`\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`text`,regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]=`mlString`),this.token},next:`mlString`},{defaultToken:`string`}],mlString:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.splice(0)):this.next=`mlString`,this.token},next:`mlString`},{token:`string`,regex:`.+`}]},this.normalizeRules()};r.inherits(a,i),t.YamlHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/coffee`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/fold_mode`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./fold_mode`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i!=-1&&r[i]==`#`){for(var o=r.length,s=e.getLength(),c=t,l=t;++t<s;){r=e.getLine(t);var u=r.search(n);if(u!=-1){if(r[u]!=`#`)break;l=t}}if(l>c){var d=e.getLine(l).length;return new a(c,o,l,d)}}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r||(r=this.commentBlock(e,n),r))return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/folding/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/coffee`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./coffee`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=/\S/,i=e.getLine(n),o=i.search(r),s=i[o]===`#`,c=i[o]===`-`;if(o!=-1){var l=i.length,u=e.getLength(),d=n,f=n;if(s){var p=this.commentBlock(e,n);if(p)return p}else if(c){var p=this.indentationBlock(e,n);if(p)return p}else for(;++n<u;){var i=e.getLine(n),m=i.search(r);if(m!=-1){if(m<=o&&i[o]!==`-`){var h=e.getTokenAt(n,0);if(!h||h.type!==`string`)break}f=n}}if(f>d){var g=e.getLine(f).length;return new a(d,l,f,g)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/),l=r[i]===`-`;if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i||s!=-1&&s==i&&l?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/yaml_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/yaml`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./yaml_highlight_rules`).YamlHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/yaml`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(l,i),function(){this.lineCommentStart=[`#`],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/yaml_worker`,`YamlWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/yaml`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/yaml`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),uw=r(((e,t)=>{ace.define(`ace/theme/clouds_midnight-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-clouds-midnight .ace_gutter {
|
|
1006
|
-
background: #232323;
|
|
1007
|
-
color: #929292
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
.ace-clouds-midnight .ace_print-margin {
|
|
1011
|
-
width: 1px;
|
|
1012
|
-
background: #232323
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
.ace-clouds-midnight {
|
|
1016
|
-
background-color: #191919;
|
|
1017
|
-
color: #929292
|
|
1018
|
-
}
|
|
1019
|
-
|
|
1020
|
-
.ace-clouds-midnight .ace_cursor {
|
|
1021
|
-
color: #7DA5DC
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
.ace-clouds-midnight .ace_marker-layer .ace_selection {
|
|
1025
|
-
background: #000000
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {
|
|
1029
|
-
box-shadow: 0 0 3px 0px #191919;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
.ace-clouds-midnight .ace_marker-layer .ace_step {
|
|
1033
|
-
background: rgb(102, 82, 0)
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
.ace-clouds-midnight .ace_marker-layer .ace_bracket {
|
|
1037
|
-
margin: -1px 0 0 -1px;
|
|
1038
|
-
border: 1px solid #BFBFBF
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
.ace-clouds-midnight .ace_marker-layer .ace_active-line {
|
|
1042
|
-
background: rgba(215, 215, 215, 0.031)
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
.ace-clouds-midnight .ace_gutter-active-line {
|
|
1046
|
-
background-color: rgba(215, 215, 215, 0.031)
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
.ace-clouds-midnight .ace_marker-layer .ace_selected-word {
|
|
1050
|
-
border: 1px solid #000000
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.ace-clouds-midnight .ace_invisible {
|
|
1054
|
-
color: #666
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
.ace-clouds-midnight .ace_keyword,
|
|
1058
|
-
.ace-clouds-midnight .ace_meta,
|
|
1059
|
-
.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {
|
|
1060
|
-
color: #927C5D
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
.ace-clouds-midnight .ace_keyword.ace_operator {
|
|
1064
|
-
color: #4B4B4B
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {
|
|
1068
|
-
color: #366F1A
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
.ace-clouds-midnight .ace_constant.ace_language {
|
|
1072
|
-
color: #39946A
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
.ace-clouds-midnight .ace_constant.ace_numeric {
|
|
1076
|
-
color: #46A609
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
.ace-clouds-midnight .ace_constant.ace_character.ace_entity {
|
|
1080
|
-
color: #A165AC
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
.ace-clouds-midnight .ace_invalid {
|
|
1084
|
-
color: #FFFFFF;
|
|
1085
|
-
background-color: #E92E2E
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
.ace-clouds-midnight .ace_fold {
|
|
1089
|
-
background-color: #927C5D;
|
|
1090
|
-
border-color: #929292
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
.ace-clouds-midnight .ace_storage,
|
|
1094
|
-
.ace-clouds-midnight .ace_support.ace_class,
|
|
1095
|
-
.ace-clouds-midnight .ace_support.ace_function,
|
|
1096
|
-
.ace-clouds-midnight .ace_support.ace_other,
|
|
1097
|
-
.ace-clouds-midnight .ace_support.ace_type {
|
|
1098
|
-
color: #E92E2E
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
.ace-clouds-midnight .ace_string {
|
|
1102
|
-
color: #5D90CD
|
|
1103
|
-
}
|
|
1104
|
-
|
|
1105
|
-
.ace-clouds-midnight .ace_comment {
|
|
1106
|
-
color: #3C403B
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
|
-
.ace-clouds-midnight .ace_entity.ace_name.ace_tag,
|
|
1110
|
-
.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {
|
|
1111
|
-
color: #606060
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
.ace-clouds-midnight .ace_indent-guide {
|
|
1115
|
-
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
.ace-clouds-midnight .ace_indent-guide-active {
|
|
1119
|
-
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1120
|
-
}
|
|
1121
|
-
`}),ace.define(`ace/theme/clouds_midnight`,[`require`,`exports`,`module`,`ace/theme/clouds_midnight-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!0,t.cssClass=`ace-clouds-midnight`,t.cssText=e(`./clouds_midnight-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/clouds_midnight`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),dw=r(((e,t)=>{ace.define(`ace/theme/chrome-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-chrome .ace_gutter {
|
|
1122
|
-
background: #ebebeb;
|
|
1123
|
-
color: #333;
|
|
1124
|
-
overflow : hidden;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
.ace-chrome .ace_print-margin {
|
|
1128
|
-
width: 1px;
|
|
1129
|
-
background: #e8e8e8;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
.ace-chrome {
|
|
1133
|
-
background-color: #FFFFFF;
|
|
1134
|
-
color: black;
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
.ace-chrome .ace_cursor {
|
|
1138
|
-
color: black;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
.ace-chrome .ace_invisible {
|
|
1142
|
-
color: rgb(191, 191, 191);
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
.ace-chrome .ace_constant.ace_buildin {
|
|
1146
|
-
color: rgb(88, 72, 246);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
.ace-chrome .ace_constant.ace_language {
|
|
1150
|
-
color: rgb(88, 92, 246);
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
.ace-chrome .ace_constant.ace_library {
|
|
1154
|
-
color: rgb(6, 150, 14);
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
.ace-chrome .ace_invalid {
|
|
1158
|
-
background-color: rgb(153, 0, 0);
|
|
1159
|
-
color: white;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
.ace-chrome .ace_fold {
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
.ace-chrome .ace_support.ace_function {
|
|
1166
|
-
color: rgb(60, 76, 114);
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
.ace-chrome .ace_support.ace_constant {
|
|
1170
|
-
color: rgb(6, 150, 14);
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
|
-
.ace-chrome .ace_support.ace_type,
|
|
1174
|
-
.ace-chrome .ace_support.ace_class
|
|
1175
|
-
.ace-chrome .ace_support.ace_other {
|
|
1176
|
-
color: rgb(109, 121, 222);
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
.ace-chrome .ace_variable.ace_parameter {
|
|
1180
|
-
font-style:italic;
|
|
1181
|
-
color:#FD971F;
|
|
1182
|
-
}
|
|
1183
|
-
.ace-chrome .ace_keyword.ace_operator {
|
|
1184
|
-
color: rgb(104, 118, 135);
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
.ace-chrome .ace_comment {
|
|
1188
|
-
color: #236e24;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
.ace-chrome .ace_comment.ace_doc {
|
|
1192
|
-
color: #236e24;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
.ace-chrome .ace_comment.ace_doc.ace_tag {
|
|
1196
|
-
color: #236e24;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
.ace-chrome .ace_constant.ace_numeric {
|
|
1200
|
-
color: rgb(0, 0, 205);
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
.ace-chrome .ace_variable {
|
|
1204
|
-
color: rgb(49, 132, 149);
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
.ace-chrome .ace_xml-pe {
|
|
1208
|
-
color: rgb(104, 104, 91);
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
.ace-chrome .ace_entity.ace_name.ace_function {
|
|
1212
|
-
color: #0000A2;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
.ace-chrome .ace_heading {
|
|
1217
|
-
color: rgb(12, 7, 255);
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
.ace-chrome .ace_list {
|
|
1221
|
-
color:rgb(185, 6, 144);
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
.ace-chrome .ace_marker-layer .ace_selection {
|
|
1225
|
-
background: rgb(181, 213, 255);
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
.ace-chrome .ace_marker-layer .ace_step {
|
|
1229
|
-
background: rgb(252, 255, 0);
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
.ace-chrome .ace_marker-layer .ace_stack {
|
|
1233
|
-
background: rgb(164, 229, 101);
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
.ace-chrome .ace_marker-layer .ace_bracket {
|
|
1237
|
-
margin: -1px 0 0 -1px;
|
|
1238
|
-
border: 1px solid rgb(192, 192, 192);
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
.ace-chrome .ace_marker-layer .ace_active-line {
|
|
1242
|
-
background: rgba(0, 0, 0, 0.07);
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
.ace-chrome .ace_gutter-active-line {
|
|
1246
|
-
background-color : #dcdcdc;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
.ace-chrome .ace_marker-layer .ace_selected-word {
|
|
1250
|
-
background: rgb(250, 250, 255);
|
|
1251
|
-
border: 1px solid rgb(200, 200, 250);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.ace-chrome .ace_storage,
|
|
1255
|
-
.ace-chrome .ace_keyword,
|
|
1256
|
-
.ace-chrome .ace_meta.ace_tag {
|
|
1257
|
-
color: rgb(147, 15, 128);
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
.ace-chrome .ace_string.ace_regex {
|
|
1261
|
-
color: rgb(255, 0, 0)
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
.ace-chrome .ace_string {
|
|
1265
|
-
color: #1A1AA6;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
.ace-chrome .ace_entity.ace_other.ace_attribute-name {
|
|
1269
|
-
color: #994409;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
.ace-chrome .ace_indent-guide {
|
|
1273
|
-
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
.ace-chrome .ace_indent-guide-active {
|
|
1277
|
-
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
1278
|
-
}
|
|
1279
|
-
`}),ace.define(`ace/theme/chrome`,[`require`,`exports`,`module`,`ace/theme/chrome-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-chrome`,t.cssText=e(`./chrome-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/chrome`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),fw=r(((e,t)=>{ace.define(`ace/snippets`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/lang`,`ace/range`,`ace/range_list`,`ace/keyboard/hash_handler`,`ace/tokenizer`,`ace/clipboard`,`ace/editor`],function(e,t,n){function r(e){var t=new Date().toLocaleString(`en-us`,e);return t.length==1?`0`+t:t}var i=e(`./lib/dom`),a=e(`./lib/oop`),o=e(`./lib/event_emitter`).EventEmitter,s=e(`./lib/lang`),c=e(`./range`).Range,l=e(`./range_list`).RangeList,u=e(`./keyboard/hash_handler`).HashHandler,d=e(`./tokenizer`).Tokenizer,f=e(`./clipboard`),p={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,`
|
|
1280
|
-
`+n+`$1`):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?`YES`:`NO`},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return f.getText&&f.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,``)},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,``)},FILEPATH:function(e){return`/not implemented.txt`},WORKSPACE_NAME:function(){return`Unknown`},FULLNAME:function(){return`Unknown`},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||``},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||``},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||``},CURRENT_YEAR:r.bind(null,{year:`numeric`}),CURRENT_YEAR_SHORT:r.bind(null,{year:`2-digit`}),CURRENT_MONTH:r.bind(null,{month:`numeric`}),CURRENT_MONTH_NAME:r.bind(null,{month:`long`}),CURRENT_MONTH_NAME_SHORT:r.bind(null,{month:`short`}),CURRENT_DATE:r.bind(null,{day:`2-digit`}),CURRENT_DAY_NAME:r.bind(null,{weekday:`long`}),CURRENT_DAY_NAME_SHORT:r.bind(null,{weekday:`short`}),CURRENT_HOUR:r.bind(null,{hour:`2-digit`,hour12:!1}),CURRENT_MINUTE:r.bind(null,{minute:`2-digit`}),CURRENT_SECOND:r.bind(null,{second:`2-digit`})};p.SELECTED_TEXT=p.SELECTION;var m=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return`(?:[^\\\\`+e+`]|\\\\.)`}var r={regex:`/(`+n(`/`)+`+)/`,onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag=``,``},next:`formatString`};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return(r==`}`&&n.length||"`$\\".indexOf(r)!=-1)&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:`snippetVar`},{regex:/\n/,token:`newline`,merge:!1}],snippetVar:[{regex:`\\|`+n(`\\|`)+`*\\|`,onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:`\0`}).split(`\0`).map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:`start`},r,{regex:`([^:}\\\\]|\\\\.)*:?`,token:``,next:`start`}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):`:`}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r==`}`&&n.length?e=r:"`$\\".indexOf(r)==-1?r==`n`?e=`
|
|
1281
|
-
`:r==`t`?e=` `:`ulULE`.indexOf(r)!=-1&&(e={changeCase:r,local:r>`a`}):e=r,[e]}},{regex:`/\\w*}`,onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?`start`:``,[r||e]},next:`start`},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:`formatStringVar`},{regex:/\n/,token:`newline`,merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?`start`:``,[r||e]},next:`start`}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:`formatString`},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]==`+`&&(n[0].ifEnd=n[0]),e[1]==`?`&&(n[0].expectElse=!0)},next:`formatString`},{regex:`([^:}\\\\]|\\\\.)*:?`,token:``,next:`formatString`}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||``;if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+`__`]||{})[t.substr(1)]||``;if(t=t.replace(/^TM_/,``),!this.variables.hasOwnProperty(t))return``;var r=this.variables[t];return typeof r==`function`&&(r=this.variables[t](e,t,n)),r??``},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||``,i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,``));var a=typeof t.fmt==`string`?this.tokenizeTmSnippet(t.fmt,`formatString`):t.fmt,o=this;return e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);for(var t=o.resolveVariables(a,n),r=`E`,i=0;i<t.length;i++){var s=t[i];if(typeof s==`object`)if(t[i]=``,s.changeCase&&s.local){var c=t[i+1];c&&typeof c==`string`&&(s.changeCase==`u`?t[i]=c[0].toUpperCase():t[i]=c[0].toLowerCase(),t[i+1]=c.substr(1))}else s.changeCase&&(r=s.changeCase);else r==`U`?t[i]=s.toUpperCase():r==`L`&&(t[i]=s.toLowerCase())}return o.variables.__=e,t.join(``)})},e.prototype.tmFormatFunction=function(e,t,n){return t.formatFunction==`upcase`?e.toUpperCase():t.formatFunction==`downcase`?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){function n(t){var n=e.indexOf(t,o+1);n!=-1&&(o=n)}for(var r=[],i=``,a=!0,o=0;o<e.length;o++){var s=e[o];if(typeof s==`string`){r.push(s),s==`
|
|
1282
|
-
`?(a=!0,i=``):a&&=(i=/^\t*/.exec(s)[0],/\S/.test(s));continue}if(s){if(a=!1,s.fmtString){var c=e.indexOf(s,o+1);c==-1&&(c=e.length),s.fmt=e.slice(o+1,c),o=c}if(s.text){var l=this.getVariableValue(t,s.text,i)+``;s.fmtString&&(l=this.tmStrFormat(l,s,t)),s.formatFunction&&(l=this.tmFormatFunction(l,s,t)),l&&!s.ifEnd?(r.push(l),n(s)):!l&&s.ifEnd&&n(s.ifEnd)}else s.elseEnd?n(s.elseEnd):s.tabstopId==null?s.changeCase!=null&&r.push(s):r.push(s)}}return r},e.prototype.getDisplayTextForSnippet=function(e,t){return h.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){n===void 0&&(n={});var r=h.call(this,e,t,n),i=e.getSelectionRange(),a=e.session.replace(i,r.text),o=new g(e),s=e.inVirtualSelectionMode&&e.selection.index;o.addTabstops(r.tabstops,i.start,a,s)},e.prototype.insertSnippet=function(e,t,n){n===void 0&&(n={});var r=this;if(e.inVirtualSelectionMode)return r.insertSnippetForSelection(e,t,n);e.forEachSelection(function(){r.insertSnippetForSelection(e,t,n)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||``;if(t=t.split(`/`).pop(),t===`html`||t===`php`){t===`php`&&!e.session.$mode.inlinePhp&&(t=`html`);var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r==`object`&&(r=r[0]),r.substring&&(r.substring(0,3)==`js-`?t=`javascript`:r.substring(0,4)==`css-`?t=`css`:r.substring(0,4)==`php-`&&(t=`php`))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push(`_`),n},e.prototype.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},e.prototype.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),a=r.substr(n.column),o=this.snippetMap,s;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(s=this.findMatchingSnippet(t,i,a)),!!s},this),s?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-s.replaceBefore.length,n.column+s.replaceAfter.length),this.variables.M__=s.matchBefore,this.variables.T__=s.matchAfter,this.insertSnippetForSelection(e,s.content),this.variables.M__=this.variables.T__=null,!0):!1},e.prototype.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(!(i.startRe&&!i.startRe.test(t))&&!(i.endRe&&!i.endRe.test(n))&&!(!i.startRe&&!i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[``],i.matchAfter=i.endRe?i.endRe.exec(n):[``],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:``,i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:``,i}},e.prototype.register=function(e,t){function n(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e=`(?:`+e+`)`),e||``}function r(e,t,r){return e=n(e),t=n(t),r?(e=t+e,e&&e[e.length-1]!=`$`&&(e+=`$`)):(e+=t,e&&e[0]!=`^`&&(e=`^`+e)),new RegExp(e)}function i(e){e.scope||=t||`_`,t=e.scope,a[t]||(a[t]=[],o[t]={});var n=o[t];if(e.name){var i=n[e.name];i&&c.unregister(i),n[e.name]=e}a[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join(`
|
|
1283
|
-
`):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard=`\\b`),e.trigger=s.escapeRegExp(e.tabTrigger)),!(!e.trigger&&!e.guard&&!e.endTrigger&&!e.endGuard)&&(e.startRe=r(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=r(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}var a=this.snippetMap,o=this.snippetNameMap,c=this;e||=[],Array.isArray(e)?e.forEach(i):Object.keys(e).forEach(function(t){i(e[t])}),this._signal(`registerSnippets`,{scope:t})},e.prototype.unregister=function(e,t){function n(e){var n=i[e.scope||t];if(n&&n[e.name]){delete n[e.name];var a=r[e.scope||t],o=a&&a.indexOf(e);o>=0&&a.splice(o,1)}}var r=this.snippetMap,i=this.snippetNameMap;e.content?n(e):Array.isArray(e)&&e.forEach(n)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,``);for(var t=[],n={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,i;i=r.exec(e);){if(i[1])try{n=JSON.parse(i[1]),t.push(n)}catch{}if(i[4])n.content=i[4].replace(/^\t/gm,``),t.push(n),n={};else{var a=i[2],o=i[3];if(a==`regex`){var s=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=s.exec(o)[1],n.trigger=s.exec(o)[1],n.endTrigger=s.exec(o)[1],n.endGuard=s.exec(o)[1]}else a==`snippet`?(n.tabTrigger=o.match(/^\S*/)[0],n.name||(n.name=o)):a&&(n[a]=o)}}return t},e.prototype.getSnippetByName=function(e,t){var n=this.snippetNameMap,r;return this.getActiveScopes(t).some(function(t){var i=n[t];return i&&(r=i[e]),!!r},this),r},e}();a.implement(m.prototype,o);var h=function(e,t,n){function r(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(typeof r==`object`){if(u[r.tabstopId])continue;r=t[e.lastIndexOf(r,n-1)]||{tabstopId:r.tabstopId}}t[n]=r}return t}n===void 0&&(n={});var i=e.getCursorPosition(),a=e.session.getLine(i.row),o=e.session.getTabString(),s=a.match(/^\s*/)[0];i.column<s.length&&(s=s.slice(0,i.column)),t=t.replace(/\r/g,``);var c=this.tokenizeTmSnippet(t);c=this.resolveVariables(c,e),c=c.map(function(e){return e==`
|
|
1284
|
-
`&&!n.excludeExtraIndent?e+s:typeof e==`string`?e.replace(/\t/g,o):e});var l=[];c.forEach(function(e,t){if(typeof e==`object`){var n=e.tabstopId,r=l[n];if(r||(r=l[n]=[],r.index=n,r.value=``,r.parents={}),r.indexOf(e)===-1){e.choices&&!r.choices&&(r.choices=e.choices),r.push(e);var i=c.indexOf(e,t+1);if(i!==-1){var a=c.slice(t+1,i);a.some(function(e){return typeof e==`object`})&&!r.value?r.value=a:a.length&&(!r.value||typeof r.value!=`string`)&&(r.value=a.join(``))}}}}),l.forEach(function(e){e.length=0});for(var u={},d=0;d<c.length;d++){var f=c[d];if(typeof f==`object`){var p=f.tabstopId,m=l[p],h=c.indexOf(f,d+1);if(u[p]){u[p]===f&&(delete u[p],Object.keys(u).forEach(function(e){m.parents[e]=!0}));continue}u[p]=f;var g=m.value;typeof g==`string`?f.fmt&&(g=this.tmStrFormat(g,f,e)):g=r(g),c.splice.apply(c,[d+1,Math.max(0,h-d)].concat(g,f)),m.indexOf(f)===-1&&m.push(f)}}var _=0,v=0,y=``;return c.forEach(function(e){if(typeof e==`string`){var t=e.split(`
|
|
1285
|
-
`);t.length>1?(v=t[t.length-1].length,_+=t.length-1):v+=e.length,y+=e}else e&&(e.start?e.end={row:_,column:v}:e.start={row:_,column:v})}),{text:y,tabstops:l,tokens:c}},g=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.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)},e.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},e.prototype.onChange=function(e){for(var t=e.action[0]==`r`,n=this.selectedTabstop||{},r=n.parents||{},i=this.tabstops.slice(),a=0;a<i.length;a++){var o=i[a],s=o==n||r[o.index];if(o.rangeList.$bias=+!s,e.action==`remove`&&o!==n){var c=o.parents&&o.parents[n.index],l=o.rangeList.pointIndex(e.start,c);l=l<0?-l-1:l+1;var u=o.rangeList.pointIndex(e.end,c);u=u<0?-u-1:u-1;for(var d=o.rangeList.ranges.slice(l,u),f=0;f<d.length;f++)this.removeRange(d[f])}o.rangeList.$onChange(e)}var p=this.session;!this.$inChange&&t&&p.getLength()==1&&!p.getValue()&&this.detach()},e.prototype.updateLinkedFields=function(){var e=this.selectedTabstop;if(!(!e||!e.hasLinkedRanges||!e.firstNonLinked)){this.$inChange=!0;for(var n=this.session,r=n.getTextRange(e.firstNonLinked),i=0;i<e.length;i++){var a=e[i];if(a.linked){var o=a.original,s=t.snippetManager.tmStrFormat(r,o,this.editor);n.replace(a,s)}}this.$inChange=!1}},e.prototype.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},e.prototype.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),r=0;r<this.ranges.length;r++)if(!this.ranges[r].linked){var i=this.ranges[r].contains(e.row,e.column),a=n||this.ranges[r].contains(t.row,t.column);if(i&&a)return}this.detach()}},e.prototype.onChangeSession=function(){this.detach()},e.prototype.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),this.updateTabstopMarkers(),n===0&&this.detach()},e.prototype.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],!(!t||!t.length)){this.selectedTabstop=t;var n=t.firstNonLinked||t;if(t.choices&&(n.cursor=n.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(n);else{var r=this.editor.multiSelect;r.toSingleRange(n);for(var i=0;i<t.length;i++)t.hasLinkedRanges&&t[i].linked||r.addRange(t[i].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand(`startAutocomplete`,{matches:this.selectedTabstop.choices})}},e.prototype.addTabstops=function(e,t,n){var r=this.useLink||!this.editor.getOption(`enableMultiselect`);if(this.$openTabstops||=[],!e[0]){var i=c.fromPoints(n,n);v(i.start,t),v(i.end,t),e[0]=[i],e[0].index=0}var a=[this.index+1,0],o=this.ranges,s=this.snippetId=(this.snippetId||0)+1;e.forEach(function(e,n){var i=this.$openTabstops[n]||e;i.snippetId=s;for(var u=0;u<e.length;u++){var d=e[u],f=c.fromPoints(d.start,d.end||d.start);_(f.start,t),_(f.end,t),f.original=d,f.tabstop=i,o.push(f),i==e?i[u]=f:i.unshift(f),d.fmtString||i.firstNonLinked&&r?(f.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||=f}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(a.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i),i.rangeList=i.rangeList||new l,i.rangeList.$bias=0,i.rangeList.addList(i)},this),a.length>2&&(this.tabstops.length&&a.push(a.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,a))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){e.markerId||=t.addMarker(e,`ace_snippet-marker`,`text`)})},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&e--,this.tabstops.forEach(function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);t!=-1&&e.tabstop.splice(t,1),t=this.ranges.indexOf(e),t!=-1&&this.ranges.splice(t,1),t=e.tabstop.rangeList.ranges.indexOf(e),t!=-1&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();g.prototype.keyboardHandler=new u,g.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var _=function(e,t){e.row==0&&(e.column+=t.column),e.row+=t.row},v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString(`
|
|
1286
|
-
.ace_snippet-marker {
|
|
1287
|
-
-moz-box-sizing: border-box;
|
|
1288
|
-
box-sizing: border-box;
|
|
1289
|
-
background: rgba(194, 193, 208, 0.09);
|
|
1290
|
-
border: 1px dotted rgba(211, 208, 235, 0.62);
|
|
1291
|
-
position: absolute;
|
|
1292
|
-
}`,`snippets.css`,!1),t.snippetManager=new m;var y=e(`./editor`).Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(y.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(e,t,n){var r=e(`../virtual_renderer`).VirtualRenderer,i=e(`../editor`).Editor,a=e(`../range`).Range,o=e(`../lib/event`),s=e(`../lib/lang`),c=e(`../lib/dom`),l=e(`../config`).nls,u=e(`./../lib/useragent`),d=function(e){return`suggest-aria-id:${e}`},f=u.isSafari?`menu`:`listbox`,p=u.isSafari?`menuitem`:`option`,m=u.isSafari?`aria-current`:`aria-selected`,h=function(e){var t=new r(e);t.$maxLines=4;var n=new i(t);return n.setHighlightActiveLine(!1),n.setShowPrintMargin(!1),n.renderer.setShowGutter(!1),n.renderer.setHighlightGutterLine(!1),n.$mouseHandler.$focusTimeout=0,n.$highlightTagPending=!0,n},g=function(){function e(e){var t=c.createElement(`div`),n=h(t);e&&e.appendChild(t),t.style.display=`none`,n.renderer.content.style.cursor=`default`,n.renderer.setStyle(`ace_autocomplete`),n.renderer.$textLayer.element.setAttribute(`role`,f),n.renderer.$textLayer.element.setAttribute(`aria-roledescription`,l(`autocomplete.popup.aria-roledescription`,`Autocomplete suggestions`)),n.renderer.$textLayer.element.setAttribute(`aria-label`,l(`autocomplete.popup.aria-label`,`Autocomplete suggestions`)),n.renderer.textarea.setAttribute(`aria-hidden`,`true`),n.setOption(`displayIndentGuides`,!1),n.setOption(`dragDelay`,150);var r=function(){};n.focus=r,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=r,n.renderer.$cursorLayer.element.style.opacity=`0`,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(``),n.session.$searchHighlight.clazz=`ace_highlight-marker`,n.on(`mousedown`,function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),g.start.row=g.end.row=t.row,e.stop()});var i,u=new a(-1,0,-1,1/0),g=new a(-1,0,-1,1/0);g.id=n.session.addMarker(g,`ace_active-line`,`fullLine`),n.setSelectOnHover=function(e){e?u.id&&=(n.session.removeMarker(u.id),null):u.id=n.session.addMarker(u,`ace_line-hover`,`fullLine`)},n.setSelectOnHover(!1),n.on(`mousemove`,function(e){if(!i){i=e;return}if(i.x!=e.x||i.y!=e.y){i=e,i.scrollTop=n.renderer.scrollTop,n.isMouseOver=!0;var t=i.getDocumentPosition().row;u.start.row!=t&&(u.id||n.setRow(t),v(t))}}),n.renderer.on(`beforeRender`,function(){if(i&&u.start.row!=-1){i.$pos=null;var e=i.getDocumentPosition().row;u.id||n.setRow(e),v(e,!0)}}),n.renderer.on(`afterRender`,function(){for(var e=n.renderer.$textLayer,t=e.config.firstRow,r=e.config.lastRow;t<=r;t++){var i=e.element.childNodes[t-e.config.firstRow];i.setAttribute(`role`,p),i.setAttribute(`aria-roledescription`,l(`autocomplete.popup.item.aria-roledescription`,`item`)),i.setAttribute(`aria-setsize`,n.data.length),i.setAttribute(`aria-describedby`,`doc-tooltip`),i.setAttribute(`aria-posinset`,t+1);var a=n.getData(t);if(a){var o=`${a.caption||a.value}${a.meta?`, ${a.meta}`:``}`;i.setAttribute(`aria-label`,o)}i.querySelectorAll(`.ace_completion-highlight`).forEach(function(e){e.setAttribute(`role`,`mark`)})}}),n.renderer.on(`afterRender`,function(){var e=n.getRow(),t=n.renderer.$textLayer,r=t.element.childNodes[e-t.config.firstRow],i=document.activeElement;if(r!==n.selectedNode&&n.selectedNode&&(c.removeCssClass(n.selectedNode,`ace_selected`),n.selectedNode.removeAttribute(m),n.selectedNode.removeAttribute(`id`)),i.removeAttribute(`aria-activedescendant`),n.selectedNode=r,r){var a=d(e);c.addCssClass(r,`ace_selected`),r.id=a,t.element.setAttribute(`aria-activedescendant`,a),i.setAttribute(`aria-activedescendant`,a),r.setAttribute(m,`true`)}});var _=function(){v(-1)},v=function(e,t){e!==u.start.row&&(u.start.row=u.end.row=e,t||n.session._emit(`changeBackMarker`),n._emit(`changeHoverMarker`))};n.getHoveredRow=function(){return u.start.row},o.addListener(n.container,`mouseout`,function(){n.isMouseOver=!1,_()}),n.on(`hide`,_),n.on(`changeSelection`,_),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return typeof t==`string`?t:t&&t.value||``};var y=n.session.bgTokenizer;return y.$tokenizeRow=function(e){function t(e,t){e&&i.push({type:(r.className||``)+(t||``),value:e})}var r=n.data[e],i=[];if(!r)return i;typeof r==`string`&&(r={value:r});for(var a=r.caption||r.value||r.name,o=a.toLowerCase(),s=(n.filterText||``).toLowerCase(),c=0,l=0,u=0;u<=s.length;u++)if(u!=l&&(r.matchMask&1<<u||u==s.length)){var d=s.slice(l,u);l=u;var f=o.indexOf(d,c);if(f==-1)continue;t(a.slice(c,f),``),c=f+d.length,t(a.slice(f,c),`completion-highlight`)}return t(a.slice(c,a.length),``),i.push({type:`completion-spacer`,value:` `}),r.meta&&i.push({type:`completion-meta`,value:r.meta}),r.message&&i.push({type:`completion-message`,value:r.message}),i},y.$updateOnChange=r,y.start=r,n.session.$computeWidth=function(){return this.screenWidth=0},n.isOpen=!1,n.isTopdown=!1,n.autoSelect=!0,n.filterText=``,n.isMouseOver=!1,n.data=[],n.setData=function(e,t){n.filterText=t||``,n.setValue(s.stringRepeat(`
|
|
1293
|
-
`,e.length),-1),n.data=e||[],n.setRow(0)},n.getData=function(e){return n.data[e]},n.getRow=function(){return g.start.row},n.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,e)),g.start.row!=e&&(n.selection.clearSelection(),g.start.row=g.end.row=e||0,n.session._emit(`changeBackMarker`),n.moveCursorTo(e||0,0),n.isOpen&&n._signal(`select`))},n.on(`changeSelection`,function(){n.isOpen&&n.setRow(n.selection.lead.row),n.renderer.scrollCursorIntoView()}),n.hide=function(){this.container.style.display=`none`,n.anchorPos=null,n.anchor=null,n.isOpen&&(n.isOpen=!1,this._signal(`hide`))},n.tryShow=function(e,t,r,a){if(!a&&n.isOpen&&n.anchorPos&&n.anchor&&n.anchorPos.top===e.top&&n.anchorPos.left===e.left&&n.anchor===r)return!0;var o=this.container,s=this.renderer.scrollBar.width||10,l=window.innerHeight-s,u=window.innerWidth-s,d=this.renderer,f=d.$maxLines*t*1.4,p={top:0,bottom:0,left:0},m=l-e.top-3*this.$borderSize-t,h=e.top-3*this.$borderSize;r||=h<=m||m>=f?`bottom`:`top`,r===`top`?(p.bottom=e.top-this.$borderSize,p.top=p.bottom-f):r===`bottom`&&(p.top=e.top+t+this.$borderSize,p.bottom=p.top+f);var g=p.top>=0&&p.bottom<=l;if(!a&&!g)return!1;d.$maxPixelHeight=g?null:r===`top`?h:m,r===`top`?(o.style.top=``,o.style.bottom=l+s-p.bottom+`px`,n.isTopdown=!1):(o.style.top=p.top+`px`,o.style.bottom=``,n.isTopdown=!0),o.style.display=``;var _=e.left;return _+o.offsetWidth>u&&(_=u-o.offsetWidth),o.style.left=_+`px`,o.style.right=``,c.$fixPositionBug(o),n.isOpen||(n.isOpen=!0,this._signal(`show`),i=null),n.anchorPos=e,n.anchor=r,!0},n.show=function(e,t,n){this.tryShow(e,t,n?`bottom`:void 0,!0)},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case`up`:t=t<=0?n:t-1;break;case`down`:t=t>=n?-1:t+1;break;case`start`:t=0;break;case`end`:t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n}return e}();c.importCssString(`
|
|
1294
|
-
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1295
|
-
background-color: #CAD6FA;
|
|
1296
|
-
z-index: 1;
|
|
1297
|
-
}
|
|
1298
|
-
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
|
|
1299
|
-
background-color: #3a674e;
|
|
1300
|
-
}
|
|
1301
|
-
.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1302
|
-
border: 1px solid #abbffe;
|
|
1303
|
-
margin-top: -1px;
|
|
1304
|
-
background: rgba(233,233,253,0.4);
|
|
1305
|
-
position: absolute;
|
|
1306
|
-
z-index: 2;
|
|
1307
|
-
}
|
|
1308
|
-
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
|
|
1309
|
-
border: 1px solid rgba(109, 150, 13, 0.8);
|
|
1310
|
-
background: rgba(58, 103, 78, 0.62);
|
|
1311
|
-
}
|
|
1312
|
-
.ace_completion-meta {
|
|
1313
|
-
opacity: 0.5;
|
|
1314
|
-
margin-left: 0.9em;
|
|
1315
|
-
}
|
|
1316
|
-
.ace_completion-message {
|
|
1317
|
-
margin-left: 0.9em;
|
|
1318
|
-
color: blue;
|
|
1319
|
-
}
|
|
1320
|
-
.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1321
|
-
color: #2d69c7;
|
|
1322
|
-
}
|
|
1323
|
-
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
|
|
1324
|
-
color: #93ca12;
|
|
1325
|
-
}
|
|
1326
|
-
.ace_editor.ace_autocomplete {
|
|
1327
|
-
width: 300px;
|
|
1328
|
-
z-index: 200000;
|
|
1329
|
-
border: 1px lightgray solid;
|
|
1330
|
-
position: fixed;
|
|
1331
|
-
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
|
1332
|
-
line-height: 1.4;
|
|
1333
|
-
background: #fefefe;
|
|
1334
|
-
color: #111;
|
|
1335
|
-
}
|
|
1336
|
-
.ace_dark.ace_editor.ace_autocomplete {
|
|
1337
|
-
border: 1px #484747 solid;
|
|
1338
|
-
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
|
|
1339
|
-
line-height: 1.4;
|
|
1340
|
-
background: #25282c;
|
|
1341
|
-
color: #c1c1c1;
|
|
1342
|
-
}
|
|
1343
|
-
.ace_autocomplete .ace_text-layer {
|
|
1344
|
-
width: calc(100% - 8px);
|
|
1345
|
-
}
|
|
1346
|
-
.ace_autocomplete .ace_line {
|
|
1347
|
-
display: flex;
|
|
1348
|
-
align-items: center;
|
|
1349
|
-
}
|
|
1350
|
-
.ace_autocomplete .ace_line > * {
|
|
1351
|
-
min-width: 0;
|
|
1352
|
-
flex: 0 0 auto;
|
|
1353
|
-
}
|
|
1354
|
-
.ace_autocomplete .ace_line .ace_ {
|
|
1355
|
-
flex: 0 1 auto;
|
|
1356
|
-
overflow: hidden;
|
|
1357
|
-
text-overflow: ellipsis;
|
|
1358
|
-
}
|
|
1359
|
-
.ace_autocomplete .ace_completion-spacer {
|
|
1360
|
-
flex: 1;
|
|
1361
|
-
}
|
|
1362
|
-
.ace_autocomplete.ace_loading:after {
|
|
1363
|
-
content: "";
|
|
1364
|
-
position: absolute;
|
|
1365
|
-
top: 0px;
|
|
1366
|
-
height: 2px;
|
|
1367
|
-
width: 8%;
|
|
1368
|
-
background: blue;
|
|
1369
|
-
z-index: 100;
|
|
1370
|
-
animation: ace_progress 3s infinite linear;
|
|
1371
|
-
animation-delay: 300ms;
|
|
1372
|
-
transform: translateX(-100%) scaleX(1);
|
|
1373
|
-
}
|
|
1374
|
-
@keyframes ace_progress {
|
|
1375
|
-
0% { transform: translateX(-100%) scaleX(1) }
|
|
1376
|
-
50% { transform: translateX(625%) scaleX(2) }
|
|
1377
|
-
100% { transform: translateX(1500%) scaleX(3) }
|
|
1378
|
-
}
|
|
1379
|
-
@media (prefers-reduced-motion) {
|
|
1380
|
-
.ace_autocomplete.ace_loading:after {
|
|
1381
|
-
transform: translateX(625%) scaleX(2);
|
|
1382
|
-
animation: none;
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
`,`autocompletion.css`,!1),t.AcePopup=g,t.$singleLineEditor=h,t.getAriaId=d}),ace.define(`ace/autocomplete/inline_screenreader`,[`require`,`exports`,`module`],function(e,t,n){t.AceInlineScreenReader=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement(`div`),this.screenReaderDiv.classList.add(`ace_screenreader-only`),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on(`afterRender`,function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var r=`doc-tooltip `,i=0;i<this._lines.length;i++)r+=`ace-inline-screenreader-line-${i} `;n.setAttribute(`aria-describedby`,r)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement(`pre`);e.setAttribute(`id`,`ace-inline-screenreader`);for(var t=0;t<this._lines.length;t++){var n=document.createElement(`code`);n.setAttribute(`id`,`ace-inline-screenreader-line-${t}`);var r=document.createTextNode(this._lines[t]);n.appendChild(r),e.appendChild(n)}return e},e}()}),ace.define(`ace/autocomplete/inline`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete/inline_screenreader`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`./inline_screenreader`).AceInlineScreenReader;t.AceInline=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n||=``,e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||=new i(e);var a=t.snippet?r.getDisplayTextForSnippet(e,t.snippet):t.value;return t.hideInlinePreview||!a||!a.startsWith(n)?!1:(this.editor=e,this.inlineScreenReader.setScreenReaderContent(a),a=a.slice(n.length),a===``?e.removeGhostText():e.setGhostText(a),!0)},e.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},e.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&=(this.inlineScreenReader.destroy(),null)},e}()}),ace.define(`ace/autocomplete/util`,[`require`,`exports`,`module`],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var a=0;a<i;a++)t(e[a],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t-1;a>=0&&n.test(e[a]);a--)i.push(e[a]);return i.reverse().join(``)},t.retrieveFollowingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t;a<e.length&&n.test(e[a]);a++)i.push(e[a]);return i},t.getCompletionPrefix=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r;return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=this.retrievePrecedingIdentifier(n,t.column,e))}.bind(this))}.bind(this)),r||this.retrievePrecedingIdentifier(n,t.column)},t.triggerAutocomplete=function(e,t){var t=t??e.session.getPrecedingCharacter();return e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define(`ace/autocomplete`,[`require`,`exports`,`module`,`ace/keyboard/hash_handler`,`ace/autocomplete/popup`,`ace/autocomplete/inline`,`ace/autocomplete/popup`,`ace/autocomplete/util`,`ace/lib/lang`,`ace/lib/dom`,`ace/snippets`,`ace/config`,`ace/lib/event`,`ace/lib/scroll`],function(e,t,n){var r=e(`./keyboard/hash_handler`).HashHandler,i=e(`./autocomplete/popup`).AcePopup,a=e(`./autocomplete/inline`).AceInline,o=e(`./autocomplete/popup`).getAriaId,s=e(`./autocomplete/util`),c=e(`./lib/lang`),l=e(`./lib/dom`),u=e(`./snippets`).snippetManager,d=e(`./config`),f=e(`./lib/event`),p=e(`./lib/scroll`).preventParentScroll,m=function(e,t){t.completer&&t.completer.destroy()},h=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=c.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=c.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=c.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=c.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=c.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||this.editor.completers.length===0||(this.completions=new _(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle(`ace_loading`,!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:d.nls(`autocomplete.loading`,`Loading...`),value:``}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on(`click`,function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on(`show`,this.$onPopupShow.bind(this)),this.popup.on(`hide`,this.$onHidePopup.bind(this)),this.popup.on(`select`,this.$onPopupChange.bind(this)),f.addListener(this.popup.container,`mouseout`,this.mouseOutListener.bind(this)),this.popup.on(`changeHoverMarker`,this.tooltipTimer.bind(null,null)),this.popup.renderer.on(`afterRender`,this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new a,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&typeof e.completer.onSeen==`function`&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,r=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,r);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.addEventListener(`wheel`,this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener(`scroll`,this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.removeEventListener(`wheel`,this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener(`scroll`,e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var a={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(a.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,s=o<a.top?{top:o,left:a.left}:a;this.popup.tryShow(s,n,`bottom`)||this.popup.tryShow(r,n,`top`)||this.popup.show(r,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var r=this.popup.getRow(),i=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:o(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var a;this.stickySelection&&(a=this.popup.data.indexOf(i)),(!a||a===-1)&&(a=0),this.popup.setRow(this.autoSelect?a:-1),a===r&&i!==this.completions.filtered[a]&&this.$onPopupChange();var s=this.inlineRenderer&&this.inlineEnabled;if(a===r&&s){var c=this.popup.getData(this.popup.getRow());this.$updateGhostText(c)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off(`changeSelection`,this.changeListener),this.editor.off(`blur`,this.blurListener),this.editor.off(`mousedown`,this.mousedownListener),this.editor.off(`mousewheel`,this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off(`afterRender`,this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t!=n&&t.parentNode!=i&&!r&&t!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||=this.popup.getData(this.popup.getRow()),!e)return!1;if(e.value===``)return this.detach();var n=this.completions,r=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),r},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on(`changeSelection`,this.changeListener),e.on(`blur`,this.blurListener),e.on(`mousedown`,this.mousedownListener),e.on(`mousewheel`,this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||=new g(e),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var r=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:r});if(i==this.completions.filterText)return;if(this.completions.setFilter(i),!this.completions.filtered.length||this.completions.filtered.length==1&&this.completions.filtered[0].value==i&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,i,t);return}if(n&&n.matches){var r=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new _(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,``,t)}var a=this.editor.getSession(),r=this.editor.getCursorPosition(),i=s.getCompletionPrefix(this.editor);this.base=a.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var o={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:r}).provideCompletions(this.editor,o,function(n,r,i){var a=r.filtered,o=s.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!a.length){var c=!this.autoShown&&this.emptyMessage;if(typeof c==`function`&&(c=this.emptyMessage(o)),c){var l=[{caption:c,value:``}];this.completions=new _(l),this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_loading`,!1),this.popup.renderer.setStyle(`ace_empty-message`,!0);return}return this.detach()}if(a.length==1&&a[0].value==o&&!a[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&a.length==1)return this.insertMatch(a[0])}this.completions=!i&&this.showLoadingState?new _(e.completionsForLoading.concat(a),r.filterText):r,this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_empty-message`,!1),this.popup.renderer.setStyle(`ace_loading`,!i)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,a=0;a<i;a++){var o=this.editor.completers[a];if(o.getDocTooltip&&n.completerId===o.id){r=o.getDocTooltip(n);break}}if(!r&&typeof n!=`string`&&(r=n),typeof r==`string`&&(r={docText:r}),!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=l.createElement(`div`),this.tooltipNode.style.margin=`0`,this.tooltipNode.style.pointerEvents=`auto`,this.tooltipNode.style.overscrollBehavior=`contain`,this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id=`doc-tooltip`,this.tooltipNode.setAttribute(`role`,`tooltip`),this.tooltipNode.addEventListener(`wheel`,p));var t=this.editor.renderer.theme;this.tooltipNode.className=`ace_tooltip ace_doc-tooltip `+(t.isDark?`ace_dark `:``)+(t.cssClass||``);var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var r=this.popup,i=r.container.getBoundingClientRect(),a=400,o=300,s=r.renderer.scrollBar.width||10,c=i.left,u=window.innerWidth-i.right-s,d=r.isTopdown?window.innerHeight-s-i.bottom:i.top,f=[Math.min(u/a,1),Math.min(c/a,1),Math.min(d/o,1)*.9],m=Math.max.apply(Math,f),h=n.style;h.display=`block`,m==f[0]||f[0]>=1?(h.left=i.right+1+`px`,h.right=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[1]||f[1]>=1?(h.right=window.innerWidth-i.left+`px`,h.left=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[2]&&(h.left=i.left+`px`,h.right=``,h.maxWidth=Math.min(a,window.innerWidth-i.left)+`px`,r.isTopdown?(h.top=i.bottom+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.bottom,o)+`px`):(h.top=``,h.bottom=window.innerHeight-i.top+`px`,h.maxHeight=Math.min(i.top,o)+`px`)),l.$fixPositionBug(n)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if(t.nodeName==`A`&&t.href){t.rel=`noreferrer`,t.target=`_blank`;break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off(`destroy`,m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e?t.completer:(t.completer&&=(t.completer.destroy(),null),d.get(`sharedPopups`)?(e.$sharedInstance||=new e,t.completer=e.$sharedInstance):(t.completer=new e,t.once(`destroy`,m)),t.completer)},e}();h.prototype.commands={Up:function(e){e.completer.goTo(`up`)},Down:function(e){e.completer.goTo(`down`)},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo(`start`)},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo(`end`)},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo(`down`)},Backspace:function(e){e.execCommand(`backspace`),!s.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},h.startCommand={name:`startAutocomplete`,exec:function(e,t){var n=h.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:`Ctrl-Space|Ctrl-Shift-Space|Alt-Space`};var g=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!this.completions||!this.completions.filtered?!1:this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:`insertMatch`}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var r=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(r-=this.initialPosition.prefix.length,r+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),r||i)for(var a=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()],o=0,s;s=a[o];o++)s.start.column-=r,s.end.column+=i,e.session.remove(s);t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&typeof t.completer.onInsert==`function`&&t.completer.onInsert(e,t),t.command&&t.command===`startAutocomplete`&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand(`insertstring`,n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=s.getCompletionPrefix(e),a=[];this.completers=e.completers;var o=e.completers.length;return e.completers.forEach(function(c,l){c.getCompletions(e,n,r,i,function(n,r){c.hideInlinePreview&&(r=r.map(function(e){return Object.assign(e,{hideInlinePreview:c.hideInlinePreview})})),!n&&r&&(a=a.concat(r)),t(null,{prefix:s.getCompletionPrefix(e),matches:a,finished:--o===0})})}),!0},e.prototype.provideCompletions=function(e,t,n){var r=function(e){var r=e.prefix,i=e.matches;this.completions=new _(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(r),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,a=null;if(this.gatherCompletions(e,function(e,t){if(this.active&&(e&&(n(e,[],!0),this.detach()),t.prefix.indexOf(t.prefix)===0)){if(i){a=t;return}r(t)}}.bind(this)),i=!1,a){var o=a;a=null,r(o)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){typeof e.cancel==`function`&&e.cancel()})},e}(),_=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||``,this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var a=0,o;o=e[a];a++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var s=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(s){var c=-1,l=0,u=0,d,f;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(i);if(p>-1)u=p;else for(var m=0;m<t.length;m++){var h=s.indexOf(i[m],c+1),g=s.indexOf(r[m],c+1);if(d=h>=0&&(g<0||h<g)?h:g,d<0)continue e;f=d-c-1,f>0&&(c===-1&&(u+=10),u+=f,l|=1<<m),c=d}}o.matchMask=l,o.exactMatch=+!u,o.$score=(o.score||0)-u,n.push(o)}}return n},e}();t.Autocomplete=h,t.CompletionProvider=g,t.FilteredList=_}),ace.define(`ace/marker_group`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find(function(t){return t.range.contains(e.row,e.column)})},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal(`changeBackMarker`)},e.prototype.update=function(e,t,n,r){if(!(!this.markers||!this.markers.length))for(var i=r.firstRow,a=r.lastRow,o,s=0,c=0,l=0;l<this.markers.length;l++){var u=this.markers[l];if(!(u.range.end.row<i)&&!(u.range.start.row>a)&&(u.range.start.row===c?s++:(c=u.range.start.row,s=0),!(s>200))){var d=u.range.clipRows(i,a);if(d.start.row!==d.end.row||d.start.column!==d.end.column){var f=d.toScreenRange(n);if(f.isEmpty()){o=n.getNextFoldLine(d.end.row,o),o&&o.end.row>d.end.row&&(i=o.end.row);continue}this.markerType===`fullLine`?t.drawFullLineMarker(e,f,u.className,r):f.isMultiLine()?this.markerType===`line`?t.drawMultiLineMarker(e,f,u.className,r):t.drawTextMarker(e,f,u.className,r):t.drawSingleLineMarker(e,f,u.className+` ace_br15`,r)}}}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),ace.define(`ace/autocomplete/text_completer`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){function r(e,t){return e.getTextRange(a.fromPoints({row:0,column:0},t)).split(o).length-1}function i(e,t){var n=r(e,t),i=e.getValue().split(o),a=Object.create(null),s=i[n];return i.forEach(function(e,t){if(!(!e||e===s)){var r=Math.abs(n-t),o=i.length-r;a[e]=a[e]?Math.max(o,a[e]):o}}),a}var a=e(`../range`).Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id=`textCompleter`,t.getCompletions=function(e,t,n,r,a){var o=i(t,n);a(null,Object.keys(o).map(function(e){return{caption:e,value:e,score:o[e],meta:`local`}}))}}),ace.define(`ace/ext/language_tools`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete`,`ace/config`,`ace/lib/lang`,`ace/autocomplete/util`,`ace/marker_group`,`ace/autocomplete/text_completer`,`ace/editor`,`ace/config`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`../autocomplete`).Autocomplete,a=e(`../config`),o=e(`../lib/lang`),s=e(`../autocomplete/util`),c=e(`../marker_group`).MarkerGroup,l=e(`../autocomplete/text_completer`),u={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var a=e.session.getState(n.row),o=t.$mode.getCompletions(a,t,n,r);o=o.map(function(e){return e.completerId=u.id,e}),i(null,o)},id:`keywordCompleter`},d=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||``}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},f={getCompletions:function(e,t,n,i,a){var o=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push(`html-tag`):o=r.getActiveScopes(e);var c=r.snippetMap,l=[];o.forEach(function(e){for(var t=c[e]||[],n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;i&&l.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+`⇥ `:`snippet`,completerId:f.id})}},this),a(null,l)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=[`<b>`,o.escapeHTML(e.caption),`</b>`,`<hr></hr>`,o.escapeHTML(d(e.snippet))].join(``))},id:`snippetCompleter`},p=[f,l,u];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=l,t.keyWordCompleter=u,t.snippetCompleter=f;var m={name:`expandSnippet`,exec:function(e){return r.expandWithTab(e)},bindKey:`Tab`},h=function(e,t){g(t.session.$mode)},g=function(e){typeof e==`string`&&(e=a.$modes[e]),e&&(r.files||={},_(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},_=function(e,t){!t||!e||r.files[e]||(r.files[e]={},a.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g(`ace/mode/`+e)})))}))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name===`backspace`)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name===`insertstring`&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):x(e)}},y,b=o.delayedCall(function(){x(y)},0),x=function(e){var t=e.editor,n=s.getCompletionPrefix(t),r=e.args,a=s.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||a){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e(`../editor`).Editor;e(`../config`).defineOptions(S.prototype,`editor`,{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||=Array.isArray(e)?e:p,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||=Array.isArray(e)?e:p,this.commands.on(`afterExec`,v)):this.commands.off(`afterExec`,v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on(`changeMode`,h),h(null,this)):(this.commands.removeCommand(m),this.off(`changeMode`,h))},value:!1}}),t.MarkerGroup=c}),(function(){ace.require([`ace/ext/language_tools`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g(),sw(),cw(),lw(),uw(),dw(),fw();var pw={jsonError:{border:`1px solid red`,minHeight:200},jsonNoError:{border:`1px solid #00000000`,minHeight:200}};function mw(e){return _.createElement(ow,{style:e.error===!0?pw.jsonError:e.error===!1?pw.jsonNoError:void 0,mode:e.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:e.editValueMode,showGutter:e.editValueMode,highlightActiveLine:e.editValueMode,defaultValue:e.defaultValue,theme:e.themeType===`dark`?`clouds_midnight`:`chrome`,value:e.value,readOnly:!e.onChange,onChange:t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t)},name:e.name||`UNIQUE_ID_OF_DIV1`,fontSize:e.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:e.editValueMode,tabSize:e.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}g();var hw={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},gw=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||`{}`;this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Ts.default.parse(e):JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:hw.flex},_.createElement(Ge,{color:`grey`,style:hw.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},K.t(`jc_JSON editor`))),o?_.createElement(qS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||{}})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...hw.wrapper,border:this.state.jsonError?`2px solid red`:`2px solid transparent`}},_.createElement(mw,{mode:this.props.schema.json5?`json5`:`json`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,jsonError:this.validateJson(e)}),name:`ConfigJsonEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?_.createElement(en,null,this.state.jsonError?K.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var _w=[{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:`简体中文`}],vw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=[..._w];this.props.schema.system?t.unshift({value:``,label:K.t(`jc_System language`)}):t.unshift({value:``,label:K.t(`jc_none`)}),this.setState({value:this.props.schema.system?e||``:e||K.getLanguage(),selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value||!e.value&&!this.state.value);return _.createElement(Mn,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:t,value:this.state.value||`_`,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation),onChange:e=>{let{value:t}=e.target;t===`_`&&(t=``),this.setState({value:t},()=>{if(this.props.attr){let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(e))}if(this.props.schema.changeGuiLanguage)if(t){var e,n;if(t===K.getLanguage())return;K.setLanguage(t),(e=(n=this.props.oContext).changeLanguage)==null||e.call(n)}else this.props.oContext.socket.getSystemConfig().then(e=>{if(e.common.language!==K.getLanguage()&&e.common.language){var t,n;K.setLanguage(e.common.language),(t=(n=this.props.oContext).changeLanguage)==null||t.call(n)}}).catch(e=>console.error(`Cannot read system config: ${e}`))})}},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(Ie,{key:e.value,value:e.value},e.label))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var yw=class extends X{constructor(e){super(e),q(this,`scrollRef`,void 0),this.scrollRef=_.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),X.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener(`scroll`,()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?_.createElement(Dt,{maxWidth:`lg`,open:!0,onClose:(e,t)=>{t!==`escapeKeyDown`&&t!==`backdropClick`&&this.setState({showLicenseDialog:!1})}},_.createElement(gn,null,this.props.schema.title?K.t(this.props.schema.title):K.t(`jc_License agreement`)),_.createElement(Un,null,this.props.schema.licenseUrl?_.createElement(_.Fragment,null,this.state.loading?_.createElement(I,null):null,_.createElement(`pre`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?_.createElement(`div`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.props.schema.texts.map((e,t)=>this.props.schema.noTranslation?_.createElement(`p`,{key:t},e):_.createElement(`p`,{key:t},K.t(e)))):null),_.createElement(On,null,this.props.schema.checkBox?_.createElement(bn,{control:_.createElement(Ht,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:K.t(this.props.schema.checkBox)}):null,_.createElement(Ge,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{if(this.setState({showLicenseDialog:!1}),this.props.attr){let e=this.onChange(this.props.attr,!0);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},color:`primary`,variant:`contained`,startIcon:_.createElement(Oe,null)},this.props.schema.agreeText?K.t(this.props.schema.agreeText):K.t(`jc_Accept license`)),_.createElement(Ge,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:`grey`,variant:`contained`,startIcon:_.createElement(je,null)},K.t(`jc_Close`)))):null}};g();var bw={indeterminate:{opacity:.5},control:{flexDirection:`row`,width:`100%`}},xw=class extends X{constructor(...e){super(...e),q(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e??=``,Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===X.DIFFERENT_VALUE?{_value:X.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(`,`,`.`),e===`-`))return null;let t=e===``?0:parseFloat(e);return e!==``&&Number.isNaN(t)?`jc_Not a number`:e!==``&&window.isFinite(t)?this.props.schema.min!==void 0&&t<this.props.schema.min?`jc_Too small`:this.props.schema.max!==void 0&&t>this.props.schema.max?`jc_Too big`:e===``||e===`-`||Number.isNaN(t)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){var n;let r=Array.isArray(this.state._value)||this.state._value===X.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0),r){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString(),value:e})))||[];return r.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(A,{style:bw.indeterminate,fullWidth:!0,freeSolo:!0,value:r[0],getOptionSelected:(e,t)=>e.label===t.label,onChange:(e,t)=>{if(this.props.attr){let e=this.onChange(this.props.attr,t==null?void 0:t.value,()=>{this.setState({_value:t==null?void 0:t.value,oldValue:this.state._value})});e instanceof Promise&&e.catch(e=>console.error(e))}},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ft,{...n,label:this.getText(this.props.schema.label),variant:`standard`,slotProps:{htmlInput:{...n.slotProps.htmlInput,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:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&=K.t(e));let i=parseFloat(((n=this.state._value)==null?void 0:n.toString().replace(`,`,`.`))||``);return _.createElement(Mn,{variant:`standard`,style:bw.control},_.createElement(ft,{sx:{"& .up-down":{display:`none`},"&:hover .up-down":{display:`block`}},variant:`standard`,type:Number.isNaN(i)?`text`:this.props.schema.min!==void 0&&this.props.schema.min>=0?`number`:`text`,fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??``,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value,n=this.checkValue(t);n?this.onError(this.props.attr,K.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{let e=parseFloat(t.toString().replace(`,`,`.`));Number.isNaN(e)?this.onChange(this.props.attr,t.toString().replace(`,`,`.`)):this.onChange(this.props.attr,e)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}};g();var Sw=class extends X{constructor(e){super(e),q(this,`authWindow`,void 0),q(this,`oid`,void 0),q(this,`url`,void 0),q(this,`onTokensUpdated`,(e,t)=>{if(t!=null&&t.val){let e=JSON.parse(t.val);if(new Date(e.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:``})}),q(this,`onMessage`,e=>{if(e.origin===`https://oauth2.iobroker.in`&&(typeof e.data==`string`&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message==`string`&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){let i=(e.data||e.message).split(`:`);if(i[1]===`success`){var t;this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage(`close`,e.origin),this.authWindow=null}else{var n,r;(n=(r=this.props).onError)==null||n.call(r,i[2])}}}),this.state={...this.state,accessTokens:``,success:!1,blocked:!1,running:!1,pressed:!1,clientId:``,clientSecret:``,accessTokenError:``},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||`oauth2Tokens`}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener(`message`,this.onMessage,!1):window.attachEvent(`onmessage`,this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:X.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=X.getValue(this.props.data,this.props.schema.ownClientSecret));let t=await this.props.oContext.socket.getState(this.oid);if(t){let n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener(`message`,this.onMessage,!1):window.detachEvent(`onmessage`,this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith(`{`)&&(e=atob(e));let t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=X.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(e=>console.log(`Error occurred: ${e.toString()}`)))}catch(e){console.warn(e)}}onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:``),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||this.authWindow.closed===void 0?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n=``;if(this.state.accessTokens)try{let e=JSON.parse(this.state.accessTokens);n=new Date(e.access_token_expires_on).toLocaleString()}catch{}let r;r=this.state.accessTokens?this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):K.t(`jc_Renew %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):this.props.schema.label?this.getText(this.props.schema.label):K.t(`jc_Get %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));let i=this.getIcon();return _.createElement(`div`,{style:{width:`100%`,margin:`0 0 1rem 0`}},this.props.schema.ownClientId?_.createElement(ft,{value:this.state.clientId,onChange:e=>{let t=e.target.value;this.setState({clientId:t},()=>this.onChange(this.props.schema.ownClientId,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:K.t(`jc_OAuth Client ID`),slotProps:{input:{endAdornment:this.state.clientId?_.createElement(ur,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientId:``},()=>this.onChange(this.props.schema.ownClientId,``))},_.createElement(je,null)):null}}}):null,this.props.schema.ownClientSecret?_.createElement(ft,{value:this.state.clientSecret,onChange:e=>{let t=e.target.value;this.setState({clientSecret:t},()=>this.onChange(this.props.schema.ownClientSecret,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:K.t(`jc_OAuth Client secret`),slotProps:{input:{endAdornment:this.state.clientSecret?_.createElement(ur,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientSecret:``},()=>this.onChange(this.props.schema.ownClientSecret,``))},_.createElement(je,null)):null}}}):null,_.createElement(Ge,{disabled:this.state.running||!!(this.props.schema.ownClientSecret&&!this.state.clientSecret)||!!(this.props.schema.ownClientId&&!this.state.clientId),endIcon:i||_.createElement(ze,null),variant:`contained`,onClick:()=>this.onOpenUrl()},r),this.state.blocked?_.createElement(`div`,{style:{color:`red`,fontSize:16,marginTop:20}},K.t(`jc_Please allow popups in your browser for this page!`)):null,this.state.accessTokens?_.createElement(`div`,{style:{color:`green`,fontSize:16,marginTop:20}},this.props.alive?K.t(`jc_Successfully authorized. Token valid till %s and will be automatically renewed.`,n):K.t(`jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,n)):null,this.state.pressed?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{width:`100%`,margin:`1rem 0 1rem 0`}},_.createElement(`span`,{style:{marginRight:4}},`${K.t(`jc_If the button above does not work, you can authorize manually this app by visiting this url`)}`,`:`),_.createElement(`br`,null),_.createElement(`a`,{target:this.props.schema.identifier,href:this.url,rel:`noreferrer`},this.url)),_.createElement(ft,{value:this.state.accessTokens,label:K.t(`jc_Enter the code from that page here`),variant:`standard`,error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||``,onChange:e=>{let t=e.target.value;try{t!=null&&t.trim()&&!t.trim().startsWith(`{`)&&(t=atob(t.trim()))}catch{this.setState({accessTokenError:`Invalid access token. Cannot decode from base64`})}if(t!=null&&t.startsWith(`{`))try{let e=JSON.parse(t);e.access_token&&(e.access_token_expires_on=new Date(Date.now()+(e.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(e),accessTokenError:``},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:t,accessTokenError:`Invalid access token. Cannot parse JSON`})}else t&&this.setState({accessTokens:t,accessTokenError:`Invalid access token. Not JSON`})},fullWidth:!0})):null)}};g();var Cw={flex:{display:`flex`},button:{maxHeight:48,marginLeft:4,minWidth:48}},ww=class extends X{constructor(...e){super(...e),q(this,`fillOnSelect`,[]),q(this,`onObjectChanged`,async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{let e=t&&await this.getCachedObject(t);if(e){for(let t of this.fillOnSelect)if(t.overwrite||!X.getValue(this.props.data,t.attr)){let n=X.getValue(e,t.pathInObject);typeof n==`object`&&(n=this.getText(n,!0)),await this.onChange(t.attr,n)}}}catch(e){console.error(e.toString())}})}async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;if(this.props.schema.fillOnSelect){let e=this.props.schema.fillOnSelect.split(`,`).map(e=>e.trim());for(let t of e){let e=t.split(`=>`);if(e.length===2){let t={pathInObject:e[0],attr:e[1]};(t.attr.includes(`(X)`)||t.attr.includes(`(x)`))&&(t.overwrite=!0,t.attr=t.attr.replace(/\(X\)|\(x\)/g,``)),this.fillOnSelect.push(t)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}renderItem(e,t){if(!this.state.initialized)return null;let n=this.props.oContext.socket,{schema:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},r.label?_.createElement(Ze,{shrink:!0},this.getText(r.label)):null,_.createElement(`div`,{style:Cw.flex},_.createElement(ft,{variant:`standard`,fullWidth:!0,value:a,error:!!e,disabled:t,placeholder:this.getText(r.placeholder),label:this.getText(r.label),helperText:this.renderHelp(r.help,r.helpLink,r.noTranslation),onChange:e=>{let t=Array.isArray(e.target.value)?e.target.value[0]:e.target.value;this.setState({value:t},()=>i&&void this.onObjectChanged(i,t))}}),_.createElement(Ge,{color:`grey`,disabled:t,style:Cw.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},`...`)),o?_.createElement(Dn,{imagePrefix:this.props.oContext.imagePrefix??`../..`,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:r.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:r.types?Array.isArray(r.types)?r.types:[r.types]:void 0,customFilter:r.customFilter,filters:r.filters,socket:n,selected:a,root:r.root,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({showSelectId:!1,value:t},()=>i&&void this.onObjectChanged(i,t))}}):null)}};g();var Tw={fullWidth:{width:`100%`,display:`inline-block`},halfWidth1:{width:`calc(50% - 5px)`,display:`inline-block`,marginRight:8},halfWidth2:{width:`calc(50% - 5px)`,display:`inline-block`}},Ew=`____ppp____`,Dw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?Ew:``,_visible:!1,value:e?Ew:``,_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);let n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,K.t(`jc_Passwords are not equal!`));else{this.onError(this.props.attr);let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(this.props.attr,e))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;let n=_.createElement(ft,{variant:`standard`,fullWidth:!0,type:this.state._visible&&this.state.value!==Ew?`text`:`password`,value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(e.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:`new-password`,endAdornment:this.state.value&&this.state.value!==Ew&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?_.createElement(sr,{position:`end`},_.createElement(ur,{size:`large`,tabIndex:-1,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:`end`},this.state._visible?_.createElement(et,null):_.createElement(nr,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?K.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){let r=this.state._visible?null:_.createElement(ft,{variant:`standard`,fullWidth:!0,type:`password`,value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(void 0,e.target.value),label:`${this.getText(this.props.schema.label)} (${K.t(`jc_repeat`)})`,slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?K.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return _.createElement(`div`,{style:Tw.fullWidth},_.createElement(`div`,{style:Tw.halfWidth1},n),_.createElement(`div`,{style:Tw.halfWidth2},r))}return n}};g();var Ow=class extends X{constructor(...e){super(...e),q(this,`checkTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),_.createElement(ft,{variant:`standard`,fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(ur,{tabIndex:-1,size:`small`,onClick:async()=>{$t.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(K.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.pattern||``,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var kw={warning:{"& .Mui-error":{color:`orange`}}},Aw=class extends X{constructor(...e){super(...e),q(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);e??=``,this.setState({_value:e.toString(),oldValue:e.toString()});let t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,r=await this.getCachedObject(n),i=r==null?void 0:r.common.host,a=[];t.forEach(e=>{var t,r;if(!e||e._id===n||e.common.host!==i||!((t=e.native)!=null&&t.bind))return;if(e!=null&&e.native&&e.native.secure&&e.native.leEnabled&&e.native.leUpdate){let t=parseInt(e.native.leCheckPort||e.native.lePort,10);if(t){var o;a.push({name:`${e._id.replace(`system.adapter.`,``)} (LE)`,port:t,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,bind:e.native.bind,enabled:!!((o=e.common)!=null&&o.enabled)})}}let s=parseInt(e==null||(r=e.native)==null?void 0:r.port,10);if(s){var c;a.push({name:e._id.replace(`system.adapter.`,``),bind:e.native.bind,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,port:s,enabled:!!((c=e.common)!=null&&c.enabled)})}}),this.setState({ports:a})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;let t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();let r=e===``?0:parseInt(e,10);return e!==``&&Number.isNaN(r)?`jc_Not a number`:e!==``&&window.isFinite(Number(e))?r<t?`jc_Too small`:r>n?`jc_Too big`:e===``||e===`-`||Number.isNaN(r)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0);let n=this.props.schema.min??20,r=this.props.schema.max||65535,i;if(this.state.ports){let t=parseInt(this.state._value,10);if(t){let n=this.props.data.bind,r=this.state.ports.filter(e=>{if(e.port!==t)return!1;let r=e.bind,i=e.v6bind;return!n||!r||n===`0.0.0.0`||r===`0.0.0.0`||n===`::`||i===`::`||n===r||n===i}),a=r.findIndex(e=>e.port===t&&e.enabled);if(a!==-1){let n=this.state.ports.find(e=>e.port===t&&e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=K.t(`jc_Port is already used by %s`,(n==null?void 0:n.name)||r[a].name)}else if(a=r.findIndex(e=>e.port===t&&!e.enabled),a!==-1){i=!0;let n=this.state.ports.find(e=>e.port===t&&!e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=K.t(`jc_Port could be used by %s`,(n==null?void 0:n.name)||r[a].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e==`string`&&(e=K.t(e))),_.createElement(ft,{variant:`standard`,type:`number`,fullWidth:!0,slotProps:{htmlInput:{min:n,max:r,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??``,error:!!e,disabled:!!t,sx:i?kw.warning:void 0,onChange:e=>{let t=Number(e.target.value.toString().replace(/[^0-9]/g,``)).toString(),n=this.checkValue(t);n?this.onError(this.props.attr,K.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{if(t.trim()===parseInt(t,10).toString()){let e=this.onChange(this.props.attr,parseInt(t,10)||0);e instanceof Promise&&e.catch(e=>{console.error(`Cannot set value for ${this.props.attr}: ${e}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var jw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`rooms`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.rooms.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(e=>console.error(`Cannot get enums: ${e}`))}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(jn,{value:n.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(jn,{value:e.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):e.label))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Mw={fullWidth:{width:`100%`},noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}},Nw=class extends X{constructor(...e){super(...e),q(this,`initialValue`,``)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]);let t=[];for(let e of this.props.schema.options||[]){let n=e;if(Array.isArray(n.items)){let r={label:this.getText(e.label,this.props.schema.noTranslation),value:e.value,group:!0,color:e.color,description:this.getText(e.description)};r.hiddenValue=await this.isHidden(r),t.push(r);for(let e of n.items){let n={label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,color:e.color,description:this.getText(e.description),icon:e.icon};n.hiddenValue=await this.isHidden(n),t.push(n)}}else{let n={label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,color:e.color,description:this.getText(e.description),icon:e.icon};n.hiddenValue=await this.isHidden(n),t.push(n)}}if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)!n.group&&n.value!==X.DIFFERENT_VALUE&&(e[n.value.toString()]=n.label);this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)&&!this.props.schema.multiple?(this.initialValue=[...e],t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderRadio(e,t){var n;let r=(n=this.state.selectOptions)==null?void 0:n.filter(e=>!e.hiddenValue&&!e.group),i=this._getValue();return _.createElement(Mn,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Xt,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{row:!!this.props.schema.horizontal,value:i==null?``:i.toString(),onChange:e=>{let t=r==null?void 0:r.find(t=>t.value.toString()===e.target.value),n=t?t.value:e.target.value;this.setState({value:n},()=>{let e=this.onChange(this.props.attr,n);e instanceof Promise&&e.catch(e=>console.error(e))})}},r==null?void 0:r.map((e,t)=>_.createElement(bn,{key:t,value:e.value.toString(),control:_.createElement(ke,null),title:e.description||``,label:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},e.icon?_.createElement(Pt,{src:e.icon,style:Mw.icon}):null,_.createElement(be,{component:`span`,style:{color:e.color}},e.label)),style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format===`radio`)return this.renderRadio(e,t);let n=this.state.selectOptions.filter(e=>!e.hiddenValue),r=this._getValue(),i=this.props.schema.multiple?null:n.find(e=>e.value==r);return _.createElement(Mn,{variant:`standard`,fullWidth:!0,sx:this.props.table===void 0?void 0:Mw.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:r||`_`,renderValue:e=>this.props.schema.multiple?_.createElement(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=n.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(qn,{key:e,label:n})}return null})):i!=null&&i.color?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Pt,{src:i.icon,style:Mw.icon}):null,_.createElement(`span`,null,_.createElement(`div`,{style:{color:i.color}},i.label??e),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},_.createElement(Pt,{src:i.icon,style:Mw.icon}),e):e:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Pt,{src:i.icon,style:Mw.icon}):null,_.createElement(`span`,null,_.createElement(`div`,null,i.label),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>{let e;e=this.state.value===X.DIFFERENT_VALUE?this.onChange(this.props.attr,this.initialValue):this.onChange(this.props.attr,this.state.value),e instanceof Promise&&e.catch(e=>console.error(e))})}},n.map((e,t)=>e.group?_.createElement(B,{key:t,style:{color:e.color}},_.createElement(`div`,null,e.label),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},e.description):null):_.createElement(Ie,{key:t,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?_.createElement(Ht,{checked:r.includes(e.value),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r.indexOf(e.value);n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,e.icon?_.createElement(Pt,{src:e.icon,style:Mw.icon}):null,_.createElement(tt,{primary:e.label,secondary:e.description,slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}},style:{color:e.color}})))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Pw={menuPaper:{maxHeight:800}},Fw=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null,this.setState({running:!0},async()=>{let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}try{let n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e);this.reportFilterLabels(n);for(let e of n)e.hiddenValue=await this.isHidden(e);this.setState({list:n,running:!1})}catch(e){console.error(`Cannot send command: ${e}`)}})}else{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value==null?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){var n;if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let r=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?K.t(`jc_Cannot retrieve options, as instance is offline`):_.createElement(ft,{variant:`standard`,fullWidth:!0,value:r,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?_.createElement(sr,{position:`end`},_.createElement(ur,{tabIndex:-1,size:`small`,onClick:()=>this.setState({value:``},()=>this.onChange(this.props.attr,``))},_.createElement(je,null))):null}}});if(this.state.running)return _.createElement(wn,{size:`24`});let i=(n=this.state.list)==null?void 0:n.filter(e=>!e.hiddenValue),a=i==null?void 0:i.find(e=>e.value===r);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:this.props.schema.multiple?{"&.MuiSelect-paper":Pw.menuPaper}:void 0,value:r||``,renderValue:e=>this.props.schema.multiple?_.createElement(ht,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=i==null?void 0:i.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(qn,{key:e,label:n})}return null})):this.getText((a==null?void 0:a.label)||e,this.props.schema.noTranslation),onChange:e=>{let t=this.onChange(this.props.attr,e.target.value);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},i==null?void 0:i.map((e,t)=>e.group?_.createElement(B,{key:t},_.createElement(`div`,null,this.getText(e.label,this.props.schema.noTranslation)),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},this.getText(e.description)):null):_.createElement(Ie,{key:t,value:e.value},this.props.schema.multiple?_.createElement(Ht,{checked:r==null?void 0:r.includes(e.value.toString()),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r==null?void 0:r.indexOf(e.value.toString());n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,_.createElement(tt,{primary:this.getText(e.label),secondary:this.getText(e.description),slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}}})))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Iw={fullWidth:{width:`100%`}};function Lw(e){return e.split(`.`).reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function Rw(e,t){var n;let r=e==null||(n=e.native)==null||(n=n.hardware)==null?void 0:n.networkInterfaces;if(!r)return null;let i;return Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv4`&&!e.address.startsWith(`172`)&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(Lw(t)&Lw(e.netmask),Lw(e.address)&Lw(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv6`&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(Lw(t)&Lw(e.netmask),Lw(e.address)&Lw(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(i=(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/),e.address))})}),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||(i=e.address)})}),i||null}var zw=class extends X{async componentDidMount(){await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){let n=await this.props.oContext.socket.getCurrentInstance(),r=await this.getCachedObject(`system.adapter.${n}`);if(r){var t;let n=await this.getCachedObject(`system.host.${r==null||(t=r.common)==null?void 0:t.host}`);if(n){let t=Rw(n,window.location.hostname);if(t)e=`${t}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${r.common.host} for ${r._id}`);return}}}}await new Promise(t=>{this.setState({_error:``,_message:``,hostname:e},t)}),this.props.schema.onLoaded&&this._onClick().catch(e=>console.error(e))}renderErrorDialog(){return this.state._error?_.createElement(rn,{text:this.state._error,onClose:()=>this.setState({_error:``})}):null}renderMessageDialog(){return this.state._message?_.createElement(Et,{text:this.state._message,onClose:()=>this.setState({_message:``})}):null}renderCopyDialog(){return this.state._copyDialog?_.createElement(qS,{title:this.getText(this.state._copyDialog.title||K.t(`jc_Result`)),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{Yt(this.state._copyDialog.text),window.alert(K.t(`jc_Copied`)),this.setState({_copyDialog:null})},titleButtonApply:K.t(`jc_Copy content`)},_.createElement(`div`,{style:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},_.createElement(mw,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:`CopyDialog`,themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});let e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,``)}`,t=`${window.location.protocol}//${this.state.hostname.split(`:`).length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,``)}`,n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let r=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(r)}catch{console.error(`Cannot parse json data: ${r}`)}}n??=null,this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let r;this.props.schema.timeout&&(r=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:K.t(`jc_Request timed out`),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));let i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||`send`,n).then(async e=>{if(r&&=(clearTimeout(r),void 0),e!=null&&e.error){var t;if((t=this.props.schema.error)!=null&&t[e.error]){var n;let t=this.getText(this.props.schema.error[e.error]);(n=e.args)==null||n.forEach(e=>t=t.replace(`%s`,e)),this.setState({_error:t})}else this.setState({_error:e.error?typeof e.error==`string`?K.t(e.error):JSON.stringify(e.error):K.t(`jc_Error`)})}else{var i;if(e!=null&&e.command){var a,o;(a=(o=this.props.oContext).onBackEndCommand)==null||a.call(o,e.command);return}if(e!=null&&e.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(e!=null&&e.openUrl&&this.props.schema.openUrl)window.open(e.openUrl,e.window||this.props.schema.window||`_blank`);else if(e!=null&&e.result&&(i=this.props.schema.result)!=null&&i[e.result]){var s;let t=this.getText(this.props.schema.result[e.result]);(s=e.args)==null||s.forEach(e=>t=t.replace(`%s`,e)),window.alert(t)}if(e!=null&&e.native&&this.props.schema.useNative){for(let[t,n]of Object.entries(e.native))await this.onChangeAsync(t,n);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(e.native),this.props.data),300)}else e!=null&&e.result?window.alert(typeof e.result==`object`?JSON.stringify(e.result):e.result):e!=null&&e.copyDialog?this.setState({_copyDialog:e.copyDialog}):window.alert(K.t(`jc_Ok`));e!=null&&e.saveConfig&&this.props.onChange(void 0,null,void 0,!0)}}).catch(e=>{this.props.schema.error&&this.props.schema.error[e.toString()]?this.setState({_error:this.getText(this.props.schema.error[e.toString()])}):this.setState({_error:K.t(e.toString())||K.t(`jc_Error`)})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)throw Error(`Confirm dialog requested but no confirm data provided`);let t=null;return e.type===`warning`?t=_.createElement(ae,null):e.type===`error`?t=_.createElement(N,null):e.type===`info`&&(t=_.createElement(Wt,null)),_.createElement(Cn,{title:this.getText(e.title)||K.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||K.t(`jc_Ok`),cancel:this.getText(e.cancel)||K.t(`jc_Cancel`),icon:t||void 0,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:Iw.fullWidth},_.createElement(Ge,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...Iw.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||``:K.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(e=>console.error(e))}},this.props.schema.showProcess&&this.state.running?_.createElement(wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}};g();var Bw={fullWidth:{width:`100%`}},Vw=class extends X{async _onClick(){let e=this.props.schema.val;if(typeof e==`string`&&e.includes("${")){var t,n;e=await this.getPatternAsync(e,null,!0);let r=await this.getCachedObject(this.props.schema.id);(r==null||(t=r.common)==null?void 0:t.type)===`number`?e=parseFloat(e):(r==null||(n=r.common)==null?void 0:n.type)===`boolean`&&(e=e===`true`||e===!0||e===`1`||e===1)}let r=(this.props.schema.id||``).replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(r,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(e){this.props.schema.error&&this.props.schema.error[e.toString()]?window.alert(this.getText(this.props.schema.error[e.toString()])):window.alert(K.t(e.toString())||K.t(`jc_Error`))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)return null;let t;return e.type===`warning`?t=_.createElement(ae,null):e.type===`error`?t=_.createElement(N,null):e.type===`info`&&(t=_.createElement(Wt,null)),_.createElement(Cn,{title:this.getText(e.title)||K.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||K.t(`jc_Ok`),cancel:this.getText(e.cancel)||K.t(`jc_Cancel`),icon:t,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(Ge,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:Bw.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}};g();var Hw={fullWidth:{width:`100%`},slider:{marginLeft:10,marginRight:10,width:`calc(100% - 20px)`}},Uw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){let n=this.props.schema.min||0,r=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):``,a=[{value:n,label:n+i},{value:r,label:r+i}];return _.createElement(ht,{style:Hw.fullWidth},this.props.schema.label?_.createElement(be,{gutterBottom:!0},this.getText(this.props.schema.label)):null,_.createElement(le,{style:Hw.slider,value:this.state._value,getAriaValueText:e=>e+i,step:this.props.schema.step||(r-n)/100,valueLabelDisplay:`auto`,marks:a,min:n,max:r,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({_value:t},()=>this.onChange(this.props.attr,t))}}),this.props.schema.help?_.createElement(be,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();function Ww(e,t){return e===`edit`||e===`rename`?_.createElement(fr,{style:t}):e===`delete`?_.createElement(we,{style:t}):e===`refresh`?_.createElement($e,{style:t}):e===`newDevice`||e===`new`||e===`add`?_.createElement(Re,{style:t}):e===`discover`||e===`search`?_.createElement(nt,{style:t}):e===`unpairDevice`||e===`unpair`?_.createElement(kt,{style:t}):e===`pairDevice`||e===`pair`?_.createElement(sn,{style:t}):e===`identify`?_.createElement(Pn,{style:t}):e===`play`?_.createElement(Tt,{style:t}):e===`stop`?_.createElement(dn,{style:t}):e===`pause`?_.createElement(nn,{style:t}):e===`forward`||e===`next`?_.createElement(fe,{style:t}):e===`rewind`||e===`previous`?_.createElement(rt,{style:t}):e===`lamp`||e===`light`?_.createElement(Vn,{style:t}):e===`backlight`?_.createElement(gt,{style:t}):e===`dimmer`?_.createElement(z,{style:t}):e===`socket`?_.createElement(tr,{style:t}):e===`settings`?_.createElement(ie,{style:t}):e===`users`||e===`group`?_.createElement(yt,{style:t}):e===`user`?_.createElement(Qt,{style:t}):e===`qrcode`?_.createElement(cr,{style:t}):e===`connection`?_.createElement(Fe,{style:t}):e===`no-connection`?_.createElement(fn,{style:t}):e===`visible`?_.createElement(nr,{style:t}):null}g();function Gw(e,t){return typeof t==`string`?{"@keyframes newStateAnimationOnceColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnceColor 2s ease-in-out`}:{"@keyframes newStateAnimationOnce":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnce 2s ease-in-out`}}var Kw=class extends X{constructor(...e){super(...e),q(this,`controlTimeout`,null),q(this,`delayedUpdate`,{timer:null,value:null}),q(this,`onStateChanged`,(e,t)=>{let n=t?t.val:null;this.state.controlType===`button`||this.state.controlType===`switch`?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType===`slider`||this.state.controlType===`number`)?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n===this.state.stateValue?this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null):(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500))):(this.state.stateValue===null||this.state.stateValue===void 0?null:this.state.stateValue.toString())!==(n==null?null:n.toString())&&this.setState({stateValue:n})})}async getObjectID(){let e=(this.props.schema.oid||``).toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?`system.adapter.`:``}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var e;await super.componentDidMount();let t=await this.getObjectID(),n=await this.getCachedObject(t);if(n!=null&&(e=n.common)!=null&&e.states&&!this.props.schema.options){var r;if(Array.isArray(n==null||(r=n.common)==null?void 0:r.states)){let e={};n.common.states.forEach((t,n)=>{e[n.toString()]=t}),n.common.states=e}Object.keys(n.common.states).length||(n.common.states=void 0)}let i=this.props.schema.control||this.detectType(n);try{let e=await this.props.oContext.socket.getState(t);this.setState({stateValue:e?e.val:null,controlType:i,obj:n,objId:t},async()=>{let e=await this.getObjectID();await this.props.oContext.socket.subscribeState(e,this.onStateChanged)})}catch(e){console.error(`Cannot get state ${t}: ${e}`),this.setState({controlType:i,obj:n,objId:t})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}detectType(e){if(e||={},e.common||={},e.common.type===`boolean`){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return`button`;if(e.common.write||this.props.schema.controlled===!0)return`switch`}return`text`}return e.common.type===`number`&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?`select`:e.common.max===void 0?`input`:`slider`:`text`:e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?`select`:`input`:`text`}getNormalizedStates(){var e;let t;return this.props.schema.options?t=this.props.schema.options.map(e=>typeof e==`string`?{value:e,label:this.getText(e,this.props.schema.noTranslation)}:{value:e.value,label:this.getText(e.label,this.props.schema.noTranslation),color:e.color}):(e=this.state.obj)!=null&&e.common.states?(t=[],Object.keys(this.state.obj.common.states).forEach(e=>{t.push({value:e,label:this.getText(this.state.obj.common.states[e],this.props.schema.noTranslation)})})):t=[],t}renderItem(e,t){var n;if(!this.state.obj)return null;let r;if(this.state.controlType===`select`||!this.state.controlType&&(this.state.obj.common.type===`number`||this.state.obj.common.type===`string`)&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates(),n=e.find(e=>e.value===this.state.stateValue);r=_.createElement(Mn,{fullWidth:!0},_.createElement(Ze,null,this.getText(this.props.schema.label)),_.createElement(Be,{value:this.state.stateValue??``,disabled:!!this.props.schema.readOnly||t,onChange:e=>{this.setState({stateValue:e.target.value},()=>{var e;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&this.props.oContext.socket.setState(this.state.objId,t,!1)})},renderValue:e=>n!=null&&n.color?_.createElement(`div`,{style:{color:n.color}},n.label):e},e.map(e=>_.createElement(Ie,{key:(e.value??``).toString(),value:e.value,style:{color:e.color}},`$`,e.label))))}else if(this.state.controlType===`button`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(n=this.state.obj.common.role)!=null&&n.includes(`button`))){let e=null;this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage));let n=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);r=!n&&e?_.createElement(ur,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},e):_.createElement(Ge,{variant:this.props.schema.variant||`contained`,startIcon:e,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},n||(this.state.objId||``).split(`.`).pop())}else if(this.state.controlType===`input`||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type===`string`)r=_.createElement(`div`,{style:{width:`100%`,display:`flex`,flexDirection:`row`,gap:8,alignItems:`baseline`}},_.createElement(ft,{style:{flex:1},value:this.state.stateValue,variant:`standard`,disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:e=>{this.props.schema.setOnEnterKey&&e.key===`Enter`&&this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{var e;this.controlTimeout=null;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,t,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&_.createElement(Ge,{variant:`outlined`,disabled:t,onClick:()=>{this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)}},this.getText(typeof this.props.schema.showEnterButton==`string`?this.props.schema.showEnterButton:`Set`)));else{var i,a,o,s;let e;this.props.schema.size===`normal`?e=16:this.props.schema.size===`large`?e=20:typeof this.props.schema.size==`number`&&(e=this.props.schema.size);let n=this.getText(this.props.schema.label,this.props.schema.noTranslation),c={display:`flex`,alignItems:`center`,fontSize:e||`1rem`,gap:8};this.props.schema.narrow||(c.width=`100%`,c.justifyContent=`space-between`),n.trim()&&!n.trim().endsWith(`:`)&&this.props.schema.addColon&&(n=`${n.trim()}:`);let l;this.props.schema.blinkOnUpdate&&(l=Gw(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let u;this.props.schema.labelIcon&&(u=_.createElement(Pt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let d;if(n&&u?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},u,n):n?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},n):u&&(d=u),this.state.controlType===`switch`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes(`switch`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=Ww(this.props.schema.trueImage,a?{marginRight:8}:void 0)),r=_.createElement(He,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,alignItems:`center`,fontSize:14}},_.createElement(`span`,{style:this.props.schema.falseTextStyle},n,e),r,_.createElement(`span`,{style:this.props.schema.trueTextStyle},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.controlType===`slider`||!this.state.controlType&&this.state.obj.common.type===`number`&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit===`%`)||(a=this.state.obj.common.role)!=null&&a.includes(`slider`)||(o=this.state.obj.common.role)!=null&&o.includes(`dimmer`)||(s=this.state.obj.common.role)!=null&&s.includes(`blind`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=Ww(this.props.schema.trueImage,a?{marginRight:8}:void 0));let o=this.props.schema.min??(this.state.obj.common.min||0),s=this.props.schema.max??this.state.obj.common.max??100,l=this.props.schema.step??(this.state.obj.common.step||1);r=_.createElement(le,{style:{width:`100%`,flexGrow:1},min:o,max:s,disabled:!!this.props.schema.readOnly||t,step:l,value:this.state.stateValue,valueLabelDisplay:`auto`,valueLabelFormat:e=>{var t;let n=this.props.schema.digits===void 0?e.toString():e.toFixed(this.props.schema.digits);return this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`)),`${n}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||((t=this.state.obj)==null?void 0:t.common.unit)||``}`},onChange:(e,t)=>{Array.isArray(t)&&(t=t[0]),this.setState({stateValue:t},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},this.props.schema.controlDelay||0)})}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,width:`100%`,flexGrow:1,alignItems:`center`}},_.createElement(`span`,{style:{marginRight:16,...this.props.schema.falseTextStyle}},n,e),r,_.createElement(`span`,{style:{marginLeft:16,...this.props.schema.trueTextStyle}},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.obj.common.type===`number`&&this.state.obj.common.write&&!this.state.controlType){let e=this.props.schema.min??this.state.obj.common.min??void 0,n=this.props.schema.max??this.state.obj.common.max??void 0,i=this.props.schema.step??this.state.obj.common.step??void 0;r=_.createElement(ft,{variant:`standard`,style:{width:`100%`},value:this.state.stateValue,type:`number`,disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:e,max:n,step:i,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{if(this.controlTimeout=null,this.state.objId){let e=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,e,!1)}},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type===`boolean`){let e=null,t,n;this.state.stateValue?(t=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(e=Ww(this.props.schema.falseImage,t?{marginRight:8}:void 0)),n=this.props.schema.trueTextStyle):(t=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage,t?{marginLeft:8}:void 0)),n=this.props.schema.falseTextStyle),n=Object.assign(c,n),r=_.createElement(`div`,{style:n},d,_.createElement(ht,{style:{display:`flex`,alignItems:`center`,gap:8},sx:l,key:this.props.schema.blinkOnUpdate?t:void 0},e,t||(this.state.stateValue?K.t(`jc_true`):K.t(`jc_false`))))}else{let e=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit,t=this.state.stateValue;if(t!=null&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates().find(e=>e.value.toString()===t.toString());e&&(t=e.label)}let n,i;this.state.controlType===`html`?(i=(t??``).toString(),n=_.createElement(`span`,{dangerouslySetInnerHTML:{__html:t}})):this.state.stateValue===null?(n=`null`,i=n):this.state.stateValue===void 0?(n=`undefined`,i=n):(this.props.schema.digits!==void 0&&typeof t==`number`?(n=t.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`))):n=(t??``).toString(),i=n),r=_.createElement(`div`,{style:c},d,_.createElement(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:4}},_.createElement(ht,{sx:l,key:this.props.schema.blinkOnUpdate?i:void 0},n),e?_.createElement(`span`,{style:{opacity:.7,fontSize:`smaller`}},e):null))}}return r}};g();var qw={fullWidth:e=>({width:`100%`,backgroundColor:e.palette.mode===`dark`?`#FFF`:`#000`,borderStyle:`hidden`}),primary:e=>({backgroundColor:e.palette.primary.main}),secondary:e=>({backgroundColor:e.palette.secondary.main})},Jw=class extends X{renderItem(){return _.createElement(ht,{component:`hr`,sx:$t.getStyle(this.props.oContext.theme,qw.fullWidth,this.props.schema.color===`primary`?qw.primary:this.props.schema.color===`secondary`?qw.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType===`dark`?`#333`:`#ddd`)},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}};g();var Yw={header:e=>({width:`100%`,background:e.palette.primary.main,color:e.palette.primary.contrastText,padding:`4px !important`,borderRadius:`3px`,marginBlockEnd:0,marginBlockStart:0})},Xw=class extends X{renderItem(){let e=`h5`;switch((this.props.schema.size||5).toString()){case`1`:e=`h1`;break;case`2`:e=`h2`;break;case`3`:e=`h3`;break;case`4`:e=`h4`;break;default:e=`h5`}return _.createElement(ht,{component:e,sx:Yw.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}};g();var Zw=class extends X{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(`.`)&&!e.startsWith(`http`)&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){let{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){let n=e.showInDialogSmallSize||100,r=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):``;return _.createElement(_.Fragment,null,_.createElement(Ln,{title:K.t(`jc_Click to see in full size`)},_.createElement(`img`,{src:t,style:{cursor:`pointer`,width:`auto`,height:n,objectFit:`contain`},alt:``,onClick:()=>this.setState({showDialog:!0})})),` `,r?_.createElement(Ge,{variant:`outlined`,color:`grey`,onClick:()=>this.setState({showDialog:!0})},r):null,this.state.showDialog?_.createElement(Dt,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:`lg`},_.createElement(Un,null,_.createElement(Pt,{src:t,style:{width:`100%`,height:`100%`,objectFit:`contain`}})),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,onClick:()=>this.setState({showDialog:!1}),color:`primary`},K.t(`jc_Close`)))):null)}return _.createElement(`img`,{src:t,style:{cursor:e.href?`pointer`:void 0,width:`100%`,height:`100%`},onClick:e.href?()=>e.href&&window.open(e.href,`_blank`):void 0,alt:``})}};g();function Qw(e,t,n){return typeof n==`string`?{"@keyframes newValueAnimationOnceColor":{"0%":{color:t?`${n} !important`:n},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnceColor 2s ease-in-out`}:{"@keyframes newValueAnimationOnce":{"0%":{color:t?`#00f900 !important`:`#00f900`},"80%":{color:e.palette.mode===`dark`?t?`#518851 !important`:`#518851`:t?`#008000 !important`:`#008000`},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnce 2s ease-in-out`}}function $w(e,t){return typeof t==`string`?{"@keyframes blinkAnimationColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimationColor 2s ease-in-out infinite`}:{"@keyframes blinkAnimation":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimation 2s ease-in-out infinite`}}var eT={label:{fontWeight:`bold`,whiteSpace:`nowrap`},valueImage:{maxHeight:`100%`},valueAndUnit:{display:`flex`,gap:4,alignItems:`baseline`},value:{},unit:{fontSize:`smaller`,opacity:.7}},tT=class extends X{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t==`string`&&!t.trim().endsWith(`:`)&&(t=`${t.trim()}:`),t&&(t.includes(`<a `)||t.includes(`<br`)||t.includes(`<b>`)||t.includes(`<i>`))&&(t=$t.renderTextWithA(t));let n;this.props.schema.size===`normal`?n=16:this.props.schema.size===`large`?n=20:typeof this.props.schema.size==`number`&&(n=this.props.schema.size);let r={width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,position:`relative`,fontSize:n};this.props.schema.narrow?r.gap=8:r.justifyContent=`space-between`;let i,a;this.props.schema.data&&typeof this.props.schema.data==`object`&&this.props.schema.data.en?a=this.getText(this.props.schema.data):typeof this.props.schema.data==`object`||this.props.schema.data===void 0||this.props.schema.data===null?a=JSON.stringify(this.props.schema.data):typeof this.props.schema.data==`number`?(a=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(a=a.replace(`.`,`,`))):a=this.props.schema.data.toString();let o=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data==`boolean`)i=_.createElement(Ht,{checked:this.props.schema.data,disabled:!0,size:this.props.schema.size===`small`?`small`:this.props.schema.size===`large`?`large`:void 0});else if(a.startsWith(`data:image/`))i=_.createElement(`div`,{style:{...eT.value,...eT.valueImage,...this.props.schema.styleValue||void 0}},_.createElement(Pt,{src:a}));else{let e={...eT.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=_.createElement(`div`,{style:e,dangerouslySetInnerHTML:{__html:a}}):Array.isArray(this.props.schema.data)?(o=!0,i=_.createElement(`div`,{style:e},this.props.schema.data.map((e,t)=>_.createElement(`div`,{key:t},typeof e==`object`||e==null?JSON.stringify(e):e)))):a.includes(`
|
|
1386
|
-
`)?(o=!0,i=_.createElement(`div`,{style:e},$t.renderTextWithA(a))):i=_.createElement(`div`,{style:e},a)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){let e=Qw(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),t=$w(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(ht,{key:a,sx:{...e,...t}},i)}else if(this.props.schema.blinkOnUpdate){let e=Qw(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=_.createElement(ht,{key:a,sx:e},i)}else if(this.props.schema.blink){let e=$w(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(ht,{sx:e},i)}this.props.schema.unit&&(i=_.createElement(`div`,{style:eT.valueAndUnit},i,_.createElement(`div`,{style:{...eT.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let s;this.props.schema.labelIcon&&(s=_.createElement(Pt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let c;this.props.schema.copyToClipboard&&(c=_.createElement(he,{className:`staticCopyButton`,style:{position:`absolute`,top:`calc(50% - 12px)`,right:0,cursor:`pointer`},onClick:()=>{$t.copyToClipboard(a),window.alert(K.t(`jc_Copied`))}}));let l={"& .staticCopyButton":{display:`none`},"& .staticCopyButton:action":{transform:`scale(0.9)`},"&:hover .staticCopyButton":{display:`block`}};return this.props.schema.highlight&&(l[`&:hover`]={backgroundColor:this.props.oContext.themeType===`dark`?`#51515180`:`#b8b8b880`}),o&&(r.alignItems=`top`),_.createElement(ht,{component:`div`,style:r,sx:l},_.createElement(`div`,{style:{...eT.label,...this.props.schema.styleLabel||void 0}},s,t),i,c)}};g();var nT={fullWidth:{height:`100%`,width:`100%`},link:e=>({textDecoration:`underline`,color:e.palette.mode===`dark`?`#4dabf5`:`#254e72`,cursor:`pointer`})};function rT(e,t,n){let r,i=``;e?e.toString().startsWith(`#`)||e.toString().startsWith(`/`)?(r=t||`_self`,i=e):e.startsWith(`http://`)||e.startsWith(`https://`)?(r=t||`_blank`,i=e):(i=`#tab-instances/config/${n}/${e}`,r=t||`_self`):(i=`#tab-instances/config/${n}`,r=t||`_self`),r===`_self`?setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}//${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i):(i.startsWith(`#`)?i=`${window.location.protocol}//${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}//${window.location.host}${i}`),window.open(i,r))}var iT=class extends X{renderItem(e,t){if(this.props.schema.button){let e=this.getIcon();return _.createElement(Ge,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...nT.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:e,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target,close:this.props.schema.close}):rT(e,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format===`html`)n=_.createElement(`div`,{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format===`json`)try{let e=typeof n==`string`?JSON.parse(n):n;n=_.createElement(`pre`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,margin:0}},JSON.stringify(e,null,2))}catch{}else n&&(n.includes(`<a `)||n.includes(`<br`)||n.includes(`<b>`)||n.includes(`<i>`))&&(n=$t.renderTextWithA(n));return _.createElement(ht,{component:`span`,style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?nT.link:void 0,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target||`_blank`,close:this.props.schema.close}):rT(e,this.props.schema.target||`_blank`,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},n)}};g();var aT=1048576,oT={fullWidth:{width:`100%`},root:{width:`100%`},paper:{width:`100%`,marginBottom:16,backgroundColor:`rgba(255, 255, 255, 0.1)`},headerText:{width:`100%`},table:{minWidth:750},visuallyHidden:{border:0,clip:`rect(0 0 0 0)`,height:1,margin:-1,overflow:`hidden`,padding:0,position:`absolute`,top:20,width:1},label:{display:`flex`,justifyContent:`space-between`},title:{flex:`1 1 100%`},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:`flex`,alignItems:`baseline`},filteredOut:{padding:10,display:`flex`,textAlign:`center`},buttonEmpty:{width:34,display:`inline-block`},buttonCell:{whiteSpace:`nowrap`},dropZone:{width:`100%`,height:100,position:`relative`},dropZoneEmpty:{},uploadDiv:{position:`relative`,width:`100%`,minHeight:300,opacity:.9,marginTop:30,cursor:`pointer`,outline:`none`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`calc(100% - 10px)`,height:`calc(100% - 10px)`,minHeight:300,position:`relative`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},buttonRemoveWrapper:{position:`absolute`,zIndex:222,right:0},error:{border:`2px solid red`,boxSizing:`border-box`},tooltip:{pointerEvents:`none`},cardHeader:e=>({color:e.palette.mode===`light`?e.palette.secondary.main:e.palette.text.primary,height:`100%`,fontWeight:`bold`,fontSize:20,fontStyle:`italic`,padding:`4px 16px`,backgroundColor:e.palette.primary.main,display:`flex`,justifyContent:`space-between`})};function sT(e,t,n){t||=`key`;let r=[];return Object.keys(e).forEach(i=>{let a={};a[t]=i,n?(a[n]=e[i],r.push(a)):r.push(Object.assign(a,e[i]))}),r}function cT(e,t,n){t||=`key`;let r={};return e.forEach(e=>{let i=e[t]??``;delete e[t],n?r[i]=e[n]:r[i]=e}),r}function lT(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function uT(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}var dT=class e extends X{constructor(t){super(t),q(this,`filterRefs`,void 0),q(this,`typingTimer`,null),q(this,`resizeTimeout`,null),q(this,`secret`,`Zgfr56gFe87jJOM`),q(this,`refDiv`,void 0),q(this,`listOfHiddenElements`,[]),q(this,`refreshBecauseOfHiddenElements`,null),q(this,`onTableRowError`,e=>(t,n)=>{let r={...this.state.tableErrors};r[e]||={},t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({tableErrors:r}),this.props.onError(t,n)}),q(this,`handleRequestSort`,(e,t=!1)=>{let{order:n,orderBy:r}=this.state,i=t?n:r===e&&n===`asc`?`desc`:`asc`,a=this.stableSort(i,e);JSON.stringify(a)!==JSON.stringify(this.state.value)&&this.setState({value:a,order:i,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,a))}),q(this,`stableSort`,(t,n)=>{let{value:r}=this.state,i=e.getComparator(t,n),a=r.map((e,t)=>({el:e,index:t}));return a.sort((e,t)=>{let n=i(e.el,t.el);return n===0?e.index-t.index:n}),a.map(e=>e.el)}),q(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);let n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(e=>{this.props.onError(e,void 0)}),delete n[e]);let r={};Object.keys(n).forEach(t=>{let i=parseInt(t,10);i>e?r[i-1]=n[i]:r[i]=n[i]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:r},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),q(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),q(this,`onChangeWrapper`,(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((e,t)=>{this.typingTimer=null;let n;if(this.props.schema.encryptedAttributes){let t=JSON.parse(JSON.stringify(e));if(t.forEach(e=>{this.props.schema.encryptedAttributes.forEach(t=>{e[t]&&(e[t]=lT(this.secret,e[t]))})}),this.props.schema.objKeyName){let e=cT(t,this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,e)}else n=this.onChange(this.props.attr,t)}else if(this.props.schema.objKeyName){let t=cT(JSON.parse(JSON.stringify(e)),this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,t)}else n=this.onChange(this.props.attr,e);n instanceof Promise&&n.catch(e=>console.error(`Cannot save: ${e}`)),t&&(this.applyFilter(!1,e),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)}),q(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),q(this,`applyFilter`,(t,n,r)=>{n||=this.state.value;let i=n.map((e,t)=>t);if(Object.keys(this.filterRefs).forEach(r=>{let a=e.getFilterValue(this.filterRefs[r]);if(!t&&a){var o;a=a.toLowerCase();let e=(o=this.state.filterLabelMap)==null?void 0:o[r];i=i==null?void 0:i.filter(t=>{if(!n[t]||n[t][r]==null)return!1;if(n[t][r].toString().toLowerCase().includes(a))return!0;if(e){let i=e[n[t][r]];if(i!=null&&i.toLowerCase().includes(a))return!0}return!1})}else this.filterRefs[r].current&&e.setFilterValue(this.filterRefs[r],``)}),i&&i.length===n.length&&(i=null),i==null&&this.state.visibleValue===null){r==null||r();return}JSON.stringify(i)===JSON.stringify(this.state.visibleValue)?r&&r():this.setState({visibleValue:i},()=>r&&r())}),this.filterRefs={},this.props.schema.items||=[],this.props.schema.items.forEach(e=>{e.filter&&e.attr&&(this.filterRefs[e.attr]=m())}),this.refDiv=_.createRef()}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[],t;if(t=this.props.schema.objKeyName?sT(e,this.props.schema.objKeyName,this.props.schema.objValueName):e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){var n;let t;try{t=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}this.secret=(t==null||(n=t.native)==null?void 0:n.secret)||this.secret,e.forEach(e=>{var t;(t=this.props.schema.encryptedAttributes)==null||t.forEach(t=>{e[t]||=uT(this.secret,e[t])})})}let r=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`),i=[];if(r)try{i=JSON.parse(r)}catch{}this.setState({value:t,visibleValue:null,orderBy:``,order:`asc`,iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:i,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),this.resizeTimeout&&=(clearTimeout(this.resizeTimeout),null),this.refreshBecauseOfHiddenElements&&=(clearTimeout(this.refreshBecauseOfHiddenElements),null),super.componentWillUnmount()}itemTable(e,t,n,r){var i;let{schema:a}=this.props,o=(i=a.items)==null?void 0:i.find(t=>t.attr===e);if(!o)return null;let s={items:{[e]:o}};return _.createElement(yk,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(e,t)=>{let r=JSON.parse(JSON.stringify(this.state.value));r[n][e]=t,this.setState({value:r},()=>{this.validateUniqueProps(),this.onChangeWrapper(r,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:s,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(e,t)=>{let n=this.state.filterLabelMap[e],r={...n,...t};JSON.stringify(n)!==JSON.stringify(r)&&this.setState(t=>({filterLabelMap:{...t.filterLabelMap,[e]:r}}))},customComponents:this.props.customComponents,onHiddenChanged:r?(e,t)=>{if(t)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(e)||(this.listOfHiddenElements[n].push(e),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){let t=this.listOfHiddenElements[n].indexOf(e);t!==-1&&(this.listOfHiddenElements[n].splice(t,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(let n of this.props.schema.uniqueColumns){let r=[];this.state.value.find(i=>{let a=i[n];return r.includes(a)?(e||(e=n,t=a),this.onError(n,`is not unique`),!0):(r.push(a),!1)})||this.onError(n)}e?this.setState({errorMessage:K.t(`jc_Non-allowed duplicate entry "%s" in column "%s"`,t,e)}):this.setState({errorMessage:``})}static descendingComparator(e,t,n){return t[n]<e[n]?-1:+(t[n]>e[n])}static getComparator(t,n){return t===`desc`?(t,r)=>e.descendingComparator(t,r,n):(t,r)=>-e.descendingComparator(t,r,n)}static getFilterValue(e){var t;return e==null||(t=e.current)==null||(t=t.children[0])==null||(t=t.children[0])==null?void 0:t.value}static setFilterValue(e,t){e.current&&(e.current.children[0].children[0].value=t)}renderShowHideFilter(t){return!t.filter||!t.attr?null:_.createElement(ur,{title:K.t(`jc_Show/hide filter input`),size:`small`,onClick:()=>{let n=[...this.state.filterOn];if(t.attr){let r=this.state.filterOn.indexOf(t.attr);r===-1?n.push(t.attr):n.splice(r,1),this.setState({filterOn:n},()=>{r&&e.getFilterValue(this.filterRefs[t.attr])&&(e.setFilterValue(this.filterRefs[t.attr],``),this.applyFilter())})}}},this.state.filterOn.includes(t.attr)?_.createElement(Fn,null):_.createElement(xe,null))}renderImportExportButtons(e){return _.createElement(_.Fragment,null,!e.noDelete&&e.import?_.createElement(Ln,{title:K.t(`jc_Import data from %s file`,`CSV`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.setState({showImportDialog:!0})},_.createElement(Xe,null))):null,e.export?_.createElement(Ln,{title:K.t(`jc_Export data to %s file`,`CSV`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onExport()},_.createElement(Ke,null))):null,e.noDelete?null:_.createElement(ur,{disabled:!0,size:`small`},_.createElement(we,null)))}renderAddButton(e){return _.createElement(Ln,{title:e?K.t(`jc_Cannot add items with set filter`):K.t(`jc_Add row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,color:`primary`,disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},_.createElement(Re,null))))}enhancedTableHead(e,t){var n;let{schema:r}=this.props,{order:i,orderBy:a}=this.state;return _.createElement(F,null,_.createElement(ct,null,(n=r.items)==null?void 0:n.map((e,n)=>this.renderOneFilter({schema:r,style:{width:e.width},showAddButton:!n&&!r.noDelete,headCell:e,order:i,orderBy:a,index:n,doAnyFilterSet:t})),!r.noDelete&&_.createElement(Ye,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:`right`},padding:`checkbox`},this.renderImportExportButtons(r))))}onExport(){var e;let{schema:t}=this.props,{value:n}=this.state,r=(e=t.items)==null?void 0:e.map(e=>e.attr),i=r?[r.join(`;`)]:[];n.forEach(e=>{var n;let r=[];(n=t.items)==null||n.forEach(t=>{t.attr&&(e[t.attr]&&typeof e[t.attr]==`string`&&e[t.attr].includes(`;`)?r.push(`"${e[t.attr]}"`):r.push(e[t.attr]??``))}),i.push(r.join(`;`))});let a=document.createElement(`a`);a.setAttribute(`href`,`data:text/csv;charset=utf-8,${encodeURIComponent(i.join(`
|
|
1387
|
-
`))}`);let o=new Date;a.setAttribute(`download`,`${o.getFullYear()}_${(o.getMonth()+1).toString().padStart(2,`0`)}_${o.getDate().toString().padStart(2,`0`)}_${this.props.oContext.adapterName}.${this.props.oContext.instance}_${this.props.attr}.csv`),a.style.display=`none`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}onImport(e){let t=e.split(`
|
|
1388
|
-
`).map(e=>e.replace(`\r`,``).trim()),{schema:n}=this.props,r=((t==null?void 0:t.shift())||``).split(`;`).filter(e=>{var t;return e&&((t=n.items)==null?void 0:t.find(t=>t.attr===e))}),i=[];if(t.forEach(e=>{let t=e.split(`;`),n={};for(let e=0;e<t.length;e++){let i=t[e];if(i.startsWith(`"`)){for(i=i.substring(1);e<t.length&&!i.endsWith(`"`);)i+=`;${t[++e]}`;i=i.substring(0,i.length-1)}let o=i;if(i===`true`)o=!0;else if(i===`false`)o=!1;else if(window.isFinite(i)){var a;let t=(a=this.props.schema.items)==null?void 0:a.find(t=>t.attr===r[e]);o=t&&t.type===`number`?parseFloat(i):i}else o=i;n[r[e]]=o}i.push(n)}),i.length){var a;(a=this.state.value)!=null&&a.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1})}else window.alert(`jc_No data found in file`)}isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(t=>e.getFilterValue(this.filterRefs[t]))}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onDrop(e){let t=e[0],n=new FileReader;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>aT){window.alert(K.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(aT/1024)));return}let e=new Uint8Array(n.result).reduce((e,t)=>e+String.fromCharCode(t),``);this.onImport(e)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?_.createElement(Dt,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:`md`},_.createElement(gn,null,K.t(`jc_Append or replace?`)),_.createElement(Un,null,K.t(`jc_Append %s entries or replace existing?`,this.state.showTypeOfImportDialog.length)),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>{let e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},K.t(`jc_Append`)),_.createElement(Ge,{variant:`contained`,color:`secondary`,autoFocus:!0,onClick:()=>{let e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},K.t(`jc_Replace`)))):null}showImportDialog(){return this.state.showImportDialog?_.createElement(Dt,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:`md`,fullWidth:!0},_.createElement(gn,null,K.t(`jc_Import from %s`,`CSV`)),_.createElement(Un,null,_.createElement(gS,{multiple:!1,accept:{"text/csv":[`.csv`]},maxSize:aT,onDragEnter:()=>this.setState({uploadFile:`dragging`}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||K.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:t})=>_.createElement(`div`,{style:{...oT.uploadDiv,...this.state.uploadFile===`dragging`?oT.uploadDivDragging:void 0,...oT.dropZone,...this.state.icon?void 0:oT.dropZoneEmpty},...e()},_.createElement(`input`,{...t()}),_.createElement(`div`,{style:oT.uploadCenterDiv},_.createElement(`div`,{style:oT.uploadCenterTextAndIcon},_.createElement(Xe,{style:oT.uploadCenterIcon}),_.createElement(`div`,{style:oT.uploadCenterText},this.state.uploadFile===`dragging`?K.t(`jc_Drop file here`):K.t(`jc_Place your files here or click here to open the browse dialog`))))))),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,onClick:()=>this.setState({showImportDialog:!1}),color:`primary`,startIcon:_.createElement(je,null)},K.t(`jc_Cancel`)))):null}renderOneFilter(t){return _.createElement(Ye,{key:`${t.headCell.attr}_${t.index}`,style:t.style,align:`left`,sortDirection:t.orderBy===t.headCell.attr&&t.order},_.createElement(`div`,{style:{...oT.flex,...t.schema.showFirstAddOnTop?{flexDirection:`column`}:void 0}},t.showAddButton?this.renderAddButton(t.doAnyFilterSet):null,t.headCell.sort&&_.createElement(me,{active:!0,style:t.orderBy===t.headCell.attr?void 0:oT.silver,direction:t.orderBy===t.headCell.attr?t.order:`asc`,onClick:()=>t.headCell.attr&&this.handleRequestSort(t.headCell.attr)}),t.headCell.filter&&t.headCell.attr&&this.state.filterOn.includes(t.headCell.attr)?_.createElement(ft,{variant:`standard`,ref:this.filterRefs[t.headCell.attr],onChange:()=>this.applyFilter(),title:K.t(`jc_You can filter entries by entering here some text`),slotProps:{input:{endAdornment:e.getFilterValue(this.filterRefs[t.headCell.attr])&&_.createElement(sr,{position:`end`},_.createElement(ur,{size:`small`,tabIndex:-1,onClick:()=>{e.setFilterValue(this.filterRefs[t.headCell.attr],``),this.applyFilter()}},_.createElement(je,null)))}},fullWidth:!0,placeholder:this.getText(t.headCell.title)}):_.createElement(`span`,{style:oT.headerText},this.getText(t.headCell.title)),this.renderShowHideFilter(t.headCell)))}enhancedFilterCard(){var e;let{schema:t}=this.props,{order:n,orderBy:r}=this.state,i;this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1});let a=!t.noDelete&&t.import||t.export;if(a||(e=t.items)!=null&&e.find(e=>e.sort||e.filter)){var o;return _.createElement(Ct,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(O,null,_.createElement(ln,{style:oT.paper},_.createElement(Pe,{style:oT.paper},_.createElement(Zn,{expandIcon:_.createElement(ot,null)},_.createElement(be,null,K.t(`jc_Filter and Data Actions`))),_.createElement(zn,null,_.createElement(_e,null,_.createElement(De,null,((o=t.items)==null?void 0:o.find(e=>e.sort||e.filter))&&t.items.map((e,a)=>_.createElement(ct,{key:`${e.attr}_${a}`},this.renderOneFilter({schema:t,style:i,showAddButton:!1,headCell:e,order:n,orderBy:r,index:a,doAnyFilterSet:!1}))),a?_.createElement(ct,null,_.createElement(Ye,{align:`left`,style:i},_.createElement(`span`,{style:oT.headerText},K.t(`jc_Actions`))),_.createElement(Ye,{style:i},this.renderImportExportButtons(t))):null)))))))}return null}enhancedBottomCard(){var e;let{schema:t}=this.props,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r=this.isAnyFilterSet();return _.createElement(Ct,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(O,null,_.createElement(ln,{style:oT.paper},_.createElement(_e,null,_.createElement(De,null,_.createElement(ct,null,_.createElement(Ye,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:n},this.renderAddButton(r))))))))}renderCards(){let{schema:e}=this.props,{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r={padding:0,borderBottom:`none`};t||=this.state.value.map((e,t)=>t);let i=this.isAnyFilterSet();return _.createElement(Ct,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((a,o)=>{var s,c,l;return _.createElement(Ct,{key:`${a}_${o}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},_.createElement(O,{sx:this.state.tableErrors[a]?{outline:`1px solid red`}:void 0},_.createElement(ln,{style:oT.paper},this.props.schema.titleAttribute?_.createElement(ht,{sx:oT.cardHeader},_.createElement(`div`,null,this.state.value[a][this.props.schema.titleAttribute]),_.createElement(`div`,null,!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement($n,null)))):null,!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(An,null)))):null,_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(a)},_.createElement(we,null))),this.props.schema.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(a)},_.createElement(he,null))):null,_.createElement(Ln,{title:K.t(`jc_Expand/Collapse card`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>{let e=[...this.state.collapsed],t=e.indexOf(a);t===-1?e.push(a):e.splice(t,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(e)),this.setState({collapsed:e})}},_.createElement(ot,{style:{rotate:(s=this.state.collapsed)!=null&&s.includes(a)?`0deg`:`180deg`,transition:`0.3s`,transitionProperty:`rotate`}}))))):null,_.createElement(an,{in:!((c=this.state.collapsed)!=null&&c.includes(a)),timeout:`auto`,unmountOnExit:!0},_.createElement(_e,null,_.createElement(De,null,(l=e.items)==null?void 0:l.map(e=>{var t;let i=e.attr&&((t=this.listOfHiddenElements)==null||(t=t[a])==null?void 0:t.includes(e.attr));return _.createElement(ct,{key:`${e.attr}_${a}`},_.createElement(Ye,{align:`left`,style:i?r:n},i?null:_.createElement(`span`,{style:oT.headerText},this.getText(e.title))),_.createElement(Ye,{align:`left`,style:i?r:n},e.attr&&this.itemTable(e.attr,this.state.value[a],a,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&_.createElement(ct,null,_.createElement(Ye,{align:`left`,style:n},_.createElement(`span`,{style:oT.headerText},this.getText(`Actions`))),_.createElement(Ye,{align:`left`,style:n},!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement($n,null)))):null,!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(An,null)))):null,_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(a)},_.createElement(we,null))),this.props.schema.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(a)},_.createElement(he,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){var e;let{schema:t}=this.props,{visibleValue:n}=this.state;n||=this.state.value.map((e,t)=>t);let r=this.isAnyFilterSet(),i;return this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1}),_.createElement(ln,{style:oT.paper},this.showImportDialog(),this.showTypeOfImportDialog(),t.label?_.createElement(`div`,{style:oT.label},_.createElement(Ce,{variant:`dense`,style:oT.rootTool},_.createElement(be,{style:oT.title,variant:`h6`,id:`tableTitle`,component:`div`},this.getText(t.label)))):null,_.createElement(mr,null,_.createElement(_e,{style:oT.table,size:`small`},this.enhancedTableHead(!r&&!this.state.orderBy?120:64,r),_.createElement(De,null,n.map((e,a)=>{var o;return _.createElement(ct,{hover:!0,key:`${e}_${a}`,sx:this.state.tableErrors[e]?{outline:`1px solid red`}:void 0},(o=t.items)==null?void 0:o.map(t=>_.createElement(Ye,{key:`${t.attr}_${e}`,align:`left`,style:i},t.attr&&this.itemTable(t.attr,this.state.value[e],e,!1))),!t.noDelete&&_.createElement(Ye,{align:`left`,style:{...i,...oT.buttonCell}},!r&&!this.state.orderBy?a?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(e)},_.createElement($n,null))):_.createElement(`div`,{style:oT.buttonEmpty}):null,!r&&!this.state.orderBy?a<n.length-1?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(e)},_.createElement(An,null))):_.createElement(`div`,{style:oT.buttonEmpty}):null,_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(e)},_.createElement(we,null))),this.props.schema.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(e)},_.createElement(he,null))):null))}),!t.noDelete&&n.length>=(t.showSecondAddAt||5)?_.createElement(ct,null,_.createElement(Ye,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:{...i}},this.renderAddButton(r))):null)),!n.length&&this.state.value.length?_.createElement(`div`,{style:oT.filteredOut},_.createElement(be,{style:oT.title,variant:`h6`,id:`tableTitle`,component:`div`},K.t(`jc_All items are filtered out`),_.createElement(ur,{size:`small`,onClick:()=>this.applyFilter(!0)},_.createElement(je,null)))):null),t.help?_.createElement(en,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?_.createElement(`div`,{style:{display:`flex`,padding:`5px`}},_.createElement(ae,{color:`error`}),_.createElement(`span`,{style:{color:`red`,alignSelf:`center`}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var e;this.resizeTimeout=null,(e=this.refDiv.current)!=null&&e.clientWidth&&this.setState({width:this.refDiv.current.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?`xs`:this.state.width<900?`sm`:this.state.width<1200?`md`:this.state.width<1536?`lg`:`xl`:`md`}renderItem(){let{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;let t=this.getCurrentBreakpoint(),n=null;return n=t&&(e.useCardFor||[`xs`]).includes(t)?this.renderCards():this.renderTable(),_.createElement(`div`,{ref:this.refDiv,style:{width:`100%`}},n)}};g();var fT={indeterminate:{opacity:.5},label:{width:`100%`,fontSize:14,marginBottom:2},helper:{width:`100%`,fontSize:12},error:{width:`100%`,fontSize:12,color:`#FF0000`}},pT=class extends X{constructor(...e){super(...e),q(this,`updateTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===X.DIFFERENT_VALUE)return{value:X.DIFFERENT_VALUE};let n=X.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){let n=Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE;if(this.props.schema.time){let n=``;return typeof this.state.value==`number`?n=this.state.value&&this.state.value<9466596e5?new Date(this.state.value*1e3).toLocaleString():new Date(this.state.value).toLocaleString():typeof this.state.value==`string`&&(n=new Date(this.state.value).toLocaleString()),_.createElement(ft,{variant:`standard`,fullWidth:!0,value:n,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue==null?this.updateTimeout&&=(clearTimeout(this.updateTimeout),null):(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:void 0})},30)),n){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString()||``,value:e})))||[];return r.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(A,{style:fT.indeterminate,fullWidth:!0,value:r[0],onChange:(e,t)=>{let n=t?t.value:``,r=this.onChange(this.props.attr,n,()=>{this.setState({value:n,oldValue:n,jsonError:this.validateJson(t)})});r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ft,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{htmlInput:{...n.slotProps.htmlInput,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let r,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(ur,{tabIndex:-1,style:i,size:`small`,onClick:()=>{$t.copyToClipboard(this.state.value),window.alert(K.t(`jc_Copied`))}},_.createElement(St,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(ur,{style:i,size:`small`,tabIndex:-1,onClick:()=>this.setState({value:``,oldValue:this.state.value},()=>this.onChange(this.props.attr,``))},_.createElement(je,null)),(this.props.schema.minRows||0)<=1&&(r=_.createElement(sr,{position:`end`},r))),(this.props.schema.minRows||0)>1){let n=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return _.createElement(`div`,{style:{width:`100%`,position:`relative`}},this.props.schema.label?_.createElement(`div`,{style:fT.label},this.getText(this.props.schema.label)):null,_.createElement(U,{style:{width:`100%`,resize:`vertical`,backgroundColor:this.props.oContext.themeType===`dark`?`#363636`:`#cccccc`,color:this.props.oContext.themeType===`dark`?`#fff`:`#111`},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??``,disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t||``))},placeholder:this.getText(this.props.schema.placeholder)}),n||e||this.state.jsonError?_.createElement(`div`,{style:e?fT.error:fT.helper},e||(this.state.jsonError?K.t(`jc_Invalid JSON`):n)):null)}return _.createElement(ft,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:r}},onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?K.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var mT={fullWidth:{width:`100%`}},hT=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>{if(typeof e==`object`){let t=e;this.setState({text:t.text||``,style:t.style,icon:t.icon,iconStyle:t.iconStyle})}else typeof e==`string`&&this.setState({text:e||``})}).catch(e=>console.error(`Cannot send command: ${e}`))}}getLocalContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getLocalContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=Ww(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||=_.createElement(Pt,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}})),this.props.schema.container===`text`?_.createElement(ft,{variant:`standard`,fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(ur,{tabIndex:-1,size:`small`,onClick:()=>{$t.copyToClipboard(this.state.text||``),window.alert(K.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):_.createElement(`div`,{style:{...mT.fullWidth,...this.state.style||void 0}},e,this.props.schema.container===`html`?_.createElement(`span`,{dangerouslySetInnerHTML:{__html:this.state.text||``}}):this.state.text)}};g();var gT=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){let n=this.props.schema.returnFormat!==`HH:mm:ss`,r=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||`00:00:00`}`));return _.createElement(Dx,{sx:e=>({width:`100%`,borderBottom:`1px solid ${e.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${e.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),ampm:this.props.oContext.systemConfig.dateFormat.includes(`/`),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||`HH:mm:ss`,disabled:!!t,value:r,onChange:e=>{let t;t=e instanceof Date?e.toTimeString().split(` `)[0]:``,n&&t&&(t=t.split(`:`).slice(0,2).join(`:`)),this.setState({value:t},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||[`hours`,`minutes`,`seconds`],label:this.getText(this.props.schema.label)})}};g();function _T(e,t){let n;return n=t&&e.substring(0,t.length)===t?e.substring(t.length+1):e,n=n.replace(/\./g,`/`).replace(/_/g,` `),n}var vT=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=X.getValue(this.props.data,this.props.attr);if(!t&&(e=this.props.customObj)!=null&&e._id){let e=_T(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:e})}else this.setState({value:t||``})}renderItem(e,t){return _.createElement(ft,{variant:`standard`,fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,t))}})}};g();var yT=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.getCachedObject(`system.meta.uuid`);this.setState({uuid:(t==null||(e=t.native)==null?void 0:e.uuid)||`unknown`})}renderItem(e,t){return _.createElement(ft,{variant:`standard`,fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:_.createElement(ur,{tabIndex:-1,onClick:()=>{$t.copyToClipboard(this.state.uuid||``),window.alert(K.t(`jc_Copied %s`,this.state.uuid))}},_.createElement(he,null))}},value:this.state.uuid||``,label:this.getText(this.props.schema.label)||K.t(`jc_Serial number (UUID)`),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var bT={icon:{width:16,height:16,marginRight:8}},xT=class extends X{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{let t={},n=K.getLanguage();this.props.schema.short?e.forEach(e=>{var r,i;return t[e._id]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:$t.getObjectNameFromObj(e,n)}}):e.forEach(e=>{var r,i;return t[e._id.replace(/^system\.user\./,``)]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:$t.getObjectNameFromObj(e,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.state.users&&this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,this.state.users?_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>{var t,n,r;return _.createElement(`span`,null,this.state.users&&(t=this.state.users[e])!=null&&t.icon?_.createElement(Pt,{src:this.state.users&&((n=this.state.users[e])==null?void 0:n.icon),style:bT.icon}):null,this.state.users&&((r=this.state.users[e])==null?void 0:r.name)||e||``)},style:{color:this.state.users&&((n=this.state.users[i])==null?void 0:n.color)||void 0,backgroundColor:$t.getInvertedColor((r=this.state.users)==null||(r=r[i])==null?void 0:r.color,this.props.oContext.themeType)},onChange:e=>this.onChange(this.props.attr,e.target.value)},this.state.users&&Object.keys(this.state.users).map(e=>_.createElement(Ie,{style:{color:this.state.users[e].color||void 0,backgroundColor:$t.getInvertedColor(this.state.users[e].color,this.props.oContext.themeType)},key:e,value:e},this.state.users[e].icon?_.createElement(Pt,{src:this.state.users[e].icon,style:bT.icon}):null,this.state.users[e].name))):_.createElement(ft,{variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}},ST=Symbol.for(`yaml.alias`),CT=Symbol.for(`yaml.document`),wT=Symbol.for(`yaml.map`),TT=Symbol.for(`yaml.pair`),ET=Symbol.for(`yaml.scalar`),DT=Symbol.for(`yaml.seq`),OT=Symbol.for(`yaml.node.type`),kT=e=>!!e&&typeof e==`object`&&e[OT]===ST,AT=e=>!!e&&typeof e==`object`&&e[OT]===CT,jT=e=>!!e&&typeof e==`object`&&e[OT]===wT,MT=e=>!!e&&typeof e==`object`&&e[OT]===TT,NT=e=>!!e&&typeof e==`object`&&e[OT]===ET,PT=e=>!!e&&typeof e==`object`&&e[OT]===DT;function FT(e){if(e&&typeof e==`object`)switch(e[OT]){case wT:case DT:return!0}return!1}function IT(e){if(e&&typeof e==`object`)switch(e[OT]){case ST:case wT:case ET:case DT:return!0}return!1}var LT=e=>(NT(e)||FT(e))&&!!e.anchor,RT=Symbol(`break visit`),zT=Symbol(`skip children`),BT=Symbol(`remove node`);function VT(e,t){let n=UT(t);AT(e)?HT(null,e.contents,n,Object.freeze([e]))===BT&&(e.contents=null):HT(null,e,n,Object.freeze([]))}VT.BREAK=RT,VT.SKIP=zT,VT.REMOVE=BT;function HT(e,t,n,r){let i=WT(e,t,n,r);if(IT(i)||MT(i))return GT(e,r,i),HT(e,i,n,r);if(typeof i!=`symbol`){if(FT(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=HT(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===RT)return RT;else i===BT&&(t.items.splice(e,1),--e)}}else if(MT(t)){r=Object.freeze(r.concat(t));let e=HT(`key`,t.key,n,r);if(e===RT)return RT;e===BT&&(t.key=null);let i=HT(`value`,t.value,n,r);if(i===RT)return RT;i===BT&&(t.value=null)}}return i}function UT(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function WT(e,t,n,r){var i,a,o,s,c;if(typeof n==`function`)return n(e,t,r);if(jT(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(PT(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(MT(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(NT(t))return(s=n.Scalar)==null?void 0:s.call(n,e,t,r);if(kT(t))return(c=n.Alias)==null?void 0:c.call(n,e,t,r)}function GT(e,t,n){let r=t[t.length-1];if(FT(r))r.items[e]=n;else if(MT(r))e===`key`?r.key=n:r.value=n;else if(AT(r))r.contents=n;else{let e=kT(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var KT={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},qT=e=>e.replace(/[!,[\]{}]/g,e=>KT[e]),JT=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+qT(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&IT(e.contents)){let t={};VT(e.contents,(e,n)=>{IT(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1389
|
-
`)}};JT.defaultYaml={explicit:!1,version:`1.2`},JT.defaultTags={"!!":`tag:yaml.org,2002:`};function YT(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function XT(e){let t=new Set;return VT(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function ZT(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function QT(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=XT(e);let a=ZT(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(NT(t.node)||FT(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function $T(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=$T(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=$T(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=$T(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=$T(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function eE(e,t,n){if(Array.isArray(e))return e.map((e,t)=>eE(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!LT(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!(n!=null&&n.keep)?Number(e):e}var tE=class{constructor(e){Object.defineProperty(this,OT,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!AT(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=eE(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?$T(i,{"":o},``,o):o}},nE=class extends tE{constructor(e){super(ST),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if((t==null?void 0:t.maxAliasCount)===0)throw ReferenceError(`Alias resolution is disabled`);let n;t!=null&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],VT(e,{Node:(e,t)=>{(kT(t)||LT(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(eE(a,null,t),n.get(a)),(o==null?void 0:o.res)===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=rE(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(YT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function rE(e,t,n){if(kT(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(FT(t)){let r=0;for(let i of t.items){let t=rE(e,i,n);t>r&&(r=t)}return r}if(MT(t)){let r=rE(e,t.key,n),i=rE(e,t.value,n);return Math.max(r,i)}return 1}var iE=e=>!e||typeof e!=`function`&&typeof e!=`object`,aE=class extends tE{constructor(e){super(ET),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:eE(this.value,e,t)}toString(){return String(this.value)}};aE.BLOCK_FOLDED=`BLOCK_FOLDED`,aE.BLOCK_LITERAL=`BLOCK_LITERAL`,aE.PLAIN=`PLAIN`,aE.QUOTE_DOUBLE=`QUOTE_DOUBLE`,aE.QUOTE_SINGLE=`QUOTE_SINGLE`;var oE=`tag:yaml.org,2002:`;function sE(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>{var n;return((n=t.identify)==null?void 0:n.call(t,e))&&!t.format})}function cE(e,t,n){var r;if(AT(e)&&(e=e.contents),IT(e))return e;if(MT(e)){var i,a;let t=(i=(a=n.schema[wT]).createNode)==null?void 0:i.call(a,n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:o,onAnchor:s,onTagObj:c,schema:l,sourceObjects:u}=n,d;if(o&&e&&typeof e==`object`){if(d=u.get(e),d)return d.anchor??(d.anchor=s(e)),new nE(d.anchor);d={anchor:null,node:null},u.set(e,d)}t!=null&&t.startsWith(`!!`)&&(t=oE+t.slice(2));let f=sE(e,t,l.tags);if(!f){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new aE(e);return d&&(d.node=t),t}f=e instanceof Map?l[wT]:Symbol.iterator in Object(e)?l[DT]:l[wT]}c&&(c(f),delete n.onTagObj);let p=f!=null&&f.createNode?f.createNode(n.schema,e,n):typeof(f==null||(r=f.nodeClass)==null?void 0:r.from)==`function`?f.nodeClass.from(n.schema,e,n):new aE(e);return t?p.tag=t:f.default||(p.tag=f.tag),d&&(d.node=p),p}function lE(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return cE(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var uE=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,dE=class extends tE{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>IT(t)||MT(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(uE(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(FT(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,lE(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(FT(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&NT(i)?i.value:i:FT(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!MT(t))return!1;let n=t.value;return n==null||e&&NT(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return FT(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(FT(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,lE(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},fE=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function pE(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var mE=(e,t,n)=>e.endsWith(`
|
|
1390
|
-
`)?pE(n,t):n.includes(`
|
|
1391
|
-
`)?`
|
|
1392
|
-
`+pE(n,t):(e.endsWith(` `)?``:` `)+n,hE=`flow`,gE=`block`,_E=`quoted`;function vE(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=yE(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
1393
|
-
`)n===`block`&&(h=yE(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
1394
|
-
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
1395
|
-
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function yE(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
1396
|
-
`);r=t,i=t+1,a=e[i]}return r}var bE=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),xE=e=>/^(%|---|\.\.\.)/m.test(e);function SE(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
1397
|
-
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function CE(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(xE(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
1398
|
-
|
|
1399
|
-
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
1400
|
-
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:vE(o,a,_E,bE(t,!1))}function wE(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
1401
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return CE(e,t);let n=t.indent||(xE(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:vE(r,n,hE,bE(t,!1))}function TE(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=CE;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?wE:i&&!t?CE:n?wE:CE}return r(e,t)}var EE;try{EE=RegExp(`(^|(?<!
|
|
1402
|
-
))
|
|
1403
|
-
+(?!
|
|
1404
|
-
|$)`,`g`)}catch{EE=/\n+(?!\n|$)/g}function DE({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return TE(n,r);let l=r.indent||(r.forceBlockIndent||xE(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===aE.BLOCK_FOLDED?!1:t===aE.BLOCK_LITERAL||!SE(n,c,l.length);if(!n)return u?`|
|
|
1405
|
-
`:`>
|
|
1406
|
-
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
1407
|
-
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
1408
|
-
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
1409
|
-
`&&(p=p.slice(0,-1)),p.replace(EE,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
1410
|
-
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
1411
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=bE(r,!0);o!==`folded`&&t!==aE.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=vE(`${v}${e}${p}`,l,gE,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function OE(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
1412
|
-
`)||u&&/[[\]{},]/.test(a))return TE(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
1413
|
-
`)?TE(a,t):DE(e,t,n,r);if(!s&&!u&&i!==aE.PLAIN&&a.includes(`
|
|
1414
|
-
`))return DE(e,t,n,r);if(xE(a)){if(c===``)return t.forceBlockIndent=!0,DE(e,t,n,r);if(s&&c===l)return TE(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>{var t;return e.default&&e.tag!==`tag:yaml.org,2002:str`&&((t=e.test)==null?void 0:t.test(d))},{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n!=null&&n.some(e))return TE(a,t)}return s?d:vE(d,c,hE,bE(t,!1))}function kE(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==aE.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=aE.QUOTE_DOUBLE);let c=e=>{switch(e){case aE.BLOCK_FOLDED:case aE.BLOCK_LITERAL:return i||a?TE(o.value,t):DE(o,t,n,r);case aE.QUOTE_DOUBLE:return CE(o.value,t);case aE.QUOTE_SINGLE:return wE(o.value,t);case aE.PLAIN:return OE(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function AE(e,t){let n=Object.assign({blockQuote:!0,commentString:fE,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function jE(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(NT(t)){r=t.value;let i=e.filter(e=>{var t;return(t=e.identify)==null?void 0:t.call(e,r)});if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){var i;let e=(r==null||(i=r.constructor)==null?void 0:i.name)??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function ME(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(NT(e)||FT(e))&&e.anchor;a&&YT(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function NE(e,t,n,r){if(MT(e))return e.toString(t,n,r);if(kT(e)){var i;if(t.doc.directives)return e.toString(t);if((i=t.resolvedAliases)!=null&&i.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a,o=IT(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??=jE(t.doc.schema.tags,o);let s=ME(o,a,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let c=typeof a.stringify==`function`?a.stringify(o,t,n,r):NT(o)?kE(o,t,n,r):o.toString(t,n,r);return s?NT(o)||c[0]===`{`||c[0]===`[`?`${s} ${c}`:`${s}\n${t.indent}${c}`:c}function PE({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=IT(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(FT(e)||!IT(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||FT(e)||(NT(e)?e.type===aE.BLOCK_FOLDED||e.type===aE.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=NE(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=mE(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=mE(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=mE(g,n.indent,l(f))));let _,v,y;IT(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&NT(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&PT(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=NE(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
1415
|
-
`:``,v){let e=l(v);S+=`\n${pE(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
1416
|
-
`&&y&&(S=`
|
|
1417
|
-
|
|
1418
|
-
`):S+=`\n${n.indent}`}else if(!p&&FT(t)){let e=x[0],r=x.indexOf(`
|
|
1419
|
-
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
1420
|
-
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=mE(g,n.indent,l(y)):h&&i&&i(),g}function FE(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var IE=`<<`,LE={identify:e=>e===IE||typeof e==`symbol`&&e.description===IE,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new aE(Symbol(IE)),{addToJSMap:zE}),stringify:()=>IE},RE=(e,t)=>(LE.identify(t)||NT(t)&&(!t.type||t.type===aE.PLAIN)&&LE.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(e=>e.tag===LE.tag&&e.default));function zE(e,t,n){let r=VE(e,n);if(PT(r))for(let n of r.items)BE(e,t,n);else if(Array.isArray(r))for(let n of r)BE(e,t,n);else BE(e,t,r)}function BE(e,t,n){let r=VE(e,n);if(!jT(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function VE(e,t){return e&&kT(t)?t.resolve(e.doc,e):t}function HE(e,t,{key:n,value:r}){if(IT(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(RE(e,n))zE(e,t,r);else{let i=eE(n,``,e);if(t instanceof Map)t.set(i,eE(r,i,e));else if(t instanceof Set)t.add(i);else{let a=UE(n,i,e),o=eE(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function UE(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(IT(e)&&n!=null&&n.doc){let t=AE(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),FE(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function WE(e,t,n){return new GE(cE(e,void 0,n),cE(t,void 0,n))}var GE=class e{constructor(e,t=null){Object.defineProperty(this,OT,{value:TT}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return IT(n)&&(n=n.clone(t)),IT(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return HE(t,t!=null&&t.mapAsMap?new Map:{},this)}toString(e,t,n){return e!=null&&e.doc?PE(this,e,t,n):JSON.stringify(this)}};function KE(e,t,n){return(t.inFlow??e.flow?JE:qE)(e,t,n)}function qE({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(IT(i))!d&&i.spaceBefore&&f.push(``),YE(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(MT(i)){let e=IT(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),YE(n,f,e.commentBefore,d))}d=!1;let s=NE(i,u,()=>o=null,()=>d=!0);o&&(s+=mE(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
1421
|
-
`}}return e?(p+=`
|
|
1422
|
-
`+pE(l(e),c),s&&s()):d&&o&&o(),p}function JE({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(IT(i))i.spaceBefore&&d.push(``),YE(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(MT(i)){let e=IT(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),YE(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=IT(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e!=null&&e.comment&&(a=e.comment)}a&&(l=!0);let o=NE(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
1423
|
-
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=mE(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
1424
|
-
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function YE({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=pE(t(r),e);n.push(i.trimStart())}}function XE(e,t){let n=NT(t)?t.value:t;for(let r of e)if(MT(r)&&(r.key===t||r.key===n||NT(r.key)&&r.key.value===n))return r}var ZE=class extends dE{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(wT,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(WE(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){var n;let r;r=MT(e)?e:!e||typeof e!=`object`||!(`key`in e)?new GE(e,e==null?void 0:e.value):new GE(e.key,e.value);let i=XE(this.items,r.key),a=(n=this.schema)==null?void 0:n.sortMapEntries;if(i){if(!t)throw Error(`Key ${r.key} already set`);NT(i.value)&&iE(r.value)?i.value.value=r.value:i.value=r.value}else if(a){let e=this.items.findIndex(e=>a(r,e)<0);e===-1?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){let t=XE(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=XE(this.items,e),r=n==null?void 0:n.value;return(!t&&NT(r)?r.value:r)??void 0}has(e){return!!XE(this.items,e)}set(e,t){this.add(new GE(e,t),!0)}toJSON(e,t,n){let r=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(r);for(let e of this.items)HE(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!MT(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),KE(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},QE={collection:`map`,default:!0,nodeClass:ZE,tag:`tag:yaml.org,2002:map`,resolve(e,t){return jT(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>ZE.from(e,t,n)},$E=class extends dE{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(DT,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=eD(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=eD(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&NT(r)?r.value:r}has(e){let t=eD(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=eD(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];NT(r)&&iE(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t!=null&&t.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(eE(e,String(r++),t));return n}toString(e,t,n){return e?KE(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(cE(a,void 0,n))}}return i}};function eD(e){let t=NT(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var tD={collection:`seq`,default:!0,nodeClass:$E,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return PT(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>$E.from(e,t,n)},nD={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),kE(e,t,n,r)}},rD={identify:e=>e==null,createNode:()=>new aE(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new aE(null),stringify:({source:e},t)=>typeof e==`string`&&rD.test.test(e)?e:t.options.nullStr},iD={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new aE(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&iD.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function aD({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var oD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:aD},sD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():aD(e)}},cD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new aE(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:aD},lD=e=>typeof e==`bigint`||Number.isInteger(e),uD=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function dD(e,t,n){let{value:r}=e;return lD(r)&&r>=0?n+r.toString(t):aD(e)}var fD={identify:e=>lD(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>uD(e,2,8,n),stringify:e=>dD(e,8,`0o`)},pD={identify:lD,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>uD(e,0,10,n),stringify:aD},mD={identify:e=>lD(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>uD(e,2,16,n),stringify:e=>dD(e,16,`0x`)},hD=[QE,tD,nD,rD,iD,fD,pD,mD,oD,sD,cD];function gD(e){return typeof e==`bigint`||Number.isInteger(e)}var _D=({value:e})=>JSON.stringify(e),vD=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:_D},{identify:e=>e==null,createNode:()=>new aE(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:_D},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:_D},{identify:gD,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>gD(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:_D}],yD=[QE,tD].concat(vD,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),bD={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=aE.BLOCK_LITERAL,t!==aE.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===aE.BLOCK_LITERAL?`
|
|
1425
|
-
`:` `)}return kE({comment:e,type:t,value:s},r,i,a)}};function xD(e,t){if(PT(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!MT(r)){if(jT(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new GE(new aE(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=MT(r)?r:new GE(r)}}else t(`Expected a sequence for this tag`);return e}function SD(e,t,n){let{replacer:r}=n,i=new $E(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(WE(o,s,n))}return i}var CD={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:xD,createNode:SD},wD=class e extends $E{constructor(){super(),this.add=ZE.prototype.add.bind(this),this.delete=ZE.prototype.delete.bind(this),this.get=ZE.prototype.get.bind(this),this.has=ZE.prototype.has.bind(this),this.set=ZE.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(MT(e)?(r=eE(e.key,``,t),i=eE(e.value,r,t)):r=eE(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=SD(e,t,n),i=new this;return i.items=r.items,i}};wD.tag=`tag:yaml.org,2002:omap`;var TD={collection:`seq`,identify:e=>e instanceof Map,nodeClass:wD,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=xD(e,t),r=[];for(let{key:e}of n.items)NT(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new wD,n)},createNode:(e,t,n)=>wD.from(e,t,n)};function ED({value:e,source:t},n){return t&&(e?DD:OD).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var DD={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new aE(!0),stringify:ED},OD={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new aE(!1),stringify:ED},kD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:aD},AD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():aD(e)}},jD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new aE(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:aD},MD=e=>typeof e==`bigint`||Number.isInteger(e);function ND(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function PD(e,t,n){let{value:r}=e;if(MD(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return aD(e)}var FD={identify:MD,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>ND(e,2,2,n),stringify:e=>PD(e,2,`0b`)},ID={identify:MD,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>ND(e,1,8,n),stringify:e=>PD(e,8,`0`)},LD={identify:MD,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>ND(e,0,10,n),stringify:aD},RD={identify:MD,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>ND(e,2,16,n),stringify:e=>PD(e,16,`0x`)},zD=class e extends ZE{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=MT(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new GE(e.key,null):new GE(e,null),XE(this.items,t.key)||this.items.push(t)}get(e,t){let n=XE(this.items,e);return!t&&MT(n)?NT(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=XE(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new GE(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(WE(e,null,n));return i}};zD.tag=`tag:yaml.org,2002:set`;var BD={collection:`map`,identify:e=>e instanceof Set,nodeClass:zD,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>zD.from(e,t,n),resolve(e,t){if(jT(e)){if(e.hasAllNullValues(!0))return Object.assign(new zD,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function VD(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function HD(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return aD(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var UD={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>VD(e,n),stringify:HD},WD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>VD(e,!1),stringify:HD},GD={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(GD.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=VD(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,``))??``},KD=[QE,tD,nD,rD,DD,OD,FD,ID,LD,RD,kD,AD,jD,bD,LE,TD,CD,BD,UD,WD,GD],qD=new Map([[`core`,hD],[`failsafe`,[QE,tD,nD]],[`json`,yD],[`yaml11`,KD],[`yaml-1.1`,KD]]),JD={binary:bD,bool:iD,float:cD,floatExp:sD,floatNaN:oD,floatTime:WD,int:pD,intHex:mD,intOct:fD,intTime:UD,map:QE,merge:LE,null:rD,omap:TD,pairs:CD,seq:tD,set:BD,timestamp:GD},YD={"tag:yaml.org,2002:binary":bD,"tag:yaml.org,2002:merge":LE,"tag:yaml.org,2002:omap":TD,"tag:yaml.org,2002:pairs":CD,"tag:yaml.org,2002:set":BD,"tag:yaml.org,2002:timestamp":GD};function XD(e,t,n){let r=qD.get(t);if(r&&!e)return n&&!r.includes(LE)?r.concat(LE):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(qD.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(LE)),i.reduce((e,t)=>{let n=typeof t==`string`?JD[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(JD).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var ZD=(e,t)=>e.key<t.key?-1:+(e.key>t.key),QD=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?XD(e,`compat`):e?XD(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?YD:{},this.tags=XD(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,wT,{value:QE}),Object.defineProperty(this,ET,{value:nD}),Object.defineProperty(this,DT,{value:tD}),this.sortMapEntries=typeof a==`function`?a:a===!0?ZD:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function $D(e,t){var n;let r=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(r.push(t),i=!0):e.directives.docStart&&(i=!0)}i&&r.push(`---`);let a=AE(e,t),{commentString:o}=a.options;if(e.commentBefore){r.length!==1&&r.unshift(``);let t=o(e.commentBefore);r.unshift(pE(t,``))}let s=!1,c=null;if(e.contents){if(IT(e.contents)){if(e.contents.spaceBefore&&i&&r.push(``),e.contents.commentBefore){let t=o(e.contents.commentBefore);r.push(pE(t,``))}a.forceBlockIndent=!!e.comment,c=e.contents.comment}let t=c?void 0:()=>s=!0,n=NE(e.contents,a,()=>c=null,t);c&&(n+=mE(n,``,o(c))),(n[0]===`|`||n[0]===`>`)&&r[r.length-1]===`---`?r[r.length-1]=`--- ${n}`:r.push(n)}else r.push(NE(e.contents,a));if((n=e.directives)!=null&&n.docEnd)if(e.comment){let t=o(e.comment);t.includes(`
|
|
1426
|
-
`)?(r.push(`...`),r.push(pE(t,``))):r.push(`... ${t}`)}else r.push(`...`);else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,``)),t&&((!s||c)&&r[r.length-1]!==``&&r.push(``),r.push(pE(o(t),``)))}return r.join(`
|
|
1427
|
-
`)+`
|
|
1428
|
-
`}var eO=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,OT,{value:CT});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new JT({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[OT]:{value:CT}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=IT(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){tO(this.contents)&&this.contents.add(e)}addIn(e,t){tO(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=XT(this);e.anchor=!t||n.has(t)?ZT(t||`a`,n):t}return new nE(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=QT(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=cE(e,l,p);return o&&FT(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new GE(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return tO(this.contents)?this.contents.delete(e):!1}deleteIn(e){return uE(e)?this.contents!=null&&(this.contents=null,!0):tO(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return FT(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return uE(e)?!t&&NT(this.contents)?this.contents.value:this.contents:FT(this.contents)?this.contents.getIn(e,t):void 0}has(e){return FT(this.contents)?this.contents.has(e):!1}hasIn(e){return uE(e)?this.contents!==void 0:FT(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=lE(this.schema,[e],t):tO(this.contents)&&this.contents.set(e,t)}setIn(e,t){uE(e)?this.contents=t:this.contents==null?this.contents=lE(this.schema,Array.from(e),t):tO(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new JT({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new JT({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new QD(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=eE(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?$T(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return $D(this,e)}};function tO(e){if(FT(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var nO=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},rO=class extends nO{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},iO=class extends nO{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},aO=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
1429
|
-
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];(t==null?void 0:t.line)===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function oO(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||(r==null?void 0:r.type)!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||(r==null?void 0:r.type)===`block-map`||(r==null?void 0:r.type)===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function sO(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
1430
|
-
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(sO(t.key)||sO(t.value))return!0}return!1;default:return!0}}function cO(e,t,n){if((t==null?void 0:t.type)===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&sO(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function lO(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||NT(e)&&NT(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var uO=`All mapping items must start at the same column`;function dO({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a==null?void 0:a.nodeClass)??ZE)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){var l;let{start:u,key:d,sep:f,value:p}=a,m=oO(u,{indicator:`explicit-key-ind`,next:d??(f==null?void 0:f[0]),offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),h=!m.found;if(h){if(d&&(d.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in d&&d.indent!==r.indent&&i(s,`BAD_INDENT`,uO)),!m.anchor&&!m.tag&&!f){c=m.end,m.comment&&(o.comment?o.comment+=`
|
|
1431
|
-
`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||sO(d))&&i(d??u[u.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else((l=m.found)==null?void 0:l.indent)!==r.indent&&i(s,`BAD_INDENT`,uO);n.atKey=!0;let g=m.end,_=d?e(n,d,m,i):t(n,g,u,null,m,i);n.schema.compat&&cO(r.indent,d,i),n.atKey=!1,lO(n,o.items,_)&&i(g,`DUPLICATE_KEY`,`Map keys must be unique`);let v=oO(f??[],{indicator:`map-value-ind`,next:p,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type===`block-scalar`});if(s=v.end,v.found){h&&((p==null?void 0:p.type)===`block-map`&&!v.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&m.start<v.found.offset-1024&&i(_.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=p?e(n,p,v,i):t(n,s,f,null,v,i);n.schema.compat&&cO(r.indent,p,i),s=c.range[2];let l=new GE(_,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{h&&i(_.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),v.comment&&(_.comment?_.comment+=`
|
|
1432
|
-
`+v.comment:_.comment=v.comment);let e=new GE(_);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function fO({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a==null?void 0:a.nodeClass)??$E)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=oO(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)(l==null?void 0:l.type)===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&cO(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function pO(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var mO=`Block collections are not allowed within flow collections`,hO=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function gO({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a==null?void 0:a.nodeClass)??(o?ZE:$E))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:f,key:p,sep:m,value:h}=l,g=oO(f,{flow:s,indicator:`explicit-key-ind`,next:p??(m==null?void 0:m[0]),offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!g.found){if(!g.anchor&&!g.tag&&!m&&!h){a===0&&g.comma?i(g.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(g.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),g.comment&&(c.comment?c.comment+=`
|
|
1433
|
-
`+g.comment:c.comment=g.comment),u=g.end;continue}!o&&n.options.strict&&sO(p)&&i(p,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)g.comma&&i(g.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(g.comma||i(g.start,`MISSING_CHAR`,`Missing , between ${s} items`),g.comment){let e=``;loop:for(let t of f)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];MT(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
1434
|
-
`+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(!o&&!m&&!g.found){let r=h?e(n,h,g,i):t(n,g.end,m,null,g,i);c.items.push(r),u=r.range[2],hO(h)&&i(r.range,`BLOCK_IN_FLOW`,mO)}else{n.atKey=!0;let a=g.end,_=p?e(n,p,g,i):t(n,a,f,null,g,i);hO(p)&&i(_.range,`BLOCK_IN_FLOW`,mO),n.atKey=!1;let v=oO(m??[],{flow:s,indicator:`map-value-ind`,next:h,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(v.found){if(!o&&!g.found&&n.options.strict){if(m)for(let e of m){if(e===v.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}g.start<v.found.offset-1024&&i(v.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else if(h){var d;`source`in h&&((d=h.source)==null?void 0:d[0])===`:`?i(h,`MISSING_CHAR`,`Missing space after : in ${s}`):i(v.start,`MISSING_CHAR`,`Missing , or : between ${s} items`)}let y=h?e(n,h,v,i):v.found?t(n,v.end,m,null,v,i):null;y?hO(h)&&i(y.range,`BLOCK_IN_FLOW`,mO):v.comment&&(_.comment?_.comment+=`
|
|
1435
|
-
`+v.comment:_.comment=v.comment);let b=new GE(_,y);if(n.options.keepSourceTokens&&(b.srcToken=l),o){let e=c;lO(n,e.items,_)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(b)}else{let e=new ZE(n.schema);e.flow=!0,e.items.push(b);let t=(y??_).range;e.range=[_.range[0],t[1],t[2]],c.items.push(e)}u=y?y.range[2]:v.end}}let f=o?`}`:`]`,[p,...m]=r.end,h=u;if((p==null?void 0:p.source)===f)h=p.offset+p.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${f}`:`${e} in block collection must be sufficiently indented and end with a ${f}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),p&&p.source.length!==1&&m.unshift(p)}if(m.length>0){let e=pO(m,h,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
1436
|
-
`+e.comment:c.comment=e.comment),c.range=[r.offset,h,e.offset]}else c.range=[r.offset,h,h];return c}function _O(e,t,n,r,i,a){let o=n.type===`block-map`?dO(e,t,n,r,a):n.type===`block-seq`?fO(e,t,n,r,a):gO(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function vO(e,t,n,r,i){var a;let o=r.tag,s=o?t.directives.tagName(o.source,e=>i(o,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&o?e.offset>o.offset?e:o:e??o;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let c=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!o||!s||s===`!`||s===ZE.tagName&&c===`map`||s===$E.tagName&&c===`seq`)return _O(e,t,n,i,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===c);if(!l){let r=t.schema.knownTags[s];if((r==null?void 0:r.collection)===c)t.schema.tags.push(Object.assign({},r,{default:!1})),l=r;else return r?i(o,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${c} collection, but expects ${r.collection??`scalar`}`,!0):i(o,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${s}`,!0),_O(e,t,n,i,s)}let u=_O(e,t,n,i,s,l),d=((a=l.resolve)==null?void 0:a.call(l,u,e=>i(o,`TAG_RESOLVE_FAILED`,e),t.options))??u,f=IT(d)?d:new aE(d);return f.range=u.range,f.tag=s,l!=null&&l.format&&(f.format=l.format),f}function yO(e,t,n){let r=t.offset,i=bO(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?aE.BLOCK_FOLDED:aE.BLOCK_LITERAL,o=t.source?xO(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
1437
|
-
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
1438
|
-
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===aE.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
1439
|
-
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
1440
|
-
`:!p&&f===`
|
|
1441
|
-
`&&(f=`
|
|
1442
|
-
|
|
1443
|
-
`),d+=f+t.slice(c)+r,f=`
|
|
1444
|
-
`,p=!0):r===``?f===`
|
|
1445
|
-
`?d+=`
|
|
1446
|
-
`:f=`
|
|
1447
|
-
`:(d+=f+r,f=` `,p=!1)}switch(i.chomp){case`-`:break;case`+`:for(let e=s;e<o.length;++e)d+=`
|
|
1448
|
-
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
1449
|
-
`&&(d+=`
|
|
1450
|
-
`);break;default:d+=`
|
|
1451
|
-
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function bO({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function xO(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function SO(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=aE.PLAIN,c=CO(a,l);break;case`single-quoted-scalar`:s=aE.QUOTE_SINGLE,c=wO(a,l);break;case`double-quoted-scalar`:s=aE.QUOTE_DOUBLE,c=EO(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=pO(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function CO(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),TO(e)}function wO(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),TO(e.slice(1,-1)).replace(/''/g,`'`)}function TO(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1452
|
-
`,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1453
|
-
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
|
1454
|
-
`?i+=a:a=`
|
|
1455
|
-
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+((r==null?void 0:r[1])??``)}function EO(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
1456
|
-
`)if(i===`
|
|
1457
|
-
`){let{fold:t,offset:i}=DO(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=OO[i];if(a)n+=a;else if(i===`
|
|
1458
|
-
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
1459
|
-
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=kO(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
1460
|
-
`&&(a!==`\r`||e[r+2]!==`
|
|
1461
|
-
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function DO(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
1462
|
-
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
1463
|
-
`);)r===`
|
|
1464
|
-
`&&(n+=`
|
|
1465
|
-
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var OO={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
1466
|
-
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function kO(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function AO(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?yO(e,t,r):SO(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[ET]:c?jO(e.schema,i,c,n,r):t.type===`scalar`?MO(e,i,t,r):e.schema[ET];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=NT(a)?a:new aE(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new aE(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function jO(e,t,n,r,i){var a;if(n===`!`)return e[ET];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)o.push(t);else return t;for(let e of o)if((a=e.test)!=null&&a.test(t))return e;let s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[ET])}function MO({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>{var n;return(t.default===!0||e&&t.default===`key`)&&((n=t.test)==null?void 0:n.test(r))})||n[ET];if(n.compat){let e=n.compat.find(e=>{var t;return e.default&&((t=e.test)==null?void 0:t.test(r))})??n[ET];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function NO(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];(n==null?void 0:n.type)===`space`;)e+=n.source.length,n=t[++r];break}}return e}var PO={composeNode:FO,composeEmptyNode:IO};function FO(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=LO(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=AO(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=vO(PO,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=IO(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!NT(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function IO(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=AO(e,{type:`scalar`,offset:NO(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function LO({options:e},{offset:t,source:n,end:r},i){let a=new nE(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=pO(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function RO(e,t,{offset:n,start:r,value:i,end:a},o){let s=new eO(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=oO(r,{indicator:`doc-start`,next:i??(a==null?void 0:a[0]),offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?FO(c,i,l,o):IO(c,l.end,r,null,l,o);let u=s.contents.range[2],d=pO(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function zO(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function BO(e){let t=``,n=!1,r=!1;for(let a=0;a<e.length;++a){let o=e[a];switch(o[0]){case`#`:t+=(t===``?``:r?`
|
|
1467
|
-
|
|
1468
|
-
`:`
|
|
1469
|
-
`)+(o.substring(1)||` `),n=!0,r=!1;break;case`%`:var i;((i=e[a+1])==null?void 0:i[0])!==`#`&&(a+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var VO=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=zO(e);r?this.warnings.push(new iO(i,t,n)):this.errors.push(new rO(i,t,n))},this.directives=new JT({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=BO(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(FT(i)&&!i.flow&&i.items.length>0){let e=i.items[0];MT(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:BO(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=zO(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=RO(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new rO(zO(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new rO(zO(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=pO(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new rO(zO(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new eO(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},HO=Symbol(`break visit`),UO=Symbol(`skip children`),WO=Symbol(`remove item`);function GO(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),KO(Object.freeze([]),e,t)}GO.BREAK=HO,GO.SKIP=UO,GO.REMOVE=WO,GO.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n==null?void 0:n[e];if(t&&`items`in t)n=t.items[r];else return}return n},GO.parentCollection=(e,t)=>{let n=GO.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function KO(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=KO(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===HO)return HO;else r===WO&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function qO(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
|
1470
|
-
`:case`\r
|
|
1471
|
-
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function JO(e){switch(e){case void 0:case` `:case`
|
|
1472
|
-
`:case`\r`:case` `:return!0;default:return!1}}var YO=new Set(`0123456789ABCDEFabcdef`),XO=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),ZO=new Set(`,[]{}`),QO=new Set(` ,[]{}
|
|
1473
|
-
\r `),$O=e=>!e||QO.has(e),ek=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
1474
|
-
`||t===`\r`&&this.buffer[e+1]===`
|
|
1475
|
-
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
1476
|
-
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
1477
|
-
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&JO(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
1478
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&JO(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!JO(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&JO(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil($O),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&JO(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil($O),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||JO(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
1479
|
-
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
1480
|
-
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>JO(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
1481
|
-
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
1482
|
-
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
1483
|
-
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
1484
|
-
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
1485
|
-
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(JO(r)||e&&ZO.has(r))break;t=n}else if(JO(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
1486
|
-
`?(n+=1,r=`
|
|
1487
|
-
`,i=this.buffer[n+1]):t=n),i===`#`||e&&ZO.has(i))break;if(r===`
|
|
1488
|
-
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&ZO.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil($O),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(JO(n)||t&&ZO.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!JO(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(XO.has(t))t=this.buffer[++e];else if(t===`%`&&YO.has(this.buffer[e+1])&&YO.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
1489
|
-
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
1490
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},tk=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function nk(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function rk(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function ik(e){switch(e==null?void 0:e.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function ak(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function ok(e){var t;if(e.length===0)return[];let n=e.length;loop:for(;--n>=0;)switch(e[n].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;((t=e[++n])==null?void 0:t.type)===`space`;);return e.splice(n,e.length)}function sk(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function ck(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!nk(t.start,`explicit-key-ind`)&&!nk(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,ik(t.value)?t.value.end?sk(t.value.end,t.sep):t.value.end=t.sep:sk(t.start,t.sep),delete t.sep)}var lk=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new ek,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=qO(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&(e==null?void 0:e.type)!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&ck(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&rk(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:rk(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=ok(ak(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
|
1491
|
-
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1492
|
-
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){sk(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(nk(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=ok(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(nk(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(ik(t.key)&&!nk(t.sep,`newline`)){let e=ok(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):nk(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!nk(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){sk(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||nk(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while((e==null?void 0:e.type)===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=ok(ak(t));ck(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
1493
|
-
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1494
|
-
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=ok(ak(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=ok(ak(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function uk(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new tk||null,prettyErrors:t}}function dk(e,t={}){let{lineCounter:n,prettyErrors:r}=uk(t),i=new lk(n==null?void 0:n.addNewLine),a=new VO(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new rO(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(aO(e,n)),o.warnings.forEach(aO(e,n))),o}function fk(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=dk(e,n);if(!i)return null;if(i.warnings.forEach(e=>FE(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}g();var pk={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},mk=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&typeof e==`string`&&(e||!this.props.schema.allowEmpty))try{fk(e)}catch(e){console.log(`Error in YAML`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:pk.flex},_.createElement(Ge,{color:`grey`,style:pk.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},K.t(`jc_YAML editor`))),o?_.createElement(qS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||``})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...pk.wrapper,border:this.state.yamlError?`2px solid red`:`2px solid transparent`}},_.createElement(mw,{mode:`yaml`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,yamlError:this.validateYaml(e)}),name:`ConfigYamlEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?_.createElement(en,null,this.state.yamlError?K.t(`jc_Invalid YAML`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var hk=class extends X{async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-Yj8cfN0A.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){let e=this.state.QRCode;if(!e)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var gk=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-Yj8cfN0A.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({qrData:e||``,loading:!1})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?K.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},K.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()));let e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var _k={accordion:js,alive:Ns,autocomplete:Ps,autocompleteSendTo:Fs,certCollection:Vs,certificate:Rs,certificates:Bs,checkbox:nc,checkDocker:Hs,checkLicense:tc,chip:cc,chips:cc,color:lc,coordinates:dc,credential:$s,cron:Ls,custom:bc,datePicker:kx,deviceManager:Ax,divider:Jw,file:PS,fileSelector:DS,func:FS,header:Xw,iframe:IS,iframeSendTo:LS,image:BS,imageSendTo:zS,infoBox:VS,instance:US,interface:GS,ip:RS,jsonEditor:gw,language:vw,license:yw,number:xw,oauth2:Sw,objectId:ww,password:Dw,pattern:Ow,port:Aw,qrCode:hk,qrCodeSendTo:gk,room:jw,select:Nw,selectSendTo:Fw,sendto:zw,sendTo:zw,setState:Vw,slider:Uw,state:Kw,staticImage:Zw,staticInfo:tT,staticLink:iT,staticText:iT,table:dT,text:pT,textSendTo:hT,timePicker:gT,topic:vT,uuid:yT,user:xT,yamlEditor:mk},vk={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:e=>({backgroundColor:e.palette.primary.main,color:e.palette.mode===`dark`?`inherit`:`#FFF`}),secondary:e=>({backgroundColor:e.palette.secondary.main})},yk=class e extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)===`true`})}renderItems(t,n){return t?Object.keys(t).map(r=>{if(this.props.oContext.multiEdit&&t[r].noMultiEdit)return null;let i=t[r].type||`panel`,a,o=`Use this.props.oContext.socket!`;if(i===`custom`)t[r].url?a=bc:this.props.oContext.customs&&this.props.oContext.customs[t[r].component]?a=this.props.oContext.customs[t[r].component]:(console.error(`Cannot find custom component: ${t[r].component}`),a=X),o=this.props.oContext.socket;else if(i===`component`){var s;let e=t[r].subType;if(e&&(s=this.props.customComponents)!=null&&s[e])a=this.props.customComponents[e];else return _.createElement(`div`,{key:`${r}_${this.props.index??``}`},`Component ${e} not provided`)}else a=i===`panel`?e:_k[i]||X;return _.createElement(a,{socket:o,globalData:this.props.globalData,oContext:this.props.oContext,key:`${r}_${this.props.index??``}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:vk.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:t[r],attr:r,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){let e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;let t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){let t=_.createElement(Ct,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:$t.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:`left`},n,this.props.oContext.themeType===`dark`?e.darkStyle:void 0)});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return _.createElement(Ct,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:vk.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let r;if(e.collapsable)r=_.createElement(Pe,{key:`${this.props.attr}_${this.props.index}`,style:vk.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?`false`:`true`),this.setState({expanded:!this.state.expanded})}},_.createElement(Zn,{expandIcon:_.createElement(ot,null),sx:$t.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color===`primary`?vk.primary:e.color===`secondary`&&vk.secondary,{width:`100%`})},_.createElement(be,{style:vk.heading},this.getText(e.label))),_.createElement(zn,null,_.createElement(Ct,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:`100%`,padding:`10px`}},this.renderItems(t,this.state.calculatedValues.disabled))));else{let e=$t.getStyle(this.props.oContext.theme,this.props.style,n,{width:`100%`},this.props.isParentTab&&vk.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:`calc(100% - 88px) !important`}:{height:`calc(100% - 64px) !important`}:this.props.withIcons?vk.paperWithIcons:vk.paperWithoutIcons));r=_.createElement(ht,{component:`div`,key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:e},_.createElement(Ct,{container:!0,columnSpacing:2,rowSpacing:1,sx:$t.getStyle(this.props.oContext.theme,{width:`100%`},this.props.isParentTab&&vk.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){let t=_.createElement(Ct,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:`left`,...n}},r);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return r}};g();var bk={tabs:{height:`100%`,width:`100%`},panel:{width:`100%`,display:`block`},panelWithIcons:{height:`calc(100% - 72px)`},panelWithoutIcons:{height:`calc(100% - 48px)`}},xk=class e extends X{constructor(t){super(t),q(this,`resizeObserver`,null),q(this,`resizeRaf`,null),q(this,`calculateTimeoutTable`,null),q(this,`pinTimeout`,null),q(this,`refDiv`,void 0),q(this,`onTabError`,(e,t)=>{let n=this.state.tab;if(!n&&e){this.props.onError(e,t);return}let r={...this.state.tabErrors};n&&(r[n]||={}),n&&e&&(t?r[n][e]=t:(delete r[n][e],Object.keys(r[n]).length===0&&delete r[n])),this.setState({tabErrors:r}),this.props.onError(e,t)}),q(this,`hasTabErrors`,e=>!!this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0),q(this,`measureWidth`,()=>{var t;let n=(t=this.refDiv.current)==null?void 0:t.clientWidth;if(!n)return;let r=this.state.useMenu;!r&&n<e.MENU_WIDTH?r=!0:r&&n>e.MENU_WIDTH+e.MENU_HYSTERESIS&&(r=!1),r!==this.state.useMenu&&this.setState({useMenu:r})}),q(this,`onHashTabsChanged`,()=>{let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>3&&e[1]===`config`){let t=e[3],n=parseInt(t,10),r;n.toString()===t?n>=0&&n<Object.keys(this.props.schema.items).length&&(r=Object.keys(this.props.schema.items)[n]):Object.keys(this.props.schema.items).includes(t)&&(r=t),r!==void 0&&r!==this.state.tab&&((window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,r),this.pinWidthForTransition(),this.setState({tab:r}))}});let n;if(this.props.root){let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>=3&&e[1]===`config`){let t=e[3],r=parseInt(t,10);t&&r.toString()===t?r>=0&&r<Object.keys(this.props.schema.items).length&&(n=Object.keys(this.props.schema.items)[r]):t&&Object.keys(this.props.schema.items).includes(t)&&(n=t),window.addEventListener(`hashchange`,this.onHashTabsChanged,!1)}}n===void 0&&(n=(window._localStorage||window.localStorage).getItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`)||Object.keys(this.props.schema.items)[0],Object.keys(this.props.schema.items).includes(n)||(n=Object.keys(this.props.schema.items)[0])),this.refDiv=_.createRef(),Object.assign(this.state,{tab:n,useMenu:!1,openMenu:null,tabErrors:{}})}async componentDidMount(){await super.componentDidMount(),this.measureWidth(),this.refDiv.current&&typeof ResizeObserver<`u`&&(this.resizeObserver=new ResizeObserver(()=>{this.resizeRaf===null&&(this.resizeRaf=window.requestAnimationFrame(()=>{this.resizeRaf=null,this.measureWidth()}))}),this.resizeObserver.observe(this.refDiv.current))}componentWillUnmount(){this.resizeRaf!==null&&(window.cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.calculateTimeoutTable&&=(clearTimeout(this.calculateTimeoutTable),null),this.pinTimeout&&=(clearTimeout(this.pinTimeout),null),window.removeEventListener(`hashchange`,this.onHashTabsChanged,!1),super.componentWillUnmount()}pinWidthForTransition(){var e;let t=(e=this.refDiv.current)==null?void 0:e.clientWidth;t&&(this.pinTimeout&&clearTimeout(this.pinTimeout),this.state.contentMinWidth!==t&&this.setState({contentMinWidth:t}),this.pinTimeout=setTimeout(()=>{this.pinTimeout=null,this.setState({contentMinWidth:void 0})},500))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,e),this.pinWidthForTransition(),this.setState({tab:e},()=>{if(this.props.root){let e=(window.location.hash||``).split(`/`);e.length>=3&&e[1]===`config`&&(e[3]=this.state.tab||``,window.location.hash=e.join(`/`))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;let e=this.props.schema.items,t={};for(let n in e){let r;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){let i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:r}}else{if(await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:r}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){let e=this.props.schema.items,t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;let n=[];Object.keys(e).filter(e=>{var t;return!((t=this.state.calculatedValuesTable)!=null&&(t=t[e])!=null&&t.hidden)}).map(r=>{var i;let a=this.getIcon(e[r].icon);t||=!!a,n.push({icon:a,disabled:!!((i=this.state.calculatedValuesTable)!=null&&(i=i[r])!=null&&i.disabled),label:this.getText(e[r].label),name:r})}),n.find(e=>e.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);let r;return r=this.state.useMenu&&n.length>2?_.createElement(Ce,{style:{top:2,backgroundColor:this.props.oContext.themeType===`dark`?`#222`:`#DDD`},variant:`dense`},_.createElement(ur,{onClick:e=>this.setState({openMenu:e.currentTarget})},_.createElement(Lt,null)),this.state.openMenu?_.createElement(ne,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(e=>{let n=this.hasTabErrors(e.name);return _.createElement(Ie,{disabled:e.disabled,key:e.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(e.name))},selected:e.name===this.state.tab,sx:n?{color:`error.main`}:void 0},t?_.createElement(rr,null,e.icon):null,_.createElement(ht,{sx:{display:`flex`,alignItems:`center`,gap:.5,width:`100%`}},e.label,n&&_.createElement(N,{sx:{fontSize:16,color:`error.main`}})))})):null):_.createElement(at,{variant:`scrollable`,scrollButtons:`auto`,style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(e,t)=>this.onMenuChange(t)},n.map(e=>{let t=this.hasTabErrors(e.name),n=t?_.createElement(ht,{sx:{display:`flex`,alignItems:`center`,gap:.5}},e.label,_.createElement(N,{sx:{fontSize:16,color:`error.main`}})):e.label;return _.createElement(H,{id:e.name,wrapped:!0,disabled:e.disabled,key:e.name,value:e.name,iconPosition:this.props.schema.iconPosition||`start`,icon:e.icon||void 0,label:n,sx:t?{"& .MuiTab-wrapper":{color:`error.main`}}:void 0})})),this.state.tab?_.createElement(`div`,{style:this.state.contentMinWidth===void 0?bk.tabs:{...bk.tabs,minWidth:this.state.contentMinWidth},ref:this.refDiv},r,_.createElement(yk,{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:{...bk.panel,...t?bk.panelWithIcons:bk.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.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents})):null}};q(xk,`MENU_WIDTH`,600),q(xk,`MENU_HYSTERESIS`,40),g(),K.extendTranslations({en:{"jc_A credential with this name already exists":`A credential with this name already exists`,"jc_A unique name is required":`A unique name is required`,"jc_Accept license":`Accept license`,jc_Actions:`Actions`,"jc_Add credential":`Add credential`,"jc_Add row":`Add row`,"jc_All items are filtered out":`All items are filtered out`,jc_Append:`Append`,"jc_Append %s entries or replace existing?":`Append %s entries or replace existing?`,"jc_Append or replace?":`Append or replace?`,"jc_Are you sure?":`Are you sure?`,jc_Cancel:`Cancel`,"jc_Cannot add items with set filter":`Cannot add items with set filter`,"jc_Cannot create credential: %s":`Cannot create credential: %s`,"jc_Cannot decode license":`Cannot decode license`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Cannot determine position: System settings are empty and GPS detection is disabled in browser`,'jc_Cannot display the custom component "%s"':`Cannot display the custom component "%s"`,"jc_Cannot read licenses: %s":`Cannot read licenses: %s`,"jc_Cannot retrieve options, as instance is offline":`Cannot retrieve options, as instance is offline`,"jc_Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"jc_Cannot upload":`Cannot upload`,"jc_Chained certificate":`Chained certificate`,jc_Checked:`Checked`,"jc_Click to see in full size":`Click to see in full size`,"jc_Click to show":`Click to show`,"jc_Clone current row":`Clone current row`,jc_Close:`Close`,jc_Commercial:`Commercial`,jc_Copied:`Copied`,"jc_Copied %s":`Copied "%s"`,"jc_Copy content":`Copy content`,jc_Create:`Create`,"jc_Credential type":`Credential type`,'jc_Custom component "%s" was not started':`Custom component "%s" was not started`,"jc_Define schedule":`Define schedule`,jc_Delete:`Delete`,"jc_Delete current row":`Delete current row`,"jc_Disable/Enable translation":`Disable/Enable translation`,jc_Discard:`Discard`,"jc_Do not use let's encrypt":`Do not use let's encrypt`,"jc_Docker is not available":`Docker is not available`,"jc_Docker is not installed or not running":`Docker is not installed or not running`,"jc_Drop file here":`Drop file here`,"jc_Enter the code from that page here":`Enter the code from that page here`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expand/Collapse card`,"jc_Export configuration section":`Export configuration section`,"jc_Export data to %s file":`Export data to %s file`,"jc_Export setting to JSON file":`Export setting to JSON file`,"jc_Fallback custom certificates":`Fallback custom certificates`,"jc_File is too big. Max %sk allowed. Try use SVG.":`File is too big. Max %sk allowed. Try use SVG.`,"jc_File will be deleted":`File will be deleted`,"jc_Filter and Data Actions":`Filter and Data Actions`,"jc_Get %s access":`Get %s access`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`If the button above does not work, you can authorize manually this app by visiting this url`,"jc_Import and add configuration section":`Import and add configuration section`,"jc_Import and replace configuration section":`Import and replace configuration section`,"jc_Import data from %s file":`Import data from %s file`,"jc_Import from %s":`Import from %s`,"jc_Import settings from JSON file":`Import settings from JSON file`,"jc_Instance %s is alive":`Instance %s is alive`,"jc_Instance %s is not alive":`Instance %s is not alive`,"jc_Invalid JSON":`Invalid JSON`,"jc_Invalid JSON file.":`Invalid JSON file.`,"jc_Invalid JSON format. Expected an array.":`Invalid JSON format. Expected an array.`,"jc_Invalid YAML":`Invalid YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`It was probably built for an older admin version. Please update the adapter.`,"jc_JSON editor":`JSON editor`,jc_Latitude:`Latitude`,"jc_License %s":`License %s`,"jc_License agreement":`License agreement`,"jc_License does not exist":`License does not exist`,"jc_License expired on %s":`License expired on %s`,'jc_License for other product "%s"':`License for other product "%s"`,"jc_License is for version %s, but required version is %s":`License is for version %s, but required version is %s`,"jc_License must be converted":`License must be converted to newer version. You can do it in your iobroker.net profile.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`License not found in the license manager. Do you want to update licenses from iobroker.net?`,"jc_Listen on all IPs":`Listen on all IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Move down`,"jc_Move up":`Move up`,jc_Name:`Name`,"jc_No one license found in license manager":`No one license found in license manager`,"jc_No response from admin":`No response from admin`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,"jc_OAuth Client ID":`OAuth Client ID`,"jc_OAuth Client secret":`OAuth Client secret`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Passwords are not equal!`,"jc_Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,"jc_Please allow popups in your browser for this page!":`Please allow popups in your browser for this page!`,"jc_Please confirm":`Please confirm`,"jc_Please create license":`Please create license`,"jc_Please enter the license":`Please enter the license`,"jc_Please fill in all required fields":`Please fill in all required fields`,"jc_Port could be used by %s":`Port could be used by %s`,"jc_Port is already used by %s":`Port is already used by %s`,"jc_Press ENTER Key to add new item":`Press ENTER Key to add new item`,"jc_Private certificate":`Private certificate`,jc_Product:`Product`,"jc_Public certificate":`Public certificate`,"jc_Renew %s access":`Renew %s access`,jc_Replace:`Replace`,"jc_Request data by instance":`Request data by instance`,"jc_Request timed out":`Request timed out`,jc_Result:`Result`,jc_Save:`Save`,"jc_Save configuration?":`Save configuration?`,"jc_Serial number (UUID)":`Serial number (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serial number (UUID) "%s" in license is for other device.`,"jc_Show/hide filter input":`Show/hide filter input`,"jc_Some data are not stored. Discard?":`Some data are not stored. Discard?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Successfully authorized. Token valid till %s and will be automatically renewed.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,"jc_Suitable license not found in license manager":`Suitable license not found in license manager`,"jc_System language":`System language`,"jc_Take browser position":`Take position from browser`,"jc_Take position from system settings":`Take position from system settings`,jc_Template:`Template`,"jc_Use all available let's encrypt certificates":`Use all available let's encrypt certificates`,"jc_Use system settings for position":`Use system settings for position`,"jc_Used system settings":`Used system settings`,jc_ValidTill:`Valid till`,jc_Version:`Version`,"jc_YAML editor":`YAML editor`,jc_Yes:`Yes`,"jc_You can filter entries by entering here some text":`You can filter entries by entering here some text`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Failed to open JSON File`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Failed to parse JSON file`,jc___different__:`different`,jc_false:`FALSE`,jc_locally:`locally`,jc_none:`none`,jc_repeat:`repeat`,jc_true:`TRUE`,"jc_via internet":`via internet`,sch_all:`all`},de:{"jc_A credential with this name already exists":`Es existiert bereits eine Berechtigung mit diesem Namen.`,"jc_A unique name is required":`Ein eindeutiger Name ist erforderlich.`,"jc_Accept license":`Lizenz akzeptieren`,jc_Actions:`Aktionen`,"jc_Add credential":`Anmeldeinformationen hinzufügen`,"jc_Add row":`Zeile hinzufügen`,"jc_All items are filtered out":`Alle Elemente sind herausgefiltert`,jc_Append:`Anhängen`,"jc_Append %s entries or replace existing?":`%s Einträge anhängen oder vorhandene ersetzen?`,"jc_Append or replace?":`Anhängen oder ersetzen?`,"jc_Are you sure?":`Bist du sicher?`,jc_Cancel:`Abbrechen`,"jc_Cannot add items with set filter":`Elemente mit festgelegtem Filter können nicht hinzugefügt werden`,"jc_Cannot create credential: %s":`Anmeldeinformationen konnten nicht erstellt werden: %s`,"jc_Cannot decode license":`Lizenz kann nicht entschlüsselt werden`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert`,'jc_Cannot display the custom component "%s"':`Die benutzerdefinierte Komponente "%s" kann nicht angezeigt werden`,"jc_Cannot read licenses: %s":`Lizenzen können nicht gelesen werden: %s`,"jc_Cannot retrieve options, as instance is offline":`Optionen können nicht abgerufen werden, da die Instanz offline ist`,"jc_Cannot save configuration because of error in configuration":`Die Konfiguration konnte aufgrund eines Fehlers nicht gespeichert werden.`,"jc_Cannot upload":`Kann nicht hochladen`,"jc_Chained certificate":`Chained Zertifikat`,jc_Checked:`Geprüft`,"jc_Click to see in full size":`Klicken Sie hier, um die Vollbildansicht zu öffnen.`,"jc_Click to show":`Zum Anzeigen klicken`,"jc_Clone current row":`Aktuelle Zeile klonen`,jc_Close:`Schließen`,jc_Commercial:`Kommerziell`,jc_Copied:`Kopiert`,"jc_Copied %s":`"%s" kopiert`,"jc_Copy content":`Inhalte kopieren`,jc_Create:`Erstellen`,"jc_Credential type":`Anmeldeinformationstyp`,'jc_Custom component "%s" was not started':`Die benutzerdefinierte Komponente "%s" wurde nicht gestartet`,"jc_Define schedule":`Zeitplan definieren`,jc_Delete:`Löschen`,"jc_Delete current row":`Aktuelle Zeile löschen`,"jc_Disable/Enable translation":`Übersetzung deaktivieren/aktivieren`,jc_Discard:`Verwerfen`,"jc_Do not use let's encrypt":`Let's encrypt nicht verwenden`,"jc_Docker is not available":`Docker ist nicht verfügbar`,"jc_Docker is not installed or not running":`Docker ist nicht installiert oder läuft nicht`,"jc_Drop file here":`Datei hier ablegen`,"jc_Enter the code from that page here":`Geben Sie den Code von dieser Seite hier ein`,jc_Error:`Fehler`,"jc_Expand/Collapse card":`Karte ein-/ausklappen`,"jc_Export configuration section":`Konfigurationsabschnitt exportieren`,"jc_Export data to %s file":`Daten in %s-Datei exportieren`,"jc_Export setting to JSON file":`Einstellungen in eine JSON-Datei exportieren`,"jc_Fallback custom certificates":`Benutzerdefinierte Fallback-Zertifikate`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.`,"jc_File will be deleted":`Die Datei wird gelöscht`,"jc_Filter and Data Actions":`Filter- und Datenaktionen`,"jc_Get %s access":`%s Zugriff erhalten`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen`,"jc_Import and add configuration section":`Konfigurationsabschnitt importieren und hinzufügen`,"jc_Import and replace configuration section":`Konfigurationsabschnitt importieren und ersetzen`,"jc_Import data from %s file":`Daten aus %s-Datei importieren`,"jc_Import from %s":`Von %s importieren`,"jc_Import settings from JSON file":`Einstellungen aus einer JSON-Datei importieren`,"jc_Instance %s is alive":`Instanz %s ist aktiv`,"jc_Instance %s is not alive":`Instanz %s ist nicht aktiv`,"jc_Invalid JSON":`Ungültiges JSON`,"jc_Invalid JSON file.":`Ungültige JSON-Datei.`,"jc_Invalid JSON format. Expected an array.":`Ungültiges JSON-Format. Array erwartet.`,"jc_Invalid YAML":`Ungültiges YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Sie benötigt GUI-API-Generation %s, dieser Admin stellt aber Generation %s bereit. Bitte den Admin aktualisieren.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Sie wurde für GUI-API-Generation %s erstellt, dieser Admin stellt aber Generation %s bereit. Bitte den Adapter aktualisieren.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Sie wurde vermutlich für eine ältere Admin-Version erstellt. Bitte den Adapter aktualisieren.`,"jc_JSON editor":`JSON-Editor`,jc_Latitude:`Breite`,"jc_License %s":`Lizenz %s`,"jc_License agreement":`Lizenzvereinbarung`,"jc_License does not exist":`Lizenz existiert nicht`,"jc_License expired on %s":`Lizenz am %s abgelaufen`,'jc_License for other product "%s"':`Lizenz für anderes Produkt „%s“`,"jc_License is for version %s, but required version is %s":`Die Lizenz gilt für Version %s, benötigt wird jedoch Version %s.`,"jc_License must be converted":`Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?`,"jc_Listen on all IPs":`Zugriff von allen IPs zulassen`,jc_Longitude:`Längengrad`,"jc_Move down":`Nach unten`,"jc_Move up":`Nach oben`,jc_Name:`Name`,"jc_No one license found in license manager":`Im Lizenzmanager wurde keine Lizenz gefunden`,"jc_No response from admin":`Keine Antwort vom Administrator`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Nicht zulässiger doppelter Eintrag "%s" in Spalte "%s"`,"jc_OAuth Client ID":`OAuth-Client-ID`,"jc_OAuth Client secret":`OAuth-Client-Secret`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Passwörter sind nicht gleich!`,"jc_Place your files here or click here to open the browse dialog":`Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen`,"jc_Please allow popups in your browser for this page!":`Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!`,"jc_Please confirm":`Bitte bestätigen`,"jc_Please create license":`Bitte erstellen Sie eine Lizenz`,"jc_Please enter the license":`Bitte die Lizenz eingeben`,"jc_Please fill in all required fields":`Bitte füllen Sie alle Pflichtfelder aus.`,"jc_Port could be used by %s":`Port könnte von %s verwendet werden`,"jc_Port is already used by %s":`Port wird bereits von %s verwendet`,"jc_Press ENTER Key to add new item":`Die Eingabetaste drücken, um ein neues Element hinzuzufügen`,"jc_Private certificate":`Privates Zertifikat`,jc_Product:`Produkt`,"jc_Public certificate":`Öffentliches Zertifikat`,"jc_Renew %s access":`%s Zugriff erneuern`,jc_Replace:`Ersetzen`,"jc_Request data by instance":`Daten pro Instanz anfordern`,"jc_Request timed out":`Zeitüberschreitung der Anforderung`,jc_Result:`Ergebnis`,jc_Save:`Speichern`,"jc_Save configuration?":`Konfiguration speichern?`,"jc_Serial number (UUID)":`Seriennummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.`,"jc_Show/hide filter input":`Filtereingabe ein-/ausblenden`,"jc_Some data are not stored. Discard?":`Einige Daten werden nicht gespeichert. Verwerfen?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.`,"jc_Suitable license not found in license manager":`Passende Lizenz im Lizenzmanager nicht gefunden`,"jc_System language":`Systemsprache`,"jc_Take browser position":`Position vom Browser einnehmen`,"jc_Take position from system settings":`Position aus den Systemeinstellungen übernehmen`,jc_Template:`Vorlage`,"jc_Use all available let's encrypt certificates":`Alle verfügbaren Zertifikate von Let's encrypt benutzen`,"jc_Use system settings for position":`Systemeinstellungen für die Position verwenden`,"jc_Used system settings":`Systemeinstellungen`,jc_ValidTill:`Gültig bis`,jc_Version:`Ausführung`,"jc_YAML editor":`YAML-Editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`Sie können Einträge filtern, indem Sie hier Text eingeben`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Fehler beim Öffnen der JSON-Datei`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Fehler beim Parsen der JSON-Datei`,jc___different__:`unterschiedlich`,jc_false:`FALSCH`,jc_locally:`örtlich`,jc_none:`kein`,jc_repeat:`wiederholen`,jc_true:`WAHR`,"jc_via internet":`übers Internet`,sch_all:`alle`},ru:{"jc_A credential with this name already exists":`Учетные данные с таким именем уже существуют.`,"jc_A unique name is required":`Требуется уникальное имя.`,"jc_Accept license":`Принять лицензию`,jc_Actions:`Действия`,"jc_Add credential":`Добавить учетные данные`,"jc_Add row":`Добавить ряд`,"jc_All items are filtered out":`Все элементы отфильтрованы`,jc_Append:`Добавить`,"jc_Append %s entries or replace existing?":`Добавить записи %s или заменить существующие?`,"jc_Append or replace?":`Дополнить или заменить?`,"jc_Are you sure?":`Вы уверены?`,jc_Cancel:`Отмена`,"jc_Cannot add items with set filter":`Невозможно добавить элементы с установленным фильтром`,"jc_Cannot create credential: %s":`Не удалось создать учетные данные: %s`,"jc_Cannot decode license":`Не могу декодировать лицензию`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.`,'jc_Cannot display the custom component "%s"':`Не удается отобразить пользовательский компонент "%s"`,"jc_Cannot read licenses: %s":`Невозможно прочитать лицензии: %s`,"jc_Cannot retrieve options, as instance is offline":`Невозможно получить параметры, так как экземпляр находится в автономном режиме.`,"jc_Cannot save configuration because of error in configuration":`Невозможно сохранить конфигурацию из-за ошибки в конфигурации.`,"jc_Cannot upload":`Невозможно загрузить`,"jc_Chained certificate":`Chained сертификат`,jc_Checked:`Проверено`,"jc_Click to see in full size":`Нажмите, чтобы посмотреть в полном размере`,"jc_Click to show":`Нажмите, чтобы показать`,"jc_Clone current row":`Клонировать текущую строку`,jc_Close:`Закрыть`,jc_Commercial:`Коммерческая`,jc_Copied:`скопировано`,"jc_Copied %s":`Скопировано "%s"`,"jc_Copy content":`Копировать содержимое`,jc_Create:`Создать`,"jc_Credential type":`Тип учетных данных`,'jc_Custom component "%s" was not started':`Пользовательский компонент "%s" не был запущен.`,"jc_Define schedule":`Задать расписание`,jc_Delete:`Удалить`,"jc_Delete current row":`Удалить текущую строку`,"jc_Disable/Enable translation":`Включить/отключить перевод`,jc_Discard:`Отказаться`,"jc_Do not use let's encrypt":`Не использовать Let’s Encrypt`,"jc_Docker is not available":`Докер недоступен`,"jc_Docker is not installed or not running":`Docker не установлен или не запущен`,"jc_Drop file here":`Перетащите файл сюда`,"jc_Enter the code from that page here":`Введите код с этой страницы здесь`,jc_Error:`Ошибка`,"jc_Expand/Collapse card":`Развернуть/Свернуть карточку`,"jc_Export configuration section":`Раздел конфигурации экспорта`,"jc_Export data to %s file":`Экспорт данных в файл %s`,"jc_Export setting to JSON file":`Экспорт настроек в JSON-файл`,"jc_Fallback custom certificates":`Резервные пользовательские сертификаты`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.`,"jc_File will be deleted":`Файл будет удалён`,"jc_Filter and Data Actions":`Фильтрация и действия с данными`,"jc_Get %s access":`Получить %s доступ`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.`,"jc_Import and add configuration section":`Импорт и добавление раздела конфигурации`,"jc_Import and replace configuration section":`Импорт и замена раздела конфигурации`,"jc_Import data from %s file":`Импорт данных из файла %s`,"jc_Import from %s":`Импорт из %s`,"jc_Import settings from JSON file":`Импорт настроек из JSON-файла`,"jc_Instance %s is alive":`Экземпляр %s работает`,"jc_Instance %s is not alive":`Экземпляр %s не работает`,"jc_Invalid JSON":`Неверный JSON`,"jc_Invalid JSON file.":`Неверный файл JSON.`,"jc_Invalid JSON format. Expected an array.":`Недопустимый формат JSON. Ожидается массив.`,"jc_Invalid YAML":`Недопустимый YAML-файл`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Для этого требуется генерация API графического интерфейса пользователя %s, но администратор предоставляет генерацию %s. Пожалуйста, обновите администратора.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Он был создан для генерации API графического интерфейса пользователя %s, но этот администратор предоставляет генерацию %s. Пожалуйста, обновите адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Вероятно, он был создан для более старой версии административной панели. Пожалуйста, обновите адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Лицензия %s`,"jc_License agreement":`Лицензионное соглашение`,"jc_License does not exist":`Лицензия не существует`,"jc_License expired on %s":`Срок действия лицензии истек %s`,'jc_License for other product "%s"':`Лицензия на другой продукт "%s"`,"jc_License is for version %s, but required version is %s":`Лицензия распространяется на версию %s, но требуемая версия — %s.`,"jc_License must be converted":`Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?`,"jc_Listen on all IPs":`Слушать на всех IP`,jc_Longitude:`Долгота`,"jc_Move down":`Вниз`,"jc_Move up":`Вверх`,jc_Name:`Имя`,"jc_No one license found in license manager":`В менеджере лицензий не найдена ни одна лицензия`,"jc_No response from admin":`Нет ответа от администратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недопустимая повторяющаяся запись "%s" в столбце "%s"`,"jc_OAuth Client ID":`Идентификатор клиента OAuth`,"jc_OAuth Client secret":`Секрет клиента OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Пароли не равны!`,"jc_Place your files here or click here to open the browse dialog":`Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора`,"jc_Please allow popups in your browser for this page!":`Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!`,"jc_Please confirm":`Пожалуйста подтвердите`,"jc_Please create license":`Пожалуйста, создайте лицензию`,"jc_Please enter the license":`Пожалуйста, введите лицензию`,"jc_Please fill in all required fields":`Пожалуйста, заполните все обязательные поля.`,"jc_Port could be used by %s":`Порт может использоваться %s`,"jc_Port is already used by %s":`Порт уже используется %s`,"jc_Press ENTER Key to add new item":`Нажмите клавишу ENTER, чтобы добавить новый элемент.`,"jc_Private certificate":`Частный сертификат`,jc_Product:`Продукт`,"jc_Public certificate":`Публичный сертификат`,"jc_Renew %s access":`Продлить доступ %s`,jc_Replace:`Заменять`,"jc_Request data by instance":`Запрос данных по экземпляру`,"jc_Request timed out":`Истекло время запроса`,jc_Result:`Результат`,jc_Save:`Сохранить`,"jc_Save configuration?":`Сохранить конфигурацию?`,"jc_Serial number (UUID)":`Серийный номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.`,"jc_Show/hide filter input":`Показать/скрыть ввод фильтра`,"jc_Some data are not stored. Discard?":`Некоторые данные не сохранились. Отказаться?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.`,"jc_Suitable license not found in license manager":`Подходящая лицензия не найдена в менеджере лицензий`,"jc_System language":`Язык системы`,"jc_Take browser position":`Взять позицию из браузера`,"jc_Take position from system settings":`Занять позицию из системных настроек`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Использовать все доступные сертификаты Let’s encrypt`,"jc_Use system settings for position":`Использовать системные настройки для позиции`,"jc_Used system settings":`Системные настройки`,jc_ValidTill:`Годен до`,jc_Version:`Версия`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Да`,"jc_You can filter entries by entering here some text":`Вы можете отфильтровать записи, введя здесь текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не удалось открыть JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не удалось разобрать JSON-файл`,jc___different__:`разное`,jc_false:`ЛОЖЬ`,jc_locally:`локально`,jc_none:`ничего`,jc_repeat:`повтор`,jc_true:`истинный`,"jc_via internet":`через интернет`,sch_all:`все`},pt:{"jc_A credential with this name already exists":`Já existe uma credencial com este nome.`,"jc_A unique name is required":`É necessário um nome único.`,"jc_Accept license":`Aceitar licença`,jc_Actions:`Ações`,"jc_Add credential":`Adicionar credencial`,"jc_Add row":`Adicionar linha`,"jc_All items are filtered out":`Todos os itens são filtrados`,jc_Append:`Acrescentar`,"jc_Append %s entries or replace existing?":`Acrescentar %s entradas ou substituir as existentes?`,"jc_Append or replace?":`Acrescentar ou substituir?`,"jc_Are you sure?":`Você tem certeza?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`Não é possível adicionar itens com filtro definido`,"jc_Cannot create credential: %s":`Não foi possível criar a credencial: %s`,"jc_Cannot decode license":`Não é possível decodificar a licença`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador`,'jc_Cannot display the custom component "%s"':`Não é possível exibir o componente personalizado "%s"`,"jc_Cannot read licenses: %s":`Não é possível ler licenças: %s`,"jc_Cannot retrieve options, as instance is offline":`Não é possível recuperar opções, pois a instância está off-line`,"jc_Cannot save configuration because of error in configuration":`Não foi possível salvar a configuração devido a um erro na configuração.`,"jc_Cannot upload":`Não é possível fazer upload`,"jc_Chained certificate":`certificado encadeado`,jc_Checked:`Verificado`,"jc_Click to see in full size":`Clique para ver em tamanho real.`,"jc_Click to show":`Clique para mostrar`,"jc_Clone current row":`Clonar linha atual`,jc_Close:`Perto`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`"%s" copiado`,"jc_Copy content":`Copiar conteúdo`,jc_Create:`Crio`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`O componente personalizado "%s" não foi iniciado.`,"jc_Define schedule":`Definir cronograma`,jc_Delete:`Excluir`,"jc_Delete current row":`Excluir linha atual`,"jc_Disable/Enable translation":`Desativar/Ativar tradução`,jc_Discard:`Descartar`,"jc_Do not use let's encrypt":`Não use vamos criptografar`,"jc_Docker is not available":`O Docker não está disponível`,"jc_Docker is not installed or not running":`O Docker não está instalado ou não está em execução`,"jc_Drop file here":`Solte o arquivo aqui`,"jc_Enter the code from that page here":`Digite o código dessa página aqui`,jc_Error:`Erro`,"jc_Expand/Collapse card":`Expandir/Recolher cartão`,"jc_Export configuration section":`Seção de configuração de exportação`,"jc_Export data to %s file":`Exportar dados para o arquivo %s`,"jc_Export setting to JSON file":`Exportar configurações para arquivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`O arquivo é muito grande. Max %sk permitido. Tente usar SVG.`,"jc_File will be deleted":`O arquivo será excluído.`,"jc_Filter and Data Actions":`Ações de filtro e dados`,"jc_Get %s access":`Obtenha acesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url`,"jc_Import and add configuration section":`Seção de importação e adição de configuração`,"jc_Import and replace configuration section":`Seção de configuração de importação e substituição`,"jc_Import data from %s file":`Importar dados do arquivo %s`,"jc_Import from %s":`Importar de %s`,"jc_Import settings from JSON file":`Importar configurações de um arquivo JSON`,"jc_Instance %s is alive":`O %s da instância está ativo`,"jc_Instance %s is not alive":`O %s da instância não está ativo`,"jc_Invalid JSON":`JSON inválido`,"jc_Invalid JSON file.":`Arquivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Esperava-se uma matriz.`,"jc_Invalid YAML":`YAML inválido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`É necessário gerar %s da API da GUI, mas este painel de administração já fornece a geração %s. Por favor, atualize o painel de administração.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Foi desenvolvido para geração de API GUI %s, mas este painel de administração fornece geração %s. Por favor, atualize o adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Provavelmente foi desenvolvido para uma versão administrativa mais antiga. Por favor, atualize o adaptador.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licença %s`,"jc_License agreement":`Contrato de licença`,"jc_License does not exist":`A licença não existe`,"jc_License expired on %s":`A licença expirou em %s`,'jc_License for other product "%s"':`Licença para outro produto "%s"`,"jc_License is for version %s, but required version is %s":`A licença é para a versão %s, mas a versão necessária é %s.`,"jc_License must be converted":`A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?`,"jc_Listen on all IPs":`Ouça em todos os IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Mover para baixo`,"jc_Move up":`Subir`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nenhuma licença encontrada no gerenciador de licenças`,"jc_No response from admin":`Nenhuma resposta do administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada não permitida "%s" na coluna "%s"`,"jc_OAuth Client ID":`ID do cliente OAuth`,"jc_OAuth Client secret":`Segredo do cliente OAuth`,jc_Ok:`Está bem`,"jc_Passwords are not equal!":`As senhas não são iguais!`,"jc_Place your files here or click here to open the browse dialog":`Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação`,"jc_Please allow popups in your browser for this page!":`Por favor, permita pop-ups no seu navegador para esta página!`,"jc_Please confirm":`Por favor confirme`,"jc_Please create license":`Crie uma licença`,"jc_Please enter the license":`Por favor, insira a licença`,"jc_Please fill in all required fields":`Por favor, preencha todos os campos obrigatórios.`,"jc_Port could be used by %s":`A porta pode ser usada por %s`,"jc_Port is already used by %s":`A porta já está sendo usada por %s`,"jc_Press ENTER Key to add new item":`Pressione a tecla ENTER para adicionar um novo item`,"jc_Private certificate":`certificado privado`,jc_Product:`produtos`,"jc_Public certificate":`certificado público`,"jc_Renew %s access":`Renovar acesso %s`,jc_Replace:`Substituir`,"jc_Request data by instance":`Solicitar dados por instância`,"jc_Request timed out":`Solicitação expirou`,jc_Result:`Resultado`,jc_Save:`Salve `,"jc_Save configuration?":`Salvar configuração?`,"jc_Serial number (UUID)":`Número de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`O número de série (UUID) "%s" na licença é para outro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Alguns dados não são armazenados. Descartar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado com sucesso. Token válido até %s e será renovado automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.`,"jc_Suitable license not found in license manager":`Licença adequada não encontrada no gerenciador de licenças`,"jc_System language":`Idioma do sistema`,"jc_Take browser position":`Tomar posição do navegador`,"jc_Take position from system settings":`Tomar posição a partir das configurações do sistema`,jc_Template:`Modelo`,"jc_Use all available let's encrypt certificates":`Use todos os certificados disponíveis vamos criptografar`,"jc_Use system settings for position":`Use as configurações do sistema para a posição`,"jc_Used system settings":`Configurações do sistema usadas`,jc_ValidTill:`Válida até`,jc_Version:`Versão`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sim`,"jc_You can filter entries by entering here some text":`Você pode filtrar as entradas digitando aqui algum texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Falha ao abrir o arquivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Falha ao analisar o arquivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`Nenhum`,jc_repeat:`repetir`,jc_true:`verdadeiro`,"jc_via internet":`via internet`,sch_all:`tudo`},nl:{"jc_A credential with this name already exists":`Er bestaat al een legitimatiebewijs met deze naam.`,"jc_A unique name is required":`Een unieke naam is vereist.`,"jc_Accept license":`Accepteer licentie`,jc_Actions:`Acties`,"jc_Add credential":`Voeg inloggegevens toe`,"jc_Add row":`Voeg een rij toe`,"jc_All items are filtered out":`Alle items zijn uitgefilterd`,jc_Append:`toevoegen`,"jc_Append %s entries or replace existing?":`%s ingangen toevoegen of bestaande vervangen?`,"jc_Append or replace?":`Toevoegen of vervangen?`,"jc_Are you sure?":`Weet je het zeker?`,jc_Cancel:`Annuleer`,"jc_Cannot add items with set filter":`Kan geen items toevoegen met ingestelde filter`,"jc_Cannot create credential: %s":`Kan geen inloggegevens aanmaken: %s`,"jc_Cannot decode license":`Kan licentie niet decoderen`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser`,'jc_Cannot display the custom component "%s"':`Kan het aangepaste component "%s" niet weergeven.`,"jc_Cannot read licenses: %s":`Kan licenties niet lezen: %s`,"jc_Cannot retrieve options, as instance is offline":`Kan opties niet ophalen, omdat instantie offline is`,"jc_Cannot save configuration because of error in configuration":`Configuratie kan niet worden opgeslagen vanwege een configuratiefout.`,"jc_Cannot upload":`Kan niet uploaden`,"jc_Chained certificate":`Geketend certificaat`,jc_Checked:`Gecontroleerd`,"jc_Click to see in full size":`Klik om de afbeelding op volledige grootte te bekijken.`,"jc_Click to show":`Klik om te tonen`,"jc_Clone current row":`Kloon de huidige rij`,jc_Close:`Dichtbij`,jc_Commercial:`Reclame`,jc_Copied:`Gekopieerd`,"jc_Copied %s":`"%s" gekopieerd`,"jc_Copy content":`Inhoud kopiëren`,jc_Create:`Creëer`,"jc_Credential type":`Referentietype`,'jc_Custom component "%s" was not started':`Aangepaste component "%s" is niet gestart.`,"jc_Define schedule":`Definieer schema`,jc_Delete:`Verwijderen`,"jc_Delete current row":`Huidige rij verwijderen`,"jc_Disable/Enable translation":`Vertaling uitschakelen/inschakelen`,jc_Discard:`Weggooien`,"jc_Do not use let's encrypt":`Gebruik geen let's encrypt`,"jc_Docker is not available":`Docker is niet beschikbaar`,"jc_Docker is not installed or not running":`Docker is niet geïnstalleerd of draait niet`,"jc_Drop file here":`Zet het bestand hier neer`,"jc_Enter the code from that page here":`Voer hier de code van die pagina in`,jc_Error:`Fout`,"jc_Expand/Collapse card":`Kaart uit-/inklappen`,"jc_Export configuration section":`Sectie Exportconfiguratie`,"jc_Export data to %s file":`Exporteer gegevens naar %s bestand`,"jc_Export setting to JSON file":`Exporteer instellingen naar een JSON-bestand.`,"jc_Fallback custom certificates":`Fallback aangepaste certificaten`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.`,"jc_File will be deleted":`Het bestand wordt verwijderd.`,"jc_Filter and Data Actions":`Filter- en gegevensacties`,"jc_Get %s access":`Krijg %s toegang`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken`,"jc_Import and add configuration section":`Configuratiesectie importeren en toevoegen`,"jc_Import and replace configuration section":`Configuratiesectie importeren en vervangen`,"jc_Import data from %s file":`Importeer gegevens uit %s bestand`,"jc_Import from %s":`Importeren uit %s`,"jc_Import settings from JSON file":`Instellingen importeren vanuit een JSON-bestand`,"jc_Instance %s is alive":`Instantie %s leeft`,"jc_Instance %s is not alive":`Instantie %s is niet actief`,"jc_Invalid JSON":`Ongeldige JSON`,"jc_Invalid JSON file.":`Ongeldig JSON-bestand.`,"jc_Invalid JSON format. Expected an array.":`Ongeldige JSON-indeling. Er werd een array verwacht.`,"jc_Invalid YAML":`Ongeldige YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Het vereist GUI API-generatie %s, maar deze beheerder levert generatie %s. Graag de beheerder bijwerken.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Het is gebouwd voor GUI API-generatie %s, maar deze beheerder levert generatie %s. Update de adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Het is waarschijnlijk ontwikkeld voor een oudere beheerdersversie. Update de adapter.`,"jc_JSON editor":`JSON-editor`,jc_Latitude:`Breedtegraad`,"jc_License %s":`Licentie %s`,"jc_License agreement":`Licentieovereenkomst`,"jc_License does not exist":`Licentie bestaat niet`,"jc_License expired on %s":`Licentie verlopen op %s`,'jc_License for other product "%s"':`Licentie voor ander product "%s"`,"jc_License is for version %s, but required version is %s":`De licentie is voor versie %s, maar de vereiste versie is %s.`,"jc_License must be converted":`Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?`,"jc_Listen on all IPs":`Luister op alle IP's`,jc_Longitude:`Lengtegraad`,"jc_Move down":`Naar beneden verplaatsen`,"jc_Move up":`Omhoog gaan`,jc_Name:`Naam`,"jc_No one license found in license manager":`Geen enkele licentie gevonden in licentiebeheer`,"jc_No response from admin":`Geen reactie van de beheerder`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niet-toegestane dubbele invoer "%s" in kolom "%s"`,"jc_OAuth Client ID":`OAuth-client-ID`,"jc_OAuth Client secret":`OAuth-clientgeheim`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Wachtwoorden zijn niet gelijk!`,"jc_Place your files here or click here to open the browse dialog":`Plaats uw bestanden hier of klik hier om het bladervenster te openen`,"jc_Please allow popups in your browser for this page!":`Sta pop-ups toe in uw browser voor deze pagina!`,"jc_Please confirm":`Bevestig alstublieft`,"jc_Please create license":`Maak een licentie aan`,"jc_Please enter the license":`Voer de licentie in`,"jc_Please fill in all required fields":`Vul alle verplichte velden in.`,"jc_Port could be used by %s":`Poort kan worden gebruikt door %s`,"jc_Port is already used by %s":`Poort wordt al gebruikt door %s`,"jc_Press ENTER Key to add new item":`Druk op de ENTER-toets om een nieuw item toe te voegen`,"jc_Private certificate":`Privé certificaat`,jc_Product:`Product`,"jc_Public certificate":`Openbaar certificaat`,"jc_Renew %s access":`%s toegang verlengen`,jc_Replace:`Vervangen`,"jc_Request data by instance":`Gegevens opvragen per instantie`,"jc_Request timed out":`Verzoek verlopen`,jc_Result:`Resultaat`,jc_Save:`Sparen`,"jc_Save configuration?":`Configuratie opslaan?`,"jc_Serial number (UUID)":`Serienummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serienummer (UUID) "%s" in licentie is voor ander apparaat.`,"jc_Show/hide filter input":`Filterinvoer weergeven/verbergen`,"jc_Some data are not stored. Discard?":`Sommige gegevens worden niet opgeslagen. Weggooien?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.`,"jc_Suitable license not found in license manager":`Geschikte licentie niet gevonden in licentiebeheer`,"jc_System language":`Systeemtaal`,"jc_Take browser position":`Positie innemen vanuit de browser`,"jc_Take position from system settings":`Neem positie over van systeeminstellingen`,jc_Template:`Sjabloon`,"jc_Use all available let's encrypt certificates":`Gebruik alle beschikbare Let's Encrypt-certificaten`,"jc_Use system settings for position":`Gebruik systeeminstellingen voor positie`,"jc_Used system settings":`Gebruikte systeeminstellingen`,jc_ValidTill:`Geldig tot`,jc_Version:`Versie`,"jc_YAML editor":`YAML-editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`U kunt items filteren door hier wat tekst in te voeren`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Het openen van het JSON-bestand is mislukt.`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Het parseren van het JSON-bestand is mislukt.`,jc___different__:`verschillend`,jc_false:`ONWAAR`,jc_locally:`plaatselijk`,jc_none:`geen`,jc_repeat:`herhalen`,jc_true:`WAAR`,"jc_via internet":`via internet`,sch_all:`allemaal`},fr:{"jc_A credential with this name already exists":`Un certificat portant ce nom existe déjà.`,"jc_A unique name is required":`Un nom unique est requis.`,"jc_Accept license":`Accepter la licence`,jc_Actions:`Actes`,"jc_Add credential":`Ajouter un identifiant`,"jc_Add row":`Ajouter une rangée`,"jc_All items are filtered out":`Tous les éléments sont filtrés`,jc_Append:`Ajouter`,"jc_Append %s entries or replace existing?":`Ajouter %s entrées ou remplacer l'existant\xA0?`,"jc_Append or replace?":`Ajouter ou remplacer\xA0?`,"jc_Are you sure?":`Êtes-vous sûr?`,jc_Cancel:`Annuler`,"jc_Cannot add items with set filter":`Impossible d'ajouter des éléments avec le filtre défini`,"jc_Cannot create credential: %s":`Impossible de créer les informations d'identification\xA0: %s`,"jc_Cannot decode license":`Impossible de décoder la licence`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossible de déterminer la position\xA0: les paramètres système sont vides et la détection GPS est désactivée dans le navigateur`,'jc_Cannot display the custom component "%s"':`Impossible d'afficher le composant personnalisé « %s »`,"jc_Cannot read licenses: %s":`Impossible de lire les licences\xA0: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossible de récupérer les options, car l'instance est hors ligne`,"jc_Cannot save configuration because of error in configuration":`Impossible d'enregistrer la configuration en raison d'une erreur de configuration.`,"jc_Cannot upload":`Impossible de télécharger`,"jc_Chained certificate":`Certificat chaîné`,jc_Checked:`Vérifié`,"jc_Click to see in full size":`Cliquez pour afficher en taille réelle`,"jc_Click to show":`Cliquez pour afficher`,"jc_Clone current row":`Cloner la ligne actuelle`,jc_Close:`Fermer`,jc_Commercial:`Commercial`,jc_Copied:`Copié`,"jc_Copied %s":`"%s" copié`,"jc_Copy content":`Copier le contenu`,jc_Create:`Créer`,"jc_Credential type":`Type de justificatif d'identité`,'jc_Custom component "%s" was not started':`Le composant personnalisé « %s » n'a pas été démarré.`,"jc_Define schedule":`Définir le calendrier`,jc_Delete:`Supprimer`,"jc_Delete current row":`Supprimer la ligne actuelle`,"jc_Disable/Enable translation":`Activer/Désactiver la traduction`,jc_Discard:`Jeter`,"jc_Do not use let's encrypt":`Ne pas utiliser let's encrypt`,"jc_Docker is not available":`Docker n'est pas disponible`,"jc_Docker is not installed or not running":`Docker n'est pas installé ou n'est pas en cours d'exécution`,"jc_Drop file here":`Déposer le fichier ici`,"jc_Enter the code from that page here":`Entrez le code de cette page ici`,jc_Error:`Erreur`,"jc_Expand/Collapse card":`Carte Développer/Réduire`,"jc_Export configuration section":`Exporter la section de configuration`,"jc_Export data to %s file":`Exporter les données vers le fichier %s`,"jc_Export setting to JSON file":`Paramètres d'exportation vers un fichier JSON`,"jc_Fallback custom certificates":`Certificats personnalisés de secours`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.`,"jc_File will be deleted":`Le fichier sera supprimé`,"jc_Filter and Data Actions":`Actions sur les filtres et les données`,"jc_Get %s access":`Obtenir l'accès %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL`,"jc_Import and add configuration section":`Importer et ajouter la section de configuration`,"jc_Import and replace configuration section":`Importer et remplacer la section de configuration`,"jc_Import data from %s file":`Importer des données à partir du fichier %s`,"jc_Import from %s":`Importer depuis %s`,"jc_Import settings from JSON file":`Importer les paramètres à partir d'un fichier JSON`,"jc_Instance %s is alive":`L'instance %s est active`,"jc_Instance %s is not alive":`L'instance %s n'est pas active`,"jc_Invalid JSON":`JSON invalide`,"jc_Invalid JSON file.":`Fichier JSON invalide.`,"jc_Invalid JSON format. Expected an array.":`Format JSON invalide. Tableau attendu.`,"jc_Invalid YAML":`YAML invalide`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Cela nécessite la génération de l'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'administrateur.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Il a été conçu pour la génération d'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'adaptateur.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Il a probablement été conçu pour une version d'administration plus ancienne. Veuillez mettre à jour l'adaptateur.`,"jc_JSON editor":`Éditeur JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licence %s`,"jc_License agreement":`Accord de licence`,"jc_License does not exist":`La licence n'existe pas`,"jc_License expired on %s":`Licence expirée le %s`,'jc_License for other product "%s"':`Licence pour un autre produit "%s"`,"jc_License is for version %s, but required version is %s":`La licence concerne la version %s, mais la version requise est %s`,"jc_License must be converted":`La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net\xA0?`,"jc_Listen on all IPs":`Écoutez sur toutes les adresses IP`,jc_Longitude:`Longitude`,"jc_Move down":`Descendre`,"jc_Move up":`Déplacer vers le haut`,jc_Name:`Nom`,"jc_No one license found in license manager":`Aucune licence trouvée dans le gestionnaire de licences`,"jc_No response from admin":`Aucune réponse de l'administrateur`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrée en double non autorisée « %s » dans la colonne « %s »`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Secret client OAuth`,jc_Ok:`D'accord`,"jc_Passwords are not equal!":`Les mots de passe ne sont pas égaux !`,"jc_Place your files here or click here to open the browse dialog":`Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation`,"jc_Please allow popups in your browser for this page!":`Veuillez autoriser les popups dans votre navigateur pour cette page\xA0!`,"jc_Please confirm":`Veuillez confirmer`,"jc_Please create license":`Veuillez créer une licence`,"jc_Please enter the license":`Veuillez entrer la licence`,"jc_Please fill in all required fields":`Veuillez remplir tous les champs obligatoires.`,"jc_Port could be used by %s":`Le port pourrait être utilisé par %s`,"jc_Port is already used by %s":`Le port est déjà utilisé par %s`,"jc_Press ENTER Key to add new item":`Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément`,"jc_Private certificate":`Certificat privé`,jc_Product:`Produit`,"jc_Public certificate":`Certificat public`,"jc_Renew %s access":`Renouveler l'accès %s`,jc_Replace:`Remplacer`,"jc_Request data by instance":`Demander des données par instance`,"jc_Request timed out":`La demande a expiré`,jc_Result:`Résultat`,jc_Save:`sauver`,"jc_Save configuration?":`Enregistrer la configuration\xA0?`,"jc_Serial number (UUID)":`Numéro de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.`,"jc_Show/hide filter input":`Afficher/masquer l'entrée de filtre`,"jc_Some data are not stored. Discard?":`Certaines données ne sont pas stockées. Jeter?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.`,"jc_Suitable license not found in license manager":`Licence appropriée introuvable dans le gestionnaire de licences`,"jc_System language":`Langue du système`,"jc_Take browser position":`Prendre position depuis le navigateur`,"jc_Take position from system settings":`Prendre position à partir des paramètres système`,jc_Template:`Modèle`,"jc_Use all available let's encrypt certificates":`Utilisez tous les certificats let's encrypt disponibles`,"jc_Use system settings for position":`Utiliser les paramètres système pour la position`,"jc_Used system settings":`Paramètres système utilisés`,jc_ValidTill:`Valable jusqu'au`,jc_Version:`Version`,"jc_YAML editor":`Éditeur YAML`,jc_Yes:`Oui`,"jc_You can filter entries by entering here some text":`Vous pouvez filtrer les entrées en saisissant ici du texte`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossible d'ouvrir le fichier JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Échec de l'analyse du fichier JSON`,jc___different__:`différent`,jc_false:`FAUX`,jc_locally:`localement`,jc_none:`rien`,jc_repeat:`répéter`,jc_true:`VRAI`,"jc_via internet":`par Internet`,sch_all:`tout`},it:{"jc_A credential with this name already exists":`Esiste già una credenziale con questo nome`,"jc_A unique name is required":`È richiesto un nome univoco`,"jc_Accept license":`Accetta licenza`,jc_Actions:`Azioni`,"jc_Add credential":`Aggiungi credenziali`,"jc_Add row":`Aggiungi riga`,"jc_All items are filtered out":`Tutti gli elementi vengono filtrati`,jc_Append:`Aggiungere`,"jc_Append %s entries or replace existing?":`Aggiungi %s voci o sostituisci quelle esistenti?`,"jc_Append or replace?":`Aggiungere o sostituire?`,"jc_Are you sure?":`Sei sicuro?`,jc_Cancel:`Annulla`,"jc_Cannot add items with set filter":`Impossibile aggiungere elementi con il filtro impostato`,"jc_Cannot create credential: %s":`Impossibile creare le credenziali: %s`,"jc_Cannot decode license":`Impossibile decodificare la licenza`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser`,'jc_Cannot display the custom component "%s"':`Impossibile visualizzare il componente personalizzato "%s"`,"jc_Cannot read licenses: %s":`Impossibile leggere le licenze: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossibile recuperare le opzioni, poiché l'istanza è offline`,"jc_Cannot save configuration because of error in configuration":`Impossibile salvare la configurazione a causa di un errore nella configurazione`,"jc_Cannot upload":`Impossibile caricare`,"jc_Chained certificate":`Certificato incatenato`,jc_Checked:`Controllato`,"jc_Click to see in full size":`Clicca per visualizzare l'immagine a dimensioni intere`,"jc_Click to show":`Clicca per mostrare`,"jc_Clone current row":`Clona riga corrente`,jc_Close:`Vicino`,jc_Commercial:`Commerciale`,jc_Copied:`Copiato`,"jc_Copied %s":`"%s" copiato`,"jc_Copy content":`Copia contenuto`,jc_Create:`Creare`,"jc_Credential type":`Tipo di credenziale`,'jc_Custom component "%s" was not started':`Il componente personalizzato "%s" non è stato avviato`,"jc_Define schedule":`Definisci programma`,jc_Delete:`Elimina`,"jc_Delete current row":`Elimina la riga corrente`,"jc_Disable/Enable translation":`Disabilita/Abilita la traduzione`,jc_Discard:`Scartare`,"jc_Do not use let's encrypt":`Non utilizzare crittografiamo`,"jc_Docker is not available":`Docker non è disponibile`,"jc_Docker is not installed or not running":`Docker non è installato o non è in esecuzione`,"jc_Drop file here":`Trascina il file qui`,"jc_Enter the code from that page here":`Inserisci qui il codice da quella pagina`,jc_Error:`Errore`,"jc_Expand/Collapse card":`Espandi/Comprimi scheda`,"jc_Export configuration section":`Sezione di configurazione dell'esportazione`,"jc_Export data to %s file":`Esporta i dati nel file %s`,"jc_Export setting to JSON file":`Esporta le impostazioni in un file JSON`,"jc_Fallback custom certificates":`Certificati personalizzati di fallback`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Il file è troppo grande. Max %sk consentito. Prova a usare SVG.`,"jc_File will be deleted":`Il file verrà eliminato`,"jc_Filter and Data Actions":`Azioni sui filtri e sui dati`,"jc_Get %s access":`Ottieni l'accesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL`,"jc_Import and add configuration section":`Importa e aggiungi la sezione di configurazione`,"jc_Import and replace configuration section":`Importa e sostituisci la sezione di configurazione`,"jc_Import data from %s file":`Importa i dati dal file %s`,"jc_Import from %s":`Importa da %s`,"jc_Import settings from JSON file":`Importa le impostazioni dal file JSON`,"jc_Instance %s is alive":`Il %s dell'istanza è vivo`,"jc_Instance %s is not alive":`Il TESTO dell'istanza non è vivo`,"jc_Invalid JSON":`JSON non valido`,"jc_Invalid JSON file.":`File JSON non valido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON non valido. È previsto un array.`,"jc_Invalid YAML":`YAML non valido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Richiede la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'amministratore.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`È stato creato per la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'adattatore.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probabilmente è stato creato per una versione di amministrazione precedente. Si prega di aggiornare l'adattatore.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitudine`,"jc_License %s":`Licenza %s`,"jc_License agreement":`Contratto di licenza`,"jc_License does not exist":`La licenza non esiste`,"jc_License expired on %s":`Licenza scaduta il %s`,'jc_License for other product "%s"':`Licenza per altro prodotto "%s"`,"jc_License is for version %s, but required version is %s":`La licenza è per la versione %s, ma la versione richiesta è %s`,"jc_License must be converted":`La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?`,"jc_Listen on all IPs":`Ascolta su tutti gli IP`,jc_Longitude:`Longitudine`,"jc_Move down":`Abbassati`,"jc_Move up":`Andare avanti`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nessuna licenza trovata nel gestore delle licenze`,"jc_No response from admin":`Nessuna risposta dall'amministratore`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Voce duplicata non consentita "%s" nella colonna "%s"`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Segreto del client OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Le password non sono uguali!`,"jc_Place your files here or click here to open the browse dialog":`Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia`,"jc_Please allow popups in your browser for this page!":`Si prega di abilitare i popup nel browser per questa pagina!`,"jc_Please confirm":`Si prega di confermare`,"jc_Please create license":`Si prega di creare la licenza`,"jc_Please enter the license":`Inserisci la licenza`,"jc_Please fill in all required fields":`Si prega di compilare tutti i campi obbligatori.`,"jc_Port could be used by %s":`La porta potrebbe essere utilizzata da %s`,"jc_Port is already used by %s":`La porta è già utilizzata da %s`,"jc_Press ENTER Key to add new item":`Premere il tasto INVIO per aggiungere un nuovo elemento`,"jc_Private certificate":`Certificato privato`,jc_Product:`Prodotto`,"jc_Public certificate":`Certificato pubblico`,"jc_Renew %s access":`Rinnova l'accesso %s`,jc_Replace:`Sostituire`,"jc_Request data by instance":`Richiedi dati per istanza`,"jc_Request timed out":`Tempo scaduto per la richiesta`,jc_Result:`Risultato`,jc_Save:`Salva`,"jc_Save configuration?":`Salvare la configurazione?`,"jc_Serial number (UUID)":`Numero di serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.`,"jc_Show/hide filter input":`Mostra/nascondi input filtro`,"jc_Some data are not stored. Discard?":`Alcuni dati non vengono memorizzati. Scartare?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.`,"jc_Suitable license not found in license manager":`Licenza adatta non trovata nel gestore delle licenze`,"jc_System language":`Linguaggio di sistema`,"jc_Take browser position":`Prendi posizione dal browser`,"jc_Take position from system settings":`Prendi posizione dalle impostazioni di sistema`,jc_Template:`Modello`,"jc_Use all available let's encrypt certificates":`Usa tutti i certificati Let's Encrypt disponibili`,"jc_Use system settings for position":`Usa le impostazioni di sistema per la posizione`,"jc_Used system settings":`Impostazioni di sistema utilizzate`,jc_ValidTill:`Valido fino a`,jc_Version:`Versione`,"jc_YAML editor":`Editor YAML`,jc_Yes:`SÌ`,"jc_You can filter entries by entering here some text":`Puoi filtrare le voci inserendo qui del testo`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossibile aprire il file JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Impossibile analizzare il file JSON`,jc___different__:`diverso`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`nessuna`,jc_repeat:`ripetere`,jc_true:`VERO`,"jc_via internet":`attraverso internet`,sch_all:`tutti`},es:{"jc_A credential with this name already exists":`Ya existe una credencial con ese nombre.`,"jc_A unique name is required":`Se requiere un nombre único.`,"jc_Accept license":`Aceptar licencia`,jc_Actions:`Comportamiento`,"jc_Add credential":`Agregar credencial`,"jc_Add row":`Añadir fila`,"jc_All items are filtered out":`Todos los elementos se filtran`,jc_Append:`Adjuntar`,"jc_Append %s entries or replace existing?":`¿Agregar %s entradas o reemplazar las existentes?`,"jc_Append or replace?":`¿Agregar o reemplazar?`,"jc_Are you sure?":`¿Estás seguro?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`No se pueden agregar elementos con el filtro establecido`,"jc_Cannot create credential: %s":`No se puede crear la credencial: %s`,"jc_Cannot decode license":`No se puede decodificar la licencia`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador`,'jc_Cannot display the custom component "%s"':`No se puede mostrar el componente personalizado "%s"`,"jc_Cannot read licenses: %s":`No se pueden leer licencias: %s`,"jc_Cannot retrieve options, as instance is offline":`No se pueden recuperar las opciones, ya que la instancia está fuera de línea`,"jc_Cannot save configuration because of error in configuration":`No se puede guardar la configuración debido a un error en la configuración.`,"jc_Cannot upload":`no se puede cargar`,"jc_Chained certificate":`certificado encadenado`,jc_Checked:`Comprobado`,"jc_Click to see in full size":`Haz clic para ver en tamaño completo.`,"jc_Click to show":`Haga clic para mostrar`,"jc_Clone current row":`Clonar fila actual`,jc_Close:`Cerca`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`Copiado "%s"`,"jc_Copy content":`Copiar contenido`,jc_Create:`Crear`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`El componente personalizado "%s" no se inició.`,"jc_Define schedule":`Definir horario`,jc_Delete:`Eliminar`,"jc_Delete current row":`Eliminar fila actual`,"jc_Disable/Enable translation":`Desactivar/Activar traducción`,jc_Discard:`Desechar`,"jc_Do not use let's encrypt":`No use vamos a cifrar`,"jc_Docker is not available":`Docker no está disponible`,"jc_Docker is not installed or not running":`Docker no está instalado o no se está ejecutando`,"jc_Drop file here":`Suelta el archivo aquí`,"jc_Enter the code from that page here":`Introduzca el código de esa página aquí`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expandir/Contraer tarjeta`,"jc_Export configuration section":`Exportar sección de configuración`,"jc_Export data to %s file":`Exportar datos al archivo %s`,"jc_Export setting to JSON file":`Exportar configuración a un archivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.`,"jc_File will be deleted":`El archivo será eliminado`,"jc_Filter and Data Actions":`Acciones de filtrado y datos`,"jc_Get %s access":`Obtener %s acceso`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL`,"jc_Import and add configuration section":`Importar y agregar sección de configuración`,"jc_Import and replace configuration section":`Importar y reemplazar sección de configuración`,"jc_Import data from %s file":`Importar datos del archivo %s`,"jc_Import from %s":`Importar desde %s`,"jc_Import settings from JSON file":`Importar configuración desde un archivo JSON`,"jc_Instance %s is alive":`Instancia %s está vivo`,"jc_Instance %s is not alive":`Instancia %s no está vivo`,"jc_Invalid JSON":`JSON no válido`,"jc_Invalid JSON file.":`Archivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Se esperaba un array.`,"jc_Invalid YAML":`YAML no válido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Requiere la generación de la API de la GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el administrador.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Fue diseñado para la generación de API GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probablemente se diseñó para una versión de administración anterior. Por favor, actualice el adaptador.`,"jc_JSON editor":`editor JSON`,jc_Latitude:`Latitud`,"jc_License %s":`Licencia %s`,"jc_License agreement":`Acuerdo de licencia`,"jc_License does not exist":`La licencia no existe`,"jc_License expired on %s":`La licencia venció el %s`,'jc_License for other product "%s"':`Licencia para otro producto "%s"`,"jc_License is for version %s, but required version is %s":`La licencia es para la versión %s, pero la versión requerida es %s.`,"jc_License must be converted":`La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?`,"jc_Listen on all IPs":`Escuche en todas las IP`,jc_Longitude:`Longitud`,"jc_Move down":`Mover hacia abajo`,"jc_Move up":`Ascender`,jc_Name:`Nombre`,"jc_No one license found in license manager":`No se encontró ninguna licencia en el administrador de licencias`,"jc_No response from admin":`No hay respuesta del administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada no permitida "%s" en la columna "%s"`,"jc_OAuth Client ID":`ID de cliente OAuth`,"jc_OAuth Client secret":`Secreto de cliente OAuth`,jc_Ok:`Okay`,"jc_Passwords are not equal!":`¡Las contraseñas no son iguales!`,"jc_Place your files here or click here to open the browse dialog":`Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración`,"jc_Please allow popups in your browser for this page!":`¡Permita ventanas emergentes en su navegador para esta página!`,"jc_Please confirm":`Por favor confirmar`,"jc_Please create license":`Por favor cree una licencia`,"jc_Please enter the license":`Por favor ingrese la licencia`,"jc_Please fill in all required fields":`Por favor, rellene todos los campos obligatorios.`,"jc_Port could be used by %s":`El puerto podría ser utilizado por %s`,"jc_Port is already used by %s":`El puerto ya está en uso por %s`,"jc_Press ENTER Key to add new item":`Presione la tecla ENTER para agregar un nuevo elemento`,"jc_Private certificate":`certificado privado`,jc_Product:`Producto`,"jc_Public certificate":`Certificado público`,"jc_Renew %s access":`Renovar el acceso a %s`,jc_Replace:`Reemplazar`,"jc_Request data by instance":`Solicitar datos por instancia`,"jc_Request timed out":`Tiempo de espera agotado`,jc_Result:`Resultado`,jc_Save:`Salvar`,"jc_Save configuration?":`¿Guardar configuración?`,"jc_Serial number (UUID)":`Número de serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`El número de serie (UUID) "%s" en la licencia es para otro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Algunos datos no se almacenan. ¿Desechar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.`,"jc_Suitable license not found in license manager":`Licencia adecuada no encontrada en el administrador de licencias`,"jc_System language":`Lenguaje del sistema`,"jc_Take browser position":`Tomar posición desde el navegador`,"jc_Take position from system settings":`Tomar posición desde la configuración del sistema`,jc_Template:`Plantilla`,"jc_Use all available let's encrypt certificates":`Utilice todos los certificados let's encrypt disponibles`,"jc_Use system settings for position":`Usar la configuración del sistema para la posición`,"jc_Used system settings":`Configuraciones del sistema usadas`,jc_ValidTill:`Válida hasta`,jc_Version:`Versión`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sí`,"jc_You can filter entries by entering here some text":`Puede filtrar las entradas ingresando aquí algún texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Error al abrir el archivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Error al analizar el archivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`en la zona`,jc_none:`ninguno`,jc_repeat:`repetir`,jc_true:`VERDADERO`,"jc_via internet":`vía Internet`,sch_all:`todas`},pl:{"jc_A credential with this name already exists":`Poświadczenie o tej nazwie już istnieje`,"jc_A unique name is required":`Wymagana jest unikalna nazwa`,"jc_Accept license":`Zaakceptuj licencję`,jc_Actions:`Akcje`,"jc_Add credential":`Dodaj poświadczenie`,"jc_Add row":`Dodaj wiersz`,"jc_All items are filtered out":`Wszystkie pozycje są odfiltrowane`,jc_Append:`Dodać`,"jc_Append %s entries or replace existing?":`Dołączyć wpisy %s czy zastąpić istniejące?`,"jc_Append or replace?":`Dołączyć czy zastąpić?`,"jc_Are you sure?":`Jesteś pewny?`,jc_Cancel:`Anuluj`,"jc_Cannot add items with set filter":`Nie można dodać elementów z ustawionym filtrem`,"jc_Cannot create credential: %s":`Nie można utworzyć poświadczeń: %s`,"jc_Cannot decode license":`Nie można zdekodować licencji`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce`,'jc_Cannot display the custom component "%s"':`Nie można wyświetlić niestandardowego komponentu „%s”`,"jc_Cannot read licenses: %s":`Nie można odczytać licencji: %s`,"jc_Cannot retrieve options, as instance is offline":`Nie można pobrać opcji, ponieważ instancja jest w trybie offline`,"jc_Cannot save configuration because of error in configuration":`Nie można zapisać konfiguracji z powodu błędu w konfiguracji`,"jc_Cannot upload":`Nie można przesłać`,"jc_Chained certificate":`Certyfikat łańcuchowy`,jc_Checked:`Sprawdzony`,"jc_Click to see in full size":`Kliknij, aby zobaczyć w pełnym rozmiarze`,"jc_Click to show":`Kliknij, aby pokazać`,"jc_Clone current row":`Sklonuj bieżący wiersz`,jc_Close:`Blisko`,jc_Commercial:`Handlowy`,jc_Copied:`Skopiowano`,"jc_Copied %s":`Skopiowano "%s"`,"jc_Copy content":`Kopiuj zawartość`,jc_Create:`Stwórz`,"jc_Credential type":`Typ poświadczenia`,'jc_Custom component "%s" was not started':`Komponent niestandardowy „%s” nie został uruchomiony`,"jc_Define schedule":`Zdefiniuj harmonogram`,jc_Delete:`Usunąć`,"jc_Delete current row":`Usuń bieżący wiersz`,"jc_Disable/Enable translation":`Wyłącz/Włącz tłumaczenie`,jc_Discard:`Wyrzucać`,"jc_Do not use let's encrypt":`Nie używaj zaszyfrujmy`,"jc_Docker is not available":`Docker nie jest dostępny`,"jc_Docker is not installed or not running":`Docker nie jest zainstalowany lub nie działa`,"jc_Drop file here":`Upuść plik tutaj`,"jc_Enter the code from that page here":`Wpisz kod z tej strony tutaj`,jc_Error:`Błąd`,"jc_Expand/Collapse card":`Rozwiń/Zwiń kartę`,"jc_Export configuration section":`Sekcja konfiguracji eksportu`,"jc_Export data to %s file":`Eksportuj dane do pliku %s`,"jc_Export setting to JSON file":`Eksportuj ustawienia do pliku JSON`,"jc_Fallback custom certificates":`Niestandardowe certyfikaty zastępcze`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.`,"jc_File will be deleted":`Plik zostanie usunięty`,"jc_Filter and Data Actions":`Akcje filtrów i danych`,"jc_Get %s access":`Uzyskaj dostęp %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL`,"jc_Import and add configuration section":`Importuj i dodaj sekcję konfiguracji`,"jc_Import and replace configuration section":`Importuj i zastąp sekcję konfiguracji`,"jc_Import data from %s file":`Importuj dane z pliku %s`,"jc_Import from %s":`Importuj z %s`,"jc_Import settings from JSON file":`Importuj ustawienia z pliku JSON`,"jc_Instance %s is alive":`Instancja %s jest aktywna`,"jc_Instance %s is not alive":`Instancja TEKST nie jest aktywna`,"jc_Invalid JSON":`Nieprawidłowy JSON`,"jc_Invalid JSON file.":`Nieprawidłowy plik JSON.`,"jc_Invalid JSON format. Expected an array.":`Nieprawidłowy format JSON. Oczekiwano tablicy.`,"jc_Invalid YAML":`Nieprawidłowy plik YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Wymaga generacji interfejsu API GUI %s, ale ten administrator zapewnia generację %s. Zaktualizuj administratora.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Został stworzony do generowania interfejsu API GUI %s, ale ten administrator zapewnia generowanie %s. Proszę zaktualizować adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Prawdopodobnie został stworzony dla starszej wersji administratora. Proszę zaktualizować adapter.`,"jc_JSON editor":`Edytor JSON`,jc_Latitude:`Szerokość`,"jc_License %s":`Licencja %s`,"jc_License agreement":`Umowa licencyjna`,"jc_License does not exist":`Licencja nie istnieje`,"jc_License expired on %s":`Licencja wygasła w dniu %s`,'jc_License for other product "%s"':`Licencja na inny produkt „%s”`,"jc_License is for version %s, but required version is %s":`Licencja jest przeznaczona dla wersji %s, ale wymagana jest wersja %s`,"jc_License must be converted":`Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?`,"jc_Listen on all IPs":`Słuchaj na wszystkich adresach IP`,jc_Longitude:`Długość geograficzna`,"jc_Move down":`Padnij`,"jc_Move up":`Podnieść`,jc_Name:`Nazwa`,"jc_No one license found in license manager":`Nie znaleziono licencji w menedżerze licencji`,"jc_No response from admin":`Brak odpowiedzi od administratora`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niedozwolony duplikat wpisu „%s” w kolumnie „%s”`,"jc_OAuth Client ID":`Identyfikator klienta OAuth`,"jc_OAuth Client secret":`Tajny klucz klienta OAuth`,jc_Ok:`Dobrze`,"jc_Passwords are not equal!":`Hasła nie są równe!`,"jc_Place your files here or click here to open the browse dialog":`Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania`,"jc_Please allow popups in your browser for this page!":`Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!`,"jc_Please confirm":`Proszę potwierdzić`,"jc_Please create license":`Utwórz licencję`,"jc_Please enter the license":`Proszę wprowadzić licencję`,"jc_Please fill in all required fields":`Proszę wypełnić wszystkie wymagane pola`,"jc_Port could be used by %s":`Port może być używany przez %s`,"jc_Port is already used by %s":`Port jest już używany przez %s`,"jc_Press ENTER Key to add new item":`Naciśnij klawisz ENTER, aby dodać nowy element`,"jc_Private certificate":`Prywatny certyfikat`,jc_Product:`Produkt`,"jc_Public certificate":`Certyfikat publiczny`,"jc_Renew %s access":`Odnów dostęp %s`,jc_Replace:`Zastępować`,"jc_Request data by instance":`Żądanie danych według instancji`,"jc_Request timed out":`Upłynął limit czasu żądania`,jc_Result:`Wynik`,jc_Save:`Zapisać`,"jc_Save configuration?":`Zapisać konfigurację?`,"jc_Serial number (UUID)":`Numer seryjny (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.`,"jc_Show/hide filter input":`Pokaż/ukryj wejście filtra`,"jc_Some data are not stored. Discard?":`Niektóre dane nie są przechowywane. Wyrzucać?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.`,"jc_Suitable license not found in license manager":`Nie znaleziono odpowiedniej licencji w menedżerze licencji`,"jc_System language":`Język systemu`,"jc_Take browser position":`Zajmij pozycję z przeglądarki`,"jc_Take position from system settings":`Zajmij pozycję z ustawień systemowych`,jc_Template:`Szablon`,"jc_Use all available let's encrypt certificates":`Użyj wszystkich dostępnych certyfikatów Let's Encrypt`,"jc_Use system settings for position":`Użyj ustawień systemowych dla pozycji`,"jc_Used system settings":`Używane ustawienia systemowe`,jc_ValidTill:`Obowiązuje do`,jc_Version:`Wersja`,"jc_YAML editor":`Edytor YAML`,jc_Yes:`Tak`,"jc_You can filter entries by entering here some text":`Możesz filtrować wpisy, wpisując tutaj jakiś tekst`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Nie udało się otworzyć pliku JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Nie udało się przeanalizować pliku JSON`,jc___different__:`różne`,jc_false:`FAŁSZ`,jc_locally:`lokalnie`,jc_none:`Żaden`,jc_repeat:`powtarzać`,jc_true:`PRAWDA`,"jc_via internet":`przez internet`,sch_all:`wszystko`},uk:{"jc_A credential with this name already exists":`Облікові дані з таким ім'ям вже існують`,"jc_A unique name is required":`Потрібне унікальне ім'я`,"jc_Accept license":`Прийняти ліцензію`,jc_Actions:`Дії`,"jc_Add credential":`Додати облікові дані`,"jc_Add row":`Додати рядок`,"jc_All items are filtered out":`Усі елементи відфільтровано`,jc_Append:`Додайте`,"jc_Append %s entries or replace existing?":`Додати %s записів чи замінити наявні?`,"jc_Append or replace?":`Додати чи замінити?`,"jc_Are you sure?":`Ти впевнений?`,jc_Cancel:`Скасувати`,"jc_Cannot add items with set filter":`Неможливо додати елементи зі встановленим фільтром`,"jc_Cannot create credential: %s":`Не вдається створити облікові дані: %s`,"jc_Cannot decode license":`Неможливо розшифрувати ліцензію`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері`,'jc_Cannot display the custom component "%s"':`Не вдається відобразити користувацький компонент "%s"`,"jc_Cannot read licenses: %s":`Неможливо прочитати ліцензії: %s`,"jc_Cannot retrieve options, as instance is offline":`Неможливо отримати параметри, оскільки екземпляр офлайн`,"jc_Cannot save configuration because of error in configuration":`Не вдалося зберегти конфігурацію через помилку в конфігурації`,"jc_Cannot upload":`Неможливо завантажити`,"jc_Chained certificate":`Прикутий сертифікат`,jc_Checked:`Перевірено`,"jc_Click to see in full size":`Натисніть, щоб побачити в повному розмірі`,"jc_Click to show":`Натисніть, щоб показати`,"jc_Clone current row":`Клонувати поточний рядок`,jc_Close:`Закрити`,jc_Commercial:`Комерційний`,jc_Copied:`Скопійовано`,"jc_Copied %s":`Скопійовано "%s"`,"jc_Copy content":`Скопіюйте вміст`,jc_Create:`Створити`,"jc_Credential type":`Тип облікових даних`,'jc_Custom component "%s" was not started':`Користувацький компонент "%s" не запущено`,"jc_Define schedule":`Визначити розклад`,jc_Delete:`Видалити`,"jc_Delete current row":`Видалити поточний рядок`,"jc_Disable/Enable translation":`Вимкнути/Увімкнути переклад`,jc_Discard:`Відкинути`,"jc_Do not use let's encrypt":`Не використовуйте let's encrypt`,"jc_Docker is not available":`Докер недоступний`,"jc_Docker is not installed or not running":`Docker не встановлено або не працює`,"jc_Drop file here":`Перетягніть файл сюди`,"jc_Enter the code from that page here":`Введіть тут код з цієї сторінки`,jc_Error:`Помилка`,"jc_Expand/Collapse card":`Розгорнути/Згорнути картку`,"jc_Export configuration section":`Розділ конфігурації експорту`,"jc_Export data to %s file":`Експортувати дані у файл %s`,"jc_Export setting to JSON file":`Експорт налаштувань у файл JSON`,"jc_Fallback custom certificates":`Запасні спеціальні сертифікати`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.`,"jc_File will be deleted":`Файл буде видалено`,"jc_Filter and Data Actions":`Фільтр і дії з даними`,"jc_Get %s access":`Отримайте доступ %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням`,"jc_Import and add configuration section":`Розділ імпорту та додавання конфігурації`,"jc_Import and replace configuration section":`Розділ імпорту та заміни конфігурації`,"jc_Import data from %s file":`Імпортувати дані з файлу %s`,"jc_Import from %s":`Імпортувати з %s`,"jc_Import settings from JSON file":`Імпорт налаштувань з JSON-файлу`,"jc_Instance %s is alive":`Примірник %s живий`,"jc_Instance %s is not alive":`Примірник %s не живий`,"jc_Invalid JSON":`Недійсний JSON`,"jc_Invalid JSON file.":`Недійсний JSON-файл.`,"jc_Invalid JSON format. Expected an array.":`Недійсний формат JSON. Очікується масив.`,"jc_Invalid YAML":`Недійсний YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Потрібна генерація API графічного інтерфейсу %s, але цей адміністратор надає генерацію %s. Будь ласка, оновіть адміністраторську версію.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Його було створено для покоління GUI API %s, але цей адміністратор надає покоління %s. Будь ласка, оновіть адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Ймовірно, його було створено для старішої версії адміністратора. Будь ласка, оновіть адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Ліцензія %s`,"jc_License agreement":`Ліцензійна угода`,"jc_License does not exist":`Ліцензії не існує`,"jc_License expired on %s":`Термін дії ліцензії закінчився %s`,'jc_License for other product "%s"':`Ліцензія на інший продукт "%s"`,"jc_License is for version %s, but required version is %s":`Ліцензія для версії %s, але потрібна версія %s`,"jc_License must be converted":`Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?`,"jc_Listen on all IPs":`Прослуховування на всіх IP`,jc_Longitude:`Довгота`,"jc_Move down":`Рухатися вниз`,"jc_Move up":`Рухатися вгору`,jc_Name:`Ім'я`,"jc_No one license found in license manager":`У менеджері ліцензій не знайдено жодної ліцензії`,"jc_No response from admin":`Немає відповіді від адміністратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недозволений дублікат запису "%s" у стовпці "%s"`,"jc_OAuth Client ID":`Ідентифікатор клієнта OAuth`,"jc_OAuth Client secret":`Секрет клієнта OAuth`,jc_Ok:`В порядку`,"jc_Passwords are not equal!":`Паролі не бувають рівними!`,"jc_Place your files here or click here to open the browse dialog":`Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду`,"jc_Please allow popups in your browser for this page!":`Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!`,"jc_Please confirm":`Будь-ласка підтвердіть`,"jc_Please create license":`Будь ласка, створіть ліцензію`,"jc_Please enter the license":`Будь ласка, введіть ліцензію`,"jc_Please fill in all required fields":`Будь ласка, заповніть усі обов'язкові поля`,"jc_Port could be used by %s":`Порт може використовуватися %s`,"jc_Port is already used by %s":`Порт уже використовується %s`,"jc_Press ENTER Key to add new item":`Натисніть клавішу ENTER, щоб додати новий елемент`,"jc_Private certificate":`Приватний сертифікат`,jc_Product:`Продукт`,"jc_Public certificate":`Публічний сертифікат`,"jc_Renew %s access":`Поновити доступ %s`,jc_Replace:`Замінити`,"jc_Request data by instance":`Запит даних за екземпляром`,"jc_Request timed out":`Час запиту вичерпано`,jc_Result:`Результат`,jc_Save:`зберегти`,"jc_Save configuration?":`Зберегти конфігурацію?`,"jc_Serial number (UUID)":`Серійний номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.`,"jc_Show/hide filter input":`Показати/сховати введення фільтра`,"jc_Some data are not stored. Discard?":`Деякі дані не зберігаються. Відкинути?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.`,"jc_Suitable license not found in license manager":`Відповідна ліцензія не знайдена в менеджері ліцензій`,"jc_System language":`Системна мова`,"jc_Take browser position":`Займіть позицію з браузера`,"jc_Take position from system settings":`Займіть позицію в налаштуваннях системи`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Використовуйте всі доступні сертифікати let's encrypt`,"jc_Use system settings for position":`Використовуйте системні налаштування для позиції`,"jc_Used system settings":`Використані системні налаштування`,jc_ValidTill:`Дійсний до`,jc_Version:`Версія`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Так`,"jc_You can filter entries by entering here some text":`Ви можете фільтрувати записи, ввівши тут певний текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не вдалося відкрити JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не вдалося проаналізувати JSON-файл`,jc___different__:`інший`,jc_false:`НЕПРАВДА`,jc_locally:`локально`,jc_none:`немає`,jc_repeat:`повторити`,jc_true:`ПРАВДА`,"jc_via internet":`через інтернет`,sch_all:`все`},"zh-cn":{"jc_A credential with this name already exists":`已存在同名凭证`,"jc_A unique name is required":`需要一个唯一的名称。`,"jc_Accept license":`接受许可`,jc_Actions:`操作`,"jc_Add credential":`添加凭据`,"jc_Add row":`添加行`,"jc_All items are filtered out":`所有项目都被过滤掉`,jc_Append:`附加`,"jc_Append %s entries or replace existing?":`追加 %s 条目还是替换现有条目?`,"jc_Append or replace?":`追加还是替换?`,"jc_Are you sure?":`你确定吗?`,jc_Cancel:`取消`,"jc_Cannot add items with set filter":`无法使用设置过滤器添加项目`,"jc_Cannot create credential: %s":`无法创建凭证:%s`,"jc_Cannot decode license":`无法解码许可证`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测`,'jc_Cannot display the custom component "%s"':`无法显示自定义组件“%s”`,"jc_Cannot read licenses: %s":`无法读取许可证:%s`,"jc_Cannot retrieve options, as instance is offline":`无法检索选项,因为实例处于脱机状态`,"jc_Cannot save configuration because of error in configuration":`由于配置错误,无法保存配置。`,"jc_Cannot upload":`无法上传`,"jc_Chained certificate":`链式证书`,jc_Checked:`勾选`,"jc_Click to see in full size":`点击查看完整尺寸`,"jc_Click to show":`点击显示`,"jc_Clone current row":`克隆当前行`,jc_Close:`关`,jc_Commercial:`商业的`,jc_Copied:`复制的`,"jc_Copied %s":`复制的"%s"`,"jc_Copy content":`复制内容`,jc_Create:`创建`,"jc_Credential type":`凭证类型`,'jc_Custom component "%s" was not started':`自定义组件“%s”未启动`,"jc_Define schedule":`定义时间表`,jc_Delete:`删除`,"jc_Delete current row":`删除当前行`,"jc_Disable/Enable translation":`禁用/启用翻译`,jc_Discard:`丢弃`,"jc_Do not use let's encrypt":`不要使用让我们加密`,"jc_Docker is not available":`Docker 不可用`,"jc_Docker is not installed or not running":`Docker 未安装或未运行`,"jc_Drop file here":`将档案放在这里`,"jc_Enter the code from that page here":`在此处输入该页面的代码`,jc_Error:`错误`,"jc_Expand/Collapse card":`展开/折叠卡`,"jc_Export configuration section":`导出配置部分`,"jc_Export data to %s file":`将数据导出到 %s 文件`,"jc_Export setting to JSON file":`将设置导出到 JSON 文件`,"jc_Fallback custom certificates":`后备自定义证书`,"jc_File is too big. Max %sk allowed. Try use SVG.":`文件太大。允许的最大字节%s数。尝试使用 SVG。`,"jc_File will be deleted":`文件将被删除`,"jc_Filter and Data Actions":`过滤和数据操作`,"jc_Get %s access":`获取 %s 访问权限`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用`,"jc_Import and add configuration section":`导入并添加配置部分`,"jc_Import and replace configuration section":`导入和替换配置部分`,"jc_Import data from %s file":`从 %s 文件导入数据`,"jc_Import from %s":`从 %s 导入`,"jc_Import settings from JSON file":`从 JSON 文件导入设置`,"jc_Instance %s is alive":`实例 %s 是活动的`,"jc_Instance %s is not alive":`实例 %s 不存在`,"jc_Invalid JSON":`JSON 无效`,"jc_Invalid JSON file.":`无效的JSON文件。`,"jc_Invalid JSON format. Expected an array.":`JSON格式无效。应为数组。`,"jc_Invalid YAML":`无效的 YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`它需要生成 GUI API,但此管理员提供的是生成功能。请更新管理员。`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`它原本是为 GUI API 生成 %s 而设计的,但此管理员提供了生成 %s 的功能。请更新适配器。`,"jc_It was probably built for an older admin version. Please update the adapter.":`这可能是为旧版管理后台构建的。请更新适配器。`,"jc_JSON editor":`JSON 编辑器`,jc_Latitude:`纬度`,"jc_License %s":`许可证 %s`,"jc_License agreement":`许可协议`,"jc_License does not exist":`许可证不存在`,"jc_License expired on %s":`许可证已于 %s 过期`,'jc_License for other product "%s"':`其他产品“%s”的许可证`,"jc_License is for version %s, but required version is %s":`许可证适用于版本 %s,但所需版本为 %s。`,"jc_License must be converted":`许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?`,"jc_Listen on all IPs":`监听所有IP`,jc_Longitude:`经度`,"jc_Move down":`下移`,"jc_Move up":`提升`,jc_Name:`姓名`,"jc_No one license found in license manager":`许可证管理器中未找到任何许可证`,"jc_No response from admin":`管理员没有回应`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`列“%s”中存在不允许的重复条目“%s”。`,"jc_OAuth Client ID":`OAuth客户端ID`,"jc_OAuth Client secret":`OAuth 客户端密钥`,jc_Ok:`好`,"jc_Passwords are not equal!":`密码不相等!`,"jc_Place your files here or click here to open the browse dialog":`将文件放在此处或单击此处打开浏览对话框`,"jc_Please allow popups in your browser for this page!":`请允许浏览器弹出此页面!`,"jc_Please confirm":`请确认`,"jc_Please create license":`请创建许可证`,"jc_Please enter the license":`请输入许可证`,"jc_Please fill in all required fields":`请填写所有必填字段`,"jc_Port could be used by %s":`%s 可以使用端口`,"jc_Port is already used by %s":`端口已被 %s 使用`,"jc_Press ENTER Key to add new item":`按 ENTER 键添加新项目`,"jc_Private certificate":`私有证书`,jc_Product:`产品`,"jc_Public certificate":`公共证书`,"jc_Renew %s access":`续订 %s 访问权限`,jc_Replace:`代替`,"jc_Request data by instance":`按实例请求数据`,"jc_Request timed out":`请求超时`,jc_Result:`结果`,jc_Save:`保存`,"jc_Save configuration?":`保存配置?`,"jc_Serial number (UUID)":`序列号 (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`许可证中的序列号 (UUID)“%s”用于其他设备。`,"jc_Show/hide filter input":`显示/隐藏过滤器输入`,"jc_Some data are not stored. Discard?":`部分数据未存储。丢弃?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`授权成功。令牌有效期至 %s,并将自动续订。`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。`,"jc_Suitable license not found in license manager":`在许可证管理器中找不到合适的许可证`,"jc_System language":`系统语言`,"jc_Take browser position":`从浏览器获取位置`,"jc_Take position from system settings":`从系统设置中获取位置`,jc_Template:`模板`,"jc_Use all available let's encrypt certificates":`使用所有可用的让我们加密证书`,"jc_Use system settings for position":`使用系统设置定位`,"jc_Used system settings":`使用的系统设置`,jc_ValidTill:`有效期至`,jc_Version:`版本`,"jc_YAML editor":`YAML 编辑器`,jc_Yes:`是的`,"jc_You can filter entries by entering here some text":`您可以通过在此处输入一些文本来过滤条目`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] 打开 JSON 文件失败`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] 解析 JSON 文件失败`,jc___different__:`不同的`,jc_false:`错误的`,jc_locally:`本地`,jc_none:`没有任何`,jc_repeat:`重复`,jc_true:`真的`,"jc_via internet":`通过互联网`,sch_all:`全选`}});var Sk={root:{width:`100%`,height:`100%`}},Ck=class extends s{constructor(e){super(e),q(this,`forceUpdateHandlers`,void 0),q(this,`errorTimeout`,null),q(this,`errorCached`,null),q(this,`oContext`,void 0),q(this,`cachedObjects`,{}),q(this,`onCommandRunning`,e=>this.setState({commandRunning:e})),q(this,`onAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})}),q(this,`onChange`,(e,t,n,r)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,!!r),n==null||n();else if(e&&this.props.onChange){let t={changed:JSON.stringify(e)!==this.state.originalData};this.setState(t,()=>{var i,a;(i=(a=this.props).onChange)==null||i.call(a,e,!!t.changed,!!r),n==null||n()})}else if(r){var i,a;(i=(a=this.props).onChange)==null||i.call(a,null,void 0,r)}}),q(this,`onError`,(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));let n=this.errorCached;n&&e&&(t?n[e]=t:delete n[e]),this.errorTimeout&&=(clearTimeout(this.errorTimeout),null),JSON.stringify(n)===JSON.stringify(this.state.errors)?this.errorCached=null:this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached||{}},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50)}),q(this,`getCachedObject`,async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]}),q(this,`changeLanguage`,()=>{this.forceUpdate()}),q(this,`forceAttrUpdate`,(e,t)=>{Array.isArray(e)?e.forEach(e=>this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)}),q(this,`registerOnForceUpdate`,(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]}),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(e=>console.error(`Cannot read data: ${e}`))}static getDerivedStateFromProps(e,t){return e.updateData===t.updateData?null:{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}}static async loadI18n(e,t,n){if(t===!0||t&&typeof t==`string`){let r=K.getLanguage(),i=typeof t==`string`?t:`i18n`,a=await e.fileExists(`${n}.admin`,`${i}/${r}.json`),o;if(a?o=`${i}/${r}.json`:(a=await e.fileExists(`${n}.admin`,`${i}/${r}/translations.json`),a?o=`${i}/${r}/translations.json`:r!==`en`&&(a=await e.fileExists(`${n}.admin`,`${i}/en.json`),a?o=`${i}/en.json`:(a=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),a&&(o=`${i}/en/translations.json`)))),o){let t=await e.readFile(`${n}.admin`,o),i;i=t.file===void 0?t:t.file;try{let e=JSON.parse(i);K.extendTranslations(e,r)}catch(e){return console.error(`Cannot parse language file "${n}.admin/${o}: ${e}`),``}return o}return console.warn(`Cannot find i18n for ${n} / ${o}`),``}return t&&typeof t==`object`&&K.extendTranslations(t),``}async readData(){let e;try{e=this.props.socket.getCompactSystemConfig?await this.props.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)||void 0;let t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:(e==null?void 0:e.common)||{},alive:!!(t!=null&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(e){console.error(`Cannot read system config: ${e}`)}}flatten(e,t){return t||={},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){let t=this.flatten(e);Object.keys(t).forEach(e=>{var n,r,i,a,o;if((n=t[e].confirm)!=null&&n.alsoDependsOn){var s;(s=t[e].confirm)==null||s.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].confirmDependsOn=t[n].confirmDependsOn||[];let r={...t[e],attr:e};r.confirm&&(r.confirm.cancel=`Undo`),t[n].confirmDependsOn.push(r)}})}if((r=t[e].onChange)!=null&&r.alsoDependsOn){var c;(c=t[e].onChange)==null||c.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].onChangeDependsOn=t[n].onChangeDependsOn||[];let r={...t[e],attr:e};t[n].onChangeDependsOn.push(r)}})}if((i=t[e].hidden)!=null&&i.alsoDependsOn){var l;(l=t[e].hidden)==null||l.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].hiddenDependsOn=t[n].hiddenDependsOn||[];let r={...t[e],attr:e};t[n].hiddenDependsOn.push(r)}})}if((a=t[e].label)!=null&&a.alsoDependsOn){var u;(u=t[e].label)==null||u.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].labelDependsOn=t[n].labelDependsOn||[];let r={...t[e],attr:e};t[n].labelDependsOn.push(r)}})}if((o=t[e].help)!=null&&o.alsoDependsOn){var d;(d=t[e].help)==null||d.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].helpDependsOn=t[n].helpDependsOn||[];let r={...t[e],attr:e};t[n].helpDependsOn.push(r)}})}})}updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject},e&&this.forceUpdate()}renderItem(e){return this.oContext?e.type===`tabs`?_.createElement(xk,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type===`panel`||!e.type?_.createElement(yk,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null):null}render(){return!this.state.systemConfig||!this.oContext?_.createElement(I,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),_.createElement(`div`,{style:{...!this.props.embedded||this.props.withoutSaveButtons?Sk.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}};g();var wk={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 Tk(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function Ek(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function Dk(e,t){if(typeof t!=`string`)return t;if(!t.startsWith(`$/aes-192-cbc:`)||!/^[0-9a-f]{48}$/.test(e))return Tk(e,t);let n=t.split(`:`,3),r=window.CryptoJS.enc.Hex.parse(e),i=window.CryptoJS.enc.Hex.parse(n[1]),a=window.CryptoJS.lib.CipherParams.create({ciphertext:window.CryptoJS.enc.Hex.parse(n[2])}),o=window.CryptoJS.AES.decrypt(a,r,{iv:i});return window.CryptoJS.enc.Utf8.stringify(o)}function Ok(e,t,n){if(typeof t!=`string`)return t;if(!/^[0-9a-f]{48}$/.test(e))return Ek(e,t);let r;r=n?window.CryptoJS.enc.Hex.parse(n):window.CryptoJS.lib.WordArray.random(128/8);let i=window.CryptoJS.enc.Hex.parse(e),a=window.CryptoJS.AES.encrypt(t,i,{iv:r}).ciphertext;return`$/aes-192-cbc:${window.CryptoJS.enc.Hex.stringify(r)}:${a}`}function kk(e,t){var n;return!t||!document.getElementById(t)?new Promise(n=>{let r=document.createElement(`script`);r.setAttribute(`id`,t),r.onload=n,r.src=e,document.getElementsByTagName(`head`)[0].appendChild(r)}):(n=document.getElementById(t))==null?void 0:n.onload}var Ak=class extends Rt{constructor(e){super(e),q(this,`fileSubscribed`,[]),q(this,`fileLangSubscribed`,``),q(this,`secret`,void 0),q(this,`handleFileSelect`,e=>{let t=e.target.files[0];if(t){let e=new FileReader;e.onload=e=>{if(!e.target)return;let t=e.target.result;try{let e=JSON.parse(t);this.setState({data:e,changed:JSON.stringify(e)!==JSON.stringify(this.state.originalData)})}catch{window.alert(K.t(`jc_[JsonConfig] Failed to parse JSON file`))}},e.readAsText(t)}else window.alert(K.t(`jc_[JsonConfig] Failed to open JSON File`))}),q(this,`onFileChange`,async(e,t,n)=>{if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{var r;await Ck.loadI18n(this.props.socket,(r=this.state.schema)==null?void 0:r.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{let e=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:e||void 0,hash:(0,Es.default)(JSON.stringify(e)).toString()})}catch{}}}),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:Kn(e.themeName),saveConfigDialog:!1,hash:`_`},this.secret=e.secret||``,this.getInstanceObject().then(e=>this.getConfigFile().then(t=>Ck.loadI18n(this.props.socket,t==null?void 0:t.i18n,this.props.adapterName).then(n=>{n&&(this.fileLangSubscribed||(this.fileLangSubscribed=n,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),e?this.setState({schema:t||void 0,data:e.native,common:e.common,hash:(0,Es.default)(JSON.stringify(t)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&=(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),``)}getExportImportButtons(){return _.createElement(`div`,{style:wk.exportImportButtons},_.createElement(Ln,{title:this.props.t(`jc_Import settings from JSON file`),slotProps:{popper:{sx:wk.tooltip}}},_.createElement(zt,{size:`small`,sx:{"&.MuiFab-root":wk.button},onClick:()=>{let e=document.createElement(`input`);e.setAttribute(`type`,`file`),e.setAttribute(`id`,`files`),e.setAttribute(`opacity`,0),e.addEventListener(`change`,e=>this.handleFileSelect(e),!1),e.click()}},_.createElement(Nt,null))),_.createElement(Ln,{title:this.props.t(`jc_Export setting to JSON file`),slotProps:{popper:{sx:wk.tooltip}}},_.createElement(zt,{size:`small`,sx:{"&.MuiFab-root":wk.button},onClick:()=>{this.state.data&&$t.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},_.createElement(Nt,{style:{transform:`rotate(180deg)`}}))))}async getInstanceObject(){try{let t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t==null?void 0:t.encryptedNative)){var e;if(!this.secret){let e=await this.props.socket.getSystemConfig();await kk(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`),this.secret=e.native.secret}return(e=t.encryptedNative)==null||e.forEach(e=>{t.native[e]&&(t.native[e]=Dk(this.secret,t.native[e]))}),t}return t||null}catch(e){window.alert(`[JsonConfig] Cannot read instance object: ${e}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?_.createElement(Cn,{title:K.t(`jc_Please confirm`),text:K.t(`jc_Some data are not stored. Discard?`),ok:K.t(`jc_Discard`),cancel:K.t(`jc_Cancel`),onClose:e=>this.setState({confirmDialog:!1},()=>e&&Rt.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e[`#include`]==`string`){let n=await this._getConfigFile(e[`#include`],[...t]);return delete e[`#include`],n&&(e={...e,...n}),e}let n=Object.keys(e);for(let r=0;r<n.length;r++)e[n[r]]&&typeof e[n[r]]==`object`&&(e[n[r]]=await this.scanForInclude(e[n[r]],t));return e}async getConfigFile(e){return this._getConfigFile(e)}async _getConfigFile(e,t){if(e||=`jsonConfig.json5`,t||=[],t.includes(e))return window.alert(`[JsonConfig] Circular reference in file: ${e} => ${t.join(` => `)}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e=`jsonConfig.json`);let n=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e),r=``,i=``;if(n.file!==void 0&&(i=n.file),typeof i==`string`)r=i;else if(i.type===`Buffer`){let e=``,t=new Uint8Array(i.data),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);r=e}this.fileSubscribed.includes(e)||(this.fileSubscribed.push(e),await this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,e,this.onFileChange));try{return await this.scanForInclude(Ts.default.parse(r),t)}catch(e){window.alert(`[JsonConfig] Cannot parse json5 config!`),console.log(e)}}catch(t){this.state.schema||window.alert(`[JsonConfig] Cannot read file "${e}: ${t}`)}return null}renderSaveConfigDialog(){return this.state.saveConfigDialog?_.createElement(Cn,{title:K.t(`jc_Please confirm`),text:K.t(`jc_Save configuration?`),ok:K.t(`jc_Save`),cancel:K.t(`jc_Cancel`),onClose:e=>this.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t||=this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(let n of Object.values(t.items)){let t=this.findAttr(e,n);if(t)return t}}return null}postProcessing(e,t,n){if(n||=this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}let r=e[t];if(n.items)if(n.type===`table`){let e=r;if(!Array.isArray(e))return;for(let t of e)if(n.items)for(let e of n.items)e.attr&&this.postProcessing(t,e.attr,e)}else for(let[t,r]of Object.entries(n.items)){if(r.type===`panel`||r.type===`tabs`||r.type===`accordion`)return;this.postProcessing(e,t,r)}else if(t&&typeof r==`string`)if(n.type===`text`)n.trim!==!1&&(e[t]=r.trim());else if(n.type===`ip`)e[t]=r.trim();else if(n.type===`number`){let i=parseFloat(r.toString().replace(`,`,`.`));e[t]=n.min!==void 0&&i<n.min?n.min:n.max!==void 0&&i>n.max?n.max:i}else if(n.type===`port`){let i=parseInt(r.toString(),10);n.min!==void 0&&i<n.min?e[t]=n.min:n.max!==void 0&&i>n.max&&(e[t]=n.max),e[t]=e[t]!==0&&i<20?20:i>65535?65535:i}else n.type===`checkbox`&&(e[t]=e[t]===!0||e[t]===`true`||e[t]===`on`||e[t]===1||e[t]===`1`)}async onSave(e,t){if(e){let e=await this.getInstanceObject();if(!e){console.error(`Something went wrong: may be no connection?`),window.alert(`Something went wrong: may be no connection?`);return}if(!this.state.data||!this.state.schema)return;let n={};for(let t of Object.keys(this.state.data)){let r=this.findAttr(t);(!r||!r.doNotSave||r.type===`state`)&&!t.startsWith(`_`)?X.setValue(e.native,t,this.state.data[t]):(X.setValue(e.native,t,null),n[t]=this.state.data[t])}try{let t=JSON.parse(JSON.stringify(e));if(Array.isArray(t.encryptedNative)){await kk(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`);for(let e of t.encryptedNative)t.native[e]&&(t.native[e]=Ok(this.secret,t.native[e]))}await this.props.socket.setObject(t._id,t)}catch(e){window.alert(`[JsonConfig] Cannot set object: ${e}`)}let r={...e.native,...n};console.log(r),this.setState({changed:!1,data:r,updateData:this.state.updateData+1,originalData:r},()=>t&&Rt.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):Rt.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){let e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?_.createElement(I,null):_.createElement(`div`,{style:wk.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),_.createElement(Ck,{key:this.state.hash,style:wk.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(K.t(`jc_Cannot save configuration because of error in configuration`)),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:!!t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:`.`}),_.createElement(Gt,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width===`xs`||this.props.width===`sm`||this.props.width===`md`,changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}},jk=t({ConfigGeneric:()=>X,ConfigPanel:()=>yk,GUI_API_GENERATION:()=>2,JsonConfig:()=>Ak,JsonConfigComponent:()=>Ck,checkGuiApiCompatibility:()=>yc}),Mk=t({ConfigGeneric:()=>zk,ConfigPanel:()=>Rk,GUI_API_GENERATION:()=>Pk,JsonConfig:()=>Ik,JsonConfigComponent:()=>Lk,checkGuiApiCompatibility:()=>Fk,default:()=>Bk}),Nk=jk,Pk=Nk.GUI_API_GENERATION,Fk=Nk.checkGuiApiCompatibility,Ik=Nk.JsonConfig,Lk=Nk.JsonConfigComponent,Rk=Nk.ConfigPanel,zk=Nk.ConfigGeneric,Bk=Reflect.get(jk,`default`)??jk,Vk=`__mf_module_cache__`;globalThis[Vk]||={share:{},remote:{}},globalThis[Vk].share||={},globalThis[Vk].remote||={};var Hk=globalThis[Vk];for(let e of Object.keys(Hk.share))if(e.startsWith(`default:`)){let t=e.slice(8);Hk.share[t]===void 0&&(Hk.share[t]=Hk.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;Hk.share[t]===void 0&&(Hk.share[t]=Hk.share[e])}var Uk=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},Wk=Symbol.for(`module-federation.shared-cache-listeners`),Gk=e=>{let t=e[Wk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,Wk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Kk=(e,t,n)=>{let r=Gk(e);(r[t.canonical]||=new Set).add(n)},qk=Symbol.for(`module-federation.shared-cache-owners`),Jk=e=>{let t=e[qk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,qk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Yk=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[qk];r===void 0?o&&delete o[t.canonical]:Jk(e)[t.canonical]=r;let s=(i=e[Wk])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Xk=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},Zk=Uk(Hk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]});Zk===void 0&&(Zk=Xk(Mk),Yk(Hk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},Zk,`ConfigCustomJavascriptSet`));var Qk,$k=e=>{e.GUI_API_GENERATION,e.checkGuiApiCompatibility,e.JsonConfig,e.JsonConfigComponent,e.ConfigPanel,Qk=e.ConfigGeneric,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};Kk(Hk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},$k),$k(Zk);export{ty as a,ps as c,Dx as i,Mk as n,vs as o,Tx as r,hs as s,Qk as t};
|