import{d as _,eA as w,ez as g,J as D,b as n,eu as k,u,c as p,ew as l,bg as P,x as I}from"./outputWidgets.b8e3fbc0.js";import{D as b,m as x}from"./DashPlayer.7fd19539.js";import{L as B}from"./CircularLoading.79b7441a.js";import{r as R}from"./index.b9764f4b.js";import{B as q}from"./BackButton.e7198856.js";import{a as d}from"./asyncComputed.977b7d3a.js";import{D as C}from"./dashes.f399352b.js";import{W as E}from"./workspaces.1cd723ed.js";import"./executeJs.3f7163cd.js";import"./icons.4de3900f.js";import"./index.0d31accf.js";import"./pubsub.dbd75de9.js";import"./PlayerNavbar.c216bf5e.js";import"./Steps.4744ef98.js";import"./geometryUtils.b25d5ff9.js";import"./WidgetsFrame.f34d49dd.js";import"./activeRecord.407da188.js";import"./url.e34f8e7c.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="35e739ec-1e34-4c25-8622-cee604a086e1",t._sentryDebugIdIdentifier="sentry-dbid-35e739ec-1e34-4c25-8622-cee604a086e1")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:r.query}),h()):s.push({name:"formPreview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:v,result:a,refetch:h}=d(()=>C.get(r.params.dashPath)),{result:i}=d(()=>E.get()),c=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=x(a.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>R("preview",s,o,y)),e});return(e,o)=>(n(),k(P,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):l("",!0),c.value?(n(),p(b,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const X=I(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.7a452a11.js.map
