(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return S},MissingStaticPage:function(){return E},NormalizeError:function(){return P},PageNotFoundError:function(){return w},SP:function(){return g},ST:function(){return h},WEB_VITALS:function(){return i},execOnce:function(){return a},getDisplayName:function(){return f},getLocationOrigin:function(){return c},getURL:function(){return l},isAbsoluteUrl:function(){return s},isResSent:function(){return p},loadGetInitialProps:function(){return m},normalizeRepeatedSlashes:function(){return d},stringifyError:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function a(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let u=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>u.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function l(){let{href:e}=window.location,t=c();return e.substring(t.length)}function f(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(e){return e.finished||e.headersSent}function d(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function m(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await m(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&p(r))return n;if(!n)throw Object.defineProperty(Error(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return n}let g="u">typeof performance,h=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class P extends Error{}class w extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class E extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class S extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return s},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function a(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function u(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,a(e));else t.set(r,a(n));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},32341,e=>{"use strict";var t=e.i(43476),r=e.i(71645);let n="https://api.kingdomsystem.gamanywaconsult.com/api",o=(0,r.createContext)(null);e.s(["API",0,n,"AuthProvider",0,function({children:e}){let[i,a]=(0,r.useState)(null),[u,s]=(0,r.useState)(null),[c,l]=(0,r.useState)(!0);async function f(e){try{let t=await fetch(`${n}/participants/me`,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(t.ok){let e=await t.json();a(e)}else localStorage.removeItem("wmi_token"),s(null),a(null)}catch{localStorage.removeItem("wmi_token"),s(null),a(null)}}async function p(e,t){let r=await fetch(`${n}/participants/login`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({username:e,password:t})});if(!r.ok){let e=await r.json();throw Error(e.errors?.username?.[0]||e.message||"Login failed")}let o=await r.json();localStorage.setItem("wmi_token",o.token),s(o.token),a(o.participant)}async function d(){u&&await fetch(`${n}/participants/logout`,{method:"POST",headers:{Authorization:`Bearer ${u}`,Accept:"application/json"}}).catch(()=>{}),localStorage.removeItem("wmi_token"),s(null),a(null)}async function m(){u&&await f(u)}return(0,r.useEffect)(()=>{let e=localStorage.getItem("wmi_token");e?(s(e),f(e).finally(()=>l(!1))):l(!1)},[]),(0,t.jsx)(o.Provider,{value:{user:i,token:u,loading:c,login:p,logout:d,refreshUser:m},children:e})},"useAuth",0,function(){let e=(0,r.useContext)(o);if(!e)throw Error("useAuth must be used inside AuthProvider");return e}])}]);