import{d as _,eA as w,ez as b,J as g,b as n,et as D,u,c,ew as p,bq as k,x as P}from"./outputWidgets.52de64cd.js";import{D as I,m as x}from"./DashPlayer.cbfd88cc.js";import{L as q}from"./CircularLoading.b5138fc9.js";import{r as B}from"./index.a07ffcc5.js";import{B as R}from"./BackButton.b94401cd.js";import{a as l}from"./asyncComputed.00e76dd1.js";import{D as C}from"./dashes.9265143d.js";import{W as E}from"./workspaces.bfe7b570.js";import"./executeJs.f8066818.js";import"./icons.bf6505eb.js";import"./index.ef1b6dd8.js";import"./pubsub.6e9aa6f2.js";import"./PlayerNavbar.ff23d2a5.js";import"./Steps.8311861f.js";import"./Modal.85617d2e.js";import"./geometryUtils.6df9e443.js";import"./WidgetsFrame.2ce167ed.js";import"./activeRecord.ebcbfc07.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]="0d5cb4a9-8df5-454d-beb6-f3d519266b1e",t._sentryDebugIdIdentifier="sentry-dbid-0d5cb4a9-8df5-454d-beb6-f3d519266b1e")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=b(),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()),d=g(()=>{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})=>B("preview",s,o,y)),e});return(e,o)=>(n(),D(k,null,[u(v)||!u(a)?(n(),c(q,{key:0,class:"loading",justify:"center"})):p("",!0),d.value?(n(),c(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(a)?(n(),c(R,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.bf5ba389.js.map
