import{d as _,K as g,b as i,c as w,z as t,t as p,D as d,F as D,J as k,H as b,q as I}from"./registerWidgets.309e60e2.js";import{D as P,m as q}from"./DashPlayer.57163158.js";import{L as x}from"./CircularLoading.ab75fdfe.js";import{r as B}from"./index.cbdbb816.js";import{B as R}from"./BackButton.03de6942.js";import{a as m}from"./asyncComputed.b00f3898.js";import{D as C}from"./dashes.7d03aaeb.js";import{W as F}from"./workspaces.ebbe012d.js";import"./runnerData.5a440fd0.js";import"./executeJs.106681fa.js";import"./PlayerNavbar.81125f1f.js";import"./icons.5353538a.js";import"./WidgetsFrame.47a399e3.js";import"./colors.c92fc37f.js";import"./Modal.93f98c35.js";import"./passwordlessManager.707ad0fd.js";import"./pubsub.5200d147.js";import"./Passwordless.80f7e38a.js";import"./lottie.e2f196ac.js";import"./activeRecord.fda98ee0.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]="024ff7e6-1c45-446f-959f-41a3cc3bc1b4",s._sentryDebugIdIdentifier="sentry-dbid-024ff7e6-1c45-446f-959f-41a3cc3bc1b4")}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()),c=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"})):d("",!0),t(c)?(i(),p(P,{key:1,class:"player",dash:t(c).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(c),onNavigate:l},null,8,["dash","params","dash-player-service"])):d("",!0),t(a)?(i(),p(R,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.c4372d80.js.map
