const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Canvas3D-C01xsvPB.js","./index-Dw8Uzof1.js","./index-qRhMeKhs.css"])))=>i.map(i=>d[i]);
import{_ as P}from"./index-Dw8Uzof1.js";import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import{b as M,F as j,c as H,I as B,D as J,f as K}from"./IconButtonWrapper-D4LMIc_2.js";import"./svelte/svelte_svelte.js";import"./i18n-CyvX8KmK.js";import{d as N}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-C7jLnxqj.js";import"./prism-python-B1e-54E9.js";var Q=e.from_html("<!> <a><!></a>",1),X=e.from_html('<div class="model3D svelte-pnaihf" data-testid="model3d"><!> <!></div>'),Y=e.from_html("<!> <!>",1);function ye(L,r){e.push(r,!1);let a=e.prop(r,"value",12),b=e.prop(r,"display_mode",12,"solid"),y=e.prop(r,"clear_color",28,()=>[0,0,0,0]),v=e.prop(r,"label",12,""),w=e.prop(r,"show_label",12),i=e.prop(r,"i18n",12),o=e.prop(r,"zoom_speed",12,1),l=e.prop(r,"pan_speed",12,1),_=e.prop(r,"camera_position",28,()=>[null,null,null]),D=e.prop(r,"has_change_history",12,!1),m=e.mutable_source({camera_position:_(),zoom_speed:o(),pan_speed:l()}),c=e.mutable_source(!1),k=e.mutable_source(),I=e.mutable_source();async function W(){return(await P(()=>import("./Canvas3D-C01xsvPB.js"),__vite__mapDeps([0,1,2]),import.meta.url)).default}async function x(){return(await P(()=>import("./Canvas3DGS-BRjU3I6P.js"),[],import.meta.url)).default}let g=e.mutable_source();function A(){e.get(g)?.reset_camera_position()}e.legacy_pre_effect(()=>(e.deep_read_state(a()),e.get(c)),()=>{a()&&(e.set(c,a().path.endsWith(".splat")||a().path.endsWith(".ply")),e.get(c)?x().then(t=>{e.set(k,t)}):W().then(t=>{e.set(I,t)}))}),e.legacy_pre_effect(()=>(e.get(m),e.deep_read_state(_()),e.deep_read_state(o()),e.deep_read_state(l()),e.get(g)),()=>{(!N(e.get(m).camera_position,_())||e.get(m).zoom_speed!==o()||e.get(m).pan_speed!==l())&&(e.get(g)?.update_camera(_(),o(),l()),e.set(m,{camera_position:_(),zoom_speed:o(),pan_speed:l()}))}),e.legacy_pre_effect_reset();var F={get value(){return a()},set value(t){a(t),e.flush()},get display_mode(){return b()},set display_mode(t){b(t),e.flush()},get clear_color(){return y()},set clear_color(t){y(t),e.flush()},get label(){return v()},set label(t){v(t),e.flush()},get show_label(){return w()},set show_label(t){w(t),e.flush()},get i18n(){return i()},set i18n(t){i(t),e.flush()},get zoom_speed(){return o()},set zoom_speed(t){o(t),e.flush()},get pan_speed(){return l()},set pan_speed(t){l(t),e.flush()},get camera_position(){return _()},set camera_position(t){_(t),e.flush()},get has_change_history(){return D()},set has_change_history(t){D(t),e.flush()}};e.init();var C=Y(),q=e.first_child(C);{let t=e.derived_safe_equal(()=>(e.deep_read_state(v()),e.deep_read_state(i()),e.untrack(()=>v()||i()("3D_model.3d_model"))));M(q,{get show_label(){return w()},get Icon(){return j},get label(){return e.get(t)}})}var G=e.sibling(q,2);{var O=t=>{var z=X(),E=e.child(z);H(E,{children:(n,d)=>{var p=Q(),u=e.first_child(p);{var f=h=>{{let V=e.derived_safe_equal(()=>!D());B(h,{get Icon(){return K},label:"Undo",get disabled(){return e.get(V)},$$events:{click:()=>A()}})}};e.if(u,h=>{e.get(c)||h(f)})}var s=e.sibling(u,2);e.set_attribute(s,"target",e.untrack(()=>window.__is_colab__?"_blank":null));var U=e.child(s);{let h=e.derived_safe_equal(()=>(e.deep_read_state(i()),e.untrack(()=>i()("common.download"))));B(U,{get Icon(){return J},get label(){return e.get(h)}})}e.reset(s),e.template_effect(()=>{e.set_attribute(s,"href",(e.deep_read_state(a()),e.untrack(()=>a().url))),e.set_attribute(s,"download",(e.deep_read_state(a()),e.untrack(()=>window.__is_colab__?null:a().orig_name||a().path)))}),e.append(n,p)},$$slots:{default:!0}});var R=e.sibling(E,2);{var S=n=>{var d=e.comment(),p=e.first_child(d);e.component(p,()=>e.get(k),(u,f)=>{f(u,{get value(){return a()},get zoom_speed(){return o()},get pan_speed(){return l()}})}),e.append(n,d)},T=n=>{var d=e.comment(),p=e.first_child(d);e.component(p,()=>e.get(I),(u,f)=>{e.bind_this(f(u,{get value(){return a()},get display_mode(){return b()},get clear_color(){return y()},get camera_position(){return _()},get zoom_speed(){return o()},get pan_speed(){return l()},$$legacy:!0}),s=>e.set(g,s),()=>e.get(g))}),e.append(n,d)};e.if(R,n=>{e.get(c)?n(S):n(T,!1)})}e.reset(z),e.append(t,z)};e.if(G,t=>{a()&&t(O)})}return e.append(L,C),e.pop(F)}export{ye as default};
