import{F as I,r as R,g as P,R as q}from"./FormRunner.5f682dae.js";import{d as x,ez as B,ey as D,E,G as p,F as y,u as d,b as s,et as c,f as F,c as S,eC as C,eD as K,e as i,t as L}from"./outputWidgets.b703ca45.js";import{u as h}from"./uuid.2b259c22.js";import{a as N}from"./asyncComputed.557fdbc3.js";import{L as T}from"./CircularLoading.63631aeb.js";import"./url.7a748c18.js";import"./storage.4f0beb94.js";import"./pubsub.781c61cb.js";import"./jwt-decode.esm.74bd4619.js";import"./index.d4bb89c7.js";import"./icons.5202cd65.js";import"./PlayerNavbar.6e90d633.js";import"./ActionButton.7497460f.js";import"./WidgetsFrame.a8d8fb77.js";import"./index.5fc087d9.js";import"./Card.3c731ead.js";import"./TabPane.9316e440.js";import"./hasIn.66135dec.js";import"./index.006cef5c.js";import"./Text.4646803d.js";import"./Link.b9370a79.js";import"./Title.c76d824d.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="094b2b8a-26a3-4bc7-965c-92efe6ec2638",o._sentryDebugIdIdentifier="sentry-dbid-094b2b8a-26a3-4bc7-965c-92efe6ec2638")}catch{}})();const u=o=>(C("data-v-485e3719"),o=o(),K(),o),V={key:0,class:"loading"},z={key:1,class:"error"},A=u(()=>i("h1",null,"Oops! Something went wrong",-1)),G=u(()=>i("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),O=[A,G],j={key:2,class:"form"},H={key:3,class:"error not-found",style:{height:"100vh"}},J=u(()=>i("h1",null,"Page not found",-1)),M=u(()=>i("p",null,"The page you requested could not be found.",-1)),Q=[J,M],U=x({__name:"Player",setup(o){const t=B(),l=D(),m=E({playerKey:h()});p(t,()=>w());function v(e,a){R("player",l,e,a)}const g=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},_=async()=>{m.playerKey=h()};p([()=>t.path,()=>t.query],()=>_());const{loading:b,result:r,error:k,refetch:w}=N(()=>{var e;return P((e=t.path.slice(1))!=null?e:"")}),f=y(()=>n.value?q.create(n.value.id):null),n=y(()=>{var e,a;return(a=(e=r.value)==null?void 0:e.form)!=null?a:null});return p(r,()=>{var e;!r.value||r.value.form&&(document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title)}),(e,a)=>d(b)?(s(),c("div",V,[F(T)])):d(k)?(s(),c("div",z,O)):n.value&&f.value?(s(),c("div",j,[(s(),S(I,{key:m.playerKey,class:"player",form:n.value,"is-preview":!1,params:d(t).query,broker:f.value,"enable-auto-focus":!0,onNavigate:g,onLogout:_,onRedirect:v},null,8,["form","params","broker"]))])):(s(),c("div",H,Q))}});const he=L(U,[["__scopeId","data-v-485e3719"]]);export{he as default};
//# sourceMappingURL=Player.147aab88.js.map
