NeuroGPT
/
venv
/Lib
/python3.10
/site-packages
/gradio
/templates
/frontend
/assets
/Blocks-45104e62.js
import{n as $,i as an,a as _n,l as cn,c as fn,d as un,b as mn,S as re,e as se,s as ae,f as me,g as u,h as k,j as d,k as b,m as T,o as U,t as O,p as pe,q as He,r as le,u as C,v as ie,w as P,x as W,y as dn,z as pn,A as gn,B as hn,C as ye,D as Pe,E as he,F as Q,G as K,H as Z,I as ne,J as zt,K as ue,L as vn,_ as N,M as je,N as Le,O as ge,P as bn,Q as ce,R as Ee,T as Ge,U as We,V as kn,W as wn,X as En,Y as yn,Z as jn,$ as An,a0 as On,a1 as Ln,a2 as Tn,a3 as Je,a4 as Pn,a5 as In,a6 as Rn,a7 as Dn}from"./index-d50163a8.js";import{c as Vn,f as Qe,B as Ve,a as qn}from"./Button-7dd65143.js";function Cn(l,e,t,n){if(!e)return $;const i=l.getBoundingClientRect();if(e.left===i.left&&e.right===i.right&&e.top===i.top&&e.bottom===i.bottom)return $;const{delay:o=0,duration:s=300,easing:r=an,start:_=_n()+o,end:a=_+s,tick:c=$,css:f}=t(l,{from:e,to:i},n);let m=!0,g=!1,y;function A(){f&&(y=fn(l,0,1,s,o,r,f)),o||(g=!0)}function w(){f&&un(l,y),m=!1}return cn(p=>{if(!g&&p>=_&&(g=!0),g&&p>=a&&(c(1,0),w()),!m)return!1;if(g){const E=p-_,L=0+1*r(E/s);c(L,1-L)}return!0}),A(),c(0,1),w}function Nn(l){const e=getComputedStyle(l);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:n}=e,i=l.getBoundingClientRect();l.style.position="absolute",l.style.width=t,l.style.height=n,Sn(l,i)}}function Sn(l,e){const t=l.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const n=getComputedStyle(l),i=n.transform==="none"?"":n.transform;l.style.transform=`${i} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}function zn(l,{from:e,to:t},n={}){const i=getComputedStyle(l),o=i.transform==="none"?"":i.transform,[s,r]=i.transformOrigin.split(" ").map(parseFloat),_=e.left+e.width*s/t.width-(t.left+s),a=e.top+e.height*r/t.height-(t.top+r),{delay:c=0,duration:f=g=>Math.sqrt(g)*120,easing:m=Vn}=n;return{delay:c,duration:mn(f)?f(Math.sqrt(_*_+a*a)):f,easing:m,css:(g,y)=>{const A=y*_,w=y*a,p=g+y*e.width/t.width,E=g+y*e.height/t.height;return`transform: ${o} translate(${A}px, ${w}px) scale(${p}, ${E});`}}}function Mn(l){let e,t;return{c(){e=me("svg"),t=me("path"),u(t,"stroke-linecap","round"),u(t,"stroke-linejoin","round"),u(t,"d","M12 9v3.75m9-.75a9 9 0 11-18 0 9 9 0 0118 0zm-9 3.75h.008v.008H12v-.008z"),u(e,"fill","none"),u(e,"stroke","currentColor"),u(e,"viewBox","0 0 24 24"),u(e,"width","100%"),u(e,"height","100%"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"aria-hidden","true"),u(e,"stroke-width","2"),u(e,"stroke-linecap","round"),u(e,"stroke-linejoin","round")},m(n,i){k(n,e,i),d(e,t)},p:$,i:$,o:$,d(n){n&&b(e)}}}let Bn=class extends re{constructor(e){super(),se(this,e,null,Mn,ae,{})}};function Un(l){let e,t;return{c(){e=me("svg"),t=me("path"),u(t,"stroke-linecap","round"),u(t,"stroke-linejoin","round"),u(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"),u(e,"fill","none"),u(e,"stroke","currentColor"),u(e,"viewBox","0 0 24 24"),u(e,"width","100%"),u(e,"height","100%"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"aria-hidden","true"),u(e,"stroke-width","2"),u(e,"stroke-linecap","round"),u(e,"stroke-linejoin","round")},m(n,i){k(n,e,i),d(e,t)},p:$,i:$,o:$,d(n){n&&b(e)}}}class Fn extends re{constructor(e){super(),se(this,e,null,Un,ae,{})}}function Hn(l){let e,t;return{c(){e=me("svg"),t=me("path"),u(t,"stroke-linecap","round"),u(t,"stroke-linejoin","round"),u(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"),u(e,"fill","none"),u(e,"stroke","currentColor"),u(e,"stroke-width","2"),u(e,"viewBox","0 0 24 24"),u(e,"width","100%"),u(e,"height","100%"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"aria-hidden","true"),u(e,"stroke-linecap","round"),u(e,"stroke-linejoin","round")},m(n,i){k(n,e,i),d(e,t)},p:$,i:$,o:$,d(n){n&&b(e)}}}class Gn extends re{constructor(e){super(),se(this,e,null,Hn,ae,{})}}function Wn(l){let e,t;return e=new Bn({}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Jn(l){let e,t;return e=new Fn({}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Qn(l){let e,t;return e=new Gn({}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Kn(l){let e,t,n,i,o,s,r,_,a,c,f,m,g,y,A,w,p,E,L,v,j,R,q,M,J,V,fe,D;const F=[Qn,Jn,Wn],X=[];function _e(I,x){return I[1]==="warning"?0:I[1]==="info"?1:I[1]==="error"?2:-1}return~(n=_e(l))&&(i=X[n]=F[n](l)),{c(){e=T("div"),t=T("div"),i&&i.c(),s=U(),r=T("div"),_=T("div"),a=O(l[1]),f=U(),m=T("div"),g=O(l[0]),w=U(),p=T("button"),E=T("span"),E.textContent="×",v=U(),j=T("div"),u(t,"class",o="toast-icon "+l[1]+" svelte-z3l7qj"),u(_,"class",c="toast-title "+l[1]+" svelte-z3l7qj"),u(m,"class",y="toast-text "+l[1]+" svelte-z3l7qj"),u(r,"class",A="toast-details "+l[1]+" svelte-z3l7qj"),u(E,"aria-hidden","true"),u(p,"class",L="toast-close "+l[1]+" svelte-z3l7qj"),u(p,"type","button"),u(p,"aria-label","Close"),u(p,"data-testid","toast-close"),u(j,"class",R="timer "+l[1]+" svelte-z3l7qj"),u(e,"class",q="toast-body "+l[1]+" svelte-z3l7qj"),u(e,"role","alert"),u(e,"data-testid","toast-body")},m(I,x){k(I,e,x),d(e,t),~n&&X[n].m(t,null),d(e,s),d(e,r),d(r,_),d(_,a),d(r,f),d(r,m),d(m,g),d(e,w),d(e,p),d(p,E),d(e,v),d(e,j),V=!0,fe||(D=[pe(p,"click",l[2]),pe(e,"click",He(l[4])),pe(e,"keydown",He(l[5]))],fe=!0)},p(I,[x]){let ve=n;n=_e(I),n!==ve&&(i&&(le(),C(X[ve],1,1,()=>{X[ve]=null}),ie()),~n?(i=X[n],i||(i=X[n]=F[n](I),i.c()),P(i,1),i.m(t,null)):i=null),(!V||x&2&&o!==(o="toast-icon "+I[1]+" svelte-z3l7qj"))&&u(t,"class",o),(!V||x&2)&&W(a,I[1]),(!V||x&2&&c!==(c="toast-title "+I[1]+" svelte-z3l7qj"))&&u(_,"class",c),(!V||x&1)&&W(g,I[0]),(!V||x&2&&y!==(y="toast-text "+I[1]+" svelte-z3l7qj"))&&u(m,"class",y),(!V||x&2&&A!==(A="toast-details "+I[1]+" svelte-z3l7qj"))&&u(r,"class",A),(!V||x&2&&L!==(L="toast-close "+I[1]+" svelte-z3l7qj"))&&u(p,"class",L),(!V||x&2&&R!==(R="timer "+I[1]+" svelte-z3l7qj"))&&u(j,"class",R),(!V||x&2&&q!==(q="toast-body "+I[1]+" svelte-z3l7qj"))&&u(e,"class",q)},i(I){V||(P(i),I&&dn(()=>{V&&(J&&J.end(1),M=pn(e,Qe,{duration:200,delay:100}),M.start())}),V=!0)},o(I){C(i),M&&M.invalidate(),I&&(J=gn(e,Qe,{duration:200})),V=!1},d(I){I&&b(e),~n&&X[n].d(),I&&J&&J.end(),fe=!1,hn(D)}}}function Zn(l,e,t){let{message:n=""}=e,{type:i}=e,{id:o}=e;const s=ye();function r(){s("close",o)}Pe(()=>{setTimeout(()=>{r()},1e4)});function _(c){he.call(this,l,c)}function a(c){he.call(this,l,c)}return l.$$set=c=>{"message"in c&&t(0,n=c.message),"type"in c&&t(1,i=c.type),"id"in c&&t(3,o=c.id)},[n,i,r,o,_,a]}class Xn extends re{constructor(e){super(),se(this,e,Zn,Kn,ae,{message:0,type:1,id:3})}}function Ke(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 Ze(l,e){let t,n,i,o,s=$,r;return n=new Xn({props:{type:e[2],message:e[3],id:e[4]}}),n.$on("close",e[1]),{key:l,first:null,c(){t=T("div"),Q(n.$$.fragment),i=U(),ue(t,"width","100%"),this.first=t},m(_,a){k(_,t,a),K(n,t,null),d(t,i),r=!0},p(_,a){e=_;const c={};a&1&&(c.type=e[2]),a&1&&(c.message=e[3]),a&1&&(c.id=e[4]),n.$set(c)},r(){o=t.getBoundingClientRect()},f(){Nn(t),s()},a(){s(),s=Cn(t,o,zn,{duration:300})},i(_){r||(P(n.$$.fragment,_),r=!0)},o(_){C(n.$$.fragment,_),r=!1},d(_){_&&b(t),Z(n)}}}function Yn(l){let e,t=[],n=new Map,i,o=ne(l[0]);const s=r=>r[4];for(let r=0;r<o.length;r+=1){let _=Ke(l,o,r),a=s(_);n.set(a,t[r]=Ze(a,_))}return{c(){e=T("div");for(let r=0;r<t.length;r+=1)t[r].c();u(e,"class","toast-wrap svelte-pu0yf1")},m(r,_){k(r,e,_);for(let a=0;a<t.length;a+=1)t[a]&&t[a].m(e,null);i=!0},p(r,[_]){if(_&1){o=ne(r[0]),le();for(let a=0;a<t.length;a+=1)t[a].r();t=zt(t,_,s,1,r,o,n,e,vn,Ze,null,Ke);for(let a=0;a<t.length;a+=1)t[a].a();ie()}},i(r){if(!i){for(let _=0;_<o.length;_+=1)P(t[_]);i=!0}},o(r){for(let _=0;_<t.length;_+=1)C(t[_]);i=!1},d(r){r&&b(e);for(let _=0;_<t.length;_+=1)t[_].d()}}}function $n(l){l.length>0&&"parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0)}function xn(l,e,t){let{messages:n=[]}=e;function i(o){he.call(this,l,o)}return l.$$set=o=>{"messages"in o&&t(0,n=o.messages)},l.$$.update=()=>{l.$$.dirty&1&&$n(n)},[n,i]}class el extends re{constructor(e){super(),se(this,e,xn,Yn,ae,{messages:0})}}const Xe={accordion:{static:()=>N(()=>import("./index-2c7fa48f.js"),["./index-2c7fa48f.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./StaticColumn-cd657cdf.js","./StaticColumn-2853eb31.css","./index-8f1feca1.css"],import.meta.url)},annotatedimage:{static:()=>N(()=>import("./index-344fbf5f.js"),["./index-344fbf5f.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./Image-27babe2c.js","./index-f0e43e7d.css"],import.meta.url)},audio:{static:()=>N(()=>import("./index-85372c25.js"),["./index-85372c25.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./IconButton-0f491d39.js","./Empty-589999c3.js","./ShareButton-964e46f5.js","./utils-c3e3db58.js","./Download-2a88c72a.js","./utils-56927c4b.js","./index-4e2a7646.css"],import.meta.url),interactive:()=>N(()=>import("./index-2104d16b.js"),["./index-2104d16b.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./UploadText-087a7235.js","./Upload-2fa84c01.js","./ModifyUpload-430e5927.js","./IconButton-0f491d39.js","./Undo-23491313.js","./BlockLabel-44aab9bd.js","./utils-56927c4b.js","./index-4a131291.css"],import.meta.url)},box:{static:()=>N(()=>import("./index-9ebbcda6.js"),["./index-9ebbcda6.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css"],import.meta.url)},button:{static:()=>N(()=>import("./index-212333d3.js"),["./index-212333d3.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css"],import.meta.url)},chatbot:{static:()=>N(()=>import("./index-508591c2.js"),["./index-508591c2.js","./index-d50163a8.js","./index-83fff607.css","./utils-c3e3db58.js","./Button-7dd65143.js","./Button-620848cb.css","./ShareButton-964e46f5.js","./IconButton-0f491d39.js","./StaticMarkdown-b57f63a6.js","./StaticMarkdown-50748f1e.css","./Copy-cb901d3e.js","./BlockLabel-44aab9bd.js","./index-656032a9.css"],import.meta.url)},checkbox:{static:()=>N(()=>import("./index-9317031d.js"),["./index-9317031d.js","./index-d50163a8.js","./index-83fff607.css","./Checkbox-1c0359d5.js","./Checkbox-dc375626.css","./Button-7dd65143.js","./Button-620848cb.css","./Info-f32419eb.js"],import.meta.url),interactive:()=>N(()=>import("./index-2caa1578.js"),["./index-2caa1578.js","./index-d50163a8.js","./index-83fff607.css","./Checkbox-1c0359d5.js","./Checkbox-dc375626.css","./Button-7dd65143.js","./Button-620848cb.css","./Info-f32419eb.js"],import.meta.url)},checkboxgroup:{static:()=>N(()=>import("./index-1f625eec.js"),["./index-1f625eec.js","./index-d50163a8.js","./index-83fff607.css","./Checkboxgroup-2d844b85.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Checkboxgroup-e557d23a.css"],import.meta.url),interactive:()=>N(()=>import("./index-8d24c25f.js"),["./index-8d24c25f.js","./index-d50163a8.js","./index-83fff607.css","./Checkboxgroup-2d844b85.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Checkboxgroup-e557d23a.css"],import.meta.url)},code:{static:()=>N(()=>import("./index-cc9db02a.js"),["./index-cc9db02a.js","./index-d50163a8.js","./index-83fff607.css","./Widgets.svelte_svelte_type_style_lang-58cb7940.js","./Widgets-4ccfb72c.css","./Button-7dd65143.js","./Button-620848cb.css","./Copy-cb901d3e.js","./Download-2a88c72a.js","./BlockLabel-44aab9bd.js","./Empty-589999c3.js"],import.meta.url),interactive:()=>N(()=>import("./index-f7e66cc1.js"),["./index-f7e66cc1.js","./index-d50163a8.js","./index-83fff607.css","./Widgets.svelte_svelte_type_style_lang-58cb7940.js","./Widgets-4ccfb72c.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js"],import.meta.url)},colorpicker:{static:()=>N(()=>import("./index-8616c4e5.js"),["./index-8616c4e5.js","./index-d50163a8.js","./index-83fff607.css","./Colorpicker-c55637db.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Colorpicker-cd311153.css"],import.meta.url),interactive:()=>N(()=>import("./index-7a688568.js"),["./index-7a688568.js","./index-d50163a8.js","./index-83fff607.css","./Colorpicker-c55637db.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Colorpicker-cd311153.css"],import.meta.url)},column:{static:()=>N(()=>import("./index-9ac04a8c.js"),["./index-9ac04a8c.js","./StaticColumn-cd657cdf.js","./index-d50163a8.js","./index-83fff607.css","./StaticColumn-2853eb31.css"],import.meta.url)},dataframe:{static:()=>N(()=>import("./index-4ca2c564.js"),["./index-4ca2c564.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./Table-2d4393a6.js","./utils-c3e3db58.js","./Upload-2fa84c01.js","./StaticMarkdown-b57f63a6.js","./StaticMarkdown-50748f1e.css","./dsv-576afacd.js","./Table-04ecd8a6.css"],import.meta.url),interactive:()=>N(()=>import("./index-f2843e18.js"),["./index-f2843e18.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./Table-2d4393a6.js","./utils-c3e3db58.js","./Upload-2fa84c01.js","./StaticMarkdown-b57f63a6.js","./StaticMarkdown-50748f1e.css","./dsv-576afacd.js","./Table-04ecd8a6.css"],import.meta.url)},dataset:{static:()=>N(()=>import("./index-84c68c47.js"),["./index-84c68c47.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./csv-b0b7514a.js","./dsv-576afacd.js","./index-77812ee4.css","./Player-1e00f554.css"],import.meta.url)},dropdown:{static:()=>N(()=>import("./index-499d80b4.js"),["./index-499d80b4.js","./index-d50163a8.js","./index-83fff607.css","./Multiselect-f61ab3cb.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Multiselect-fc493e4f.css"],import.meta.url),interactive:()=>N(()=>import("./index-80c8a10f.js"),["./index-80c8a10f.js","./index-d50163a8.js","./index-83fff607.css","./Multiselect-f61ab3cb.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Multiselect-fc493e4f.css"],import.meta.url)},file:{static:()=>N(()=>import("./index-0387129d.js"),["./index-0387129d.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./File-51e26fcb.js","./FilePreview-938a9580.js","./FilePreview-f49dff58.css"],import.meta.url),interactive:()=>N(()=>import("./index-6b77e50c.js"),["./index-6b77e50c.js","./index-d50163a8.js","./index-83fff607.css","./Upload-2fa84c01.js","./Button-7dd65143.js","./Button-620848cb.css","./ModifyUpload-430e5927.js","./IconButton-0f491d39.js","./Undo-23491313.js","./BlockLabel-44aab9bd.js","./File-51e26fcb.js","./FilePreview-938a9580.js","./FilePreview-f49dff58.css","./UploadText-087a7235.js"],import.meta.url)},form:{static:()=>N(()=>import("./index-6d12886c.js"),["./index-6d12886c.js","./StaticForm-c845e85b.js","./index-d50163a8.js","./index-83fff607.css","./StaticForm-3812b7f1.css"],import.meta.url)},gallery:{static:()=>N(()=>import("./index-2192a575.js"),["./index-2192a575.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./IconButton-0f491d39.js","./Empty-589999c3.js","./ShareButton-964e46f5.js","./utils-c3e3db58.js","./ModifyUpload-430e5927.js","./Undo-23491313.js","./Download-2a88c72a.js","./Image-27babe2c.js","./index-bc19ffad.css"],import.meta.url)},group:{static:()=>N(()=>import("./index-b8b967a9.js"),["./index-b8b967a9.js","./index-d50163a8.js","./index-83fff607.css","./index-37519934.css"],import.meta.url)},highlightedtext:{static:()=>N(()=>import("./index-ef9ec452.js"),["./index-ef9ec452.js","./index-d50163a8.js","./index-83fff607.css","./color-6381dc03.js","./utils-6ab7db5a.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./index-9d08c7d8.css"],import.meta.url),interactive:()=>N(()=>import("./index-25372829.js"),["./index-25372829.js","./index-d50163a8.js","./index-83fff607.css","./color-6381dc03.js","./utils-6ab7db5a.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./index-b8808b2f.css"],import.meta.url)},html:{static:()=>N(()=>import("./index-b52fdd7b.js"),["./index-b52fdd7b.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./index-329f8260.css"],import.meta.url)},image:{static:()=>N(()=>import("./index-1e0a77d2.js"),["./index-1e0a77d2.js","./index-d50163a8.js","./index-83fff607.css","./utils-c3e3db58.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./IconButton-0f491d39.js","./Empty-589999c3.js","./ShareButton-964e46f5.js","./Download-2a88c72a.js","./Image-27babe2c.js","./utils-90f3612b.js","./index-f62e764d.css"],import.meta.url),interactive:()=>N(()=>import("./index-92356e5a.js"),["./index-92356e5a.js","./InteractiveImage-ae06681e.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Image-27babe2c.js","./utils-90f3612b.js","./IconButton-0f491d39.js","./ModifyUpload-430e5927.js","./Undo-23491313.js","./Upload-2fa84c01.js","./UploadText-087a7235.js","./InteractiveImage-b496c98d.css"],import.meta.url)},interpretation:{static:()=>N(()=>import("./index-273c6d46.js"),["./index-273c6d46.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./index-6acaa952.css"],import.meta.url),interactive:()=>N(()=>import("./index-273c6d46.js"),["./index-273c6d46.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./index-6acaa952.css"],import.meta.url)},json:{static:()=>N(()=>import("./index-2037eac7.js"),["./index-2037eac7.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./Copy-cb901d3e.js","./Empty-589999c3.js","./BlockLabel-44aab9bd.js","./index-3ca142e0.css"],import.meta.url)},label:{static:()=>N(()=>import("./index-1296cc87.js"),["./index-1296cc87.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./index-cc2431f4.css"],import.meta.url)},markdown:{static:()=>N(()=>import("./index-e3cfeb61.js"),["./index-e3cfeb61.js","./StaticMarkdown-b57f63a6.js","./index-d50163a8.js","./index-83fff607.css","./utils-c3e3db58.js","./Button-7dd65143.js","./Button-620848cb.css","./StaticMarkdown-50748f1e.css"],import.meta.url)},model3d:{static:()=>N(()=>import("./index-e40e9c95.js"),["./index-e40e9c95.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./File-51e26fcb.js","./IconButton-0f491d39.js","./Download-2a88c72a.js","./Undo-23491313.js","./babylonjs.loaders.min-1d378e04.js","./index-5cbd5f30.css"],import.meta.url),interactive:()=>N(()=>import("./index-477007e8.js"),["./index-477007e8.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./UploadText-087a7235.js","./Upload-2fa84c01.js","./ModifyUpload-430e5927.js","./IconButton-0f491d39.js","./Undo-23491313.js","./BlockLabel-44aab9bd.js","./File-51e26fcb.js","./babylonjs.loaders.min-1d378e04.js","./index-9c329a98.css"],import.meta.url)},number:{static:()=>N(()=>import("./index-4d122f47.js"),["./index-4d122f47.js","./index-d50163a8.js","./index-83fff607.css","./Number-7c994172.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Number-76c3ee3f.css"],import.meta.url),interactive:()=>N(()=>import("./index-eecee26d.js"),["./index-eecee26d.js","./index-d50163a8.js","./index-83fff607.css","./Number-7c994172.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Number-76c3ee3f.css"],import.meta.url)},plot:{static:()=>N(()=>import("./index-6c4c0643.js"),["./index-6c4c0643.js","./index-d50163a8.js","./index-83fff607.css","./color-6381dc03.js","./linear-bcbcf466.js","./dsv-576afacd.js","./Button-7dd65143.js","./Button-620848cb.css","./Empty-589999c3.js","./BlockLabel-44aab9bd.js","./index-31d5c487.css"],import.meta.url)},radio:{static:()=>N(()=>import("./index-a0c8bd26.js"),["./index-a0c8bd26.js","./index-d50163a8.js","./index-83fff607.css","./Radio-c89e0346.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Radio-b7554727.css"],import.meta.url),interactive:()=>N(()=>import("./index-46dbbfc4.js"),["./index-46dbbfc4.js","./index-d50163a8.js","./index-83fff607.css","./Radio-c89e0346.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Radio-b7554727.css"],import.meta.url)},row:{static:()=>N(()=>import("./index-f8df40e5.js"),["./index-f8df40e5.js","./index-d50163a8.js","./index-83fff607.css","./index-93c91554.css"],import.meta.url)},slider:{static:()=>N(()=>import("./index-c4434ec7.js"),["./index-c4434ec7.js","./index-d50163a8.js","./index-83fff607.css","./Range-b79b44d1.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Range-c39e2e66.css"],import.meta.url),interactive:()=>N(()=>import("./index-fc264fd8.js"),["./index-fc264fd8.js","./index-d50163a8.js","./index-83fff607.css","./Range-b79b44d1.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Range-c39e2e66.css"],import.meta.url)},state:{static:()=>N(()=>import("./index-9d4bc096.js"),["./index-9d4bc096.js","./index-d50163a8.js","./index-83fff607.css"],import.meta.url)},statustracker:{static:()=>N(()=>import("./index-769665b0.js"),["./index-769665b0.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css"],import.meta.url)},tabs:{static:()=>N(()=>import("./index-71795520.js"),["./index-71795520.js","./StaticTabs-eeb3099f.js","./index-d50163a8.js","./index-83fff607.css","./StaticTabs-42a53876.css"],import.meta.url)},tabitem:{static:()=>N(()=>import("./index-3e0bf06f.js"),["./index-3e0bf06f.js","./index-d50163a8.js","./index-83fff607.css","./StaticTabs-eeb3099f.js","./StaticTabs-42a53876.css","./StaticColumn-cd657cdf.js","./StaticColumn-2853eb31.css","./index-d43fcb36.css"],import.meta.url)},textbox:{static:()=>N(()=>import("./index-40740abe.js"),["./index-40740abe.js","./index-d50163a8.js","./index-83fff607.css","./Textbox-6a2e60c3.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Copy-cb901d3e.js","./Textbox-dde6f8cc.css"],import.meta.url),interactive:()=>N(()=>import("./index-4aa817d1.js"),["./index-4aa817d1.js","./InteractiveTextbox-401a0781.js","./index-d50163a8.js","./index-83fff607.css","./Textbox-6a2e60c3.js","./Button-7dd65143.js","./Button-620848cb.css","./BlockTitle-00a4a8a1.js","./Info-f32419eb.js","./Copy-cb901d3e.js","./Textbox-dde6f8cc.css"],import.meta.url)},timeseries:{static:()=>N(()=>import("./index-847e58cf.js"),["./index-847e58cf.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./Empty-589999c3.js","./Chart-2ca699b6.js","./color-6381dc03.js","./csv-b0b7514a.js","./dsv-576afacd.js","./linear-bcbcf466.js","./Chart-02ddc6a9.css"],import.meta.url),interactive:()=>N(()=>import("./index-3cccbb30.js"),["./index-3cccbb30.js","./index-d50163a8.js","./index-83fff607.css","./Upload-2fa84c01.js","./Button-7dd65143.js","./Button-620848cb.css","./ModifyUpload-430e5927.js","./IconButton-0f491d39.js","./Undo-23491313.js","./BlockLabel-44aab9bd.js","./Chart-2ca699b6.js","./color-6381dc03.js","./csv-b0b7514a.js","./dsv-576afacd.js","./linear-bcbcf466.js","./Chart-02ddc6a9.css","./UploadText-087a7235.js","./index-69616613.css"],import.meta.url)},uploadbutton:{static:()=>N(()=>import("./index-2edad1b4.js"),["./index-2edad1b4.js","./index-d50163a8.js","./index-83fff607.css","./UploadButton-cf4f6d95.js","./Button-7dd65143.js","./Button-620848cb.css","./UploadButton-03d58ab8.css"],import.meta.url),interactive:()=>N(()=>import("./index-f6e4c9e6.js"),["./index-f6e4c9e6.js","./index-d50163a8.js","./index-83fff607.css","./UploadButton-cf4f6d95.js","./Button-7dd65143.js","./Button-620848cb.css","./UploadButton-03d58ab8.css"],import.meta.url)},video:{static:()=>N(()=>import("./index-2979163a.js"),["./index-2979163a.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./BlockLabel-44aab9bd.js","./IconButton-0f491d39.js","./Empty-589999c3.js","./ShareButton-964e46f5.js","./utils-c3e3db58.js","./Download-2a88c72a.js","./Player-9faac786.js","./Undo-23491313.js","./Player-1e00f554.css","./index-022688c7.css"],import.meta.url),interactive:()=>N(()=>import("./index-44a75426.js"),["./index-44a75426.js","./index-d50163a8.js","./index-83fff607.css","./Button-7dd65143.js","./Button-620848cb.css","./UploadText-087a7235.js","./Upload-2fa84c01.js","./ModifyUpload-430e5927.js","./IconButton-0f491d39.js","./Undo-23491313.js","./BlockLabel-44aab9bd.js","./Player-9faac786.js","./Player-1e00f554.css","./InteractiveImage-ae06681e.js","./Image-27babe2c.js","./utils-90f3612b.js","./InteractiveImage-b496c98d.css","./index-633cd86d.css"],import.meta.url)}};function tl(l){let e,t,n,i;return{c(){e=me("svg"),t=me("g"),n=me("path"),i=me("path"),u(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"),u(i,"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"),u(e,"width","100%"),u(e,"height","100%"),u(e,"viewBox","0 0 5 5"),u(e,"version","1.1"),u(e,"xmlns","http://www.w3.org/2000/svg"),u(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),u(e,"xml:space","preserve"),ue(e,"fill","currentColor"),ue(e,"fill-rule","evenodd"),ue(e,"clip-rule","evenodd"),ue(e,"stroke-linejoin","round"),ue(e,"stroke-miterlimit","2")},m(o,s){k(o,e,s),d(e,t),d(t,n),d(t,i)},p:$,i:$,o:$,d(o){o&&b(e)}}}class Mt extends re{constructor(e){super(),se(this,e,null,tl,ae,{})}}function nl(l){let e,t,n,i,o,s,r,_,a,c,f,m,g,y,A;return m=new Mt({}),{c(){e=T("div"),t=T("h1"),t.textContent="API Docs",n=U(),i=T("p"),o=O(`No API Routes found for | |
`),s=T("code"),r=O(l[0]),_=U(),a=T("p"),a.innerHTML=`To expose an API endpoint of your app in this page, set the <code>api_name</code> | |
parameter of the event listener. | |
<br/> | |
For more information, visit the | |
<a href="https://gradio.app/sharing_your_app/#api-page" target="_blank">API Page guide</a> | |
. To hide the API documentation button and this page, set | |
<code>show_api=False</code> | |
in the | |
<code>Blocks.launch()</code> | |
method.`,c=U(),f=T("button"),Q(m.$$.fragment),u(s,"class","svelte-e1ha0f"),u(i,"class","attention svelte-e1ha0f"),u(e,"class","wrap prose svelte-e1ha0f"),u(f,"class","svelte-e1ha0f")},m(w,p){k(w,e,p),d(e,t),d(e,n),d(e,i),d(i,o),d(i,s),d(s,r),d(e,_),d(e,a),k(w,c,p),k(w,f,p),K(m,f,null),g=!0,y||(A=pe(f,"click",l[2]),y=!0)},p(w,[p]){(!g||p&1)&&W(r,w[0])},i(w){g||(P(m.$$.fragment,w),g=!0)},o(w){C(m.$$.fragment,w),g=!1},d(w){w&&(b(e),b(c),b(f)),Z(m),y=!1,A()}}}function ll(l,e,t){const n=ye();let{root:i}=e;const o=()=>n("close");return l.$$set=s=>{"root"in s&&t(0,i=s.root)},[i,n,o]}class il extends re{constructor(e){super(),se(this,e,ll,nl,ae,{root:0})}}function Te(l,e,t=null){return e===void 0?t==="py"?"None":null: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):t===null?l===""?null:JSON.parse(l):typeof l=="string"?l===""?t==="py"?"None":"null":l:JSON.stringify(l)}const Bt=""+new URL("api-logo-5346f193.svg",import.meta.url).href;function Ye(l){let e;return{c(){e=O("s")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function ol(l){let e,t,n,i,o,s,r,_,a,c,f,m,g,y,A,w,p,E,L,v=l[1]>1&&Ye();return w=new Mt({}),{c(){e=T("h2"),t=T("img"),i=U(),o=T("div"),s=O(`API documentation | |
`),r=T("div"),_=O(l[0]),a=U(),c=T("span"),f=T("span"),m=O(l[1]),g=O(" API endpoint"),v&&v.c(),y=U(),A=T("button"),Q(w.$$.fragment),je(t.src,n=Bt)||u(t,"src",n),u(t,"alt",""),u(t,"class","svelte-3n2nxs"),u(r,"class","url svelte-3n2nxs"),u(f,"class","url svelte-3n2nxs"),u(c,"class","counts svelte-3n2nxs"),u(e,"class","svelte-3n2nxs"),u(A,"class","svelte-3n2nxs")},m(j,R){k(j,e,R),d(e,t),d(e,i),d(e,o),d(o,s),d(o,r),d(r,_),d(e,a),d(e,c),d(c,f),d(f,m),d(c,g),v&&v.m(c,null),k(j,y,R),k(j,A,R),K(w,A,null),p=!0,E||(L=pe(A,"click",l[3]),E=!0)},p(j,[R]){(!p||R&1)&&W(_,j[0]),(!p||R&2)&&W(m,j[1]),j[1]>1?v||(v=Ye(),v.c(),v.m(c,null)):v&&(v.d(1),v=null)},i(j){p||(P(w.$$.fragment,j),p=!0)},o(j){C(w.$$.fragment,j),p=!1},d(j){j&&(b(e),b(y),b(A)),v&&v.d(),Z(w),E=!1,L()}}}function rl(l,e,t){let{root:n}=e,{api_count:i}=e;const o=ye(),s=()=>o("close");return l.$$set=r=>{"root"in r&&t(0,n=r.root),"api_count"in r&&t(1,i=r.api_count)},[n,i,o,s]}class sl extends re{constructor(e){super(),se(this,e,rl,ol,ae,{root:0,api_count:1})}}class $e{#e;#t;constructor(e,t,n,i,o){this.#e=e,this.theme=n,this.version=i,this.#t=t,this.root=o}dispatch(e,t){const n=new CustomEvent("gradio",{bubbles:!0,detail:{data:t,id:this.#e,event:e}});this.#t.dispatchEvent(n)}}function xe(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 et(l){let e;return{c(){e=O("(")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function al(l){let e=l[2][l[10]].type+"",t;return{c(){t=O(e)},m(n,i){k(n,t,i)},p(n,i){i&4&&e!==(e=n[2][n[10]].type+"")&&W(t,e)},d(n){n&&b(t)}}}function _l(l){let e=l[6].type+"",t;return{c(){t=O(e)},m(n,i){k(n,t,i)},p(n,i){i&2&&e!==(e=n[6].type+"")&&W(t,e)},d(n){n&&b(t)}}}function tt(l){let e;return{c(){e=O(",")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function nt(l){let e,t,n,i,o=l[4]+"",s,r,_=l[7]+"",a,c;function f(A,w){return A[3]==="python"?_l:al}let m=f(l),g=m(l),y=l[1].length>1&&tt();return{c(){e=T("div"),t=T("span"),n=O("# "),g.c(),i=O(` | |
representing output in '`),s=O(o),r=O("' "),a=O(_),c=O(` | |
component`),y&&y.c(),u(t,"class","desc svelte-1c7hj3i"),u(e,"class","svelte-1c7hj3i"),Le(e,"second-level",l[1].length>1)},m(A,w){k(A,e,w),d(e,t),d(t,n),g.m(t,null),d(t,i),d(t,s),d(t,r),d(t,a),d(t,c),y&&y.m(e,null)},p(A,w){m===(m=f(A))&&g?g.p(A,w):(g.d(1),g=m(A),g&&(g.c(),g.m(t,i))),w&2&&o!==(o=A[4]+"")&&W(s,o),w&2&&_!==(_=A[7]+"")&&W(a,_),A[1].length>1?y||(y=tt(),y.c(),y.m(e,null)):y&&(y.d(1),y=null),w&2&&Le(e,"second-level",A[1].length>1)},d(A){A&&b(e),g.d(),y&&y.d()}}}function lt(l){let e;return{c(){e=O(")")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function it(l){let e,t,n;return t=new bn({props:{margin:!1}}),{c(){e=T("div"),Q(t.$$.fragment),u(e,"class","load-wrap svelte-1c7hj3i")},m(i,o){k(i,e,o),K(t,e,null),n=!0},i(i){n||(P(t.$$.fragment,i),n=!0)},o(i){C(t.$$.fragment,i),n=!1},d(i){i&&b(e),Z(t)}}}function cl(l){let e,t,n,i,o,s,r=l[1].length>1&&et(),_=ne(l[1]),a=[];for(let m=0;m<_.length;m+=1)a[m]=nt(xe(l,_,m));let c=l[1].length>1&<(),f=l[0]&&it();return{c(){e=T("div"),t=T("div"),r&&r.c(),n=U();for(let m=0;m<a.length;m+=1)a[m].c();i=U(),c&&c.c(),o=U(),f&&f.c(),u(t,"class","svelte-1c7hj3i"),Le(t,"hide",l[0]),u(e,"class","response-wrap svelte-1c7hj3i")},m(m,g){k(m,e,g),d(e,t),r&&r.m(t,null),d(t,n);for(let y=0;y<a.length;y+=1)a[y]&&a[y].m(t,null);d(t,i),c&&c.m(t,null),d(e,o),f&&f.m(e,null),s=!0},p(m,g){if(m[1].length>1?r||(r=et(),r.c(),r.m(t,n)):r&&(r.d(1),r=null),g&14){_=ne(m[1]);let y;for(y=0;y<_.length;y+=1){const A=xe(m,_,y);a[y]?a[y].p(A,g):(a[y]=nt(A),a[y].c(),a[y].m(t,i))}for(;y<a.length;y+=1)a[y].d(1);a.length=_.length}m[1].length>1?c||(c=lt(),c.c(),c.m(t,null)):c&&(c.d(1),c=null),(!s||g&1)&&Le(t,"hide",m[0]),m[0]?f?g&1&&P(f,1):(f=it(),f.c(),P(f,1),f.m(e,null)):f&&(le(),C(f,1,1,()=>{f=null}),ie())},i(m){s||(P(f),s=!0)},o(m){C(f),s=!1},d(m){m&&b(e),r&&r.d(),ge(a,m),c&&c.d(),f&&f.d()}}}function fl(l){let e,t,n,i;return n=new Ve({props:{$$slots:{default:[cl]},$$scope:{ctx:l}}}),{c(){e=T("h4"),e.innerHTML=`<div class="toggle-icon svelte-1c7hj3i"><div class="toggle-dot svelte-1c7hj3i"></div></div> | |
Return Type(s)`,t=U(),Q(n.$$.fragment),u(e,"class","svelte-1c7hj3i")},m(o,s){k(o,e,s),k(o,t,s),K(n,o,s),i=!0},p(o,[s]){const r={};s&2063&&(r.$$scope={dirty:s,ctx:o}),n.$set(r)},i(o){i||(P(n.$$.fragment,o),i=!0)},o(o){C(n.$$.fragment,o),i=!1},d(o){o&&(b(e),b(t)),Z(n,o)}}}function ul(l,e,t){let{is_running:n}=e,{endpoint_returns:i}=e,{js_returns:o}=e,{current_language:s}=e;return l.$$set=r=>{"is_running"in r&&t(0,n=r.is_running),"endpoint_returns"in r&&t(1,i=r.endpoint_returns),"js_returns"in r&&t(2,o=r.js_returns),"current_language"in r&&t(3,s=r.current_language)},[n,i,o,s]}class Ut extends re{constructor(e){super(),se(this,e,ul,fl,ae,{is_running:0,endpoint_returns:1,js_returns:2,current_language:3})}}function ml(l){let e;return{c(){e=O(l[0])},m(t,n){k(t,e,n)},p(t,n){n&1&&W(e,t[0])},d(t){t&&b(e)}}}function dl(l){let e,t;return e=new qn({props:{size:"sm",$$slots:{default:[ml]},$$scope:{ctx:l}}}),e.$on("click",l[1]),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,[i]){const o={};i&9&&(o.$$scope={dirty:i,ctx:n}),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function pl(l,e,t){let{code:n}=e,i="copy";function o(){navigator.clipboard.writeText(n),t(0,i="copied!"),setTimeout(()=>{t(0,i="copy")},1500)}return l.$$set=s=>{"code"in s&&t(2,n=s.code)},[i,o,n]}class Ie extends re{constructor(e){super(),se(this,e,pl,dl,ae,{code:2})}}function gl(l){let e,t,n,i,o,s;return t=new Ie({props:{code:rt}}),{c(){e=T("div"),Q(t.$$.fragment),n=U(),i=T("div"),o=T("pre"),o.textContent=`$ ${rt}`,u(e,"class","copy svelte-hq8ezf"),u(o,"class","svelte-hq8ezf")},m(r,_){k(r,e,_),K(t,e,null),k(r,n,_),k(r,i,_),d(i,o),s=!0},p:$,i(r){s||(P(t.$$.fragment,r),s=!0)},o(r){C(t.$$.fragment,r),s=!1},d(r){r&&(b(e),b(n),b(i)),Z(t)}}}function hl(l){let e,t,n,i,o,s;return t=new Ie({props:{code:ot}}),{c(){e=T("div"),Q(t.$$.fragment),n=U(),i=T("div"),o=T("pre"),o.textContent=`$ ${ot}`,u(e,"class","copy svelte-hq8ezf"),u(o,"class","svelte-hq8ezf")},m(r,_){k(r,e,_),K(t,e,null),k(r,n,_),k(r,i,_),d(i,o),s=!0},p:$,i(r){s||(P(t.$$.fragment,r),s=!0)},o(r){C(t.$$.fragment,r),s=!1},d(r){r&&(b(e),b(n),b(i)),Z(t)}}}function vl(l){let e,t,n,i;const o=[hl,gl],s=[];function r(_,a){return _[0]==="python"?0:_[0]==="javascript"?1:-1}return~(t=r(l))&&(n=s[t]=o[t](l)),{c(){e=T("code"),n&&n.c(),u(e,"class","svelte-hq8ezf")},m(_,a){k(_,e,a),~t&&s[t].m(e,null),i=!0},p(_,a){let c=t;t=r(_),t===c?~t&&s[t].p(_,a):(n&&(le(),C(s[c],1,1,()=>{s[c]=null}),ie()),~t?(n=s[t],n?n.p(_,a):(n=s[t]=o[t](_),n.c()),P(n,1),n.m(e,null)):n=null)},i(_){i||(P(n),i=!0)},o(_){C(n),i=!1},d(_){_&&b(e),~t&&s[t].d()}}}function bl(l){let e,t;return e=new Ve({props:{$$slots:{default:[vl]},$$scope:{ctx:l}}}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,[i]){const o={};i&3&&(o.$$scope={dirty:i,ctx:n}),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}let ot="pip install gradio_client",rt="npm i -D @gradio/client";function kl(l,e,t){let{current_language:n}=e;return l.$$set=i=>{"current_language"in i&&t(0,n=i.current_language)},[n]}class wl extends re{constructor(e){super(),se(this,e,kl,bl,ae,{current_language:0})}}function El(l){let e,t,n,i;return{c(){e=T("h3"),t=O(`fn_index: | |
`),n=T("span"),i=O(l[1]),u(n,"class","post svelte-41kcm6"),u(e,"class","svelte-41kcm6")},m(o,s){k(o,e,s),d(e,t),d(e,n),d(n,i)},p(o,s){s&2&&W(i,o[1])},d(o){o&&b(e)}}}function yl(l){let e,t,n,i="/"+l[0],o;return{c(){e=T("h3"),t=O(`api_name: | |
`),n=T("span"),o=O(i),u(n,"class","post svelte-41kcm6"),u(e,"class","svelte-41kcm6")},m(s,r){k(s,e,r),d(e,t),d(e,n),d(n,o)},p(s,r){r&1&&i!==(i="/"+s[0])&&W(o,i)},d(s){s&&b(e)}}}function jl(l){let e;function t(o,s){return o[2]?yl:El}let n=t(l),i=n(l);return{c(){i.c(),e=ce()},m(o,s){i.m(o,s),k(o,e,s)},p(o,[s]){n===(n=t(o))&&i?i.p(o,s):(i.d(1),i=n(o),i&&(i.c(),i.m(e.parentNode,e)))},i:$,o:$,d(o){o&&b(e),i.d(o)}}}function Al(l,e,t){let{api_name:n=null}=e,{fn_index:i=null}=e,{named:o}=e;return l.$$set=s=>{"api_name"in s&&t(0,n=s.api_name),"fn_index"in s&&t(1,i=s.fn_index),"named"in s&&t(2,o=s.named)},[n,i,o]}class Ft extends re{constructor(e){super(),se(this,e,Al,jl,ae,{api_name:0,fn_index:1,named:2})}}function st(l,e,t){const n=l.slice();return n[14]=e[t].label,n[15]=e[t].type,n[16]=e[t].python_type,n[17]=e[t].component,n[18]=e[t].example_input,n[19]=e[t].serializer,n[21]=t,n}function at(l,e,t){const n=l.slice();return n[14]=e[t].label,n[15]=e[t].type,n[16]=e[t].python_type,n[17]=e[t].component,n[18]=e[t].example_input,n[19]=e[t].serializer,n[21]=t,n}function _t(l,e,t){const n=l.slice();return n[14]=e[t].label,n[15]=e[t].type,n[16]=e[t].python_type,n[17]=e[t].component,n[18]=e[t].example_input,n[19]=e[t].serializer,n[21]=t,n}function Ol(l){let e,t;return e=new Ft({props:{named:l[6],fn_index:l[1]}}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,i){const o={};i&64&&(o.named=n[6]),i&2&&(o.fn_index=n[1]),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Ll(l){let e,t;return e=new Ft({props:{named:l[6],api_name:l[0].api_name}}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,i){const o={};i&64&&(o.named=n[6]),i&1&&(o.api_name=n[0].api_name),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Tl(l){let e,t,n,i,o,s,r,_,a,c,f,m,g,y,A;t=new Ie({props:{code:l[9]?.innerText}});let w=ne(l[11]),p=[];for(let q=0;q<w.length;q+=1)p[q]=ct(at(l,w,q));function E(q,M){return q[6]?Rl:Il}let L=E(l),v=L(l),j=ne(l[4]),R=[];for(let q=0;q<j.length;q+=1)R[q]=ut(st(l,j,q));return{c(){e=T("div"),Q(t.$$.fragment),n=U(),i=T("div"),o=T("pre"),s=O(`import { client } from "@gradio/client"; | |
`);for(let q=0;q<p.length;q+=1)p[q].c();r=O(` | |
const app = await client(`),_=T("span"),a=O('"'),c=O(l[2]),f=O('"'),m=O(`); | |
const result = await app.predict(`),v.c(),g=O(", [");for(let q=0;q<R.length;q+=1)R[q].c();y=O(` | |
]); | |
console.log(result.data); | |
`),u(e,"class","copy svelte-1d98qmk"),u(_,"class","token string svelte-1d98qmk"),u(o,"class","svelte-1d98qmk")},m(q,M){k(q,e,M),K(t,e,null),k(q,n,M),k(q,i,M),d(i,o),d(o,s);for(let J=0;J<p.length;J+=1)p[J]&&p[J].m(o,null);d(o,r),d(o,_),d(_,a),d(_,c),d(_,f),d(o,m),v.m(o,null),d(o,g);for(let J=0;J<R.length;J+=1)R[J]&&R[J].m(o,null);d(o,y),l[13](i),A=!0},p(q,M){const J={};if(M&512&&(J.code=q[9]?.innerText),t.$set(J),M&2048){w=ne(q[11]);let V;for(V=0;V<w.length;V+=1){const fe=at(q,w,V);p[V]?p[V].p(fe,M):(p[V]=ct(fe),p[V].c(),p[V].m(o,r))}for(;V<p.length;V+=1)p[V].d(1);p.length=w.length}if((!A||M&4)&&W(c,q[2]),L===(L=E(q))&&v?v.p(q,M):(v.d(1),v=L(q),v&&(v.c(),v.m(o,g))),M&1072){j=ne(q[4]);let V;for(V=0;V<j.length;V+=1){const fe=st(q,j,V);R[V]?R[V].p(fe,M):(R[V]=ut(fe),R[V].c(),R[V].m(o,y))}for(;V<R.length;V+=1)R[V].d(1);R.length=j.length}},i(q){A||(P(t.$$.fragment,q),A=!0)},o(q){C(t.$$.fragment,q),A=!1},d(q){q&&(b(e),b(n),b(i)),Z(t),ge(p,q),v.d(),ge(R,q),l[13](null)}}}function Pl(l){let e,t,n,i,o,s,r,_,a,c,f,m,g,y;t=new Ie({props:{code:l[8]?.innerText}});let A=ne(l[4]),w=[];for(let v=0;v<A.length;v+=1)w[v]=pt(_t(l,A,v));function p(v,j){return v[6]?Cl:ql}let E=p(l),L=E(l);return{c(){e=T("div"),Q(t.$$.fragment),n=U(),i=T("div"),o=T("pre"),s=O(`from gradio_client import Client | |
client = Client(`),r=T("span"),_=O('"'),a=O(l[2]),c=O('"'),f=O(`) | |
result = client.predict(`);for(let v=0;v<w.length;v+=1)w[v].c();m=O(` | |
`),L.c(),g=O(` | |
) | |
print(result)`),u(e,"class","copy svelte-1d98qmk"),u(r,"class","token string svelte-1d98qmk"),u(o,"class","svelte-1d98qmk")},m(v,j){k(v,e,j),K(t,e,null),k(v,n,j),k(v,i,j),d(i,o),d(o,s),d(o,r),d(r,_),d(r,a),d(r,c),d(o,f);for(let R=0;R<w.length;R+=1)w[R]&&w[R].m(o,null);d(o,m),L.m(o,null),d(o,g),l[12](i),y=!0},p(v,j){const R={};if(j&256&&(R.code=v[8]?.innerText),t.$set(R),(!y||j&4)&&W(a,v[2]),j&26){A=ne(v[4]);let q;for(q=0;q<A.length;q+=1){const M=_t(v,A,q);w[q]?w[q].p(M,j):(w[q]=pt(M),w[q].c(),w[q].m(o,m))}for(;q<w.length;q+=1)w[q].d(1);w.length=A.length}E===(E=p(v))&&L?L.p(v,j):(L.d(1),L=E(v),L&&(L.c(),L.m(o,g)))},i(v){y||(P(t.$$.fragment,v),y=!0)},o(v){C(t.$$.fragment,v),y=!1},d(v){v&&(b(e),b(n),b(i)),Z(t),ge(w,v),L.d(),l[12](null)}}}function ct(l){let e,t,n,i=l[18]+"",o,s,r=l[17]+"",_,a,c,f;return{c(){e=O(` | |
const response_`),t=O(l[21]),n=O(' = await fetch("'),o=O(i),s=O(`"); | |
const example`),_=O(r),a=O(" = await response_"),c=O(l[21]),f=O(`.blob(); | |
`)},m(m,g){k(m,e,g),k(m,t,g),k(m,n,g),k(m,o,g),k(m,s,g),k(m,_,g),k(m,a,g),k(m,c,g),k(m,f,g)},p:$,d(m){m&&(b(e),b(t),b(n),b(o),b(s),b(_),b(a),b(c),b(f))}}}function Il(l){let e;return{c(){e=O(l[1])},m(t,n){k(t,e,n)},p(t,n){n&2&&W(e,t[1])},d(t){t&&b(e)}}}function Rl(l){let e,t=l[0].api_name+"",n,i;return{c(){e=O('"/'),n=O(t),i=O('"')},m(o,s){k(o,e,s),k(o,n,s),k(o,i,s)},p(o,s){s&1&&t!==(t=o[0].api_name+"")&&W(n,t)},d(o){o&&(b(e),b(n),b(i))}}}function Dl(l){let e,t,n=Te(l[18],l[16].type,"js")+"",i,o,s,r,_=l[5][l[21]].type+"",a,c,f,m=l[14]+"",g,y,A=l[17]+"",w,p,E=l[5][l[21]].description&&ft(l);return{c(){e=O(` | |
`),t=T("span"),i=O(n),o=O(", "),s=T("span"),r=O("// "),a=O(_),c=O(" "),E&&E.c(),f=O(" in '"),g=O(m),y=O("' "),w=O(A),p=O(" component"),u(t,"class","example-inputs svelte-1d98qmk"),u(s,"class","desc svelte-1d98qmk")},m(L,v){k(L,e,v),k(L,t,v),d(t,i),k(L,o,v),k(L,s,v),d(s,r),d(s,a),d(s,c),E&&E.m(s,null),d(s,f),d(s,g),d(s,y),d(s,w),d(s,p)},p(L,v){v&16&&n!==(n=Te(L[18],L[16].type,"js")+"")&&W(i,n),v&32&&_!==(_=L[5][L[21]].type+"")&&W(a,_),L[5][L[21]].description?E?E.p(L,v):(E=ft(L),E.c(),E.m(s,f)):E&&(E.d(1),E=null),v&16&&m!==(m=L[14]+"")&&W(g,m),v&16&&A!==(A=L[17]+"")&&W(w,A)},d(L){L&&(b(e),b(t),b(o),b(s)),E&&E.d()}}}function Vl(l){let e,t,n,i=l[17]+"",o,s,r,_,a=l[14]+"",c,f,m=l[17]+"",g,y;return{c(){e=O(` | |
`),t=T("span"),n=O("example"),o=O(i),s=O(", "),r=T("span"),_=O(" // blob in '"),c=O(a),f=O("' "),g=O(m),y=O(" component"),u(t,"class","example-inputs svelte-1d98qmk"),u(r,"class","desc svelte-1d98qmk")},m(A,w){k(A,e,w),k(A,t,w),d(t,n),d(t,o),k(A,s,w),k(A,r,w),d(r,_),d(r,c),d(r,f),d(r,g),d(r,y)},p(A,w){w&16&&i!==(i=A[17]+"")&&W(o,i),w&16&&a!==(a=A[14]+"")&&W(c,a),w&16&&m!==(m=A[17]+"")&&W(g,m)},d(A){A&&(b(e),b(t),b(s),b(r))}}}function ft(l){let e,t=l[5][l[21]].description+"",n,i;return{c(){e=O("("),n=O(t),i=O(")")},m(o,s){k(o,e,s),k(o,n,s),k(o,i,s)},p(o,s){s&32&&t!==(t=o[5][o[21]].description+"")&&W(n,t)},d(o){o&&(b(e),b(n),b(i))}}}function ut(l){let e,t;function n(s,r){return r&16&&(e=null),e==null&&(e=!!s[10].includes(s[17])),e?Vl:Dl}let i=n(l,-1),o=i(l);return{c(){o.c(),t=ce()},m(s,r){o.m(s,r),k(s,t,r)},p(s,r){i===(i=n(s,r))&&o?o.p(s,r):(o.d(1),o=i(s),o&&(o.c(),o.m(t.parentNode,t)))},d(s){s&&b(t),o.d(s)}}}function mt(l){let e;return{c(){e=T("span"),e.textContent="ERROR",u(e,"class","error svelte-1d98qmk")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function dt(l){let e,t=l[16].description+"",n,i;return{c(){e=O("("),n=O(t),i=O(`) | |
`)},m(o,s){k(o,e,s),k(o,n,s),k(o,i,s)},p(o,s){s&16&&t!==(t=o[16].description+"")&&W(n,t)},d(o){o&&(b(e),b(n),b(i))}}}function pt(l){let e,t,n=Te(l[18],l[16].type,"py")+"",i,o,s,r,_=l[16].type+"",a,c,f,m=l[14]+"",g,y,A=l[17]+"",w,p,E=l[3][l[1]][l[21]]&&mt(),L=l[16].description&&dt(l);return{c(){e=O(` | |
`),t=T("span"),i=O(n),o=O(","),E&&E.c(),s=T("span"),r=O(" # "),a=O(_),c=O(" "),L&&L.c(),f=O("in '"),g=O(m),y=O("' "),w=O(A),p=O(" component"),u(t,"class","example-inputs svelte-1d98qmk"),u(s,"class","desc svelte-1d98qmk")},m(v,j){k(v,e,j),k(v,t,j),d(t,i),k(v,o,j),E&&E.m(v,j),k(v,s,j),d(s,r),d(s,a),d(s,c),L&&L.m(s,null),d(s,f),d(s,g),d(s,y),d(s,w),d(s,p)},p(v,j){j&16&&n!==(n=Te(v[18],v[16].type,"py")+"")&&W(i,n),v[3][v[1]][v[21]]?E||(E=mt(),E.c(),E.m(s.parentNode,s)):E&&(E.d(1),E=null),j&16&&_!==(_=v[16].type+"")&&W(a,_),v[16].description?L?L.p(v,j):(L=dt(v),L.c(),L.m(s,f)):L&&(L.d(1),L=null),j&16&&m!==(m=v[14]+"")&&W(g,m),j&16&&A!==(A=v[17]+"")&&W(w,A)},d(v){v&&(b(e),b(t),b(o),b(s)),E&&E.d(v),L&&L.d()}}}function ql(l){let e,t;return{c(){e=O("fn_index="),t=O(l[1])},m(n,i){k(n,e,i),k(n,t,i)},p(n,i){i&2&&W(t,n[1])},d(n){n&&(b(e),b(t))}}}function Cl(l){let e,t=l[0].api_name+"",n,i;return{c(){e=O('api_name="/'),n=O(t),i=O('"')},m(o,s){k(o,e,s),k(o,n,s),k(o,i,s)},p(o,s){s&1&&t!==(t=o[0].api_name+"")&&W(n,t)},d(o){o&&(b(e),b(n),b(i))}}}function Nl(l){let e,t,n,i;const o=[Pl,Tl],s=[];function r(_,a){return _[7]==="python"?0:_[7]==="javascript"?1:-1}return~(t=r(l))&&(n=s[t]=o[t](l)),{c(){e=T("code"),n&&n.c(),u(e,"class","svelte-1d98qmk")},m(_,a){k(_,e,a),~t&&s[t].m(e,null),i=!0},p(_,a){let c=t;t=r(_),t===c?~t&&s[t].p(_,a):(n&&(le(),C(s[c],1,1,()=>{s[c]=null}),ie()),~t?(n=s[t],n?n.p(_,a):(n=s[t]=o[t](_),n.c()),P(n,1),n.m(e,null)):n=null)},i(_){i||(P(n),i=!0)},o(_){C(n),i=!1},d(_){_&&b(e),~t&&s[t].d()}}}function Sl(l){let e,t,n,i,o,s;const r=[Ll,Ol],_=[];function a(c,f){return c[6]?0:1}return t=a(l),n=_[t]=r[t](l),o=new Ve({props:{$$slots:{default:[Nl]},$$scope:{ctx:l}}}),{c(){e=T("div"),n.c(),i=U(),Q(o.$$.fragment),u(e,"class","container svelte-1d98qmk")},m(c,f){k(c,e,f),_[t].m(e,null),d(e,i),K(o,e,null),s=!0},p(c,[f]){let m=t;t=a(c),t===m?_[t].p(c,f):(le(),C(_[m],1,1,()=>{_[m]=null}),ie(),n=_[t],n?n.p(c,f):(n=_[t]=r[t](c),n.c()),P(n,1),n.m(e,i));const g={};f&16778239&&(g.$$scope={dirty:f,ctx:c}),o.$set(g)},i(c){s||(P(n),P(o.$$.fragment,c),s=!0)},o(c){C(n),C(o.$$.fragment,c),s=!1},d(c){c&&b(e),_[t].d(),Z(o)}}}function zl(l,e,t){let{dependency:n}=e,{dependency_index:i}=e,{root:o}=e,{dependency_failures:s}=e,{endpoint_parameters:r}=e,{js_parameters:_}=e,{named:a}=e,{current_language:c}=e,f,m,g=["Audio","File","Image","Video"],y=r.filter(p=>g.includes(p.component));function A(p){Ee[p?"unshift":"push"](()=>{f=p,t(8,f)})}function w(p){Ee[p?"unshift":"push"](()=>{m=p,t(9,m)})}return l.$$set=p=>{"dependency"in p&&t(0,n=p.dependency),"dependency_index"in p&&t(1,i=p.dependency_index),"root"in p&&t(2,o=p.root),"dependency_failures"in p&&t(3,s=p.dependency_failures),"endpoint_parameters"in p&&t(4,r=p.endpoint_parameters),"js_parameters"in p&&t(5,_=p.js_parameters),"named"in p&&t(6,a=p.named),"current_language"in p&&t(7,c=p.current_language)},[n,i,o,s,r,_,a,c,f,m,g,y,A,w]}class Ht extends re{constructor(e){super(),se(this,e,zl,Sl,ae,{dependency:0,dependency_index:1,root:2,dependency_failures:3,endpoint_parameters:4,js_parameters:5,named:6,current_language:7})}}const Ml=""+new URL("python-20e39c92.svg",import.meta.url).href,Bl=""+new URL("javascript-850cf94b.svg",import.meta.url).href;function gt(l,e,t){const n=l.slice();return n[18]=e[t],n[20]=t,n}function ht(l,e,t){const n=l.slice();return n[18]=e[t],n[20]=t,n}function vt(l,e,t){const n=l.slice();return n[22]=e[t][0],n[23]=e[t][1],n}function bt(l){let e,t,n,i,o;const s=[Fl,Ul],r=[];function _(a,c){return c&32&&(e=null),e==null&&(e=!!(Object.keys(a[5].named_endpoints).length+Object.keys(a[5].unnamed_endpoints).length)),e?0:1}return t=_(l,-1),n=r[t]=s[t](l),{c(){n.c(),i=ce()},m(a,c){r[t].m(a,c),k(a,i,c),o=!0},p(a,c){let f=t;t=_(a,c),t===f?r[t].p(a,c):(le(),C(r[f],1,1,()=>{r[f]=null}),ie(),n=r[t],n?n.p(a,c):(n=r[t]=s[t](a),n.c()),P(n,1),n.m(i.parentNode,i))},i(a){o||(P(n),o=!0)},o(a){C(n),o=!1},d(a){a&&b(i),r[t].d(a)}}}function Ul(l){let e,t;return e=new il({props:{root:l[0]}}),e.$on("close",l[12]),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,i){const o={};i&1&&(o.root=n[0]),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Fl(l){let e,t,n,i,o,s,r,_,a,c,f,m=Object.keys(l[5].named_endpoints).length,g,y,A=Object.keys(l[5].unnamed_endpoints).length,w,p;t=new sl({props:{root:l[0],api_count:Object.keys(l[5].named_endpoints).length+Object.keys(l[5].unnamed_endpoints).length}}),t.$on("close",l[10]);let E=ne(l[7]),L=[];for(let D=0;D<E.length;D+=1)L[D]=kt(vt(l,E,D));c=new wl({props:{current_language:l[2]}});let v=m&&wt(),j=ne(l[1]),R=[];for(let D=0;D<j.length;D+=1)R[D]=yt(ht(l,j,D));const q=D=>C(R[D],1,1,()=>{R[D]=null});let M=A&&jt(),J=ne(l[1]),V=[];for(let D=0;D<J.length;D+=1)V[D]=Ot(gt(l,J,D));const fe=D=>C(V[D],1,1,()=>{V[D]=null});return{c(){e=T("div"),Q(t.$$.fragment),n=U(),i=T("div"),o=T("div"),o.innerHTML=`<p>Use the <a href="https://gradio.app/docs/#python-client" target="_blank"><code class="library svelte-bdjvpc">gradio_client</code></a> | |
Python library or the | |
<a href="https://gradio.app/docs/#javascript-client" target="_blank"><code class="library svelte-bdjvpc">@gradio/client</code></a> Javascript package to query the demo via API.</p>`,s=U(),r=T("div"),_=T("div");for(let D=0;D<L.length;D+=1)L[D].c();a=U(),Q(c.$$.fragment),f=U(),v&&v.c(),g=U();for(let D=0;D<R.length;D+=1)R[D].c();y=U(),M&&M.c(),w=U();for(let D=0;D<V.length;D+=1)V[D].c();u(e,"class","banner-wrap svelte-bdjvpc"),u(o,"class","client-doc svelte-bdjvpc"),u(_,"class","snippets svelte-bdjvpc"),u(r,"class","endpoint svelte-bdjvpc"),u(i,"class","docs-wrap svelte-bdjvpc")},m(D,F){k(D,e,F),K(t,e,null),k(D,n,F),k(D,i,F),d(i,o),d(i,s),d(i,r),d(r,_);for(let X=0;X<L.length;X+=1)L[X]&&L[X].m(_,null);d(r,a),K(c,r,null),d(r,f),v&&v.m(r,null),d(r,g);for(let X=0;X<R.length;X+=1)R[X]&&R[X].m(r,null);d(r,y),M&&M.m(r,null),d(r,w);for(let X=0;X<V.length;X+=1)V[X]&&V[X].m(r,null);p=!0},p(D,F){const X={};if(F&1&&(X.root=D[0]),F&32&&(X.api_count=Object.keys(D[5].named_endpoints).length+Object.keys(D[5].unnamed_endpoints).length),t.$set(X),F&132){E=ne(D[7]);let I;for(I=0;I<E.length;I+=1){const x=vt(D,E,I);L[I]?L[I].p(x,F):(L[I]=kt(x),L[I].c(),L[I].m(_,null))}for(;I<L.length;I+=1)L[I].d(1);L.length=E.length}const _e={};if(F&4&&(_e.current_language=D[2]),c.$set(_e),F&32&&(m=Object.keys(D[5].named_endpoints).length),m?v||(v=wt(),v.c(),v.m(r,g)):v&&(v.d(1),v=null),F&127){j=ne(D[1]);let I;for(I=0;I<j.length;I+=1){const x=ht(D,j,I);R[I]?(R[I].p(x,F),P(R[I],1)):(R[I]=yt(x),R[I].c(),P(R[I],1),R[I].m(r,y))}for(le(),I=j.length;I<R.length;I+=1)q(I);ie()}if(F&32&&(A=Object.keys(D[5].unnamed_endpoints).length),A?M||(M=jt(),M.c(),M.m(r,w)):M&&(M.d(1),M=null),F&127){J=ne(D[1]);let I;for(I=0;I<J.length;I+=1){const x=gt(D,J,I);V[I]?(V[I].p(x,F),P(V[I],1)):(V[I]=Ot(x),V[I].c(),P(V[I],1),V[I].m(r,null))}for(le(),I=J.length;I<V.length;I+=1)fe(I);ie()}},i(D){if(!p){P(t.$$.fragment,D),P(c.$$.fragment,D);for(let F=0;F<j.length;F+=1)P(R[F]);for(let F=0;F<J.length;F+=1)P(V[F]);p=!0}},o(D){C(t.$$.fragment,D),C(c.$$.fragment,D),R=R.filter(Boolean);for(let F=0;F<R.length;F+=1)C(R[F]);V=V.filter(Boolean);for(let F=0;F<V.length;F+=1)C(V[F]);p=!1},d(D){D&&(b(e),b(n),b(i)),Z(t),ge(L,D),Z(c),v&&v.d(),ge(R,D),M&&M.d(),ge(V,D)}}}function kt(l){let e,t,n,i,o=l[22]+"",s,r,_,a,c;function f(){return l[11](l[22])}return{c(){e=T("li"),t=T("img"),i=U(),s=O(o),r=U(),je(t.src,n=l[23])||u(t,"src",n),u(t,"alt",""),u(t,"class","svelte-bdjvpc"),u(e,"class",_="snippet "+(l[2]===l[22]?"current-lang":"inactive-lang")+" svelte-bdjvpc")},m(m,g){k(m,e,g),d(e,t),d(e,i),d(e,s),d(e,r),a||(c=pe(e,"click",f),a=!0)},p(m,g){l=m,g&4&&_!==(_="snippet "+(l[2]===l[22]?"current-lang":"inactive-lang")+" svelte-bdjvpc")&&u(e,"class",_)},d(m){m&&b(e),a=!1,c()}}}function wt(l){let e;return{c(){e=T("h2"),e.textContent="Named Endpoints",u(e,"class","header svelte-bdjvpc")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function Et(l){let e,t,n,i,o;return t=new Ht({props:{named:!0,endpoint_parameters:l[5].named_endpoints["/"+l[18].api_name].parameters,js_parameters:l[6].named_endpoints["/"+l[18].api_name].parameters,dependency:l[18],dependency_index:l[20],current_language:l[2],root:l[0],dependency_failures:l[4]}}),i=new Ut({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:l[3],current_language:l[2]}}),{c(){e=T("div"),Q(t.$$.fragment),n=U(),Q(i.$$.fragment),u(e,"class","endpoint-container svelte-bdjvpc")},m(s,r){k(s,e,r),K(t,e,null),d(e,n),K(i,e,null),o=!0},p(s,r){const _={};r&34&&(_.endpoint_parameters=s[5].named_endpoints["/"+s[18].api_name].parameters),r&66&&(_.js_parameters=s[6].named_endpoints["/"+s[18].api_name].parameters),r&2&&(_.dependency=s[18]),r&4&&(_.current_language=s[2]),r&1&&(_.root=s[0]),r&16&&(_.dependency_failures=s[4]),t.$set(_);const a={};r&34&&(a.endpoint_returns=s[5].named_endpoints["/"+s[18].api_name].returns),r&66&&(a.js_returns=s[6].named_endpoints["/"+s[18].api_name].returns),r&8&&(a.is_running=s[3]),r&4&&(a.current_language=s[2]),i.$set(a)},i(s){o||(P(t.$$.fragment,s),P(i.$$.fragment,s),o=!0)},o(s){C(t.$$.fragment,s),C(i.$$.fragment,s),o=!1},d(s){s&&b(e),Z(t),Z(i)}}}function yt(l){let e,t,n=l[18].api_name&&Et(l);return{c(){n&&n.c(),e=ce()},m(i,o){n&&n.m(i,o),k(i,e,o),t=!0},p(i,o){i[18].api_name?n?(n.p(i,o),o&2&&P(n,1)):(n=Et(i),n.c(),P(n,1),n.m(e.parentNode,e)):n&&(le(),C(n,1,1,()=>{n=null}),ie())},i(i){t||(P(n),t=!0)},o(i){C(n),t=!1},d(i){i&&b(e),n&&n.d(i)}}}function jt(l){let e;return{c(){e=T("h2"),e.textContent="Unnamed Endpoints",u(e,"class","header svelte-bdjvpc")},m(t,n){k(t,e,n)},d(t){t&&b(e)}}}function At(l){let e,t,n,i,o,s;return t=new Ht({props:{named:!1,endpoint_parameters:l[5].unnamed_endpoints[l[20]].parameters,js_parameters:l[6].unnamed_endpoints[l[20]].parameters,dependency:l[18],dependency_index:l[20],current_language:l[2],root:l[0],dependency_failures:l[4]}}),i=new Ut({props:{endpoint_returns:l[5].unnamed_endpoints[l[20]].returns,js_returns:l[6].unnamed_endpoints[l[20]].returns,is_running:l[3],current_language:l[2]}}),{c(){e=T("div"),Q(t.$$.fragment),n=U(),Q(i.$$.fragment),o=U(),u(e,"class","endpoint-container svelte-bdjvpc")},m(r,_){k(r,e,_),K(t,e,null),d(e,n),K(i,e,null),d(e,o),s=!0},p(r,_){const a={};_&32&&(a.endpoint_parameters=r[5].unnamed_endpoints[r[20]].parameters),_&64&&(a.js_parameters=r[6].unnamed_endpoints[r[20]].parameters),_&2&&(a.dependency=r[18]),_&4&&(a.current_language=r[2]),_&1&&(a.root=r[0]),_&16&&(a.dependency_failures=r[4]),t.$set(a);const c={};_&32&&(c.endpoint_returns=r[5].unnamed_endpoints[r[20]].returns),_&64&&(c.js_returns=r[6].unnamed_endpoints[r[20]].returns),_&8&&(c.is_running=r[3]),_&4&&(c.current_language=r[2]),i.$set(c)},i(r){s||(P(t.$$.fragment,r),P(i.$$.fragment,r),s=!0)},o(r){C(t.$$.fragment,r),C(i.$$.fragment,r),s=!1},d(r){r&&b(e),Z(t),Z(i)}}}function Ot(l){let e,t,n=l[5].unnamed_endpoints[l[20]]&&At(l);return{c(){n&&n.c(),e=ce()},m(i,o){n&&n.m(i,o),k(i,e,o),t=!0},p(i,o){i[5].unnamed_endpoints[i[20]]?n?(n.p(i,o),o&32&&P(n,1)):(n=At(i),n.c(),P(n,1),n.m(e.parentNode,e)):n&&(le(),C(n,1,1,()=>{n=null}),ie())},i(i){t||(P(n),t=!0)},o(i){C(n),t=!1},d(i){i&&b(e),n&&n.d(i)}}}function Hl(l){let e,t,n=l[5]&&bt(l);return{c(){n&&n.c(),e=ce()},m(i,o){n&&n.m(i,o),k(i,e,o),t=!0},p(i,[o]){i[5]?n?(n.p(i,o),o&32&&P(n,1)):(n=bt(i),n.c(),P(n,1),n.m(e.parentNode,e)):n&&(le(),C(n,1,1,()=>{n=null}),ie())},i(i){t||(P(n),t=!0)},o(i){C(n),t=!1},d(i){i&&b(e),n&&n.d(i)}}}function Gl(l,e,t){let{instance_map:n}=e,{dependencies:i}=e,{root:o}=e,{app:s}=e;o===""&&(o=location.protocol+"//"+location.host+location.pathname),o.endsWith("/")||(o+="/");let r="python";const _=[["python",Ml],["javascript",Bl]];let a=!1;i.map(E=>E.inputs.map(L=>{let v=n[L].documentation?.example_data;return v===void 0?v="":typeof v=="object"&&(v=JSON.stringify(v)),v})),i.map(E=>new Array(E.outputs.length));let c=i.map(E=>new Array(E.inputs.length).fill(!1));async function f(){return await(await fetch(o+"info")).json()}async function m(){return await s.view_api()}let g,y;f().then(E=>t(5,g=E)),m().then(E=>t(6,y=E)),Pe(()=>(document.body.style.overflow="hidden","parentIFrame"in window&&window.parentIFrame?.scrollTo(0,0),()=>{document.body.style.overflow="auto"}));function A(E){he.call(this,l,E)}const w=E=>t(2,r=E);function p(E){he.call(this,l,E)}return l.$$set=E=>{"instance_map"in E&&t(8,n=E.instance_map),"dependencies"in E&&t(1,i=E.dependencies),"root"in E&&t(0,o=E.root),"app"in E&&t(9,s=E.app)},[o,i,r,a,c,g,y,_,n,s,A,w,p]}class Wl extends re{constructor(e){super(),se(this,e,Gl,Hl,ae,{instance_map:8,dependencies:1,root:0,app:9})}}function Lt(l,e,t){const n=l.slice();return n[9]=e[t].component,n[18]=e[t].id,n[2]=e[t].props,n[19]=e[t].children,n[20]=e[t].has_modes,n}function Tt(l){let e=[],t=new Map,n,i,o=ne(l[1]);const s=r=>r[18];for(let r=0;r<o.length;r+=1){let _=Lt(l,o,r),a=s(_);t.set(a,e[r]=Pt(a,_))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();n=ce()},m(r,_){for(let a=0;a<e.length;a+=1)e[a]&&e[a].m(r,_);k(r,n,_),i=!0},p(r,_){_&235&&(o=ne(r[1]),le(),e=zt(e,_,s,1,r,o,t,n.parentNode,An,Pt,n,Lt),ie())},i(r){if(!i){for(let _=0;_<o.length;_+=1)P(e[_]);i=!0}},o(r){for(let _=0;_<e.length;_+=1)C(e[_]);i=!1},d(r){r&&b(n);for(let _=0;_<e.length;_+=1)e[_].d(r)}}}function Pt(l,e){let t,n,i;return n=new Gt({props:{component:e[9],target:e[6],id:e[18],props:e[2],root:e[3],instance_map:e[0],children:e[19],dynamic_ids:e[5],has_modes:e[20],theme_mode:e[7]}}),n.$on("destroy",e[12]),n.$on("mount",e[13]),{key:l,first:null,c(){t=ce(),Q(n.$$.fragment),this.first=t},m(o,s){k(o,t,s),K(n,o,s),i=!0},p(o,s){e=o;const r={};s&2&&(r.component=e[9]),s&64&&(r.target=e[6]),s&2&&(r.id=e[18]),s&2&&(r.props=e[2]),s&8&&(r.root=e[3]),s&1&&(r.instance_map=e[0]),s&2&&(r.children=e[19]),s&32&&(r.dynamic_ids=e[5]),s&2&&(r.has_modes=e[20]),s&128&&(r.theme_mode=e[7]),n.$set(r)},i(o){i||(P(n.$$.fragment,o),i=!0)},o(o){C(n.$$.fragment,o),i=!1},d(o){o&&b(t),Z(n,o)}}}function Jl(l){let e,t,n=l[1]&&l[1].length&&Tt(l);return{c(){n&&n.c(),e=ce()},m(i,o){n&&n.m(i,o),k(i,e,o),t=!0},p(i,o){i[1]&&i[1].length?n?(n.p(i,o),o&2&&P(n,1)):(n=Tt(i),n.c(),P(n,1),n.m(e.parentNode,e)):n&&(le(),C(n,1,1,()=>{n=null}),ie())},i(i){t||(P(n),t=!0)},o(i){C(n),t=!1},d(i){i&&b(e),n&&n.d(i)}}}function Ql(l){let e,t,n,i;const o=[{elem_id:"elem_id"in l[2]&&l[2].elem_id||`component-${l[4]}`},{elem_classes:"elem_classes"in l[2]&&l[2].elem_classes||[]},{target:l[6]},l[2],{theme_mode:l[7]},{root:l[3]},{gradio:new $e(l[4],l[6],l[7],l[8],l[3])}];function s(a){l[15](a)}var r=l[9];function _(a){let c={$$slots:{default:[Jl]},$$scope:{ctx:a}};for(let f=0;f<o.length;f+=1)c=jn(c,o[f]);return a[0][a[4]].props.value!==void 0&&(c.value=a[0][a[4]].props.value),{props:c}}return r&&(e=Ge(r,_(l)),l[14](e),Ee.push(()=>We(e,"value",s)),e.$on("prop_change",l[10])),{c(){e&&Q(e.$$.fragment),n=ce()},m(a,c){e&&K(e,a,c),k(a,n,c),i=!0},p(a,[c]){const f=c&476?kn(o,[c&20&&{elem_id:"elem_id"in a[2]&&a[2].elem_id||`component-${a[4]}`},c&4&&{elem_classes:"elem_classes"in a[2]&&a[2].elem_classes||[]},c&64&&{target:a[6]},c&4&&wn(a[2]),c&128&&{theme_mode:a[7]},c&8&&{root:a[3]},c&472&&{gradio:new $e(a[4],a[6],a[7],a[8],a[3])}]):{};if(c&8388843&&(f.$$scope={dirty:c,ctx:a}),!t&&c&17&&(t=!0,f.value=a[0][a[4]].props.value,En(()=>t=!1)),c&512&&r!==(r=a[9])){if(e){le();const m=e;C(m.$$.fragment,1,0,()=>{Z(m,1)}),ie()}r?(e=Ge(r,_(a)),a[14](e),Ee.push(()=>We(e,"value",s)),e.$on("prop_change",a[10]),Q(e.$$.fragment),P(e.$$.fragment,1),K(e,n.parentNode,n)):e=null}else r&&e.$set(f)},i(a){i||(e&&P(e.$$.fragment,a),i=!0)},o(a){e&&C(e.$$.fragment,a),i=!1},d(a){a&&b(n),l[14](null),e&&Z(e,a)}}}function Kl(l,e,t){let{root:n}=e,{component:i}=e,{instance_map:o}=e,{id:s}=e,{props:r}=e,{children:_}=e,{dynamic_ids:a}=e,{parent:c=null}=e,{target:f}=e,{theme_mode:m}=e,{version:g}=e;const y=ye();let A=[];Pe(()=>{y("mount",s);for(const j of A)y("mount",j.id);return()=>{y("destroy",s);for(const j of A)y("mount",j.id)}}),yn("BLOCK_KEY",c);function w(j){for(const R in j.detail)t(0,o[s].props[R]=j.detail[R],o)}function p(j){he.call(this,l,j)}function E(j){he.call(this,l,j)}function L(j){Ee[j?"unshift":"push"](()=>{o[s].instance=j,t(0,o)})}function v(j){l.$$.not_equal(o[s].props.value,j)&&(o[s].props.value=j,t(0,o))}return l.$$set=j=>{"root"in j&&t(3,n=j.root),"component"in j&&t(9,i=j.component),"instance_map"in j&&t(0,o=j.instance_map),"id"in j&&t(4,s=j.id),"props"in j&&t(2,r=j.props),"children"in j&&t(1,_=j.children),"dynamic_ids"in j&&t(5,a=j.dynamic_ids),"parent"in j&&t(11,c=j.parent),"target"in j&&t(6,f=j.target),"theme_mode"in j&&t(7,m=j.theme_mode),"version"in j&&t(8,g=j.version)},l.$$.update=()=>{l.$$.dirty&3&&t(1,_=_&&_.filter(j=>{const R=o[j.id].type!=="statustracker";return R||A.push(j),R})),l.$$.dirty&19&&o[s].type==="form"&&(_?.every(j=>!j.props.visible)?t(2,r.visible=!1,r):t(2,r.visible=!0,r))},[o,_,r,n,s,a,f,m,g,i,w,c,p,E,L,v]}class Gt extends re{constructor(e){super(),se(this,e,Kl,Ql,ae,{root:3,component:9,instance_map:0,id:4,props:2,children:1,dynamic_ids:5,parent:11,target:6,theme_mode:7,version:8})}}function Zl(l){let e,t;return e=new Gt({props:{component:l[0].component,id:l[0].id,props:l[0].props,children:l[0].children,dynamic_ids:l[1],instance_map:l[2],root:l[3],target:l[4],theme_mode:l[5],version:l[6]}}),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,[i]){const o={};i&1&&(o.component=n[0].component),i&1&&(o.id=n[0].id),i&1&&(o.props=n[0].props),i&1&&(o.children=n[0].children),i&2&&(o.dynamic_ids=n[1]),i&4&&(o.instance_map=n[2]),i&8&&(o.root=n[3]),i&16&&(o.target=n[4]),i&32&&(o.theme_mode=n[5]),i&64&&(o.version=n[6]),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Xl(l,e,t){let{rootNode:n}=e,{dynamic_ids:i}=e,{instance_map:o}=e,{root:s}=e,{target:r}=e,{theme_mode:_}=e,{version:a}=e;const c=ye();return Pe(()=>{c("mount")}),l.$$set=f=>{"rootNode"in f&&t(0,n=f.rootNode),"dynamic_ids"in f&&t(1,i=f.dynamic_ids),"instance_map"in f&&t(2,o=f.instance_map),"root"in f&&t(3,s=f.root),"target"in f&&t(4,r=f.target),"theme_mode"in f&&t(5,_=f.theme_mode),"version"in f&&t(6,a=f.version)},[n,i,o,s,r,_,a]}class Yl extends re{constructor(e){super(),se(this,e,Xl,Zl,ae,{rootNode:0,dynamic_ids:1,instance_map:2,root:3,target:4,theme_mode:5,version:6})}}const $l=""+new URL("logo-0a070fcf.svg",import.meta.url).href;const{document:we}=In;function It(l){return we.title=l[3],{c:$,m:$,d:$}}function Rt(l){let e,t,n,i;return{c(){e=T("script"),e.innerHTML="",n=U(),i=T("script"),i.textContent=`window.dataLayer = window.dataLayer || []; | |
function gtag() { | |
dataLayer.push(arguments); | |
} | |
gtag("js", new Date()); | |
gtag("config", "UA-156449732-1");`,e.async=!0,e.defer=!0,je(e.src,t="https://www.googletagmanager.com/gtag/js?id=UA-156449732-1")||u(e,"src",t)},m(o,s){k(o,e,s),k(o,n,s),k(o,i,s)},d(o){o&&(b(e),b(n),b(i))}}}function Dt(l){let e,t;return e=new Yl({props:{rootNode:l[14],dynamic_ids:l[16],instance_map:l[17],root:l[1],target:l[5],theme_mode:l[10],version:l[12]}}),e.$on("mount",l[22]),e.$on("destroy",l[30]),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,i){const o={};i[0]&16384&&(o.rootNode=n[14]),i[0]&65536&&(o.dynamic_ids=n[16]),i[0]&131072&&(o.instance_map=n[17]),i[0]&2&&(o.root=n[1]),i[0]&32&&(o.target=n[5]),i[0]&1024&&(o.theme_mode=n[10]),i[0]&4096&&(o.version=n[12]),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function Vt(l){let e,t,n,i=l[19]("common.built_with_gradio")+"",o,s,r,_,a,c=l[6]&&qt(l);return{c(){e=T("footer"),c&&c.c(),t=U(),n=T("a"),o=O(i),s=U(),r=T("img"),je(r.src,_=$l)||u(r,"src",_),u(r,"alt",a=l[19]("common.logo")),u(r,"class","svelte-1ax1toq"),u(n,"href","https://gradio.app"),u(n,"class","built-with svelte-1ax1toq"),u(n,"target","_blank"),u(n,"rel","noreferrer"),u(e,"class","svelte-1ax1toq")},m(f,m){k(f,e,m),c&&c.m(e,null),d(e,t),d(e,n),d(n,o),d(n,s),d(n,r)},p(f,m){f[6]?c?c.p(f,m):(c=qt(f),c.c(),c.m(e,t)):c&&(c.d(1),c=null),m[0]&524288&&i!==(i=f[19]("common.built_with_gradio")+"")&&W(o,i),m[0]&524288&&a!==(a=f[19]("common.logo"))&&u(r,"alt",a)},d(f){f&&b(e),c&&c.d()}}}function qt(l){let e,t=l[19]("errors.use_via_api")+"",n,i,o,s,r,_,a,c,f;return{c(){e=T("button"),n=O(t),i=U(),o=T("img"),_=U(),a=T("div"),a.textContent="·",je(o.src,s=Bt)||u(o,"src",s),u(o,"alt",r=l[19]("common.logo")),u(o,"class","svelte-1ax1toq"),u(e,"class","show-api svelte-1ax1toq"),u(a,"class","svelte-1ax1toq")},m(m,g){k(m,e,g),d(e,n),d(e,i),d(e,o),k(m,_,g),k(m,a,g),c||(f=pe(e,"click",l[31]),c=!0)},p(m,g){g[0]&524288&&t!==(t=m[19]("errors.use_via_api")+"")&&W(n,t),g[0]&524288&&r!==(r=m[19]("common.logo"))&&u(o,"alt",r)},d(m){m&&(b(e),b(_),b(a)),c=!1,f()}}}function Ct(l){let e,t,n,i,o,s,r,_;return o=new Wl({props:{instance_map:l[17],dependencies:l[2],root:l[1],app:l[11]}}),o.$on("close",l[33]),{c(){e=T("div"),t=T("div"),n=U(),i=T("div"),Q(o.$$.fragment),u(t,"class","backdrop svelte-1ax1toq"),u(i,"class","api-docs-wrap svelte-1ax1toq"),u(e,"class","api-docs svelte-1ax1toq")},m(a,c){k(a,e,c),d(e,t),d(e,n),d(e,i),K(o,i,null),s=!0,r||(_=pe(t,"click",l[32]),r=!0)},p(a,c){const f={};c[0]&131072&&(f.instance_map=a[17]),c[0]&4&&(f.dependencies=a[2]),c[0]&2&&(f.root=a[1]),c[0]&2048&&(f.app=a[11]),o.$set(f)},i(a){s||(P(o.$$.fragment,a),s=!0)},o(a){C(o.$$.fragment,a),s=!1},d(a){a&&b(e),Z(o),r=!1,_()}}}function Nt(l){let e,t;return e=new el({props:{messages:l[18]}}),e.$on("close",l[21]),{c(){Q(e.$$.fragment)},m(n,i){K(e,n,i),t=!0},p(n,i){const o={};i[0]&262144&&(o.messages=n[18]),e.$set(o)},i(n){t||(P(e.$$.fragment,n),t=!0)},o(n){C(e.$$.fragment,n),t=!1},d(n){Z(e,n)}}}function xl(l){let e,t,n,i,o,s,r,_,a,c,f=l[8]&&It(l),m=l[4]&&Rt(),g=l[0]&&Dt(l),y=l[7]&&Vt(l),A=l[15]&&l[0]&&Ct(l),w=l[18]&&Nt(l);return{c(){f&&f.c(),e=ce(),m&&m.c(),t=ce(),n=U(),i=T("div"),o=T("div"),g&&g.c(),s=U(),y&&y.c(),r=U(),A&&A.c(),_=U(),w&&w.c(),a=ce(),u(o,"class","contain"),ue(o,"flex-grow",l[9]?"1":"auto"),u(i,"class","wrap svelte-1ax1toq"),ue(i,"min-height",l[9]?"100%":"auto")},m(p,E){f&&f.m(we.head,null),d(we.head,e),m&&m.m(we.head,null),d(we.head,t),k(p,n,E),k(p,i,E),d(i,o),g&&g.m(o,null),d(i,s),y&&y.m(i,null),k(p,r,E),A&&A.m(p,E),k(p,_,E),w&&w.m(p,E),k(p,a,E),c=!0},p(p,E){p[8]?f||(f=It(p),f.c(),f.m(e.parentNode,e)):f&&(f.d(1),f=null),p[4]?m||(m=Rt(),m.c(),m.m(t.parentNode,t)):m&&(m.d(1),m=null),p[0]?g?(g.p(p,E),E[0]&1&&P(g,1)):(g=Dt(p),g.c(),P(g,1),g.m(o,null)):g&&(le(),C(g,1,1,()=>{g=null}),ie()),E[0]&512&&ue(o,"flex-grow",p[9]?"1":"auto"),p[7]?y?y.p(p,E):(y=Vt(p),y.c(),y.m(i,null)):y&&(y.d(1),y=null),E[0]&512&&ue(i,"min-height",p[9]?"100%":"auto"),p[15]&&p[0]?A?(A.p(p,E),E[0]&32769&&P(A,1)):(A=Ct(p),A.c(),P(A,1),A.m(_.parentNode,_)):A&&(le(),C(A,1,1,()=>{A=null}),ie()),p[18]?w?(w.p(p,E),E[0]&262144&&P(w,1)):(w=Nt(p),w.c(),P(w,1),w.m(a.parentNode,a)):w&&(le(),C(w,1,1,()=>{w=null}),ie())},i(p){c||(P(g),P(A),P(w),c=!0)},o(p){C(g),C(A),C(w),c=!1},d(p){p&&(b(n),b(i),b(r),b(_),b(a)),f&&f.d(p),b(e),m&&m.d(p),b(t),g&&g.d(),y&&y.d(),A&&A.d(p),w&&w.d(p)}}}const ei=/^'([^]+)'$/,ti=15,ni=10;function St(l,e,t){for(const n of t)for(const i of n[e])if(i===l)return!0;return!1}function li(l){return Array.isArray(l)&&l.length===0||l===""||l===0||!l}function ii(l){return"detail"in l}function oi(l,e,t){let n,i,o=$,s=()=>(o(),o=Rn(M,h=>t(29,i=h)),M),r;On(l,Ln,h=>t(19,r=h)),l.$$.on_destroy.push(()=>o()),Tn();let{root:_}=e,{components:a}=e,{layout:c}=e,{dependencies:f}=e,{title:m="Gradio"}=e,{analytics_enabled:g=!1}=e,{target:y}=e,{autoscroll:A}=e,{show_api:w=!0}=e,{show_footer:p=!0}=e,{control_page_title:E=!1}=e,{app_mode:L}=e,{theme_mode:v}=e,{app:j}=e,{space_id:R}=e,{version:q}=e,M=Je();s();let J={id:c.id,type:"column",props:{mode:"static"},has_modes:!1,instance:null,component:null};const V=Object.getPrototypeOf(async function(){}).constructor;f.forEach(h=>{if(h.js){const B=h.backend_fn?h.inputs.length===1:h.outputs.length===1;try{h.frontend_fn=new V("__fn_args",`let result = await (${h.js})(...__fn_args); | |
return (${B} && !Array.isArray(result)) ? [result] : result;`)}catch(S){console.error("Could not parse custom js method."),console.error(S)}}});let D=new URLSearchParams(window.location.search).get("view")==="api"&&w;function F(h){t(15,D=h);let B=new URLSearchParams(window.location.search);h?B.set("view","api"):B.delete("view"),history.replaceState(null,"","?"+B.toString())}let X=new Set,_e;async function I(h,B){try{const S=await Xe[h][B]();return{name:h,component:S}}catch(S){if(B==="interactive")try{const H=await Xe[h].static();return{name:h,component:H}}catch(H){throw console.error(`failed to load: ${h}`),console.error(H),H}else throw console.error(`failed to load: ${h}`),console.error(S),S}}let x=new Set,ve=new Map;async function qe(h,B,S,H){t(0,Ae=!1);let Y=S[h.id];const ee=(await H.get(`${Y.type}_${B.get(h.id)||"static"}`)).component;Y.component=ee.default,h.children&&(Y.children=h.children.map(z=>S[z.id]),await Promise.all(h.children.map(z=>qe(z,B,S,H))))}let{ready:Ae=!1}=e,{render_complete:Re=!1}=e;function Wt(){s(t(13,M=Je())),f.forEach((z,G)=>{M.register(G,z.inputs,z.outputs)});const h=new Set;for(const z of a){const{id:G,props:te}=z;(St(G,"inputs",f)||!St(G,"outputs",f)&&li(te?.value))&&h.add(G)}t(16,X=h);const B={id:c.id,type:"column",props:{mode:"static"},has_modes:!1,instance:null,component:null};a.push(B);const S=new Set,H=new Map,Y=new Map,ee=a.reduce((z,G)=>(z[G.id]=G,z),{});a.forEach(z=>{z.props.interactive===!1?z.props.mode="static":z.props.interactive===!0||X.has(z.id)?z.props.mode="interactive":z.props.mode="static",Y.set(z.id,z.props.mode);const G=I(z.type,z.props.mode);S.add(G),H.set(`${z.type}_${z.props.mode}`,G)}),Promise.all(Array.from(S)).then(()=>{qe(c,Y,ee,H).then(async()=>{t(0,Ae=!0),x=S,ve=H,t(17,_e=ee),t(14,J=B)}).catch(z=>{console.error(z)})})}async function Jt(h,B){let S=B==="dynamic"?"interactive":B;if(h.props.mode===S)return;h.props.mode=S;const H=I(h.type,h.props.mode);x.add(H),ve.set(`${h.type}_${h.props.mode}`,H),H.then(Y=>{h.component=Y.component.default,t(14,J)})}function Ce(h,B){const S=f[B].outputs;h?.forEach((H,Y)=>{const ee=_e[S[Y]];if(ee.props.value_is_output=!0,typeof H=="object"&&H!==null&&H.__type__==="update")for(const[z,G]of Object.entries(H))z!=="__type__"&&(z==="mode"&&Jt(ee,G),ee.props[z]=G);else ee.props.value=H}),t(14,J)}let Ne=new Map;function Se(h,B,S){h?.props||(h.props={}),h.props[B]=S,t(14,J)}let ze=[],oe=[];function be(h,B,S){return{message:h,fn_index:B,type:S,id:++Qt}}let Qt=-1,De=!1;document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&(De=!0)});const Kt=r("blocks.long_requests_queue"),Zt=r("blocks.connection_can_break"),Xt=r("blocks.lost_connection"),Me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);let Be=!1,Ue=!1;async function ke(h,B=null){let S=f[h];const H=M.get_status_for_fn(h);if(t(18,oe=oe.filter(({fn_index:z})=>z!==h)),S.cancels&&await Promise.all(S.cancels.map(async z=>{const G=Ne.get(z);return G?.cancel(),G})),H==="pending"||H==="generating")return;let Y={fn_index:h,data:S.inputs.map(z=>_e[z].props.value),event_data:S.collects_event_data?B:null};S.frontend_fn?S.frontend_fn(Y.data.concat(S.outputs.map(z=>_e[z].props.value))).then(z=>{S.backend_fn?(Y.data=z,ee()):Ce(z,h)}):S.backend_fn&&ee();function ee(){const z=j.submit(Y.fn_index,Y.data,Y.event_data).on("data",({data:G,fn_index:te})=>{Ce(G,te)}).on("status",({fn_index:G,...te})=>{if(M.update({...te,status:te.stage,progress:te.progress_data,fn_index:G}),!Be&&R!==null&&te.position!==void 0&&te.position>=2&&te.eta!==void 0&&te.eta>ti&&(Be=!0,t(18,oe=[be(Kt,G,"warning"),...oe])),!Ue&&Me&&te.eta!==void 0&&te.eta>ni&&(Ue=!0,t(18,oe=[be(Zt,G,"warning"),...oe])),te.stage==="complete"&&(f.map(async(de,Oe)=>{de.trigger_after===G&&ke(Oe)}),z.destroy()),te.broken&&Me&&De)window.setTimeout(()=>{t(18,oe=[be(Xt,G,"error"),...oe])},0),ke(h,B),De=!1;else if(te.stage==="error"){if(te.message){const de=te.message.replace(ei,(Oe,sn)=>sn);t(18,oe=[be(de,G,"error"),...oe])}f.map(async(de,Oe)=>{de.trigger_after===G&&!de.trigger_only_on_success&&ke(Oe)}),z.destroy()}}).on("log",({log:G,fn_index:te,level:de})=>{t(18,oe=[be(G,te,de),...oe])});Ne.set(h,z)}}function Yt(h,B){if(R===null)return;const S=new URL(`https://huggingface.co/spaces/${R}/discussions/new`);h!==void 0&&h.length>0&&S.searchParams.set("title",h),S.searchParams.set("description",B),window.open(S.toString(),"_blank")}function $t(h){const B=h.detail;t(18,oe=oe.filter(S=>S.id!==B))}const xt=h=>!!(h&&new URL(h,location.href).origin!==location.origin);async function en(){await Dn();for(var h=y.getElementsByTagName("a"),B=0;B<h.length;B++){const S=h[B].getAttribute("target"),H=h[B].getAttribute("href");xt(H)&&S!=="_blank"&&h[B].setAttribute("target","_blank")}f.forEach((S,H)=>{S.targets.length===0&&S.trigger==="load"&&ke(H)}),y.addEventListener("gradio",S=>{if(!ii(S))throw new Error("not a custom event");const{id:H,event:Y,data:ee}=S.detail;if(Y==="share"){const{title:z,description:G}=ee;Yt(z,G)}else Y==="error"?t(18,oe=[be(ee,-1,"error"),...oe]):n[H]?.[Y]?.forEach(G=>{ke(G,ee)})}),t(24,Re=!0)}function Fe(h){ze=ze.map(B=>B.filter(S=>S!==h))}function tn(h){for(const S in h){let H=h[S],Y=f[H.fn_index];H.scroll_to_output=Y.scroll_to_output,H.show_progress=Y.show_progress,Se(_e[S],"loading_status",H)}const B=M.get_inputs_to_update();for(const[S,H]of B)Se(_e[S],"pending",H==="pending")}const nn=({detail:h})=>Fe(h),ln=()=>{F(!D)},on=()=>{F(!1)},rn=()=>{F(!1)};return l.$$set=h=>{"root"in h&&t(1,_=h.root),"components"in h&&t(25,a=h.components),"layout"in h&&t(26,c=h.layout),"dependencies"in h&&t(2,f=h.dependencies),"title"in h&&t(3,m=h.title),"analytics_enabled"in h&&t(4,g=h.analytics_enabled),"target"in h&&t(5,y=h.target),"autoscroll"in h&&t(27,A=h.autoscroll),"show_api"in h&&t(6,w=h.show_api),"show_footer"in h&&t(7,p=h.show_footer),"control_page_title"in h&&t(8,E=h.control_page_title),"app_mode"in h&&t(9,L=h.app_mode),"theme_mode"in h&&t(10,v=h.theme_mode),"app"in h&&t(11,j=h.app),"space_id"in h&&t(28,R=h.space_id),"version"in h&&t(12,q=h.version),"ready"in h&&t(0,Ae=h.ready),"render_complete"in h&&t(24,Re=h.render_complete)},l.$$.update=()=>{l.$$.dirty[0]&134217728&&Pn.update(h=>({...h,autoscroll:A})),l.$$.dirty[0]&100663296&&Wt(),l.$$.dirty[0]&4&&(n=f.reduce((h,B,S)=>{let{targets:H,trigger:Y}=B;return H.forEach(ee=>{h[ee]||(h[ee]={}),h[ee]?.[Y]?h[ee][Y].push(S):h[ee][Y]=[S]}),h},{})),l.$$.dirty[0]&536870912&&tn(i)},[Ae,_,f,m,g,y,w,p,E,L,v,j,q,M,J,D,X,_e,oe,r,F,$t,en,Fe,Re,a,c,A,R,i,nn,ln,on,rn]}class ri extends re{constructor(e){super(),se(this,e,oi,xl,ae,{root:1,components:25,layout:26,dependencies:2,title:3,analytics_enabled:4,target:5,autoscroll:27,show_api:6,show_footer:7,control_page_title:8,app_mode:9,theme_mode:10,app:11,space_id:28,version:12,ready:0,render_complete:24},null,[-1,-1])}}const ci=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"}));export{ci as B,el as T}; | |
//# sourceMappingURL=Blocks-45104e62.js.map | |