const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Canvas3D-Dv13xifg.js","./index-Ds2meNS5.js","./index-W6UN98iO.css"])))=>i.map(i=>d[i]);
import{_ as y}from"./index-Ds2meNS5.js";import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import{b as T,F as U,c as V,I,D as q,f as M}from"./IconButtonWrapper-Cljb5D-5.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_svelte.js";import"./i18n-BldJSFLV.js";import{d as j}from"./index-tFQomdd2.js";import"./svelte/svelte_animate.js";import"./svelte/svelte_attachments.js";import"./svelte/svelte_easing.js";import"./svelte/svelte_internal_flags_tracing.js";import"./svelte/svelte_internal_server.js";import"./svelte/svelte_legacy.js";import"./svelte/svelte_motion.js";import"./svelte/svelte_reactivity.js";import"./svelte/svelte_reactivity_window.js";import"./svelte/svelte_server.js";import"./svelte/svelte_store.js";import"./svelte/svelte_transition.js";import"./svelte/svelte_events.js";import"./MarkdownCode-C2b9iIxl.js";import"./prism-python-CpYAgONt.js";var H=e.from_html("<!> <a><!></a>",1),J=e.from_html('<div class="model3D svelte-pnaihf" data-testid="model3d"><!> <!></div>'),K=e.from_html("<!> <!>",1);function fe(z,t){e.push(t,!0);let C=e.prop(t,"display_mode",3,"solid"),E=e.prop(t,"clear_color",19,()=>[0,0,0,0]),P=e.prop(t,"label",3,""),n=e.prop(t,"zoom_speed",3,1),i=e.prop(t,"pan_speed",3,1),m=e.prop(t,"camera_position",19,()=>[null,null,null]),k=e.prop(t,"has_change_history",3,!1),p=e.state(e.proxy({camera_position:m(),zoom_speed:n(),pan_speed:i()})),c=e.state(!1),g=e.state(void 0),h=e.state(void 0),v=e.state(void 0);async function B(){return(await y(()=>import("./Canvas3D-Dv13xifg.js"),__vite__mapDeps([0,1,2]),import.meta.url)).default}async function L(){return(await y(()=>import("./Canvas3DGS-DC7MCH2z.js"),[],import.meta.url)).default}e.user_effect(()=>{t.value&&(e.set(c,t.value.path.endsWith(".splat")||t.value.path.endsWith(".ply"),!0),e.get(c)?L().then(a=>{e.set(g,a,!0)}):B().then(a=>{e.set(h,a,!0)}))});function W(){e.get(v)?.reset_camera_position()}e.user_effect(()=>{(!j(e.get(p).camera_position,m())||e.get(p).zoom_speed!==n()||e.get(p).pan_speed!==i())&&(e.get(v)?.update_camera(m(),n(),i()),e.set(p,{camera_position:m(),zoom_speed:n(),pan_speed:i()},!0))});var b=K(),w=e.first_child(b);{let a=e.derived(()=>P()||t.i18n("3D_model.3d_model"));T(w,{get show_label(){return t.show_label},get Icon(){return U},get label(){return e.get(a)}})}var x=e.sibling(w,2);{var A=a=>{var f=J(),D=e.child(f);V(D,{children:(o,l)=>{var d=H(),_=e.first_child(d);{var s=u=>{{let S=e.derived(()=>!k());I(u,{get Icon(){return M},label:"Undo",onclick:()=>W(),get disabled(){return e.get(S)}})}};e.if(_,u=>{e.get(c)||u(s)})}var r=e.sibling(_,2);e.set_attribute(r,"target",window.__is_colab__?"_blank":null);var R=e.child(r);{let u=e.derived(()=>t.i18n("common.download"));I(R,{get Icon(){return q},get label(){return e.get(u)}})}e.reset(r),e.template_effect(()=>{e.set_attribute(r,"href",t.value.url),e.set_attribute(r,"download",window.__is_colab__?null:t.value.orig_name||t.value.path)}),e.append(o,d)},$$slots:{default:!0}});var F=e.sibling(D,2);{var G=o=>{var l=e.comment(),d=e.first_child(l);e.component(d,()=>e.get(g),(_,s)=>{s(_,{get value(){return t.value},get zoom_speed(){return n()},get pan_speed(){return i()}})}),e.append(o,l)},O=o=>{var l=e.comment(),d=e.first_child(l);e.component(d,()=>e.get(h),(_,s)=>{e.bind_this(s(_,{get value(){return t.value},get display_mode(){return C()},get clear_color(){return E()},get camera_position(){return m()},get zoom_speed(){return n()},get pan_speed(){return i()}}),r=>e.set(v,r,!0),()=>e.get(v))}),e.append(o,l)};e.if(F,o=>{e.get(c)?o(G):o(O,!1)})}e.reset(f),e.append(a,f)};e.if(x,a=>{t.value&&a(A)})}e.append(z,b),e.pop()}export{fe as default};
