import{d as _,eA as w,ez as g,J as b,b as n,et as D,u,c,ew as p,bw as k,x as P}from"./outputWidgets.b9aa154a.js";import{D as I,m as x}from"./DashPlayer.bf75e65d.js";import{L as B}from"./CircularLoading.06bdbb4b.js";import{r as R}from"./index.ade1bec6.js";import{B as q}from"./BackButton.45960f8e.js";import{a as l}from"./asyncComputed.9bda3979.js";import{D as C}from"./dashes.23df7fa5.js";import{W as E}from"./workspaces.157f78cb.js";import"./executeJs.99fc5689.js";import"./icons.4ed83c58.js";import"./index.a3419ef4.js";import"./pubsub.967f482a.js";import"./PlayerNavbar.2c80c9e8.js";import"./Steps.b2e658b4.js";import"./Modal.e6afe637.js";import"./geometryUtils.8f27911e.js";import"./WidgetsFrame.8ed370e1.js";import"./activeRecord.8939db5d.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]="e22f807b-deb9-48e8-812d-880fb916c52f",t._sentryDebugIdIdentifier="sentry-dbid-e22f807b-deb9-48e8-812d-880fb916c52f")}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()),d=b(()=>{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(),D(k,null,[u(v)||!u(a)?(n(),c(B,{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(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const X=P(F,[["__scopeId","data-v-1172cf43"]]);export{X as default};
//# sourceMappingURL=DashPreview.43fbf0b4.js.map
