import{d as _,K as g,b as i,c as w,z as t,t as p,D as c,F as D,J as k,H as b,q as I}from"./registerWidgets.1fe34791.js";import{D as P,m as q}from"./DashPlayer.cc6fa604.js";import{L as x}from"./CircularLoading.d753f33f.js";import{r as B}from"./index.09c5c1c7.js";import{B as R}from"./BackButton.8f6bf9a1.js";import{a as m}from"./asyncComputed.92243be5.js";import{D as C}from"./dashes.7b7f26ba.js";import{W as F}from"./workspaces.c8d826f7.js";import"./runnerData.21fbecc4.js";import"./executeJs.d22827db.js";import"./PlayerNavbar.06a8d391.js";import"./icons.6936d0f0.js";import"./WidgetsFrame.1635059a.js";import"./colors.c0e9a7d1.js";import"./Modal.1d6d71ee.js";import"./passwordlessManager.4fd7bb4b.js";import"./pubsub.b559dee6.js";import"./Passwordless.db8c8e00.js";import"./lottie.e5b4ac5e.js";import"./activeRecord.74b17129.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]="6e1ed357-04f3-498f-9318-1688074feb1c",s._sentryDebugIdIdentifier="sentry-dbid-6e1ed357-04f3-498f-9318-1688074feb1c")}catch{}})();const E=_({__name:"DashPreview",setup(s){const r=k(),o=b(),l=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):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:h,result:a,refetch:y}=m(()=>C.get(r.params.dashPath)),{result:u}=m(()=>F.get()),d=g(()=>{if(!a.value||!u.value||!a.value.makeRunnerData(u.value))return null;const e=q(a.value.makeRunnerData(u.value));return e.onRedirect(({url:n,queryParams:v})=>B(o,n,v)),e});return(e,n)=>(i(),w(D,null,[t(h)||!t(a)?(i(),p(x,{key:0,class:"loading",justify:"center"})):c("",!0),t(d)?(i(),p(P,{key:1,class:"player",dash:t(d).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(d),onNavigate:l},null,8,["dash","params","dash-player-service"])):c("",!0),t(a)?(i(),p(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.c4b048b5.js.map
