import{F as I,r as R,R as B}from"./FormRunner.7adf5098.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 a,ev as i,f as E,c as F,eE as S,eF as K,e as u,v as L}from"./outputWidgets.5c52fa87.js";import{u as h}from"./uuid.3fa39a9b.js";import{a as N}from"./asyncComputed.26d9bcc1.js";import{a as A}from"./api.23d9b812.js";import{L as C}from"./CircularLoading.4d5881ae.js";import"./url.8bc1ece1.js";import"./Passwordless.72ff327e.js";import"./index.de88781f.js";import"./pubsub.5093c187.js";import"./icons.03282d1d.js";import"./PlayerNavbar.c90d2c39.js";import"./ActionButton.37faf678.js";import"./WidgetsFrame.3767f614.js";import"./index.6e14eff5.js";import"./Base.6d1a6939.js";import"./Link.c6635c0a.js";import"./Paragraph.cff93cf2.js";import"./Text.c9a398d0.js";import"./Title.91b6cec6.js";import"./Card.f3624547.js";import"./TabPane.78291069.js";import"./hasIn.f2c6482d.js";import"./runnerData.82f622be.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]="b707cb7a-480b-4322-952e-f698bc696fd4",o._sentryDebugIdIdentifier="sentry-dbid-b707cb7a-480b-4322-952e-f698bc696fd4")}catch{}})();const c=o=>(S("data-v-485e3719"),o=o(),K(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=c(()=>u("h1",null,"Oops! Something went wrong",-1)),H=c(()=>u("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=c(()=>u("h1",null,"Page not found",-1)),M=c(()=>u("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,s){R("player",l,e,s)}const b=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},_=async()=>{m.playerKey=h()};p([()=>t.path,()=>t.query],()=>_());const{loading:g,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,s;return(s=(e=r.value)==null?void 0:e.form)!=null?s: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,s)=>d(g)?(a(),i("div",T,[E(C)])):d(k)?(a(),i("div",V,J)):n.value&&f.value?(a(),i("div",O,[(a(),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:b,onLogout:_,onRedirect:v},null,8,["form","params","broker"]))])):(a(),i("div",j,Q))}});const be=L(U,[["__scopeId","data-v-485e3719"]]);export{be as default};
//# sourceMappingURL=Player.e2569b8e.js.map
