import{d as _,ey as b,ex as w,H as g,b as n,er as D,u,c as p,eu as d,bu as k,v as P}from"./registerWidgets.d207d3d8.js";import{D as I,m as x}from"./DashPlayer.ec00066d.js";import{L as B}from"./CircularLoading.cf2efea1.js";import{r as R}from"./index.4ee96554.js";import{B as q}from"./BackButton.615db3c7.js";import{a as l}from"./asyncComputed.9245c077.js";import{D as C}from"./dashes.e3e34823.js";import{W as E}from"./workspaces.84f5cd92.js";import"./executeJs.481ad0ab.js";import"./PlayerNavbar.d9624b1f.js";import"./icons.4cf3c6e7.js";import"./Steps.2e23383d.js";import"./Modal.c3922cf6.js";import"./geometryUtils.c36bc2de.js";import"./passwordlessManager.66faf323.js";import"./pubsub.a025efb1.js";import"./storage.955f9c37.js";import"./Passwordless.80a0b6d6.js";import"./WidgetsFrame.4c3a4e18.js";import"./activeRecord.3ac0bec0.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]="04b1becf-e82c-48fc-b152-83b7fc67ad4b",t._sentryDebugIdIdentifier="sentry-dbid-04b1becf-e82c-48fc-b152-83b7fc67ad4b")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=b(),s=w(),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=g(()=>{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(),D(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.b3b509e3.js.map
