import{d as _,eA as w,ez as g,J as D,b as n,eu as k,u,c as p,ew as d,bg as b,x as P}from"./outputWidgets.3f6d0550.js";import{D as I,m as x}from"./DashPlayer.deef36bd.js";import{L as B}from"./CircularLoading.2945792d.js";import{r as R}from"./index.3719e3b6.js";import{B as q}from"./BackButton.a745ce5e.js";import{a as l}from"./asyncComputed.bd80460e.js";import{D as C}from"./dashes.e5b250f4.js";import{W as E}from"./workspaces.3b4ce0c9.js";import"./executeJs.9903c152.js";import"./icons.51140278.js";import"./index.d8e2f1bc.js";import"./pubsub.0f07f3a4.js";import"./PlayerNavbar.cbedb682.js";import"./Steps.f8152f0d.js";import"./geometryUtils.b244a3e3.js";import"./WidgetsFrame.1cd54435.js";import"./activeRecord.4331371e.js";import"./url.980858d4.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]="649e8e44-a7bc-4c61-9e7c-8f2d37e566e8",t._sentryDebugIdIdentifier="sentry-dbid-649e8e44-a7bc-4c61-9e7c-8f2d37e566e8")}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}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>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(b,null,[u(v)||!u(a)?(n(),p(B,{key:0,class:"loading",justify:"center"})):d("",!0),c.value?(n(),p(I,{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"])):d("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.26e7760e.js.map
