vendor: 25,363 bytes, lines 1-3
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Canvas3D-DTT-naR9.js","./index-6iIxEka4.js","./index-deRdhtgc.css","./DownloadLink-Clun45p7.js","./DownloadLink-BxEHTUoe.css","./Canvas3DGS-1Ghhe6GD.js"])))=>i.map(i=>d[i]); 2import{_ as ie}from"./index-6iIxEka4.js";import{B as ge,p as ae,I as Re,a as Ie,D as Ve,v as Fe,b as Ee,E as He,U as Je}from"./FullscreenButton-CY3DenSN.js";import{j as Ke}from"./i18n-Dub1g69U.js";import{U as Qe,M as Xe}from"./ModifyUpload-DbxlaTpK.js";import{S as Se}from"./StreamingBar-DwBbQPSd.js";import{default as sn}from"./Example-Plzo0itC.js";import"./svelte/svelte.js";import"./MarkdownCode-B_oSAavQ.js";import"./prism-python-BTLJbtOb.js";import"./DownloadLink-Clun45p7.js";const{SvelteComponent:Ye,add_flush_callback:Me,append:Ze,attr:V,bind:le,binding_callbacks:Y,check_outros:te,construct_svelte_component:se,create_component:T,destroy_component:W,detach:F,element:Ne,empty:pe,flush:N,group_outros:ne,init:ye,insert:H,mount_component:A,safe_not_equal:xe,space:be,transition_in:w,transition_out:v}=window.__gradio__svelte__internal;function $e(o){let e,n,t,l,i,_;n=new Re({props:{$$slots:{default:[et]},$$scope:{ctx:o}}});const r=[nt,tt],s=[];function u(a,f){return a[10]?0:1}return l=u(o),i=s[l]=r[l](o),{c(){e=Ne("div"),T(n.$$.fragment),t=be(),i.c(),V(e,"class","model3D svelte-1mxwah3"),V(e,"data-testid","model3d")},m(a,f){H(a,e,f),A(n,e,null),Ze(e,t),s[l].m(e,null),_=!0},p(a,f){const m={};f&2115105&&(m.$$scope={dirty:f,ctx:a}),n.$set(m);let d=l;l=u(a),l===d?s[l].p(a,f):(ne(),v(s[d],1,1,()=>{s[d]=null}),te(),i=s[l],i?i.p(a,f):(i=s[l]=r[l](a),i.c()),w(i,1),i.m(e,null))},i(a){_||(w(n.$$.fragment,a),w(i),_=!0)},o(a){v(n.$$.fragment,a),v(i),_=!1},d(a){a&&F(e),W(n),s[l].d()}}}function ve(o){let e,n;return e=new Ie({props:{Icon:Fe,label:"Undo",disabled:!o[9]}}),e.$on("click",o[17]),{c(){T(e.$$.fragment)},m(t,l){A(e,t,l),n=!0},p(t,l){const i={};l&512&&(i.disabled=!t[9]),e.$set(i)},i(t){n||(w(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){W(e,t)}}}function et(o){let e,n,t,l,i,_=!o[10]&&ve(o);return t=new Ie({props:{Icon:Ve,label:o[5]("common.download")}}),{c(){_&&_.c(),e=be(),n=Ne("a"),T(t.$$.fragment),V(n,"href",o[14]),V(n,"target",window.__is_colab__?"_blank":null),V(n,"download",l=window.__is_colab__?null:o[0].orig_name||o[0].path)},m(r,s){_&&_.m(r,s),H(r,e,s),H(r,n,s),A(t,n,null),i=!0},p(r,s){r[10]?_&&(ne(),v(_,1,1,()=>{_=null}),te()):_?(_.p(r,s),s&1024&&w(_,1)):(_=ve(r),_.c(),w(_,1),_.m(e.parentNode,e));const u={};s&32&&(u.label=r[5]("common.download")),t.$set(u),(!i||s&16384)&&V(n,"href",r[14]),(!i||s&1&&l!==(l=window.__is_colab__?null:r[0].orig_name||r[0].path))&&V(n,"download",l)},i(r){i||(w(_),w(t.$$.fragment,r),i=!0)},o(r){v(_),v(t.$$.fragment,r),i=!1},d(r){r&&(F(e),F(n)),_&&_.d(r),W(t)}}}function tt(o){let e,n,t,l;function i(s){o[20](s)}var _=o[13];function r(s,u){let a={value:s[0],display_mode:s[1],clear_color:s[2],camera_position:s[8],zoom_speed:s[6],pan_speed:s[7]};return s[14]!==void 0&&(a.resolved_url=s[14]),{props:a}}return _&&(e=se(_,r(o)),o[19](e),Y.push(()=>le(e,"resolved_url",i))),{c(){e&&T(e.$$.fragment),t=pe()},m(s,u){e&&A(e,s,u),H(s,t,u),l=!0},p(s,u){if(u&8192&&_!==(_=s[13])){if(e){ne();const a=e;v(a.$$.fragment,1,0,()=>{W(a,1)}),te()}_?(e=se(_,r(s)),s[19](e),Y.push(()=>le(e,"resolved_url",i)),T(e.$$.fragment),w(e.$$.fragment,1),A(e,t.parentNode,t)):e=null}else if(_){const a={};u&1&&(a.value=s[0]),u&2&&(a.display_mode=s[1]),u&4&&(a.clear_color=s[2]),u&256&&(a.camera_position=s[8]),u&64&&(a.zoom_speed=s[6]),u&128&&(a.pan_speed=s[7]),!n&&u&16384&&(n=!0,a.resolved_url=s[14],Me(()=>n=!1)),e.$set(a)}},i(s){l||(e&&w(e.$$.fragment,s),l=!0)},o(s){e&&v(e.$$.fragment,s),l=!1},d(s){s&&F(t),o[19](null),e&&W(e,s)}}}function nt(o){let e,n,t,l;function i(s){o[18](s)}var _=o[12];function r(s,u){let a={value:s[0],zoom_speed:s[6],pan_speed:s[7]};return s[14]!==void 0&&(a.resolved_url=s[14]),{props:a}}return _&&(e=se(_,r(o)),Y.push(()=>le(e,"resolved_url",i))),{c(){e&&T(e.$$.fragment),t=pe()},m(s,u){e&&A(e,s,u),H(s,t,u),l=!0},p(s,u){if(u&4096&&_!==(_=s[12])){if(e){ne();const a=e;v(a.$$.fragment,1,0,()=>{W(a,1)}),te()}_?(e=se(_,r(s)),Y.push(()=>le(e,"resolved_url",i)),T(e.$$.fragment),w(e.$$.fragment,1),A(e,t.parentNode,t)):e=null}else if(_){const a={};u&1&&(a.value=s[0]),u&64&&(a.zoom_speed=s[6]),u&128&&(a.pan_speed=s[7]),!n&&u&16384&&(n=!0,a.resolved_url=s[14],Me(()=>n=!1)),e.$set(a)}},i(s){l||(e&&w(e.$$.fragment,s),l=!0)},o(s){e&&v(e.$$.fragment,s),l=!1},d(s){s&&F(t),e&&W(e,s)}}}function lt(o){let e,n,t,l;e=new ge({props:{show_label:o[4],Icon:ae,label:o[3]||o[5]("3D_model.3d_model")}});let i=o[0]&&$e(o);return{c(){T(e.$$.fragment),n=be(),i&&i.c(),t=pe()},m(_,r){A(e,_,r),H(_,n,r),i&&i.m(_,r),H(_,t,r),l=!0},p(_,[r]){const s={};r&16&&(s.show_label=_[4]),r&40&&(s.label=_[3]||_[5]("3D_model.3d_model")),e.$set(s),_[0]?i?(i.p(_,r),r&1&&w(i,1)):(i=$e(_),i.c(),w(i,1),i.m(t.parentNode,t)):i&&(ne(),v(i,1,1,()=>{i=null}),te())},i(_){l||(w(e.$$.fragment,_),w(i),l=!0)},o(_){v(e.$$.fragment,_),v(i),l=!1},d(_){_&&(F(n),F(t)),W(e,_),i&&i.d(_)}}}async function st(){return(await ie(()=>import("./Canvas3D-DTT-naR9.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).default}async function ot(){return(await ie(()=>import("./Canvas3DGS-1Ghhe6GD.js"),__vite__mapDeps([5,3,4]),import.meta.url)).default}function it(o,e,n){let{value:t}=e,{display_mode:l="solid"}=e,{clear_color:i=[0,0,0,0]}=e,{label:_=""}=e,{show_label:r}=e,{i18n:s}=e,{zoom_speed:u=1}=e,{pan_speed:a=1}=e,{camera_position:f=[null,null,null]}=e,{has_change_history:m=!1}=e,d={camera_position:f,zoom_speed:u,pan_speed:a},E=!1,k,b,S;function L(){S?.reset_camera_position()}let M;const P=()=>L();function q(g){M=g,n(14,M)}function G(g){Y[g?"unshift":"push"](()=>{S=g,n(11,S)})}function O(g){M=g,n(14,M)}return o.$$set=g=>{"value"in g&&n(0,t=g.value),"display_mode"in g&&n(1,l=g.display_mode),"clear_color"in g&&n(2,i=g.clear_color),"label"in g&&n(3,_=g.label),"show_label"in g&&n(4,r=g.show_label),"i18n"in g&&n(5,s=g.i18n),"zoom_speed"in g&&n(6,u=g.zoom_speed),"pan_speed"in g&&n(7,a=g.pan_speed),"camera_position"in g&&n(8,f=g.camera_position),"has_change_history"in g&&n(9,m=g.has_change_history)},o.$$.update=()=>{o.$$.dirty&1025&&t&&(n(10,E=t.path.endsWith(".splat")||t.path.endsWith(".ply")),E?ot().then(g=>{n(12,k=g)}):st().then(g=>{n(13,b=g)})),o.$$.dirty&68032&&(!Ke(d.camera_position,f)||d.zoom_speed!==u||d.pan_speed!==a)&&(S?.update_camera(f,u,a),n(16,d={camera_position:f,zoom_speed:u,pan_speed:a}))},[t,l,i,_,r,s,u,a,f,m,E,S,k,b,M,L,d,P,q,G,O]}class at extends Ye{constructor(e){super(),ye(this,e,it,lt,xe,{value:0,display_mode:1,clear_color:2,label:3,show_label:4,i18n:5,zoom_speed:6,pan_speed:7,camera_position:8,has_change_history:9})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),N()}get display_mode(){return this.$$.ctx[1]}set display_mode(e){this.$$set({display_mode:e}),N()}get clear_color(){return this.$$.ctx[2]}set clear_color(e){this.$$set({clear_color:e}),N()}get label(){return this.$$.ctx[3]}set label(e){this.$$set({label:e}),N()}get show_label(){return this.$$.ctx[4]}set show_label(e){this.$$set({show_label:e}),N()}get i18n(){return this.$$.ctx[5]}set i18n(e){this.$$set({i18n:e}),N()}get zoom_speed(){return this.$$.ctx[6]}set zoom_speed(e){this.$$set({zoom_speed:e}),N()}get pan_speed(){return this.$$.ctx[7]}set pan_speed(e){this.$$set({pan_speed:e}),N()}get camera_position(){return this.$$.ctx[8]}set camera_position(e){this.$$set({camera_position:e}),N()}get has_change_history(){return this.$$.ctx[9]}set has_change_history(e){this.$$set({has_change_history:e}),N()}}const{SvelteComponent:_t,add_flush_callback:ze,append:rt,attr:ut,bind:De,binding_callbacks:he,bubble:ft,check_outros:_e,construct_svelte_component:oe,create_component:J,create_slot:ct,destroy_component:K,detach:Z,element:dt,empty:we,flush:$,get_all_dirty_from_scope:mt,get_slot_changes:ht,group_outros:re,init:gt,insert:y,mount_component:Q,safe_not_equal:pt,space:Ue,transition_in:C,transition_out:I,update_slot_base:bt}=window.__gradio__svelte__internal,{createEventDispatcher:wt,tick:Ce}=window.__gradio__svelte__internal;function kt(o){let e,n,t,l,i,_;n=new Xe({props:{undoable:!o[14],i18n:o[7]}}),n.$on("clear",o[20]),n.$on("undo",o[21]);const r=[zt,vt],s=[];function u(a,f){return a[14]?0:1}return l=u(o),i=s[l]=r[l](o),{c(){e=dt("div"),J(n.$$.fragment),t=Ue(),i.c(),ut(e,"class","input-model svelte-jub4pj")},m(a,f){y(a,e,f),Q(n,e,null),rt(e,t),s[l].m(e,null),_=!0},p(a,f){const m={};f&16384&&(m.undoable=!a[14]),f&128&&(m.i18n=a[7]),n.$set(m);let d=l;l=u(a),l===d?s[l].p(a,f):(re(),I(s[d],1,1,()=>{s[d]=null}),_e(),i=s[l],i?i.p(a,f):(i=s[l]=r[l](a),i.c()),C(i,1),i.m(e,null))},i(a){_||(C(n.$$.fragment,a),C(i),_=!0)},o(a){I(n.$$.fragment,a),I(i),_=!1},d(a){a&&Z(e),K(n),s[l].d()}}}function $t(o){let e,n,t,l;function i(s){o[23](s)}function _(s){o[24](s)}let r={upload:o[12],stream_handler:o[13],root:o[6],max_file_size:o[10],filetype:[".stl",".obj",".gltf",".glb","model/obj",".splat",".ply"],aria_label:o[7]("model3d.drop_to_upload"),$$slots:{default:[Dt]},$$scope:{ctx:o}};return o[15]!==void 0&&(r.dragging=o[15]),o[1]!==void 0&&(r.uploading=o[1]),e=new Qe({props:r}),he.push(()=>De(e,"dragging",i)),he.push(()=>De(e,"uploading",_)),e.$on("load",o[19]),e.$on("error",o[25]),{c(){J(e.$$.fragment)},m(s,u){Q(e,s,u),l=!0},p(s,u){const a={};u&4096&&(a.upload=s[12]),u&8192&&(a.stream_handler=s[13]),u&64&&(a.root=s[6]),u&1024&&(a.max_file_size=s[10]),u&128&&(a.aria_label=s[7]("model3d.drop_to_upload")),u&134217728&&(a.$$scope={dirty:u,ctx:s}),!n&&u&32768&&(n=!0,a.dragging=s[15],ze(()=>n=!1)),!t&&u&2&&(t=!0,a.uploading=s[1],ze(()=>t=!1)),e.$set(a)},i(s){l||(C(e.$$.fragment,s),l=!0)},o(s){I(e.$$.fragment,s),l=!1},d(s){K(e,s)}}}function vt(o){let e,n,t;var l=o[17];function i(_,r){return{props:{value:_[0],display_mode:_[2],clear_color:_[3],camera_position:_[11],zoom_speed:_[8],pan_speed:_[9]}}}return l&&(e=oe(l,i(o)),o[26](e)),{c(){e&&J(e.$$.fragment),n=we()},m(_,r){e&&Q(e,_,r),y(_,n,r),t=!0},p(_,r){if(r&131072&&l!==(l=_[17])){if(e){re();const s=e;I(s.$$.fragment,1,0,()=>{K(s,1)}),_e()}l?(e=oe(l,i(_)),_[26](e),J(e.$$.fragment),C(e.$$.fragment,1),Q(e,n.parentNode,n)):e=null}else if(l){const s={};r&1&&(s.value=_[0]),r&4&&(s.display_mode=_[2]),r&8&&(s.clear_color=_[3]),r&2048&&(s.camera_position=_[11]),r&256&&(s.zoom_speed=_[8]),r&512&&(s.pan_speed=_[9]),e.$set(s)}},i(_){t||(e&&C(e.$$.fragment,_),t=!0)},o(_){e&&I(e.$$.fragment,_),t=!1},d(_){_&&Z(n),o[26](null),e&&K(e,_)}}}function zt(o){let e,n,t;var l=o[16];function i(_,r){return{props:{value:_[0],zoom_speed:_[8],pan_speed:_[9]}}}return l&&(e=oe(l,i(o))),{c(){e&&J(e.$$.fragment),n=we()},m(_,r){e&&Q(e,_,r),y(_,n,r),t=!0},p(_,r){if(r&65536&&l!==(l=_[16])){if(e){re();const s=e;I(s.$$.fragment,1,0,()=>{K(s,1)}),_e()}l?(e=oe(l,i(_)),J(e.$$.fragment),C(e.$$.fragment,1),Q(e,n.parentNode,n)):e=null}else if(l){const s={};r&1&&(s.value=_[0]),r&256&&(s.zoom_speed=_[8]),r&512&&(s.pan_speed=_[9]),e.$set(s)}},i(_){t||(e&&C(e.$$.fragment,_),t=!0)},o(_){e&&I(e.$$.fragment,_),t=!1},d(_){_&&Z(n),e&&K(e,_)}}}function Dt(o){let e;const n=o[22].default,t=ct(n,o,o[27],null);return{c(){t&&t.c()},m(l,i){t&&t.m(l,i),e=!0},p(l,i){t&&t.p&&(!e||i&134217728)&&bt(t,n,l,l[27],e?ht(n,l[27],i,null):mt(l[27]),null)},i(l){e||(C(t,l),e=!0)},o(l){I(t,l),e=!1},d(l){t&&t.d(l)}}}function Ct(o){let e,n,t,l,i,_;e=new ge({props:{show_label:o[5],Icon:ae,label:o[4]||"3D Model"}});const r=[$t,kt],s=[];function u(a,f){return a[0]===null?0:1}return t=u(o),l=s[t]=r[t](o),{c(){J(e.$$.fragment),n=Ue(),l.c(),i=we()},m(a,f){Q(e,a,f),y(a,n,f),s[t].m(a,f),y(a,i,f),_=!0},p(a,[f]){const m={};f&32&&(m.show_label=a[5]),f&16&&(m.label=a[4]||"3D Model"),e.$set(m);let d=t;t=u(a),t===d?s[t].p(a,f):(re(),I(s[d],1,1,()=>{s[d]=null}),_e(),l=s[t],l?l.p(a,f):(l=s[t]=r[t](a),l.c()),C(l,1),l.m(i.parentNode,i))},i(a){_||(C(e.$$.fragment,a),C(l),_=!0)},o(a){I(e.$$.fragment,a),I(l),_=!1},d(a){a&&(Z(n),Z(i)),K(e,a),s[t].d(a)}}}async function It(){return(await ie(()=>import("./Canvas3D-DTT-naR9.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).default}async function Et(){return(await ie(()=>import("./Canvas3DGS-1Ghhe6GD.js"),__vite__mapDeps([5,3,4]),import.meta.url)).default}function St(o,e,n){let{$$slots:t={},$$scope:l}=e,{value:i}=e,{display_mode:_="solid"}=e,{clear_color:r=[0,0,0,0]}=e,{label:s=""}=e,{show_label:u}=e,{root:a}=e,{i18n:f}=e,{zoom_speed:m=1}=e,{pan_speed:d=1}=e,{max_file_size:E=null}=e,{uploading:k=!1}=e,{camera_position:b=[null,null,null]}=e,{upload:S}=e,{stream_handler:L}=e;async function M({detail:h}){n(0,i=h),await Ce(),R("change",i),R("load",i)}async function P(){n(0,i=null),await Ce(),R("clear"),R("change")}let q=!1,G,O,g;async function ue(){g?.reset_camera_position()}const R=wt();let X=!1;function fe(h){X=h,n(15,X)}function ce(h){k=h,n(1,k)}function de(h){ft.call(this,o,h)}function me(h){he[h?"unshift":"push"](()=>{g=h,n(18,g)})}return o.$$set=h=>{"value"in h&&n(0,i=h.value),"display_mode"in h&&n(2,_=h.display_mode),"clear_color"in h&&n(3,r=h.clear_color),"label"in h&&n(4,s=h.label),"show_label"in h&&n(5,u=h.show_label),"root"in h&&n(6,a=h.root),"i18n"in h&&n(7,f=h.i18n),"zoom_speed"in h&&n(8,m=h.zoom_speed),"pan_speed"in h&&n(9,d=h.pan_speed),"max_file_size"in h&&n(10,E=h.max_file_size),"uploading"in h&&n(1,k=h.uploading),"camera_position"in h&&n(11,b=h.camera_position),"upload"in h&&n(12,S=h.upload),"stream_handler"in h&&n(13,L=h.stream_handler),"$$scope"in h&&n(27,l=h.$$scope)},o.$$.update=()=>{o.$$.dirty&16385&&i&&(n(14,q=i.path.endsWith(".splat")||i.path.endsWith(".ply")),q?Et().then(h=>{n(16,G=h)}):It().then(h=>{n(17,O=h)})),o.$$.dirty&32768&&R("drag",X)},[i,k,_,r,s,u,a,f,m,d,E,b,S,L,q,X,G,O,g,M,P,ue,t,fe,ce,de,me,l]}class Mt extends _t{constructor(e){super(),gt(this,e,St,Ct,pt,{value:0,display_mode:2,clear_color:3,label:4,show_label:5,root:6,i18n:7,zoom_speed:8,pan_speed:9,max_file_size:10,uploading:1,camera_position:11,upload:12,stream_handler:13})}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),$()}get display_mode(){return this.$$.ctx[2]}set display_mode(e){this.$$set({display_mode:e}),$()}get clear_color(){return this.$$.ctx[3]}set clear_color(e){this.$$set({clear_color:e}),$()}get label(){return this.$$.ctx[4]}set label(e){this.$$set({label:e}),$()}get show_label(){return this.$$.ctx[5]}set show_label(e){this.$$set({show_label:e}),$()}get root(){return this.$$.ctx[6]}set root(e){this.$$set({root:e}),$()}get i18n(){return this.$$.ctx[7]}set i18n(e){this.$$set({i18n:e}),$()}get zoom_speed(){return this.$$.ctx[8]}set zoom_speed(e){this.$$set({zoom_speed:e}),$()}get pan_speed(){return this.$$.ctx[9]}set pan_speed(e){this.$$set({pan_speed:e}),$()}get max_file_size(){return this.$$.ctx[10]}set max_file_size(e){this.$$set({max_file_size:e}),$()}get uploading(){return this.$$.ctx[1]}set uploading(e){this.$$set({uploading:e}),$()}get camera_position(){return this.$$.ctx[11]}set camera_position(e){this.$$set({camera_position:e}),$()}get upload(){return this.$$.ctx[12]}set upload(e){this.$$set({upload:e}),$()}get stream_handler(){return this.$$.ctx[13]}set stream_handler(e){this.$$set({stream_handler:e}),$()}}const{SvelteComponent:Nt,add_flush_callback:Ut,assign:Be,bind:Bt,binding_callbacks:jt,check_outros:je,create_component:U,destroy_component:B,detach:x,empty:qe,flush:p,get_spread_object:Le,get_spread_update:Pe,group_outros:Te,init:qt,insert:ee,mount_component:j,safe_not_equal:Lt,space:ke,transition_in:z,transition_out:D}=window.__gradio__svelte__internal;function Pt(o){let e,n;return e=new Ee({props:{visible:o[5],variant:o[0]===null?"dashed":"solid",border_mode:o[20]?"focus":"base",padding:!1,elem_id:o[3],elem_classes:o[4],container:o[11],scale:o[12],min_width:o[13],height:o[15],$$slots:{default:[At]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,l){j(e,t,l),n=!0},p(t,l){const i={};l[0]&32&&(i.visible=t[5]),l[0]&1&&(i.variant=t[0]===null?"dashed":"solid"),l[0]&1048576&&(i.border_mode=t[20]?"focus":"base"),l[0]&8&&(i.elem_id=t[3]),l[0]&16&&(i.elem_classes=t[4]),l[0]&2048&&(i.container=t[11]),l[0]&4096&&(i.scale=t[12]),l[0]&8192&&(i.min_width=t[13]),l[0]&32768&&(i.height=t[15]),l[0]&1787847|l[1]&8&&(i.$$scope={dirty:l,ctx:t}),e.$set(i)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){D(e.$$.fragment,t),n=!1},d(t){B(e,t)}}}function Tt(o){let e,n;return e=new Ee({props:{visible:o[5],variant:o[0]===null?"dashed":"solid",border_mode:o[20]?"focus":"base",padding:!1,elem_id:o[3],elem_classes:o[4],container:o[11],scale:o[12],min_width:o[13],height:o[15],$$slots:{default:[Vt]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment)},m(t,l){j(e,t,l),n=!0},p(t,l){const i={};l[0]&32&&(i.visible=t[5]),l[0]&1&&(i.variant=t[0]===null?"dashed":"solid"),l[0]&1048576&&(i.border_mode=t[20]?"focus":"base"),l[0]&8&&(i.elem_id=t[3]),l[0]&16&&(i.elem_classes=t[4]),l[0]&2048&&(i.container=t[11]),l[0]&4096&&(i.scale=t[12]),l[0]&8192&&(i.min_width=t[13]),l[0]&32768&&(i.height=t[15]),l[0]&214919|l[1]&8&&(i.$$scope={dirty:l,ctx:t}),e.$set(i)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){D(e.$$.fragment,t),n=!1},d(t){B(e,t)}}}function Wt(o){let e,n;return e=new Je({props:{i18n:o[14].i18n,type:"file"}}),{c(){U(e.$$.fragment)},m(t,l){j(e,t,l),n=!0},p(t,l){const i={};l[0]&16384&&(i.i18n=t[14].i18n),e.$set(i)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){D(e.$$.fragment,t),n=!1},d(t){B(e,t)}}}function At(o){let e,n,t,l,i;const _=[{autoscroll:o[14].autoscroll},{i18n:o[14].i18n},o[1]];let r={};for(let a=0;a<_.length;a+=1)r=Be(r,_[a]);e=new Se({props:r}),e.$on("clear_status",o[24]);function s(a){o[27](a)}let u={label:o[9],show_label:o[10],root:o[6],display_mode:o[7],clear_color:o[8],value:o[0],camera_position:o[17],zoom_speed:o[16],i18n:o[14].i18n,max_file_size:o[14].max_file_size,upload:o[25],stream_handler:o[26],$$slots:{default:[Wt]},$$scope:{ctx:o}};return o[19]!==void 0&&(u.uploading=o[19]),t=new Mt({props:u}),jt.push(()=>Bt(t,"uploading",s)),t.$on("change",o[28]),t.$on("drag",o[29]),t.$on("change",o[30]),t.$on("clear",o[31]),t.$on("load",o[32]),t.$on("error",o[33]),{c(){U(e.$$.fragment),n=ke(),U(t.$$.fragment)},m(a,f){j(e,a,f),ee(a,n,f),j(t,a,f),i=!0},p(a,f){const m=f[0]&16386?Pe(_,[f[0]&16384&&{autoscroll:a[14].autoscroll},f[0]&16384&&{i18n:a[14].i18n},f[0]&2&&Le(a[1])]):{};e.$set(m);const d={};f[0]&512&&(d.label=a[9]),f[0]&1024&&(d.show_label=a[10]),f[0]&64&&(d.root=a[6]),f[0]&128&&(d.display_mode=a[7]),f[0]&256&&(d.clear_color=a[8]),f[0]&1&&(d.value=a[0]),f[0]&131072&&(d.camera_position=a[17]),f[0]&65536&&(d.zoom_speed=a[16]),f[0]&16384&&(d.i18n=a[14].i18n),f[0]&16384&&(d.max_file_size=a[14].max_file_size),f[0]&16384&&(d.upload=a[25]),f[0]&16384&&(d.stream_handler=a[26]),f[0]&16384|f[1]&8&&(d.$$scope={dirty:f,ctx:a}),!l&&f[0]&524288&&(l=!0,d.uploading=a[19],Ut(()=>l=!1)),t.$set(d)},i(a){i||(z(e.$$.fragment,a),z(t.$$.fragment,a),i=!0)},o(a){D(e.$$.fragment,a),D(t.$$.fragment,a),i=!1},d(a){a&&x(n),B(e,a),B(t,a)}}}function Gt(o){let e,n,t,l;return e=new ge({props:{show_label:o[10],Icon:ae,label:o[9]||"3D Model"}}),t=new He({props:{unpadded_box:!0,size:"large",$$slots:{default:[Rt]},$$scope:{ctx:o}}}),{c(){U(e.$$.fragment),n=ke(),U(t.$$.fragment)},m(i,_){j(e,i,_),ee(i,n,_),j(t,i,_),l=!0},p(i,_){const r={};_[0]&1024&&(r.show_label=i[10]),_[0]&512&&(r.label=i[9]||"3D Model"),e.$set(r);const s={};_[1]&8&&(s.$$scope={dirty:_,ctx:i}),t.$set(s)},i(i){l||(z(e.$$.fragment,i),z(t.$$.fragment,i),l=!0)},o(i){D(e.$$.fragment,i),D(t.$$.fragment,i),l=!1},d(i){i&&x(n),B(e,i),B(t,i)}}}function Ot(o){let e,n;return e=new at({props:{value:o[0],i18n:o[14].i18n,display_mode:o[7],clear_color:o[8],label:o[9],show_label:o[10],camera_position:o[17],zoom_speed:o[16],has_change_history:o[2]}}),{c(){U(e.$$.fragment)},m(t,l){j(e,t,l),n=!0},p(t,l){const i={};l[0]&1&&(i.value=t[0]),l[0]&16384&&(i.i18n=t[14].i18n),l[0]&128&&(i.display_mode=t[7]),l[0]&256&&(i.clear_color=t[8]),l[0]&512&&(i.label=t[9]),l[0]&1024&&(i.show_label=t[10]),l[0]&131072&&(i.camera_position=t[17]),l[0]&65536&&(i.zoom_speed=t[16]),l[0]&4&&(i.has_change_history=t[2]),e.$set(i)},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){D(e.$$.fragment,t),n=!1},d(t){B(e,t)}}}function Rt(o){let e,n;return e=new ae({}),{c(){U(e.$$.fragment)},m(t,l){j(e,t,l),n=!0},i(t){n||(z(e.$$.fragment,t),n=!0)},o(t){D(e.$$.fragment,t),n=!1},d(t){B(e,t)}}}function Vt(o){let e,n,t,l,i,_;const r=[{autoscroll:o[14].autoscroll},{i18n:o[14].i18n},o[1]];let s={};for(let m=0;m<r.length;m+=1)s=Be(s,r[m]);e=new Se({props:s}),e.$on("clear_status",o[23]);const u=[Ot,Gt],a=[];function f(m,d){return m[0]&&m[21]?0:1}return t=f(o),l=a[t]=u[t](o),{c(){U(e.$$.fragment),n=ke(),l.c(),i=qe()},m(m,d){j(e,m,d),ee(m,n,d),a[t].m(m,d),ee(m,i,d),_=!0},p(m,d){const E=d[0]&16386?Pe(r,[d[0]&16384&&{autoscroll:m[14].autoscroll},d[0]&16384&&{i18n:m[14].i18n},d[0]&2&&Le(m[1])]):{};e.$set(E);let k=t;t=f(m),t===k?a[t].p(m,d):(Te(),D(a[k],1,1,()=>{a[k]=null}),je(),l=a[t],l?l.p(m,d):(l=a[t]=u[t](m),l.c()),z(l,1),l.m(i.parentNode,i))},i(m){_||(z(e.$$.fragment,m),z(l),_=!0)},o(m){D(e.$$.fragment,m),D(l),_=!1},d(m){m&&(x(n),x(i)),B(e,m),a[t].d(m)}}}function Ft(o){let e,n,t,l;const i=[Tt,Pt],_=[];function r(s,u){return s[18]?1:0}return e=r(o),n=_[e]=i[e](o),{c(){n.c(),t=qe()},m(s,u){_[e].m(s,u),ee(s,t,u),l=!0},p(s,u){let a=e;e=r(s),e===a?_[e].p(s,u):(Te(),D(_[a],1,1,()=>{_[a]=null}),je(),n=_[e],n?n.p(s,u):(n=_[e]=i[e](s),n.c()),z(n,1),n.m(t.parentNode,t))},i(s){l||(z(n),l=!0)},o(s){D(n),l=!1},d(s){s&&x(t),_[e].d(s)}}}function Ht(o,e,n){let{elem_id:t=""}=e,{elem_classes:l=[]}=e,{visible:i=!0}=e,{value:_=null}=e,{root:r}=e,{display_mode:s="solid"}=e,{clear_color:u}=e,{loading_status:a}=e,{label:f}=e,{show_label:m}=e,{container:d=!0}=e,{scale:E=null}=e,{min_width:k=void 0}=e,{gradio:b}=e,{height:S=void 0}=e,{zoom_speed:L=1}=e,{input_ready:M}=e,P=!1,{has_change_history:q=!1}=e,{camera_position:G=[null,null,null]}=e,{interactive:O}=e,g=!1;const ue=typeof window<"u",R=()=>b.dispatch("clear_status",a),X=()=>b.dispatch("clear_status",a),fe=(...c)=>b.client.upload(...c),ce=(...c)=>b.client.stream(...c);function de(c){P=c,n(19,P)}const me=({detail:c})=>n(0,_=c),h=({detail:c})=>n(20,g=c),We=({detail:c})=>{b.dispatch("change",c),n(2,q=!0)},Ae=()=>{n(0,_=null),b.dispatch("clear")},Ge=({detail:c})=>{n(0,_=c),b.dispatch("upload")},Oe=({detail:c})=>{n(1,a=a||{}),n(1,a.status="error",a),b.dispatch("error",c)};return o.$$set=c=>{"elem_id"in c&&n(3,t=c.elem_id),"elem_classes"in c&&n(4,l=c.elem_classes),"visible"in c&&n(5,i=c.visible),"value"in c&&n(0,_=c.value),"root"in c&&n(6,r=c.root),"display_mode"in c&&n(7,s=c.display_mode),"clear_color"in c&&n(8,u=c.clear_color),"loading_status"in c&&n(1,a=c.loading_status),"label"in c&&n(9,f=c.label),"show_label"in c&&n(10,m=c.show_label),"container"in c&&n(11,d=c.container),"scale"in c&&n(12,E=c.scale),"min_width"in c&&n(13,k=c.min_width),"gradio"in c&&n(14,b=c.gradio),"height"in c&&n(15,S=c.height),"zoom_speed"in c&&n(16,L=c.zoom_speed),"input_ready"in c&&n(22,M=c.input_ready),"has_change_history"in c&&n(2,q=c.has_change_history),"camera_position"in c&&n(17,G=c.camera_position),"interactive"in c&&n(18,O=c.interactive)},o.$$.update=()=>{o.$$.dirty[0]&524288&&n(22,M=!P)},[_,a,q,t,l,i,r,s,u,f,m,d,E,k,b,S,L,G,O,P,g,ue,M,R,X,fe,ce,de,me,h,We,Ae,Ge,Oe]}class tn extends Nt{constructor(e){super(),qt(this,e,Ht,Ft,Lt,{elem_id:3,elem_classes:4,visible:5,value:0,root:6,display_mode:7,clear_color:8,loading_status:1,label:9,show_label:10,container:11,scale:12,min_width:13,gradio:14,height:15,zoom_speed:16,input_ready:22,has_change_history:2,camera_position:17,interactive:18},null,[-1,-1])}get elem_id(){return this.$$.ctx[3]}set elem_id(e){this.$$set({elem_id:e}),p()}get elem_classes(){return this.$$.ctx[4]}set elem_classes(e){this.$$set({elem_classes:e}),p()}get visible(){return this.$$.ctx[5]}set visible(e){this.$$set({visible:e}),p()}get value(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),p()}get root(){return this.$$.ctx[6]}set root(e){this.$$set({root:e}),p()}get display_mode(){return this.$$.ctx[7]}set display_mode(e){this.$$set({display_mode:e}),p()}get clear_color(){return this.$$.ctx[8]}set clear_color(e){this.$$set({clear_color:e}),p()}get loading_status(){return this.$$.ctx[1]}set loading_status(e){this.$$set({loading_status:e}),p()}get label(){return this.$$.ctx[9]}set label(e){this.$$set({label:e}),p()}get show_label(){return this.$$.ctx[10]}set show_label(e){this.$$set({show_label:e}),p()}get container(){return this.$$.ctx[11]}set container(e){this.$$set({container:e}),p()}get scale(){return this.$$.ctx[12]}set scale(e){this.$$set({scale:e}),p()}get min_width(){return this.$$.ctx[13]}set min_width(e){this.$$set({min_width:e}),p()}get gradio(){return this.$$.ctx[14]}set gradio(e){this.$$set({gradio:e}),p()}get height(){return this.$$.ctx[15]}set height(e){this.$$set({height:e}),p()}get zoom_speed(){return this.$$.ctx[16]}set zoom_speed(e){this.$$set({zoom_speed:e}),p()}get input_ready(){return this.$$.ctx[22]}set input_ready(e){this.$$set({input_ready:e}),p()}get has_change_history(){return this.$$.ctx[2]}set has_change_history(e){this.$$set({has_change_history:e}),p()}get camera_position(){return this.$$.ctx[17]}set camera_position(e){this.$$set({camera_position:e}),p()}get interactive(){return this.$$.ctx[18]}set interactive(e){this.$$set({interactive:e}),p()}}export{sn as BaseExample,at as BaseModel3D,Mt as BaseModel3DUpload,tn as default}; 3//# sourceMappingURL=Index-BJqU42RM.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.