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 k,H as b,q as I}from"./registerWidgets.1590c05e.js";import{D as P,n as q}from"./DashPlayer.2e9838f9.js";import{L as x}from"./CircularLoading.30b3ab43.js";import{r as B}from"./index.ec584c90.js";import{B as R}from"./BackButton.1759d1e9.js";import{a as l}from"./asyncComputed.0f7a44c1.js";import{D as C}from"./dashes.c5f67d8c.js";import{W as F}from"./workspaces.1ff39dd6.js";import"./passwordlessManager.e40e91a8.js";import"./runnerData.a4823d6a.js";import"./executeJs.22dd091f.js";import"./PlayerNavbar.d43f7d66.js";import"./icons.8b9604eb.js";import"./WidgetsFrame.122943b5.js";import"./colors.4ff9f650.js";import"./Modal.654099b6.js";import"./log.ab0a8102.js";import"./Passwordless.f9a4a30d.js";import"./lottie.1e0c432a.js";import"./activeRecord.e76d7c5c.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]="2eea4251-daae-49cb-99e6-45efacaee689",s._sentryDebugIdIdentifier="sentry-dbid-2eea4251-daae-49cb-99e6-45efacaee689")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=k(),o=b(),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:i}=l(()=>F.get()),d=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=q.create(r.value.makeRunnerData(i.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(d)?(u(),p(P,{key:1,class:"player",dash:t(d).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(d),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.909dda02.js.map
