import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as t,A as n,D as r,Et as i,F as a,L as o,O as s,dt as c,ft as l,k as u}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import"./Button-mG8zDgxj.js";import"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import"./vendor-three-Qz0FU1fN.js";import{t as d}from"./Load3DControls-Drp4k7J9.js";import{t as f}from"./AnimationControls-B7Thj1Zy.js";import"./load3dService-FyKs_L4c.js";import{t as p}from"./useLoad3dViewer-BM5nV_Fe.js";var m={class:`pointer-events-none absolute top-0 left-0 size-full`},h=o({__name:`Preview3d`,props:{modelUrl:{}},setup(e){let o=c(`containerRef`),h=i(p());return l([o,()=>e.modelUrl],async()=>{!o.value||!e.modelUrl||await h.value.initializeStandaloneViewer(o.value,e.modelUrl)}),(e,i)=>(t(),n(`div`,{ref_key:`containerRef`,ref:o,class:`relative w-full h-full`,onMouseenter:i[10]||=(...e)=>h.value.handleMouseEnter&&h.value.handleMouseEnter(...e),onMouseleave:i[11]||=(...e)=>h.value.handleMouseLeave&&h.value.handleMouseLeave(...e),onResize:i[12]||=(...e)=>h.value.handleResize&&h.value.handleResize(...e)},[r(`div`,m,[a(d,{"scene-config":h.value,"onUpdate:sceneConfig":i[0]||=e=>h.value=e,"model-config":h.value,"onUpdate:modelConfig":i[1]||=e=>h.value=e,"camera-config":h.value,"onUpdate:cameraConfig":i[2]||=e=>h.value=e,"light-config":h.value,"onUpdate:lightConfig":i[3]||=e=>h.value=e,"is-splat-model":h.value.isSplatModel,"is-ply-model":h.value.isPlyModel,"has-skeleton":h.value.hasSkeleton,onUpdateBackgroundImage:h.value.handleBackgroundImageUpdate,onExportModel:h.value.exportModel},null,8,[`scene-config`,`model-config`,`camera-config`,`light-config`,`is-splat-model`,`is-ply-model`,`has-skeleton`,`onUpdateBackgroundImage`,`onExportModel`]),h.value.animations&&h.value.animations.length>0?(t(),s(f,{key:0,animations:h.value.animations,"onUpdate:animations":i[4]||=e=>h.value.animations=e,playing:h.value.playing,"onUpdate:playing":i[5]||=e=>h.value.playing=e,"selected-speed":h.value.selectedSpeed,"onUpdate:selectedSpeed":i[6]||=e=>h.value.selectedSpeed=e,"selected-animation":h.value.selectedAnimation,"onUpdate:selectedAnimation":i[7]||=e=>h.value.selectedAnimation=e,"animation-progress":h.value.animationProgress,"onUpdate:animationProgress":i[8]||=e=>h.value.animationProgress=e,"animation-duration":h.value.animationDuration,"onUpdate:animationDuration":i[9]||=e=>h.value.animationDuration=e,onSeek:h.value.handleSeek},null,8,[`animations`,`playing`,`selected-speed`,`selected-animation`,`animation-progress`,`animation-duration`,`onSeek`])):u(``,!0)])],544))}});export{h as default};
//# sourceMappingURL=Preview3d-CGZdaGBJ.js.map