import{s as Q,L as g,t as e,a as b,b as f,i as h,c as t,f as R,d as y,j as T,o as k,e as x}from"./index-2ay5PpNs.js";import{d as S,D as V,z as j,a as n,S as C,o as $,c as w,h as l}from"./index-D3rICic-.js";const Z=Q({String:e.string,Number:e.number,"True False":e.bool,PropertyName:e.propertyName,Null:e.null,",":e.separator,"[ ]":e.squareBracket,"{ }":e.brace}),v=g.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[Z],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),N=f.define({name:"json",parser:v.configure({props:[h.add({Object:t({except:/^\s*\}/}),Array:t({except:/^\s*\]/})}),R.add({"Object Array":y})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function d(){return new b(N)}const Y=S({name:"CodeMirror",__name:"code-mirror",props:{modelValue:{},lang:{default:"js"},height:{default:"auto"},fontSize:{default:"13px"},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{}},emits:["update:modelValue"],setup(i,{emit:c}){const o=i,u=c,r=V(),O=j(o.modelValue),p=n(()=>{switch(o.lang){case"json":return d();case"js":return T();default:return d()}}),P=n(()=>({"&":{border:`1px solid ${r.darkMode?"#0000":"rgb(224, 224, 230)"}`,borderRadius:"6px",fontFamily:"system-ui",backgroundColor:"rgba(255, 255, 255, 0.1)"},".cm-line":{height:"21px",fontSize:o.fontSize,fontFamily:"monospace"},".cm-lineNumbers":{fontFamily:"system-ui",marginLeft:"5px",borderColor:"#0000",color:"rgba(255, 255, 255, 0.82)"},".cm-activeLineGutter":{backgroundColor:r.darkMode?"#262626":"#a1a1a1"},".cm-activeLine ":{backgroundColor:"#0000"},".cm-gutters":{borderTopLeftRadius:"6px",borderBottomLeftRadius:"6px",backgroundColor:r.darkMode?"#262626":"#a1a1a1"},".cm-content":{padding:"5px 5px 5px 0"},".cm-scroller":{height:o.height,overflowY:"auto",overflowX:"hidden"},".cm-placeholder":{color:"rgba(255, 255, 255, 0.38)"},"&.cm-focused":{outline:"none",borderRadius:"6px",border:"1px solid #3388ff",boxShadow:"0 0 0 2px rgba(19, 102, 255, 0.2)",zIndex:"100"}}));return C(()=>O.value,a=>{u("update:modelValue",a)}),(a,s)=>($(),w(l(x),{modelValue:O.value,"onUpdate:modelValue":s[0]||(s[0]=m=>O.value=m),class:"w-100%",readonly:a.readonly,disabled:a.disabled,theme:P.value,placeholder:a.placeholder,basic:"","line-number":!1,lang:p.value,extensions:[l(k)]},null,8,["modelValue","readonly","disabled","theme","placeholder","lang","extensions"]))}});export{Y as _};
