import{d as _,ez as w,ey as g,H as D,b as n,et as k,u,c,ev as p,bf as b,v as P}from"./outputWidgets.942e04a7.js";import{D as I,m as x}from"./DashPlayer.0a2c6101.js";import{L as B}from"./CircularLoading.76539627.js";import"./index.6d3b437a.js";import{r as R}from"./executeJs.3f9b10c6.js";import{B as q}from"./BackButton.a3491803.js";import{a as l}from"./asyncComputed.581a6d32.js";import{D as C}from"./dashes.6b0715ff.js";import{W as E}from"./workspaces.cf573e29.js";import"./geometryUtils.04efa2a3.js";import"./runnerData.e597f90f.js";import"./index.fcbddf23.js";import"./pubsub.c4874b0f.js";import"./WidgetsFrame.457bee85.js";import"./icons.c37bd5be.js";import"./url.c27b4b3f.js";import"./PlayerNavbar.a355e205.js";import"./Steps.7aef7647.js";import"./activeRecord.c49c8827.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]="dd8b314d-c270-4520-a3c5-a6d50cffdc18",t._sentryDebugIdIdentifier="sentry-dbid-dd8b314d-c270-4520-a3c5-a6d50cffdc18")}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()),d=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"})):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 Y=P(F,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.f8b3cb23.js.map
