import{d as x,ez as B,ey as K,G as N,J as m,H as y,u as c,b as s,et as n,f as C,c as b,eC as E,eD as F,e as i,v as L}from"./outputWidgets.a4629ff8.js";import"./index.339c7421.js";import{r as k,g as T}from"./executeJs.559e86f5.js";import{u as w}from"./uuid.af431a29.js";import{F as V,R as z}from"./FormRunner.332769c0.js";import{D as A,m as G}from"./index.97c2f464.js";import{a as H}from"./asyncComputed.fb8b9ba6.js";import{L as J}from"./CircularLoading.79e4a789.js";import"./runnerData.83399038.js";import"./url.d6a620b9.js";import"./icons.73bff2ab.js";import"./index.cecf191d.js";import"./pubsub.25dc8c41.js";import"./PlayerNavbar.403ee6e8.js";import"./Steps.dce825a5.js";import"./WidgetsFrame.893465cb.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.b200fdcb.js";import"./geometryUtils.6cff4208.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="f62b8e6e-db50-4377-9d23-575e676ddace",o._sentryDebugIdIdentifier="sentry-dbid-f62b8e6e-db50-4377-9d23-575e676ddace")}catch{}})();const d=o=>(E("data-v-b3aa3ca3"),o=o(),F(),o),O={key:0,class:"loading"},j={key:1,class:"error"},M=d(()=>i("h1",null,"Oops! Something went wrong",-1)),Q=d(()=>i("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),U=[M,Q],W={key:2,class:"form"},X={key:3,class:"dash-wrapper"},Y={key:4,class:"error not-found"},Z=d(()=>i("h1",null,"Page not found",-1)),$=d(()=>i("p",null,"The page you requested could not be found.",-1)),ee=[Z,$],ae=x({__name:"Player",setup(o){const a=B(),l=K(),p=N({playerKey:w()});m(a,()=>R());function I(e,t){k("player",l,e,t)}const _=({path:e})=>{l.push({name:"player",query:a.query,params:{path:e.split("/")}})},f=async()=>{p.playerKey=w()};m([()=>a.path,()=>a.query],()=>f());const{loading:P,result:r,error:D,refetch:R}=H(()=>{var e;return T((e=a.path.slice(1))!=null?e:"")}),h=y(()=>u.value?z.create({formPath:u.value.path}):null),u=y(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,g;if(!((t=r.value)!=null&&t.dash))return null;const e=G((g=r.value)==null?void 0:g.dash);return e.onRedirect(({url:q,queryParams:S})=>k("player",l,q,S)),e});return m(r,()=>{var e;!r.value||(r.value.form?document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title:r.value.dash&&(document.title=r.value.dash.title))}),(e,t)=>c(P)?(s(),n("div",O,[C(J)])):c(D)?(s(),n("div",j,U)):u.value&&h.value?(s(),n("div",W,[(s(),b(V,{key:p.playerKey,class:"player",form:u.value,"is-preview":!1,params:c(a).query,broker:h.value,"enable-auto-focus":!0,onNavigate:_,onLogout:f,onRedirect:I},null,8,["form","params","broker"]))])):v.value?(s(),n("div",X,[(s(),b(A,{key:p.playerKey,class:"player","is-preview":!1,params:c(a).query,"dash-player-service":v.value,onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const be=L(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{be as default};
//# sourceMappingURL=Player.958af7b3.js.map
