import{F as I,r as R,R as B}from"./FormRunner.3f564013.js";import{d as P,eB as q,eA as x,G as D,J as p,H as y,u as d,b as s,ev as i,f as E,c as F,eE as S,eF as K,e as c,v as L}from"./outputWidgets.65314838.js";import{u as h}from"./uuid.4ef2dd76.js";import{a as N}from"./asyncComputed.223cd718.js";import{g as A}from"./api.751039da.js";import{L as C}from"./CircularLoading.b61e4a94.js";import"./url.209588c6.js";import"./Passwordless.991496b7.js";import"./index.e5677374.js";import"./pubsub.07a23b99.js";import"./icons.273c97a3.js";import"./PlayerNavbar.dc71657b.js";import"./ActionButton.377fbfc2.js";import"./WidgetsFrame.3b8d9223.js";import"./index.e097d797.js";import"./Base.c866b7a3.js";import"./Link.85f863b0.js";import"./Paragraph.8de48e53.js";import"./Text.171782d7.js";import"./Title.465916fc.js";import"./Card.91cd2336.js";import"./TabPane.76a109aa.js";import"./hasIn.c524fe42.js";import"./runnerData.7e3dae75.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]="952a736c-5433-442f-9c54-dd2f1cb6a5ee",o._sentryDebugIdIdentifier="sentry-dbid-952a736c-5433-442f-9c54-dd2f1cb6a5ee")}catch{}})();const u=o=>(S("data-v-485e3719"),o=o(),K(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=u(()=>c("h1",null,"Oops! Something went wrong",-1)),H=u(()=>c("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),J=[G,H],O={key:2,class:"form"},j={key:3,class:"error not-found",style:{height:"100vh"}},z=u(()=>c("h1",null,"Page not found",-1)),M=u(()=>c("p",null,"The page you requested could not be found.",-1)),Q=[z,M],U=P({__name:"Player",setup(o){const t=q(),l=x(),m=D({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 A((e=t.path.slice(1))!=null?e:"")}),f=y(()=>n.value?B.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",T,[E(C)])):d(k)?(s(),i("div",V,J)):n.value&&f.value?(s(),i("div",O,[(s(),F(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",j,Q))}});const ge=L(U,[["__scopeId","data-v-485e3719"]]);export{ge as default};
//# sourceMappingURL=Player.9b7f2e86.js.map
