1const __vite__fileDeps=["./Index-D2AsQL-M.js","./Button-CUfznalD.js","./Index-DT6VPx-K.js","./index-DQnOSUE6.js","./index-C2tw9baX.css","./_commonjsHelpers-BosuxZz1.js","./Index-Btj90uky.css","./Button-CTZL5Nos.css","./Index-INgKs-Lw.js","./Index-CptIZeFZ.css","./Index-nQCfNo8e.css","./Index-B9I_HjI8.js","./BlockLabel-BwPib9nm.js","./Empty-eMcf0w5h.js","./Image-Bsh8Umrh.js","./file-url-C2d3k_cF.js","./Index-Cr62iXTg.css","./Example-uQ8MuYg6.js","./Example-D7K5RtQ2.css","./index-DccmrmJo.js","./ShareButton-BGgKOk1e.js","./DownloadLink-Dgc8RBAI.js","./Music-CDm0RGMk.js","./Trim-UKwaW4UI.js","./Undo-CpmTQw3B.js","./ModifyUpload.svelte_svelte_type_style_lang-XgQKUhC8.js","./ModifyUpload-RL_SHQmd.css","./ModifyUpload-CktjLARA.js","./SelectSource-DGT5JIov.js","./Upload-Cp8Go_XF.js","./UploadText-DvXuXNjQ.js","./index-9HmesOWo.css","./Index-DJURn4Ts.js","./Index-BdW76j1J.js","./Index-DjLwJMl5.js","./index-CnqicUFC.js","./Image-BDs3hydk.js","./Image-B8dFOee4.css","./Video-5zIYPEUY.js","./Video-DJw86Ppo.css","./Index.svelte_svelte_type_style_lang-C9e-YAtt.js","./Example.
1svelte_svelte_type_style_lang-CxY4B6a0.js","./prism-python-b7Hj1w62.js","./Example-kFjxihe2.css","./Index-B2S_zKCm.css","./Check-Ck0iADAu.js","./Copy-ZPOKSMtK.js","./Index-DHlElFN7.css","./Example-CZ-iEz1g.js","./Index-Dhqe045d.js","./Info-CfsQ0PHE.js","./Index-BTCbxfal.css","./Example-CRm1Pmw_.js","./Index-BpiLhjRh.js","./BlockTitle-CRblEnFE.js","./Index-D8o7u_T6.css","./Example-Wp-_4AVX.js","./Example-oomIF0ca.css","./Index-B3UbNYkm.js","./Index-BrtrebwU.css","./Example-BaLyJYAe.js","./Example-Bw8Q_3wB.css","./Index-_MTVy9w9.js","./Index-B6tpubC5.css","./Example-CMXuI9oj.js","./Example-CX34aPix.css","./Index-BzA0_rB5.js","./dsv-DB8NKgIY.js","./Index-CR9lHGQe.css","./Index-ChHX0jbM.js","./Index-BBQ7BIGZ.css","./Index-tc_ecte1.js","./Index-tcNSQSor.css","./Example-CUwox43B.js","./Index-fVreL1ZO.js","./DropdownArrow-DBFeRcfr.js","./Index-BAQumg2K.css","./Example-DrmWnoSo.js","./Example-DpWs9cEC.css","./Index-C0tC0Pte.js","./FileUpload-C03yrUKx.js","./File-BQ_9P3Ye.js","./FileUpload-2TE7T7kD.css","./Example-CIFMxn5c.js","./Example-DfhEULNF.css","./Index-BqphDpxa.js","./Index-YPTlsVjp.css","./Index-DDCF2BFd.js","./Index-B0JJ6p9c.css","./Index-gzkVfu-B.js","./Index-CnEIM1a1.css","./Index-CS2xVf8J.js","./Index-C-7D3Y3j.css","./Index-DQPF3D7U.js","./color-QxMistua.js","./Index-Dwy3Ni24.css","./Example-C2a4WxRl.js","./Example-CSw4pLi5.css","./Index-Cax1_EmX.js","./Index-BGmqBTg_.css","./Example-Y4D4nw3U.js","./Example-DikqVAPo.css","./Index-Dr6wQYLB.js","./ImageUploader-BgZNxhRR.js","./ImageUploader-B7bPUstM.css","./Example-CLB6_2SI.js","./Example-6rv12T44.css","./Index-YhvySncB.js","./url-BybKzMWq.js","./__vite-browser-external-DFe-p4yY.js","./Index-DAGKYUjg.css","./Index-CaAHF3z4.js","./Index-729KAuZc.css","./Index-D14Box8F.js","./Index-BM4_tjMk.css","./Example-BqEWIP3s.js","./Index-CS_1SGa0.js","./Example-BQyGztrG.js","./Index-DdkpMFsS.js","./Index-Pyhmzacd.css","./Example-DyveILOA.js","./Example-sa1k2iUl.css","./Index-B-lWCeyk.js","./Video-fsmLZWjA.js","./Index-BYnBLYUv.css","./Example-CqL1e7EB.js","./Index-CLf7klc7.js","./Index-BUublr_b.css","./Example-C9__vDgN.js","./Index-nnxQxgsk.js","./Index-1JYVvdX4.css","./Index-JC7evlol.js","./Index-D-1bCrLQ.css","./Example-BoMLuz1A.js","./Index-mcP82pjK.js","./Index-BSqct-uf.css","./Index-DPQUg1KC.js","./Index-COkUHsKJ.css","./Example-BrizabXh.js","./Index-BRdUM3i_.js","./Index-CJeiS5ET.css","./index-ON6nH-xE.js","./Index-C9rTb3Lb.js","./Tabs-CCwkU3oM.js","./Tabs-DX5TEub2.css","./Index-thdqX2vf.css","./Index-NZ-JEwIG.js","./Example-C7XUkkid.js","./Example-Cj3ii62O.css","./Index-LGPOjayw.js","./Textbox-jD8k9i6e.js","./Textbox-D8IAzrZj.css","./Index-Ovj0mbDy.js","./Index-DYDmCduo.css","./Example-DFEtaHl0.js","./Example-B5CSTz0f.css","./index-C8G63eG1.js","./index-CgvweMVN.css","./Example-DxdiEFS_.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); 2import{a as ir,L as fi,b as rr,$ as pi,w as cn,d as sr}from"./Index-DT6VPx-K.js";import{_ as P}from"./index-DQnOSUE6.js";import{c as ar,f as Al,a as Xn,B as xn}from"./Button-CUfznalD.js";const{SvelteComponent:_r,append:cr,attr:Te,detach:ur,init:fr,insert:pr,noop:Cn,safe_not_equal:dr,svg_element:Ll}=window.__gradio__svelte__internal;function mr(l){let e,t;return{c(){e=Ll("svg"),t=Ll("path"),Te(t,"stroke-linecap","round"),Te(t,"stroke-linejoin","round"),Te(t,"d","M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"),Te(e,"fill","none"),Te(e,"stroke","currentColor"),Te(e,"viewBox","0 0 24 24"),Te(e,"width","100%"),Te(e,"height","100%"),Te(e,"xmlns","http://www.w3.org/2000/svg"),Te(e,"aria-hidden","true"),Te(e,"stroke-width","2"),Te(e,"stroke-linecap","round"),Te(e,"stroke-linejoin","round")},m(n,o){pr(n,e,o),cr(e,t)},p:Cn,i:Cn,o:Cn,d(n){n&&ur(e)}}}let hr=class extends _r{constructor(e){super(),fr(this,e,null,mr,dr,{})}};const{SvelteComponent:gr,append:vr,attr:Oe,detach:$r,init:br,insert:kr,noop:An,safe_not_equal:wr,svg_element:ql}=window.__gradio__svelte__internal;function yr(l){let e,t;return{c(){e=ql("svg"),t=ql("path"),Oe(t,"stroke-linecap","round"),Oe(t,"stroke-linejoin","round"),Oe(t,"d","M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"),Oe(e,"fill","none"),Oe(e,"stroke","currentColor"),Oe(e,"viewBox","0 0 24 24"),Oe(e,"width","100%"),Oe(e,"height","100%"),Oe(e,"xmlns","http://www.w3.org/2000/svg"),Oe(e,"aria-hidden","true"),Oe(e,"stroke-width","2"),Oe(e,"stroke-linecap","round"),Oe(e,"stroke-linejoin","round")},m(n,o){kr(n,e,o),vr(e,t)},p:An,i:An,o:An,d(n){n&&$r(e)}}}class Er extends gr{constructor(e){super(),br(this,e,null,yr,wr,{})}}const{SvelteComponent:Cr,append:Ar,attr:Ie,detach:Lr,init:qr,insert:Pr,noop:Ln,safe_not_equal:Tr,svg_element:Pl}=window.__gradio__svelte__internal;function Or(l){let e,t;return{c(){e=Pl("svg"),t=Pl("path"),Ie(t,"stroke-linecap","round"),Ie(t,"stroke-linejoin","round"),Ie(t,"d","M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"),Ie(e,"fill","none"),Ie(e,"stroke","currentColor"),Ie(e,"stroke-width","2"),Ie(e,"viewBox","0 0 24 24"),Ie(e,"width","100%"),Ie(e,"height","100%"),Ie(e,"xmlns","http://www.w3.org/2000/svg"),Ie(e,"aria-hidden","true"),Ie(e,"stroke-linecap","round"),Ie(e,"stroke-linejoin","round")},m(n,o){Pr(n,e,o),Ar(e,t)},p:Ln,i:Ln,o:Ln,d(n){n&&Lr(e)}}}class Ir extends Cr{constructor(e){super(),qr(this,e,null,Or,Tr,{})}}
2class qn extends Error{constructor(e){super(e),this.name="ShareError"}}async function Mu(l,e){if(window.__gradio_space__==null)throw new qn("Must be on Spaces to share.");let t,n,o;if(e==="url"){const a=await fetch(l);t=await a.blob(),n=a.headers.get("content-type")||"",o=a.headers.get("content-disposition")||""}else t=jr(l),n=l.split(";")[0].split(":")[1],o="file"+n.split("/")[1];const i=new File([t],o,{type:n}),r=await fetch("https://huggingface.co/uploads",{method:"POST",body:i,headers:{"Content-Type":i.type,"X-Requested-With":"XMLHttpRequest"}});if(!r.ok){if(r.headers.get("content-type")?.includes("application/json")){const a=await r.json();throw new qn(`Upload failed: ${a.error}`)}throw new qn("Upload failed.")}return await r.text()}function jr(l){for(var e=l.split(","),t=e[0].match(/:(.*?);/)[1],n=atob(e[1]),o=n.length,i=new Uint8Array(o);o--;)i[o]=n.charCodeAt(o);return new Blob([i],{type:t})}function zu(l){l.addEventListener("click",e);async function e(t){const n=t.composedPath(),[o]=n.filter(i=>i?.tagName==="BUTTON"&&i.classList.contains("copy_code_button"));if(o){let i=function(s){s.style.opacity="1",setTimeout(()=>{s.style.opacity="0"},2e3)};t.stopImmediatePropagation();const r=o.parentElement.innerText.trim(),_=Array.from(o.children)[1];await Dr(r)&&i(_)}}return{destroy(){l.removeEventListener("click",e)}}}async function Dr(l){let e=!1;if("clipboard"in navigator)await navigator.clipboard.writeText(l),e=!0;else{const t=document.createElement("textarea");t.value=l,t.style.position="absolute",t.style.left="-999999px",document.body.prepend(t),t.select();try{document.execCommand("copy"),e=!0}catch(n){console.error(n),e=!1}finally{t.remove()}}return e}const Nu=l=>{const e=Math.floor(l/3600),t=Math.floor(l%3600/60),n=Math.round(l)%60,o=`${t<10?"0":""}${t}`,i=`${n<10?"0":""}${n}`;return e>0?`${e}:${o}:${i}`:`${t}:${i}`};class Tl{#e;#t;constructor(e,t,n,o,i,r,_,a=c=>c,s){this.#e=e,this.theme=n,this.version=o,this.#t=t,this.max_file_size=_,this.i18n=a,this.root=i,this.autoscroll=r,this.client=s}dispatch(e,t){const n=new CustomEvent("gradio",{bubbles:!0,detail:{data:t,id:this.#e,event:e}});this.#t.dispatchEvent(n)}}function Rr(l,{from:e,to:t},n={}){const o=getComputedStyle(l),i=o.transform==="none"?"":o.transform,[r,_]=o.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*r/t.width-(t.left+r),s=e.top+e.height*_/t.height-(t.top+_),{delay:c=0,duration:f=p=>Math.sqrt(p)*120,easing:u=ar}=n;return{delay:c,duration:ir(f)?f(Math.sqrt(a*a+s*s)):f,easing:u,css:(p,b)=>{const g=b*a,h=b*s,d=p+b*e.width/t.width,m=p+b*e.height/t.height;return`transform: ${i} translate(${g}px, ${h}px) scale(${d}, ${m});`}}}const{SvelteComponent:Sr,add_render_callback:Vr,append:je,attr:le,bubble:Ol,check_outros:Mr,create_component:el,create_in_transition:zr,create_out_transition:Nr,destroy_component:tl,detach:Ur,element:xe,flush:Pn,group_outros:Br,init:Fr,insert:Hr,listen:Tn,mount_component:nl,run_all:Gr,safe_not_equal:Zr,set_data:Il,space:xt,stop_propagation:jl,text:Dl,transition_in:Nt,transition_out:Ut}=window.__gradio__svelte__internal,{createEventDispatcher:Wr,onMount:Qr}=window.__gradio__svelte__internal;function Jr(l){let e,t;return e=new hr({}),{c(){el(e.$$.fragment)},m(n,o){nl(e,n,o),t=!0},i(n){t||(Nt(e.$$.fragment,n),t=!0)},o(n){Ut(e.$$.fragment,n),t=!1},d(n){tl(e,n)}}}function Yr(l){let e,t;return e=new Er({}),{c(){el(e.$$.fragment)},m(n,o){nl(e,n,o),t=!0},i(n){t||(Nt(e.$$.fragment,n),t=!0)},o(n){Ut(e.$$.fragment,n),t=!1},d(n){tl(e,n)}}}function Kr(l){let e,t;return e=new Ir({}),{c(){el(e.$$.fragment)},m(n,o){nl(e,n,o),t=!0},i(n){t||(Nt(e.$$.fragment,n),t=!0)},o(n){Ut(e.$$.fragment,n),t=!1},d(n){tl(e,n)}}}function Xr(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g,h,d,m,v,E,k,w,$,y,q,A,L,D;const S=[Kr,Yr,Jr],M=[];function R(O,K){return O[1]==="warning"?0:O[1]==="info"?1:O[1]==="error"?2:-1}return~(n=R(l))&&(o=M[n]=S[n](l)),{c(){e=xe("div"),t=xe("div"),o&&o.c(),r=xt(),_=xe("div"),a=xe("div"),s=Dl(l[1]),f=xt(),u=xe("div"),p=Dl(l[0]),h=xt(),d=xe("button"),m=xe("span"),m.textContent="Ã",E=xt(),k=xe("div"),le(t,"class",i="toast-icon "+l[1]+" svelte-z3l7qj"),le(a,"class",c="toast-title "+l[1]+" svelte-z3l7qj"),le(u,"class",b="toast-text "+l[1]+" svelte-z3l7qj"),le(_,"class",g="toast-details "+l[1]+" svelte-z3l7qj"),le(m,"aria-hidden","true"),le(d,"class",v="toast-close "+l[1]+" svelte-z3l7qj"),le(d,"type","button"),le(d,"aria-label","Close"),le(d,"data-testid","toast-close"),le(k,"class",w="timer "+l[1]+" svelte-z3l7qj"),le(e,"class",$="toast-body "+l[1]+" svelte-z3l7qj"),le(e,"role","alert"),le(e,"data-testid","toast-body")},m(O,K){Hr(O,e,K),je(e,t),~n&&M[n].m(t,null),je(e,r),je(e,_),je(_,a),je(a,s),je(_,f),je(_,u),je(u,p),je(e,h),je(e,d),je(d,m),je(e,E),je(e,k),A=!0,L||(D=[Tn(d,"click",l[2]),Tn(e,"click",jl(l[4])),Tn(e,"keydown",jl(l[5]))],L=!0)},p(O,[K]){let T=n;n=R(O),n!==T&&(o&&(Br(),Ut(M[T],1,1,()=>{M[T]=null}),Mr()),~n?(o=M[n],o||(o=M[n]=S[n](O),o.c()),Nt(o,1),o.m(t,null)):o=null),(!A||K&2&&i!==(i="toast-icon "+O[1]+" svelte-z3l7qj"))&&le(t,"class",i),(!A||K&2)&&Il(s,O[1]),(!A||K&2&&c!==(c="toast-title "+O[1]+" svelte-z3l7qj"))&&le(a,"class",c),(!A||K&1)&&Il(p,O[0]),(!A||K&2&&b!==(b="toast-text "+O[1]+" svelte-z3l7qj"))&&le(u,"class",b),(!A||K&2&&g!==(g="toast-details "+O[1]+" svelte-z3l7qj"))&&le(_,"class",g),(!A||K&2&&v!==(v="toast-close "+O[1]+" svelte-z3l7qj"))&&le(d,"class",v),(!A||K&2&&w!==(w="timer "+O[1]+" svelte-z3l7qj"))&&le(k,"class",w),(!A||K&2&&$!==($="toast-body "+O[1]+" svelte-z3l7qj"))&&le(e,"class",$)}
2,i(O){A||(Nt(o),O&&Vr(()=>{A&&(q&&q.end(1),y=zr(e,Al,{duration:200,delay:100}),y.start())}),A=!0)},o(O){Ut(o),y&&y.invalidate(),O&&(q=Nr(e,Al,{duration:200})),A=!1},d(O){O&&Ur(e),~n&&M[n].d(),O&&q&&q.end(),L=!1,Gr(D)}}}function xr(l,e,t){let{message:n=""}=e,{type:o}=e,{id:i}=e;const r=Wr();function _(){r("close",i)}Qr(()=>{setTimeout(()=>{_()},1e4)});function a(c){Ol.call(this,l,c)}function s(c){Ol.call(this,l,c)}return l.$$set=c=>{"message"in c&&t(0,n=c.message),"type"in c&&t(1,o=c.type),"id"in c&&t(3,i=c.id)},[n,o,_,i,a,s]}class es extends Sr{constructor(e){super(),Fr(this,e,xr,Xr,Zr,{message:0,type:1,id:3})}get message(){return this.$$.ctx[0]}set message(e){this.$$set({message:e}),Pn()}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),Pn()}get id(){return this.$$.ctx[3]}set id(e){this.$$set({id:e}),Pn()}}const{SvelteComponent:ts,append:ns,attr:ls,bubble:os,check_outros:is,create_animation:rs,create_component:ss,destroy_component:as,detach:di,element:mi,ensure_array_like:Rl,fix_and_outro_and_destroy_block:_s,fix_position:cs,flush:us,group_outros:fs,init:ps,insert:hi,mount_component:ds,noop:ms,safe_not_equal:hs,set_style:gs,space:vs,transition_in:gi,transition_out:vi,update_keyed_each:$s}=window.__gradio__svelte__internal;function Sl(l,e,t){const n=l.slice();return n[2]=e[t].type,n[3]=e[t].message,n[4]=e[t].id,n}function Vl(l,e){let t,n,o,i,r=ms,_;return n=new es({props:{type:e[2],message:e[3],id:e[4]}}),n.$on("close",e[1]),{key:l,first:null,c(){t=mi("div"),ss(n.$$.fragment),o=vs(),gs(t,"width","100%"),this.first=t},m(a,s){hi(a,t,s),ds(n,t,null),ns(t,o),_=!0},p(a,s){e=a;const c={};s&1&&(c.type=e[2]),s&1&&(c.message=e[3]),s&1&&(c.id=e[4]),n.$set(c)},r(){i=t.getBoundingClientRect()},f(){cs(t),r()},a(){r(),r=rs(t,i,Rr,{duration:300})},i(a){_||(gi(n.$$.fragment,a),_=!0)},o(a){vi(n.$$.fragment,a),_=!1},d(a){a&&di(t),as(n)}}}function bs(l){let e,t=[],n=new Map,o,i=Rl(l[0]);const r=_=>_[4];for(let _=0;_<i.length;_+=1){let a=Sl(l,i,_),s=r(a);n.set(s,t[_]=Vl(s,a))}return{c(){e=mi("div");for(let _=0;_<t.length;_+=1)t[_].c();ls(e,"class","toast-wrap svelte-pu0yf1")},m(_,a){hi(_,e,a);for(let s=0;s<t.length;s+=1)t[s]&&t[s].m(e,null);o=!0},p(_,[a]){if(a&1){i=Rl(_[0]),fs();for(let s=0;s<t.length;s+=1)t[s].r();t=$s(t,a,r,1,_,i,n,e,_s,Vl,null,Sl);for(let s=0;s<t.length;s+=1)t[s].a();is()}},i(_){if(!o){for(let a=0;a<i.length;a+=1)gi(t[a]);o=!0}},o(_){for(let a=0;a<t.length;a+=1)vi(t[a]);o=!1},d(_){_&&di(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function ks(l){l.length>0&&"parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0)}function ws(l,e,t){let{messages:n=[]}=e;function o(i){os.call(this,l,i)}return l.$$set=i=>{"messages"in i&&t(0,n=i.messages)},l.$$.update=()=>{l.$$.dirty&1&&ks(n)},[n,o]}class ys extends ts{constructor(e){super(),ps(this,e,ws,bs,hs,{messages:0})}get messages(){return this.$$.ctx[0]}set messages(e){this.$$set({messages:e}),us()}}const{SvelteComponent:Es,append:On,attr:Qe,detach:Cs,init:As,insert:Ls,noop:In,safe_not_equal:qs,set_style:Dt,svg_element:en}=window.__gradio__svelte__internal;function Ps(l){let e,t,n,o;return{c(){e=en("svg"),t=en("g"),n=en("path"),o=en("path"),Qe(n,"d","M3.789,0.09C3.903,-0.024 4.088,-0.024 4.202,0.09L4.817,0.705C4.931,0.819 4.931,1.004 4.817,1.118L1.118,4.817C1.004,4.931 0.819,4.931 0.705,4.817L0.09,4.202C-0.024,4.088 -0.024,3.903 0.09,3.789L3.789,0.09Z"),Qe(o,"d","M4.825,3.797C4.934,3.907 4.934,4.084 4.825,4.193L4.193,4.825C4.084,4.934 3.907,4.934 3.797,4.825L0.082,1.11C-0.027,1.001 -0.027,0.823 0.082,0.714L0.714,0.082C0.823,-0.027 1.001,-0.027 1.11,0.082L4.825,3.797Z"),Qe(e,"width","100%"),Qe(e,"height","100%"),Qe(e,"viewBox","0 0 5 5"),Qe(e,"version","1.1"),Qe(e,"xmlns","http://www.w3.org/2000/svg"),Qe(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),Qe(e,"xml:space","preserve"),Dt(e,"fill","currentColor"),Dt(e,"fill-rule","evenodd"),Dt(e,"clip-rule","evenodd"),Dt(e,"stroke-linejoin","round"),Dt(e,"stroke-miterlimit","2")},m(i,r){Ls(i,e,r),On(e,t),On(t,n),On(t,o)},p:In,i:In,o:In,d(i){i&&Cs(e)}}}class $i extends Es{constructor(e){super(),As(this,e,null,Ps,qs,{})}}const{SvelteComponent:Ts,append:et,attr:tn,create_component:Os,destroy_component:Is,detach:jn,element:bt,flush:js,init:Ds,insert:Dn,listen:Rs,mount_component:Ss,safe_not_equal:Vs,set_data:Ms,space:Rn,text:Ml,transition_in:zs,transition_out:Ns}=window.__gradio__svelte__internal,{createEventDispatcher:Us}=window.__gradio__svelte__internal;function Bs(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g;
vendor: 9,092 bytes, lines 2-15
2return u=new $i({}),{c(){e=bt("div"),t=bt("h1"),t.textContent="API Docs",n=Rn(),o=bt("p"),i=Ml(`No API Routes found for 3 `),r=bt("code"),_=Ml(l[0]),a=Rn(),s=bt("p"),s.innerHTML=`To expose an API endpoint of your app in this page, set the <code>api_name</code> 4 parameter of the event listener. 5 <br/> 6 For more information, visit the 7 <a href="https://gradio.app/sharing_your_app/#api-page" target="_blank">API Page guide</a> 8 . To hide the API documentation button and this page, set 9 <code>show_api=False</code> 10 in the 11 <code>Blocks.launch()</code> 12 method.`,c=Rn(),f=bt("button"),Os(u.$$.fragment),tn(r,"class","svelte-e1ha0f"),tn(o,"class","attention svelte-e1ha0f"),tn(e,"class","wrap prose svelte-e1ha0f"),tn(f,"class","svelte-e1ha0f")},m(h,d){Dn(h,e,d),et(e,t),et(e,n),et(e,o),et(o,i),et(o,r),et(r,_),et(e,a),et(e,s),Dn(h,c,d),Dn(h,f,d),Ss(u,f,null),p=!0,b||(g=Rs(f,"click",l[2]),b=!0)},p(h,[d]){(!p||d&1)&&Ms(_,h[0])},i(h){p||(zs(u.$$.fragment,h),p=!0)},o(h){Ns(u.$$.fragment,h),p=!1},d(h){h&&(jn(e),jn(c),jn(f)),Is(u),b=!1,g()}}}function Fs(l,e,t){const n=Us();let{root:o}=e;const i=()=>n("close");return l.$$set=r=>{"root"in r&&t(0,o=r.root)},[o,n,i]}class Hs extends Ts{constructor(e){super(),Ds(this,e,Fs,Bs,Vs,{root:0})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),js()}}const bi="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9425%202.94265C27.4632%202.42195%2027.4632%201.57773%2026.9425%201.05703C26.4218%200.536329%2025.5776%200.536329%2025.0569%201.05703L22.5713%203.54256C21.1213%202.59333%2019.5367%202.43378%2018.1753%202.64006C16.5495%202.88638%2015.1127%203.66838%2014.3905%204.39053L12.3905%206.39053C12.1405%206.64058%2012%206.97972%2012%207.33334C12%207.68697%2012.1405%208.0261%2012.3905%208.27615L19.7239%2015.6095C20.2446%2016.1302%2021.0888%2016.1302%2021.6095%2015.6095L23.6095%2013.6095C24.3316%2012.8873%2025.1136%2011.4505%2025.36%209.82475C25.5663%208.46312%2025.4066%206.87827%2024.4571%205.42807L26.9425%202.94265Z'%20fill='%233c4555'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.276%2012.9426C12.7967%2012.4219%2012.7967%2011.5777%2012.276%2011.057C11.7553%2010.5363%2010.9111%2010.5363%2010.3904%2011.057L8.66651%2012.7809L8.27615%2012.3905C8.0261%2012.1405%207.68697%2012%207.33334%2012C6.97972%2012%206.64058%2012.1405%206.39053%2012.3905L4.39053%2014.3905C3.66838%2015.1127%202.88638%2016.5495%202.64006%2018.1753C2.43377%2019.5367%202.59333%2021.1214%203.54262%2022.5714L1.05703%2025.057C0.536329%2025.5777%200.536329%2026.4219%201.05703%2026.9426C1.57773%2027.4633%202.42195%2027.4633%202.94265%2026.9426L5.42817%2024.4571C6.87835%2025.4066%208.46315%2025.5663%209.82475%2025.36C11.4505%2025.1136%2012.8873%2024.3316%2013.6095%2023.6095L15.6095%2021.6095C16.1302%2021.0888%2016.1302%2020.2446%2015.6095%2019.7239L15.2188%2019.3332L16.9426%2017.6093C17.4633%2017.0886%2017.4633%2016.2444%2016.9426%2015.7237C16.4219%2015.203%2015.5777%2015.203%2015.057%2015.7237L13.3332%2017.4475L10.5521%2014.6665L12.276%2012.9426Z'%20fill='%23FF7C00'/%3e%3c/svg%3e",{SvelteComponent:Gs,append:De,attr:tt,create_component:zl,destroy_component:Nl,detach:Mt,element:nt,flush:Ul,init:Zs,insert:zt,listen:Ws,mount_component:Bl,safe_not_equal:Qs,set_data:Fl,space:nn,src_url_equal:Js,text:Ct,transition_in:Hl,transition_out:Gl}=window.__gradio__svelte__internal,{createEventDispatcher:Ys}=window.__gradio__svelte__internal;function Zl(l){let e;return{c(){e=Ct("s")},m(t,n){zt(t,e,n)},d(t){t&&Mt(e)}}}function Ks(l){let e;return{c(){e=Ct("ðª API Recorder")},m(t,n){zt(t,e,n)},d(t){t&&Mt(e)}}}function Xs(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g,h,d,m,v,E,k,w,$=l[1]>1&&Zl();return h=new Xn({props:{size:"sm",variant:"primary",$$slots:{default:[Ks]},$$scope:{ctx:l}}}),h.$on("click",l[3]),v=new $i({}),{c(){e=nt("h2"),t=nt("img"),o=nn(),i=nt("div"),r=Ct(`API documentation 13 `),_=nt("div"),a=Ct(l[0]),s=nn(),c=nt("span"),f=nt("span"),u=Ct(l[1]),p=Ct(" API endpoint"),$&&$.c(),b=nt("br"),g=nn(),zl(h.$$.fragment),d=nn(),m=nt("button"),zl(v.$$.fragment),Js(t.src,n=bi)||tt(t,"src",n),tt(t,"alt",""),tt(t,"class","svelte-3n2nxs"),tt(_,"class","url svelte-3n2nxs"),tt(f,"class","url svelte-3n2nxs"),tt(c,"class","counts svelte-3n2nxs"),tt(e,"class","svelte-3n2nxs"),tt(m,"class","svelte-3n2nxs")},m(y,q){zt(y,e,q),De(e,t),De(e,o),De(e,i),De(i,r),De(i,_),De(_,a),De(e,s),De(e,c),De(c,f),De(f,u),De(c,p),$&&$.m(c,null),De(c,b),De(c,g),Bl(h,c,null),zt(y,d,q),zt(y,m,q),Bl(v,m,null),E=!0,k||(w=Ws(m,"click",l[4]),k=!0)},p(y,[q]){(!E||q&1)&&Fl(a,y[0]),(!E||q&2)&&Fl(u,y[1]),y[1]>1?$||($=Zl(),$.c(),$.m(c,b)):$&&($.d(1),$=null);const A={};q&32&&(A.$$scope={dirty:q,ctx:y}),h.$set(A)},i(y){E||(Hl(h.$$.fragment,y),Hl(v.$$.fragment,y),E=!0)},o(y){Gl(h.$$.fragment,y),Gl(v.$$.fragment,y),E=!1},d(y){y&&(Mt(e),Mt(d),Mt(m)),$&&$.d(),Nl(h),Nl(v),k=!1,w()}}}function xs(l,e,t){let{root:n}=e,{api_count:o}=e;const i=Ys(),r=()=>i("close",{api_recorder_visible:!0}),_=()=>i("close");return l.$$set=a=>{"root"in a&&t(0,n=a.root),"api_count"in a&&t(1,o=a.api_count)},[n,o,i,r,_]}class ea extends Gs{constructor(e){super(),Zs(this,e,xs,Xs,Qs,{root:0,api_count:1})}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),Ul()}get api_count(){return this.$$.ctx[1]}set api_count(e){this.$$set({api_count:e}),Ul()}}function vt(l,e,t=null){return e===void 0?t==="py"?"None":null:l===null&&t==="py"?"None":e==="string"||e==="str"?t===null?l:'"'+l+'"':e==="number"?t===null?parseFloat(l):l:e==="boolean"||e=="bool"?t==="py"?(l=String(l),l==="true"?"True":"False"):t==="js"?l:l==="true":e==="List[str]"?(l=JSON.stringify(l),l):e.startsWith("Literal['")?'"'+l+'"':t===null?l===""?null:JSON.parse(l):typeof l=="string"?l===""?t==="py"?"None":"null":l:(t==="py"&&(l=Nn(l)),ta(l))}function ki(l){if(typeof l=="object"&&l!==null&&l.hasOwnProperty("url")&&l.hasOwnProperty("meta")&&typeof l.meta=="object"&&l.meta!==null&&l.meta._type==="gradio.FileData")return!0;if(typeof l=="object"&&l!==null){for(let e in l)if(typeof l[e]=="object"&&ki(l[e]))return!0}return!1}function Nn(l){return typeof l=="object"&&l!==null&&!Array.isArray(l)&&"url"in l&&"meta"in l&&l.meta?._type==="gradio.FileData"?`file('${l.url}')`:(Array.isArray(l)?l.forEach((e,t)=>{typeof e=="object"&&e!==null&&(l[t]=Nn(e))}):typeof l=="object"&&l!==null&&Object.keys(l).forEach(e=>{l[e]=Nn(l[e])}),l)}function ta(l){let e=JSON.stringify(l,(o,i)=>i===null?"UNQUOTEDNone":typeof i=="string"&&i.startsWith("file(")&&i.endsWith(")")?`UNQUOTED${i}`:i);const t=/"UNQUOTEDfile\(([^)]*)\)"/g;e=e.replace(t,(o,i)=>`file(${i})`);const n=/"UNQUOTEDNone"/g;return e.replace(n,"None")}const{SvelteComponent:na,append:ie,attr:it,check_outros:la,create_component:oa,destroy_component:ia,destroy_each:ra,detach:de,element:Se,empty:wi,ensure_array_like:Wl,flush:ln,group_outros:sa,init:aa,insert:me,mount_component:_a,noop:ca,safe_not_equal:ua,set_data:pt,set_style:_t,space:ct,text:Ce,toggle_class:Ql,transition_in:un,transition_out:Un}=window.__gradio__svelte__internal;function Jl(l,e,t){const n=l.slice();return n[4]=e[t].label,n[5]=e[t].python_type,n[6]=e[t].component,n[7]=e[t].parameter_name,n[8]=e[t].parameter_has_default,n[9]=e[t].parameter_default,n[11]=t,n}function Yl(l){let e;return{c(){e=Ce("s")},m(t,n){me(t,e,n)},d(t){t&&de(e)}}}function fa(l){let e=l[2][l[11]].type+"",t;return{c(){t=Ce(e)},m(n,o){me(n,t,o)},p(n,o){o&4&&e!==(e=n[2][n[11]].type+"")&&pt(t,e)},d(n){n&&de(t)}}}function pa(l){let e=l[5].type+"",t,n,o=l[8]&&l[9]===null&&Kl();return{c(){t=Ce(e),o&&o.c(),n=wi()},m(i,r){me(i,t,r),o&&o.m(i,r),me(i,n,r)},p(i,r){r&2&&e!==(e=i[5].type+"")&&pt(t,e),i[8]&&i[9]===null?o||(o=Kl(),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(i){i&&(de(t),de(n)),o&&o.d(i)}}}function Kl(l){let e;return{c(){e=Ce(` | 14 None`)},m(t,n){me(t,e,n)},d(t){t&&de(e)}}}function da(l){let e,t,n=vt(l[9],l[5].type,"py")+"",o;return{c(){e=Se("span"),e.textContent="Default: ",t=Se("span"),o=Ce(n),it(t,"class","code svelte-1yt946s"),_t(t,"font-size","var(--text-sm)")},m(i,r){me(i,e,r),me(i,t,r),ie(t,o)},p(i,r){r&2&&n!==(n=vt(i[9],i[5].type,"py")+"")&&pt(o,n)},d(i){i&&(de(e),de(t))}}}function ma(l){let e;return{c(){e=Se("span"),e.textContent="Required",_t(e,"font-weight","bold")},m(t,n){me(t,e,n)},p:ca,d(t){t&&de(e)}}}function Xl(l){let e,t,n,o,i,r=(l[7]?l[7]:"["+l[11]+"]")+"",_,a,s,c,f,u,p,b=l[4]+"",g,h,d=l[6]+"",m,v,E;function k(L,D){return L[3]==="python"?pa:fa}let w=k(l),$=w(l);function y(L,D){return!L[8]||L[3]=="javascript"?ma:da}let q=y(l),A=q(l);return{c(){e=Se("hr"),t=ct(),n=Se("div"),o=Se("p"),i=Se("span"),_=Ce(r),a=ct(),s=Se("span"),$.c(),c=ct(),A.c(),f=ct(),u=Se("p"),p=Ce('The input value that is provided in the "'),g=Ce(b),h=Ce('" '),m=Ce(d),v=Ce(` 15 component.`),E=ct(),it(e,"class","hr svelte-1yt946s"),it(i,"class","code svelte-1yt946s"),_t(i,"margin-right","10px"),it(s,"class","code highlight svelte-1yt946s"),_t(s,"margin-right","10px"),_t(o,"white-space","nowrap"),_t(o,"overflow-x","auto"),it(u,"class","desc
15svelte-1yt946s"),_t(n,"margin","10px")},m(L,D){me(L,e,D),me(L,t,D),me(L,n,D),ie(n,o),ie(o,i),ie(i,_),ie(o,a),ie(o,s),$.m(s,null),ie(o,c),A.m(o,null),ie(n,f),ie(n,u),ie(u,p),ie(u,g),ie(u,h),ie(u,m),ie(u,v),ie(n,E)},p(L,D){D&2&&r!==(r=(L[7]?L[7]:"["+L[11]+"]")+"")&&pt(_,r),w===(w=k(L))&&$?$.p(L,D):($.d(1),$=w(L),$&&($.c(),$.m(s,null))),q===(q=y(L))&&A?A.p(L,D):(A.d(1),A=q(L),A&&(A.c(),A.m(o,null))),D&2&&b!==(b=L[4]+"")&&pt(g,b),D&2&&d!==(d=L[6]+"")&&pt(m,d)},d(L){L&&(de(e),de(t),de(n)),$.d(),A.d()}}}function xl(l){let e,t,n;return t=new fi({props:{margin:!1}}),{c(){e=Se("div"),oa(t.$$.fragment),it(e,"class","load-wrap")},m(o,i){me(o,e,i),_a(t,e,null),n=!0},i(o){n||(un(t.$$.fragment,o),n=!0)},o(o){Un(t.$$.fragment,o),n=!1},d(o){o&&de(e),ia(t)}}}function ha(l){let e,t,n,o=l[1].length+"",i,r,_,a,s,c,f,u,p=l[1].length!=1&&Yl(),b=Wl(l[1]),g=[];for(let d=0;d<b.length;d+=1)g[d]=Xl(Jl(l,b,d));let h=l[0]&&xl();return{c(){e=Se("h4"),t=Se("div"),t.innerHTML='<div class="toggle-dot svelte-1yt946s"></div>',n=Ce(` 16 Accepts `),i=Ce(o),r=Ce(" parameter"),p&&p.c(),_=Ce(":"),a=ct(),s=Se("div");for(let d=0;d<g.length;d+=1)g[d].c();c=ct(),h&&h.c(),f=wi(),it(t,"class","toggle-icon svelte-1yt946s"),it(e,"class","svelte-1yt946s"),Ql(s,"hide",l[0])},m(d,m){me(d,e,m),ie(e,t),ie(e,n),ie(e,i),ie(e,r),p&&p.m(e,null),ie(e,_),me(d,a,m),me(d,s,m);for(let v=0;v<g.length;v+=1)g[v]&&g[v].m(s,null);me(d,c,m),h&&h.m(d,m),me(d,f,m),u=!0},p(d,[m]){if((!u||m&2)&&o!==(o=d[1].length+"")&&pt(i,o),d[1].length!=1?p||(p=Yl(),p.c(),p.m(e,_)):p&&(p.d(1),p=null),m&14){b=Wl(d[1]);let v;for(v=0;v<b.length;v+=1){const E=Jl(d,b,v);g[v]?g[v].p(E,m):(g[v]=Xl(E),g[v].c(),g[v].m(s,null))}for(;v<g.length;v+=1)g[v].d(1);g.length=b.length}(!u||m&1)&&Ql(s,"hide",d[0]),d[0]?h?m&1&&un(h,1):(h=xl(),h.c(),un(h,1),h.m(f.parentNode,f)):h&&(sa(),Un(h,1,1,()=>{h=null}),la())},i(d){u||(un(h),u=!0)},o(d){Un(h),u=!1},d(d){d&&(de(e),de(a),de(s),de(c),de(f)),p&&p.d(),ra(g,d),h&&h.d(d)}}}function ga(l,e,t){let{is_running:n}=e,{endpoint_returns:o}=e,{js_returns:i}=e,{current_language:r}=e;return l.$$set=_=>{"is_running"in _&&t(0,n=_.is_running),"endpoint_returns"in _&&t(1,o=_.endpoint_returns),"js_returns"in _&&t(2,i=_.js_returns),"current_language"in _&&t(3,r=_.current_language)},[n,o,i,r]}class va extends na{constructor(e){super(),aa(this,e,ga,ha,ua,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}get is_running(){return this.$$.ctx[0]}set is_running(e){this.$$set({is_running:e}),ln()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),ln()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),ln()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),ln()}}const{SvelteComponent:$a,create_component:ba,destroy_component:ka,detach:wa,flush:ya,init:Ea,insert:Ca,mount_component:Aa,safe_not_equal:La,set_data:qa,text:Pa,transition_in:Ta,transition_out:Oa}=window.__gradio__svelte__internal;function Ia(l){let e;return{c(){e=Pa(l[0])},m(t,n){Ca(t,e,n)},p(t,n){n&1&&qa(e,t[0])},d(t){t&&wa(e)}}}function ja(l){let e,t;return e=new Xn({props:{size:"sm",$$slots:{default:[Ia]},$$scope:{ctx:l}}}),e.$on("click",l[1]),{c(){ba(e.$$.fragment)},m(n,o){Aa(e,n,o),t=!0},p(n,[o]){const i={};o&9&&(i.$$scope={dirty:o,ctx:n}),e.$set(i)},i(n){t||(Ta(e.$$.fragment,n),t=!0)},o(n){Oa(e.$$.fragment,n),t=!1},d(n){ka(e,n)}}}function Da(l,e,t){let{code:n}=e,o="copy";function i(){navigator.clipboard.writeText(n),t(0,o="copied!"),setTimeout(()=>{t(0,o="copy")},1500)}return l.$$set=r=>{"code"in r&&t(2,n=r.code)},[o,i,n]}class It extends $a{constructor(e){super(),Ea(this,e,Da,ja,La,{code:2})}get code(){return this.$$.ctx[2]}set code(e){this.$$set({code:e}),ya()}}const{SvelteComponent:Ra,append:yi,attr:Bt,check_outros:Sa,create_component:ll,destroy_component:ol,detach:dt,element:mt,flush:Va,group_outros:Ma,init:za,insert:ht,mount_component:il,noop:Ei,safe_not_equal:Na,space:Ci,transition_in:Ft,transition_out:Ht}=window.__gradio__svelte__internal;function Ua(l){let e,t,n,o,i,r;return t=new It({props:{code:to}}),{c(){e=mt("div"),ll(t.$$.fragment),n=Ci(),o=mt("div"),i=mt("pre"),i.textContent=`$ ${to}`,Bt(e,"class","copy svelte-hq8ezf"),Bt(i,"class","svelte-hq8ezf")},m(_,a){ht(_,e,a),il(t,e,null),ht(_,n,a),ht(_,o,a),yi(o,i),r=!0},p:Ei,i(_){r||(Ft(t.$$.fragment,_),r=!0)},o(_){Ht(t.$$.fragment,_),r=!1},d(_){_&&(dt(e),dt(n),dt(o)),ol(t)}}}function Ba(l){let e,t,n,o,i,r;return t=new It({props:{code:eo}}),{c(){e=mt("div"),ll(t.$$.fragment),n=Ci(),o=mt("div"),i=mt("pre"),i.textContent=`$ ${eo}`,Bt(e,"class","copy svelte-hq8ezf"),Bt(i,"class","svelte-hq8ezf")},m(_,a){ht(_,e,a),il(t,e,null),ht(_,n,a),ht(_,o,a),yi(o,i),r=!0},p:Ei,i(_){r||(Ft(t.$$.fragment,_),r=!0)},o(_){Ht(t.$$.fragment,_),r=!1},d(_){_&&(dt(e),dt(n),dt(o)),ol(t)}}}function Fa(l){let e,t,n,o;const i=[Ba,Ua],r=[];function _(a,s){return a[0]==="python"?0:a[0]==="javascript"?1:-1}return~(t=_(l))&&(n=r[t]=i[t](l)),{c(){e=mt("code"),n&&n.c(),Bt(e,"class","svelte-hq8ezf")},m(a,s){ht(a,e,s),~t&&r[t].m(e,null),o=!0},p(a,s){let c=t;t=_(a),t===c?~t&&r[t].p(a,s):(n&&(Ma(),Ht(r[c],1,1,()=>{r[c]=null}),Sa()),~t?(n=r[t],n?n.p(a,s):(n=r[t]=i[t](a),n.c()),Ft(n,1),n.m(e,null)):n=null)},i(a){o||(Ft(n),o=!0)},o(a){Ht(n),o=!1},d(a){a&&dt(e),~t&&r[t].d()}}}function Ha(l){let e,t;return e=new xn({props:{border_mode:"contrast",$$slots:{default:[Fa]},$$scope:{ctx:l}}}),{c(){ll(e.$$.fragment)},m(n,o){il(e,n,o),t=!0},p(n,[o]){const i={};o&3&&(i.$$scope={dirty:o,ctx:n}),e.$set(i)},i(n){t||(Ft(e.$$.fragment,n),t=!0)},o(n){Ht(e.$$.fragment,n),t=!1},d(n){ol(e,n)}}}let eo="pip install gradio_client",to="npm i -D @gradio/client";function Ga(l,e,t){let{current_language:n}=e;return l.$$set=o=>{"current_language"in o&&t(0,n=o.current_language)},[n]}
vendor: 29,815 bytes, lines 16-64
16class Za extends Ra{constructor(e){super(),za(this,e,Ga,Ha,Na,{current_language:0})}get current_language(){return this.$$.ctx[0]}set current_language(e){this.$$set({current_language:e}),Va()}}const{SvelteComponent:Wa,append:qt,attr:dn,detach:rl,element:mn,empty:Qa,flush:Sn,init:Ja,insert:sl,noop:no,safe_not_equal:Ya,set_data:Ai,text:hn}=window.__gradio__svelte__internal;function Ka(l){let e,t,n,o;return{c(){e=mn("h3"),t=hn(`fn_index: 17 `),n=mn("span"),o=hn(l[1]),dn(n,"class","post svelte-41kcm6"),dn(e,"class","svelte-41kcm6")},m(i,r){sl(i,e,r),qt(e,t),qt(e,n),qt(n,o)},p(i,r){r&2&&Ai(o,i[1])},d(i){i&&rl(e)}}}function Xa(l){let e,t,n,o="/"+l[0],i;return{c(){e=mn("h3"),t=hn(`api_name: 18 `),n=mn("span"),i=hn(o),dn(n,"class","post svelte-41kcm6"),dn(e,"class","svelte-41kcm6")},m(r,_){sl(r,e,_),qt(e,t),qt(e,n),qt(n,i)},p(r,_){_&1&&o!==(o="/"+r[0])&&Ai(i,o)},d(r){r&&rl(e)}}}function xa(l){let e;function t(i,r){return i[2]?Xa:Ka}let n=t(l),o=n(l);return{c(){o.c(),e=Qa()},m(i,r){o.m(i,r),sl(i,e,r)},p(i,[r]){n===(n=t(i))&&o?o.p(i,r):(o.d(1),o=n(i),o&&(o.c(),o.m(e.parentNode,e)))},i:no,o:no,d(i){i&&rl(e),o.d(i)}}}function e_(l,e,t){let{api_name:n=null}=e,{fn_index:o=null}=e,{named:i}=e;return l.$$set=r=>{"api_name"in r&&t(0,n=r.api_name),"fn_index"in r&&t(1,o=r.fn_index),"named"in r&&t(2,i=r.named)},[n,o,i]}class Li extends Wa{constructor(e){super(),Ja(this,e,e_,xa,Ya,{api_name:0,fn_index:1,named:2})}get api_name(){return this.$$.ctx[0]}set api_name(e){this.$$set({api_name:e}),Sn()}get fn_index(){return this.$$.ctx[1]}set fn_index(e){this.$$set({fn_index:e}),Sn()}get named(){return this.$$.ctx[2]}set named(e){this.$$set({named:e}),Sn()}}const{SvelteComponent:t_,append:j,attr:ue,binding_callbacks:lo,check_outros:qi,create_component:Qt,destroy_component:Jt,destroy_each:Bn,detach:B,element:re,empty:n_,ensure_array_like:At,flush:kt,group_outros:Pi,init:l_,insert:F,mount_component:Yt,noop:o_,safe_not_equal:i_,set_data:ze,space:al,text:I,transition_in:Ye,transition_out:Ke}=window.__gradio__svelte__internal;function oo(l,e,t){const n=l.slice();return n[20]=e[t].label,n[21]=e[t].type,n[13]=e[t].python_type,n[22]=e[t].component,n[14]=e[t].example_input,n[23]=e[t].serializer,n[19]=t,n}function io(l,e,t){const n=l.slice();return n[20]=e[t].label,n[21]=e[t].type,n[13]=e[t].python_type,n[22]=e[t].component,n[14]=e[t].example_input,n[23]=e[t].serializer,n[19]=t,n}function ro(l,e,t){const n=l.slice();return n[13]=e[t].python_type,n[14]=e[t].example_input,n[15]=e[t].parameter_name,n[16]=e[t].parameter_has_default,n[17]=e[t].parameter_default,n[19]=t,n}function r_(l){let e,t;return e=new Li({props:{named:l[4],fn_index:l[1]}}),{c(){Qt(e.$$.fragment)},m(n,o){Yt(e,n,o),t=!0},p(n,o){const i={};o&16&&(i.named=n[4]),o&2&&(i.fn_index=n[1]),e.$set(i)},i(n){t||(Ye(e.$$.fragment,n),t=!0)},o(n){Ke(e.$$.fragment,n),t=!1},d(n){Jt(e,n)}}}function s_(l){let e,t;return e=new Li({props:{named:l[4],api_name:l[0].api_name}}),{c(){Qt(e.$$.fragment)},m(n,o){Yt(e,n,o),t=!0},p(n,o){const i={};o&16&&(i.named=n[4]),o&1&&(i.api_name=n[0].api_name),e.$set(i)},i(n){t||(Ye(e.$$.fragment,n),t=!0)},o(n){Ke(e.$$.fragment,n),t=!1},d(n){Jt(e,n)}}}function a_(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g;t=new It({props:{code:l[7]?.innerText}});let h=At(l[10]),d=[];for(let $=0;$<h.length;$+=1)d[$]=so(io(l,h,$));function m($,y){return $[4]?u_:c_}let v=m(l),E=v(l),k=At(l[3]),w=[];for(let $=0;$<k.length;$+=1)w[$]=ao(oo(l,k,$));return{c(){e=re("div"),Qt(t.$$.fragment),n=al(),o=re("div"),i=re("pre"),r=I(`import { Client } from "@gradio/client"; 19`);for(let $=0;$<d.length;$+=1)d[$].c();_=I(` 20const client = await Client.connect(`),a=re("span"),s=I('"'),c=I(l[2]),f=I('"'),u=I(`); 21const result = await client.predict(`),E.c(),p=I(", { ");for(let $=0;$<w.length;$+=1)w[$].c();b=I(` 22}); 23 24console.log(result.data); 25`),ue(e,"class","copy svelte-114qcyq"),ue(a,"class","token string svelte-114qcyq"),ue(i,"class","svelte-114qcyq")},m($,y){F($,e,y),Yt(t,e,null),F($,n,y),F($,o,y),j(o,i),j(i,r);for(let q=0;q<d.length;q+=1)d[q]&&d[q].m(i,null);j(i,_),j(i,a),j(a,s),j(a,c),j(a,f),j(i,u),E.m(i,null),j(i,p);for(let q=0;q<w.length;q+=1)w[q]&&w[q].m(i,null);j(i,b),l[12](o),g=!0},p($,y){const q={};if(y&128&&(q.code=$[7]?.innerText),t.$set(q),y&1024){h=At($[10]);let A;for(A=0;A<h.length;A+=1){const L=io($,h,A);d[A]?d[A].p(L,y):(d[A]=so(L),d[A].c(),d[A].m(i,_))}for(;A<d.length;A+=1)d[A].d(1);d.length=h.length}if((!g||y&4)&&ze(c,$[2]),v===(v=m($))&&E?E.p($,y):(E.d(1),E=v($),E&&(E.c(),E.m(i,p))),y&520){k=At($[3]);let A;for(A=0;A<k.length;A+=1){const L=oo($,k,A);w[A]?w[A].p(L,y):(w[A]=ao(L),w[A].c(),w[A].m(i,b))}for(;A<w.length;A+=1)w[A].d(1);w.length=k.length}},i($){g||(Ye(t.$$.fragment,$),g=!0)},o($){Ke(t.$$.fragment,$),g=!1},d($){$&&(B(e),B(n),B(o)),Jt(t),Bn(d,$),E.d(),Bn(w,$),l[12](null)}}}function __(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g,h,d,m,v,E,k=l[0].api_name+"",w,$,y,q,A,L;t=new It({props:{code:l[6]?.innerText}});let D=l[8]&&d_(),S=At(l[3]),M=[];for(let R=0;R<S.length;R+=1)M[R]=_o(ro(l,S,R));return{c(){e=re("div"),Qt(t.$$.fragment),n=al(),o=re("div"),i=re("pre"),r=re("span"),r.textContent="from",_=I(" gradio_client "),a=re("span"),a.textContent="import",s=I(" Client"),D&&D.c(),c=I(` 26 27client = Client(`),f=re("span"),u=I('"'),p=I(l[2]),b=I('"'),g=I(`) 28result = client.`),h=re("span"),h.textContent="predict",d=I("(");for(let R=0;R<M.length;R+=1)M[R].c();m=I(` 29 api_name=`),v=re("span"),E=I('"/'),w=I(k),$=I('"'),y=I(` 30) 31`),q=re("span"),q.textContent="print",A=I("(result)"),ue(e,"class","copy svelte-114qcyq"),ue(r,"class","highlight"),ue(a,"class","highlight"),ue(f,"class","token string svelte-114qcyq"),ue(h,"class","highlight"),ue(v,"class","api-name svelte-114qcyq"),ue(q,"class","highlight"),ue(i,"class","svelte-114qcyq")},m(R,O){F(R,e,O),Yt(t,e,null),F(R,n,O),F(R,o,O),j(o,i),j(i,r),j(i,_),j(i,a),j(i,s),D&&D.m(i,null),j(i,c),j(i,f),j(f,u),j(f,p),j(f,b),j(i,g),j(i,h),j(i,d);for(let K=0;K<M.length;K+=1)M[K]&&M[K].m(i,null);j(i,m),j(i,v),j(v,E),j(v,w),j(v,$),j(i,y),j(i,q),j(i,A),l[11](o),L=!0},p(R,O){const K={};if(O&64&&(K.code=R[6]?.innerText),t.$set(K),(!L||O&4)&&ze(p,R[2]),O&8){S=At(R[3]);let T;for(T=0;T<S.length;T+=1){const Q=ro(R,S,T);M[T]?M[T].p(Q,O):(M[T]=_o(Q),M[T].c(),M[T].m(i,m))}for(;T<M.length;T+=1)M[T].d(1);M.length=S.length}(!L||O&1)&&k!==(k=R[0].api_name+"")&&ze(w,k)},i(R){L||(Ye(t.$$.fragment,R),L=!0)},o(R){Ke(t.$$.fragment,R),L=!1},d(R){R&&(B(e),B(n),B(o)),Jt(t),D&&D.d(),Bn(M,R),l[11](null)}}}function so(l){let e,t,n,o=l[14].url+"",i,r,_=l[22]+"",a,s,c,f;return{c(){e=I(` 32const response_`),t=I(l[19]),n=I(' = await fetch("'),i=I(o),r=I(`"); 33const example`),a=I(_),s=I(" = await response_"),c=I(l[19]),f=I(`.blob(); 34 `)},m(u,p){F(u,e,p),F(u,t,p),F(u,n,p),F(u,i,p),F(u,r,p),F(u,a,p),F(u,s,p),F(u,c,p),F(u,f,p)},p:o_,d(u){u&&(B(e),B(t),B(n),B(i),B(r),B(a),B(s),B(c),B(f))}}}function c_(l){let e;return{c(){e=I(l[1])},m(t,n){F(t,e,n)},p(t,n){n&2&&ze(e,t[1])},d(t){t&&B(e)}}}function u_(l){let e,t,n=l[0].api_name+"",o,i;return{c(){e=re("span"),t=I('"/'),o=I(n),i=I('"'),ue(e,"class","api-name svelte-114qcyq")},m(r,_){F(r,e,_),j(e,t),j(e,o),j(e,i)},p(r,_){_&1&&n!==(n=r[0].api_name+"")&&ze(o,n)},d(r){r&&B(e)}}}function f_(l){let e,t,n=l[20]+"",o,i,r=vt(l[14],l[13].type,"js")+"",_,a;return{c(){e=I(` 35 `),t=re("span"),o=I(n),i=I(": "),_=I(r),a=I(", "),ue(t,"class","example-inputs")},m(s,c){F(s,e,c),F(s,t,c),j(t,o),j(t,i),j(t,_),F(s,a,c)},p(s,c){c&8&&n!==(n=s[20]+"")&&ze(o,n),c&8&&r!==(r=vt(s[14],s[13].type,"js")+"")&&ze(_,r)},d(s){s&&(B(e),B(t),B(a))}}}function p_(l){let e,t,n=l[20]+"",o,i,r=l[22]+"",_,a,s,c,f=l[20]+"",u,p,b=l[22]+"",g,h;return{c(){e=I(` 36 `),t=re("span"),o=I(n),i=I(": example"),_=I(r),a=I(", "),s=re("span"),c=I(" // blob in '"),u=I(f),p=I("' "),g=I(b),h=I(" component"),ue(t,"class","example-inputs"),ue(s,"class","desc svelte-114qcyq")},m(d,m){F(d,e,m),F(d,t,m),j(t,o),j(t,i),j(t,_),F(d,a,m),F(d,s,m),j(s,c),j(s,u),j(s,p),j(s,g),j(s,h)},p(d,m){m&8&&n!==(n=d[20]+"")&&ze(o,n),m&8&&r!==(r=d[22]+"")&&ze(_,r),m&8&&f!==(f=d[20]+"")&&ze(u,f),m&8&&b!==(b=d[22]+"")&&ze(g,b)},d(d){d&&(B(e),B(t),B(a),B(s))}}}function ao(l){let e,t;function n(r,_){return _&8&&(e=null),e==null&&(e=!!r[9].includes(r[22])),e?p_:f_}let o=n(l,-1),i=o(l);return{c(){i.c(),t=n_()},m(r,_){i.m(r,_),F(r,t,_)},p(r,_){o===(o=n(r,_))&&i?i.p(r,_):(i.d(1),i=o(r),i&&(i.c(),i.m(t.parentNode,t)))},d(r){r&&B(t),i.d(r)}}}function d_(l){let e;return{c(){e=I(", file")},m(t,n){F(t,e,n)},d(t){t&&B(e)}}}function _o(l){let e,t=l[15]?l[15]+"=":"",n,o,i=vt(l[16]?l[17]:l[14],l[13].type,"py")+"",r,_;return{c(){e=I(` 37 `),n=I(t),o=re("span"),r=I(i),_=I(",")},m(a,s){F(a,e,s),F(a,n,s),F(a,o,s),j(o,r),F(a,_,s)},p(a,s){s&8&&t!==(t=a[15]?a[15]+"=":"")&&ze(n,t),s&8&&i!==(i=vt(a[16]?a[17]:a[14],a[13].type,"py")+"")&&ze(r,i)},d(a){a&&(B(e),B(n),B(o),B(_))}}}function m_(l){let e,t,n,o;const i=[__,a_],r=[];function _(a,s){return a[5]==="python"?0:a[5]==="javascript"?1:-1}return~(t=_(l))&&(n=r[t]=i[t](l)),{c(){e=re("code"),n&&n.c(),ue(e,"class","svelte-114qcyq")},m(a,s){F(a,e,s),~t&&r[t].m(e,null),o=!0},p(a,s){let c=t;t=_(a),t===c?~t&&r[t].p(a,s):(n&&(Pi(),Ke(r[c],1,1,()=>{r[c]=null}),qi()),~t?(n=r[t],n?n.p(a,s):(n=r[t]=i[t](a),n.c()),Ye(n,1),n.m(e,null)):n=null)},i(a){o||(Ye(n),o=!0)},o(a){Ke(n),o=!1},d(a){a&&B(e),~t&&r[t].d()}}}function h_(l){let e,t,n,o,i,r;const _=[s_,r_],a=[];function s(c,f){return c[4]?0:1}return t=s(l),n=a[t]=_[t](l),i=new xn({props:{$$slots:{default:[m_]},$$scope:{ctx:l}}}),{c(){e=re("div"),n.c(),o=al(),Qt(i.$$.fragment),ue(e,"class","container svelte-114qcyq")},m(c,f){F(c,e,f),a[t].m(e,null),j(e,o),Yt(i,e,null),r=!0},p(c,[f]){let u=t;t=s(c),t===u?a[t].p(c,f):(Pi(),Ke(a[u],1,1,()=>{a[u]=null}),qi(),n=a[t],n?n.p(c,f):(n=a[t]=_[t](c),n.c()),Ye(n,1),n.m(e,o));const p={};f&67109119&&(p.$$scope={dirty:f,ctx:c}),i.$set(p)},i(c){r||(Ye(n),Ye(i.$$.fragment,c),r=!0)},o(c){Ke(n),Ke(i.$$.fragment,c),r=!1},d(c){c&&B(e),a[t].d(),Jt(i)}}}function g_(l,e,t){let{dependency:n}=e,{dependency_index:o}=e,{root:i}=e,{endpoint_parameters:r}=e,{named:_}=e,{current_language:a}=e,s,c,f=r.some(h=>ki(h.example_input)),u=["Audio","File","Image","Video"],p=r.filter(h=>u.includes(h.component));function b(h){lo[h?"unshift":"push"](()=>{s=h,t(6,s)})}function g(h){lo[h?"unshift":"push"](()=>{c=h,t(7,c)})}return l.$$set=h=>{"dependency"in h&&t(0,n=h.dependency),"dependency_index"in h&&t(1,o=h.dependency_index),"root"in h&&t(2,i=h.root),"endpoint_parameters"in h&&t(3,r=h.endpoint_parameters),"named"in h&&t(4,_=h.named),"current_language"in h&&t(5,a=h.current_language)},[n,o,i,r,_,a,s,c,f,u,p,b,g]}class v_ extends t_{constructor(e){super(),l_(this,e,g_,h_,i_,{dependency:0,dependency_index:1,root:2,endpoint_parameters:3,named:4,current_language:5})}get dependency(){return this.$$.ctx[0]}set dependency(e){this.$$set({dependency:e}),kt()}get dependency_index(){return this.$$.ctx[1]}set dependency_index(e){this.$$set({dependency_index:e}),kt()}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),kt()}get endpoint_parameters(){return this.$$.ctx[3]}set endpoint_parameters(e){this.$$set({endpoint_parameters:e}),kt()}get named(){return this.$$.ctx[4]}set named(e){this.$$set({named:e}),kt()}get current_language(){return this.$$.ctx[5]}set current_language(e){this.$$set({current_language:e}),kt()}}const{SvelteComponent:$_,append:Z,attr:Ve,binding_callbacks:co,check_outros:b_,create_component:_l,destroy_component:cl,destroy_each:Ti,detach:he,element:Ae,ensure_array_like:gn,flush:Rt,group_outros:k_,init:w_,insert:ge,mount_component:ul,safe_not_equal:y_,set_data:Tt,space:Oi,text:W,transition_in:Gt,transition_out:Zt}=window.__gradio__svelte__internal;function uo(l,e,t){const n=l.slice();return n[10]=e[t],n}function fo(l,e,t){const n=l.slice();return n[10]=e[t],n}function E_(l){let e,t,n,o,i,r,_,a,s,c,f,u;t=new It({props:{code:l[5]?.innerText}});let p=gn(l[3]),b=[];for(let g=0;g<p.length;g+=1)b[g]=mo(uo(l,p,g));return{c(){e=Ae("div"),_l(t.$$.fragment),n=Oi(),o=Ae("div"),i=Ae("pre"),r=W(`import { Client } from "@gradio/client"; 38 39const app = await Client.connect(`),_=Ae("span"),a=W('"'),s=W(l[1]),c=W('"'),f=W(`); 40`);for(let g=0;g<b.length;g+=1)b[g].c();Ve(e,"class","copy svelte-j71ub0"),Ve(_,"class","token string svelte-j71ub0"),Ve(i,"class","svelte-j71ub0")},m(g,h){ge(g,e,h),ul(t,e,null),ge(g,n,h),ge(g,o,h),Z(o,i),Z(i,r),Z(i,_),Z(_,a),Z(_,s),Z(_,c),Z(i,f);for(let d=0;d<b.length;d+=1)b[d]&&b[d].m(i,null);l[9](o),u=!0},p(g,h){const d={};if(h&32&&(d.code=g[5]?.innerText),t.$set(d),(!u||h&2)&&Tt(s,g[1]),h&9){p=gn(g[3]);let m;for(m=0;m<p.length;m+=1){const v=uo(g,p,m);b[m]?b[m].p(v,h):(b[m]=mo(v),b[m].c(),b[m].m(i,null))}for(;m<b.length;m+=1)b[m].d(1);b.length=p.length}},i(g){u||(Gt(t.$$.fragment,g),u=!0)},o(g){Zt(t.$$.fragment,g),u=!1},d(g){g&&(he(e),he(n),he(o)),cl(t),Ti(b,g),l[9](null)}}}function C_(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g;t=new It({props:{code:l[4]?.innerText}});let h=gn(l[3]),d=[];for(let m=0;m<h.length;m+=1)d[m]=ho(fo(l,h,m));return{c(){e=Ae("div"),_l(t.$$.fragment),n=Oi(),o=Ae("div"),i=Ae("pre"),r=Ae("span"),r.textContent="from",_=W(" gradio_client "),a=Ae("span"),a.textContent="import",s=W(` Client, file 41 42client = Client(`),c=Ae("span"),f=W('"'),u=W(l[1]),p=W('"'),b=W(`) 43`);for(let m=0;m<d.length;m+=1)d[m].c();Ve(e,"class","copy svelte-j71ub0"),Ve(r,"class","highlight"),Ve(a,"class","highlight"),Ve(c,"class","token string svelte-j71ub0"),Ve(i,"class","svelte-j71ub0")},m(m,v){ge(m,e,v),ul(t,e,null),ge(m,n,v),ge(m,o,v),Z(o,i),Z(i,r),Z(i,_),Z(i,a),Z(i,s),Z(i,c),Z(c,f),Z(c,u),Z(c,p),Z(i,b);for(let E=0;E<d.length;E+=1)d[E]&&d[E].m(i,null);l[8](o),g=!0},p(m,v){const E={};if(v&16&&(E.code=m[4]?.innerText),t.$set(E),(!g||v&2)&&Tt(u,m[1]),v&73){h=gn(m[3]);let k;for(k=0;k<h.length;k+=1){const w=fo(m,h,k);d[k]?d[k].p(w,v):(d[k]=ho(w),d[k].c(),d[k].m(i,null))}for(;k<d.length;k+=1)d[k].d(1);d.length=h.length}},i(m){g||(Gt(t.$$.fragment,m),g=!0)},o(m){Zt(t.$$.fragment,m),g=!1},d(m){m&&(he(e),he(n),he(o)),cl(t),Ti(d,m),l[8](null)}}}function po(l){let e,t,n,o=l[0][l[10].fn_index].api_name+"",i,r,_,a=JSON.stringify(l[10].data,null,2)+"",s,c;return{c(){e=W("client.predict("),t=Ae("span"),n=W('"/'),i=W(o),r=W('"'),_=W('", '),s=W(a),c=W(");"),Ve(t,"class","api-name svelte-j71ub0")},m(f,u){ge(f,e,u),ge(f,t,u),Z(t,n),Z(t,i),Z(t,r),ge(f,_,u),ge(f,s,u),ge(f,c,u)},p(f,u){u&9&&o!==(o=f[0][f[10].fn_index].api_name+"")&&Tt(i,o),u&8&&a!==(a=JSON.stringify(f[10].data,null,2)+"")&&Tt(s,a)},d(f){f&&(he(e),he(t),he(_),he(s),he(c))}}}function mo(l){let e,t,n=l[0][l[10].fn_index].backend_fn&&po(l);return{c(){e=W(` 44`),n&&n.c(),t=W(` 45 `)},m(o,i){ge(o,e,i),n&&n.m(o,i),ge(o,t,i)},p(o,i){o[0][o[10].fn_index].backend_fn?n?n.p(o,i):(n=po(o),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(o){o&&(he(e),he(t)),n&&n.d(o)}}}function ho(l){let e,t,n,o=l[6](l[10])+"",i,r,_,a,s=l[0][l[10].fn_index].api_name+"",c,f,u;return{c(){e=W(` 46client.`),t=Ae("span"),n=W(`predict( 47`),i=W(o),r=W(" api_name="),_=Ae("span"),a=W('"/'),c=W(s),f=W('"'),u=W(` 48) 49`),Ve(_,"class","api-name svelte-j71ub0"),Ve(t,"class","highlight")},m(p,b){ge(p,e,b),ge(p,t,b),Z(t,n),Z(t,i),Z(t,r),Z(t,_),Z(_,a),Z(_,c),Z(_,f),Z(t,u)},p(p,b){b&8&&o!==(o=p[6](p[10])+"")&&Tt(i,o),b&9&&s!==(s=p[0][p[10].fn_index].api_name+"")&&Tt(c,s)},d(p){p&&(he(e),he(t))}}}function A_(l){let e,t,n,o;const i=[C_,E_],r=[];function _(a,s){return a[2]==="python"?0:a[2]==="javascript"?1:-1}return~(t=_(l))&&(n=r[t]=i[t](l)),{c(){e=Ae("code"),n&&n.c(),Ve(e,"class","svelte-j71ub0")},m(a,s){ge(a,e,s),~t&&r[t].m(e,null),o=!0},p(a,s){let c=t;t=_(a),t===c?~t&&r[t].p(a,s):(n&&(k_(),Zt(r[c],1,1,()=>{r[c]=null}),b_()),~t?(n=r[t],n?n.p(a,s):(n=r[t]=i[t](a),n.c()),Gt(n,1),n.m(e,null)):n=null)},i(a){o||(Gt(n),o=!0)},o(a){Zt(n),o=!1},d(a){a&&he(e),~t&&r[t].d()}}}function L_(l){let e,t,n;return t=new xn({props:{border_mode:"focus",$$slots:{default:[A_]},$$scope:{ctx:l}}}),{c(){e=Ae("div"),_l(t.$$.fragment),Ve(e,"class","container svelte-j71ub0")},m(o,i){ge(o,e,i),ul(t,e,null),n=!0},p(o,[i]){const r={};i&32831&&(r.$$scope={dirty:i,ctx:o}),t.$set(r)},i(o){n||(Gt(t.$$.fragment,o),n=!0)},o(o){Zt(t.$$.fragment,o),n=!1},d(o){o&&he(e),cl(t)}}}function q_(l,e,t){let{dependencies:n}=e,{root:o}=e,{current_language:i}=e,{endpoints_info:r}=e,_,a,{api_calls:s=[]}=e;function c(p){const b=`/${n[p.fn_index].api_name}`,g=p.data.map((h,d)=>{const m=r[b].parameters[d],v=m.parameter_name,E=m.python_type.type;return` ${v}=${vt(h,E,"py")}`}).join(`, 50`);return g?`${g}, 51`:`${g}`}function f(p){co[p?"unshift":"push"](()=>{_=p,t(4,_)})}function u(p){co[p?"unshift":"push"](()=>{a=p,t(5,a)})}return l.$$set=p=>{"dependencies"in p&&t(0,n=p.dependencies),"root"in p&&t(1,o=p.root),"current_language"in p&&t(2,i=p.current_language),"endpoints_info"in p&&t(7,r=p.endpoints_info),"api_calls"in p&&t(3,s=p.api_calls)},[n,o,i,s,_,a,c,r,f,u]}class P_ extends $_{constructor(e){super(),w_(this,e,q_,L_,y_,{dependencies:0,root:1,current_language:2,endpoints_info:7,api_calls:3})}get dependencies(){return this.$$.ctx[0]}set dependencies(e){this.$$set({dependencies:e}),Rt()}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),Rt()}get current_language(){return this.$$.ctx[2]}set current_language(e){this.$$set({current_language:e}),Rt()}get endpoints_info(){return this.$$.ctx[7]}set endpoints_info(e){this.$$set({endpoints_info:e}),Rt()}get api_calls(){return this.$$.ctx[3]}set api_calls(e){this.$$set({api_calls:e}),Rt()}}const T_="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20focusable='false'%20role='img'%20width='1em'%20height='1em'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%2032%2032'%20%3e%3cpath%20d='M15.84.5a16.4,16.4,0,0,0-3.57.32C9.1,1.39,8.53,2.53,8.53,4.64V7.48H16v1H5.77a4.73,4.73,0,0,0-4.7,3.74,14.82,14.82,0,0,0,0,7.54c.57,2.28,1.86,3.82,4,3.82h2.6V20.14a4.73,4.73,0,0,1,4.63-4.63h7.38a3.72,3.72,0,0,0,3.73-3.73V4.64A4.16,4.16,0,0,0,19.65.82,20.49,20.49,0,0,0,15.84.5ZM11.78,2.77a1.39,1.39,0,0,1,1.38,1.46,1.37,1.37,0,0,1-1.38,1.38A1.42,1.42,0,0,1,10.4,4.23,1.44,1.44,0,0,1,11.78,2.77Z'%20fill='%235a9fd4'%20%3e%3c/path%3e%3cpath%20d='M16.16,31.5a16.4,16.4,0,0,0,3.57-.32c3.17-.57,3.74-1.71,3.74-3.82V24.52H16v-1H26.23a4.73,4.73,0,0,0,4.7-3.74,14.82,14.82,0,0,0,0-7.54c-.57-2.28-1.86-3.82-4-3.82h-2.6v3.41a4.73,4.73,0,0,1-4.63,4.63H12.35a3.72,3.72,0,0,0-3.73,3.73v7.14a4.16,4.16,0,0,0,3.73,3.82A20.49,20.49,0,0,0,16.16,31.5Zm4.06-2.27a1.39,1.39,0,0,1-1.38-1.46,1.37,1.37,0,0,1,1.38-1.38,1.42,1.42,0,0,1,1.38,1.38A1.44,1.44,0,0,1,20.22,29.23Z'%20fill='%23ffd43b'%20%3e%3c/path%3e%3c/svg%3e",O_="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20aria-hidden='true'%20focusable='false'%20role='img'%20width='1em'%20height='1em'%20preserveAspectRatio='xMidYMid%20meet'%20viewBox='0%200%2032%2032'%20%3e%3crect%20width='32'%20height='32'%20fill='%23f7df1e'%3e%3c/rect%3e%3cpath%20d='M21.5,25a3.27,3.27,0,0,0,3,1.83c1.25,0,2-.63,2-1.49,0-1-.81-1.39-2.19-2L23.56,23C21.39,22.1,20,20.94,20,18.49c0-2.25,1.72-4,4.41-4a4.44,4.44,0,0,1,4.27,2.41l-2.34,1.5a2,2,0,0,0-1.93-1.29,1.31,1.31,0,0,0-1.44,1.29c0,.9.56,1.27,1.85,1.83l.75.32c2.55,1.1,4,2.21,4,4.72,0,2.71-2.12,4.19-5,4.19a5.78,5.78,0,0,1-5.48-3.07Zm-10.63.26c.48.84.91,1.55,1.94,1.55s1.61-.39,1.61-1.89V14.69h3V25c0,3.11-1.83,4.53-4.49,4.53a4.66,4.66,0,0,1-4.51-2.75Z'%20%3e%3c/path%3e%3c/svg%3e",{SvelteComponent:I_,append:Re,attr:gt,check_outros:j_,create_component:D_,destroy_component:R_,destroy_each:S_,detach:ve,element:Ze,empty:V_,ensure_array_like:go,flush:on,group_outros:M_,init:z_,insert:$e,mount_component:N_,noop:U_,safe_not_equal:B_,set_data:Ot,set_style:F_,space:Lt,text:Me,toggle_class:vo,transition_in:fn,transition_out:Fn}=window.__gradio__svelte__internal;function $o(l,e,t){const n=l.slice();return n[4]=e[t].label,n[5]=e[t].type,n[6]=e[t].python_type,n[7]=e[t].component,n[8]=e[t].serializer,n[10]=t,n}function H_(l){let e;return{c(){e=Me("1 element")},m(t,n){$e(t,e,n)},p:U_,d(t){t&&ve(e)}}}function G_(l){let e=l[3]=="python"?"tuple":"list",t,n,o=l[1].length+"",i,r;return{c(){t=Me(e),n=Me(" of "),i=Me(o),r=Me(` 52 elements`)},m(_,a){$e(_,t,a),$e(_,n,a),$e(_,i,a),$e(_,r,a)},p(_,a){a&8&&e!==(e=_[3]=="python"?"tuple":"list")&&Ot(t,e),a&2&&o!==(o=_[1].length+"")&&Ot(i,o)},d(_){_&&(ve(t),ve(n),ve(i),ve(r))}}}function bo(l){let e;return{c(){e=Ze("span"),e.textContent=`[${l[10]}]`,gt(e,"class","code svelte-16h224k")},m(t,n){$e(t,e,n)},d(t){t&&ve(e)}}}function Z_(l){let e=l[2][l[10]].type+"",t;return{c(){t=Me(e)},m(n,o){$e(n,t,o)},p(n,o){o&4&&e!==(e=n[2][n[10]].type+"")&&Ot(t,e)},d(n){n&&ve(t)}}}function W_(l){let e=l[6].type+"",t;return{c(){t=Me(e)},m(n,o){$e(n,t,o)},p(n,o){o&2&&e!==(e=n[6].type+"")&&Ot(t,e)},d(n){n&&ve(t)}}}function ko(l){let e,t,n,o,i,r,_,a,s,c=l[4]+"",f,u,p=l[7]+"",b,g,h,d=l[1].length>1&&bo(l);function m(k,w){return k[3]==="python"?W_:Z_}let v=m(l),E=v(l);return{c(){e=Ze("hr"),t=Lt(),n=Ze("div"),o=Ze("p"),d&&d.c(),i=Lt(),r=Ze("span"),E.c(),_=Lt(),a=Ze("p"),s=Me('The output value that appears in the "'),f=Me(c),u=Me('" '),b=Me(p),g=Me(` 53 component.`),h=Lt(),gt(e,"class","hr svelte-16h224k"),gt(r,"class","code highlight svelte-16h224k"),gt(a,"class","desc svelte-16h224k"),F_(n,"margin","10px")},m(k,w){$e(k,e,w),$e(k,t,w),$e(k,n,w),Re(n,o),d&&d.m(o,null),Re(o,i),Re(o,r),E.m(r,null),Re(n,_),Re(n,a),Re(a,s),Re(a,f),Re(a,u),Re(a,b),Re(a,g),Re(n,h)},p(k,w){k[1].length>1?d||(d=bo(k),d.c(),d.m(o,i)):d&&(d.d(1),d=null),v===(v=m(k))&&E?E.p(k,w):(E.d(1),E=v(k),E&&(E.c(),E.m(r,null))),w&2&&c!==(c=k[4]+"")&&Ot(f,c),w&2&&p!==(p=k[7]+"")&&Ot(b,p)},d(k){k&&(ve(e),ve(t),ve(n)),d&&d.d(),E.d()}}}function wo(l){let e,t,n;return t=new fi({props:{margin:!1}}),{c(){e=Ze("div"),D_(t.$$.fragment),gt(e,"class","load-wrap")},m(o,i){$e(o,e,i),N_(t,e,null),n=!0},i(o){n||(fn(t.$$.fragment,o),n=!0)},o(o){Fn(t.$$.fragment,o),n=!1},d(o){o&&ve(e),R_(t)}}}function Q_(l){let e,t,n,o,i,r,_,a;function s(g,h){return g[1].length>1?G_:H_}let c=s(l),f=c(l),u=go(l[1]),p=[];for(let g=0;g<u.length;g+=1)p[g]=ko($o(l,u,g));let b=l[0]&&wo();return{c(){e=Ze("h4"),t=Ze("div"),t.innerHTML='<div class="toggle-dot toggle-right svelte-16h224k"></div>',n=Me(` 54 Returns `),f.c(),o=Lt(),i=Ze("div");for(let g=0;g<p.length;g+=1)p[g].c();r=Lt(),b&&b.c(),_=V_(),gt(t,"class","toggle-icon svelte-16h224k"),gt(e,"class","svelte-16h224k"),vo(i,"hide",l[0])},m(g,h){$e(g,e,h),Re(e,t),Re(e,n),f.m(e,null),$e(g,o,h),$e(g,i,h);for(let d=0;d<p.length;d+=1)p[d]&&p[d].m(i,null);$e(g,r,h),b&&b.m(g,h),$e(g,_,h),a=!0},p(g,[h]){if(c===(c=s(g))&&f?f.p(g,h):(f.d(1),f=c(g),f&&(f.c(),f.m(e,null))),h&14){u=go(g[1]);let d;for(d=0;d<u.length;d+=1){const m=$o(g,u,d);p[d]?p[d].p(m,h):(p[d]=ko(m),p[d].c(),p[d].m(i,null))}for(;d<p.length;d+=1)p[d].d(1);p.length=u.length}(!a||h&1)&&vo(i,"hide",g[0]),g[0]?b?h&1&&fn(b,1):(b=wo(),b.c(),fn(b,1),b.m(_.parentNode,_)):b&&(M_(),Fn(b,1,1,()=>{b=null}),j_())},i(g){a||(fn(b),a=!0)},o(g){Fn(b),a=!1},d(g){g&&(ve(e),ve(o),ve(i),ve(r),ve(_)),f.d(),S_(p,g),b&&b.d(g)}}}function J_(l,e,t){let{is_running:n}=e,{endpoint_returns:o}=e,{js_returns:i}=e,{current_language:r}=e;return l.$$set=_=>{"is_running"in _&&t(0,n=_.is_running),"endpoint_returns"in _&&t(1,o=_.endpoint_returns),"js_returns"in _&&t(2,i=_.js_returns),"current_language"in _&&t(3,r=_.current_language)},[n,o,i,r]}class Y_ extends I_{constructor(e){super(),z_(this,e,J_,Q_,B_,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}get is_running(){return this.$$.ctx[0]}set is_running(e){this.$$set({is_running:e}),on()}get endpoint_returns(){return this.$$.ctx[1]}set endpoint_returns(e){this.$$set({endpoint_returns:e}),on()}get js_returns(){return this.$$.ctx[2]}set js_returns(e){this.$$set({js_returns:e}),on()}get current_language(){return this.$$.ctx[3]}set current_language(e){this.$$set({current_language:e}),on()}}const{SvelteComponent:K_,append:V,attr:Y,bubble:yo,check_outros:vn,create_component:rt,destroy_component:st,destroy_each:Eo,detach:_e,element:te,empty:fl,ensure_array_like:rn,flush:wt,group_outros:$n,init:X_,insert:ce,listen:x_,mount_component:at,safe_not_equal:ec,set_data:Co,set_style:yt,space:pe,src_url_equal:tc,text:ae,transition_in:se,transition_out:be}=window.__gradio__svelte__internal,{onMount:nc,createEventDispatcher:lc}=window.__gradio__svelte__internal;function Ao(l,e,t){const n=l.slice();return n[18]=e[t],n[20]=t,n}function Lo(l,e,t){const n=l.slice();return n[21]=e[t][0],n[22]=e[t][1],n}function qo(l){let e,t,n,o;const i=[ic,oc],r=[];function _(a,s){return a[7]?0:1}return e=_(l),t=r[e]=i[e](l),{c(){t.c(),n=fl()},m(a,s){r[e].m(a,s),ce(a,n,s),o=!0},p(a,s){t.p(a,s)},i(a){o||(se(t),o=!0)},o(a){be(t),o=!1},d(a){a&&_e(n),r[e].d(a)}}}function oc(l){let e,t;return e=new Hs({props:{root:l[0]}}),e.$on("close",l[15]),{c(){rt(e.$$.fragment)},m(n,o){at(e,n,o),t=!0},p(n,o){const i={};o&1&&(i.root=n[0]),e.$set(i)},i(n){t||(se(e.$$.fragment,n),t=!0)},o(n){be(e.$$.fragment,n),t=!1},d(n){st(e,n)}}}function ic(l){let e,t,n,o,i,r,_,a,s,c,f,u,p,b,g,h,d,m,v,E,k,w,$,y,q;t=new ea({props:{root:l[2]||l[0],api_count:l[7]}}),t.$on("close",l[12]);let A=rn(l[8]),L=[];for(let T=0;T<A.length;T+=1)L[T]=Po(Lo(l,A,T));const D=[sc,rc],S=[];function M(T,Q){return T[3].length?0:1}w=M(l),$=S[w]=D[w](l);let R=rn(l[1]),O=[];for(let T=0;T<R.length;T+=1)O[T]=Io(Ao(l,R,T));const K=T=>be(O[T],1,1,()=>{O[T]=null});return{c(){e=te("div"),rt(t.$$.fragment),n=pe(),o=te("div"),i=te("div"),r=te("p"),_=ae("Use the "),a=te("code"),a.textContent="gradio_client",s=pe(),c=te("a"),f=ae("Python library"),u=ae(` or the 55 `),p=te("code"),p.textContent="@gradio/client",b=pe(),g=te("a"),h=ae("Javascript package"),d=ae(` to query the app 56 via API.`),m=pe(),v=te("div"),E=te("div");for(let T=0;T<L.length;T+=1)L[T].c();k=pe(),$.c(),y=pe();for(let T=0;T<O.length;T+=1)O[T].c();Y(e,"class","banner-wrap svelte-17lxwht"),Y(a,"class","library svelte-17lxwht"),Y(c,"href",Gn),Y(c,"target","_blank"),Y(c,"class","svelte-17lxwht"),Y(p,"class","library svelte-17lxwht"),Y(g,"href",Hn),Y(g,"target","_blank"),Y(g,"class","svelte-17lxwht"),Y(i,"class","client-doc svelte-17lxwht"),Y(E,"class","snippets svelte-17lxwht"),Y(v,"class","endpoint svelte-17lxwht"),Y(o,"class","docs-wrap svelte-17lxwht")},m(T,Q){ce(T,e,Q),at(t,e,null),ce(T,n,Q),ce(T,o,Q),V(o,i),V(i,r),V(r,_),V(r,a),V(r,s),V(r,c),V(c,f),V(r,u),V(r,p),V(r,b),V(r,g),V(g,h),V(r,d),V(o,m),V(o,v),V(v,E);for(let ke=0;ke<L.length;ke+=1)L[ke]&&L[ke].m(E,null);V(v,k),S[w].m(v,null),V(v,y);for(let ke=0;ke<O.length;ke+=1)O[ke]&&O[ke].m(v,null);q=!0},p(T,Q){const ke={};if(Q&5&&(ke.root=T[2]||T[0]),t.$set(ke),Q&272){A=rn(T[8]);let U;for(U=0;U<A.length;U+=1){const Be=Lo(T,A,U);L[U]?L[U].p(Be,Q):(L[U]=Po(Be),L[U].c(),L[U].m(E,null))}for(;U<L.length;U+=1)L[U].d(1);L.length=A.length}let We=w;if(w=M(T),w===We?S[w].p(T,Q):($n(),be(S[We],1,1,()=>{S[We]=null}),vn(),$=S[w],$?$.p(T,Q):($=S[w]=D[w](T),$.c()),se($,1),$.m(v,y)),Q&119){R=rn(T[1]);let U;for(U=0;U<R.length;U+=1){const Be=Ao(T,R,U);O[U]?(O[U].p(Be,Q),se(O[U],1)):(O[U]=Io(Be),O[U].c(),se(O[U],1),O[U].m(v,null))}for($n(),U=R.length;U<O.length;U+=1)K(U);vn()}},i(T){if(!q){se(t.$$.fragment,T),se($);for(let Q=0;Q<R.length;Q+=1)se(O[Q]);q=!0}},o(T){be(t.$$.fragment,T),be($),O=O.filter(Boolean);for(let Q=0;Q<O.length;Q+=1)be(O[Q]);q=!1},d(T){T&&(_e(e),_e(n),_e(o)),st(t),Eo(L,T),S[w].d(),Eo(O,T)}}}function Po(l){let e,t,n,o,i=l[21]+"",r,_,a,s,c;function f(){return l[13](l[21])}return{c(){e=te("li"),t=te("img"),o=pe(),r=ae(i),_=pe(),tc(t.src,n=l[22])||Y(t,"src",n),Y(t,"alt",""),Y(t,"class","svelte-17lxwht"),Y(e,"class",a="snippet "+(l[4]===l[21]?"current-lang":"inactive-lang")+" svelte-17lxwht")},m(u,p){ce(u,e,p),V(e,t),V(e,o),V(e,r),V(e,_),s||(c=x_(e,"click",f),s=!0)},p(u,p){l=u,p&16&&a!==(a="snippet "+(l[4]===l[21]?"current-lang":"inactive-lang")+" svelte-17lxwht")&&Y(e,"class",a)},d(u){u&&_e(e),s=!1,c()}}}function rc(l){let e,t,n,o,i,r,_,a,s,c;n=new Za({props:{current_language:l[4]}});let f=l[2]&&To(l);return a=new Xn({props:{size:"sm",variant:"primary",$$slots:{default:[ac]},$$scope:{ctx:l}}}),a.$on("click",l[14]),{c(){e=te("p"),e.textContent="1. Install the client if you don't already have it installed.",t=pe(),rt(n.$$.fragment),o=pe(),i=te("p"),r=ae(`2. Find the API endpoint below corresponding to your desired 57 function in the app. Copy the code snippet, replacing the 58 placeholder values with your own input data. 59 `),f&&f.c(),_=ae(` Or 60 `),rt(a.$$.fragment),s=ae(` 61 to automatically generate your API requests.`),Y(e,"class","padded svelte-17lxwht"),Y(i,"class","padded svelte-17lxwht")},m(u,p){ce(u,e,p),ce(u,t,p),at(n,u,p),ce(u,o,p),ce(u,i,p),V(i,r),f&&f.m(i,null),V(i,_),at(a,i,null),V(i,s),c=!0},p(u,p){const b={};p&16&&(b.current_language=u[4]),n.$set(b),u[2]?f?f.p(u,p):(f=To(u),f.c(),f.m(i,_)):f&&(f.d(1),f=null);const g={};p&33554432&&(g.$$scope={dirty:p,ctx:u}),a.$set(g)},i(u){c||(se(n.$$.fragment,u),se(a.$$.fragment,u),c=!0)},o(u){be(n.$$.fragment,u),be(a.$$.fragment,u),c=!1},d(u){u&&(_e(e),_e(t),_e(o),_e(i)),st(n,u),f&&f.d(),st(a)}}}function sc(l){let e,t,n,o=l[3].length+"",i,r,_,a,s,c,f,u,p,b,g,h,d,m;return p=new P_({props:{current_language:l[4],api_calls:l[3],dependencies:l[1],root:l[2]||l[0],endpoints_info:l[5].named_endpoints}}),{c(){e=te("div"),t=te("p"),n=ae("ðª Recorded API Calls ("),i=ae(o),r=ae(")"),_=pe(),a=te("p"),s=ae(`Here is the code snippet to replay the most recently recorded API 62 calls using the `),c=ae(l[4]),f=ae(` 63 client.`),u=pe(),rt(p.$$.fragment),b=pe(),g=te("p"),g.textContent=`Note: the above list may include extra API calls that affect the 64 UI, but are not necessary for the clients.`,h=pe(),d=te("p"),d.textContent="API Documentation",yt(t,"font-size","var(--text-lg)"),yt(t,"font-weight","bold"),yt(t,"margin","10px 0px"),yt(d,"font-size","var(--text-lg)"),yt(d,"font-weight","bold"),yt(d,"margin","30px 0px 10px")}
64,m(v,E){ce(v,e,E),V(e,t),V(t,n),V(t,i),V(t,r),V(e,_),V(e,a),V(a,s),V(a,c),V(a,f),V(e,u),at(p,e,null),V(e,b),V(e,g),ce(v,h,E),ce(v,d,E),m=!0},p(v,E){(!m||E&8)&&o!==(o=v[3].length+"")&&Co(i,o),(!m||E&16)&&Co(c,v[4]);const k={};E&16&&(k.current_language=v[4]),E&8&&(k.api_calls=v[3]),E&2&&(k.dependencies=v[1]),E&5&&(k.root=v[2]||v[0]),E&32&&(k.endpoints_info=v[5].named_endpoints),p.$set(k)},i(v){m||(se(p.$$.fragment,v),m=!0)},o(v){be(p.$$.fragment,v),m=!1},d(v){v&&(_e(e),_e(h),_e(d)),st(p)}}}function To(l){let e,t,n,o,i;return{c(){e=ae(`If this is a private Space, you may need to pass your 65 Hugging Face token as well (`),t=te("a"),n=ae("read more"),i=ae(")."),Y(t,"href",o=(l[4]=="python"?Gn:Hn)+jo),Y(t,"class","underline svelte-17lxwht"),Y(t,"target","_blank")},m(r,_){ce(r,e,_),ce(r,t,_),V(t,n),ce(r,i,_)},p(r,_){_&16&&o!==(o=(r[4]=="python"?Gn:Hn)+jo)&&Y(t,"href",o)},d(r){r&&(_e(e),_e(t),_e(i))}}}function ac(l){let e;return{c(){e=ae("ðª Use the API Recorder")},m(t,n){ce(t,e,n)},d(t){t&&_e(e)}}}function Oo(l){let e,t,n,o,i,r,_,a;return t=new v_({props:{named:!0,endpoint_parameters:l[5].named_endpoints["/"+l[18].api_name].parameters,dependency:l[18],dependency_index:l[20],current_language:l[4],root:l[2]||l[0]}}),o=new va({props:{endpoint_returns:l[5].named_endpoints["/"+l[18].api_name].parameters,js_returns:l[6].named_endpoints["/"+l[18].api_name].parameters,is_running:Do,current_language:l[4]}}),r=new Y_({props:{endpoint_returns:l[5].named_endpoints["/"+l[18].api_name].returns,js_returns:l[6].named_endpoints["/"+l[18].api_name].returns,is_running:Do,current_language:l[4]}}),{c(){e=te("div"),rt(t.$$.fragment),n=pe(),rt(o.$$.fragment),i=pe(),rt(r.$$.fragment),_=pe(),Y(e,"class","endpoint-container svelte-17lxwht")},m(s,c){ce(s,e,c),at(t,e,null),V(e,n),at(o,e,null),V(e,i),at(r,e,null),V(e,_),a=!0},p(s,c){const f={};c&34&&(f.endpoint_parameters=s[5].named_endpoints["/"+s[18].api_name].parameters),c&2&&(f.dependency=s[18]),c&16&&(f.current_language=s[4]),c&5&&(f.root=s[2]||s[0]),t.$set(f);const u={};c&34&&(u.endpoint_returns=s[5].named_endpoints["/"+s[18].api_name].parameters),c&66&&(u.js_returns=s[6].named_endpoints["/"+s[18].api_name].parameters),c&16&&(u.current_language=s[4]),o.$set(u);const p={};c&34&&(p.endpoint_returns=s[5].named_endpoints["/"+s[18].api_name].returns),c&66&&(p.js_returns=s[6].named_endpoints["/"+s[18].api_name].returns),c&16&&(p.current_language=s[4]),r.$set(p)},i(s){a||(se(t.$$.fragment,s),se(o.$$.fragment,s),se(r.$$.fragment,s),a=!0)},o(s){be(t.$$.fragment,s),be(o.$$.fragment,s),be(r.$$.fragment,s),a=!1},d(s){s&&_e(e),st(t),st(o),st(r)}}}function Io(l){let e,t,n=l[18].show_api&&Oo(l);return{c(){n&&n.c(),e=fl()},m(o,i){n&&n.m(o,i),ce(o,e,i),t=!0},p(o,i){o[18].show_api?n?(n.p(o,i),i&2&&se(n,1)):(n=Oo(o),n.c(),se(n,1),n.m(e.parentNode,e)):n&&($n(),be(n,1,1,()=>{n=null}),vn())},i(o){t||(se(n),t=!0)},o(o){be(n),t=!1},d(o){o&&_e(e),n&&n.d(o)}}}function _c(l){let e,t,n=l[5]&&qo(l);return{c(){n&&n.c(),e=fl()},m(o,i){n&&n.m(o,i),ce(o,e,i),t=!0},p(o,[i]){o[5]?n?(n.p(o,i),i&32&&se(n,1)):(n=qo(o),n.c(),se(n,1),n.m(e.parentNode,e)):n&&($n(),be(n,1,1,()=>{n=null}),vn())},i(o){t||(se(n),t=!0)},o(o){be(n),t=!1},d(o){o&&_e(e),n&&n.d(o)}}}const Hn="https://www.gradio.app/guides/getting-started-with-the-js-client",Gn="https://www.gradio.app/guides/getting-started-with-the-python-client",jo="#connecting-to-a-hugging-face-space";let Do=!1;function cc(l,e,t){let{dependencies:n}=e,{root:o}=e,{app:i}=e,{space_id:r}=e,{root_node:_}=e,a=n.filter(k=>k.show_api).length;o===""&&(o=location.protocol+"//"+location.host+location.pathname),o.endsWith("/")||(o+="/");let{api_calls:s=[]}=e,c="python";const f=[["python",T_],["javascript",O_]];async function u(){return await(await fetch(o+"info")).json()}async function p(){return await i.view_api()}let b,g;u().then(k=>{t(5,b=k)}),p().then(k=>{t(6,g=k)});const h=lc();nc(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));function d(k){yo.call(this,l,k)}const m=k=>t(4,c=k),v=()=>h("close",{api_recorder_visible:!0});function E(k){yo.call(this,l,k)}return l.$$set=k=>{"dependencies"in k&&t(1,n=k.dependencies),"root"in k&&t(0,o=k.root),"app"in k&&t(10,i=k.app),"space_id"in k&&t(2,r=k.space_id),"root_node"in k&&t(11,_=k.root_node),"api_calls"in k&&t(3,s=k.api_calls)},[o,n,r,s,c,b,g,a,f,h,i,_,d,m,v,E]}class uc extends K_{constructor(e){super(),X_(this,e,cc,_c,ec,{dependencies:1,root:0,app:10,space_id:2,root_node:11,api_calls:3})}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),wt()}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),wt()}get app(){return this.$$.ctx[10]}set app(e){this.$$set({app:e}),wt()}get space_id(){return this.$$.ctx[2]}set space_id(e){this.$$set({space_id:e}),wt()}get root_node(){return this.$$.ctx[11]}set root_node(e){this.$$set({root_node:e}),wt()}get api_calls(){return this.$$.ctx[3]}set api_calls(e){this.$$set({api_calls:e}),wt()}}const{SvelteComponent:fc,append:ut,attr:pn,detach:Zn,element:Wn,flush:Ro,init:pc,insert:Qn,noop:So,safe_not_equal:dc,set_data:Ii,text:ft}=window.__gradio__svelte__internal;function Vo(l){let e,t,n,o=l[1][l[0][l[0].length-1].fn_index].api_name+"",i;return{c(){e=ft("| "),t=Wn("span"),n=ft("/"),i=ft(o),pn(t,"class","api-name svelte-3xfzl5")},m(r,_){Qn(r,e,_),Qn(r,t,_),ut(t,n),ut(t,i)},p(r,_){_&3&&o!==(o=r[1][r[0][r[0].length-1].fn_index].api_name+"")&&Ii(i,o)},d(r){r&&(Zn(e),Zn(t))}}}function mc(l){let e,t,n,o,i=l[0].length+"",r,_,a=l[0].length>0&&Vo(l);return{c(){e=Wn("div"),t=ft("ð "),n=Wn("span"),n.textContent="Recording API Calls...",o=ft(` 66 (`),r=ft(i),_=ft(") "),a&&a.c(),pn(n,"class","message svelte-3xfzl5"),pn(e,"id","api-recorder"),pn(e,"class","svelte-3xfzl5")},m(s,c){Qn(s,e,c),ut(e,t),ut(e,n),ut(e,o),ut(e,r),ut(e,_),a&&a.m(e,null)},p(s,[c]){c&1&&i!==(i=s[0].length+"")&&Ii(r,i),s[0].length>0?a?a.p(s,c):(a=Vo(s),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i:So,o:So,d(s){s&&Zn(e),a&&a.d()}}}function hc(l,e,t){let{api_calls:n=[]}=e,{dependencies:o}=e;return l.$$set=i=>{"api_calls"in i&&t(0,n=i.api_calls),"dependencies"in i&&t(1,o=i.dependencies)},[n,o]}class gc extends fc{constructor(e){super(),pc(this,e,hc,mc,dc,{api_calls:0,dependencies:1})}get api_calls(){return this.$$.ctx[0]}set api_calls(e){this.$$set({api_calls:e}),Ro()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),Ro()}}const Mo=rr(pi),{SvelteComponent:vc,add_flush_callback:$c,assign:bn,bind:zo,binding_callbacks:Jn,bubble:bc,check_outros:kc,compute_rest_props:No,construct_svelte_component:Uo,create_component:Bo,create_slot:wc,destroy_component:Fo,detach:yc,empty:Ec,exclude_internal_props:Cc,flush:Ge,get_all_dirty_from_scope:Ac,get_slot_changes:Lc,get_spread_object:Ho,get_spread_update:Go,group_outros:qc,init:Pc,insert:Tc,mount_component:Zo,not_equal:Oc,transition_in:Yn,transition_out:Kn,update_slot_base:Ic}=window.__gradio__svelte__internal,{bind:jc,binding_callbacks:Dc}=window.__gradio__svelte__internal;function Rc(l){let e;const t=l[12].default,n=wc(t,l,l[16],null);return{c(){n&&n.c()},m(o,i){n&&n.m(o,i),e=!0},p(o,i){n&&n.p&&(!e||i&65536)&&Ic(n,t,o,o[16],e?Lc(t,o[16],i,null):Ac(o[16]),null)},i(o){e||(Yn(n,o),e=!0)},o(o){Kn(n,o),e=!1},d(o){n&&n.d(o)}}}function Sc(l){let e,t,n,o;const i=[{elem_id:l[6]},{elem_classes:l[7]},{target:l[3]},l[9],{theme_mode:l[4]},{root:l[2]},{gradio:l[5]}];function r(s){l[14](s)}var _=l[8];function a(s,c){let f={$$slots:{default:[Rc]},$$scope:{ctx:s}};for(let u=0;u<i.length;u+=1)f=bn(f,i[u]);return c!==void 0&&c&764&&(f=bn(f,Go(i,[c&64&&{elem_id:s[6]},c&128&&{elem_classes:s[7]},c&8&&{target:s[3]},c&512&&Ho(s[9]),c&16&&{theme_mode:s[4]},c&4&&{root:s[2]},c&32&&{gradio:s[5]}]))),s[1]!==void 0&&(f.value=s[1]),{props:f}}return _&&(e=Uo(_,a(l)),l[13](e),Jn.push(()=>zo(e,"value",r)),e.$on("prop_change",l[15])),{c(){e&&Bo(e.$$.fragment),n=Ec()},m(s,c){e&&Zo(e,s,c),Tc(s,n,c),o=!0},p(s,[c]){if(_!==(_=s[8])){if(e){qc();const f=e;Kn(f.$$.fragment,1,0,()=>{Fo(f,1)}),kc()}_?(e=Uo(_,a(s,c)),s[13](e),Jn.push(()=>zo(e,"value",r)),e.$on("prop_change",s[15]),Bo(e.$$.fragment),Yn(e.$$.fragment,1),Zo(e,n.parentNode,n)):e=null}else if(_){const f=c&764?Go(i,[c&64&&{elem_id:s[6]},c&128&&{elem_classes:s[7]},c&8&&{target:s[3]},c&512&&Ho(s[9]),c&16&&{theme_mode:s[4]},c&4&&{root:s[2]},c&32&&{gradio:s[5]}]):{};c&65536&&(f.$$scope={dirty:c,ctx:s}),!t&&c&2&&(t=!0,f.value=s[1],$c(()=>t=!1)),e.$set(f)}},i(s){o||(e&&Yn(e.$$.fragment,s),o=!0)},o(s){e&&Kn(e.$$.fragment,s),o=!1},d(s){s&&yc(n),l[13](null),e&&Fo(e,s)}}}function Vc(l,e,t){const n=["root","component","target","theme_mode","instance","value","gradio","elem_id","elem_classes","_id"];let o=No(e,n),{$$slots:i={},$$scope:r}=e,{root:_}=e,{component:a}=e,{target:s}=e,{theme_mode:c}=e,{instance:f}=e,{value:u}=e,{gradio:p}=e,{elem_id:b}=e,{elem_classes:g}=e,{_id:h}=e;const d=($,y,q)=>new CustomEvent("prop_change",{detail:{id:$,prop:y,value:q}});function m($){return new Proxy($,{construct(q,A){const L=new q(...A),D=Object.keys(L.$$.props);function S(M){return function(R){const O=d(h,M,R);s.dispatchEvent(O)}}return D.forEach(M=>{Dc.push(()=>jc(L,M,S(M)))}),L}})}const v=m(a);function E($){Jn[$?"unshift":"push"](()=>
vendor: 6,630 bytes, line 66
66{f=$,t(0,f)})}function k($){u=$,t(1,u)}function w($){bc.call(this,l,$)}return l.$$set=$=>{e=bn(bn({},e),Cc($)),t(9,o=No(e,n)),"root"in $&&t(2,_=$.root),"component"in $&&t(10,a=$.component),"target"in $&&t(3,s=$.target),"theme_mode"in $&&t(4,c=$.theme_mode),"instance"in $&&t(0,f=$.instance),"value"in $&&t(1,u=$.value),"gradio"in $&&t(5,p=$.gradio),"elem_id"in $&&t(6,b=$.elem_id),"elem_classes"in $&&t(7,g=$.elem_classes),"_id"in $&&t(11,h=$._id),"$$scope"in $&&t(16,r=$.$$scope)},[f,u,_,s,c,p,b,g,v,o,a,h,i,E,k,w,r]}class Mc extends vc{constructor(e){super(),Pc(this,e,Vc,Sc,Oc,{root:2,component:10,target:3,theme_mode:4,instance:0,value:1,gradio:5,elem_id:6,elem_classes:7,_id:11})}get root(){return this.$$.ctx[2]}set root(e){this.$$set({root:e}),Ge()}get component(){return this.$$.ctx[10]}set component(e){this.$$set({component:e}),Ge()}get target(){return this.$$.ctx[3]}set target(e){this.$$set({target:e}),Ge()}get theme_mode(){return this.$$.ctx[4]}set theme_mode(e){this.$$set({theme_mode:e}),Ge()}get instance(){return this.$$.ctx[0]}set instance(e){this.$$set({instance:e}),Ge()}get value(){return this.$$.ctx[1]}set value(e){this.$$set({value:e}),Ge()}get gradio(){return this.$$.ctx[5]}set gradio(e){this.$$set({gradio:e}),Ge()}get elem_id(){return this.$$.ctx[6]}set elem_id(e){this.$$set({elem_id:e}),Ge()}get elem_classes(){return this.$$.ctx[7]}set elem_classes(e){this.$$set({elem_classes:e}),Ge()}get _id(){return this.$$.ctx[11]}set _id(e){this.$$set({_id:e}),Ge()}}const{SvelteComponent:zc,add_flush_callback:Wo,assign:Nc,bind:Qo,binding_callbacks:Jo,bubble:Yo,check_outros:ji,create_component:Di,destroy_component:Ri,detach:pl,empty:dl,ensure_array_like:Ko,flush:Je,get_spread_object:Uc,get_spread_update:Bc,group_outros:Si,init:Fc,insert:ml,mount_component:Vi,outro_and_destroy_block:Hc,safe_not_equal:Gc,transition_in:Pt,transition_out:Wt,update_keyed_each:Zc}=window.__gradio__svelte__internal,{onMount:Wc,createEventDispatcher:Qc,setContext:Jc}=window.__gradio__svelte__internal;function Xo(l,e,t){const n=l.slice();return n[15]=e[t],n}function xo(l){let e=[],t=new Map,n,o,i=Ko(l[0].children);const r=_=>_[15].id;for(let _=0;_<i.length;_+=1){let a=Xo(l,i,_),s=r(a);t.set(s,e[_]=ei(s,a))}return{c(){for(let _=0;_<e.length;_+=1)e[_].c();n=dl()},m(_,a){for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(_,a);ml(_,n,a),o=!0},p(_,a){a&207&&(i=Ko(_[0].children),Si(),e=Zc(e,a,r,1,_,i,t,n.parentNode,Hc,ei,n,Xo),ji())},i(_){if(!o){for(let a=0;a<i.length;a+=1)Pt(e[a]);o=!0}},o(_){for(let a=0;a<e.length;a+=1)Wt(e[a]);o=!1},d(_){_&&pl(n);for(let a=0;a<e.length;a+=1)e[a].d(_)}}}function ei(l,e){let t,n,o;return n=new Mi({props:{node:e[15],component:e[15].component,target:e[2],id:e[15].id,root:e[1],theme_mode:e[3],max_file_size:e[6],client:e[7]}}),n.$on("destroy",e[9]),n.$on("mount",e[10]),{key:l,first:null,c(){t=dl(),Di(n.$$.fragment),this.first=t},m(i,r){ml(i,t,r),Vi(n,i,r),o=!0},p(i,r){e=i;const _={};r&1&&(_.node=e[15]),r&1&&(_.component=e[15].component),r&4&&(_.target=e[2]),r&1&&(_.id=e[15].id),r&2&&(_.root=e[1]),r&8&&(_.theme_mode=e[3]),r&64&&(_.max_file_size=e[6]),r&128&&(_.client=e[7]),n.$set(_)},i(i){o||(Pt(n.$$.fragment,i),o=!0)},o(i){Wt(n.$$.fragment,i),o=!1},d(i){i&&pl(t),Ri(n,i)}}}function Yc(l){let e,t,n=l[0].children&&l[0].children.length&&xo(l);return{c(){n&&n.c(),e=dl()},m(o,i){n&&n.m(o,i),ml(o,e,i),t=!0},p(o,i){o[0].children&&o[0].children.length?n?(n.p(o,i),i&1&&Pt(n,1)):(n=xo(o),n.c(),Pt(n,1),n.m(e.parentNode,e)):n&&(Si(),Wt(n,1,1,()=>{n=null}),ji())},i(o){t||(Pt(n),t=!0)},o(o){Wt(n),t=!1},d(o){o&&pl(e),n&&n.d(o)}}}function Kc(l){let e,t,n,o;const i=[{_id:l[0].id},{component:l[0].component},{elem_id:"elem_id"in l[0].props&&l[0].props.elem_id||`component-${l[0].id}`},{elem_classes:"elem_classes"in l[0].props&&l[0].props.elem_classes||[]},{target:l[2]},l[0].props,{theme_mode:l[3]},{root:l[1]},{gradio:new Tl(l[0].id,l[2],l[3],l[4],l[1],l[5],l[6],Mo,l[7])}];function r(s){l[11](s)}function _(s){l[12](s)}let a={$$slots:{default:[Yc]},$$scope:{ctx:l}};for(let s=0;s<i.length;s+=1)a=Nc(a,i[s]);return l[0].instance!==void 0&&(a.instance=l[0].instance),l[0].props.value!==void 0&&(a.value=l[0].props.value),e=new Mc({props:a}),Jo.push(()=>Qo(e,"instance",r)),Jo.push(()=>Qo(e,"value",_)),{c(){Di(e.$$.fragment)},m(s,c){Vi(e,s,c),o=!0},p(s,[c]){const f=c&255?Bc(i,[c&1&&{_id:s[0].id},c&1&&{component:s[0].component},c&1&&{elem_id:"elem_id"in s[0].props&&s[0].props.elem_id||`component-${s[0].id}`},c&1&&{elem_classes:"elem_classes"in s[0].props&&s[0].props.elem_classes||[]},c&4&&{target:s[2]},c&1&&Uc(s[0].props),c&8&&{theme_mode:s[3]},c&2&&{root:s[1]},{gradio:new Tl(s[0].id,s[2],s[3],s[4],s[1],s[5],s[6],Mo,s[7])}]):{};c&262351&&(f.$$scope={dirty:c,ctx:s}),!t&&c&1&&(t=!0,f.instance=s[0].instance,Wo(()=>t=!1)),!n&&c&1&&(n=!0,f.value=s[0].props.value,Wo(()=>n=!1)),e.$set(f)},i(s){o||(Pt(e.$$.fragment,s),o=!0)},o(s){Wt(e.$$.fragment,s),o=!1},d(s){Ri(e,s)}}}function Xc(l,e,t){let{root:n}=e,{node:o}=e,{parent:i=null}=e,{target:r}=e,{theme_mode:_}=e,{version:a}=e,{autoscroll:s}=e,{max_file_size:c}=e,{client:f}=e;const u=Qc();let p=[];Wc(()=>{u("mount",o.id);for(const m of p)u("mount",m.id);return()=>{u("destroy",o.id);for(const m of p)u("mount",m.id)}}),Jc("BLOCK_KEY",i);function b(m){Yo.call(this,l,m)}function g(m){Yo.call(this,l,m)}function h(m){l.$$.not_equal(o.instance,m)&&(o.instance=m,t(0,o),t(14,p))}function d(m){l.$$.not_equal(o.props.value,m)&&(o.props.value=m,t(0,o),t(14,p))}return l.$$set=m=>{"root"in m&&t(1,n=m.root),"node"in m&&t(0,o=m.node),"parent"in m&&t(8,i=m.parent),"target"in m&&t(2,r=m.target),"theme_mode"in m&&t(3,_=m.theme_mode),"version"in m&&t(4,a=m.version),"autoscroll"in m&&t(5,s=m.autoscroll),"max_file_size"in m&&t(6,c=m.max_file_size),"client"in m&&t(7,f=m.client)},l.$$.update=()=>{l.$$.dirty&1&&t(0,o.children=o.children&&o.children.filter(m=>{const v=o.type!=="statustracker";return v||p.push(m),v}),o),l.$$.dirty&1&&o.type==="form"&&(o.children?.every(m=>!m.props.visible)?t(0,o.props.visible=!1,o):t(0,o.props.visible=!0,o))},[o,n,r,_,a,s,c,f,i,b,g,h,d]}class Mi extends zc{constructor(e){super(),Fc(this,e,Xc,Kc,Gc,{root:1,node:0,parent:8,target:2,theme_mode:3,version:4,autoscroll:5,max_file_size:6,client:7})}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),Je()}get node(){return this.$$.ctx[0]}set node(e){this.$$set({node:e}),Je()}get parent(){return this.$$.ctx[8]}set parent(e){this.$$set({parent:e}),Je()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),Je()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),Je()}get version(){return this.$$.ctx[4]}
66set version(e){this.$$set({version:e}),Je()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),Je()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),Je()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),Je()}}const{SvelteComponent:xc,create_component:eu,destroy_component:tu,flush:lt,init:nu,mount_component:lu,safe_not_equal:ou,transition_in:iu,transition_out:ru}=window.__gradio__svelte__internal,{onMount:su,createEventDispatcher:au}=window.__gradio__svelte__internal;function _u(l){let e,t;return e=new Mi({props:{node:l[0],root:l[1],target:l[2],theme_mode:l[3],version:l[4],autoscroll:l[5],max_file_size:l[6],client:l[7]}}),{c(){eu(e.$$.fragment)},m(n,o){lu(e,n,o),t=!0},p(n,[o]){const i={};o&1&&(i.node=n[0]),o&2&&(i.root=n[1]),o&4&&(i.target=n[2]),o&8&&(i.theme_mode=n[3]),o&16&&(i.version=n[4]),o&32&&(i.autoscroll=n[5]),o&64&&(i.max_file_size=n[6]),o&128&&(i.client=n[7]),e.$set(i)},i(n){t||(iu(e.$$.fragment,n),t=!0)},o(n){ru(e.$$.fragment,n),t=!1},d(n){tu(e,n)}}}function cu(l,e,t){let{rootNode:n}=e,{root:o}=e,{target:i}=e,{theme_mode:r}=e,{version:_}=e,{autoscroll:a}=e,{max_file_size:s=null}=e,{client:c}=e;const f=au();return su(()=>{f("mount")}),l.$$set=u=>{"rootNode"in u&&t(0,n=u.rootNode),"root"in u&&t(1,o=u.root),"target"in u&&t(2,
vendor: 7,973 bytes, line 66
66i=u.target),"theme_mode"in u&&t(3,r=u.theme_mode),"version"in u&&t(4,_=u.version),"autoscroll"in u&&t(5,a=u.autoscroll),"max_file_size"in u&&t(6,s=u.max_file_size),"client"in u&&t(7,c=u.client)},[n,o,i,r,_,a,s,c]}class uu extends xc{constructor(e){super(),nu(this,e,cu,_u,ou,{rootNode:0,root:1,target:2,theme_mode:3,version:4,autoscroll:5,max_file_size:6,client:7})}get rootNode(){return this.$$.ctx[0]}set rootNode(e){this.$$set({rootNode:e}),lt()}get root(){return this.$$.ctx[1]}set root(e){this.$$set({root:e}),lt()}get target(){return this.$$.ctx[2]}set target(e){this.$$set({target:e}),lt()}get theme_mode(){return this.$$.ctx[3]}set theme_mode(e){this.$$set({theme_mode:e}),lt()}get version(){return this.$$.ctx[4]}set version(e){this.$$set({version:e}),lt()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),lt()}get max_file_size(){return this.$$.ctx[6]}set max_file_size(e){this.$$set({max_file_size:e}),lt()}get client(){return this.$$.ctx[7]}set client(e){this.$$set({client:e}),lt()}}const fu="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='576'%20height='576'%20viewBox='0%200%20576%20576'%20fill='none'%3e%3cpath%20d='M287.5%20229L86%20344.5L287.5%20460L489%20344.5L287.5%20229Z'%20stroke='url(%23paint0_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M287.5%20116L86%20231.5L287.5%20347L489%20231.5L287.5%20116Z'%20stroke='url(%23paint1_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M86%20344L288%20229'%20stroke='url(%23paint2_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='bevel'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_102_7'%20x1='60'%20y1='341'%20x2='429.5'%20y2='344'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_102_7'%20x1='513.5'%20y1='231'%20x2='143.5'%20y2='231'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_102_7'%20x1='60'%20y1='344'%20x2='428.987'%20y2='341.811'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",pu={accordion:{component:()=>P(()=>import("./Index-D2AsQL-M.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)},annotatedimage:{component:()=>P(()=>import("./Index-B9I_HjI8.js"),__vite__mapDeps([11,1,2,3,4,5,6,7,12,13,14,15,16]),import.meta.url)},audio:{example:()=>P(()=>import("./Example-uQ8MuYg6.js"),__vite__mapDeps([17,18]),import.meta.url),component:()=>P(()=>import("./index-DccmrmJo.js"),__vite__mapDeps([19,2,3,4,5,6,12,13,20,21,15,22,23,24,25,26,27,28,29,1,7,30,17,18,31]),import.meta.url)},box:{component:()=>P(()=>import("./Index-DJURn4Ts.js"),__vite__mapDeps([32,1,2,3,4,5,6,7]),import.meta.url)},button:{component:()=>P(()=>import("./Index-BdW76j1J.js"),__vite__mapDeps([33,3,4,1,2,5,6,7]),import.meta.url)},chatbot:{component:()=>P(()=>import("./Index-DjLwJMl5.js"),__vite__mapDeps([34,2,3,4,5,6,35,20,15,36,37,38,39,40,41,42,43,44,45,46,1,7,12,47]),import.meta.url)},checkbox:{example:()=>P(()=>import("./Example-CZ-iEz1g.js"),__vite__mapDeps([48,18]),import.meta.url),component:()=>P(()=>import("./Index-Dhqe045d.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,50,51]),import.meta.url)},checkboxgroup:{example:()=>P(()=>import("./Example-CRm1Pmw_.js"),__vite__mapDeps([52,18]),import.meta.url),component:()=>P(()=>import("./Index-BpiLhjRh.js"),__vite__mapDeps([53,1,2,3,4,5,6,7,54,50,55]),import.meta.url)},code:{example:()=>P(()=>import("./Example-Wp-_4AVX.js"),__vite__mapDeps([56,57]),import.meta.url),component:()=>P(()=>import("./Index-B3UbNYkm.js").then(l=>l.F),__vite__mapDeps([58,3,4,1,2,5,6,7,45,46,21,15,12,13,56,57,59]),import.meta.url)},colorpicker:{example:()=>P(()=>import("./Example-BaLyJYAe.js"),__vite__mapDeps([60,61]),import.meta.url),component:()=>P(()=>import("./Index-_MTVy9w9.js"),__vite__mapDeps([62,2,3,4,5,6,54,50,1,7,60,61,63]),import.meta.url)},column:{component:()=>P(()=>import("./Index-INgKs-Lw.js"),__vite__mapDeps([8,9]),import.meta.url)},dataframe:{example:()=>P(()=>import("./Example-CMXuI9oj.js"),__vite__mapDeps([64,65]),import.meta.url),component:()=>P(()=>import("./Index-BzA0_rB5.js"),__vite__mapDeps([66,1,2,3,4,5,6,7,35,25,26,40,41,42,43,44,67,64,65,68]),import.meta.url)},dataset:{component:()=>P(()=>import("./Index-ChHX0jbM.js"),__vite__mapDeps([69,1,2,3,4,5,6,7,70]),import.meta.url)},downloadbutton:{component:()=>P(()=>import("./Index-tc_ecte1.js"),__vite__mapDeps([71,3,4,1,2,5,6,7,72]),import.meta.url)},dropdown:{example:()=>P(()=>import("./Example-CUwox43B.js"),__vite__mapDeps([73,18]),import.meta.url),component:()=>P(()=>import("./Index-fVreL1ZO.js"),__vite__mapDeps([74,2,3,4,5,6,54,50,75,1,7,73,18,76]),import.meta.url)},file:{example:()=>P(()=>import("./Example-DrmWnoSo.js"),__vite__mapDeps([77,78]),import.meta.url),component:()=>P(()=>import("./Index-C0tC0Pte.js"),__vite__mapDeps([79,80,2,3,4,5,6,12,13,81,25,26,27,21,15,24,82,1,7,30,29,77,78]),import.meta.url)},fileexplorer:{example:()=>P(()=>import("./Example-CIFMxn5c.js"),__vite__mapDeps([83,84]),import.meta.url),component:()=>P(()=>import("./Index-BqphDpxa.js"),__vite__mapDeps([85,2,3,4,5,6,81,1,7,12,86]),import.meta.url)},form:{component:()=>P(()=>import("./Index-DDCF2BFd.js"),__vite__mapDeps([87,88]),import.meta.url)},gallery:{component:()=>P(()=>import("./Index-gzkVfu-B.js"),__vite__mapDeps([89,1,2,3,4,5,6,7,30,29,12,13,20,21,15,14,25,26,27,24,36,37,80,81,82,90,78]),import.meta.url)},group:{component:()=>P(()=>import("./Index-CS2xVf8J.js"),__vite__mapDeps([91,92]),import.meta.url)},highlightedtext:{component:()=>P(()=>import("./Index-DQPF3D7U.js"),__vite__mapDeps([93,94,2,3,4,5,6,1,7,12,13,95]),import.meta.url)},html:{example:()=>P(()=>import("./Example-C2a4WxRl.js"),__vite__mapDeps([96,97]),import.meta.url),component:()=>P(()=>import("./Index-Cax1_EmX.js"),__vite__mapDeps([98,2,3,4,5,6,1,7,99]),import.meta.url)},image:{example:()=>P(()=>import("./Example-Y4D4nw3U.js"),__vite__mapDeps([100,36,15,2,3,4,5,6,37,101]),import.meta.url),component:()=>P(()=>import("./Index-Dr6wQYLB.js"),__vite__mapDeps([102,103,2,3,4,5,6,12,13,20,21,15,14,36,37,28,29,75,1,7,25,26,104,30,100,101]),import.meta.url)},imageeditor:{example:()=>P(()=>import("./Example-CLB6_2SI.js"),__vite__mapDeps([105,103,2,3,4,5,6,12,13,20,21,15,14,36,37,28,29,75,1,7,25,26,104,106,101]),import.meta.url),component:()=>P(()=>import("./Index-YhvySncB.js"),__vite__mapDeps([107,103,2,3,4,5,6,12,13,20,21,15,14,36,37,28,29,75,1,7,25,26,104,108,109,45,24,110,101]),import.meta.url)},json:{component:()=>P(()=>import("./Index-CaAHF3z4.js"),__vite__mapDeps([111,1,2,3,4,5,6,7,45,46,13,12,112]),import.meta.url)},label:{component:()=>P(()=>import("./Index-D14Box8F.js"),__vite__mapDeps([113,2,3,4,5,6,1,7,12,13,114]),import.meta.url)},markdown:{example:()=>P(()=>import("./Example-BqEWIP3s.js"),__vite__mapDeps([115,41,5,42,43]),import.meta.url),component:()=>P(()=>import("./Index-CS_1SGa0.js"),__vite__mapDeps([116,40,2,3,4,5,6,41,42,43,44,1,7,115]),import.meta.url)},model3d:{example:()=>P(()=>import("./Example-BQyGztrG.js"),__vite__mapDeps([117,18]),import.meta.url),component:()=>P(()=>import("./Index-DdkpMFsS.js"),__vite__mapDeps([118,3,4,2,5,6,12,21,15,81,24,25,26,27,1,7,13,30,29,117,18,119]),import.meta.url)},multimodaltextbox:{example:()=>P(()=>import("./Example-DyveILOA.js"),__vite__mapDeps([120,36,15,2,3,4,5,6,37,121]),import.meta.url),component:()=>P(()=>import("./Index-B-lWCeyk.js"),__vite__mapDeps([122,2,3,4,5,6,54,50,81,22,123,25,26,36,15,37,1,7,120,121,124]),import.meta.url)},number:{example:()=>P(()=>import("./Example-CqL1e7EB.js"),__vite__mapDeps([125,18]),import.meta.url),component:()=>P(()=>import("./Index-CLf7klc7.js"),__vite__mapDeps([126,1,2,3,4,5,6,7,54,50,127
66]),import.meta.url)},paramviewer:{example:()=>P(()=>import("./Example-C9__vDgN.js"),__vite__mapDeps([128,18]),import.meta.url),component:()=>P(()=>import("./Index-nnxQxgsk.js"),__vite__mapDeps([129,42,5,130]),import.meta.url)},plot:{component:()=>P(()=>import("./Index-JC7evlol.js"),__vite__mapDeps([131,5,2,3,4,6,94,67,13,1,7,12,132]),import.meta.url)},radio:{example:()=>P(()=>import("./Example-BoMLuz1A.js"),__vite__mapDeps([133,18]),import.meta.url),component:()=>P(()=>import("./Index-mcP82pjK.js"),__vite__mapDeps([134,1,2,3,4,5,6,7,54,50,133,18,135]),import.meta.url)},row:{component:()=>P(()=>import("./Index-DPQUg1KC.js"),__vite__mapDeps([136,137]),import.meta.url)},slider:{example:()=>P(()=>import("./Example-BrizabXh.js"),__vite__mapDeps([138,18]),import.meta.url),component:()=>P(()=>import("./Index-BRdUM3i_.js"),__vite__mapDeps([139,1,2,3,4,5,6,7,54,50,140]),import.meta.url)},state:{component:()=>P(()=>import("./Index-uRgjJb4U.js"),[],import.meta.url)},statustracker:{component:()=>P(()=>import("./index-ON6nH-xE.js"),__vite__mapDeps([141,2,3,4,5,6,1,7]),import.meta.url)},tabitem:{component:()=>P(()=>import("./Index-C9rTb3Lb.js"),__vite__mapDeps([142,143,2,3,4,5,6,144,8,9,145]),import.meta.url)},tabs:{component:()=>P(()=>import("./Index-NZ-JEwIG.js"),__vite__mapDeps([146,143,2,3,4,5,6,144]),import.meta.url)},textbox:{example:()=>P(()=>import("./Example-C7XUkkid.js"),__vite__mapDeps([147,148]),import.meta.url),component:()=>P(()=>import("./Index-LGPOjayw.js"),__vite__mapDeps([149,150,2,3,4,5,6,54,50,45,46,1,7,151,147,148]),import.meta.url)},uploadbutton:{component:()=>P(()=>import("./Index-Ovj0mbDy.js"),__vite__mapDeps([152,3,4,1,2,5,6,7,153]),import.meta.url)},video:{example:()=>P(()=>import("./Example-DFEtaHl0.js"),__vite__mapDeps([154,38,15,2,3,4,5,6,39,155]),import.meta.url),component:()=>P(()=>import("./index-C8G63eG1.js"),__vite__mapDeps([156,25,3,4,2,5,6,26,27,21,15,24,12,123,28,29,103,13,20,14,36,37,75,1,7,104,38,39,23,154,155,30,157,101]),import.meta.url)}},ot={};function ti({api_url:l,name:e,id:t,variant:n}){const o=window.__GRADIO__CC__,i={...pu,...o||{}};if(ot[`${t}-${n}`])return{component:ot[`${t}-${n}`],name:e};try{if(!i?.[t]?.[n]&&!i?.[e]?.[n])throw new Error;return ot[`${t}-${n}`]=(i?.[t]?.[n]||i?.[e]?.[n])(),{name:e,component:ot[`${t}-${n}`]}}catch{try{return ot[`${t}-${n}`]=mu(l,t,n),{name:e,component:ot[`${t}-${n}`]}}catch(_){if(n==="example")return ot[`${t}-${n}`]=P(()=>import("./Example-DxdiEFS_.js"),__vite__mapDeps([158,18]),import.meta.url),{name:e,component:ot[`${t}-${n}`]};throw console.error(`failed to load: ${e}`),console.error(_),_}}}function du(l){return new Promise((e,t)=>{const n=document.createElement("link");n.rel="stylesheet",n.href=l,document.head.appendChild(n),n.onload=()=>e(),n.onerror=()=>t()})}function mu(l,e,t){return Promise.all([du(`${l}/custom_component/${e}/${t}/style.css`),P(()=>import(`${l}/custom_component/${e}/${t}/index.js`),[],import.meta.url)]).then(([n,o])=>o)}function hu(){const l=cn({}),e=[],t=[],n=new Map,o=new Map,i=new Map,r=[];function _({fn_index:s,status:c,queue:f=!0,size:u,position:p=null,eta:b=null,message:g=null,progress:h}){const d=t[s],m=e[s],v=r[s],E=d.map(k=>{let w;const $=n.get(k)||0;if(v==="pending"&&c!=="pending"){let y=$-1;n.set(k,y<0?0:y),w=y>0?"pending":c}else v==="pending"&&c==="pending"?w="pending":v!=="pending"&&c==="pending"?(w="pending",n.set(k,$+1)):w=c;return{id:k,queue_position:p,queue_size:u,eta:b,status:w,message:g,progress:h}});m.forEach(k=>{const w=o.get(k)||0;if(v==="pending"&&c!=="pending"){let $=w-1;o.set(k,$<0?0:$),i.set(k,c)}else v!=="pending"&&c==="pending"?(o.set(k,w+1),i.set(k,c)):i.delete(k)}),l.update(k=>(E.forEach(({id:w,queue_position:$,queue_size:y,eta:q,status:A,message:L,progress:D})=>{k[w]={queue:f,queue_size:y,queue_position:$,eta:q,message:L,progress:D,status:A,fn_index:s}}),k)),r[s]=c}function a(s,c,f){e[s]=c,t[s]=f}return{update:_,register:a,subscribe:l.subscribe,get_status_for_fn(s){return r[s]},get_inputs_to_update(){return i}}}let Et=[];function gu(){let l,e=cn({}),t={},n,o,i,r,_=hu();const a=cn();let s=[],c,f={};function u({app:k,components:w,layout:$,dependencies:y,root:q,options:A,callback:L}){c=k,d(s),s=w,n=new Set,o=new Set,Et=[],i=new Map,l=new Map,r={};const D={id:$.id,type:"column",props:{interactive:!1,scale:A.fill_height?1:null},has_modes:!1,instance:null,component:null,component_class_id:"",key:null};
66w.push(D),y.forEach((S,M)=>{_.register(M,S.inputs,S.outputs),S.frontend_fn=vu(S.js,!!S.backend_fn,S.inputs.length,S.outputs.length),$u(S.targets,M,t),bu(S,n,o)}),e.set(t),i=ni(w,q),r=w.reduce((S,M)=>(S[M.id]=M,S),{}),b($,q).then(()=>{a.set(D),L&&L()})}function p({components:k,layout:w,root:$}){e.set(t),ni(k,$).forEach((D,S)=>{i.set(S,D)});let q=r[w.id],A=[];const L=D=>{A.push(D),D.children&&D.children.forEach(S=>{L(S)})};L(q),d(A),k.forEach(D=>{r[D.id]=D,l.set(D.id,D)}),q.parent&&(q.parent.children[q.parent.children.indexOf(q)]=r[w.id]),b(w,$,q.parent)}async function b(k,w,$){const y=r[k.id];return y.component=(await i.get(y.component_class_id))?.default,y.parent=$,y.type==="dataset"&&(y.props.component_map=Ni(y.type,y.component_class_id,w,s,y.props.components).example_components),t[y.id]&&(y.props.attached_events=Object.keys(t[y.id])),y.props.interactive=wu(y.id,y.props.interactive,y.props.value,n,o),y.props.server=yu(y.id,y.props.server_fns,c),y.key!=null&&f[y.key]!==void 0&&(y.props.value=f[y.key]),l.set(y.id,y),k.children&&(y.children=await Promise.all(k.children.map(q=>b(q,w,y)))),y}let g=!1,h=cn(!1);function d(k){k.forEach(w=>{w.key!=null&&(f[w.key]=w.props.value)})}function m(){a.update(k=>{for(let w=0;w<Et.length;w++)for(let $=0;$<Et[w].length;$++){const y=Et[w][$],q=r[y.id];if(!q)continue;let A;y.value instanceof Map?A=new Map(y.value):y.value instanceof Set?A=new Set(y.value):Array.isArray(y.value)?A=[...y.value]:y.value===null?A=null:typeof y.value=="object"?A={...y.value}:A=y.value,q.props[y.prop]=A}return k}),Et=[],g=!1,h.set(!1)}function v(k){k&&(Et.push(k),g||(g=!0,h.set(!0),requestAnimationFrame(m)))}function E(k){const w=l.get(k);return w?w.instance.get_value?w.instance.get_value():w.props.value:null}return{layout:a,targets:e,update_value:v,get_data:E,loading_status:_,scheduled_updates:h,create_layout:(...k)=>requestAnimationFrame(()=>u(...k)),rerender_layout:p}}const zi=Object.getPrototypeOf(async function(){}).constructor;function vu(l,e,t,n){if(!l)return null;const o=e?t===1:n===1;try{return new zi("__fn_args",` let result = await (${l})(...__fn_args); 67 return (${o} && !Array.isArray(result)) ? [result] : result;`)}catch(i){return console.error("Could not parse custom js method."),console.error(i),null}}function $u(l,e,t){return l.forEach(([n,o])=>{t[n]||(t[n]={}),t[n]?.[o]&&!t[n]?.[o].includes(e)?t[n][o].push(e):t[n][o]=[e]}),t}function bu(l,e,t){return l.inputs.forEach(n=>e.add(n)),l.outputs.forEach(n=>t.add(n)),[e,t]}function ku(l){return Array.isArray(l)&&l.length===0||l===""||l===0||!l}function wu(l,e,t,n,o){return e===!1?!1:e===!0?!0:!!(n.has(l)||!o.has(l)&&ku(t))}function yu(l,e,t){return e?e.reduce((n,o)=>(n[o]=async(...i)=>(i.length===1&&(i=i[0]),await t.component_server(l,o,i)),n),{}):{}}function Ni(l,e,t,n,o){let i=new Map;l==="dataset"&&o&&o.forEach(_=>{if(i.has(_))return;let a;const s=n.find(c=>c.type===_);s&&(a=ti({api_url:t,name:_,id:s.component_class_id,variant:"example"}),i.set(_,a.component))});const r=ti({api_url:t,name:l,id:e,variant:"component"});return{component:r.component,name:r.name,example_components:i.size>0?i:void 0}}function ni(l,e){let t=new Map;return l.forEach(n=>{const{component:o,example_components:i}=Ni(n.type,n.component_class_id,e,l);if(t.set(n.component_class_id,o),i)for(const[r,_]of i)t.set(r,_)}),t}const{SvelteComponent:Eu,append:qe,attr:X,check_outros:sn,component_subscribe:St,create_component:kn,destroy_component:wn,detach:fe,element:Pe,empty:Vn,flush:oe,globals:Cu,group_outros:an,init:Au,insert:Le,listen:hl,mount_component:yn,noop:Mn,safe_not_equal:Lu,set_data:Ui,set_style:_n,space:Ue,src_url_equal:gl,text:Bi,transition_in:Ee,transition_out:Ne}=window.__gradio__svelte__internal,{document:Vt}=Cu,{tick:zn}=window.__gradio__svelte__internal;function li(l){return Vt.title=l[2],{c:Mn,m:Mn,d:Mn}}function oi(l){let e,t,n,o;return{c(){e=Pe("script"),e.innerHTML="",n=Ue(),o=Pe("script"),o.textContent=`
vendor: 146 bytes, lines 67-72
67window.dataLayer = window.dataLayer || []; 68 function gtag() { 69 dataLayer.push(arguments); 70 } 71 gtag("js", new Date()); 72 gtag("config", "
72UA-156449732-1
vendor: 52 bytes, lines 72-74
72", { 73 cookie_flags: "samesite=none;secure" 74 });
74`,e.async=!0,e.defer=!0,gl(e.src,t="https://www.googletagmanager.com/gtag/js?id=UA-156449732-1")||X(e,"src",t)},m(i,r){Le(i,e,r),Le(i,n,r),Le(i,o,r)},d(i){i&&(fe(e),fe(n),fe(o))}}}function ii(l){let e,t;return e=new uu({props:{rootNode:l[14],root:l[0],target:l[4],theme_mode:l[10],version:l[13],autoscroll:l[5],max_file_size:l[11].config.max_file_size,client:l[11]}}),e.$on("mount",l[26]),e.$on("destroy",l[36]),{c(){kn(e.$$.fragment)},m(n,o){yn(e,n,o),t=!0},p(n,o){const i={};o[0]&16384&&(i.rootNode=n[14]),o[0]&1&&(i.root=n[0]),o[0]&16&&(i.target=n[4]),o[0]&1024&&(i.theme_mode=n[10]),o[0]&8192&&(i.version=n[13]),o[0]&32&&(i.autoscroll=n[5]),o[0]&2048&&(i.max_file_size=n[11].config.max_file_size),o[0]&2048&&(i.client=n[11]),e.$set(i)},i(n){t||(Ee(e.$$.fragment,n),t=!0)},o(n){Ne(e.$$.fragment,n),t=!1},d(n){wn(e,n)}}}function ri(l){let e,t,n,o=l[19]("common.built_with_gradio")+"",i,r,_,a,s,c=l[6]&&si(l);return{c(){e=Pe("footer"),c&&c.c(),t=Ue(),n=Pe("a"),i=Bi(o),r=Ue(),_=Pe("img"),gl(_.src,a=fu)||X(_,"src",a),X(_,"alt",s=l[19]("common.logo")),X(_,"class","svelte-1rjryqp"),X(n,"href","https://gradio.app"),X(n,"class","built-with
74svelte-1rjryqp"),X(n,"target","_blank"),X(n,"rel","noreferrer"),X(e,"class","svelte-1rjryqp")},m(f,u){Le(f,e,u),c&&c.m(e,null),qe(e,t),qe(e,n),qe(n,i),qe(n,r),qe(n,_)},p(f,u){f[6]?c?c.p(f,u):(c=si(f),c.c(),c.m(e,t)):c&&(c.d(1),c=null),u[0]&524288&&o!==(o=f[19]("common.built_with_gradio")+"")&&Ui(i,o),u[0]&524288&&s!==(s=f[19]("common.logo"))&&X(_,"alt",s)},d(f){f&&fe(e),c&&c.d()}}}function si(l){let e,t=l[19]("errors.use_via_api")+"",n,o,i,r,_,a,s,c,f;return{c(){e=Pe("button"),n=Bi(t),o=Ue(),i=Pe("img"),a=Ue(),s=Pe("div"),s.textContent="·",gl(i.src,r=bi)||X(i,"src",r),X(i,"alt",_=l[19]("common.logo")),X(i,"class","svelte-1rjryqp"),X(e,"class","show-api svelte-1rjryqp"),X(s,"class","svelte-1rjryqp")},m(u,p){Le(u,e,p),qe(e,n),qe(e,o),qe(e,i),Le(u,a,p),Le(u,s,p),c||(f=hl(e,"click",l[37]),c=!0)},p(u,p){p[0]&524288&&t!==(t=u[19]("errors.use_via_api")+"")&&Ui(n,t),p[0]&524288&&_!==(_=u[19]("common.logo"))&&X(i,"alt",_)},d(u){u&&(fe(e),fe(a),fe(s)),c=!1,f()}}}function ai(l){let e,t,n,o,i;return t=new gc({props:{api_calls:l[17],dependencies:l[1]}}),{c(){e=Pe("div"),kn(t.$$.fragment),X(e,"id","api-recorder-container"),X(e,"class","svelte-1rjryqp")},m(r,_){Le(r,e,_),yn(t,e,null),n=!0,o||(i=hl(e,"click",l[38]),o=!0)},p(r,_){const a={};_[0]&131072&&(a.api_calls=r[17]),_[0]&2&&(a.dependencies=r[1]),t.$set(a)},i(r){n||(Ee(t.$$.fragment,r),n=!0)},o(r){Ne(t.$$.fragment,r),n=!1},d(r){r&&fe(e),wn(t),o=!1,i()}}}function _i(l){let e,t,n,o,i,r,_,a;return i=new uc({props:{root_node:l[14],dependencies:l[1],root:l[0],app:l[11],space_id:l[12],api_calls:l[17]}}),i.$on("close",l[40]),{c(){e=Pe("div"),t=Pe("div"),n=Ue(),o=Pe("div"),kn(i.$$.fragment),X(t,"class","backdrop svelte-1rjryqp"),X(o,"class","api-docs-wrap svelte-1rjryqp"),X(e,"class","api-docs svelte-1rjryqp")},m(s,c){Le(s,e,c),qe(e,t),qe(e,n),qe(e,o),yn(i,o,null),r=!0,_||(a=hl(t,"click",l[39]),_=!0)},p(s,c){const f={};c[0]&16384&&(f.root_node=s[14]),c[0]&2&&(f.dependencies=s[1]),c[0]&1&&(f.root=s[0]),c[0]&2048&&(f.app=s[11]),c[0]&4096&&(f.space_id=s[12]),c[0]&131072&&(f.api_calls=s[17]),i.$set(f)},i(s){r||(Ee(i.$$.fragment,s),r=!0)},o(s){Ne(i.$$.fragment,s),r=!1},d(s){s&&fe(e),wn(i),_=!1,a()}}}function ci(l){let e,t;return e=new ys({props:{messages:l[18]}}),e.$on("close",l[25]),{c(){kn(e.$$.fragment)},m(n,o){yn(e,n,o),t=!0},p(n,o){const i={};o[0]&262144&&(i.messages=n[18]),e.$set(i)},i(n){t||(Ee(e.$$.fragment,n),t=!0)},o(n){Ne(e.$$.fragment,n),t=!1},d(n){wn(e,n)}}}function qu(l){let e,t,n,o,i,r,_,a,s,c,f,u=l[8]&&li(l),p=l[3]&&oi(),b=l[14]&&l[11].config&&ii(l),g=l[7]&&ri(l),h=l[16]&&ai(l),d=l[15]&&l[14]&&_i(l),m=l[18]&&ci(l);return{c(){u&&u.c(),e=Vn(),p&&p.c(),t=Vn(),n=Ue(),o=Pe("div"),i=Pe("div"),b&&b.c(),r=Ue(),g&&g.c(),_=Ue(),h&&h.c(),a=Ue(),d&&d.c(),s=Ue(),m&&m.c(),c=Vn(),X(i,"class","contain svelte-1rjryqp"),_n(i,"flex-grow",l[9]?"1":"auto"),X(o,"class","wrap svelte-1rjryqp"),_n(o,"min-height",l[9]?"100%":"auto")},m(v,E){u&&u.m(Vt.head,null),qe(Vt.head,e),p&&p.m(Vt.head,null),qe(Vt.head,t),Le(v,n,E),Le(v,o,E),qe(o,i),b&&b.m(i,null),qe(o,r),g&&g.m(o,null),Le(v,_,E),h&&h.m(v,E),Le(v,a,E),d&&d.m(v,E),Le(v,s,E),m&&m.m(v,E),Le(v,c,E),f=!0},p(v,E){v[8]?u||(u=li(v),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),v[3]?p||(p=oi(),p.c(),p.m(t.parentNode,t)):p&&(p.d(1),p=null),v[14]&&v[11].config?b?(b.p(v,E),E[0]&18432&&Ee(b,1)):(b=ii(v),b.c(),Ee(b,1),b.m(i,null)):b&&(
74an(),Ne(b,1,1,()=>{b=null}),sn()),E[0]&512&&_n(i,"flex-grow",v[9]?"1":"auto"),v[7]?g?g.p(v,E):(g=ri(v),g.c(),g.m(o,null)):g&&(g.d(1),g=null),E[0]&512&&_n(o,"min-height",v[9]?"100%":"auto"),v[16]?h?(h.p(v,E),E[0]&65536&&Ee(h,1)):(h=ai(v),h.c(),Ee(h,1),h.m(a.parentNode,a)):h&&(an(),Ne(h,1,1,()=>{h=null}),sn()),v[15]&&v[14]?d?(d.p(v,E),E[0]&49152&&Ee(d,1)):(d=_i(v),d.c(),Ee(d,1),d.m(s.parentNode,s)):d&&(an(),Ne(d,1,1,()=>{d=null}),sn()),v[18]?m?(m.p(v,E),E[0]&262144&&Ee(m,1)):(m=ci(v),m.c(),Ee(m,1),m.m(c.parentNode,c)):m&&(an(),Ne(m,1,1,()=>{m=null}),sn())},i(v){f||(Ee(b),Ee(h),Ee(d),Ee(m),f=!0)},o(v){Ne(b),Ne(h),Ne(d),Ne(m),f=!1},d(v){v&&(fe(n),fe(o),fe(_),fe(a),fe(s),fe(c)),u&&u.d(v),fe(e),p&&p.d(v),fe(t),b&&b.d(),g&&g.d(),h&&h.d(v),d&&d.d(v),m&&m.d(v)}}}const Pu=/^'([^]+)'$/,Tu=15,Ou=10;function ui(l){return"detail"in l}function Iu(l,e,t){let n,o,i,r,_;St(l,pi,C=>t(19,r=C)),sr();let{root:a}=e,{components:s}=e,{layout:c}=e,{dependencies:f}=e,{title:u="Gradio"}=e,{analytics_enabled:p=!1}=e,{target:b}=e,{autoscroll:g}=e,{show_api:h=!0}=e,{show_footer:d=!0}=e,{control_page_title:m=!1}=e,{app_mode:v}=e,{theme_mode:E}=e,{app:k}=e,{space_id:w}=e,{version:$}=e,{js:y}=e,{fill_height:q=!1}=e,{ready:A}=e;const{layout:L,targets:D,update_value:S,get_data:M,loading_status:R,scheduled_updates:O,create_layout:K,rerender_layout:T}=gu();St(l,L,C=>t(14,_=C)),St(l,D,C=>t(46,o=C)),St(l,R,C=>t(35,n=C)),St(l,O,C=>t(47,i=C));let Q=new URLSearchParams(window.location.search),ke=Q.get("view")==="api"&&h,We=Q.get("view")==="api-recorder"&&h;function U(C){t(16,We=!1),t(15,ke=C);let H=new URLSearchParams(window.location.search);C?H.set("view","api"):H.delete("view"),history.replaceState(null,"","?"+H.toString())}let Be=[],{render_complete:Kt=!1}=e;async function vl(C,H){const N=f[H].outputs,z=C?.map((G,we)=>({id:N[we],prop:"value_is_output",value:!0}));S(z),await zn();const ee=[];C?.forEach((G,we)=>{if(typeof G=="object"&&G!==null&&G.__type__==="update")for(const[J,Fe]of Object.entries(G))J!=="__type__"&&ee.push({id:N[we],prop:J,value:Fe});else ee.push({id:N[we],prop:"value",value:G})}),S(ee),await zn()}let $l=new Map,bl=[],x=[];function Xe(C,H,N){return{message:C,fn_index:H,type:N,id:++Hi}}function Fi(C,H){t(18,x=[Xe(C,-1,H),...x])}let Hi=-1,En=!1;document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&(En=!0)});const Gi=r("blocks.long_requests_queue"),Zi=r("blocks.connection_can_break"),Wi=r("blocks.lost_connection"),kl=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let wl=!1,yl=!1;function jt(C,H=null,N=null){let z=()=>{};function ee(){z()}i?z=O.subscribe(G=>{G||(El(C,H,N),ee())}):El(C,H,N)}async function El(C,H=null,N=null){let z=f[C];const ee=R.get_status_for_fn(C);t(18,x=x.filter(({fn_index:J})=>J!==C)),z.cancels&&await Promise.all(z.cancels.map(async J=>{const Fe=$l.get(J);return Fe?.cancel(),Fe})),(ee==="pending"||ee==="generating")&&(z.pending_request=!0);let G={fn_index:C,data:await Promise.all(z.inputs.map(J=>M(J))),event_data:z.collects_event_data?N:null,trigger_id:H};z.frontend_fn?z.frontend_fn(G.data.concat(await Promise.all(z.outputs.map(J=>M(J))))).then(J=>{z.backend_fn?(G.data=J,we(G)):vl(J,C)}):z.backend_fn&&(z.trigger_mode==="once"?z.pending_request||we(G):z.trigger_mode==="multiple"?we(G):z.trigger_mode==="always_last"&&(z.pending_request?z.final_event=G:we(G)));async function we(J){We&&t(17,Be=[...Be,J]);let Fe;try{Fe=k.submit(J.fn_index,J.data,J.event_data,J.trigger_id)}catch(ye){t(18,x=[Xe(String(ye),0,"error"),...x]),R.update({status:"error",fn_index:0,eta:0,queue:!1,queue_position:null}),Xt(n);return}Fe.on("data",({data:ye,fn_index:ne})=>{z.pending_request&&z.final_event&&(z.pending_request=!1,we(z.final_event)),z.pending_request=!1,vl(ye,ne),Xt(n)}).on("render",({data:ye,fn_index:ne})=>{let He=ye.components,$t=ye.layout;T({components:He,layout:$t,root:a})}).on("status",({fn_index:ye,...ne})=>{if(R.update({...ne,status:ne.stage,progress:ne.progress_data,fn_index:ye}),Xt(n),!wl&&w!==null&&ne.position!==void 0&&ne.position>=2&&ne.eta!==void 0&&ne.eta>Tu&&(wl=!0,t(18,x=[Xe(Gi,ye,"warning"),...x])),!yl&&kl&&ne.eta!==void 0&&ne.eta>Ou&&(yl=!0,t(18,x=[Xe(Zi,ye,"warning"),...x])),ne.stage==="complete"&&(f.map(async(He,$t)=>{He.trigger_after===ye&&jt($t,J.trigger_id)}),Fe.destroy()),ne.broken&&kl&&En)window.setTimeout(()=>{t(18,x=[Xe(Wi,ye,"error"),...x])},0),jt(C,J.trigger_id,N),En=!1;else if(ne.stage==="error"){if(ne.message){const He=ne.message.replace(Pu,($t,or)=>or);t(18,x=[Xe(He,ye,"error"),...x])}f.map(async(He,$t)=>{He.trigger_after===ye&&!He.trigger_only_on_success&&jt($t,J.trigger_id)}),Fe.destroy()}}).on("log",({log:ye,fn_index:ne,level:He})=>{t(18,x=[Xe(ye,ne,He),...x])}),$l.set(C,Fe)}}function Qi(C,H){if(w===null)return;
74const N=new URL(`https://huggingface.co/spaces/${w}/discussions/new`);C!==void 0&&C.length>0&&N.searchParams.set("title",C),N.searchParams.set("description",H),window.open(N.toString(),"_blank")}function Ji(C){const H=C.detail;t(18,x=x.filter(N=>N.id!==H))}const Yi=C=>!!(C&&new URL(C,location.href).origin!==location.origin);async function Ki(){y&&await new zi(`let result = await (${y})(); 75 return (!Array.isArray(result)) ? [result] : result;`)(),await zn();for(var C=b.getElementsByTagName("a"),H=0;H<C.length;H++){const N=C[H].getAttribute("target"),z=C[H].getAttribute("href");Yi(z)&&N!=="_blank"&&C[H].setAttribute("target","_blank")}f.forEach((N,z)=>{N.targets[0][1]==="load"&&jt(z)}),!Kt&&(b.addEventListener("prop_change",N=>{if(!ui(N))throw new Error("not a custom event");const{id:z,prop:ee,value:G}=N.detail;S([{id:z,prop:ee,value:G}])}),b.addEventListener("gradio",N=>{if(!ui(N))throw new Error("not a custom event");const{id:z,event:ee,data:G}=N.detail;if(ee==="share"){const{title:we,description:J}=G;Qi(we,J)}else ee==="error"||ee==="warning"?t(18,x=[Xe(G,-1,ee),...x]):ee=="clear_status"?Xi(z,"complete",G):o[z]?.[ee]?.forEach(J=>{requestAnimationFrame(()=>{jt(J,z,G)})})}),t(29,Kt=!0))}function Cl(C){bl=bl.map(H=>H.filter(N=>N!==C))}function Xi(C,H,N){N.status=H,S([{id:C,prop:"loading_status",value:N}])}function Xt(C){const H=Object.entries(C).map(([ee,G])=>{let we=f[G.fn_index];return G.scroll_to_output=we.scroll_to_output,G.show_progress=we.show_progress,{id:parseInt(ee),prop:"loading_status",value:G}}),N=R.get_inputs_to_update(),z=Array.from(N).map(([ee,G])=>({id:ee,prop:"pending",value:G==="pending"}));S([...H,...z])}const xi=({detail:C})=>Cl(C),er=()=>{U(!ke)},tr=()=>{U(!0),t(16,We=!1)},nr=()=>{U(!1)},lr=C=>{U(!1),t(17,Be=[]),t(16,We=C.detail.api_recorder_visible)};return l.$$set=C=>{"root"in C&&t(0,a=C.root),"components"in C&&t(30,s=C.components),"layout"in C&&t(31,c=C.layout),"dependencies"in C&&t(1,f=C.dependencies),"title"in C&&t(2,u=C.title),"analytics_enabled"in C&&t(3,p=C.analytics_enabled),"target"in C&&t(4,b=C.target),"autoscroll"in C&&t(5,g=C.autoscroll),"show_api"in C&&t(6,h=C.show_api),"show_footer"in C&&t(7,d=C.show_footer),"control_page_title"in C&&t(8,m=C.control_page_title),"app_mode"in C&&t(9,v=C.app_mode),"theme_mode"in C&&t(10,E=C.theme_mode),"app"in C&&t(11,k=C.app),"space_id"in C&&t(12,w=C.space_id),"version"in C&&t(13,$=C.version),"js"in C&&t(32,y=C.js),"fill_height"in C&&t(33,q=C.fill_height),"ready"in C&&t(28,A=C.ready),"render_complete"in C&&t(29,Kt=C.render_complete)},l.$$.update=()=>{l.$$.dirty[0]&1073743875|l.$$.dirty[1]&5&&K({components:s,layout:c,dependencies:f,root:a,app:k,options:{fill_height:q}}),l.$$.dirty[0]&16384&&t(28,A=!!_),l.$$.dirty[1]&16&&Xt(n)},[a,f,u,p,b,g,h,d,m,v,E,k,w,$,_,ke,We,Be,x,r,L,D,R,O,U,Ji,Ki,Cl,A,Kt,s,c,y,q,Fi,n,xi,er,tr,nr,lr]}class ju extends Eu{constructor(e){super(),Au(this,e,Iu,qu,Lu,{root:0,components:30,layout:31,dependencies:1,title:2,analytics_enabled:3,target:4,autoscroll:5,show_api:6,show_footer:7,control_page_title:8,app_mode:9,theme_mode:10,app:11,space_id:12,version:13,js:32,fill_height:33,ready:28,render_complete:29,add_new_message:34},null,[-1,-1,-1])}get root(){return this.$$.ctx[0]}set root(e){this.$$set({root:e}),oe()}get components(){return this.$$.ctx[30]}set components(e){this.$$set({components:e}),oe()}get layout(){return this.$$.ctx[31]}set layout(e){this.$$set({layout:e}),oe()}get dependencies(){return this.$$.ctx[1]}set dependencies(e){this.$$set({dependencies:e}),oe()}get title(){return this.$$.ctx[2]}set title(e){this.$$set({title:e}),oe()}get analytics_enabled(){return this.$$.ctx[3]}set analytics_enabled(e){this.$$set({analytics_enabled:e}),oe()}get target(){return this.$$.ctx[4]}set target(e){this.$$set({target:e}),oe()}get autoscroll(){return this.$$.ctx[5]}set autoscroll(e){this.$$set({autoscroll:e}),oe()}get show_api(){return this.$$.ctx[6]}set show_api(e){this.$$set({show_api:e}),oe()}get show_footer(){return this.$$.ctx[7]}set show_footer(e){this.$$set({show_footer:e}),oe()}get control_page_title(){return this.$$.ctx[8]}set control_page_title(e){this.$$set({control_page_title:e}),oe()}get app_mode(){return this.$$.ctx[9]}set app_mode(e){this.$$set({app_mode:e}),oe()}get theme_mode(){return this.$$.ctx[10]}set theme_mode(e){this.$$set({theme_mode:e}),oe()}get app(){return this.$$.ctx[11]}set app(e){this.$$set({app:e}),oe()}get space_id(){return this.$$.ctx[12]}set space_id(e){this.$$set({space_id:e}),oe()}get version(){return this.$$.ctx[13]}
75set version(e){this.$$set({version:e}),oe()}get js(){return this.$$.ctx[32]}set js(e){this.$$set({js:e}),oe()}get fill_height(){return this.$$.ctx[33]}set fill_height(e){this.$$set({fill_height:e}),oe()}get ready(){return this.$$.ctx[28]}set ready(e){this.$$set({ready:e}),oe()}get render_complete(){return this.$$.ctx[29]}set render_complete(e){this.$$set({render_complete:e}),oe()}get add_new_message(){return this.$$.ctx[34]}}const Uu=Object.freeze(Object.defineProperty({__proto__:null,default:ju},Symbol.toStringTag,{value:"Module"}));export{Uu as B,qn as S,ys as T,zu as c,Nu as f,Mu as u}; 76//# sourceMappingURL=Blocks-Dx73k_4L.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.