import{r as b,m as B}from"./index.56c756a6.js";import{u as k}from"./uuid.372ac027.js";import{F as S,R as K}from"./broker.84aa32b4.js";import{d as N,ey as C,ex as E,G as F,J as m,H as y,u,b as s,er as n,f as L,c as w,eB as T,eC as V,e as i,v as A}from"./registerWidgets.ca57da3e.js";import{D as G,m as H}from"./DashPlayer.b93e12be.js";import{a as J}from"./asyncComputed.ae0b6a3c.js";import{L as O}from"./CircularLoading.716a5772.js";import"./passwordlessManager.8d47b009.js";import"./pubsub.277d05a3.js";import"./storage.2a7aac1e.js";import"./Passwordless.dec7e85f.js";import"./icons.1efe7950.js";import"./executeJs.c4f1fb52.js";import"./PlayerNavbar.dd762667.js";import"./Steps.2df1321f.js";import"./Modal.db45c3f3.js";import"./WidgetsFrame.7a78af2f.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.fdeff461.js";import"./geometryUtils.71fcc059.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="2d0e1554-e759-4ef6-82be-98249ea5cc0d",o._sentryDebugIdIdentifier="sentry-dbid-2d0e1554-e759-4ef6-82be-98249ea5cc0d")}catch{}})();const d=o=>(T("data-v-b3aa3ca3"),o=o(),V(),o),j={key:0,class:"loading"},z={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,$],re=N({__name:"Player",setup(o){const r=C(),l=E(),p=F({playerKey:k()});m(r,()=>D());function I(e,t){b("player",l,e,t)}const _=({path:e})=>{l.push({name:"player",query:r.query,params:{path:e.split("/")}})},f=async()=>{p.playerKey=k()};m([()=>r.path,()=>r.query],()=>f());const{loading:P,result:a,error:R,refetch:D}=J(()=>{var e;return B((e=r.path.slice(1))!=null?e:"")}),h=y(()=>c.value?K.create({formPath:c.value.path}):null),c=y(()=>{var e,t;return(t=(e=a.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,g;if(!((t=a.value)!=null&&t.dash))return null;const e=H((g=a.value)==null?void 0:g.dash);return e.onRedirect(({url:q,queryParams:x})=>b("player",l,q,x)),e});return m(a,()=>{var e;!a.value||(a.value.form?document.title=(e=a.value.form.welcomeTitle)!=null?e:a.value.form.title:a.value.dash&&(document.title=a.value.dash.title))}),(e,t)=>u(P)?(s(),n("div",j,[L(O)])):u(R)?(s(),n("div",z,U)):c.value&&h.value?(s(),n("div",W,[(s(),w(S,{key:p.playerKey,class:"player",form:c.value,"is-preview":!1,params:u(r).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(),w(G,{key:p.playerKey,class:"player","is-preview":!1,params:u(r).query,"dash-player-service":v.value,onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ke=A(re,[["__scopeId","data-v-b3aa3ca3"]]);export{ke as default};
//# sourceMappingURL=Player.8fce8337.js.map
