vendor: 15,535 bytes, lines 1-2
1import Je from"./ImagePreview-bmAqukFa.js";import{I as Oe}from"./ImageUploader-axQMO9IT.js";import{W as Wt}from"./ImageUploader-axQMO9IT.js";import{B as x}from"./Block-CygNNd5z.js";import"./MarkdownCode.svelte_svelte_type_style_lang-BOi9ccQ4.js";import"./IconButtonWrapper.svelte_svelte_type_style_lang-Dn324h3u.js";import{E as We}from"./Empty-AVq7jL0F.js";import{I as je}from"./FullscreenButton-CX5TOX2J.js";import{U as ee}from"./UploadText-2H6EHJRt.js";import{S as te}from"./index-kLQ4GxQn.js";import"./StreamingBar.svelte_svelte_type_style_lang-CDNxkBIr.js";import"./index-CATqIZE2.js";import{I as qt}from"./Image-CnqB5dbD.js";import{default as Tt}from"./Example-CC8yxxGn.js";import"./utils-BsGrhMNe.js";import"./BlockLabel-8WtM61r3.js";import"./IconButton-DSs-aBrk.js";import"./ShareButton-CuWfx-Ef.js";import"./Community-Dw1micSV.js";import"./Download-DVtk-Jv3.js";import"./IconButtonWrapper-jknaAjP6.js";import"./utils-Gtzs_Zla.js";import"./DownloadLink-QIttOhoR.js";import"./DownloadLink.svelte_svelte_type_style_lang-C_5UIfol.js";import"./file-url-DoxvUUVV.js";/* empty css */import"./Clear-By3xiIwg.js";import"./SelectSource-Bdxd6Yxj.js";import"./Upload-DnBnsgBY.js";/* empty css */import"./DropdownArrow-CFmkDyPW.js";import"./Square-oAGqOwsh.js";import"./index-_0dB-usw.js";import"./StreamingBar-BU9S4hA7.js";import"./prism-python-C8ubhYtN.js";import"./svelte/svelte.js";/* empty css */const{SvelteComponent:qe,add_flush_callback:E,assign:se,bind:P,binding_callbacks:N,check_outros:ie,create_component:k,destroy_component:I,detach:G,empty:ne,flush:f,get_spread_object:le,get_spread_update:ae,group_outros:oe,init:Ce,insert:H,mount_component:B,safe_not_equal:Te,space:re,transition_in:b,transition_out:w}=window.__gradio__svelte__internal,{afterUpdate:Ae}=window.__gradio__svelte__internal;function Ge(s){let e,i;return e=new x({props:{visible:s[5],variant:s[0]===null?"dashed":"solid",border_mode:s[28]?"focus":"base",padding:!1,elem_id:s[3],elem_classes:s[4],height:s[10]||void 0,width:s[11],allow_overflow:!1,container:s[14],scale:s[15],min_width:s[16],$$slots:{default:[Ve]},$$scope:{ctx:s}}}),e.$on("dragenter",s[31]),e.$on("dragleave",s[31]),e.$on("dragover",s[31]),e.$on("drop",s[32]),{c(){k(e.$$.fragment)},m(t,l){B(e,t,l),i=!0},p(t,l){const r={};l[0]&32&&(r.visible=t[5]),l[0]&1&&(r.variant=t[0]===null?"dashed":"solid"),l[0]&268435456&&(r.border_mode=t[28]?"focus":"base"),l[0]&8&&(r.elem_id=t[3]),l[0]&16&&(r.elem_classes=t[4]),l[0]&1024&&(r.height=t[10]||void 0),l[0]&2048&&(r.width=t[11]),l[0]&16384&&(r.container=t[14]),l[0]&32768&&(r.scale=t[15]),l[0]&65536&&(r.min_width=t[16]),l[0]&2138321607|l[1]&536870912&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(t){i||(b(e.$$.fragment,t),i=!0)},o(t){w(e.$$.fragment,t),i=!1},d(t){I(e,t)}}}function He(s){let e,i;return e=new x({props:{visible:s[5],variant:"solid",border_mode:s[28]?"focus":"base",padding:!1,elem_id:s[3],elem_classes:s[4],height:s[10]||void 0,width:s[11],allow_overflow:!1,container:s[14],scale:s[15],min_width:s[16],$$slots:{default:[Xe]},$$scope:{ctx:s}}}),{c(){k(e.$$.fragment)},m(t,l){B(e,t,l),i=!0},p(t,l){const r={};l[0]&32&&(r.visible=t[5]),l[0]&268435456&&(r.border_mode=t[28]?"focus":"base"),l[0]&8&&(r.elem_id=t[3]),l[0]&16&&(r.elem_classes=t[4]),l[0]&1024&&(r.height=t[10]||void 0),l[0]&2048&&(r.width=t[11]),l[0]&16384&&(r.container=t[14]),l[0]&32768&&(r.scale=t[15]),l[0]&65536&&(r.min_width=t[16]),l[0]&42082757|l[1]&536870912&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(t){i||(b(e.$$.fragment,t),i=!0)},o(t){w(e.$$.fragment,t),i=!1},d(t){I(e,t)}}}function Ke(s){let e,i;return e=new We({props:{unpadded_box:!0,size:"large",$$slots:{default:[Qe]},$$scope:{ctx:s}}}),{c(){k(e.$$.fragment)},m(t,l){B(e,t,l),i=!0},p(t,l){const r={};l[1]&536870912&&(r.$$scope={dirty:l,ctx:t}),e.$set(r)},i(t){i||(b(e.$$.fragment,t),i=!0)},o(t){w(e.$$.fragment,t),i=!1},d(t){I(e,t)}}}function Le(s){let e,i;return e=new ee({props:{i18n:s[25].i18n,type:"clipboard",mode:"short"}}),{c(){k(e.$$.fragment)},m(t,l){B(e,t,l),i=!0},p(t,l){const r={};l[0]&33554432&&(r.i18n=t[25].i18n),e.$set(r)},i(t){i||(b(e.$$.fragment,t),i=!0)},o(t){w(e.$$.fragment,t),i=!1},d(t){I(e,t)}}}function Me(s){let e,i;return e=new ee({props:{i18n:s[25].i18n,type:"image",placeholder:s[22]}}),{c(){k(e.$$.fragment)},m(t,l){B(e,t,l),i=!0},p(t,l){const r={};l[0]&33554432&&(r.i18n=t[25].i18n),l[0]&4194304&&(r.placeholder=t[22]),e.$set(r)},i(t){i||(b(e.$$.fragment,t),i=!0)},o(t){w(e.$$.fragment,t),i=!1},d(t){I(e,t)}}}function Qe(s){let e,i;return e=new je({}),{c(){k(e.$$.fragment)},m(t,l){B(e,t,l),i=!0},i(t){i||(b(e.$$.fragment,t),i=!0)},o(t){w(e.$$.fragment,t),i=!1},d(t){I(e,t)}}}function Re(s){let e,i,t,l;const r=[Me,Le,Ke],m=[];function _(a,c){return a[29]==="upload"||!a[29]?0:a[29]==="clipboard"?1:2}return e=_(s),i=m[e]=r[e](s),{c(){i.c(),t=ne()},m(a,c){m[e].m(a,c),H(a,t,c),l=!0},p(a,c){let h=e;e=_(a),e===h?m[e].p(a,c):(oe(),w(m[h],1,1,()=>{m[h]=null}),ie(),i=m[e],i?i.p(a,c):(i=m[e]=r[e](a),i.c()),b(i,1),i.m(t.parentNode,t))},i(a){l||(b(i),l=!0)},o(a){w(i),l=!1},d(a){a&&G(t),m[e].d(a)}}}function Ve(s){let e,i,t,l,r,m,_,a,c,h;const D=[{autoscroll:s[25].autoscroll},{i18n:s[25].i18n},s[2]];let p={};for(let o=0;o<D.length;o+=1)p=se(p,D[o]);e=new te({props:p}),e.$on("clear_status",s[41]);function F(o){s[44](o)}function O(o){s[45](o)}function W(o){s[46](o)}function j(o){s[47](o)}function q(o){s[48](o)}function C(o){s[49](o)}let v={selectable:s[13],root:s[9],sources:s[18],label:s[6],show_label:s[7],pending:s[21],streaming:s[20],webcam_options:s[24],stream_every:s[12],max_file_size:s[25].max_file_size,i18n:s[25].i18n,upload:s[42],stream_handler:s[25].client?.stream,$$slots:{default:[Re]},$$scope:{ctx:s}};return s[26]!==void 0&&(v.uploading=s[26]),s[29]!==void 0&&(v.active_source=s[29]),s[0]!==void 0&&(v.value=s[0]),s[28]!==void 0&&(v.dragging=s[28]),s[27]!==void 0&&(v.modify_stream=s[27]),s[1]!==void 0&&(v.set_time_limit=s[1]),t=new Oe({props:v}),s[43](t),N.push(()=>P(t,"uploading",F)),N.push(()=>P(t,"active_source",O)),N.push(()=>P(t,"value",W)),N.push(()=>P(t,"dragging",j)),N.push(()=>P(t,"modify_stream",q)),N.push(()=>P(t,"set_time_limit",C)),t.$on("edit",s[50]),t.$on("clear",s[51]),t.$on("stream",s[52]),t.$on("drag",s[53]),t.$on("upload",s[54]),t.$on("select",s[55]),t.$on("share",s[56]),t.$on("error",s[57]),t.$on("close_stream",s[58]),{c(){k(e.$$.fragment),i=re(),k(t.$$.fragment)},m(o,u){B(e,o,u),H(o,i,u),B(t,o,u),h=!0},p(o,u){const T=u[0]&33554436?ae(D,[u[0]&33554432&&{autoscroll:o[25].autoscroll},u[0]&33554432&&{i18n:o[25].i18n},u[0]&4&&le(o[2])]):{};e.$set(T);const g={};u[0]&8192&&(g.selectable=o[13]),u[0]&512&&(g.root=o[9]),u[0]&262144&&(g.sources=o[18]),u[0]&64&&(g.label=o[6]),u[0]&128&&(g.show_label=o[7]),u[0]&2097152&&(g.pending=o[21]),u[0]&1048576&&(g.streaming=o[20]),u[0]&16777216&&(g.webcam_options=o[24]),u[0]&4096&&(g.stream_every=o[12]),u[0]&33554432&&(g.max_file_size=o[25].max_file_size),u[0]&33554432&&(g.i18n=o[25].i18n),u[0]&33554432&&(g.upload=o[42]),u[0]&33554432&&(g.stream_handler=o[25].client?.stream),u[0]&574619648|u[1]&536870912&&(g.$$scope={dirty:u,ctx:o}),!l&&u[0]&67108864&&(l=!0,g.uploading=o[26],E(()=>l=!1)),!r&&u[0]&536870912&&(r=!0,g.active_source=o[29],E(()=>r=!1)),!m&&u[0]&1&&(m=!0,g.value=o[0],E(()=>m=!1)),!_&&u[0]&268435456&&(_=!0,g.dragging=o[28],E(()=>_=!1)),!a&&u[0]&134217728&&(a=!0,g.modify_stream=o[27],E(()=>a=!1)),!c&&u[0]&2&&(c=!0,g.set_time_limit=o[1],E(()=>c=!1)),t.$set(g)},i(o){h||(b(e.$$.fragment,o),b(t.$$.fragment,o),h=!0)},o(o){w(e.$$.fragment,o),w(t.$$.fragment,o),h=!1},d(o){o&&G(i),I(e,o),s[43](null),I(t,o)}}}function Xe(s){let e,i,t,l;const r=[{autoscroll:s[25].autoscroll},{i18n:s[25].i18n},s[2]];let m={};for(let _=0;_<r.length;_+=1)m=se(m,r[_]);return e=new te({props:m}),t=new Je({props:{value:s[0],label:s[6],show_label:s[7],show_download_button:s[8],selectable:s[13],show_share_button:s[17],i18n:s[25].i18n,show_fullscreen_button:s[23]}}),t.$on("select",s[38]),t.$on("share",s[39]),t.$on("error",s[40]),{c(){k(e.$$.fragment),i=re(),k(t.$$.fragment)},m(_,a){B(e,_,a),H(_,i,a),B(t,_,a),l=!0},p(_,a){const c=a[0]&33554436?ae(r,[a[0]&33554432&&{autoscroll:_[25].autoscroll},a[0]&33554432&&{i18n:_[25].i18n},a[0]&4&&le(_[2])]):{};e.$set(c);const h={};a[0]&1&&(h.value=_[0]),a[0]&64&&(h.label=_[6]),a[0]&128&&(h.show_label=_[7]),a[0]&256&&(h.show_download_button=_[8]),a[0]&8192&&(h.selectable=_[13]),a[0]&131072&&(h.show_share_button=_[17]),a[0]&33554432&&(h.i18n=_[25].i18n),a[0]&8388608&&(h.show_fullscreen_button=_[23]),t.$set(h)},i(_){l||(b(e.$$.fragment,_),b(t.$$.fragment,_),l=!0)},o(_){w(e.$$.fragment,_),w(t.$$.fragment,_),l=!1},d(_){_&&G(i),I(e,_),I(t,_)}}}function Ye(s){let e,i,t,l;const r=[He,Ge],m=[];function _(a,c){return a[19]?1:0}return e=_(s),i=m[e]=r[e](s),{c(){i.c(),t=ne()},m(a,c){m[e].m(a,c),H(a,t,c),l=!0},p(a,c){let h=e;e=_(a),e===h?m[e].p(a,c):(oe(),w(m[h],1,1,()=>{m[h]=null}),ie(),i=m[e],i?i.p(a,c):(i=m[e]=r[e](a),i.c()),b(i,1),i.m(t.parentNode,t))},i(a){l||(b(i),l=!0)},o(a){w(i),l=!1},d(a){a&&G(t),m[e].d(a)}}}function Ze(s,e,i){let t="closed",l=()=>{};function r(n){t=n,l(n)}const m=()=>t;let{set_time_limit:_}=e,{value_is_output:a=!1}=e,{elem_id:c=""}=e,{elem_classes:h=[]}=e,{visible:D=!0}=e,{value:p=null}=e,F=null,{label:O}=e,{show_label:W}=e,{show_download_button:j}=e,{root:q}=e,{height:C}=e,{width:v}=e,{stream_every:o}=e,{_selectable:u=!1}=e,{container:T=!0}=e,{scale:g=null}=e,{min_width:Q=void 0}=e,{loading_status:z}=e,{show_share_button:R=!1}=e,{sources:V=["upload","clipboard","webcam"]}=e,{interactive:K}=e,{streaming:X}=e,{pending:Y}=e,{placeholder:Z=void 0}=e,{show_fullscreen_button:y}=e,{input_ready:L}=e,{webcam_options:$}=e,A=!1,{gradio:d}=e;Ae(()=>{i(33,a=!1)});let U,M=null,J;const _e=n=>{const S=n;S.preventDefault(),S.stopPropagation(),S.type==="dragenter"||S.type==="dragover"?i(28,U=!0):S.type==="dragleave"&&i(28,U=!1)},ue=n=>{if(K){const S=n;S.preventDefault(),S.stopPropagation(),i(28,U=!1),J&&J.loadFilesFromDrop(S)}},fe=({detail:n})=>d.dispatch("select",n),me=({detail:n})=>d.dispatch("share",n),he=({detail:n})=>d.dispatch("error",n),ge=()=>d.dispatch("clear_status",z),ce=(...n)=>d.client.upload(...n);function de(n){N[n?"unshift":"push"](()=>{J=n,i(30,J)})}function be(n){A=n,i(26,A)}function we(n){M=n,i(29,M)}function pe(n){p=n,i(0,p)}function ve(n){U=n,i(28,U)}function ke(n){l=n,i(27,l)}function Ie(n){_=n,i(1,_)}const Be=()=>d.dispatch("edit"),Se=()=>{d.dispatch("clear")},ze=({detail:n})=>d.dispatch("stream",n),Ue=({detail:n})=>i(28,U=n),Ne=()=>d.dispatch("upload"),De=({detail:n})=>d.dispatch("select",n),Ee=({detail:n})=>d.dispatch("share",n),Pe=({detail:n})=>{i(2,z=z||{}),i(2,z.status="error",z),d.dispatch("error",n)},Fe=()=>{d.dispatch("close_stream","stream")};return s.$$set=n=>{"set_time_limit"in n&&i(1,_=n.set_time_limit),"value_is_output"in n&&i(33,a=n.value_is_output),"elem_id"in n&&i(3,c=n.elem_id),"elem_classes"in n&&i(4,h=n.elem_classes),"visible"in n&&i(5,D=n.visible),"value"in n&&i(0,p=n.value),"label"in n&&i(6,O=n.label),"show_label"in n&&i(7,W=n.show_label),"show_download_button"in n&&i(8,j=n.show_download_button),"root"in n&&i(9,q=n.root),"height"in n&&i(10,C=n.height),"width"in n&&i(11,v=n.width),"stream_every"in n&&i(12,o=n.stream_every),"_selectable"in n&&i(13,u=n._selectable),"container"in n&&i(14,T=n.container),"scale"in n&&i(15,g=n.scale),"min_width"in n&&i(16,Q=n.min_width),"loading_status"in n&&i(2,z=n.loading_status),"show_share_button"in n&&i(17,R=n.show_share_button),"sources"in n&&i(18,V=n.sources),"interactive"in n&&i(19,K=n.interactive),"streaming"in n&&i(20,X=n.streaming),"pending"in n&&i(21,Y=n.pending),"placeholder"in n&&i(22,Z=n.placeholder),"show_fullscreen_button"in n&&i(23,y=n.show_fullscreen_button),"input_ready"in n&&i(34,L=n.input_ready),"webcam_options"in n&&i(24,$=n.webcam_options),"gradio"in n&&i(25,d=n.gradio)},s.$$.update=()=>{s.$$.dirty[0]&67108864&&i(34,L=!A),s.$$.dirty[0]&33554433|s.$$.dirty[1]&68&&JSON.stringify(p)!==JSON.stringify(F)&&(i(37,F=p),d.dispatch("change"),a||d.dispatch("input"))},[p,_,z,c,h,D,O,W,j,q,C,v,o,u,T,g,Q,R,V,K,X,Y,Z,y,$,d,A,l,U,M,J,_e,ue,a,L,r,m,F,fe,me,he,ge,ce,de,be,we,pe,ve,ke,Ie,Be,Se,ze,Ue,Ne,De,Ee,Pe,Fe]}class Ft extends qe{constructor(e){super(),Ce(this,e,Ze,Ye,Te,{modify_stream_state:35,get_stream_state:36,set_time_limit:1,value_is_output:33,elem_id:3,elem_classes:4,visible:5,value:0,label:6,show_label:7,show_download_button:8,root:9,height:10,width:11,stream_every:12,_selectable:13,container:14,scale:15,min_width:16,loading_status:2,show_share_button:17,sources:18,interactive:19,streaming:20,pending:21,placeholder:22,show_fullscreen_button:23,input_ready:34,webcam_options:24,gradio:25},null,[-1,-1])}get modify_stream_state(){return this.$$.ctx[35]}get get_stream_state(){return this.$$.ctx[36]}get set_time_limit(){return this.$$.ctx[1]}set set_time_limit(e){this.$$set({set_time_limit:e}),f()}get value_is_output(){return this.$$.ctx[33]}set value_is_output(e){this.$$set({value_is_output:e}),f()}get elem_id(){return this.$$.ctx[3]}set elem_id(e){this.$$set({elem_id:e}),f()}get elem_classes(){return this.$$.ctx[4]}set elem_classes(e){this.$$set({elem_classes:e}),f()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),f()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),f()}get label(){return this.$$.ctx[6]}set label(e){this.$$set({label:e}),f()}get show_label(){return this.$$.ctx[7]}set show_label(e){this.$$set({show_label:e}),f()}get show_download_button(){return this.$$.ctx[8]}set show_download_button(e){this.$$set({show_download_button:e}),f()}get root(){return this.$$.ctx[9]}set root(e){this.$$set({root:e}),f()}get height(){return this.$$.ctx[10]}set height(e){this.$$set({height:e}),f()}get width(){return this.$$.ctx[11]}set width(e){this.$$set({width:e}),f()}get stream_every(){return this.$$.ctx[12]}set stream_every(e){this.$$set({stream_every:e}),f()}get _selectable(){return this.$$.ctx[13]}set _selectable(e){this.$$set({_selectable:e}),f()}get container(){return this.$$.ctx[14]}set container(e){this.$$set({container:e}),f()}get scale(){return this.$$.ctx[15]}set scale(e){this.$$set({scale:e}),f()}get min_width(){return this.$$.ctx[16]}set min_width(e){this.$$set({min_width:e}),f()}get loading_status(){return this.$$.ctx[2]}set loading_status(e){this.$$set({loading_status:e}),f()}get show_share_button(){return this.$$.ctx[17]}set show_share_button(e){this.$$set({show_share_button:e}),f()}get sources(){return this.$$.ctx[18]}set sources(e){this.$$set({sources:e}),f()}get interactive(){return this.$$.ctx[19]}set interactive(e){this.$$set({interactive:e}),f()}get streaming(){return this.$$.ctx[20]}set streaming(e){this.$$set({streaming:e}),f()}get pending(){return this.$$.ctx[21]}set pending(e){this.$$set({pending:e}),f()}get placeholder(){return this.$$.ctx[22]}set placeholder(e){this.$$set({placeholder:e}),f()}get show_fullscreen_button(){return this.$$.ctx[23]}set show_fullscreen_button(e){this.$$set({show_fullscreen_button:e}),f()}get input_ready(){return this.$$.ctx[34]}set input_ready(e){this.$$set({input_ready:e}),f()}get webcam_options(){return this.$$.ctx[24]}set webcam_options(e){this.$$set({webcam_options:e}),f()}get gradio(){return this.$$.ctx[25]}set gradio(e){this.$$set({gradio:e}),f()}}export{Tt as BaseExample,qt as BaseImage,Oe as BaseImageUploader,Je as BaseStaticImage,Wt as Webcam,Ft as default}; 2//# sourceMappingURL=Index-B9AowMMj.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.