const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/STLExporter-BpTH3YHE.js","webview.js","assets/main-DiKYzti2.css"])))=>i.map(i=>d[i]);
import{n as e}from"../webview.js";function t(e,t,n){let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}async function n(n,r){let{STLExporter:i}=await e(async()=>{let{STLExporter:e}=await import(`./STLExporter-BpTH3YHE.js`);return{STLExporter:e}},__vite__mapDeps([0,1,2])),a=new i().parse(n,{binary:!0});t(a instanceof DataView?a.buffer:a,`${r}.stl`,`application/octet-stream`)}async function r(n,r){let{OBJExporter:i}=await e(async()=>{let{OBJExporter:e}=await import(`../webview.js`);return{OBJExporter:e}},__vite__mapDeps([1,2]));t(new i().parse(n),`${r}.obj`,`text/plain`)}async function i(n,r){let{GLTFExporter:i}=await e(async()=>{let{GLTFExporter:e}=await import(`../webview.js`);return{GLTFExporter:e}},__vite__mapDeps([1,2])),a=new i;return new Promise((e,i)=>{a.parse(n,n=>{t(JSON.stringify(n,null,2),`${r}.gltf`,`application/json`),e()},e=>i(e),{binary:!1})})}function a(e,t,a){return t===`stl`?n(e,a):t===`obj`?r(e,a):t===`gltf`?i(e,a):Promise.reject(Error(`Unsupported export format: ${t}`))}export{a as export_scene};