import{d as _,ey as w,ex as g,F as D,b as n,c as k,bu as u,u as p,eu as d,bw as b,t as P}from"./registerWidgets.b2d74d6b.js";import{D as I,m as x}from"./DashPlayer.a32c6bc9.js";import{L as B}from"./CircularLoading.944a8ffa.js";import{r as R}from"./index.8bd8f7a7.js";import{B as q}from"./BackButton.b71e336e.js";import{a as l}from"./asyncComputed.000dd401.js";import{D as C}from"./dashes.5364d833.js";import{W as F}from"./workspaces.855982a0.js";import"./executeJs.47c3d99b.js";import"./PlayerNavbar.08597770.js";import"./icons.9c4c14c4.js";import"./Steps.66f87ea7.js";import"./Modal.6edff823.js";import"./passwordlessManager.1e9ad5f4.js";import"./pubsub.de7b160f.js";import"./storage.4c5a0e4a.js";import"./Passwordless.32ca9f10.js";import"./WidgetsFrame.126f581c.js";import"./lottie.c84c89e3.js";import"./activeRecord.ad458e5f.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]="0b70eca9-a50c-4159-9e03-0def5813742c",t._sentryDebugIdIdentifier="sentry-dbid-0b70eca9-a50c-4159-9e03-0def5813742c")}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()),c=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(),p(B,{key:0,class:"loading",justify:"center"})):d("",!0),c.value?(n(),p(I,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(a)?(n(),p(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.b29c3229.js.map
