import{d as _,ez as w,ey as g,H as D,b as n,et as k,u,c,ev as d,bf as b,v as P}from"./outputWidgets.d5738148.js";import{D as I,m as x}from"./DashPlayer.b6c1652f.js";import{L as B}from"./CircularLoading.7d41f8aa.js";import"./index.f7210413.js";import{r as R}from"./executeJs.7701c632.js";import{B as q}from"./BackButton.e90de360.js";import{a as l}from"./asyncComputed.5b25749a.js";import{D as C}from"./dashes.2209d5c8.js";import{W as E}from"./workspaces.18bd05b5.js";import"./geometryUtils.b4363e89.js";import"./runnerData.25a438f3.js";import"./index.b4b079b2.js";import"./pubsub.601f5d35.js";import"./WidgetsFrame.d47dcf2d.js";import"./icons.fc57d5d6.js";import"./url.d1f492ee.js";import"./PlayerNavbar.587adb29.js";import"./Steps.5066fe0f.js";import"./activeRecord.bb15dfc5.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]="6a3917a0-b7e3-4a28-85af-06fc332de262",t._sentryDebugIdIdentifier="sentry-dbid-6a3917a0-b7e3-4a28-85af-06fc332de262")}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}),y()):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:y}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>E.get()),p=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:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(a)?(n(),c(B,{key:0,class:"loading",justify:"center"})):d("",!0),p.value?(n(),c(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(a)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.5f378459.js.map
