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

Function IhA

src/google/adk/cli/browser/main-3CUQG2IN.js:1765–1765  ·  view source on GitHub ↗
(i,e)

Source from the content-addressed store, hash-verified

1763 resize: none;
1764 outline: none;
1765}`);var ChA=TA('<div slot="left" class="jse-info svelte-16jv58j">Repair invalid JSON, then click apply</div>'),dhA=TA('<div class="jse-json-repair-component svelte-16jv58j"><!> <!> <textarea class="jse-json-text svelte-16jv58j" autocomplete="off" autocapitalize="off" spellcheck="false"></textarea></div>');function IhA(i,e){Jt(e,!1);var A=cA(void 0,!0),t=cA(void 0,!0),n=cA(void 0,!0),o=cA(void 0,!0),a=cA(void 0,!0),r=cA(void 0,!0),s=K(e,"text",13,""),l=K(e,"readOnly",9,!1),g=K(e,"onParse",9),C=K(e,"onRepair",9),d=K(e,"onChange",9,void 0),B=K(e,"onApply",9),u=K(e,"onCancel",9),E=dr("jsoneditor:JSONRepair"),f=cA(void 0,!0);function m(){if(c(f)&&c(A)){var eA=c(A).position!==void 0?c(A).position:0;c(f).setSelectionRange(eA,eA),c(f).focus()}}function v(){B()(s())}function S(){try{s(C()(s())),d()&&d()(s())}catch(eA){}}var k=cA(void 0,!0);KA(()=>Y(s()),()=>{N(A,(function(eA){try{return void g()(eA)}catch(Z){return Xh(eA,Z.message)}})(s()))}),KA(()=>Y(s()),()=>{N(t,(function(eA){try{return C()(eA),!0}catch(Z){return!1}})(s()))}),KA(()=>c(A),()=>{E("error",c(A))}),KA(()=>Y(u()),()=>{N(k,[{type:"space"},{type:"button",icon:Ou,title:"Cancel repair",className:"jse-cancel",onClick:u()}])}),KA(()=>NM,()=>{N(n,{icon:NM,text:"Show me",title:"Scroll to the error location",onClick:m})}),KA(()=>oC,()=>{N(o,{icon:oC,text:"Auto repair",title:"Automatically repair JSON",onClick:S})}),KA(()=>(c(t),c(n),c(o)),()=>{N(a,c(t)?[c(n),c(o)]:[c(n)])}),KA(()=>Y(l()),()=>{N(r,[{icon:w6,text:"Apply",title:"Apply fixed JSON",disabled:l(),onClick:v}])}),Vn(),di(!0);var M=dhA(),x=gA(M);p5(x,{get items(){return c(k)},$$slots:{left:(eA,Z)=>{sA(eA,ChA())}}});var F=kA(x,2),z=eA=>{var Z=lt(()=>(c(A),uA(()=>"Cannot parse JSON: ".concat(c(A).message))));Hl(eA,{type:"error",get icon(){return w2},get message(){return c(Z)},get actions(){return c(a)}})},j=eA=>{Hl(eA,{type:"success",message:"JSON is valid now and can be parsed.",get actions(){return c(r)}})};zA(F,eA=>{c(A)?eA(z):eA(j,!1)});var X=kA(F,2);ta(X,eA=>N(f,eA),()=>c(f)),Le(()=>{X.readOnly=l(),tI(X,s())}),De("input",X,function(eA){E("handleChange");var Z=eA.target.value;s()!==Z&&(s(Z),d()&&d()(s()))}),sA(i,M),Yt()}function QW(i,e){Jt(e,!1);var A=K(e,"text",13),t=K(e,"onParse",9),n=K(e,"onRepair",9),o=K(e,"onApply",9),a=K(e,"onClose",9);function r(l){o()(l),a()()}function s(){a()()}di(!0),np(i,{get onClose(){return a()},className:"jse-repair-modal",children:(l,g)=>{IhA(l,{get onParse(){return t()},get onRepair(){return n()},onApply:r,onCancel:s,get text(){return A()},set text(C){A(C)},$$legacy:!0})},$$slots:{default:!0}}),Yt()}oi(`/* over all fonts, sizes, and colors */
1766/* "consolas" for Windows, "menlo" for Mac with fallback to "monaco", 'Ubuntu Mono' for Ubuntu */
1767/* (at Mac this font looks too large at 14px, but 13px is too small for the font on Windows) */
1768/* main, menu, modal */

Callers 1

QWFunction · 0.85

Calls 15

KFunction · 0.90
YFunction · 0.90
sFunction · 0.90
NFunction · 0.90
gFunction · 0.90
CFunction · 0.90
cFunction · 0.90
EFunction · 0.90
uFunction · 0.90
lFunction · 0.90
taFunction · 0.90
dFunction · 0.90

Tested by

no test coverage detected