import{d as v,K as D,b as u,c as g,z as t,t as p,D as c,F as w,J as b,H as k,q as I}from"./registerWidgets.9f96e537.js";import{D as P,n as q}from"./DashPlayer.51da8284.js";import{L as x}from"./CircularLoading.c1f8d14a.js";import{r as B}from"./index.2a31702d.js";import{B as R}from"./BackButton.acdc1ea1.js";import{a as l}from"./asyncComputed.0a45b9d8.js";import{D as C}from"./dashes.db4d1926.js";import{W as F}from"./workspaces.c7762dda.js";import"./passwordlessManager.5f237f08.js";import"./runnerData.8f64ea72.js";import"./executeJs.de5bda16.js";import"./PlayerNavbar.6a5e884d.js";import"./icons.4255d62c.js";import"./WidgetsFrame.7e615d48.js";import"./colors.b5e37374.js";import"./Modal.add412a5.js";import"./log.0cea70fb.js";import"./Passwordless.89fc3fc4.js";import"./lottie.2c3db159.js";import"./activeRecord.81c11d03.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="c3db2510-ef11-472e-a91b-8df98ca9f32e",s._sentryDebugIdIdentifier="sentry-dbid-c3db2510-ef11-472e-a91b-8df98ca9f32e")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=b(),o=k(),m=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):o.push({name:"form-preview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:y,result:r,refetch:h}=l(()=>C.get(a.params.dashPath)),{result:d}=l(()=>F.get()),i=D(()=>{if(!r.value||!d.value||!r.value.makeRunnerData(d.value))return null;const e=q.create(r.value.makeRunnerData(d.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(u(),g(w,null,[t(y)||!t(r)?(u(),p(x,{key:0,class:"loading",justify:"center"})):c("",!0),t(i)?(u(),p(P,{key:1,class:"player",dash:t(i).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(i),onNavigate:m},null,8,["dash","params","dash-player-state"])):c("",!0),t(r)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.60b42c11.js.map
