import{d as _,ez as w,ey as g,H as D,b as n,et as k,u,c,ev as l,bf as P,v as I}from"./outputWidgets.a8447bcb.js";import{D as b,m as x}from"./index.4381cf7d.js";import{L as B}from"./CircularLoading.dad4a96a.js";import"./index.41d49230.js";import{r as R}from"./executeJs.3e96a194.js";import{B as q}from"./BackButton.39729528.js";import{a as m}from"./asyncComputed.6c2627ea.js";import{D as C}from"./dashes.d6e52b47.js";import{W as E}from"./workspaces.11e30eec.js";import"./WidgetsFrame.bdf0225c.js";import"./icons.6de7af10.js";import"./geometryUtils.a485a5a7.js";import"./runnerData.64650392.js";import"./index.2a4fee23.js";import"./pubsub.3b516de1.js";import"./url.0a1547fb.js";import"./PlayerNavbar.3fda994a.js";import"./Steps.d0eba6f1.js";import"./activeRecord.52c1b6f8.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]="0914e558-83aa-4f68-a5c1-a05314072358",t._sentryDebugIdIdentifier="sentry-dbid-0914e558-83aa-4f68-a5c1-a05314072358")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),d=({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}=m(()=>C.get(r.params.dashPath)),{result:i}=m(()=>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(P,null,[u(v)||!u(a)?(n(),c(B,{key:0,class:"loading",justify:"center"})):l("",!0),p.value?(n(),c(b,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":p.value,onNavigate:d},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Y=I(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.37db95e0.js.map
