MCPcopy Index your code
hub / github.com/google/adk-python / Vo

Function Vo

src/google/adk/cli/browser/main-3CUQG2IN.js:3042–3042  ·  view source on GitHub ↗
(AA,fA)

Source from the content-addressed store, hash-verified

3040 margin-bottom: 2px;
3041 display: inline-block;
3042}`);var LEA=TA("<!> <!>",1),GEA=TA('<div class="jse-search-box-background svelte-10mlrw4"></div>'),KEA=TA('<div class="jse-search-box-container svelte-10mlrw4"><!></div> <div class="jse-contents svelte-10mlrw4"><!> <!></div> <!> <!> <!> <!>',1),UEA=TA('<label class="jse-hidden-input-label svelte-10mlrw4"><input type="text" tabindex="-1" class="jse-hidden-input svelte-10mlrw4"/></label> <!>',1),TEA=TA('<div class="jse-contents svelte-10mlrw4"><div class="jse-loading-space svelte-10mlrw4"></div> <div class="jse-loading svelte-10mlrw4">loading...</div></div>'),OEA=TA('<div role="tree" tabindex="-1"><!> <!> <!></div> <!> <!>',1);function $_(i,e){Jt(e,!1);var A=cA(void 0,!0),t=dr("jsoneditor:TreeMode"),n=typeof window>"u";t("isSSR:",n);var o=_1(),a=_1(),{openAbsolutePopup:r,closeAbsolutePopup:s}=s1("absolute-popup"),l=cA(void 0,!0),g=cA(void 0,!0),C=cA(void 0,!0),d=!1,B=BW(),u=K(e,"readOnly",9),E=K(e,"externalContent",9),f=K(e,"externalSelection",9),m=K(e,"history",9),v=K(e,"truncateTextSize",9),S=K(e,"mainMenuBar",9),k=K(e,"navigationBar",9),M=K(e,"escapeControlCharacters",9),x=K(e,"escapeUnicodeCharacters",9),F=K(e,"parser",9),z=K(e,"parseMemoizeOne",9),j=K(e,"validator",9),X=K(e,"validationParser",9),eA=K(e,"pathParser",9),Z=K(e,"indentation",9),CA=K(e,"onError",9),wA=K(e,"onChange",9),BA=K(e,"onChangeMode",9),QA=K(e,"onSelect",9),RA=K(e,"onUndo",9),dA=K(e,"onRedo",9),IA=K(e,"onRenderValue",9),xA=K(e,"onRenderMenu",9),qA=K(e,"onRenderContextMenu",9),ue=K(e,"onClassName",9),HA=K(e,"onFocus",9),bA=K(e,"onBlur",9),PA=K(e,"onSortModal",9),it=K(e,"onTransformModal",9),Xe=K(e,"onJSONEditorModal",9),YA=!1,hA=cA(!1,!0),Ae=cA(void 0,!0);vx({onMount:os,onDestroy:Dg,getWindow:()=>Ip(c(C)),hasFocus:()=>YA&&document.hasFocus()||cx(c(C)),onFocus:()=>{d=!0,HA()&&HA()()},onBlur:()=>{d=!1,bA()&&bA()()}});var pA=cA(void 0,!0),te=cA(void 0,!0),NA=void 0,Ge=!1,JA=cA(G_({json:c(pA)}),!0),yA=cA(Ap(f())?f():void 0,!0);function Pt(AA){N(yA,AA)}os(()=>{if(c(yA)){var AA=Qt(c(yA));N(JA,Bc(c(pA),c(JA),AA,Kw)),setTimeout(()=>qo(AA))}});var Dt,fe=cA(void 0,!0),Zt=cA(void 0,!0),Pe=cA(void 0,!0),qe=cA(void 0,!0),vt=cA(!1,!0),Ke=cA(!1,!0);function Ii(AA){N(qe,(Dt=AA)?tW(c(pA),Dt.items):void 0)}function V(AA,fA){return $.apply(this,arguments)}function $(){return($=Xt(function*(AA,fA){N(JA,Bc(c(pA),c(JA),AA,Kw));var ZA=_o(fA);yield Wi(AA,{element:ZA})})).apply(this,arguments)}function iA(){N(vt,!1),N(Ke,!1),Tt()}function oA(AA){t("select validation error",AA),N(yA,en(AA.path)),Wi(AA.path)}function UA(AA){var fA=arguments.length>1&&arguments[1]!==void 0?arguments[1]:K_;t("expand"),N(JA,Bc(c(pA),c(JA),AA,fA))}function he(AA,fA){N(JA,Hj(c(pA),c(JA),AA,fA)),c(yA)&&(function(ZA,Ye){return v0(Qt(ZA),Ye)&&(Qt(ZA).length>Ye.length||nr(ZA))})(c(yA),AA)&&N(yA,void 0)}var me=cA(!1,!0),GA=cA([],!0),OA=cA(void 0,!0),wt=YB(hW);function rt(AA,fA,ZA,Ye){Kh(()=>{var Me;try{Me=wt(AA,fA,ZA,Ye)}catch(Re){Me=[{path:[],message:"Failed to validate: "+Re.message,severity:Ec.warning}]}Ui(Me,c(GA))||(t("validationErrors changed:",Me),N(GA,Me),N(OA,(function(Re,ct){var ti;return ct.forEach(ji=>{ti=hV(Re,ti,ji.path,(Wn,Cn)=>Fe(Fe({},Cn),{},{validationError:ji}))}),ct.forEach(ji=>{for(var Wn=ji.path;Wn.length>0;)Wn=an(Wn),ti=hV(Re,ti,Wn,(Cn,xo)=>xo.validationError?xo:Fe(Fe({},xo),{},{validationError:{isChildError:!0,path:Wn,message:"Contains invalid data",severity:Ec.warning}}))}),ti})(AA,c(GA))))},Me=>t("validationErrors updated in ".concat(Me," ms")))}function je(){return t("validate"),NA?{parseError:NA,isRepairable:!1}:(rt(c(pA),j(),F(),X()),An(c(GA))?void 0:{validationErrors:c(GA)})}function ze(){return c(pA)}function pi(){return c(JA)}function mn(){return c(yA)}function Sn(AA){t("applyExternalContent",{updatedContent:AA}),W4(AA)?(function(fA){if(fA!==void 0){var ZA=!Ui(c(pA),fA);if(t("update external json",{isChanged:ZA,currentlyText:c(pA)===void 0}),!!ZA){var Ye={documentState:c(JA),selection:c(yA),json:c(pA),text:c(te),textIsRepaired:c(me)};N(pA,fA),N(JA,Tl(fA,c(JA))),He(c(pA)),N(te,void 0),N(me,!1),NA=void 0,En(c(pA)),Gi(Ye)}}})(AA.json):q4(AA)&&(function(fA){if(!(fA===void 0||W4(E()))){var ZA=fA!==c(te);if(t("update external text",{isChanged:ZA}),!!ZA){var Ye={documentState:c(JA),selection:c(yA),json:c(pA),text:c(te),textIsRepaired:c(me)};try{N(pA,z()(fA)),N(JA,Tl(c(pA),c(JA))),He(c(pA)),N(te,fA),N(me,!1),NA=void 0}catch(Me){try{N(pA,z()(gg(fA))),N(JA,Tl(c(pA),c(JA))),He(c(pA)),N(te,fA),N(me,!0),NA=void 0,En(c(pA))}catch(Re){N(pA,void 0),N(JA,void 0),N(te,E().text),N(me,!1),NA=c(te)!==void 0&&c(te)!==""?Xh(c(te),Me.message||String(Me)):void 0}}En(c(pA)),Gi(Ye)}}})(AA.text)}function He(AA){Ge||(Ge=!0,N(JA,nI(AA,c(JA),[])))}function En(AA){c(yA)&&(Fr(AA,qd(c(yA)))&&Fr(AA,Qt(c(yA)))||(t("clearing selection: path does not exist anymore",c(yA)),N(yA,bh(AA,c(JA)))))}function Gi(AA){if(AA.json!==void 0||AA.text!==void 0){var fA=c(pA)!==void 0&&AA.json!==void 0;m().add({type:"tree",undo:{patch:fA?[{op:"replace",path:"",value:AA.json}]:void 0,json:AA.json,text:AA.text,documentState:AA.documentState,textIsRepaired:AA.textIsRepaired,selection:p0(AA.selection),sortedColumn:void 0},redo:{patch:fA?[{op:"replace",path:"",value:c(pA)}]:void 0,json:c(pA),text:c(te),documentState:c(JA),textIsRepaired:c(me),selection:p0(c(yA)),sortedColumn:void 0}})}}function Pi(AA,fA){var ZA;if(t("patch",AA,fA),c(pA)===void 0)throw new Error("Cannot apply patch: no JSON");var Ye=c(pA),Me={json:void 0,text:c(te),documentState:c(JA),selection:p0(c(yA)),textIsRepaired:c(me),sortedColumn:void 0},Re=eW(c(pA),AA),ct=Yq(c(pA),c(JA),AA),ti=(ZA=eE(c(pA),AA))!==null&&ZA!==void 0?ZA:c(yA),ji=typeof fA=="function"?fA(ct.json,ct.documentState,ti):void 0;return N(pA,ji?.json!==void 0?ji.json:ct.json),N(JA,ji?.state!==void 0?ji.state:ct.documentState),N(yA,ji?.selection!==void 0?ji.selection:ti),N(te,void 0),N(me,!1),N(Zt,void 0),N(Pe,void 0),NA=void 0,En(c(pA)),m().add({type:"tree",undo:Fe({patch:Re},Me),redo:{patch:AA,json:void 0,text:c(te),documentState:c(JA),selection:p0(c(yA)),sortedColumn:void 0,textIsRepaired:c(me)}}),{json:c(pA),previousJson:Ye,undo:Re,redo:AA}}function gn(){!u()&&c(yA)&&N(yA,wx(Qt(c(yA))))}function Rt(){if(!u()&&c(yA)){var AA=Qt(c(yA)),fA=$e(c(pA),AA);ua(fA)?(function(ZA,Ye){t("openJSONEditorModal",{path:ZA,value:Ye}),YA=!0,Xe()({content:{json:Ye},path:ZA,onPatch:c(b).onPatch,onClose:()=>{YA=!1,setTimeout(Tt)}})})(AA,fA):N(yA,Zw(AA))}}function Qn(){if(!u()&&bn(c(yA))){var AA=Qt(c(yA)),fA=xt(AA),ZA=$e(c(pA),AA),Ye=!m0(c(pA),c(JA),AA),Me=Ye?String(ZA):cE(String(ZA),F());t("handleToggleEnforceString",{enforceString:Ye,value:ZA,updatedValue:Me}),ee([{op:"replace",path:fA,value:Me}],(Re,ct)=>({state:I5(c(pA),ct,AA,{type:"value",enforceString:Ye})}))}}function jt(){return c(me)&&c(pA)!==void 0&&be(c(pA)),c(pA)!==void 0?{json:c(pA)}:{text:c(te)||""}}function J(){return ut.apply(this,arguments)}function ut(){return ut=Xt(function*(){var AA=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];yield vW({json:c(pA),selection:c(yA),indentation:AA?Z():void 0,readOnly:u(),parser:F(),onPatch:ee})}),ut.apply(this,arguments)}function bi(){return kn.apply(this,arguments)}function kn(){return kn=Xt(function*(){var AA=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];c(pA)!==void 0&&(yield bW({json:c(pA),selection:c(yA),indentation:AA?Z():void 0,parser:F()}))}),kn.apply(this,arguments)}function _n(AA){var fA;AA.preventDefault(),So((fA=AA.clipboardData)===null||fA===void 0?void 0:fA.getData("text/plain"))}function Co(){return ia.apply(this,arguments)}function ia(){return(ia=Xt(function*(){try{So(yield navigator.clipboard.readText())}catch(AA){console.error(AA),N(hA,!0)}})).apply(this,arguments)}function So(AA){AA!==void 0&&MW({clipboardText:AA,json:c(pA),selection:c(yA),readOnly:u(),parser:F(),onPatch:ee,onChangeText:EA,onPasteMultilineText:io,openRepairModal:Vo})}function Vo(AA,fA){N(Ae,{text:AA,onParse:ZA=>dp(ZA,Ye=>Cp(Ye,F())),onRepair:Sq,onApply:fA,onClose:Tt})}function ga(){SW({json:c(pA),text:c(te),selection:c(yA),keepSelection:!1,readOnly:u(),onChange:wA(),onPatch:ee})}function Ko(){!u()&&c(pA)!==void 0&&c(yA)&&Lh&&!An(Qt(c(yA)))&&(t("duplicate",{selection:c(yA)}),ee(Zq(c(pA),a1(c(pA),c(yA)))))}function va(){u()||!c(yA)||!bo(c(yA))&&!bn(c(yA))||An(Qt(c(yA)))||(t("extract",{selection:c(yA)}),ee(Xq(c(pA),c(yA)),(AA,fA)=>{if(ua(AA))return{state:c_(AA,fA,[])}}))}function ca(AA){r5({insertType:AA,selectInside:!0,initialValue:void 0,json:c(pA),selection:c(yA),readOnly:u(),parser:F(),onPatch:ee,onReplaceJson:be})}function pa(AA){Cr(c(yA))&&N(yA,en(c(yA).path)),c(yA)||N(yA,bh(c(pA),c(JA))),ca(AA)}function Uo(AA){if(!u()&&c(yA))if(ww(c(yA)))try{var fA=qd(c(yA)),ZA=$e(c(pA),fA),Ye=(function(Re,ct,ti){if(ct==="array"){if(Array.isArray(Re))return Re;if(Jn(Re))return kj(Re);if(typeof Re=="string")try{var ji=ti.parse(Re);if(Array.isArray(ji))return ji;if(Jn(ji))return kj(ji)}catch(Cn){return[Re]}return[Re]}if(ct==="object"){if(Array.isArray(Re))return Sj(Re);if(Jn(Re))return Re;if(typeof Re=="string")try{var Wn=ti.parse(Re);if(Jn(Wn))return Wn;if(Array.isArray(Wn))return Sj(Wn)}catch(Cn){return{value:Re}}return{value:Re}}if(ct==="value")return ua(Re)?ti.stringify(Re):Re;throw new Error("Cannot convert ".concat(sx(Re,ti)," to ").concat(ct))})(ZA,AA,F());if(Ye===ZA)return;var Me=[{op:"replace",path:xt(fA),value:Ye}];t("handleConvert",{selection:c(yA),path:fA,type:AA,operations:Me}),ee(Me,(Re,ct)=>({state:c(yA)?nI(Re,ct,Qt(c(yA))):c(JA)}))}catch(Re){CA()(Re)}else CA()(new Error("Cannot convert current selection to ".concat(AA)))}function de(){if(c(yA)){var AA=Vj(c(pA),c(JA),c(yA),!1),fA=an(Qt(c(yA)));AA&&!An(Qt(AA))&&Ui(fA,an(Qt(AA)))?N(yA,SC(Qt(AA))):N(yA,FC(fA)),t("insert before",{selection:c(yA),selectionBefore:AA,parentPath:fA}),jo(),nn()}}function xi(){if(c(yA)){var AA=n1(c(pA),c(yA));t("insert after",AA),N(yA,SC(AA)),jo(),nn()}}function wn(AA){return xn.apply(this,arguments)}function xn(){return(xn=Xt(function*(AA){yield kW({char:AA,selectInside:!0,json:c(pA),selection:c(yA),readOnly:u(),parser:F(),onPatch:ee,onReplaceJson:be,onSelect:Pt})})).apply(this,arguments)}function na(){if(!u()&&m().canUndo){var AA=m().undo();if(qw(AA)){var fA={json:c(pA),text:c(te)};N(pA,AA.undo.patch?ol(c(pA),AA.undo.patch):AA.undo.json),N(JA,AA.undo.documentState),N(yA,AA.undo.selection),N(te,AA.undo.text),N(me,AA.undo.textIsRepaired),NA=void 0,t("undo",{item:AA,json:c(pA),documentState:c(JA),selection:c(yA)}),SA(fA,AA.undo.patch&&AA.redo.patch?{json:c(pA),previousJson:fA.json,redo:AA.undo.patch,undo:AA.redo.patch}:void 0),Tt(),c(yA)&&Wi(Qt(c(yA)),{scrollToWhenVisible:!1})}else RA()(AA)}}function Ra(){if(!u()&&m().canRedo){var AA=m().redo();if(qw(AA)){var fA={json:c(pA),text:c(te)};N(pA,AA.redo.patch?ol(c(pA),AA.redo.patch):AA.redo.json),N(JA,AA.redo.documentState),N(yA,AA.redo.selection),N(te,AA.redo.text),N(me,AA.redo.textIsRepaired),NA=void 0,t("redo",{item:AA,json:c(pA),documentState:c(JA),selection:c(yA)}),SA(fA,AA.undo.patch&&AA.redo.patch?{json:c(pA),previousJson:fA.json,redo:AA.redo.patch,undo:AA.undo.patch}:void 0),Tt(),c(yA)&&Wi(Qt(c(yA)),{scrollToWhenVisible:!1})}else dA()(AA)}}function Oi(AA){var fA;u()||c(pA)===void 0||(YA=!0,PA()({id:o,json:c(pA),rootPath:AA,onSort:(fA=Xt(function*(ZA){var{operations:Ye}=ZA;t("onSort",AA,Ye),ee(Ye,(Me,Re)=>({state:c_(Me,Re,AA),selection:en(AA)}))}),function(ZA){return fA.apply(this,arguments)}),onClose:()=>{YA=!1,setTimeout(Tt)}}))}function ko(){c(yA)&&Oi(Wj(c(pA),c(yA)))}function ar(){Oi([])}function To(AA){if(c(pA)!==void 0){var{id:fA,onTransform:ZA,onClose:Ye}=AA,Me=AA.rootPath||[];YA=!0,it()({id:fA||a,json:c(pA),rootPath:Me,onTransform:Re=>{ZA?ZA({operations:Re,json:c(pA),transformedJson:ol(c(pA),Re)}):(t("onTransform",Me,Re),ee(Re,(ct,ti)=>({state:c_(ct,ti,Me),selection:en(Me)})))},onClose:()=>{YA=!1,setTimeout(Tt),Ye&&Ye()}})}}function ja(){c(yA)&&To({rootPath:Wj(c(pA),c(yA))})}function to(){To({rootPath:[]})}function Wi(AA){return ei.apply(this,arguments)}function ei(){return ei=Xt(function*(AA){var{scrollToWhenVisible:fA=!0,element:ZA}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};N(JA,Bc(c(pA),c(JA),AA,Kw));var Ye=ZA??qn(AA);if(t("scrollTo",{path:AA,elem:Ye,refContents:c(l)}),!Ye||!c(l))return Promise.resolve();var Me=c(l).getBoundingClientRect(),Re=Ye.getBoundingClientRect();if(!fA&&Re.bottom>Me.top&&Re.top<Me.bottom)return Promise.resolve();var ct=-Me.height/4;return new Promise(ti=>{B(Ye,{container:c(l),offset:ct,duration:300,callback:()=>ti()})})}),ei.apply(this,arguments)}function qn(AA){var fA,ZA;return jo(),(fA=(ZA=c(l))===null||ZA===void 0?void 0:ZA.querySelector('div[data-path="'.concat(Gw(AA),'"]')))!==null&&fA!==void 0?fA:void 0}function _o(AA){var fA,ZA;return jo(),(fA=(ZA=c(l))===null||ZA===void 0?void 0:ZA.querySelector('span[data-search-result-index="'.concat(AA,'"]')))!==null&&fA!==void 0?fA:void 0}function qo(AA){var fA=qn(AA);if(fA&&c(l)){var ZA=c(l).getBoundingClientRect(),Ye=fA.getBoundingClientRect(),Me=ua($e(c(pA),AA))?20:Ye.height;Ye.top<ZA.top+20?B(fA,{container:c(l),offset:-20,duration:0}):Ye.top+Me>ZA.bottom-20&&B(fA,{container:c(l),offset:-(ZA.height-Me-20),duration:0})}}function SA(AA,fA){if(AA.json!==void 0||AA?.text!==void 0){if(c(te)!==void 0){var ZA,Ye={text:c(te),json:void 0};(ZA=wA())===null||ZA===void 0||ZA(Ye,AA,{contentErrors:je(),patchResult:fA})}else if(c(pA)!==void 0){var Me,Re={text:void 0,json:c(pA)};(Me=wA())===null||Me===void 0||Me(Re,AA,{contentErrors:je(),patchResult:fA})}}}function ee(AA,fA){t("handlePatch",AA,fA);var ZA={json:c(pA),text:c(te)},Ye=Pi(AA,fA);return SA(ZA,Ye),Ye}function be(AA,fA){var ZA={json:c(pA),text:c(te)},Ye={documentState:c(JA),selection:c(yA),json:c(pA),text:c(te),textIsRepaired:c(me)},Me=Bc(c(pA),Tl(AA,c(JA)),[],Y4),Re=typeof fA=="function"?fA(AA,Me,c(yA)):void 0;N(pA,Re?.json!==void 0?Re.json:AA),N(JA,Re?.state!==void 0?Re.state:Me),N(yA,Re?.selection!==void 0?Re.selection:c(yA)),N(te,void 0),N(me,!1),NA=void 0,En(c(pA)),Gi(Ye),SA(ZA,void 0)}function EA(AA,fA){t("handleChangeText");var ZA={json:c(pA),text:c(te)},Ye={documentState:c(JA),selection:c(yA),json:c(pA),text:c(te),textIsRepaired:c(me)};try{N(pA,z()(AA)),N(JA,Bc(c(pA),Tl(c(pA),c(JA)),[],Y4)),N(te,void 0),N(me,!1),NA=void 0}catch(Re){try{N(pA,z()(gg(AA))),N(JA,Bc(c(pA),Tl(c(pA),c(JA)),[],Y4)),N(te,AA),N(me,!0),NA=void 0}catch(ct){N(pA,void 0),N(JA,G_({json:c(pA),expand:Y4})),N(te,AA),N(me,!1),NA=c(te)!==""?Xh(c(te),Re.message||String(Re)):void 0}}if(typeof fA=="function"){var Me=fA(c(pA),c(JA),c(yA));N(pA,Me?.json!==void 0?Me.json:c(pA)),N(JA,Me?.state!==void 0?Me.state:c(JA)),N(yA,Me?.selection!==void 0?Me.selection:c(yA))}En(c(pA)),Gi(Ye),SA(ZA,void 0)}function LA(AA,fA){var ZA=arguments.length>2&&arguments[2]!==void 0&&arguments[2];t("handleExpand",{path:AA,expanded:fA,recursive:ZA}),fA?UA(AA,ZA?mx:K_):he(AA,ZA),Tt()}function Ce(){LA([],!0,!0)}function Te(){LA([],!1,!0)}function gt(AA){t("openFind",{findAndReplace:AA}),N(vt,!1),N(Ke,!1),jo(),N(vt,!0),N(Ke,AA)}function dt(AA,fA){t("handleExpandSection",AA,fA),N(JA,(function(ZA,Ye,Me,Re){return AE(ZA,Ye,Me,(ct,ti)=>{if(!cr(ti))return ti;var ji=Tq(ti.visibleSections.concat(Re));return Fe(Fe({},ti),{},{visibleSections:ji})})})(c(pA),c(JA),AA,fA))}function Ut(AA){t("pasted json as text",AA),N(Zt,AA)}function io(AA){t("pasted multiline text",{pastedText:AA}),N(Pe,AA)}function Zi(AA){var fA,{anchor:ZA,left:Ye,top:Me,width:Re,height:ct,offsetTop:ti,offsetLeft:ji,showTip:Wn}=AA,Cn=(function(Bo){var{json:da,documentState:Nn,selection:qt,readOnly:un,onEditKey:si,onEditValue:_t,onToggleEnforceString:fi,onCut:ma,onCopy:ho,onPaste:Ia,onRemove:ba,onDuplicate:wr,onExtract:R0,onInsertBefore:ml,onInsert:Sg,onConvert:kc,onInsertAfter:kg,onSort:ss,onTransform:yr}=Bo,wl=da!==void 0,N0=!!qt,yl=!!qt&&An(Qt(qt)),Zn=qt?$e(da,Qt(qt)):void 0,Ua=Array.isArray(Zn)?"Edit array":Jn(Zn)?"Edit object":"Edit value",Ta=wl&&(bo(qt)||Cr(qt)||bn(qt)),m1=qt&&!yl?$e(da,an(Qt(qt))):void 0,EI=!un&&wl&&Ww(qt)&&!yl&&!Array.isArray(m1),w1=!un&&wl&&qt!==void 0&&Ww(qt),OE=w1&&!ua(Zn),QI=!un&&Ta,JE=Ta,kD=!un&&N0,_D=!un&&wl&&Ta&&!yl,xD=!un&&wl&&qt!==void 0&&(bo(qt)||bn(qt))&&!yl,_c=Ta,y1=_c?"Convert to:":"Insert:",Oa=!un&&(nr(qt)&&Array.isArray(Zn)||hl(qt)&&Array.isArray(m1)),Pl=!un&&(_c?ww(qt)&&!Jn(Zn):N0),YE=!un&&(_c?ww(qt)&&!Array.isArray(Zn):N0),HE=!un&&(_c?ww(qt)&&ua(Zn):N0),D1=qt!==void 0&&m0(da,Nn,Qt(qt));function Jr(zE){Ta?zE!=="structure"&&kc(zE):Sg(zE)}return[{type:"row",items:[{type:"button",onClick:()=>si(),icon:dd,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!EI},{type:"dropdown-button",main:{type:"button",onClick:()=>_t(),icon:dd,text:Ua,title:"Edit the value (Double-click on the value)",disabled:!w1},width:"11em",items:[{type:"button",icon:dd,text:Ua,title:"Edit the value (Double-click on the value)",onClick:()=>_t(),disabled:!w1},{type:"button",icon:D1?kM:RM,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:()=>fi(),disabled:!OE}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:()=>ma(!0),icon:Id,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!QI},width:"10em",items:[{type:"button",icon:Id,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:()=>ma(!0),disabled:!QI},{type:"button",icon:Id,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:()=>ma(!1),disabled:!QI}]},{type:"dropdown-button",main:{type:"button",onClick:()=>ho(!0),icon:aC,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!JE},width:"12em",items:[{type:"button",icon:aC,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:()=>ho(!0),disabled:!JE},{type:"button",icon:aC,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:()=>ho(!1),disabled:!JE}]},{type:"button",onClick:()=>Ia(),icon:bM,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!kD}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:()=>wr(),icon:SM,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!_D},{type:"button",onClick:()=>R0(),icon:XO,text:"Extract",title:"Extract selected contents",disabled:!xD},{type:"button",onClick:()=>ss(),icon:Ju,text:"Sort",title:"Sort array or object contents",disabled:un||!Ta},{type:"button",onClick:()=>yr(),icon:Ku,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:un||!Ta},{type:"button",onClick:()=>ba(),icon:m6,text:"Remove",title:"Remove selected contents (Delete)",disabled:un||!Ta}]},{type:"column",items:[{type:"label",text:y1},{type:"button",onClick:()=>Jr("structure"),icon:_c?Yu:Bd,text:"Structure",title:y1+" structure like the first item in the array",disabled:!Oa},{type:"button",onClick:()=>Jr("object"),icon:_c?Yu:Bd,text:"Object",title:y1+" object",disabled:!Pl},{type:"button",onClick:()=>Jr("array"),icon:_c?Yu:Bd,text:"Array",title:y1+" array",disabled:!YE},{type:"button",onClick:()=>Jr("value"),icon:_c?Yu:Bd,text:"Value",title:y1+" value",disabled:!HE}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:()=>ml(),icon:oJ,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:un||!Ta||yl},{type:"button",onClick:()=>kg(),icon:$O,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:un||!Ta||yl}]}]})({json:c(pA),documentState:c(JA),selection:c(yA),readOnly:u(),onEditKey:gn,onEditValue:Rt,onToggleEnforceString:Qn,onCut:J,onCopy:bi,onPaste:Co,onRemove:ga,onDuplicate:Ko,onExtract:va,onInsertBefore:de,onInsert:pa,onInsertAfter:xi,onConvert:Uo,onSort:ko,onTransform:ja}),xo=(fA=qA()(Cn))!==null&&fA!==void 0?fA:Cn;if(xo!==!1){var ri={left:Ye,top:Me,offsetTop:ti,offsetLeft:ji,width:Re,height:ct,anchor:ZA,closeOnOuterClick:!0,onClose:()=>{YA=!1,Tt()}};YA=!0;var Ca=r(xW,{tip:Wn?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0,items:xo,onRequestClose:()=>s(Ca)},ri)}}function nn(AA){if(!gr(c(yA)))if(AA&&(AA.stopPropagation(),AA.preventDefault()),AA&&AA.type==="contextmenu"&&AA.target!==c(g))Zi({left:AA.clientX,top:AA.clientY,width:yC,height:wC,showTip:!1});else{var fA,ZA=(fA=c(l))===null||fA===void 0?void 0:fA.querySelector(".jse-context-menu-pointer.jse-selected");if(ZA)Zi({anchor:ZA,offsetTop:2,width:yC,height:wC,showTip:!1});else{var Ye,Me=(Ye=c(l))===null||Ye===void 0?void 0:Ye.getBoundingClientRect();Me&&Zi({top:Me.top+2,left:Me.left+2,width:yC,height:wC,showTip:!1})}}}function ai(AA){Zi({anchor:Kq(AA.target,"BUTTON"),offsetTop:0,width:yC,height:wC,showTip:!0})}function Xi(){return Na.apply(this,arguments)}function Na(){return(Na=Xt(function*(){if(t("apply pasted json",c(Zt)),c(Zt)){var{onPasteAsJson:AA}=c(Zt);N(Zt,void 0),AA(),setTimeout(Tt)}})).apply(this,arguments)}function Vt(){return It.apply(this,arguments)}function It(){return(It=Xt(function*(){t("apply pasted multiline text",c(Pe)),c(Pe)&&(So(JSON.stringify(c(Pe))),setTimeout(Tt))})).apply(this,arguments)}function $i(){t("clear pasted json"),N(Zt,void 0),Tt()}function cn(){t("clear pasted multiline text"),N(Pe,void 0),Tt()}function Io(){BA()(xa.text)}function Rn(AA){N(yA,AA),Tt(),Wi(Qt(AA))}function Tt(){t("focus"),c(g)&&(c(g).focus(),c(g).select())}function fa(AA){return(function(fA,ZA,Ye){var Me=an(Ye),Re=[Ji(Ye)],ct=$e(fA,Me),ti=ct?g_(ct,ZA,Re):void 0;return ti?en(Me.concat(ti)):SC(Ye)})(c(pA),c(JA),AA)}function oa(AA){c(A)&&c(A).onDrag(AA)}function y(){c(A)&&c(A).onDragEnd()}var b=cA(void 0,!0);KA(()=>c(yA),()=>{var AA;AA=c(yA),Ui(AA,f())||(t("onSelect",AA),QA()(AA))}),KA(()=>(Y(M()),Y(x())),()=>{N(fe,lx({escapeControlCharacters:M(),escapeUnicodeCharacters:x()}))}),KA(()=>c(vt),()=>{(function(AA){c(l)&&AA&&c(l).scrollTop===0&&(Ol(l,c(l).style.overflowAnchor="none"),Ol(l,c(l).scrollTop+=J4),setTimeout(()=>{c(l)&&Ol(l,c(l).style.overflowAnchor="")}))})(c(vt))}),KA(()=>Y(E()),()=>{Sn(E())}),KA(()=>Y(f()),()=>{(function(AA){Ui(c(yA),AA)||(t("applyExternalSelection",{selection:c(yA),externalSelection:AA}),Ap(AA)&&N(yA,AA))})(f())}),KA(()=>(c(pA),Y(j()),Y(F()),Y(X())),()=>{rt(c(pA),j(),F(),X())}),KA(()=>(c(l),BV),()=>{N(A,c(l)?BV(c(l)):void 0)}),KA(()=>(Y(u()),Y(v()),Y(F()),c(fe),Y(IA()),Y(ue())),()=>{N(b,{mode:xa.tree,readOnly:u(),truncateTextSize:v(),parser:F(),normalization:c(fe),getJson:ze,getDocumentState:pi,getSelection:mn,findElement:qn,findNextInside:fa,focus:Tt,onPatch:ee,onInsert:ca,onExpand:LA,onSelect:Pt,onFind:gt,onExpandSection:dt,onPasteJson:Ut,onRenderValue:IA(),onContextMenu:Zi,onClassName:ue()||(()=>{}),onDrag:oa,onDragEnd:y})}),KA(()=>c(b),()=>{t("context changed",c(b))}),Vn();var R={expand:UA,collapse:he,validate:je,getJson:ze,patch:Pi,acceptAutoRepair:jt,openTransformModal:To,scrollTo:Wi,findElement:qn,findSearchResult:_o,focus:Tt};di(!0);var W=OEA();De("mousedown",bC,function(AA){!CE(AA.target,fA=>fA===c(C))&&gr(c(yA))&&(t("click outside the editor, exit edit mode"),N(yA,p0(c(yA))),d&&c(g)&&(c(g).focus(),c(g).blur()),t("blur (outside editor)"),c(g)&&c(g).blur())});var _,q=at(W),tA=gA(q),rA=AA=>{(function(fA,ZA){Jt(ZA,!1);var Ye=cA(void 0,!0),Me=cA(void 0,!0),Re=cA(void 0,!0),ct=K(ZA,"json",9),ti=K(ZA,"selection",9),ji=K(ZA,"readOnly",9),Wn=K(ZA,"showSearch",13,!1),Cn=K(ZA,"history",9),xo=K(ZA,"onExpandAll",9),ri=K(ZA,"onCollapseAll",9),Ca=K(ZA,"onUndo",9),Bo=K(ZA,"onRedo",9),da=K(ZA,"onSort",9),Nn=K(ZA,"onTransform",9),qt=K(ZA,"onContextMenu",9),un=K(ZA,"onCopy",9),si=K(ZA,"onRenderMenu",9);function _t(){Wn(!Wn())}var fi=cA(void 0,!0),ma=cA(void 0,!0),ho=cA(void 0,!0),Ia=cA(void 0,!0);KA(()=>Y(ct()),()=>{N(Ye,ct()!==void 0)}),KA(()=>(c(Ye),Y(ti()),bn),()=>{N(Me,c(Ye)&&(bo(ti())||Cr(ti())||bn(ti())))}),KA(()=>(Y(xo()),Y(ct())),()=>{N(fi,{type:"button",icon:pW,title:"Expand all",className:"jse-expand-all",onClick:xo(),disabled:!ua(ct())})}),KA(()=>(Y(ri()),Y(ct())),()=>{N(ma,{type:"button",icon:fW,title:"Collapse all",className:"jse-collapse-all",onClick:ri(),disabled:!ua(ct())})}),KA(()=>Y(ct()),()=>{N(ho,{type:"button",icon:Uu,title:"Search (Ctrl+F)",className:"jse-search",onClick:_t,disabled:ct()===void 0})}),KA(()=>(Y(ji()),c(fi),c(ma),Y(da()),Y(ct()),Y(Nn()),c(ho),Y(qt()),Y(Ca()),Y(Cn()),Y(Bo()),Y(un()),c(Me)),()=>{N(Ia,ji()?[c(fi),c(ma),{type:"separator"},{type:"button",icon:aC,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:un(),disabled:!c(Me)},{type:"separator"},c(ho),{type:"space"}]:[c(fi),c(ma),{type:"separator"},{type:"button",icon:Ju,title:"Sort",className:"jse-sort",onClick:da(),disabled:ji()||ct()===void 0},{type:"button",icon:Ku,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:Nn(),disabled:ji()||ct()===void 0},c(ho),{type:"button",icon:MM,title:Ix,className:"jse-contextmenu",onClick:qt()},{type:"separator"},{type:"button",icon:D6,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:Ca(),disabled:!Cn().canUndo},{type:"button",icon:y6,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:Bo(),disabled:!Cn().canRedo},{type:"space"}])}),KA(()=>(Y(si()),c(Ia)),()=>{N(Re,si()(c(Ia))||c(Ia))}),Vn(),di(!0),p5(fA,{get items(){return c(Re)}}),Yt()})(AA,{get json(){return c(pA)},get selection(){return c(yA)},get readOnly(){return u()},get history(){return m()},onExpandAll:Ce,onCollapseAll:Te,onUndo:na,onRedo:Ra,onSort:ar,onTransform:to,onContextMenu:ai,onCopy:bi,get onRenderMenu(){return xA()},get showSearch(){return c(vt)},set showSearch(fA){N(vt,fA)},$$legacy:!0})};zA(tA,AA=>{S()&&AA(rA)});var DA=kA(tA,2),ae=AA=>{IEA(AA,{get json(){return c(pA)},get selection(){return c(yA)},onSelect:Rn,get onError(){return CA()},get pathParser(){return eA()}})};zA(DA,AA=>{k()&&AA(ae)});var ge=kA(DA,2),pe=AA=>{var fA=UEA(),ZA=at(fA),Ye=gA(ZA);Ye.readOnly=!0,ta(Ye,ti=>N(g,ti),()=>c(g));var Me=kA(ZA,2),Re=ti=>{var ji=zi(),Wn=at(ji),Cn=ri=>{(function(Ca,Bo){function da(fi){fi.stopPropagation(),Bo.onCreateObject()}function Nn(fi){fi.stopPropagation(),Bo.onCreateArray()}Jt(Bo,!0);var qt=eEA();qt.__click=()=>Bo.onClick();var un=kA(gA(qt),2),si=kA(gA(un),2),_t=fi=>{var ma=AEA(),ho=kA(at(ma),2);jn(ho,"title","Create an empty JSON object (press '{')"),ho.__click=da;var Ia=kA(ho,2);jn(Ia,"title","Create an empty JSON array (press '[')"),Ia.__click=Nn,sA(fi,ma)};zA(si,fi=>{Bo.readOnly||fi(_t)}),sA(Ca,qt),Yt()})(ri,{get readOnly(){return u()},onCreateObject:()=>{Tt(),wn("{")},onCreateArray:()=>{Tt(),wn("[")},onClick:()=>{Tt()}})},xo=ri=>{var Ca=LEA(),Bo=at(Ca),da=lt(()=>u()?[]:[{icon:Tu,text:"Repair manually",title:'Open the document in "code" mode and repair it manually',onClick:Io}]);Hl(Bo,{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",get actions(){return c(da)}}),_W(kA(Bo,2),{get text(){return c(te)},get json(){return c(pA)},get indentation(){return Z()},get parser(){return F()}}),sA(ri,Ca)};zA(Wn,ri=>{c(te)===""||c(te)===void 0?ri(Cn):ri(xo,!1)}),sA(ti,ji)},ct=ti=>{var ji=KEA(),Wn=at(ji);wW(gA(Wn),{get json(){return c(pA)},get documentState(){return c(JA)},get parser(){return F()},get showSearch(){return c(vt)},get showReplace(){return c(Ke)},get readOnly(){return u()},columns:void 0,onSearch:Ii,onFocus:V,onPatch:ee,onClose:iA});var Cn=kA(Wn,2);jn(Cn,"data-jsoneditor-scrollable-contents",!0);var xo=gA(Cn),ri=si=>{sA(si,GEA())};zA(xo,si=>{c(vt)&&si(ri)}),j_(kA(xo,2),{get value(){return c(pA)},pointer:"",get state(){return c(JA)},get validationErrors(){return c(OA)},get searchResults(){return c(qe)},get selection(){return c(yA)},get context(){return c(b)},get onDragSelectionStart(){return Fa}}),ta(Cn,si=>N(l,si),()=>c(l));var Ca=kA(Cn,2),Bo=si=>{var _t=lt(()=>(c(Zt),uA(()=>"You pasted a JSON ".concat(Array.isArray(c(Zt).contents)?"array":"object"," as text")))),fi=lt(()=>[{icon:oC,text:"Paste as JSON instead",title:"Replace the value with the pasted JSON",onMouseDown:Xi},{text:"Leave as is",title:"Keep the JSON embedded in the value",onClick:$i}]);Hl(si,{type:"info",get message(){return c(_t)},get actions(){return c(fi)}})};zA(Ca,si=>{c(Zt)&&si(Bo)});var da=kA(Ca,2),Nn=si=>{var _t=lt(()=>[{icon:oC,text:"Paste as string instead",title:"Paste the clipboard data as a single string value instead of an array",onClick:Vt},{text:"Leave as is",title:"Keep the pasted array",onClick:cn}]);Hl(si,{type:"info",message:"Multiline text was pasted as array",get actions(){return c(_t)}})};zA(da,si=>{c(Pe)&&si(Nn)});var qt=kA(da,2),un=si=>{var _t=lt(()=>u()?[]:[{icon:w6,text:"Ok",title:"Accept the repaired document",onClick:jt},{icon:Tu,text:"Repair manually instead",title:"Leave the document unchanged and repair it manually instead",onClick:Io}]);Hl(si,{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",get actions(){return c(_t)},onClose:Tt})};zA(qt,si=>{c(me)&&si(un)}),bx(kA(qt,2),{get validationErrors(){return c(GA)},selectError:oA}),sA(ti,ji)};zA(Me,ti=>{c(pA)===void 0?ti(Re):ti(ct,!1)}),De("paste",Ye,_n),sA(AA,fA)},Ve=AA=>{sA(AA,TEA())};zA(ge,AA=>{n?AA(Ve,!1):AA(pe)}),ta(q,AA=>N(C,AA),()=>c(C));var Ue=kA(q,2),Je=AA=>{EW(AA,{onClose:()=>N(hA,!1)})};zA(Ue,AA=>{c(hA)&&AA(Je)});var Ei=kA(Ue,2),no=AA=>{QW(AA,t1(()=>c(Ae),{onClose:()=>{var fA;(fA=c(Ae))===null||fA===void 0||fA.onClose(),N(Ae,void 0)}}))};return zA(Ei,AA=>{c(Ae)&&AA(no)}),Le(()=>_=Ci(q,1,"jse-tree-mode svelte-10mlrw4",null,_,{"no-main-menu":!S()})),De("keydown",q,function(AA){var fA=RC(AA),ZA=AA.shiftKey;if(t("keydown",{combo:fA,key:AA.key}),fA==="Ctrl+X"&&(AA.preventDefault(),J(!0)),fA==="Ctrl+Shift+X"&&(AA.preventDefault(),J(!1)),fA==="Ctrl+C"&&(AA.preventDefault(),bi(!0)),fA==="Ctrl+Shift+C"&&(AA.preventDefault(),bi(!1)),fA==="Ctrl+D"&&(AA.preventDefault(),Ko()),fA!=="Delete"&&fA!=="Backspace"||(AA.preventDefault(),ga()),fA==="Insert"&&(AA.preventDefault(),ca("structure")),fA==="Ctrl+A"&&(AA.preventDefault(),N(yA,en([]))),fA==="Ctrl+Q"&&nn(AA),fA==="ArrowUp"||fA==="Shift+ArrowUp"){AA.preventDefault();var Ye=c(yA)?Vj(c(pA),c(JA),c(yA),ZA)||c(yA):bh(c(pA),c(JA));N(yA,Ye),qo(Qt(Ye))}if(fA==="ArrowDown"||fA==="Shift+ArrowDown"){AA.preventDefault();var Me=c(yA)?(function(Cn,xo,ri){var Ca=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(ri){var Bo=Ca?Qt(ri):n1(Cn,ri),da=ua($e(Cn,Bo))?Hj(Cn,xo,Bo,!0):xo,Nn=g_(Cn,xo,Bo),qt=g_(Cn,da,Bo);if(Ca)return nr(ri)?Nn!==void 0?vs(Nn,Nn):void 0:hl(ri)?qt!==void 0?vs(qt,qt):void 0:qt!==void 0?vs(qd(ri),qt):void 0;if(hl(ri))return qt!==void 0?en(qt):void 0;if(nr(ri)||bn(ri))return Nn!==void 0?en(Nn):void 0;if(Cr(ri)){if(Nn===void 0||Nn.length===0)return;var un=an(Nn),si=$e(Cn,un);return Array.isArray(si)?en(Nn):NC(Nn)}return bo(ri)?qt!==void 0?en(qt):Nn!==void 0?en(Nn):void 0:void 0}})(c(pA),c(JA),c(yA),ZA)||c(yA):bh(c(pA),c(JA));N(yA,Me),qo(Qt(Me))}if(fA==="ArrowLeft"||fA==="Shift+ArrowLeft"){AA.preventDefault();var Re=c(yA)?(function(Cn,xo,ri){var Ca=arguments.length>3&&arguments[3]!==void 0&&arguments[3],Bo=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(ri){var{caret:da,previous:Nn}=qj(Cn,xo,ri,Bo);if(Ca)return bo(ri)?void 0:vs(ri.path,ri.path);if(da&&Nn)return U_(Nn);var qt=an(Qt(ri)),un=$e(Cn,qt);return bn(ri)&&Array.isArray(un)?vs(ri.path,ri.path):bo(ri)&&!Array.isArray(un)?NC(ri.focusPath):void 0}})(c(pA),c(JA),c(yA),ZA,!u())||c(yA):bh(c(pA),c(JA));N(yA,Re),qo(Qt(Re))}if(fA==="ArrowRight"||fA==="Shift+ArrowRight"){AA.preventDefault();var ct=c(yA)&&c(pA)!==void 0?(function(Cn,xo,ri){var Ca=arguments.length>3&&arguments[3]!==void 0&&arguments[3],Bo=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(ri){var{caret:da,next:Nn}=qj(Cn,xo,ri,Bo);return Ca?bo(ri)?void 0:vs(ri.path,ri.path):da&&Nn?U_(Nn):bo(ri)?en(ri.focusPath):void 0}})(c(pA),c(JA),c(yA),ZA,!u())||c(yA):bh(c(pA),c(JA));N(yA,ct),qo(Qt(ct))}if(fA==="Enter"&&c(yA)){if(B5(c(yA))){var ti=c(yA).focusPath,ji=$e(c(pA),an(ti));Array.isArray(ji)&&(AA.preventDefault(),N(yA,en(ti)))}Cr(c(yA))&&(AA.preventDefault(),N(yA,Fe(Fe({},c(yA)),{},{edit:!0}))),bn(c(yA))&&(AA.preventDefault(),ua($e(c(pA),c(yA).path))?LA(c(yA).path,!0):N(yA,Fe(Fe({},c(yA)),{},{edit:!0})))}if(fA.replace(/^Shift\+/,"").length===1&&c(yA))return AA.preventDefault(),void wn(AA.key);if(fA==="Enter"&&(hl(c(yA))||nr(c(yA))))return AA.preventDefault(),void wn("");if(fA==="Ctrl+Enter"&&bn(c(yA))){var Wn=$e(c(pA),c(yA).path);d5(Wn)&&window.open(String(Wn),"_blank")}fA==="Escape"&&c(yA)&&(AA.preventDefault(),N(yA,void 0)),fA==="Ctrl+F"&&(AA.preventDefault(),gt(!1)),fA==="Ctrl+H"&&(AA.preventDefault(),gt(!0)),fA==="Ctrl+Z"&&(AA.preventDefault(),na()),fA==="Ctrl+Shift+Z"&&(AA.preventDefault(),Ra())}),De("mousedown",q,function(AA){t("handleMouseDown",AA);var fA=AA.target;Gq(fA,"BUTTON")||fA.isContentEditable||(Tt(),c(yA)||c(pA)!==void 0||c(te)!==""&&c(te)!==void 0||(t("createDefaultSelection"),N(yA,en([]))))}),De("contextmenu",q,nn),sA(i,W),Ai(e,"expand",UA),Ai(e,"collapse",he),Ai(e,"validate",je),Ai(e,"getJson",ze),Ai(e,"patch",Pi),Ai(e,"acceptAutoRepair",jt),Ai(e,"openTransformModal",To),Ai(e,"scrollTo",Wi),Ai(e,"findElement",qn),Ai(e,"findSearchResult",_o),Ai(e,"focus",Tt),Yt(R)}function RW(i){return typeof(e=i)!="object"||e===null?i:new Proxy(i,{get:(A,t,n)=>RW(Reflect.get(A,t,n)),set:()=>!1,deleteProperty:()=>!1});var e}var _w=dr("jsoneditor:History");function NW(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=i.maxItems||1e3,A=[],t=0;function n(){return t<A.length}function o(){return t>0}function a(){return{canUndo:n(),canRedo:o(),items:()=>A.slice().reverse(),add:s,undo:g,redo:C,clear:l}}function r(){i.onChange&&i.onChange(a())}function s(d){_w("add",d),A=[d].concat(A.slice(t)).slice(0,e),t=0,r()}function l(){_w("clear"),A=[],t=0,r()}function g(){if(n()){var d=A[t];return t+=1,_w("undo",d),r(),d}}function C(){if(o())return _w("redo",A[t-=1]),r(),A[t]}return{get:a}}oi(`/* over all fonts, sizes, and colors */
3043/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */
3044/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */
3045/* main, menu, modal */

Callers 4

HdFunction · 0.70
lQAFunction · 0.70
gaFunction · 0.70
KoFunction · 0.70

Calls 15

NFunction · 0.90
FFunction · 0.90
uaFunction · 0.90
CaFunction · 0.90
daFunction · 0.90
cFunction · 0.90
dFunction · 0.90
JFunction · 0.90
aFunction · 0.90
CpFunction · 0.85
jiFunction · 0.85
BoFunction · 0.85

Tested by

no test coverage detected