import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-DGevbYGF.js";import"./vendor-firebase-yTFzdAQf.js";import{A as t,I as n,O as r,R as i,et as a,ft as o,j as s,k as c,kt as l,pt as u}from"./vendor-vue-core-BdhYaYlO.js";import"./vendor-other-D9HJWI2D.js";import"./useFeatureFlags-DLStzqlx.js";import"./api-C1WIrB4Z.js";import"./vendor-markdown-th9BvURy.js";import"./colorUtil-DJbZtU1U.js";import"./i18n-DKtnmyh4.js";import"./vendor-reka-ui-CSo89nDv.js";import"./Button-DHxPjNdi.js";import"./dialogService-CwVeD8j9.js";import"./extensionStore-By6c6sCD.js";import"./userStore-ChcnLOkA.js";import"./useErrorHandling-CWU_3R6Y.js";import"./useExternalLink-DZBh_BZs.js";import"./vendor-tiptap-BZHcjrm1.js";import"./markdownRendererUtil-J4WlXR5e.js";import"./Popover-_oREh-V5.js";import"./vendor-three-BAimT_0v.js";import{t as d}from"./Load3DControls-DqDaf3B4.js";import{t as f}from"./AnimationControls-8FCOKK6G.js";import"./load3dService-BNTye4XY.js";import{t as p}from"./useLoad3dViewer-czaPLbuC.js";var m={class:`pointer-events-none absolute top-0 left-0 size-full`},h=i({__name:`Preview3d`,props:{modelUrl:{}},setup(e){let i=o(`containerRef`),h=l(p());return u([i,()=>e.modelUrl],async()=>{!i.value||!e.modelUrl||await h.value.initializeStandaloneViewer(i.value,e.modelUrl)}),(e,o)=>(a(),s(`div`,{ref_key:`containerRef`,ref:i,class:`relative w-full h-full`,onMouseenter:o[10]||=(...e)=>h.value.handleMouseEnter&&h.value.handleMouseEnter(...e),onMouseleave:o[11]||=(...e)=>h.value.handleMouseLeave&&h.value.handleMouseLeave(...e),onResize:o[12]||=(...e)=>h.value.handleResize&&h.value.handleResize(...e)},[r(`div`,m,[n(d,{"scene-config":h.value,"onUpdate:sceneConfig":o[0]||=e=>h.value=e,"model-config":h.value,"onUpdate:modelConfig":o[1]||=e=>h.value=e,"camera-config":h.value,"onUpdate:cameraConfig":o[2]||=e=>h.value=e,"light-config":h.value,"onUpdate:lightConfig":o[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?(a(),c(f,{key:0,animations:h.value.animations,"onUpdate:animations":o[4]||=e=>h.value.animations=e,playing:h.value.playing,"onUpdate:playing":o[5]||=e=>h.value.playing=e,"selected-speed":h.value.selectedSpeed,"onUpdate:selectedSpeed":o[6]||=e=>h.value.selectedSpeed=e,"selected-animation":h.value.selectedAnimation,"onUpdate:selectedAnimation":o[7]||=e=>h.value.selectedAnimation=e,"animation-progress":h.value.animationProgress,"onUpdate:animationProgress":o[8]||=e=>h.value.animationProgress=e,"animation-duration":h.value.animationDuration,"onUpdate:animationDuration":o[9]||=e=>h.value.animationDuration=e,onSeek:h.value.handleSeek},null,8,[`animations`,`playing`,`selected-speed`,`selected-animation`,`animation-progress`,`animation-duration`,`onSeek`])):t(``,!0)])],544))}});export{h as default};
//# sourceMappingURL=Preview3d-Awn8jbbT.js.map