import{d as _,ey as w,ex as g,H as D,b as n,er as b,u,c as p,eu as d,bu as k,v as P}from"./registerWidgets.9fce82a0.js";import{D as I,m as x}from"./DashPlayer.79123606.js";import{L as B}from"./CircularLoading.45bdfef7.js";import{r as R}from"./index.9df32b45.js";import{B as q}from"./BackButton.b000685b.js";import{a as l}from"./asyncComputed.a4b709a3.js";import{D as C}from"./dashes.ea544587.js";import{W as E}from"./workspaces.7ad2f8ea.js";import"./executeJs.0cb26839.js";import"./PlayerNavbar.80abf434.js";import"./icons.1992e13b.js";import"./Steps.a44e7d48.js";import"./Modal.3e57b15b.js";import"./geometryUtils.22d60cf9.js";import"./passwordlessManager.eda842b8.js";import"./pubsub.025cc397.js";import"./storage.ae287dfa.js";import"./Passwordless.0badc2f2.js";import"./WidgetsFrame.28239fa9.js";import"./activeRecord.872f4269.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]="30d7697e-4505-40b2-b007-2f9cf26cc4cc",t._sentryDebugIdIdentifier="sentry-dbid-30d7697e-4505-40b2-b007-2f9cf26cc4cc")}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()),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(),b(k,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(F,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.8aabab1f.js.map
