import{d as _,eA as w,ez as g,J as D,b as n,et as k,u,c as l,ew as c,bq as b,x as P}from"./outputWidgets.75a5b0b9.js";import{D as I,m as x}from"./DashPlayer.947616d9.js";import{L as q}from"./CircularLoading.1b6701b1.js";import{r as B}from"./index.a1ee75ca.js";import{B as R}from"./BackButton.05afbac7.js";import{a as d}from"./asyncComputed.c701d7b0.js";import{D as C}from"./dashes.cbc2452d.js";import{W as E}from"./workspaces.f47922e6.js";import"./executeJs.fb1c318e.js";import"./icons.c04528be.js";import"./index.7a91ca2c.js";import"./pubsub.3fa240d3.js";import"./PlayerNavbar.04a45a2a.js";import"./Steps.abab7b0a.js";import"./Modal.21246413.js";import"./geometryUtils.6b829608.js";import"./WidgetsFrame.fd4386d8.js";import"./activeRecord.115270b9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="3174152e-ba2f-47ae-a0a3-63197630a8aa",t._sentryDebugIdIdentifier="sentry-dbid-3174152e-ba2f-47ae-a0a3-63197630a8aa")}catch{}})();const F=_({__name:"DashPreview",setup(t){const a=w(),s=g(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):s.push({name:"formPreview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:v,result:r,refetch:h}=d(()=>C.get(a.params.dashPath)),{result:i}=d(()=>E.get()),p=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=x(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:y})=>B("preview",s,o,y)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(r)?(n(),l(q,{key:0,class:"loading",justify:"center"})):c("",!0),p.value?(n(),l(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):c("",!0),u(r)?(n(),l(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.2dbdf191.js.map
