import{d as _,ey as w,ex as g,F as D,b as n,c as k,bu as u,u as d,eu as c,bw as b,t as P}from"./registerWidgets.6f5be576.js";import{D as I,m as x}from"./DashPlayer.74952694.js";import{L as B}from"./CircularLoading.63d0a6e6.js";import{r as R}from"./index.2b5138c8.js";import{B as q}from"./BackButton.0588bb94.js";import{a as l}from"./asyncComputed.ea0bb8a8.js";import{D as C}from"./dashes.f464d824.js";import{W as F}from"./workspaces.79e459cd.js";import"./executeJs.abe9c76a.js";import"./PlayerNavbar.9ab27066.js";import"./icons.b2622455.js";import"./Steps.413031ec.js";import"./Modal.dd94f88f.js";import"./passwordlessManager.1e2193ad.js";import"./pubsub.1dc45978.js";import"./storage.d8b26e7f.js";import"./Passwordless.c72ce9bc.js";import"./WidgetsFrame.cc779991.js";import"./lottie.df73e4a1.js";import"./activeRecord.eb203c6f.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]="fa397d6f-d5f1-4c4f-a480-8e7537fb060a",t._sentryDebugIdIdentifier="sentry-dbid-fa397d6f-d5f1-4c4f-a480-8e7537fb060a")}catch{}})();const E=_({__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(()=>F.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(b,null,[u(v)||!u(a)?(n(),d(B,{key:0,class:"loading",justify:"center"})):c("",!0),p.value?(n(),d(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):c("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.1845a41a.js.map
