import{F as I,r as R,g as P,R as q}from"./FormRunner.fdadd483.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 i,f as F,c as S,eC as C,eD as K,e as u,t as L}from"./outputWidgets.4b203988.js";import{u as h}from"./uuid.2f7b47ed.js";import{a as N}from"./asyncComputed.e3f401af.js";import{L as T}from"./CircularLoading.31bc2494.js";import"./url.fcdccb50.js";import"./storage.e938f042.js";import"./pubsub.3a2fa885.js";import"./jwt-decode.esm.74bd4619.js";import"./index.85e6facd.js";import"./icons.b5300508.js";import"./PlayerNavbar.7db6fd7e.js";import"./ActionButton.fee7ae20.js";import"./WidgetsFrame.c31e5796.js";import"./index.a717dae8.js";import"./Card.789851ad.js";import"./TabPane.763603c5.js";import"./hasIn.c2d80060.js";import"./index.689acef2.js";import"./Text.574763d2.js";import"./Link.daf6c82a.js";import"./Title.aa160519.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]="c1e08c87-38b2-433e-9899-28e66ba32e0a",o._sentryDebugIdIdentifier="sentry-dbid-c1e08c87-38b2-433e-9899-28e66ba32e0a")}catch{}})();const c=o=>(C("data-v-485e3719"),o=o(),K(),o),V={key:0,class:"loading"},z={key:1,class:"error"},A=c(()=>u("h1",null,"Oops! Something went wrong",-1)),G=c(()=>u("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=c(()=>u("h1",null,"Page not found",-1)),M=c(()=>u("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(),i("div",V,[F(T)])):d(k)?(s(),i("div",z,O)):n.value&&f.value?(s(),i("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(),i("div",H,Q))}});const he=L(U,[["__scopeId","data-v-485e3719"]]);export{he as default};
//# sourceMappingURL=Player.42e9a5dd.js.map
