import{d as v,K as D,b as u,c as g,z as t,t as p,D as l,F as b,J as w,H as k,q as I}from"./registerWidgets.80830a62.js";import{D as P,n as q}from"./DashPlayer.572466ef.js";import{L as x}from"./CircularLoading.dfc9e798.js";import{r as B}from"./index.9089c8c2.js";import{B as R}from"./BackButton.ffb59a51.js";import{a as m}from"./asyncComputed.7fd138fd.js";import{D as C}from"./dashes.9f8f928b.js";import{W as F}from"./workspaces.f05f8c3f.js";import"./passwordlessManager.65c1d475.js";import"./runnerData.fe559a1a.js";import"./executeJs.74f241ca.js";import"./PlayerNavbar.1f5ef7b9.js";import"./icons.96376736.js";import"./WidgetsFrame.fba80f3e.js";import"./colors.8b04d8aa.js";import"./Modal.75286ba0.js";import"./log.3ccd8497.js";import"./Passwordless.e6779d6e.js";import"./lottie.ab5349ef.js";import"./activeRecord.dd1973bd.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="50f82d45-ecb0-4543-be85-98084b938fe4",s._sentryDebugIdIdentifier="sentry-dbid-50f82d45-ecb0-4543-be85-98084b938fe4")}catch{}})();const E=v({__name:"DashPreview",setup(s){const r=w(),o=k(),c=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),h()):o.push({name:"form-preview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:y,result:a,refetch:h}=m(()=>C.get(r.params.dashPath)),{result:i}=m(()=>F.get()),d=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=q.create(a.value.makeRunnerData(i.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(u(),g(b,null,[t(y)||!t(a)?(u(),p(x,{key:0,class:"loading",justify:"center"})):l("",!0),t(d)?(u(),p(P,{key:1,class:"player",dash:t(d).runnerData,"is-preview":!0,params:t(r).query,"dash-player-state":t(d),onNavigate:c},null,8,["dash","params","dash-player-state"])):l("",!0),t(a)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.6b54a0af.js.map
