1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{57542:function(e,t,r){"use strict";var n,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(l,{createBrowserSupabaseClient:()=>O,createClientComponentClient:()=>u,createMiddlewareClient:()=>b,createMiddlewareSupabaseClient:()=>T,createPagesBrowserClient:()=>d,createPagesServerClient:()=>g,createRouteHandlerClient:()=>E,createServerActionClient:()=>S,createServerComponentClient:()=>x,createServerSupabaseClient:()=>C}),e.exports=((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of o(t))a.call(e,l)||l===r||i(e,l,{get:()=>t[l],enumerable:!(n=s(t,l))||n.enumerable});return e})(i({},"__esModule",{value:!0}),l);var c=r(63119);function u({supabaseUrl:e="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:t="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:r,cookieOptions:i,isSingleton:s=!0}={}){if(!e||!t)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");let o=()=>{var n;return(0,c.createSupabaseClient)(e,t,{...r,global:{...null==r?void 0:r.global,headers:{...null==(n=null==r?void 0:r.global)?void 0:n.headers,"X-Client-Info":"@supabase/[email protected]"}},auth:{storage:new c.BrowserCookieAuthStorageAdapter(i)}})};if(s){let e=n??o();return"undefined"==typeof window?e:(n||(n=e),n)}return o()}var d=u,h=r(63119),f=r(69328),p=class extends h.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t,r,n;return(0,f.splitCookiesString)((null==(r=null==(t=this.context.res)?void 0:t.getHeader("set-cookie"))?void 0:r.toString())??"").map(t=>(0,h.parseCookies)(t)[e]).find(e=>!!e)??(null==(n=this.context.req)?void 0:n.cookies[e])}setCookie(e,t){this._setCookie(e,t)}deleteCookie(e){this._setCookie(e,"",{maxAge:0})}_setCookie(e,t,r){var n;let i=(0,f.splitCookiesString)((null==(n=this.context.res.getHeader("set-cookie"))?void 0:n.toString())??"").filter(t=>!(e in(0,h.parseCookies)(t))),s=(0,h.serializeCookie)(e,t,{...this.cookieOptions,...r,httpOnly:!1});this.context.res.setHeader("set-cookie",[...i,s])}};function g(e,{supabaseUrl:t="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:n,cookieOptions:i}={}){var s;if(!t||!r)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,h.createSupabaseClient)(t,r,{...n,global:{...null==n?void 0:n.global,headers:{...null==(s=null==n?void 0:n.global)?void 0:s.headers,"X-Client-Info":"@supabase/[email protected]"}},auth:{storage:new p(e,i)}})}var m=r(63119),y=r(69328),v=class extends m.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t;return(0,y.splitCookiesString)((null==(t=this.context.res.headers.get("set-cookie"))?void 0:t.toString())??"").map(t=>(0,m.parseCookies)(t)[e]).find(e=>!!e)||(0,m.parseCookies)(this.context.req.headers.get("cookie")??"")[e]}setCookie(e,t){this._setCookie(e,t)}deleteCookie(e){this._setCookie(e,"",{maxAge:0})}_setCookie(e,t,r){let n=(0,m.serializeCookie)(e,t,{...this.cookieOptions,...r,httpOnly:!1});this.context.res.headers&&this.context.res.headers.append("set-cookie",n)}};function b(e,{supabaseUrl:t="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:n,cookieOptions:i}={}){var s;if(!t||!r)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,m.createSupabaseClient)(t,r,{...n,global:{...null==n?void 0:n.global,headers:{...null==(s=null==n?void 0:n.global)?void 0:s.headers,"X-Client-Info":"@supabase/[email protected]"}},auth:{storage:new v(e,i)}})}var w=r(63119),_=class extends w.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e,this.isServer=!0}getCookie(e){var t;return null==(t=this.context.cookies().get(e))?void 0:t.value}setCookie(e,t){}deleteCookie(e){}};function x(e,{supabaseUrl:t="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:n,cookieOptions:i}={}){var s;if(!t||!r)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,w.createSupabaseClient)(t,r,{...n,global:{...null==n?void 0:n.global,headers:{...null==(s=null==n?void 0:n.global)?void 0:s.headers,"X-Client-Info":"@supabase/[email protected]"}},auth:{storage:new _(e,i)}})}var k=r(63119),j=class extends k.CookieAuthStorageAdapter{constructor(e,t){super(t),this.context=e}getCookie(e){var t;return null==(t=this.context.cookies().get(e))?void 0:t.value}setCookie(e,t){this.context.cookies().set(e,t,this.cookieOptions)}deleteCookie(e){this.context.cookies().set(e,"",{...this.cookieOptions,maxAge:0}
1)}};function E(e,{supabaseUrl:t="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:n,cookieOptions:i}={}){var s;if(!t||!r)throw Error("either NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY env variables or supabaseUrl and supabaseKey are required!");return(0,k.createSupabaseClient)(t,r,{...n,global:{...null==n?void 0:n.global,headers:{...null==(s=null==n?void 0:n.global)?void 0:s.headers,"X-Client-Info":"@supabase/[email protected]"}},auth:{storage:new j(e,i)}})}var S=E;function O({supabaseUrl:e="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:t="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:r,cookieOptions:n}={}){return console.warn("Please utilize the `createPagesBrowserClient` function instead of the deprecated `createBrowserSupabaseClient` function. Learn more: https://supabase.com/docs/guides/auth/auth-helpers/nextjs-pages"),d({supabaseUrl:e,supabaseKey:t,options:r,cookieOptions:n})}function C(e,{supabaseUrl:t="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:n,cookieOptions:i}={}){return console.warn("Please utilize the `createPagesServerClient` function instead of the deprecated `createServerSupabaseClient` function. Learn more: https://supabase.com/docs/guides/auth/auth-helpers/nextjs-pages"),g(e,{supabaseUrl:t,supabaseKey:r,options:n,cookieOptions:i})}function T(e,{supabaseUrl:t="https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:r="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ",options:n,cookieOptions:i}={}){return console.warn("Please utilize the `createMiddlewareClient` function instead of the deprecated `createMiddlewareSupabaseClient` function. Learn more: https://supabase.com/docs/guides/auth/auth-helpers/nextjs#middleware"),b(e,{supabaseUrl:t,supabaseKey:r,options:n,cookieOptions:i})}},89743:function(e,t,r){"use strict";r.r(t),r.d(t,{Headers:function(){return s},Request:function(){return o},Response:function(){return a},fetch:function(){return i}});var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}();let i=n.fetch;t.default=n.fetch.bind(n);let s=n.Headers,o=n.Request,a=n.Response},81879:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(89743)),s=n(r(29577));class o{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=i.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Object.assign({},this.headers),this.headers[e]=t,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let r=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async e=>{var t,r,n;let i=null,o=null,a=null,l=e.status,c=e.statusText;if(e.ok){if("HEAD"!==this.method){let t=await e.text();""===t||(o="text/csv"===this.headers.Accept?t:this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}let n=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),s=null===(r=e.headers.get("content-range"))||void 0===r?void 0:r.split("/");n&&s&&s.length>1&&(a=parseInt(s[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(o)&&(o.length>1?(i={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,a=null,l=406,c="Not Acceptable"):o=1===o.length?o[0]:null)}else{let t=await e.text();try{i=JSON.parse(t),Array.isArray(i)&&404===e.status&&(o=[],i=null,l=200,c="OK")}catch(r){404===e.status&&""===t?(l=204,c="No Content"):i={message:t}}if(i&&this.isMaybeSingle&&(null===(n=null==i?void 0:i.details)||void 0===n?void 0:n.includes("0 rows"))&&(i=null,l=200,c="OK"),i&&this.shouldThrowOnError)throw new s.default(i)}return{error:i,data:o,count:a,status:l,statusText:c}});return this.shouldThrowOnError||(r=r.catch(e=>{var t,r,n;return{error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:`${null!==(r=null==e?void 0:e.stack)&&void 0!==r?r:""}`,hint:"",code:`${null!==(n=null==e?void 0:e.code)&&void 0!==n?n:""}`},data:null,count:null,status:0,statusText:""}}
1)),r.then(e,t)}returns(){return this}overrideTypes(){return this}}t.default=o},40435:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(89527)),s=n(r(28483)),o=r(50862);class a{constructor(e,{headers:t={},schema:r,fetch:n}={}){this.url=e,this.headers=Object.assign(Object.assign({},o.DEFAULT_HEADERS),t),this.schemaName=r,this.fetch=n}from(e){let t=new URL(`${this.url}/${e}`);return new i.default(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new a(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:r=!1,get:n=!1,count:i}={}){let o,a;let l=new URL(`${this.url}/rpc/${e}`);r||n?(o=r?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`]).forEach(([e,t])=>{l.searchParams.append(e,t)})):(o="POST",a=t);let c=Object.assign({},this.headers);return i&&(c.Prefer=`count=${i}`),new s.default({method:o,url:l,headers:c,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}t.default=a},29577:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
1de=e.code}}t.default=r},28483:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(47486));class s extends i.default{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){let r=Array.from(new Set(t)).map(e=>"string"==typeof e&&RegExp("[,()]").test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let i="";"plain"===n?i="pl":"phrase"===n?i="ph":"websearch"===n&&(i="w");let s=void 0===r?"":`(${r})`;return this.url.searchParams.append(e,`${i}fts${s}.${t}`),this}match(e){return Object.entries(e).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){let n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}}t.default=s},89527:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(28483));class s{constructor(e,{headers:t={},schema:r,fetch:n}){this.url=e,this.headers=t,this.schema=r,this.fetch=n}select(e,{head:t=!1,count:r}={}){let n=!1,s=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!n?"":('"'===e&&(n=!n),e)).join("");return this.url.searchParams.set("select",s),r&&(this.headers.Prefer=`count=${r}`),new i.default({method:t?"HEAD":"GET",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:r=!0}={}){let n=[];if(this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),r||n.push("missing=default"),this.headers.Prefer=n.join(","),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new i.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){let o=[`resolution=${r?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),n&&o.push(`count=${n}`),s||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){let t=e.reduce((e,t)=>
1e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);this.url.searchParams.set("columns",e.join(","))}}return new i.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){let r=[];return this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),this.headers.Prefer=r.join(","),new i.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){let t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new i.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}t.default=s},47486:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let i=n(r(81879));class s extends i.default{select(e){let t=!1,r=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:i=n}={}){let s=i?`${i}.order`:"order",o=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${void 0===r?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){let n=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){let i=void 0===n?"offset":`${n}.offset`,s=void 0===n?"limit":`${n}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(s,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:i=!1,format:s="text"}={}){var o;let a=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(o=this.headers.Accept)&&void 0!==o?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${s}; for="${l}"; options=${a};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}t.default=s},50862:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_HEADERS=void 0;let n=r(98771);t.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${n.version}`}},50159:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PostgrestError=t.PostgrestBuilder=t.PostgrestTransformBuilder=t.PostgrestFilterBuilder=t.PostgrestQueryBuilder=t.PostgrestClient=void 0;let i=n(r(40435));t.PostgrestClient=i.default;let s=n(r(89527));t.PostgrestQueryBuilder=s.default;let o=n(r(28483));t.PostgrestFilterBuilder=o.default;let a=n(r(47486));t.PostgrestTransformBuilder=a.default;let l=n(r(81879));t.PostgrestBuilder=l.default;let c=n(r(29577));t.PostgrestError=c.default,t.default={PostgrestClient:i.default,PostgrestQueryBuilder:s.default,PostgrestFilterBuilder:o.default,PostgrestTransformBuilder:a.default,PostgrestBuilder:l.default,PostgrestError:c.default}},98771:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.0.0-automated"},79742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,s=l(e),o=s[0],a=s[1],c=new i((o+a)*3/4-a),u=0,d=a>0?o-4:o;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=0,a=n-i;o<a;o+=16383)s.push(function(e,t,n){for(var i,s=[],o=t;o<n;o+=3)s.push(r[(i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(e,o,o+16383>a?a:o+16383));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",o=0,a=s.length;o<a;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:function(e,t,r){"use strict";let n=r(79742),i=r(80645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|p(e,t),n=o(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);let i=function(e){var t;if(a.isBuffer(e)){let t=0|f(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|f(e))}function d(e){let t=e.length<0?0:0|f(e.length),r=o(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:N(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=M[e[n]];return i}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":var s,o;return s=t,o=r,0===s&&o===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(s,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),i="";for(let e=0;e<n.length-1;
vendor: 4,506 bytes, line 1
1e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}(this,t,r);default:if(i)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var s;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(s=r=+r)!=s&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let s,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===l)return n*o}else -1!==n&&(s-=s-n),n=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){let r=!0;for(let n=0;n<l;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return -1}function b(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i<r;){let t=e[i],s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,a,l;switch(o){case 1:t<128&&(s=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(s=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(s=l);break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],(192&r)==128&&(192&n)==128&&(192&a)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a)>65535&&l<1114112&&(s=l)}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,s){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function x(e,t,r,n,i){A(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function k(e,t,r,n,i){A(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function j(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function E(e,t,r,n,s){return t=+t,r>>>=0,s||j(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function S(e,t,r,n,s){return t=+t,r>>>=0,s||j(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=a,t.h2=50,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!
vendor: 12,506 bytes, line 1
1a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){let t=e[r];if(U(t,Uint8Array))i+t.length>n.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(a.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):g.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let s=i-n,o=r-t,l=Math.min(s,o),c=this.slice(n,i),u=e.slice(t,r);for(let e=0;e<l;++e)if(c[e]!==u[e]){s=c[e],o=u[e];break}return s<o?-1:o<s?1:0},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){var i,s,o,a,l,c,u,d;if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let s=e.length-r;n?(n=Number(n))>s&&(n=s):n=s;let o=t.length;for(n>o/2&&(n=o/2),i=0;i<n;++i){let n=parseInt(t.substr(2*i,2),16);if(n!=n)break;e[r+i]=n}return i}(this,e,t,r);case"utf8":case"utf-8":return i=t,s=r,$(N(e,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return o=t,a=r,$(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,o,a);case"base64":return l=t,c=r,$(L(e),this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,d=r,$(function(e,t){let r,n;let i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-u),this,u,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=B(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&P(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(i)<<BigInt(32))}),a.prototype.readBigUInt64BE=B(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&P(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],i=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=B(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&P(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+16777216*this[++e])}),a.prototype.readBigInt64BE=B(function(e){I(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&P(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(16777216*this[++e]+65536*this[++e]+256*this[++e]+r)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=B(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=B(function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}let i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=B(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=B(function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return E(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return E(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return S(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return S(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){let i;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{let s=a.isBuffer(e)?e:a.from(e,n),o=s.length;
vendor: 4,435 bytes, line 1
1if(0===o)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};let O={};function C(e,t,r){O[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function T(e){let t="",r=e.length,n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function A(e,t,r,n,i,s){if(e>r||e<t){let n;let i="bigint"==typeof t?"n":"";throw n=s>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(s+1)*8}${i}`:`>= -(2${i} ** ${(s+1)*8-1}${i}) and < 2 ** ${(s+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new O.ERR_OUT_OF_RANGE("value",n,e)}I(i,"offset"),(void 0===n[i]||void 0===n[i+s])&&P(i,n.length-(s+1))}function I(e,t){if("number"!=typeof e)throw new O.ERR_INVALID_ARG_TYPE(t,"number",e)}function P(e,t,r){if(Math.floor(e)!==e)throw I(e,r),new O.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new O.ERR_BUFFER_OUT_OF_BOUNDS;throw new O.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}C("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),C("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),C("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=T(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=T(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let R=/[^+/0-9A-Za-z-_]/g;function N(e,t){let r;t=t||1/0;let n=e.length,i=null,s=[];for(let o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function L(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let M=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function B(e){return"undefined"==typeof BigInt?z:e}function z(){throw Error("BigInt not supported")}},80645:function(e,t){t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,l=(1<<a)-1,c=l>>1,u=-7,d=r?i-1:0,h=r?-1:1,f=e[t+d];for(d+=h,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=256*s+e[t+d],d+=h,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=n;u>0;o=256*o+e[t+d],d+=h,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),s-=c}return(f?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,l,c=8*s-i-1,u=(1<<c)-1,d=u>>1,h=23===i?5960464477539062e-23:0,f=n?0:s-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+f]=255&a,f+=p,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*g}},2962:function(e,t,r){"use strict";r.d(t,{C_:function(){return S},Mg:function(){return z},PB:function(){return g},dX:function(){return F},gR:function(){return G},lX:function(){return p},ns:function(){return M},yA:function(){return $}});var n=r(67294),i=r(9008),s=r.n(i);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}var l=["keyOverride"],c=["crossOrigin"],u={templateTitle:"",noindex:!1,nofollow:!1,norobots:!1,defaultOpenGraphImageWidth:0,defaultOpenGraphImageHeight:0,defaultOpenGraphVideoWidth:0,defaultOpenGraphVideoHeight:0},d=function(e,t,r){void 0===t&&(t=[]);var i=void 0===r?{}:r,s=i.defaultWidth,o=i.defaultHeight;return t.reduce(function(t,r,i){return t.push(n.createElement("meta",{key:"og:"+e+":0"+i,property:"og:"+e,content:r.url})),r.alt&&t.push(n.createElement("meta",{key:"og:"+e+":alt0"+i,property:"og:"+e+":alt",content:r.alt})),r.secureUrl&&t.push(n.createElement("meta",{key:"og:"+e+":secure_url0"+i,property:"og:"+e+":secure_url",content:r.secureUrl.toString()})),r.type&&t.push(n.createElement("meta",{key:"og:"+e+":type0"+i,property:"og:"+e+":type",content:r.type.toString()})),r.width?t.push(n.createElement("meta",{key:"og:"+e+":width0"+i,property:"og:"+e+":width",content:r.width.toString()})):s&&t.push(n.createElement("meta",{key:"og:"+e+":width0"+i,property:"og:"+e+":width",content:s.toString()})),r.height?t.push(n.createElement("meta",{key:"og:"+e+":height"+i,property:"og:"+e+":height",content:r.height.toString()})):o&&t.push(n.createElement("meta",{key:"og:"+e+":height"+i,property:"og:"+e+":height",content:o.toString()})),t},[])},h=function(e){var t,r,i,s,h,f=[];e.titleTemplate&&(u.templateTitle=e.titleTemplate);var p="";e.title?(p=e.title,u.templateTitle&&(p=u.templateTitle.replace(/%s/g,function(){return p}))):e.defaultTitle&&(p=e.defaultTitle),p&&f.push(n.createElement("title",{key:"title"},p));var g=void 0===e.noindex?u.noindex||e.dangerouslySetAllPagesToNoIndex:e.noindex,m=void 0===e.nofollow?u.nofollow||e.dangerouslySetAllPagesToNoFollow:e.nofollow,y=e.norobots||u.norobots,v="";if(e.robotsProps){var b=e.robotsProps,w=b.nosnippet,_=b.maxSnippet,x=b.maxImagePreview,k=b.maxVideoPreview,j=b.noarchive,E=b.noimageindex,S=b.notranslate,O=b.unavailableAfter;v=(w?",nosnippet":"")+(_?",max-snippet:"+_:"")+(x?",max-image-preview:"+x:"")+(j?",noarchive":"")+(O?",unavailable_after:"+O:"")+(E?",noimageindex":"")+(k?",max-video-preview:"+k:"")+(S?",notranslate":"")}if(e.norobots&&(u.norobots=!0),g||m?(e.dangerouslySetAllPagesToNoIndex&&(u.noindex=!0),e.dangerouslySetAllPagesToNoFollow&&(u.nofollow=!0),f.push(n.createElement("meta",{key:"robots",name:"robots",content:(g?"noindex":"index")+","+(m?"nofollow":"follow")+v}))):(!y||v)&&f.push(n.createElement("meta",{key:"robots",name:"robots",content:"index,follow"+v})),e.description&&f.push(n.createElement("meta",{key:"description",name:"description",content:e.description})),e.themeColor&&f.push(n.createElement("meta",{key:"theme-color",name:"theme-color",content:e.themeColor})),e.mobileAlternate&&f.push(n.createElement("link",{rel:"alternate",key:"mobileAlternate",media:e.mobileAlternate.media,href:e.mobileAlternate.href})),e.languageAlternates&&e.languageAlternates.length>0&&e.languageAlternates.forEach(function(e){f.push(n.createElement("link",{rel:"alternate",key:"languageAlternate-"+e.hrefLang,hrefLang:e.hrefLang,href:e.href}))}),e.twitter&&(e.twitter.cardType&&f.push(n.createElement("meta",{key:"twitter:card",name:"twitter:card",content:e.twitter.cardType})),e.twitter.site&&f.push(n.createElement("meta",{key:"twitter:site",name:"twitter:site",content:e.twitter.site})),e.twitter.handle&&f.push(n.createElement("meta",{key:"twitter:creator",name:"twitter:creator",content:e.twitter.handle}))),e.facebook&&e.facebook.appId&&f.push(n.createElement("meta",{key:"fb:app_id",property:"fb:app_id",content:e.facebook.appId})),(null!=(t=e.openGraph)&&t.title||p)&&f.push(n.createElement("meta",{key:"og:title",property:"og:title",content:(null==(s=e.openGraph)?void 0:s.title)||p})),(null!=(r=e.openGraph)&&r.description||e.description)&&f.push(n.createElement("meta",{key:"og:description",property:"og:description",content:(null==(h=e.openGraph)?void 0:h.description)||e.description})),e.openGraph){if((e.openGraph.url||e.canonical)&&f.push(n.createElement("meta",{key:"og:url",property:"og:url",content:e.openGraph.url||e.canonical})),e.openGraph.type){var C=e.openGraph.type.toLowerCase();f.push(n.createElement("meta",{key:"og:type",property:"og:type",content:C})),"profile"===C&&e.openGraph.profile?(e.openGraph.profile.firstName&&f.push(n.createElement("meta",{key:"profile:first_name",property:"profile:first_name",content:e.openGraph.profile.firstName})),e.openGraph.profile.lastName&&f.push(n.createElement("meta",{key:"profile:last_name",property:"profile:last_name",content:e.openGraph.profile.lastName})),e.openGraph.profile.username&&f.push(n.createElement("meta",{key:"profile:username",property:"profile:username",content:e.openGraph.profile.username})),e.openGraph.profile.gender&&f.push(n.createElement("meta",{key:"profile:gender",property:"profile:gender",content:e.openGraph.profile.gender}))):"book"===C&&e.openGraph.book?(e.openGraph.book.authors&&e.openGraph.book.authors.length&&e.openGraph.book.authors.forEac
1h(function(e,t){f.push(n.createElement("meta",{key:"book:author:0"+t,property:"book:author",content:e}))}),e.openGraph.book.isbn&&f.push(n.createElement("meta",{key:"book:isbn",property:"book:isbn",content:e.openGraph.book.isbn})),e.openGraph.book.releaseDate&&f.push(n.createElement("meta",{key:"book:release_date",property:"book:release_date",content:e.openGraph.book.releaseDate})),e.openGraph.book.tags&&e.openGraph.book.tags.length&&e.openGraph.book.tags.forEach(function(e,t){f.push(n.createElement("meta",{key:"book:tag:0"+t,property:"book:tag",content:e}))})):"article"===C&&e.openGraph.article?(e.openGraph.article.publishedTime&&f.push(n.createElement("meta",{key:"article:published_time",property:"article:published_time",content:e.openGraph.article.publishedTime})),e.openGraph.article.modifiedTime&&f.push(n.createElement("meta",{key:"article:modified_time",property:"article:modified_time",content:e.openGraph.article.modifiedTime})),e.openGraph.article.expirationTime&&f.push(n.createElement("meta",{key:"article:expiration_time",property:"article:expiration_time",content:e.openGraph.article.expirationTime})),e.openGraph.article.authors&&e.openGraph.article.authors.length&&e.openGraph.article.authors.forEach(function(e,t){f.push(n.createElement("meta",{key:"article:author:0"+t,property:"article:author",content:e}))}),e.openGraph.article.section&&f.push(n.createElement("meta",{key:"article:section",property:"article:section",content:e.openGraph.article.section})),e.openGraph.article.tags&&e.openGraph.article.tags.length&&e.openGraph.article.tags.forEach(function(e,t){f.push(n.createElement("meta",{key:"article:tag:0"+t,property:"article:tag",content:e}))})):("video.movie"===C||"video.episode"===C||"video.tv_show"===C||"video.other"===C)&&e.openGraph.video&&(e.openGraph.video.actors&&e.openGraph.video.actors.length&&e.openGraph.video.actors.forEach(function(e,t){e.profile&&f.push(n.createElement("meta",{key:"video:actor:0"+t,property:"video:actor",content:e.profile})),e.role&&f.push(n.createElement("meta",{key:"video:actor:role:0"+t,property:"video:actor:role",content:e.role}))}),e.openGraph.video.directors&&e.openGraph.video.directors.length&&e.openGraph.video.directors.forEach(function(e,t){f.push(n.createElement("meta",{key:"video:director:0"+t,property:"video:director",content:e}))}),e.openGraph.video.writers&&e.openGraph.video.writers.length&&e.openGraph.video.writers.forEach(function(e,t){f.push(n.createElement("meta",{key:"video:writer:0"+t,property:"video:writer",content:e}))}),e.openGraph.video.duration&&f.push(n.createElement("meta",{key:"video:duration",property:"video:duration",content:e.openGraph.video.duration.toString()})),e.openGraph.video.releaseDate&&f.push(n.createElement("meta",{key:"video:release_date",property:"video:release_date",content:e.openGraph.video.releaseDate})),e.openGraph.video.tags&&e.openGraph.video.tags.length&&e.openGraph.video.tags.forEac
1h(function(e,t){f.push(n.createElement("meta",{key:"video:tag:0"+t,property:"video:tag",content:e}))}),e.openGraph.video.series&&f.push(n.createElement("meta",{key:"video:series",property:"video:series",content:e.openGraph.video.series})))}e.defaultOpenGraphImageWidth&&(u.defaultOpenGraphImageWidth=e.defaultOpenGraphImageWidth),e.defaultOpenGraphImageHeight&&(u.defaultOpenGraphImageHeight=e.defaultOpenGraphImageHeight),e.openGraph.images&&e.openGraph.images.length&&f.push.apply(f,d("image",e.openGraph.images,{defaultWidth:u.defaultOpenGraphImageWidth,defaultHeight:u.defaultOpenGraphImageHeight})),e.defaultOpenGraphVideoWidth&&(u.defaultOpenGraphVideoWidth=e.defaultOpenGraphVideoWidth),e.defaultOpenGraphVideoHeight&&(u.defaultOpenGraphVideoHeight=e.defaultOpenGraphVideoHeight),e.openGraph.videos&&e.openGraph.videos.length&&f.push.apply(f,d("video",e.openGraph.videos,{defaultWidth:u.defaultOpenGraphVideoWidth,defaultHeight:u.defaultOpenGraphVideoHeight})),e.openGraph.audio&&f.push.apply(f,d("audio",e.openGraph.audio)),e.openGraph.locale&&f.push(n.createElement("meta",{key:"og:locale",property:"og:locale",content:e.openGraph.locale})),(e.openGraph.siteName||e.openGraph.site_name)&&f.push(n.createElement("meta",{key:"og:site_name",property:"og:site_name",content:e.openGraph.siteName||e.openGraph.site_name}))}return e.canonical&&f.push(n.createElement("link",{rel:"canonical",href:e.canonical,key:"canonical"})),e.additionalMetaTags&&e.additionalMetaTags.length>0&&e.additionalMetaTags.forEach(function(e){var t,r,i=e.keyOverride,s=a(e,l);f.push(n.createElement("meta",o({key:"meta:"+(null!=(t=null!=(r=null!=i?i:s.name)?r:s.property)?t:s.httpEquiv)},s)))}),null!=(i=e.additionalLinkTags)&&i.length&&e.additionalLinkTags.forEach(function(e){var t,r=e.crossOrigin,i=a(e,c);f.push(n.createElement("link",o({key:"link"+(null!=(t=i.keyOverride)?t:i.href)+i.rel},i,{crossOrigin:"anonymous"===r||"use-credentials"===r||""===r?r:void 0})))}),f},f=function(e){return n.createElement(s(),null,h(e))},p=function(e){var t=e.title,r=e.titleTemplate,i=e.defaultTitle,s=e.themeColor,o=e.dangerouslySetAllPagesToNoIndex,a=e.dangerouslySetAllPagesToNoFollow,l=e.description,c=e.canonical,u=e.facebook,d=e.openGraph,h=e.additionalMetaTags,p=e.twitter,g=e.defaultOpenGraphImageWidth,m=e.defaultOpenGraphImageHeight,y=e.defaultOpenGraphVideoWidth,v=e.defaultOpenGraphVideoHeight,b=e.mobileAlternate,w=e.languageAlternates,_=e.additionalLinkTags,x=e.robotsProps,k=e.norobots;return n.createElement(f,{title:t,titleTemplate:r,defaultTitle:i,themeColor:s,dangerouslySetAllPagesToNoIndex:void 0!==o&&o,dangerouslySetAllPagesToNoFollow:void 0!==a&&a,description:l,canonical:c,facebook:u,openGraph:d,additionalMetaTags:h,twitter:p,defaultOpenGraphImageWidth:g,defaultOpenGraphImageHeight:m,defaultOpenGraphVideoWidth:y,defaultOpenGraphVideoHeight:v,mobileAlternate:b,languageAlternates:w,additionalLinkTags:_,robotsProps:x,norobots:k})},g=function(e){var t=e.title,r=e.themeColor,i=e.noindex,s=e.nofollow,o=e.robotsProps,a=e.description,l=e.canonical,c=e.openGraph,u=e.facebook,d=e.twitter,h=e.additionalMetaTags,p=e.titleTemplate,g=e.defaultTitle,m=e.mobileAlternate,y=e.languageAlternates,v=e.additionalLinkTags;return n.createElement(n.Fragment,null,n.createElement(f,{title:t,themeColor:r,noindex:i,nofollow:s,robotsProps:o,description:a,canonical:l,facebook:u,openGraph:c,additionalMetaTags:h,twitter:d,titleTemplate:p,defaultTitle:g,mobileAlternate:m,languageAlternates:y,additionalLinkTags:v}))},m=function(e,t){var r=t;return Array.isArray(r)&&1===r.length&&(r=o({},t[0])),{__html:JSON.stringify(Array.isArray(r)?r.map(function(t){return y(e,t)}):y(e,r),_)}},y=function(e,t){var r=t.id,n=o({},(void 0===r?void 0:r)?{"@id":t.id}:{},t);return delete n.id,o({"@context":"https://schema.org","@type":e},n)},v=Object.freeze({"&":"&","<":"<",">":">",'"':""","'":"'"}),b=RegExp("["+Object.keys(v).join("")+"]","g"),w=function(e){return v[e]},_=function(e,t){switch(typeof t){case"object":if(null===t)return;return t;case"number":case"boolean":case"bigint":return t;case"string":return t.replace(b,w);default:return}},x=["type","keyOverride","scriptKey","scriptId","dataArray","useAppDir"];function k(e){var t=e.type,r=void 0===t?"Thing":t,i=e.keyOverride,l=e.scriptKey,c=e.scriptId,u=void 0===c?void 0:c,d=e.dataArray,h=e.useAppDir,f=a(e,x),p=function(){return n.createElement("script",{type:"application/ld+json",id:u,"data-testid":u,dangerouslySetInnerHTML:m(r,void 0===d?o({},f):d),key:"jsonld-"+l+(i?"-"+i:"")})};return void 0!==h&&h?n.createElement(p,null):n.createElement(s(),null,p())}function j(e){if("string"==typeof e)return{"@type":"Person",name:e};if(e.name){var t;return{"@type":null!=(t=null==e?void 0:e.type)?t:"Person",name:e.name,url:null==e?void 0:e.url}}}var E=["type","keyOverride","baseSalary","hiringOrganization","applicantLocationRequirements","experienceRequirements","jobLocation"];function S(e){var t=e.type,r=e.keyOverride,i=e.baseSalary,s=e.hiringOrganization,l=e.applicantLocationRequirements,c=e.experienceRequirements,u=e.jobLocation,d=a(e,E),h=o({},d,{baseSalary:function(e){if(e)return{"@type":"MonetaryAmount",currency:e.currency,value:o({"@type":"QuantitativeValue",unitText:e.unitText},Array.isArray(e.value)?{minValue:e.value[0],maxValue:e.value[1]}:{value:e.value})}}(i),hiringOrganization:"confidential"===s?"confidential":{"@type":"Organization",name:s.name,sameAs:s.sameAs,logo:s.logo},jobLocation:function(e){if(e)return{"@type":"Place",address:{"@type":"PostalAddress",addressCountry:e.addressCountry,addressLocality:e.addressLocality,addressRegion:e.addressRegion,postalCode:e.postalCode,streetAddress:e.streetAddress}}}(u),applicantLocationRequirements:function(e){if(e)return{"@type":"Country",name:e}}(l),experienceRequirements:function(e){if(e)return{"@type":e["@type"]?e["@type"]:"OccupationalExperienceRequirements",monthsOfExperience:e.minimumMonthsOfExperience}}(null==c?void 0:c.occupational),educationRequirements:function(e){if(e)return{"@type":e["@type"]?e["@type"]:"EducationalOccupationalCredential",credentialCategory:e.credentialCategory}}(null==c?void 0:c.educational),experienceInPlaceOfEducation:null==c?void 0:c.experienceInPlaceOfEducation});return n.createElement(k,o({type:void 0===t?"JobPosting":t,keyOverride:r},h,{scriptKey:"JobPosting"}))}function O(e){if(e)return Array.isArray(e)?1===e.length?C(e[0]):e.map(C):C(e)}function C(e){return"string"==typeof e?e:o({"@type":"PostalAddress"},e)}var T=["type"];function A(e){if(e){var t=e.type,r=a(e,T);return o({},r,{"@type":t||"PerformingGroup"})}}var I=["seller","hasMerchantReturnPolicy"];function P(e){function t(e){var t,r=e.seller,n=e.hasMerchantReturnPolicy,i=a(e,I);return o({},i,{"@type":"Offer"},r&&{seller:{"@type":"Organization",name:r.name}},n&&{hasMerchantReturnPolicy:o({"@type":"MerchantReturnPolicy"},n,(null==n?void 0:n.returnPolicySeasonalOverride)&&{returnPolicySeasonalOverride:(t=null==n?void 0:n.returnPolicySeasonalOverride,o({"@type":"MerchantReturnPolicySeasonalOverride"},t))})})}return Array.isArray(e)?e.map(t):e?t(e):void 0}var R=["type"];function N(e){if(e){var t=e.type,r=a(e,R);return o({},r,{"@type":t||"Person"})}}var L=["type","keyOverride","location","images","offers","aggregateOffer","performers","organizer","eventStatus","eventAttendanceMode"];function $(e){var t=e.type,r=e.keyOverride,i=e.location,s=e.images,l=e.offers,c=e.aggregateOffer,u=e.performers,d=e.organizer,h=e.eventStatus,f=e.eventAttendanceMode,p=a(e,L),g=o({}
1,p,{location:i?"string"==typeof i?i:"url"in i?o({},i,{"@type":"VirtualLocation"}):o({},i,{address:O(i.address),"@type":"Place"}):void 0,image:s,offers:l?P(l):function(e){if(e)return{"@type":"AggregateOffer",priceCurrency:e.priceCurrency,highPrice:e.highPrice,lowPrice:e.lowPrice,offerCount:e.offerCount,offers:P(e.offers)}}(c),performer:Array.isArray(u)?u.map(A):A(u),organizer:Array.isArray(d)?d.map(N):N(d),eventStatus:h?"https://schema.org/"+h:void 0,eventAttendanceMode:f?"https://schema.org/"+f:void 0});return n.createElement(k,o({type:void 0===t?"Event":t,keyOverride:r},g,{scriptKey:"Event"}))}var U=["type","keyOverride","address","contactPoints","contactPoint"];function M(e){var t=e.type,r=e.keyOverride,i=e.address,s=e.contactPoints,l=e.contactPoint,c=a(e,U),u=o({},c,{address:O(i),contactPoint:function(e){if(e&&e.length)return e.map(function(e){return o({"@type":"ContactPoint"},e)})}(l||s)});return n.createElement(k,o({type:void 0===t?"Organization":t,keyOverride:r},u,{scriptKey:"organization"}))}var B=["type","keyOverride","mainEntity"];function z(e){var t=e.type,r=e.keyOverride,i=e.mainEntity,s=a(e,B),l=o({},s,{mainEntity:function(e){if(e&&e.length)return e.map(function(e){return{"@type":"Question",name:e.questionName,acceptedA
1nswer:{"@type":"Answer",text:e.acceptedAnswerText}}})}(i)});return n.createElement(k,o({type:void 0===t?"FAQPage":t,keyOverride:r},l,{scriptKey:"faq-page"}))}var D=["type","keyOverride","itemListElements"];function G(e){var t=e.type,r=e.keyOverride,i=e.itemListElements,s=a(e,D),l=o({},s,{itemListElement:function(e){if(e&&e.length)return e.map(function(e){return{"@type":"ListItem",position:e.position,item:e.item,name:e.name}})}(i)});return n.createElement(k,o({type:void 0===t?"BreadcrumbList":t,keyOverride:r},l,{scriptKey:"breadcrumb"}))}var q=["type","keyOverride","url","title","images","datePublished","dateModified","authorName","publisherName","publisherLogo","description","isAccessibleForFree"];function F(e){var t=e.type,r=e.keyOverride,i=e.url,s=e.title,l=e.images,c=e.datePublished,u=e.dateModified,d=e.authorName,h=e.publisherName,f=e.publisherLogo,p=e.description,g=e.isAccessibleForFree,m=a(e,q),y=o({datePublished:c,description:p,mainEntityOfPage:{"@type":"WebPage","@id":i},headline:s,image:l,dateModified:u||c,author:Array.isArray(d)?d.map(function(e){return j(e)}).filter(function(e){return!!e}):d?j(d):void 0,publisher:function(e,t){if(e)return{"@type":"Organization",name:e,logo:function(e){if(e)return{"@type":"ImageObject",url:e}}(t)}}(void 0===h?void 0:h,void 0===f?void 0:f),isAccessibleForFree:g},m);return n.createElement(k,o({type:void 0===t?"Article":t,keyOverride:r},y,{scriptKey:"article"}))}},83454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(77663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(45168)}])},83525:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(14001).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76361:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return n.actionAsyncStorage}});let n=r(83525);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},14001:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return s}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}}let i=globalThis.AsyncLocalStorage;function s(){return i?new i:new n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return f},usePathname:function(){return d},useRouter:function(){return h},useSearchParams:function(){return u},useSelectedLayoutSegment:function(){return g},useSelectedLayoutSegments:function(){return p},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let n=r(67294),i=r(60257),s=r(22608),o=r(11288),a=r(66406),l=r(72717),c=r(65988);function u(){let e=(0,n.useContext)(s.SearchParamsContext);return(0,n.useMemo)(()=>e?new l.ReadonlyURLSearchParams(e):null,[e])}function d(){return(0,n.useContext)(s.PathnameContext)}function h(){let e=(0,n.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mou
1nted");return e}function f(){return(0,n.useContext)(s.PathParamsContext)}function p(e){void 0===e&&(e="children");let t=(0,n.useContext)(i.LayoutRouterContext);return t?function e(t,r,n,i){let s;if(void 0===n&&(n=!0),void 0===i&&(i=[]),n)s=t[1][r];else{var l;let e=t[1];s=null!=(l=e.children)?l:Object.values(e)[0]}if(!s)return i;let c=s[0],u=(0,o.getSegmentValue)(c);return!u||u.startsWith(a.PAGE_SEGMENT_KEY)?i:(i.push(u),e(s,r,!1,i))}(t.tree,e):null}function g(e){void 0===e&&(e="children");let t=p(e);if(!t||0===t.length)return null;let r="children"===e?t[0]:t[t.length-1];return r===a.DEFAULT_SEGMENT_KEY?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},72717:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return o},RedirectType:function(){return n.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect}});let n=r(7511),i=r(73394);class s extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class o extends URLSearchParams{append(){throw new s}delete(){throw new s}set(){throw new s}sort(){throw new s}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},73394:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isNotFoundError:function(){return i},notFound:function(){return n}});let r="NEXT_NOT_FOUND";function n(){let e=Error(r);throw e.digest=r,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44234:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),(n=r||(r={}))[n.SeeOther=303]="SeeOther",n[n.TemporaryRedirect=307]="TemporaryRedirect",n[n.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7511:function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return g},getRedirectTypeFromError:function(){return p},getURLFromRedirectError:function(){return f},isRedirectError:function(){return h},permanentRedirect:function(){return d},redirect:function(){return u}});let s=r(82595),o=r(76361),a=r(44234),l="NEXT_REDIRECT";function c(e,t,r){void 0===r&&(r=a.RedirectStatusCode.TemporaryRedirect);let n=Error(l);n.digest=l+";"+t+";"+e+";"+r+";";let i=s.requestAsyncStorage.getStore();return i&&(n.mutableCookies=i.mutableCookies),n}function u(e,t){void 0===t&&(t="replace");let r=o.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function d(e,t){void 0===t&&(t="replace");let r=o.actionAsyncStorage.getStore();throw c(e,t,(null==r?void 0:r.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function h(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,n,i]=e.digest.split(";",4),s=Number(i);return t===l&&("replace"===r||"push"===r)&&"string"==typeof n&&!isNaN(s)&&s in a.RedirectStatusCode}function f(e){return h(e)?e.digest.split(";",3)[2]:null}function p(e){if(!h(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function g(e){if(!h(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(i=n||(n={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25329:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return n}});let n=(0,r(14001).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82595:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getExpectedRequestStore:function(){return i},requestAsyncStorage:function(){return n.requestAsyncStorage}});let n=r(25329);function i(e){let t=n.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11288:function(e,t){"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38199:function(e,t){"use strict";var r,n,i,s;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_FAST_REFRESH:function(){return d},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return u},ACTION_REFRESH:function(){return o},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return h},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return n},PrefetchKind:function(){return r},isThenable:function(){return f}});let o="refresh",a="navigate",l="restore",c="server-patch",u="prefetch",d="fast-refresh",h="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=r||(r={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(s=n||(n={})).fresh="fresh",s.reusable="reusable",s.expired="expired",s.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},87195:function(e,t,r){"use strict";function n(e,t,r,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),r(98337),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},74080:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return b}});let n=r(38754),i=r(61757),s=r(85893),o=i._(r(67294)),a=n._(r(73935)),l=n._(r(23867)),c=r(35283),u=r(96594),d=r(23945);r(83179);let h=r(81928),f=n._(r(13872)),p={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,r,n,i,s,o){let a=null==e?void 0:e.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==r?void 0:r.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,i=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==n?void 0:n.current)&&n.current(e)}}))}function m(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}let y=(0,o.forwardRef)((e,t)=>{let{src:r,srcSet:n,sizes:i,height:a,width:l,decoding:c,className:u,style:d,fetchPriority:h,placeholder:f,loading:p,unoptimized:y,fill:v,onLoadRef:b,onLoadingCompleteRef:w,setBlurComplete:_,setShowAltText:x,sizesInput:k,onLoad:j,onError:E,...S}=e;return(0,s.jsx)("img",{...S,...m(h),loading:p,width:l,height:a,decoding:c,"data-nimg":v?"fill":"1",className:u,style:d,sizes:i,srcSet:n,src:r,ref:(0,o.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&g(e,f,b,w,_,y,k))},[r,f,b,w,_,E,y,k,t]),onLoad:e=>{g(e.currentTarget,f,b,w,_,y,k)},onError:e=>{x(!0),"empty"!==f&&_(!0),E&&E(e)}})});function v(e){let{isAppRouter:t,imgAttributes:r}=e,n={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...m
1(r.fetchPriority)};return t&&a.default.preload?(a.default.preload(r.src,n),null):(0,s.jsx)(l.default,{children:(0,s.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...n},"__nimg-"+r.src+r.srcSet+r.sizes)})}let b=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(h.RouterContext),n=(0,o.useContext)(d.ImageConfigContext),i=(0,o.useMemo)(()=>{var e;let t=p||n||u.imageConfigDefault,r=[...t.deviceSizes,...t.imageSizes].sort((e,t)=>e-t),i=t.deviceSizes.sort((e,t)=>e-t),s=null==(e=t.qualities)?void 0:e.sort((e,t)=>e-t);return{...t,allSizes:r,deviceSizes:i,qualities:s}},[n]),{onLoad:a,onLoadingComplete:l}=e,g=(0,o.useRef)(a);(0,o.useEffect)(()=>{g.current=a},[a]);let m=(0,o.useRef)(l);(0,o.useEffect)(()=>{m.current=l},[l]);let[b,w]=(0,o.useState)(!1),[_,x]=(0,o.useState)(!1),{props:k,meta:j}=(0,c.getImgProps)(e,{defaultLoader:f.default,imgConf:i,blurComplete:b,showAltText:_});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y,{...k,unoptimized:j.unoptimized,placeholder:j.placeholder,fill:j.fill,onLoadRef:g,onLoadingCompleteRef:m,setBlurComplete:w,setShowAltText:x,sizesInput:e.sizes,ref:t}),j.priority?(0,s.jsx)(v,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98342:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let n=r(38754),i=r(85893),s=n._(r(67294)),o=r(36075),a=r(53955),l=r(48041),c=r(99903),u=r(65490),d=r(81928),h=r(60257),f=r(84229),p=r(87195),g=r(89470),m=r(38199),y=new Set;function v(e,t,r,n,i,s){if(s||(0,a.isLocalURL)(t)){if(!n.bypassPrefetchedCheck){let i=t+"%"+r+"%"+(void 0!==n.locale?n.locale:"locale"in e?e.locale:void 0);if(y.has(i))return;y.add(i)}(async()=>s?e.prefetch(t,i):e.prefetch(t,r,n))().catch(e=>{})}}function b(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let w=s.default.forwardRef(function(e,t){let r,n;let{href:l,as:y,children:w,prefetch:_=null,passHref:x,replace:k,shallow:j,scroll:E,locale:S,onClick:O,onMouseEnter:C,onTouchStart:T,legacyBehavior:A=!1,...I}=e;r=w,A&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let P=s.default.useContext(d.RouterContext),R=s.default.useContext(h.AppRouterContext),N=null!=P?P:R,L=!P,$=!1!==_,U=null===_?m.PrefetchKind.AUTO:m.PrefetchKind.FULL,{href:M,as:B}=s.default.useMemo(()=>{if(!P){let e=b(l);return{href:e,as:y?b(y):e}}let[e,t]=(0,o.resolveHref)(P,l,!0);return{href:e,as:y?(0,o.resolveHref)(P,y):t||e}},[P,l,y]),z=s.default.useRef(M),D=s.default.useRef(B);A&&(n=s.default.Children.only(r));let G=A?n&&"object"==typeof n&&n.ref:t,[q,F,J]=(0,f.useIntersection)({rootMargin:"200px"}),V=s.default.useCallback(e=>{(D.current!==B||z.current!==M)&&(J(),D.current=B,z.current=M),q(e),G&&("function"==typeof G?G(e):"object"==typeof G&&(G.current=e))},[B,G,M,J,q]);s.default.useEffect(()=>{N&&F&&$&&v(N,M,B,{locale:S},{kind:U},L)},[B,M,F,S,$,null==P?void 0:P.locale,N,L,U]);let W={ref:V,onClick(e){A||"function"!=typeof O||O(e),A&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),N&&!e.defaultPrevented&&function(e,t,r,n,i,o,l,c,u){let{nodeName:d}=e.currentTarget;if("A"===d.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!u&&!(0,a.isLocalURL)(r)))return;e.preventDefault();let h=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](r,n,{shallow:o,locale:c,scroll:e}):t[i?"replace":"push"](n||r,{scroll:e})};u?s.default.startTransition(h):h()}(e,N,M,B,k,j,E,S,L)},onMouseEnter(e){A||"function"!=typeof C||C(e),A&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),N&&($||!L)&&v(N,M,B,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)},onTouchStart:function(e){A||"function"!=typeof T||T(e),A&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),N&&($||!L)&&v(N,M,B,{locale:S,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)}};if((0,c.isAbsoluteUrl)(B))W.href=B;else if(!A||x||"a"===n.type&&!("href"in n.props)){let e=void 0!==S?S:null==P?void 0:P.locale,t=(null==P?void 0:P.isLocaleDomain)&&(0,p.getDomainLocale)(B,e,null==P?void 0:P.locales,null==P?void 0:P.domainLocales);W.href=t||(0,g.addBasePath)((0,u.addLocale)(B,e,null==P?void 0:P.defaultLocale))}return A?s.default.cloneElement(n,W):(0,i.jsx)("a",{...I,...W,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},84229:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(67294),i=r(84474),s="function"==typeof IntersectionObserver,o=new Map,a=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,c=l||!s,[u,d]=(0,n.useState)(!1),h=(0,n.useRef)(null),f=(0,n.useCallback)(e=>{h.current=e},[]);return(0,n.useEffect)(()=>{if(s){if(c||u)return;let e=h.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:i,elements:s}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=a.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=o.get(n)))return t;let i=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:i},a.push(r),o.set(r,t),t}(r);return s.set(e,t),i.observe(e),function(){if(s.delete(e),i.unobserve(e),0===s.size){i.disconnect(),o.delete(n);let e=a.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&d(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!u){let e=(0,i.requestIdleCallback)(()=>d(!0));return()=>(0,i.cancelIdleCallback)(e)}},[c,r,t,u,h.current]),[f,u,(0,n.useCallback)(()=>{d(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35283:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return a}}),r(83179);let n=r(96630),i=r(96594);function s(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function a(e,t){var r,a;let l,c,u,{src:d,sizes:h,unoptimized:f=!1,priority:p=!1,loading:g,className:m,quality:y,width:v,height:b,fill:w=!1,style:_,overrideSrc:x,onLoad:k,onLoadingComplete:j,placeholder:E="empty",blurDataURL:S,fetchPriority:O,decoding:C="async",layout:T,objectFit:A,objectPosition:I,lazyBoundary:P,lazyRoot:R,...N}=e,{imgConf:L,showAltText:$,blurComplete:U,defaultLoader:M}=t,B=L||i.imageConfigDefault;if("allSizes"in B)l=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),n=null==(r=B.qualities)?void 0:r.sort((e,t)=>e-t);l={...B,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===M)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let z=N.loader||M;delete N.loader,delete N.srcSet;let D="__next_img_default"in z;if(D){if("custom"===l.loader)throw Error('Image with src "'+d+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=z;z=t=>{let{config:r,...n}=t;return e(n)}}if(T){"fill"===T&&(w=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[T];e&&(_={..._,...e});let t={responsive:"100vw",fill:"100vw"}[T];t&&!h&&(h=t)}let G="",q=o(v),F=o(b);if("object"==typeof(a=d)&&(s(a)||void 0!==a.src)){let e=s(d)?d.default:d;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(c=e.blurWidth,u=e.blurHeight,S=S||e.blurDataURL,G=e.src,!w){if(q||F){if(q&&!F){let t=q/e.width;F=Math.round(e.height*t)}else if(!q&&F){let t=F/e.height;q=Math.round(e.width*t)}}else q=e.width,F=e.height}}let J=!p&&("lazy"===g||void 0===g);(!(d="string"==typeof d?d:G)||d.startsWith("data:")||d.startsWith("blob:"))&&(f=!0,J=!1),l.unoptimized&&(f=!0),D&&d.endsWith(".svg")&&!l.dangerouslyAllowSVG&&(f=!0),p&&(O="high");let V=o(y),W=Object.assign(w?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:A,objectPosition:I}:{},$?{}:{color:"transparent"},_),H=U||"empty"===E?null:"blur"===E?'url("data:image/svg+xml;charset=utf-8,'+(0,n.getImageBlurSvg)({widthInt:q,heightInt:F,blurWidth:c,blurHeight:u,blurDataURL:S||"",objectFit:W.objectFit})+'")':'url("'+E+'")',K=H?{backgroundSize:W.objectFit||"cover",backgroundPosition:W.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:H}:{}
1,Y=function(e){let{config:t,src:r,unoptimized:n,width:i,quality:s,sizes:o,loader:a}=e;if(n)return{src:r,srcSet:void 0,sizes:void 0};let{widths:l,kind:c}=function(e,t,r){let{deviceSizes:n,allSizes:i}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let n;n=e.exec(r);n)t.push(parseInt(n[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=n[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:n,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,o),u=l.length-1;return{sizes:o||"w"!==c?o:"100vw",srcSet:l.map((e,n)=>a({config:t,src:r,quality:s,width:e})+" "+("w"===c?e:n+1)+c).join(", "),src:a({config:t,src:r,quality:s,width:l[u]})}}({config:l,src:d,unoptimized:f,width:q,quality:V,sizes:h,loader:z});return{props:{...N,loading:J?"lazy":g,fetchPriority:O,width:q,height:F,decoding:C,className:m,style:{...W,...K},sizes:Y.sizes,srcSet:Y.srcSet,src:x||Y.src},meta:{unoptimized:f,priority:p,placeholder:E,fill:w}}}},96630:function(e,t){"use strict";function r(e){let{widthInt:t,heightInt:r,blurWidth:n,blurHeight:i,blurDataURL:s,objectFit:o}=e,a=n?40*n:t,l=i?40*i:r,c=a&&l?"viewBox='0 0 "+a+" "+l+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+c+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(c?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+s+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},76210:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return l},getImageProps:function(){return a}});let n=r(38754),i=r(35283),s=r(74080),o=n._(r(13872));function a(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let l=s.Image},13872:function(e,t){"use strict";function r(e){var t;let{config:r,src:n,width:i,quality:s}=e,o=s||(null==(t=r.qualities)?void 0:t.reduce((e,t)=>Math.abs(t-75)<Math.abs(e-75)?t:e))||75;return r.path+"?url="+encodeURIComponent(n)+"&w="+i+"&q="+o}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n}}),r.__next_img_default=!0;let n=r},65988:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return s}});let n=r(61757)._(r(67294)),i=n.default.createContext(null);function s(e){let t=(0,n.useContext)(i);t&&t(e)}},9610:function(e,t,r){"use strict";let n,i;r.d(t,{z:function(){return f},d:function(){return h}});var s=r(85893),o=r(67294),a=r(88426),l=r(90512);let c=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,u=l.W;var d=r(55156);let h=(n="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",i={variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-foreground hover:text-background",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-warm-300 bg-background hover:bg-muted hover:text-accent-foreground",secondary:"bg-foreground text-background hover:bg-foreground
1/90",tertiary:"bg-muted text-foreground hover:bg-warm-200",ghost:"hover:bg-muted hover:text-accent-foreground",link:"text-foreground underline decoration-2 underline-offset-4 hover:text-warm-600"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3 text-xs",lg:"h-10 px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}},e=>{var t;if((null==i?void 0:i.variants)==null)return u(n,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:r,defaultVariants:s}=i,o=Object.keys(r).map(t=>{let n=null==e?void 0:e[t],i=null==s?void 0:s[t];if(null===n)return null;let o=c(n)||c(i);return r[t][o]}),a=e&&Object.entries(e).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return u(n,o,null==i?void 0:null===(t=i.compoundVariants)||void 0===t?void 0:t.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...s,...a}[t]):({...s,...a})[t]===r})?[...e,r,n]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)}),f=o.forwardRef((e,t)=>{let{className:r,variant:n,size:i,asChild:o=!1,...l}=e,c=o?a.g7:"button";return(0,s.jsx)(c,{className:(0,d.cn)(h({variant:n,size:i,className:r})),ref:t,...l})});f.displayName="Button"},79553:function(e,t,r){"use strict";r.d(t,{n:function(){return a},y:function(){return l}});var n=r(85893),i=r(67294),s=r(34209);let o=(0,i.createContext)(null);function a(e){let{children:t}=e,[r,a]=(0,i.useState)(null),[l,c]=(0,i.useState)(null);(0,i.useEffect)(()=>{(async()=>{let{data:{session:e}}=await s.O.auth.getSession();if(e){if(c(e.user),"service_role"===e.user.role){console.log("[CompanyContext] Admin user detected, fetching selected company");try{let e=await fetch("/api/get-selected-company");if(e.ok){let{company:t}=await e.json();t&&a(t)}}catch(e){console.error("[CompanyContext] Failed to fetch selected company:",e)}}else{console.log("[CompanyContext] Regular user, fetching associated company");try{let{data:t,error:r}=await s.O.from("company_users").select("company_id").eq("user_id",e.user.id).single();if((null==t?void 0:t.company_id)&&!r){let{data:e,error:r}=await s.O.from("companies").select("*").eq("id",t.company_id).single();e&&!r&&a(e)}}catch(e){console.error("[CompanyContext] Error fetching company:",e)}}}})();let{data:{subscription:e}}=s.O.auth.onAuthStateChange((e,t)=>{"SIGNED_OUT"===e&&(a(null),c(null),fetch("/api/switch-company",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:null})}))});return()=>{null==e||e.unsubscribe()}},[]);let u=(0,i.useCallback)(async e=>{let{data:{session:t}}=await s.O.auth.getSession();if(console.log("[CompanyContext] Attempting to switch company:",(null==e?void 0:e.name)||"null"),console.log("[CompanyContext] Session:",{exists:!!t,user:(null==t?void 0:t.user)?{id:t.user.id,email:t.user.email,role:t.user.role}:null}),!(null==t?void 0:t.user)){console.error("[CompanyContext] No session user found");return}if("service_role"!==t.user.role){console.error("[CompanyContext] User role is not service_role:",t.user.role);return}try{console.log("[CompanyContext] Making API call to switch company");let t=await fetch("/api/switch-company",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:e?e.id:null})});if(t.ok)console.log("[CompanyContext] API call successful, updating React state"),a(e);else{let e=await t.json();console.error("[CompanyContext] Failed to switch company:",e.message)}}catch(e){console.error("[CompanyContext] Error switching company:",e)}},[]),d=(0,i.useMemo)(()=>({currentCompany:r,setCurrentCompany:u,user:l}),[r,u,l]);return(0,n.jsx)(o.Provider,{value:d,children:t})}let l=()=>(0,i.useContext)(o)},49832:function(e,t,r){"use strict";r.d(t,{B:function(){return c},i:function(){return u}});var n=r(85893),i=r(67294),s=r(6739);let o=(0,i.createContext)(void 0),a="legalhunt_content_views",l=e=>["googlebot","bingbot","slurp","duckduckbot","baiduspider","facebookexternalhit","twitterbot","linkedinbot","whatsapp","crawler","spider"].some(t=>e.toLowerCase().includes(t)),c=e=>{let{children:t}=e,[r,c]=(0,i.useState)({viewedJobs:[],viewedCompanies:[],viewedEvents:[],lastUpdated:new Date().toISOString()}),[u,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{navigator.userAgent&&d(l(navigator.userAgent));{let e=localStorage.getItem(a);if(e)try{let t=JSON.parse(e);if(t&&"object"==typeof t&&Array.isArray(t.viewedJobs)&&Array.isArray(t.viewedCompanies)&&Array.isArray(t.viewedEvents)&&"string"==typeof t.lastUpdated){let e=e=>e.every(e=>"string"==typeof e&&e.trim().length>0);e(t.viewedJobs)&&e(t.viewedCompanies)&&e(t.viewedEvents)?c(t):console.warn("Invalid data types in stored content tracker, using defaults")}else console.warn("Invalid content tracker structure in localStorage, using defaults")}catch(e){console.warn("Failed to parse content tracker from localStorage:",e)}}},[]),(0,i.useEffect)(()=>{try{let e=JSON.stringify(r);localStorage.setItem(a,e)}catch(e){console.warn("Failed to save content tracker to localStorage:",e)}},[r]);let h=r.viewedJobs.length+r.viewedCompanies.length+r.viewedEvents.length,f=Math.max(0,3-h),p=!u&&h>=3,g=(0,i.useCallback)((e,t)=>{switch(e){case"job":return r.viewedJobs.includes(t);case"company":return r.viewedCompanies.includes(t);case"event":return r.viewedEvents.includes(t);default:return!1}},[r]),m=(0,i.useCallback)((e,t,r)=>{if(!u){if(!t||"string"!=typeof t||0===t.trim().length){console.warn("Invalid content ID provided to recordContentView:",t);return}c(n=>{if((()=>{switch(e){case"job":return n.viewedJobs.includes(t);case"company":return n.viewedCompanies.includes(t);case"event":return n.viewedEvents.includes(t);default:return!1}})())return n;let i={...n};switch(e){case"job":i.viewedJobs=[...n.viewedJobs,t];break;case"company":i.viewedCompanies=[...n.viewedCompanies,t];break;case"event":i.viewedEvents=[...n.viewedEvents,t]}i.lastUpdated=new Date().toISOString();let o=i.viewedJobs.length+i.viewedCompanies.length+i.viewedEvents.length;return(0,s.j)("content_view_recorded",{content_type:e,content_id:t,total_views:o,views_remaining:Math.max(0,3-o),will_be_restricted:o>=3,page_url:r||window.location.pathname}),3===o&&(0,s.j)("content_restriction_triggered",{final_content_type:e,final_content_id:t,page_url:r||window.location.pathname}),i})}},[u]),y=(0,i.useCallback)(()=>{c({viewedJobs:[],viewedCompanies:[],viewedEvents:[],lastUpdated:new Date().toISOString()}),(0,s.j)("content_restriction_reset",{previous_total_views:h})},[h]),v=(0,i.useCallback)(()=>u?{isRestricted:!1,showProgress:!1,viewsRemaining:3,totalViews:0}:{isRestricted:p,showProgress:h>0&&h<3,viewsRemaining:f,totalViews:h},[u,p,h,f]),b=(0,i.useMemo)(()=>({totalViews:h,viewsRemaining:f,isRestricted:p,isBot:u,hasViewedContent:g,recordContentView:m,resetTracker:y,getRestrictionStatus:v,tracker:r}),[h,f,p,u,g,m,y,v,r]);return(0,n.jsx)(o.Provider,{value:b,children:t})},u=()=>{let e=(0,i.useContext)(o);if(void 0===e)throw Error("useContentRestriction must be used within a ContentRestrictionProvider");return e}},34209:function(e,t,r){"use strict";r.d(t,{O:function(){return n}});let n=(0,r(57542).createPagesBrowserClient)({supabaseUrl:"https://jlgstvujosledqiibxxb.supabase.co",supabaseKey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpsZ3N0dnVqb3NsZWRxaWlieHhiIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU0NzExNDcsImV4cCI6MjA0MTA0NzE0N30._iS4EL08rbv4NIVK5ekCZ3R-8pha-oJ5namN5_jsKAQ"})},55156:function(e,t,r){"use strict";r.d(t,{cn:function(){return ed}});var n=r(90512);let i=e=>{let t=l(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),s(r,t)||a(e)},getConflictingClassGroupIds:(e,t)=>{let i=r[e]||[];return t&&n[e]?[...i,...n[e]]:i}}},s=(e,t)=>{if(0===e.length)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),i=n?s(e.slice(1),n):void 0;if(i)return i;if(0===t.validators.length)return;let o=e.join("-");return t.validators.find(({validator:e})=>e(o))?.classGroupId},o=/^\[(.+)\]$/,a=e=>
1{if(o.test(e)){let t=o.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},l=e=>{let{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(let e in r)c(r[e],n,e,t);return n},c=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:u(t,e)).classGroupId=r;return}if("function"==typeof e){if(d(e)){c(e(n),t,r,n);return}t.validators.push({validator:e,classGroupId:r});return}Object.entries(e).forEach(([e,i])=>{c(i,u(t,e),r,n)})})},u=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},d=e=>e.isThemeGetter,h=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map,i=(i,s)=>{r.set(i,s),++t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}},f=e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t;let r=[],n=0,i=0,s=0;for(let o=0;o<e.length;o++){let a=e[o];if(0===n&&0===i){if(":"===a){r.push(e.slice(s,o)),s=o+1;continue}if("/"===a){t=o;continue}}"["===a?n++:"]"===a?n--:"("===a?i++:")"===a&&i--}let o=0===r.length?e:e.substring(s),a=p(o);return{modifiers:r,hasImportantModifier:a!==o,baseClassName:a,maybePostfixModifierPosition:t&&t>s?t-s:void 0}};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n},p=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,g=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;let r=[],n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},m=e=>({cache:h(e.cacheSize),parseClassName:f(e),sortModifiers:g(e),...i(e)}),y=/\s+/,v=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],a=e.trim().split(y),l="";for(let e=a.length-1;e>=0;e-=1){let t=a[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=r(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!f,g=n(p?h.substring(0,f):h);if(!g){if(!p||!(g=n(h))){l=t+(l.length>0?" "+l:l);continue}p=!1}let m=s(u).join(":"),y=d?m+"!":m,v=y+g;if(o.includes(v))continue;o.push(v);let b=i(g,p);for(let e=0;e<b.length;++e){let t=b[e];o.push(y+t)}l=t+(l.length>0?" "+l:l)}return l};function b(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=w(e))&&(n&&(n+=" "),n+=t);return n}let w=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=w(e[n]))&&(r&&(r+=" "),r+=t);return r},_=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},x=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k=/^\((?:(\w[\w-]*):)?(.+)\)$/i,j=/^\d+\/\d+$/,E=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,O=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,C=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,A=e=>j.test(e),I=e=>!!e&&!Number.isNaN(Number(e)),P=e=>!!e&&Number.isInteger(Number(e)),R=e=>e.endsWith("%")&&I(e.slice(0,-1)),N=e=>E.test(e),L=()=>!0,$=e=>S.test(e)&&!O.test(e),U=()=>!1,M=e=>C.test(e),B=e=>T.test(e),z=e=>!G(e)&&!H(e),D=e=>et(e,es,U),G=e=>x.test(e),q=e=>et(e,eo,$),F=e=>et(e,ea,I),J=e=>et(e,en,U),V=e=>et(e,ei,B),W=e=>et(e,ec,M),H=e=>k.test(e),K=e=>er(e,eo),Y=e=>er(e,el),X=e=>er(e,en),Z=e=>er(e,es),Q=e=>er(e,ei),ee=e=>er(e,ec,!0),et=(e,t,r)=>{let n=x.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},er=(e,t,r=!1)=>{let n=k.exec(e);return!!n&&(n[1]?t(n[1]):r)},en=e=>"position"===e||"percentage"===e,ei=e=>"image"===e||"url"===e,es=e=>"length"===e||"size"===e||"bg-size"===e,eo=e=>"length"===e,ea=e=>"number"===e,el=e=>"family-name"===e,ec=e=>"shadow"===e,eu=function(e,...t){let r,n,i;let s=function(a){return n=(r=m(t.reduce((e,t)=>
vendor: 4,243 bytes, line 1
1t(e),e()))).cache.get,i=r.cache.set,s=o,o(a)};function o(e){let t=n(e);if(t)return t;let s=v(e,r);return i(e,s),s}return function(){return s(b.apply(null,arguments))}}(()=>{let e=_("color"),t=_("font"),r=_("text"),n=_("font-weight"),i=_("tracking"),s=_("leading"),o=_("breakpoint"),a=_("container"),l=_("spacing"),c=_("radius"),u=_("shadow"),d=_("inset-shadow"),h=_("text-shadow"),f=_("drop-shadow"),p=_("blur"),g=_("perspective"),m=_("aspect"),y=_("ease"),v=_("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...w(),H,G],k=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],E=()=>[H,G,l],S=()=>[A,"full","auto",...E()],O=()=>[P,"none","subgrid",H,G],C=()=>["auto",{span:["full",P,H,G]},P,H,G],T=()=>[P,"auto",H,G],$=()=>["auto","min","max","fr",H,G],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...E()],et=()=>[A,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],er=()=>[e,H,G],en=()=>[...w(),X,J,{position:[H,G]}],ei=()=>["no-repeat",{repeat:["","x","y","space","round"]}],es=()=>["auto","cover","contain",Z,D,{size:[H,G]}],eo=()=>[R,K,q],ea=()=>["","none","full",c,H,G],el=()=>["",I,K,q],ec=()=>["solid","dashed","dotted","double"],eu=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ed=()=>[I,R,X,J],eh=()=>["","none",p,H,G],ef=()=>["none",I,H,G],ep=()=>["none",I,H,G],eg=()=>[I,H,G],em=()=>[A,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[N],breakpoint:[N],color:[L],container:[N],"drop-shadow":[N],ease:["in","out","in-out"],font:[z],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[N],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[N],shadow:[N],spacing:["px",I],text:[N],"text-shadow":[N],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",A,G,H,m]}],container:["container"],columns:[{columns:[I,G,H,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{start:S()}],end:[{end:S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[P,"auto",H,G]}],basis:[{basis:[A,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,A,"auto","initial","none",G]}],grow:[{grow:["",I,H,G]}],shrink:[{shrink:["",I,H,G]}],order:[{order:[P,"first","last","none",H,G]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":T()}
vendor: 10,834 bytes, line 1
1],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:et()}],w:[{w:[a,"screen",...et()]}],"min-w":[{"min-w":[a,"screen","none",...et()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...et()]}],h:[{h:["screen","lh",...et()]}],"min-h":[{"min-h":["screen","lh","none",...et()]}],"max-h":[{"max-h":["screen","lh",...et()]}],"font-size":[{text:["base",r,K,q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,H,F]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",R,G]}],"font-family":[{font:[Y,G,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,H,G]}],"line-clamp":[{"line-clamp":[I,"none",H,F]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",H,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",H,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:er()}],"text-color":[{text:er()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ec(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",H,q]}],"text-decoration-color":[{decoration:er()}],"underline-offset":[{"underline-offset":[I,"auto",H,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:en()}],"bg-repeat":[{bg:ei()}],"bg-size":[{bg:es()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},P,H,G],radial:["",H,G],conic:[P,H,G]},Q,V]}],"bg-color":[{bg:er()}],"gradient-from-pos":[{from:eo()}],"gradient-via-pos":[{via:eo()}],"gradient-to-pos":[{to:eo()}],"gradient-from":[{from:er()}],"gradient-via":[{via:er()}],"gradient-to":[{to:er()}],rounded:[{rounded:ea()}],"rounded-s":[{"rounded-s":ea()}],"rounded-e":[{"rounded-e":ea()}],"rounded-t":[{"rounded-t":ea()}],"rounded-r":[{"rounded-r":ea()}],"rounded-b":[{"rounded-b":ea()}],"rounded-l":[{"rounded-l":ea()}],"rounded-ss":[{"rounded-ss":ea()}],"rounded-se":[{"rounded-se":ea()}],"rounded-ee":[{"rounded-ee":ea()}],"rounded-es":[{"rounded-es":ea()}],"rounded-tl":[{"rounded-tl":ea()}],"rounded-tr":[{"rounded-tr":ea()}],"rounded-br":[{"rounded-br":ea()}],"rounded-bl":[{"rounded-bl":ea()}],"border-w":[{border:el()}],"border-w-x":[{"border-x":el()}],"border-w-y":[{"border-y":el()}],"border-w-s":[{"border-s":el()}],"border-w-e":[{"border-e":el()}],"border-w-t":[{"border-t":el()}],"border-w-r":[{"border-r":el()}],"border-w-b":[{"border-b":el()}],"border-w-l":[{"border-l":el()}],"divide-x":[{"divide-x":el()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":el()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ec(),"hidden","none"]}],"divide-style":[{divide:[...ec(),"hidden","none"]}],"border-color":[{border:er()}],"border-color-x":[{"border-x":er()}],"border-color-y":[{"border-y":er()}],"border-color-s":[{"border-s":er()}],"border-color-e":[{"border-e":er()}],"border-color-t":[{"border-t":er()}],"border-color-r":[{"border-r":er()}],"border-color-b":[{"border-b":er()}],"border-color-l":[{"border-l":er()}],"divide-color":[{divide:er()}],"outline-style":[{outline:[...ec(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,H,G]}],"outline-w":[{outline:["",I,K,q]}],"outline-color":[{outline:er()}],shadow:[{shadow:["","none",u,ee,W]}],"shadow-color":[{shadow:er()}],"inset-shadow":[{"inset-shadow":["none",d,ee,W]}],"inset-shadow-color":[{"inset-shadow":er()}],"ring-w":[{ring:el()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:er()}],"ring-offset-w":[{"ring-offset":[I,q]}],"ring-offset-color":[{"ring-offset":er()}],"inset-ring-w":[{"inset-ring":el()}],"inset-ring-color":[{"inset-ring":er()}],"text-shadow":[{"text-shadow":["none",h,ee,W]}],"text-shadow-color":[{"text-shadow":er()}],opacity:[{opacity:[I,H,G]}],"mix-blend":[{"mix-blend":[...eu(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":eu()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":ed()}],"mask-image-linear-to-pos":[{"mask-linear-to":ed()}],"mask-image-linear-from-color":[{"mask-linear-from":er()}],"mask-image-linear-to-color":[{"mask-linear-to":er()}],"mask-image-t-from-pos":[{"mask-t-from":ed()}],"mask-image-t-to-pos":[{"mask-t-to":ed()}],"mask-image-t-from-color":[{"mask-t-from":er()}],"mask-image-t-to-color":[{"mask-t-to":er()}],"mask-image-r-from-pos":[{"mask-r-from":ed()}],"mask-image-r-to-pos":[{"mask-r-to":ed()}],"mask-image-r-from-color":[{"mask-r-from":er()}],"mask-image-r-to-color":[{"mask-r-to":er()}],"mask-image-b-from-pos":[{"mask-b-from":ed()}],"mask-image-b-to-pos":[{"mask-b-to":ed()}],"mask-image-b-from-color":[{"mask-b-from":er()}],"mask-image-b-to-color":[{"mask-b-to":er()}],"mask-image-l-from-pos":[{"mask-l-from":ed()}],"mask-image-l-to-pos":[{"mask-l-to":ed()}],"mask-image-l-from-color":[{"mask-l-from":er()}],"mask-image-l-to-color":[{"mask-l-to":er()}],"mask-image-x-from-pos":[{"mask-x-from":ed()}],"mask-image-x-to-pos":[{"mask-x-to":ed()}],"mask-image-x-from-color":[{"mask-x-from":er()}],"mask-image-x-to-color":[{"mask-x-to":er()}],"mask-image-y-from-pos":[{"mask-y-from":ed()}],"mask-image-y-to-pos":[{"mask-y-to":ed()}],"mask-image-y-from-color":[{"mask-y-from":er()}],"mask-image-y-to-color":[{"mask-y-to":er()}],"mask-image-radial":[{"mask-radial":[H,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":ed()}],"mask-image-radial-to-pos":[{"mask-radial-to":ed()}],"mask-image-radial-from-color":[{"mask-radial-from":er()}],"mask-image-radial-to-color":[{"mask-radial-to":er()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":ed()}],"mask-image-conic-to-pos":[{"mask-conic-to":ed()}],"mask-image-conic-from-color":[{"mask-conic-from":er()}],"mask-image-conic-to-color":[{"mask-conic-to":er()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:en()}],"mask-repeat":[{mask:ei()}],"mask-size":[{mask:es()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",H,G]}],filter:[{filter:["","none",H,G]}],blur:[{blur:eh()}],brightness:[{brightness:[I,H,G]}],contrast:[{contrast:[I,H,G]}],"drop-shadow":[{"drop-shadow":["","none",f,ee,W]}],"drop-shadow-color":[{"drop-shadow":er()}],grayscale:[{grayscale:["",I,H,G]}],"hue-rotate":[{"hue-rotate":[I,H,G]}],invert:[{invert:["",I,H,G]}],saturate:[{saturate:[I,H,G]}],sepia:[{sepia:["",I,H,G]}],"backdrop-filter":[{"backdrop-filter":["","none",H,G]}],"backdrop-blur":[{"backdrop-blur":eh()}],"backdrop-brightness":[{"backdrop-brightness":[I,H,G]}],"backdrop-contrast":[{"backdrop-contrast":[I,H,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,H,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,H,G]}],"backdrop-invert":[{"backdrop-invert":["",I,H,G]}],"backdrop-opacity":[{"backdrop-opacity":[I,H,G]}],"backdrop-saturate":[{"backdrop-saturate":[I,H,G]}],"backdrop-sepia":[{"backdrop-sepia":["",I,H,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",H,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",H,G]}],ease:[{ease:["linear","initial",y,H,G]}],delay:[{delay:[I,H,G]}],animate:[{animate:["none",v,H,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,H,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ef()}],"rotate-x":[{"rotate-x":ef()}],"rotate-y":[{"rotate-y":ef()}],"rotate-z":[{"rotate-z":ef()}],scale:[{scale:ep()}],"scale-x":[{"scale-x":ep()}],"scale-y":[{"scale-y":ep()}],"scale-z":[{"scale-z":ep()}],"scale-3d":["scale-3d"],skew:[{skew:eg()}],"skew-x":[{"skew-x":eg()}],"skew-y":[{"skew-y":eg()}],transform:[{transform:[H,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:em()}],"translate-x":[{"translate-x":em()}],"translate-y":[{"translate-y":em()}
vendor: 4,692 bytes, line 1
1],"translate-z":[{"translate-z":em()}],"translate-none":["translate-none"],accent:[{accent:er()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:er()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",H,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",H,G]}],fill:[{fill:["none",...er()]}],"stroke-w":[{stroke:[I,K,q,F]}],stroke:[{stroke:["none",...er()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ed(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eu((0,n.W)(t))}}
1,45168:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return V}});var n=r(85893),i=r(6806),s=r.n(i),o=r(15247),a=r.n(o),l=r(2962),c=r(9008),u=r.n(c),d=r(4298),h=r.n(d);r(80876);var f=r(67294),p=r(41664),g=r.n(p),m=r(34209),y=r(11163),v=r(12449),b=r(25675),w=r.n(b),_=r(79553),x=r(9610);let k=e=>{let{href:t,children:r,active:i}=e;return(0,n.jsx)(g(),{href:t,className:"px-3 py-2 text-base transition-colors rounded-full ".concat(i?"text-warm-700 bg-banner":"text-warm-600 hover:text-warm-700 hover:bg-warm-100 active:bg-warm-200"),children:r})},j=e=>{let{href:t,children:r}=e;return(0,n.jsx)(g(),{href:t,className:"block px-4 py-2 text-warm-600 hover:bg-warm-100 hover:text-warm-700 active:bg-warm-200",children:r})},E=e=>{let{user:t,dropdownOpen:r,toggleDropdown:i,handleSignOut:s,dropdownRef:o,userType:a,isAdmin:l,companies:c,currentCompany:u,setCurrentCompany:d,router:h}=e;return(0,n.jsxs)("div",{className:"relative",ref:o,children:[(0,n.jsx)("button",{onClick:i,className:"w-8 h-8 text-base font-normal text-warm-700 bg-yellow rounded-full hover:bg-yellow-500 active:bg-yellow-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-yellow",children:t.email[0].toUpperCase()}),r&&(0,n.jsx)("div",{className:"absolute right-0 w-56 mt-2 origin-top-right bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5",children:(0,n.jsxs)("div",{className:"py-1",role:"menu","aria-orientation":"vertical","aria-labelledby":"options-menu",children:[(0,n.jsxs)("div",{className:"px-4 py-2 text-base text-warm-600",children:[(0,n.jsx)("p",{className:"font-medium",children:"Ingelogd als:"}),(0,n.jsx)("p",{className:"truncate",children:t.email})]}),l&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"border-t border-warm-200"}),(0,n.jsxs)("div",{className:"px-4 py-2",children:[(0,n.jsx)("label",{className:"block mb-1 text-sm font-medium text-warm-600",children:"Bedrijf selecteren:"}),(0,n.jsxs)("select",{value:(null==u?void 0:u.id)||"",onChange:e=>{let t=c.find(t=>t.id===e.target.value);d(t||null),t&&h.push("/dashboard")},className:"w-full px-2 py-1 text-sm border rounded",children:[(0,n.jsx)("option",{value:"",children:"Geen bedrijf geselecteerd"}),c.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]})]})]}),(0,n.jsx)(g(),{href:"/account-instellingen",className:"block px-4 py-2 text-base text-warm-600 hover:bg-warm-100 hover:text-warm-700 active:bg-warm-200",role:"menuitem",children:"Account instellingen"}),(0,n.jsx)("button",{onClick:s,className:"block w-full px-4 py-2 text-base text-left text-red-600 hover:bg-warm-100 hover:text-red-700 active:bg-warm-200",role:"menuitem",children:"Uitloggen"})]})})]})};var S=()=>{let[e,t]=(0,f.useState)(null),[r,i]=(0,f.useState)(null),[s,o]=(0,f.useState)(!1),[a,l]=(0,f.useState)(!1),c=(0,y.useRouter)(),u=(0,f.useRef)(null),{currentCompany:d,setCurrentCompany:h}=(0,_.y)(),[p,b]=(0,f.useState)([]);(0,f.useEffect)(()=>{let{data:e}=m.O.auth.onAuthStateChange((e,r)=>{var n;t(null!==(n=null==r?void 0:r.user)&&void 0!==n?n:null)});return m.O.auth.getSession().then(e=>{var r;let{data:{session:n}}=e;t(null!==(r=null==n?void 0:n.user)&&void 0!==r?r:null)}),()=>{e.subscription.unsubscribe()}},[]),(0,f.useEffect)(()=>{(async()=>{e?i(await (0,v.N)(e.id)):i(null)})()},[e]),(0,f.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&o(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,f.useEffect)(()=>{let e=e=>{c.pathname!==e.split("?")[0]&&l(!1)};return c.events.on("routeChangeStart",e),()=>{c.events.off("routeChangeStart",e)}},[c]);let S=async()=>{await m.O.auth.signOut(),c.push("/")},O=e?"employer"===r||"service_role"===e.role&&d?[{href:"/dashboard",label:"Overzicht"},{href:"/bedrijven/profile",label:"Bedrijfsprofiel"},{href:"/bedrijven/vacatures",label:"Vacatures"},{href:"/bedrijven/evenementen",label:"Evenementen"}]:[{href:"/dashboard",label:"Overzicht"},{href:"/vacatures",label:"Vacatures"},{href:"/evenementen",label:"Evenementen"},{href:"/bedrijven",label:"Bedrijven"}]:[{href:"/vacatures",label:"Vacatures"},{href:"/evenementen",label:"Evenementen"},{href:"/bedrijven",label:"Bedrijven"}],C="/bedrijven/landing"===c.pathname;return c.pathname,(0,f.useEffect)(()=>{(async()=>
1{if((null==e?void 0:e.role)==="service_role"){let{data:e}=await m.O.from("companies").select("id, name").order("name");b(e||[])}})()},[e]),(0,n.jsx)("nav",{className:"text-warm-700 bg-white shadow-[0_2px_0.75rem_rgba(0,0,0,0.06)] border-b border-warm-200 sticky top-0 z-50",children:(0,n.jsxs)("div",{className:"container px-4 mx-auto",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsx)(g(),{href:"/",className:"flex-shrink-0",children:(0,n.jsx)(w(),{src:"/images/LegalHunt logo.svg",alt:"LegalHunt Logo",width:153,height:36,className:"w-[153px] h-[36px]"})}),(0,n.jsx)("div",{className:"hidden space-x-2 lg:flex",children:O.map(e=>(0,n.jsx)(k,{href:e.href,active:c.pathname===e.href,children:e.label},e.href))})]}),(0,n.jsx)("div",{className:"items-center hidden lg:flex",children:e?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(E,{user:e,dropdownOpen:s,toggleDropdown:()=>{o(!s)},handleSignOut:S,dropdownRef:u,userType:r,isAdmin:(null==e?void 0:e.role)==="service_role",companies:p,currentCompany:d,setCurrentCompany:h,router:c})}):(0,n.jsxs)(n.Fragment,{children:[!C&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(g(),{href:"/bedrijven/landing",className:"mr-4 text-base text-warm-500 transition-colors hover:text-warm-700",children:"Voor bedrijven"}),(0,n.jsx)("div",{className:"w-px h-4 ml-2 mr-6 bg-warm-300"})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,n.jsx)(x.z,{variant:"outline",asChild:!0,children:(0,n.jsx)(g(),{href:"/login",children:"Inloggen"})}),(0,n.jsx)(x.z,{asChild:!0,children:(0,n.jsx)(g(),{href:C?"/bedrijven/signup":"/talent/onboarding",children:C?"Meld je bedrijf aan":"Meld je aan"})})]})]})}),(0,n.jsxs)("div",{className:"flex items-center lg:hidden",children:[!e&&!a&&(0,n.jsx)(x.z,{variant:"outline",size:"sm",asChild:!0,className:"mr-4",children:(0,n.jsx)(g(),{href:"/login",children:"Inloggen"})}),(0,n.jsx)("button",{onClick:()=>{l(!a)},className:"text-warm-500 hover:text-warm-700",children:(0,n.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),a&&(0,n.jsx)("div",{className:"absolute left-0 right-0 bg-white border-b border-warm-200 shadow-lg lg:hidden",children:(0,n.jsxs)("div",{className:"container px-4 mx-auto py-4",children:[(0,n.jsxs)("div",{className:"mb-6 space-y-2",children:[O.map(e=>(0,n.jsx)(j,{href:e.href,children:e.label},e.href)),!e&&!C&&(0,n.jsx)(j,{href:"/bedrijven/landing",children:"Voor bedrijven"})]}),e?(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(j,{href:"/account-instellingen",children:"Account Instellingen"}),(0,n.jsx)("button",{onClick:S,className:"block w-full px-4 py-2 text-left text-warm-600 hover:bg-warm-100 hover:text-warm-700",children:"Uitloggen"})]}):(0,n.jsxs)("div",{className:"flex mt-6 space-x-2",children:[(0,n.jsx)(x.z,{variant:"outline",asChild:!0,className:"justify-center flex-1",children:(0,n.jsx)(g(),{href:"/login",children:"Inloggen"})}),(0,n.jsx)(x.z,{asChild:!0,className:"justify-center flex-1",children:(0,n.jsx)(g(),{href:C?"/bedrijven/signup":"/talent/onboarding",children:C?"Meld je bedrijf aan":"Meld je aan"})})]})]})})]})})},O=()=>(0,n.jsxs)("footer",{className:"text-white bg-warm-700",children:[(0,n.jsx)("div",{className:"container px-4 py-8 mx-auto border-b border-warm-600",children:(0,n.jsx)(g(),{href:"/",className:"block w-[153px]",children:(0,n.jsx)(w(),{src:"/images/LegalHunt logo white.svg",alt:"LegalHunt",width:153,height:36,className:"w-[153px] h-[36px]"})})}),(0,n.jsx)("div",{className:"container px-4 py-12 mx-auto",children:(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-5",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Meer LegalHunt"}),(0,n.jsxs)("ul",{className:"space-y-2",children:[(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"https://www.linkedin.com/in/legalhunt/",className:"text-warm-400 hover:text-white",target:"_blank",rel:"noopener noreferrer",children:"LinkedIn"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"https://www.instagram.com/legalhunt_nl/",className:"text-warm-400 hover:text-white",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/contact",className:"text-warm-400 hover:text-white",children:"Contact"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/blog",className:"text-warm-400 hover:text-white",children:"Blog"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Voor juridisch talent"}),(0,n.jsxs)("ul",{className:"space-y-2",children:[(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/talent/onboarding",className:"text-warm-400 hover:text-white",children:"Account aanmaken"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/vacatures",className:"text-warm-400 hover:text-white",children:"Vacatures"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/evenementen",className:"text-warm-400 hover:text-white",children:"Evenementen"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/bedrijven",className:"text-warm-400 hover:text-white",children:"Bedrijven"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/carriere-scan",className:"text-warm-400 hover:text-white",children:"Carri\xe8re Scan"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/kantoorwijzer",className:"text-warm-400 hover:text-white",children:"KantoorWijzer"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Voor bedrijven"}),(0,n.jsxs)("ul",{className:"space-y-2",children:[(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/bedrijven/landing",className:"text-warm-400 hover:text-white",children:"Waarom LegalHunt"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/bedrijven/signup",className:"text-warm-400 hover:text-white",children:"Bedrijf aanmelden"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Juri
1dische vacatures"}),(0,n.jsxs)("ul",{className:"space-y-2",children:[(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/vacatures/advocaat",className:"text-warm-400 hover:text-white",children:"Advocaat"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/vacatures/juridisch-medewerker",className:"text-warm-400 hover:text-white",children:"Juridisch medewerker"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/vacatures/kandidaat-notaris",className:"text-warm-400 hover:text-white",children:"Kandidaat-notaris"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/vacatures/jurist",className:"text-warm-400 hover:text-white",children:"Jurist"})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"mb-4 text-lg font-semibold",children:"Locaties"}),(0,n.jsxs)("ul",{className:"space-y-2",children:[(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/steden/amsterdam",className:"text-warm-400 hover:text-white",children:"Amsterdam"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/steden/rotterdam",className:"text-warm-400 hover:text-white",children:"Rotterdam"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/steden/den-haag",className:"text-warm-400 hover:text-white",children:"Den Haag"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/steden/utrecht",className:"text-warm-400 hover:text-white",children:"Utrecht"})}),(0,n.jsx)("li",{children:(0,n.jsx)(g(),{href:"/steden/leiden",className:"text-warm-400 hover:text-white",children:"Leiden"})})]})]})]})}),(0,n.jsx)("div",{className:"container px-4 py-4 mx-auto border-t border-warm-600",children:(0,n.jsxs)("div",{className:"flex flex-col justify-center items-center space-y-2 text-sm text-warm-400 md:flex-row md:space-y-0 md:space-x-4",children:[(0,n.jsxs)("p",{children:["Copyright \xa9 ",new Date().getFullYear()," LegalHunt"]}),(0,n.jsx)(g(),{href:"/algemene-voorwaarden",className:"hover:text-white",children:"Algemene voorwaarden"}),(0,n.jsx)(g(),{href:"/privacybeleid",className:"hover:text-white",children:"Privacybeleid"}),(0,n.jsx)(g(),{href:"/index-seo",className:"hover:text-white",children:"Index"})]})})]}),C=e=>{let{children:t}=e;return(0,n.jsxs)("div",{className:"flex flex-col min-h-screen bg-white",children:[(0,n.jsx)(S,{}),(0,n.jsx)("main",{className:"flex-grow",children:t}),(0,n.jsx)(O,{})]})},T=r(49832),A=r(83454),I=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function P(){return"undefined"!=typeof window}function R(){return"production"}function N(){return"development"===((P()?window.vam:R())||"production")}function L(e){return(0,f.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,f.useEffect)(()=>{!function(e={debug:!0}){var t;if(!P())return;(function(e="auto"){if("auto"===e){window.vam=R();return}window.vam=e})(e.mode),I(),e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend));let r=e.scriptSrc?e.scriptSrc:N()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?`${e.basePath}/insights/script.js`:"/_vercel/insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.5.0",e.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/insights`),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{let e=N()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${e}`)},N()&&!1===e.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",basePath:e.basePath??function(){if(void 0!==A&&void 0!==A.env)return A.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,f.useEffect)(()=>{e.route&&e.path&&function({route:e,path:t}){var r;null==(r=window.va)||r.call(window,"pageview",{route:e,path:t})}({route:e.route,path:e.path})},[e.route,e.path]),null}var $=r(39332),U=r(83454),M=()=>{window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)})};function B(){return false}function z(e){return RegExp(`/${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?=[/?#]|$)`)}function D(e){(0,f.useEffect)(()=>{var t;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);let t=(0,f.useRef)(null);return(0,f.useEffect)(()=>
1{if(t.current)e.route&&t.current(e.route);else{let r=function(e={}){var t;if(!("undefined"!=typeof window)||null===e.route)return null;M();let r=e.scriptSrc?e.scriptSrc:e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?`${e.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js";if(document.head.querySelector(`script[src*="${r}"]`))return null;e.beforeSend&&(null==(t=window.si)||t.call(window,"beforeSend",e.beforeSend));let n=document.createElement("script");return n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/speed-insights"+(e.framework?`/${e.framework}`:""),n.dataset.sdkv="1.2.0",e.sampleRate&&(n.dataset.sampleRate=e.sampleRate.toString()),e.route&&(n.dataset.route=e.route),e.endpoint?n.dataset.endpoint=e.endpoint:e.basePath&&(n.dataset.endpoint=`${e.basePath}/speed-insights/vitals`),e.dsn&&(n.dataset.dsn=e.dsn),n.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(n),{setRoute:e=>{n.dataset.route=e??void 0}}}({framework:e.framework??"react",basePath:e.basePath??function(){if(void 0!==U&&void 0!==U.env)return U.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...e});r&&(t.current=r.setRoute)}},[e.route]),null}var G=()=>{let e=(0,$.useParams)(),t=(0,$.useSearchParams)()||new URLSearchParams,r=(0,$.usePathname)();return e?function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,n]of e)if(!Array.isArray(n)){let e=z(n);e.test(r)&&(r=r.replace(e,`/[${t}]`))}for(let[t,n]of e)if(Array.isArray(n)){let e=z(n.join("/"));e.test(r)&&(r=r.replace(e,`/[...${t}]`))}return r}catch(t){return e}}(r,Object.keys(e).length?e:Object.fromEntries(t.entries())):null};function q(e){let t=G();return f.createElement(D,{route:t,...e,framework:"next",basePath:function(){if(void 0!==U&&void 0!==U.env)return U.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}()})}function F(e){return f.createElement(f.Suspense,{fallback:null},f.createElement(q,{...e}))}var J=r(64712),V=function(e){let{Component:t,pageProps:r}=e,i="https://legalhunt.nl";return(0,n.jsx)("div",{className:"".concat(s().variable," ").concat(a().variable," font-sans"),children:(0,n.jsx)(_.n,{children:(0,n.jsxs)(T.B,{children:[(0,n.jsxs)(u(),{children:[(0,n.jsx)("link",{rel:"icon",href:"/favicon.ico"}),(0,n.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/images/apple-touch-icon.png"})]}),(0,n.jsx)(l.lX,{titleTemplate:"%s | LegalHunt",defaultTitle:"LegalHunt - Juridische Vacatures en Stages bij Topkantoren",description:"LegalHunt verbindt juridisch talent met de beste bedrijven. Vind hier je volgende uitdaging.",openGraph:{type:"website",locale:"nl_NL",url:i,siteName:"LegalHunt",title:"LegalHunt - D\xe9 Juridische Carri\xe8resite van Nederland",description:"LegalHunt verbindt juridisch talent met de beste bedrijven. Vind hier je volgende uitdaging.",images:[{url:"".concat(i,"/images/legalhunt-open-graph-image.png"),width:1200,height:630,alt:"LegalHunt - D\xe9 Juridische Carri\xe8resite van Nederland"}]},twitter:{handle:"@legalhunt",site:"@legalhunt",cardType:"summary_large_image"},additionalMetaTags:[{name:"viewport",content:"width=device-width, initial-scale=1"}]}),(0,n.jsx)(C,{children:(0,n.jsx)(t,{...r})}),(0,n.jsx)(J.x7,{position:"top-right",richColors:!0,toastOptions:{className:"font-sans"}}),(0,n.jsx)(L,{}),(0,n.jsx)(F,{}),(0,n.jsx)(h(),{src:"https://scripts.simpleanalyticscdn.com/latest.js",async:!0,strategy:"afterInteractive"})]})})})}},12449:function(e,t,r){"use strict";r.d(t,{N:function(){return i}});var n=r(34209);async function i(e){var t;let{data:{user:r}}=await n.O.auth.getUser(),i=null==r?void 0:null===(t=r.user_metadata)||void 0===t?void 0:t.user_type;if(i)return i;let{data:s}=await n.O.from("applicants").select().eq("user_id",e).single();if(s)return"applicant";let{data:o}=await n.O.from("company_users").select().eq("user_id",e).single();return o?"employer":null}},80876:function(){},15247:function(e){e.exports={style:{fontFamily:"'__Bricolage_Grotesque_6310ba', '__Bricolage_Grotesque_Fallback_6310ba'",fontStyle:"normal"},className:"__className_6310ba",variable:"__variable_6310ba"}},6806:function(e){e.exports={style:{fontFamily:"'__DM_Sans_6e5d6a', '__DM_Sans_Fallback_6e5d6a'"},className:"__className_6e5d6a",variable:"__variable_6e5d6a"}},77663:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}
1catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l=[],c=!1,u=-1;function d(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u<t;)n&&n[u].run();u=-1,t=l.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||c||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},o=!0;try{t[e](s,s.exports,n),o=!1}finally{o&&delete r[e]}return s.exports}n.ab="//";var i=n(229);e.exports=i}()},9008:function(e,t,r){e.exports=r(23867)},25675:function(e,t,r){e.exports=r(76210)},41664:function(e,t,r){e.exports=r(98342)},39332:function(e,t,r){e.exports=r(8199)},11163:function(e,t,r){e.exports=r(43079)},4298:function(e,t,r){e.exports=r(23381)},69328:function(e){"use strict";var t={decodeValues:!0,map:!1,silent:!1};function r(e){return"string"==typeof e&&!!e.trim()}function n(e,n){var i,s,o,a,l=e.split(";").filter(r),c=(i=l.shift(),s="",o="",(a=i.split("=")).length>1?(s=a.shift(),o=a.join("=")):o=i,{name:s,value:o}),u=c.name,d=c.value;n=n?Object.assign({},t,n):t;try{d=n.decodeValues?decodeURIComponent(d):d}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+d+"'. Set options.decodeValues to false to disable this feature.",e)}var h={name:u,value:d};return l.forEach(function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?h.expires=new Date(n):"max-age"===r?h.maxAge=parseInt(n,10):"secure"===r?h.secure=!0:"httponly"===r?h.httpOnly=!0:"samesite"===r?h.sameSite=n:"partitioned"===r?h.partitioned=!0:h[r]=n}),h}function i(e,i){if(i=i?Object.assign({},t,i):t,!e)return i.map?{}:[];if(e.headers){if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var s=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];s||!e.headers.cookie||i.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=s}}return(Array.isArray(e)||(e=[e]),i.map)?e.filter(r).reduce(function(e,t){var r=n(t,i);return e[r.name]=r,e},{}):e.filter(r).map(function(e){return n(e,i)})}e.exports=i,e.exports.parse=i,e.exports.parseString=n,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,i,s,o=[],a=0;function l(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;l();)if(","===(r=e.charAt(a))){for(n=a,a+=1,l(),i=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=i,o.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!s||a>=e.length)&&o.push(e.substring(t,e.length))}return o}},57026:function(e){"use strict";e.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},28771:function(e,t,r){"use strict";r.d(t,{F:function(){return s},e:function(){return o}});var n=r(67294);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}function o(...e){return n.useCallback(s(...e),e)}},88426:function(e,t,r){"use strict";r.d(t,{Z8:function(){return o},g7:function(){return a}});var n=r(67294),i=r(28771),s=r(85893);function o(e){let t=function(e){let t=n.forwardRef((e,t)=>
1{let{children:r,...s}=e;if(n.isValidElement(r)){let e,o;let a=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref,l=function(e,t){let r={...t};for(let n in t){let i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...e)=>{let t=s(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...s}:"className"===n&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}(s,r.props);return r.type!==n.Fragment&&(l.ref=t?(0,i.F)(t,a):a),n.cloneElement(r,l)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=n.forwardRef((e,r)=>{let{children:i,...o}=e,a=n.Children.toArray(i),l=a.find(c);if(l){let e=l.props.children,i=a.map(t=>t!==l?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...o,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,i):null})}return(0,s.jsx)(t,{...o,ref:r,children:i})});return r.displayName=`${e}.Slot`,r}var a=o("Slot"),l=Symbol("radix.slottable");function c(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}},63119:function(e,t,r){"use strict";let n,i;r.r(t),r.d(t,{BrowserCookieAuthStorageAdapter:function(){return rr},CookieAuthStorageAdapter:function(){return rt},DEFAULT_COOKIE_OPTIONS:function(){return t7},createSupabaseClient:function(){return rn},isBrowser:function(){return t9},parseCookies:function(){return ri},parseSupabaseCookie:function(){return t3},serializeCookie:function(){return rs},stringifySupabaseSession:function(){return t8}}),new TextEncoder;let s=new TextDecoder,o=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r},a=e=>{let t=e;t instanceof Uint8Array&&(t=s.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return o(t)}catch(e){throw TypeError("The input to be decoded is not correctly encoded.")}},l=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(r.bind(r,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)};class c extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}}class u extends c{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class d extends c{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class h extends c{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}(w=_||(_={})).Any="any",w.ApNortheast1="ap-northeast-1",w.ApNortheast2="ap-northeast-2",w.ApSouth1="ap-south-1",w.ApSoutheast1="ap-southeast-1",w.ApSoutheast2="ap-southeast-2",w.CaCentral1="ca-central-1",w.EuCentral1="eu-central-1",w.EuWest1="eu-west-1",w.EuWest2="eu-west-2",w.EuWest3="eu-west-3",w.SaEast1="sa-east-1",w.UsEast1="us-east-1",w.UsWest1="us-west-1",w.UsWest2="us-west-2";class f{constructor(e,{headers:t={},customFetch:r,region:n=_.Any}={}){this.url=e,this.headers=t,this.region=n,this.fetch=l(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var r,n,i,s,o;return n=this,i=void 0,s=void 0,o=function*(){try{let n;let{headers:i,method:s,body:o}=t,a={},{region:l}=t;l||(l=this.region),l&&"any"!==l&&(a["x-region"]=l),o&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&("undefined"!=typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",n=o):"string"==typeof o?(a["Content-Type"]="text/plain",n=o):"undefined"!=typeof FormData&&o instanceof FormData?n=o:(a["Content-Type"]="application/json",n=JSON.stringify(o)));let c=yield this.fetch(`${this.url}/${e}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:n}).catch(e=>{throw new u(e)}),f=c.headers.get("x-relay-error");if(f&&"true"===f)throw new d(c);if(!c.ok)throw new h(c);let p=(null!==(r=c.headers.get("Content-Type"))&&void 0!==r?r:"text/plain").split(";")[0].trim();return{data:"application/json"===p?yield c.json():"application/octet-stream"
1===p?yield c.blob():"text/event-stream"===p?c:"multipart/form-data"===p?yield c.formData():yield c.text(),error:null}}catch(e){return{data:null,error:e}}},new(s||(s=Promise))(function(e,t){function r(e){try{l(o.next(e))}catch(e){t(e)}}function a(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):((n=t.value)instanceof s?n:new s(function(e){e(n)})).then(r,a)}l((o=o.apply(n,i||[])).next())})}}let{PostgrestClient:p,PostgrestQueryBuilder:g,PostgrestFilterBuilder:m,PostgrestTransformBuilder:y,PostgrestBuilder:v,PostgrestError:b}=r(50159);var w,_,x,k,j,E,S,O,C,T,A,I,P,R,N,L,$,U,M,B,z,D="undefined"==typeof window?r(57026):window.WebSocket;let G={"X-Client-Info":"realtime-js/2.11.10"};(P=x||(x={}))[P.connecting=0]="connecting",P[P.open=1]="open",P[P.closing=2]="closing",P[P.closed=3]="closed",(R=k||(k={})).closed="closed",R.errored="errored",R.joined="joined",R.joining="joining",R.leaving="leaving",(N=j||(j={})).close="phx_close",N.error="phx_error",N.join="phx_join",N.reply="phx_reply",N.leave="phx_leave",N.access_token="access_token",(E||(E={})).websocket="websocket",(L=S||(S={})).Connecting="connecting",L.Open="open",L.Closing="closing",L.Closed="closed";class q{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):"string"==typeof e?t(JSON.parse(e)):t({})}_binaryDecode(e){let t=new DataView(e),r=new TextDecoder;return this._decodeBroadcast(e,t,r)}_decodeBroadcast(e,t,r){let n=t.getUint8(1),i=t.getUint8(2),s=this.HEADER_LENGTH+2,o=r.decode(e.slice(s,s+n));s+=n;let a=r.decode(e.slice(s,s+i));return s+=i,{ref:null,topic:o,event:a,payload:JSON.parse(r.decode(e.slice(s,e.byteLength)))}}}class F{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}($=O||(O={})).abstime="abstime",$.bool="bool",$.date="date",$.daterange="daterange",$.float4="float4",$.float8="float8",$.int2="int2",$.int4="int4",$.int4range="int4range",$.int8="int8",$.int8range="int8range",$.json="json",$.jsonb="jsonb",$.money="money",$.numeric="numeric",$.oid="oid",$.reltime="reltime",$.text="text",$.time="time",$.timestamp="timestamp",$.timestamptz="timestamptz",$.timetz="timetz",$.tsrange="tsrange",$.tstzrange="tstzrange";let J=(e,t,r={})=>{var n;let i=null!==(n=r.skipTypes)&&void 0!==n?n:[];return Object.keys(t).reduce((r,n)=>(r[n]=V(n,e,t,i),r),{})},V=(e,t,r,n)=>{let i=t.find(t=>t.name===e),s=null==i?void 0:i.type,o=r[e];return s&&!n.includes(s)?W(s,o):H(o)},W=(e,t)=>{if("_"===e.charAt(0))return Z(t,e.slice(1,e.length));switch(e){case O.bool:return K(t);case O.float4:case O.float8:case O.int2:case O.int4:case O.int8:case O.numeric:case O.oid:return Y(t);case O.json:case O.jsonb:return X(t);case O.timestamp:return Q(t);case O.abstime:case O.date:case O.daterange:case O.int4range:case O.int8range:case O.money:case O.reltime:case O.text:case O.time:case O.timestamptz:case O.timetz:case O.tsrange:case O.tstzrange:default:return H(t)}},H=e=>e,K=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Y=e=>{if("string"==typeof e){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},X=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(e){console.log(`JSON parse error: ${e}`)}return e},Z=(e,t)=>{if("string"!=typeof e)return e;let r=e.length-1,n=e[r];if("{"===e[0]&&"}"===n){let n;let i=e.slice(1,r);try{n=JSON.parse("["+i+"]")}catch(e){n=i?i.split(","):[]}return n.map(e=>W(t,e))}return e},Q=e=>"string"==typeof e?e.replace(" ","T"):e,ee=e=>{let t=e;return(t=(t=t.replace(/^ws/i,"http")).replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,"")).replace(/\/+$/,"")};class et{constructor(e,t,r={},n=1e4){this.channel=e,this.event=t,this.payload=r,this.timeout=n,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,j
1oin_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var r;return this._hasReceived(e)&&t(null===(r=this.receivedResp)||void 0===r?void 0:r.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}(U=C||(C={})).SYNC="sync",U.JOIN="join",U.LEAVE="leave";class er{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};let r=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},e=>{let{onJoin:t,onLeave:r,onSync:n}=this.caller;this.joinRef=this.channel._joinRef(),this.state=er.syncState(this.state,e,t,r),this.pendingDiffs.forEach(e=>{this.state=er.syncDiff(this.state,e,t,r)}),this.pendingDiffs=[],n()}),this.channel._on(r.diff,{},e=>{let{onJoin:t,onLeave:r,onSync:n}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=er.syncDiff(this.state,e,t,r),n())}),this.onJoin((e,t,r)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:r})}),this.onLeave((e,t,r)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:r})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,r,n){let i=this.cloneDeep(e),s=this.transformState(t),o={},a={};return this.map(i,(e,t)=>{s[e]||(a[e]=t)}),this.map(s,(e,t)=>{let r=i[e];if(r){let n=t.map(e=>e.presence_ref),i=r.map(e=>e.presence_ref),s=t.filter(e=>0>i.indexOf(e.presence_ref)),l=r.filter(e=>0>n.indexOf(e.presence_ref));s.length>0&&(o[e]=s),l.length>0&&(a[e]=l)}else o[e]=t}),this.syncDiff(i,{joins:o,leaves:a},r,n)}static syncDiff(e,t,r,n){let{joins:i,leaves:s}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return r||(r=()=>{}),n||(n=()=>{}),this.map(i,(t,n)=>{var i;let s=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(n),s.length>0){let r=e[t].map(e=>e.presence_ref),n=s.filter(e=>0>r.indexOf(e.presence_ref));e[t].unshift(...n)}r(t,s,n)}),this.map(s,(t,r)=>{let i=e[t];if(!i)return;let s=r.map(e=>e.presence_ref);i=i.filter(e=>0>s.indexOf(e.presence_ref)),e[t]=i,n(t,i,r),0===i.length&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(r=>t(r,e[r]))}static transformState(e){return Object.getOwnPropertyNames(e=this.cloneDeep(e)).reduce((t,r)=>{let n=e[r];return"metas"in n?t[r]=n.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):t[r]=n,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}(M=T||(T={})).ALL="*",M.INSERT="INSERT",M.UPDATE="UPDATE",M.DELETE="DELETE",(B=A||(A={})).BROADCAST="broadcast",B.PRESENCE="presence",B.POSTGRES_CHANGES="postgres_changes",B.SYSTEM="system",(z=I||(I={})).SUBSCRIBED="SUBSCRIBED",z.TIMED_OUT="TIMED_OUT",z.CLOSED="CLOSED",z.CHANNEL_ERROR="CHANNEL_ERROR";class en{constructor(e,t={config:{}},r){this.topic=e,this.params=t,this.socket=r,this.bindings={},this.state=k.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new et(this,j.join,this.params,this.timeout),this.rejoinTimer=new F(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=k.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e
1=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=k.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=k.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=k.errored,this.rejoinTimer.scheduleTimeout())}),this._on(j.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new er(this),this.broadcastEndpointURL=ee(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,t=this.timeout){var r,n;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{let{config:{broadcast:i,presence:s,private:o}}=this.params;this._onError(t=>null==e?void 0:e(I.CHANNEL_ERROR,t)),this._onClose(()=>null==e?void 0:e(I.CLOSED));let a={},l={broadcast:i,presence:s,postgres_changes:null!==(n=null===(r=this.bindings.postgres_changes)||void 0===r?void 0:r.map(e=>e.filter))&&void 0!==n?n:[],private:o};this.socket.accessTokenValue&&(a.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:l},a)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",async({postgres_changes:t})=>{var r;if(this.socket.setAuth(),void 0===t){null==e||e(I.SUBSCRIBED);return}{let n=this.bindings.postgres_changes,i=null!==(r=null==n?void 0:n.length)&&void 0!==r?r:0,s=[];for(let r=0;r<i;r++){let i=n[r],{filter:{event:o,schema:a,table:l,filter:c}}=i,u=t&&t[r];if(u&&u.event===o&&u.schema===a&&u.table===l&&u.filter===c)s.push(Object.assign(Object.assign({},i),{id:u.id}));else{this.unsubscribe(),this.state=k.errored,null==e||e(I.CHANNEL_ERROR,Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=s,e&&e(I.SUBSCRIBED);return}}).receive("error",t=>{this.state=k.errored,null==e||e(I.CHANNEL_ERROR,Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{null==e||e(I.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,r){return this._on(e,t,r)}async send(e,t={}){var r,n;if(this._canPush()||"broadcast"!==e.type)return new Promise(r=>{var n,i,s;let o=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(s=null===(i=null===(n=this.params)||void 0===n?void 0:n.config)||void 0===i?void 0:i.broadcast)||void 0===s?void 0:s.ack)||r("ok"),o.receive("ok",()=>r("ok")),o.receive("error",()=>r("error")),o.receive("timeout",()=>r("timed out"))});{let{event:i,payload:s}=e,o={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:s,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,o,null!==(r=t.timeout)&&void 0!==r?r:this.timeout);return await (null===(n=e.body)||void 0===n?void 0:n.cancel()),e.ok?"ok":"error"}catch(e){if("AbortError"===e.name)return"timed out";return"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=k.leaving;let t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(j.close,"leave",this._joinRef())};return this.joinPush.destroy(),new Promise(r=>{let n=new et(this,j.leave,{},e);n.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),n.send(),this._canPush()||n.trigger("ok",{})})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(e,t,r){let n=new AbortController,i=setTimeout(()=>n.abort(),r),s=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return clearTimeout(i),s}_push(e,t,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let n=new et(this,e,t,r);return this._canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}_onMessage(e,t,r){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,r){var n,i;let s=e.toLocaleLowerCase(),{close:o,error:a,leave:l,join:c}=j;if(r&&[o,a,l,c].indexOf(s)>=0&&r!==this._joinRef())return;let u=this._onMessage(s,t,r);if(t&&!u)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?null===(n=this.bindings.postgres_changes)||void 0===n||n.filter(e=>{var t,r,n;return(null===(t=e.filter)||void 0===t?void 0:t.event)==="*"||(null===(n=null===(r=e.filter)||void 0===r?void 0:r.event)||void 0===n?void 0:n.toLocaleLowerCase())===s}).map(e=>e.callback(u,r)):null===(i=this.bindings[s])||void 0===i||i.filter(e=>{var r,n,i,o,a,l;if(!["broadcast","presence","postgres_changes"].includes(s))return e.type.toLocaleLowerCase()===s;if("id"in e){let s=e.id,o=null===(r=e.filter)||void 0===r?void 0:r.event;return s&&(null===(n=t.ids)||void 0===n?void 0:n.includes(s))&&("*"===o||(null==o?void 0:o.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{let r=null===(a=null===(o=null==e?void 0:e.filter)||void 0===o?void 0:o.event)||void 0===a?void 0:a.toLocaleLowerCase();return"*"===r||r===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}).map(e=>{if("object"==typeof u&&"ids"in u){let e=u.data,{schema:t,table:r,commit_timestamp:n,type:i,errors:s}=e;u=Object.assign(Object.assign({},{schema:t,table:r,commit_timestamp:n,eventType:i,new:{},old:{},errors:s}),this._getPayloadRecords(e))}e.callback(u,r)})}_isClosed(){return this.state===k.closed}_isJoined(){return this.state===k.joined}_isJoining(){return this.state===k.joining}_isLeaving(){return this.state===k.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,r){let n=e.toLocaleLowerCase(),i={type:n,filter:t,callback:r};return this.bindings[n]?this.bindings[n].push(i):this.bindings[n]=[i],this}_off(e,t){let r=e.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(e=>{var n;return!((null===(n=e.type)||void 0===n?void 0:n.toLocaleLowerCase())===r&&en.isEqual(e.filter,t))}),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(j.close,{},e)}_onError(e){this._on(j.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=k.joining,this.joinPush.resend(e))}_getPayloadRecords(e){let t={new:{},old:{}};return("INSERT"===e.type||"UPDATE"===e.type)&&(t.new=J(e.columns,e.record)),("UPDATE"===e.type||"DELET
1E"===e.type)&&(t.old=J(e.columns,e.old_record)),t}}let ei=()=>{},es=` 2 addEventListener("message", (e) => { 3 if (e.data.event === "start") { 4 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 5 } 6 });`;class eo{constructor(e,t){var n;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=G,this.params={},this.timeout=1e4,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=ei,this.ref=0,this.logger=ei,this.conn=null,this.sendBuffer=[],this.serializer=new q,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(r.bind(r,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)},this.endPoint=`${e}/${E.websocket}`,this.httpEndpoint=ee(e),(null==t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null==t?void 0:t.params)&&(this.params=t.params),(null==t?void 0:t.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),(null==t?void 0:t.timeout)&&(this.timeout=t.timeout),(null==t?void 0:t.logger)&&(this.logger=t.logger),((null==t?void 0:t.logLevel)||(null==t?void 0:t.log_level))&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),(null==t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);let i=null===(n=null==t?void 0:t.params)||void 0===n?void 0:n.apikey;if(i&&(this.accessTokenValue=i,this.apiKey=i),this.reconnectAfterMs=(null==t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null==t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null==t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new F(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(null==t?void 0:t.fetch),null==t?void 0:t.worker){if("undefined"!=typeof window&&!window.Worker)throw Error("Web Worker is not supported");this.worker=(null==t?void 0:t.worker)||!1,this.workerUrl=null==t?void 0:t.workerUrl}this.accessToken=(null==t?void 0:t.accessToken)||null}connect(){if(!this.conn){if(this.transport||(this.transport=D),this.transport){"undefined"!=typeof window&&this.transport===window.WebSocket?this.conn=new this.transport(this.endpointURL()):this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection();return}this.conn=new ea(this.endpointURL(),void 0,{close:()=>{this.conn=null}})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(e=>e.teardown()))}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return this.channels=this.channels.filter(t=>t._joinRef!==e._joinRef),0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){let e=await Promise.all(this.channels.map(e=>e.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,t,r){this.logger(e,t,r)}connectionState(){switch(this.conn&&this.conn.readyState){case x.connecting:return S.Connecting;case x.open:return S.Open;case x.closing:return S.Closing;default:return S.Closed}}isConnected(){return this.connectionState()===S.Open}channel(e,t={config:{}}){let r=`realtime:${e}`,n=this.getChannels().find(e=>e.topic===r);if(n)return n;{let r=new en(`realtime:${e}`,t,this);return this.channels.push(r),r}}push(e){let{topic:t,event:r,payload:n,ref:i}=e,s=()=>{this.encode(e,e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)})};this.log("push",`${t} ${r} (${i})`,n),this.isConnected()?s():this.sendBuffer.push(s)}async setAuth(e=null){let t=e||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEac
6h(e=>{t&&e.updateJoinPayload({access_token:t,version:this.headers&&this.headers["X-Client-Info"]}),e.joinedOnce&&e._isJoined()&&e._push(j.access_token,{access_token:t})}))}async sendHeartbeat(){var e;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:r,payload:n,ref:i}=e;"phoenix"===t&&"phx_reply"===r&&this.heartbeatCallback("ok"==e.payload.status?"ok":"error"),i&&i===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${n.status||""} ${t} ${r} ${i&&"("+i+")"||""}`,n),Array.from(this.channels).filter(e=>e._isMember(t)).forEach(e=>e._trigger(r,n,i)),this.stateChangeCallbacks.message.forEach(t=>t(e))})}_onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),this.worker){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this.workerRef.terminate()},this.workerRef.onmessage=e=>{"keepAlive"===e.data.event&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}else this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(t=>t(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(t=>t(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(j.error))}_appendParams(e,t){if(0===Object.keys(t).length)return e;let r=e.match(/\?/)?"&":"?",n=new URLSearchParams(t);return`${e}${r}${n}`}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([es],{type:"application/javascript"});t=URL.createObjectURL(e)}return t}}class ea{constructor(e,t,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=x.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=r.close}}class el extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function ec(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class eu extends el{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class ed extends el{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}let eh=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(r.bind(r,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)},ef=()=>{var e,t,n,i;return e=void 0,t=void 0,n=void 0,i=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(r.bind(r,89743))).Response:Response}
6,new(n||(n=Promise))(function(r,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,a)}l((i=i.apply(e,t||[])).next())})},ep=e=>{if(Array.isArray(e))return e.map(e=>ep(e));if("function"==typeof e||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,r])=>{t[e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,""))]=ep(r)}),t};var eg=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};let em=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ey=(e,t,r)=>eg(void 0,void 0,void 0,function*(){e instanceof(yield ef())&&!(null==r?void 0:r.noResolveJson)?e.json().then(r=>{t(new eu(em(r),e.status||500))}).catch(e=>{t(new ed(em(e),e))}):t(new ed(em(e),e))}),ev=(e,t,r,n)=>{let i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),n&&(i.body=JSON.stringify(n)),Object.assign(Object.assign({},i),r))};function eb(e,t,r,n,i,s){return eg(this,void 0,void 0,function*(){return new Promise((o,a)=>{e(r,ev(t,n,i,s)).then(e=>{if(!e.ok)throw e;return(null==n?void 0:n.noResolveJson)?e:e.json()}).then(e=>o(e)).catch(e=>ey(e,a,n))})})}function ew(e,t,r,n){return eg(this,void 0,void 0,function*(){return eb(e,"GET",t,r,n)})}function e_(e,t,r,n,i){return eg(this,void 0,void 0,function*(){return eb(e,"POST",t,n,i,r)})}function ex(e,t,r,n,i){return eg(this,void 0,void 0,function*(){return eb(e,"DELETE",t,n,i,r)})}var ek=r(48764).lW,ej=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};let eE={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},eS={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class eO{constructor(e,t={},r,n){this.url=e,this.headers=t,this.bucketId=r,this.fetch=eh(n)}uploadOrUpdate(e,t,r,n){return ej(this,void 0,void 0,function*(){try{let i;let s=Object.assign(Object.assign({},eS),n),o=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(s.upsert)}),a=s.metadata;"undefined"!=typeof Blob&&r instanceof Blob?((i=new FormData).append("cacheControl",s.cacheControl),a&&i.append("metadata",this.encodeMetadata(a)),i.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?((i=r).append("cacheControl",s.cacheControl),a&&i.append("metadata",this.encodeMetadata(a))):(i=r,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType,a&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(a)))),(null==n?void 0:n.headers)&&(o=Object.assign(Object.assign({},o),n.headers));let l=this._removeEmptyFolders(t),c=this._getFinalPath(l),u=yield this.fetch(`${this.url}/object/${c}`,Object.assign({method:e,body:i,headers:o},(null==s?void 0:s.duplex)?{duplex:s.duplex}:{})),d=yield u.json();if(u.ok)return{data:{path:l,id:d.Id,fullPath:d.Key},error:null};return{data:null,error:d}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}upload(e,t,r){return ej(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,r)})}uploadToSignedUrl(e,t,r,n){return ej(this,void 0,void 0,function*(){let i=this._removeEmptyFolders(e),s=this._getFinalPath(i),o=new URL(this.url+`/object/upload/sign/${s}`);o.searchParams.set("token",t);try{let e;let t=Object.assign({upsert:eS.upsert},n),s=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&r instanceof Blob?((e=new FormData).append("cacheControl",t.cacheControl),e.append("",r)):"undefined"!=typeof FormData&&r instanceof FormData?(e=r).append("cacheControl",t.cacheControl):(e=r,s["cache-control"]=`max-age=${t.cacheControl}`,s["content-type"]=t.contentType);let a=yield this.fetch(o.toString(),{method:"PUT",body:e,headers:s}),l=yield a.json();if(a.ok)return{data:{path:i,fullPath:l.Key},error:null};return{data:null,error:l}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}createSignedUploadUrl(e,t){return ej(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),n=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(n["x-upsert"]="true");let i=yield e_(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:n}),s=new URL(this.url+i.url),o=s.searchParams.get("token");if(!o)throw new el("No token returned by API");return{data:{signedUrl:s.toString(),path:e,token:o},error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}update(e,t,r){return ej(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,r)})}move(e,t,r){return ej(this,void 0,void 0,function*(){try{return{data:yield e_(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,de
6stinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}copy(e,t,r){return ej(this,void 0,void 0,function*(){try{return{data:{path:(yield e_(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==r?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}createSignedUrl(e,t,r){return ej(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e),i=yield e_(this.fetch,`${this.url}/object/sign/${n}`,Object.assign({expiresIn:t},(null==r?void 0:r.transform)?{transform:r.transform}:{}),{headers:this.headers}),s=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return{data:i={signedUrl:encodeURI(`${this.url}${i.signedURL}${s}`)},error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}createSignedUrls(e,t,r){return ej(this,void 0,void 0,function*(){try{let n=yield e_(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=(null==r?void 0:r.download)?`&download=${!0===r.download?"":r.download}`:"";return{data:n.map(e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${i}`):null})),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}download(e,t){return ej(this,void 0,void 0,function*(){let r=void 0!==(null==t?void 0:t.transform),n=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),i=n?`?${n}`:"";try{let t=this._getFinalPath(e),n=yield ew(this.fetch,`${this.url}/${r?"render/image/authenticated":"object"}/${t}${i}`,{headers:this.headers,noResolveJson:!0});return{data:yield n.blob(),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}info(e){return ej(this,void 0,void 0,function*(){let t=this._getFinalPath(e);try{let e=yield ew(this.fetch,`${this.url}/object/info/${t}`,{headers:this.headers});return{data:ep(e),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}exists(e){return ej(this,void 0,void 0,function*(){let t=this._getFinalPath(e);try{return yield function(e,t,r,n){return eg(this,void 0,void 0,function*(){return eb(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),void 0)})}(this.fetch,`${this.url}/object/${t}`,{headers:this.headers}),{data:!0,error:null}}catch(e){if(ec(e)&&e instanceof ed){let t=e.originalError;if([400,404].includes(null==t?void 0:t.status))return{data:!1,error:e}}throw e}})}getPublicUrl(e,t){let r=this._getFinalPath(e),n=[],i=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==i&&n.push(i);let s=void 0!==(null==t?void 0:t.transform),o=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==o&&n.push(o);let a=n.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${s?"render/image":"object"}/public/${r}${a}`)}}}remove(e){return ej(this,void 0,void 0,function*(){try{return{data:yield ex(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}list(e,t,r){return ej(this,void 0,void 0,function*(){try{let n=Object.assign(Object.assign(Object.assign({},eE),t),{prefix:e||""});return{data:yield e_(this.fetch,`${this.url}/object/list/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return void 0!==ek?ek.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){let t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}let eC={"X-Client-Info":"storage-js/2.7.1"};var eT=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};class eA{constructor(e,t={},r){this.url=e,this.headers=Object.assign(Object.assign({},eC),t),this.fetch=eh(r)}listBuckets(){return eT(this,void 0,void 0,function*(){try{return{data:yield ew(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}getBucket(e){return eT(this,void 0,void 0,function*(){try{return{data:yield ew(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}createBucket(e,t={public:!1}){return eT(this,void 0,void 0,function*(){try{return{data:yield e_(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}updateBucket(e,t){return eT(this,void 0,void 0,function*(){try{return{data:yield function(e,t,r,n,i){return eg(this,void 0,void 0,function*(){return eb(e,"PUT",t,n,void 0,r)})}(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}emptyBucket(e){return eT(this,void 0,void 0,function*(){try{return{data:yield e_(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}deleteBucket(e){return eT(this,void 0,void 0,function*(){try{return{data:yield ex(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(e){if(ec(e))return{data:null,error:e};throw e}})}}class eI extends eA{constructor(e,t={},r){super(e,t,r)}from(e){return new eO(this.url,this.headers,e,this.fetch)}}let eP="";"undefined"!=typeof Deno?eP="deno":"undefined"!=typeof document?eP="web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?eP="react-native":eP="node";let eR={headers:{"X-Client-Info":`supabase-js-${eP}/2.50.0`}},eN={schema:"public"},eL={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},e$={};var eU=r(89743);let eM=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=eU.default:t=fetch,(...e)=>t(...e)},eB=()=>"undefined"==typeof Headers?eU.Headers:Headers,ez=(e,t,r)=>{let n=eM(r),i=eB();return(r,s)=>{var o,a,l,c;return o=void 0,a=void 0,l=void 0,c=function*(){var o;let a=null!==(o=yield t())&&void 0!==o?o:e,l=new i(null==s?void 0:s.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${a}`),n(r,Object.assign(Object.assign({},s),{headers:l}))},new(l||(l=Promise))(function(e,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function n(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof l?i:new l(function(e){e(i)})).then(r,n)}i((c=c.apply(o,a||[])).next())})}},eD="2.70.0",eG={"X-Client-Info":`gotrue-js/${eD}`},eq="X-Supabase-Api-Version",eF={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eJ=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;
6class eV extends Error{constructor(e,t,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=r}}function eW(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class eH extends eV{constructor(e,t,r){super(e,t,r),this.name="AuthApiError",this.status=t,this.code=r}}class eK extends eV{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class eY extends eV{constructor(e,t,r,n){super(e,r,n),this.name=t,this.status=r}}class eX extends eY{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class eZ extends eY{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class eQ extends eY{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class e0 extends eY{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class e1 extends eY{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class e2 extends eY{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function e5(e){return eW(e)&&"AuthRetryableFetchError"===e.name}class e6 extends eY{constructor(e,t,r){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=r}}class e4 extends eY{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}let e3="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),e8=" \n\r=".split(""),e9=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<e8.length;t+=1)e[e8[t].charCodeAt(0)]=-2;for(let t=0;t<e3.length;t+=1)e[e3[t].charCodeAt(0)]=t;return e})();function e7(e,t,r){if(null!==e)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)r(e3[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)r(e3[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function te(e,t,r){let n=e9[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else if(-2===n)return;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function tt(e){let t=[],r=e=>{t.push(String.fromCodePoint(e))},n={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=e=>{!function(e,t,r){if(0===t.utf8seq){if(e<=127){r(e);return}for(let r=1;r<6;r+=1)if((e>>7-r&1)==0){t.utf8seq=r;break}if(2===t.utf8seq)t.codepoint=31&e;else if(3===t.utf8seq)t.codepoint=15&e;else if(4===t.utf8seq)t.codepoint=7&e;else throw Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|63&e,t.utf8seq-=1,0===t.utf8seq&&r(t.codepoint)}}(e,n,r)};for(let t=0;t<e.length;t+=1)te(e.charCodeAt(t),i,s);return t.join("")}let tr=()=>"undefined"!=typeof window&&"undefined"!=typeof document,tn={tested:!1,writable:!1},ti=()=>{if(!tr())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(tn.tested)return tn.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),tn.tested=!0,tn.writable=!0}catch(e){tn.tested=!0,tn.writable=!1}return tn.writable},ts=e=>{let t;return e?t=e:"undefined"==typeof fetch?t=(...e)=>Promise.resolve().then(r.bind(r,89743)).then(({default:t})=>t(...e)):t=fetch,(...e)=>t(...e)},to=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,ta=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},tl=async(e,t)=>{let r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return r}},tc=async(e,t)=>{await e.removeItem(t)};class tu{constructor(){this.promise=new tu.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function td(e){let t=e.split(".");if(3!==t.length)throw new e4("Invalid JWT structure");for(let e=0;e<t.length;e++)if(!eJ.test(t[e]))throw new e4("JWT not in base64url format");
6return{header:JSON.parse(tt(t[0])),payload:JSON.parse(tt(t[1])),signature:function(e){let t=[],r={queue:0,queuedBits:0},n=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)te(e.charCodeAt(t),r,n);return new Uint8Array(t)}(t[2]),raw:{header:t[0],payload:t[1]}}}async function th(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function tf(e){return("0"+e.toString(16)).substr(-2)}async function tp(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>String.fromCharCode(e)).join("")}async function tg(e){return"undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder?btoa(await tp(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):(console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e)}async function tm(e,t,r=!1){let n=function(){let e=new Uint32Array(56);if("undefined"==typeof crypto){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length,r="";for(let n=0;n<56;n++)r+=e.charAt(Math.floor(Math.random()*t));return r}return crypto.getRandomValues(e),Array.from(e,tf).join("")}(),i=n;r&&(i+="/PASSWORD_RECOVERY"),await ta(e,`${t}-code-verifier`,i);let s=await tg(n),o=n===s?"plain":"s256";return[s,o]}tu.promiseConstructor=Promise;let ty=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i,tv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function tb(e){if(!tv.test(e))throw Error("@supabase/auth-js: Expected parameter to be UUID but is not")}var tw=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let t_=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),tx=[502,503,504];async function tk(e){var t;let r,n;if(!to(e))throw new e2(t_(e),0);if(tx.includes(e.status))throw new e2(t_(e),e.status);try{r=await e.json()}catch(e){throw new eK(t_(e),e)}let i=function(e){let t=e.headers.get(eq);if(!t||!t.match(ty))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(i&&i.getTime()>=eF["2024-01-01"].timestamp&&"object"==typeof r&&r&&"string"==typeof r.code?n=r.code:"object"==typeof r&&r&&"string"==typeof r.error_code&&(n=r.error_code),n){if("weak_password"===n)throw new e6(t_(r),e.status,(null===(t=r.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===n)throw new eX}else if("object"==typeof r&&r&&"object"==typeof r.weak_password&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0))throw new e6(t_(r),e.status,r.weak_password.reasons);throw new eH(t_(r),e.status||500,n)}let tj=(e,t,r,n)=>{let i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(n),Object.assign(Object.assign({},i),r))};async function tE(e,t,r,n){var i;let s=Object.assign({},null==n?void 0:n.headers);s[eq]||(s[eq]=eF["2024-01-01"].name),(null==n?void 0:n.jwt)&&(s.Authorization=`Bearer ${n.jwt}`);let o=null!==(i=null==n?void 0:n.query)&&void 0!==i?i:{};(null==n?void 0:n.redirectTo)&&(o.redirect_to=n.redirectTo);let a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await tS(e,t,r+a,{headers:s,noResolveJson:null==n?void 0:n.noResolveJson},{},null==n?void 0:n.body);return(null==n?void 0:n.xform)?null==n?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function tS(e,t,r,n,i,s){let o;
6let a=tj(t,n,i,s);try{o=await e(r,Object.assign({},a))}catch(e){throw console.error(e),new e2(t_(e),0)}if(o.ok||await tk(o),null==n?void 0:n.noResolveJson)return o;try{return await o.json()}catch(e){await tk(e)}}function tO(e){var t,r;let n=null;return e.access_token&&e.refresh_token&&e.expires_in&&(n=Object.assign({},e),!e.expires_at)&&(n.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r)),{data:{session:n,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function tC(e){let t=tO(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function tT(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function tA(e){return{data:e,error:null}}function tI(e){let{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s}=e;return{data:{properties:{action_link:t,email_otp:r,hashed_token:n,redirect_to:i,verification_type:s},user:Object.assign({},tw(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]))},error:null}}function tP(e){return e}let tR=["global","local","others"];var tN=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};class tL{constructor({url:e="",headers:t={},fetch:r}){this.url=e,this.headers=t,this.fetch=ts(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,t=tR[0]){if(0>tR.indexOf(t))throw Error(`@supabase/auth-js: Parameter scope must be one of ${tR.join(", ")}`);try{return await tE(this.fetch,"POST",`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(eW(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await tE(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:tT})}catch(e){if(eW(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,r=tN(e,["options"]),n=Object.assign(Object.assign({},r),t);return"newEmail"in r&&(n.new_email=null==r?void 0:r.newEmail,delete n.newEmail),await tE(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:n,headers:this.headers,xform:tI,redirectTo:null==t?void 0:t.redirectTo})}catch(e){if(eW(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await tE(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:tT})}catch(e){if(eW(e))return{data:{user:null},error:e};throw e}}async listUsers(e){var t,r,n,i,s,o,a;try{let l={nextPage:null,lastPage:0,total:0},c=await tE(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:null!==(r=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==r?r:"",per_page:null!==(i=null===(n=null==e?void 0:e.perPage)||void 0===n?void 0:n.toString())&&void 0!==i?i:""},xform:tP});if(c.error)throw c.error;let u=await c.json(),d=null!==(s=c.headers.get("x-total-count"))&&void 0!==s?s:0,h=null!==(a=null===(o=c.headers.get("link"))||void 0===o?void 0:o.split(","))&&void 0!==a?a:[];return h.length>0&&(h.forEach(e=>{let t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),r=JSON.parse(e.split(";")[1].split("=")[1]);l[`${r}Page`]=t}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(e){if(eW(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){tb(e);try{return await tE(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:tT})}catch(e){if(eW(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){tb(e);try{return await tE(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:tT})}catch(e){if(eW(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){tb(e);
6try{return await tE(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:tT})}catch(e){if(eW(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){tb(e.userId);try{let{data:t,error:r}=await tE(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:r}}catch(e){if(eW(e))return{data:null,error:e};throw e}}async _deleteFactor(e){tb(e.userId),tb(e.id);try{return{data:await tE(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(eW(e))return{data:null,error:e};throw e}}}let t$={getItem:e=>ti()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{ti()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{ti()&&globalThis.localStorage.removeItem(e)}};function tU(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}let tM={debug:!!(globalThis&&ti()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class tB extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class tz extends tB{}async function tD(e,t,r){tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);let n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),tM.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async n=>{if(n){tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,n.name);try{return await r()}finally{tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,n.name)}}else{if(0===t)throw tM.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new tz(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(tM.debug)try{let e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null," "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();let tG={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:eG,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function tq(e,t,r){return await r()}class tF{constructor(e){var t,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=tF.nextInstanceID,tF.nextInstanceID+=1,this.instanceID>0&&tr()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");let n=Object.assign(Object.assign({},tG),e);if(this.logDebugMessages=!!n.debug,"function"==typeof n.debug&&(this.logger=n.debug),this.persistSession=n.persistSession,this.storageKey=n.storageKey,this.autoRefreshToken=n.autoRefreshToken,this.admin=new tL({url:n.url,headers:n.headers,fetch:n.fetch}),this.url=n.url,this.headers=n.headers,this.fetch=ts(n.fetch),this.lock=n.lock||tq,this.detectSessionInUrl=n.detectSessionInUrl,this.flowType=n.flowType,this.hasCustomAuthorizationHeader=n.hasCustomAuthorizationHeader,n.lock?this.lock=n.lock:tr()&&(null===(t=null==globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=tD:this.lock=tq,this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?n.storage?this.storage=n.storage:ti()?this.storage=t$:(this.memoryStorage={},this.storage=tU(this.memoryStorage)):(this.memoryStorage={},this.storage=tU(this.memoryStorage)),tr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(r=this.broadcastChannel)||void 0===r||r.addEventListener("message",async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)})}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${eD}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))()),await this.initializePromise}async _initialize(){var e;try{let t=function(e){let t={},r=new URL(e);if(r.hash&&"#"===r.hash[0])try{new URLSearchParams(r.hash.substring(1)).forEac
6h((e,r)=>{t[r]=e})}catch(e){}return r.searchParams.forEach((e,r)=>{t[r]=e}),t}(window.location.href),r="none";if(this._isImplicitGrantCallback(t)?r="implicit":await this._isPKCECallback(t)&&(r="pkce"),tr()&&this.detectSessionInUrl&&"none"!==r){let{data:n,error:i}=await this._getSessionFromURL(t,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),eW(i)&&"AuthImplicitGrantRedirectError"===i.name){let t=null===(e=i.details)||void 0===e?void 0:e.code;if("identity_already_exists"===t||"identity_not_found"===t||"single_identity_not_deletable"===t)return{error:i}}return await this._removeSession(),{error:i}}let{session:s,redirectType:o}=n;return this._debug("#_initialize()","detected session in URL",s,"redirect type",o),await this._saveSession(s),setTimeout(async()=>{"recovery"===o?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){if(eW(e))return{error:e};return{error:new eK("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,r,n;try{let{data:i,error:s}=await tE(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(r=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==r?r:{},gotrue_meta_security:{captcha_token:null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.captchaToken}},xform:tO});if(s||!i)return{data:{user:null,session:null},error:s};let o=i.session,a=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",o)),{data:{user:a,session:o},error:null}}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async signUp(e){var t,r,n;try{let i;if("email"in e){let{email:r,password:n,options:s}=e,o=null,a=null;"pkce"===this.flowType&&([o,a]=await tm(this.storage,this.storageKey)),i=await tE(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==s?void 0:s.emailRedirectTo,body:{email:r,password:n,data:null!==(t=null==s?void 0:s.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken},code_challenge:o,code_challenge_method:a},xform:tO})}else if("phone"in e){let{phone:t,password:s,options:o}=e;i=await tE(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:s,data:null!==(r=null==o?void 0:o.data)&&void 0!==r?r:{},channel:null!==(n=null==o?void 0:o.channel)&&void 0!==n?n:"sms",gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken}},xform:tO})}else throw new eQ("You must provide either an email or phone number and a password");let{data:s,error:o}=i;if(o||!s)return{data:{user:null,session:null},error:o};let a=s.session,l=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithPassword(e){try{let t;if("email"in e){let{email:r,password:n,options:i}=e;t=await tE(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:r,password:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:tC})}else if("phone"in e){let{phone:r,password:n,options:i}=e;t=await tE(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:r,password:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:tC})}else throw new eQ("You must provide either an email or phone number and a password");let{data:r,error:n}=t;if(n)return{data:{user:null,session:null},error:n};if(!r||!r.session||!r.user)return{data:{user:null,session:null},error:new eZ};return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:n}}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOAuth(e){var t,r,n,i;return await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(n=e.options)||void 0===n?void 0:n.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){let{chain:t}=e;if("solana"===t)return await this.signInWithSolana(e);throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}async signInWithSolana(e){var t,r,n,i,s,o,a,l,c,u,d,h;let f,p;if("message"in e)f=e.message,p=e.signature;else{let d;let{chain:h,wallet:g,statement:m,options:y}=e;if(tr()){if("object"==typeof g)d=g;else{let e=window;if("solana"in e&&"object"==typeof e.solana&&("signIn"in e.solana&&"function"==typeof e.solana.signIn||"sign
6Message"in e.solana&&"function"==typeof e.solana.signMessage))d=e.solana;else throw Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}}else{if("object"!=typeof g||!(null==y?void 0:y.url))throw Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");d=g}let v=new URL(null!==(t=null==y?void 0:y.url)&&void 0!==t?t:window.location.href);if("signIn"in d&&d.signIn){let e;let t=await d.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},null==y?void 0:y.signInWithSolana),{version:"1",domain:v.host,uri:v.href}),m?{statement:m}:null));if(Array.isArray(t)&&t[0]&&"object"==typeof t[0])e=t[0];else if(t&&"object"==typeof t&&"signedMessage"in t&&"signature"in t)e=t;else throw Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in e&&"signature"in e&&("string"==typeof e.signedMessage||e.signedMessage instanceof Uint8Array)&&e.signature instanceof Uint8Array)f="string"==typeof e.signedMessage?e.signedMessage:new TextDecoder().decode(e.signedMessage),p=e.signature;else throw Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in d)||"function"!=typeof d.signMessage||!("publicKey"in d)||"object"!=typeof d||!d.publicKey||!("toBase58"in d.publicKey)||"function"!=typeof d.publicKey.toBase58)throw Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");f=[`${v.host} wants you to sign in with your Solana account:`,d.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1",`URI: ${v.href}`,`Issued At: ${null!==(n=null===(r=null==y?void 0:y.signInWithSolana)||void 0===r?void 0:r.issuedAt)&&void 0!==n?n:new Date().toISOString()}`,...(null===(i=null==y?void 0:y.signInWithSolana)||void 0===i?void 0:i.notBefore)?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...(null===(s=null==y?void 0:y.signInWithSolana)||void 0===s?void 0:s.expirationTime)?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...(null===(o=null==y?void 0:y.signInWithSolana)||void 0===o?void 0:o.chainId)?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...(null===(a=null==y?void 0:y.signInWithSolana)||void 0===a?void 0:a.nonce)?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...(null===(l=null==y?void 0:y.signInWithSolana)||void 0===l?void 0:l.requestId)?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...(null===(u=null===(c=null==y?void 0:y.signInWithSolana)||void 0===c?void 0:c.resources)||void 0===u?void 0:u.length)?["Resources",...y.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join("\n");let e=await d.signMessage(new TextEncoder().encode(f),"utf8");if(!e||!(e instanceof Uint8Array))throw Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=e}}try{let{data:t,error:r}=await tE(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:f,signature:function(e){let t=[],r={queue:0,queuedBits:0},n=e=>{t.push(e)};return e.forEach(e=>e7(e,r,n)),e7(null,r,n),t.join("")}(p)},(null===(d=e.options)||void 0===d?void 0:d.captchaToken)?{gotrue_meta_security:{captcha_token:null===(h=e.options)||void 0===h?void 0:h.captchaToken}}:null),xform:tO});if(r)throw r;if(!t||!t.session||!t.user)return{data:{user:null,session:null},error:new eZ};return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign({},t),error:r}}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async _exchangeCodeForSession(e){let t=await tl(this.storage,`${this.storageKey}-code-verifier`),[r,n]=(null!=t?t:"").split("/");try{let{data:t,error:i}=await tE(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:tO});if(await tc(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!t||!t.session||!t.user)return{data:{user:null,session:null,redirectType:null},error:new eZ};return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign(Object.assign({},t),{redirectType:null!=n?n:null}),error:i}}catch(e){if(eW(e))return{data:{user:null,session:null,redirectType:null},error:e};throw e}}async signInWithIdToken(e){try{let{options:t,provider:r,token:n,access_token:i,nonce:s}=e,{data:o,error:a}=await tE(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:n,access_token:i,nonce:s,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:tO});if(a)return{data:{user:null,session:null},error:a};if(!o||!o.session||!o.user)return{data:{user:null,session:null},error:new eZ};return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:o,error:a}}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOtp(e){var t,r,n,i,s;try{if("email"in e){let{email:n,options:i}=e,s=null,o=null;"pkce"===this.flowType&&([s,o]=await tm(this.storage,this.storageKey));let{error:a}=await tE(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:n,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{}
6,create_user:null===(r=null==i?void 0:i.shouldCreateUser)||void 0===r||r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:s,code_challenge_method:o},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:a}}if("phone"in e){let{phone:t,options:r}=e,{data:o,error:a}=await tE(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(n=null==r?void 0:r.data)&&void 0!==n?n:{},create_user:null===(i=null==r?void 0:r.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==r?void 0:r.captchaToken},channel:null!==(s=null==r?void 0:r.channel)&&void 0!==s?s:"sms"}});return{data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:a}}throw new eQ("You must provide either an email or phone number.")}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async verifyOtp(e){var t,r;try{let n,i;"options"in e&&(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(r=e.options)||void 0===r?void 0:r.captchaToken);let{data:s,error:o}=await tE(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:n,xform:tO});if(o)throw o;if(!s)throw Error("An error occurred on token verification.");let a=s.session,l=s.user;return(null==a?void 0:a.access_token)&&(await this._saveSession(a),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithSSO(e){var t,r,n;try{let i=null,s=null;return"pkce"===this.flowType&&([i,s]=await tm(this.storage,this.storageKey)),await tE(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==r?r:void 0}),(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:s}),headers:this.headers,xform:tA})}catch(e){if(eW(e))return{data:null,error:e};throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:r}=e;if(r)throw r;if(!t)throw new eX;let{error:n}=await tE(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:n}})}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{let t=`${this.url}/resend`;if("email"in e){let{email:r,type:n,options:i}=e,{error:s}=await tE(this.fetch,"POST",t,{headers:this.headers,body:{email:r,type:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:s}}if("phone"in e){let{phone:r,type:n,options:i}=e,{data:s,error:o}=await tE(this.fetch,"POST",t,{headers:this.headers,body:{phone:r,type:n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:null==s?void 0:s.message_id},error:o}}throw new eQ("You must provide either an email or phone number and a type")}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),r=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await r}catch(e){}})()),r}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{let t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",Error().stack);try{let e=null,t=await tl(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not val
6id"),await this._removeSession())),!e)return{data:{session:null},error:null};let r=!!e.expires_at&&1e3*e.expires_at-Date.now()<9e4;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.storage.isServer){let t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,r,n)=>(t||"user"!==r||(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t=!0,this.suppressGetSessionWarning=!0),Reflect.get(e,r,n))})}return{data:{session:e},error:null}}let{session:n,error:i}=await this._callRefreshToken(e.refresh_token);if(i)return{data:{session:null},error:i};return{data:{session:n},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{if(e)return await tE(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:tT});return await this._useSession(async e=>{var t,r,n;let{data:i,error:s}=e;if(s)throw s;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await tE(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(n=null===(r=i.session)||void 0===r?void 0:r.access_token)&&void 0!==n?n:void 0,xform:tT}):{data:{user:null},error:new eX}})}catch(e){if(eW(e))return eW(e)&&"AuthSessionMissingError"===e.name&&(await this._removeSession(),await tc(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:e};throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async r=>{let{data:n,error:i}=r;if(i)throw i;if(!n.session)throw new eX;let s=n.session,o=null,a=null;"pkce"===this.flowType&&null!=e.email&&([o,a]=await tm(this.storage,this.storageKey));let{data:l,error:c}=await tE(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:a}),jwt:s.access_token,xform:tT});if(c)throw c;return s.user=l.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(e){if(eW(e))return{data:{user:null},error:e};throw e}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new eX;let t=Date.now()/1e3,r=t,n=!0,i=null,{payload:s}=td(e.access_token);if(s.exp&&(n=(r=s.exp)<=t),n){let{session:t,error:r}=await this._callRefreshToken(e.refresh_token);if(r)return{data:{user:null,session:null},error:r};if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:n,error:s}=await this._getUser(e.access_token);if(s)throw s;i={access_token:e.access_token,refresh_token:e.refresh_token,user:n.user,token_type:"bearer",expires_in:r-t,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(e){if(eW(e))return{data:{session:null,user:null},error:e};throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{var r;if(!e){let{data:n,error:i}=t;if(i)throw i;e=null!==(r=n.session)&&void 0!==r?r:void 0}if(!(null==e?void 0:e.refresh_token))throw new eX;let{session:n,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:n?{data:{user:n.user,session:n},error:null}:{data:{user:null,session:null},error:null}})}catch(e){if(eW(e))return{data:{user:null,session:null},error:e};throw e}}async _getSessionFromURL(e,t){try{if(!tr())throw new e0("No browser detected.");
6if(e.error||e.error_description||e.error_code)throw new e0(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new e1("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new e0("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new e1("No code detected.");let{data:t,error:r}=await this._exchangeCodeForSession(e.code);if(r)throw r;let n=new URL(window.location.href);return n.searchParams.delete("code"),window.history.replaceState(window.history.state,"",n.toString()),{data:{session:t.session,redirectType:null},error:null}}let{provider_token:r,provider_refresh_token:n,access_token:i,refresh_token:s,expires_in:o,expires_at:a,token_type:l}=e;if(!i||!o||!s||!l)throw new e0("No session defined in URL");let c=Math.round(Date.now()/1e3),u=parseInt(o),d=c+u;a&&(d=parseInt(a));let h=d-c;1e3*h<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${u}s`);let f=d-u;c-f>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",f,d,c):c-f<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",f,d,c);let{data:p,error:g}=await this._getUser(i);if(g)throw g;let m={provider_token:r,provider_refresh_token:n,access_token:i,expires_in:u,expires_at:d,refresh_token:s,token_type:l,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:m,redirectType:e.type},error:null}}catch(e){if(eW(e))return{data:{session:null,redirectType:null},error:e};throw e}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){let t=await tl(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async t=>{var r;let{data:n,error:i}=t;if(i)return{error:i};let s=null===(r=n.session)||void 0===r?void 0:r.access_token;if(s){let{error:t}=await this.admin.signOut(s,e);if(t&&!(eW(t)&&"AuthApiError"===t.name&&(404===t.status||401===t.status||403===t.status)))return{error:t}}return"others"!==e&&(await this._removeSession(),await tc(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){let t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),r={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,r),(async()=>{await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async t=>{var r,n;try{let{data:{session:n},error:i}=t;if(i)throw i;await (null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",n)),this._debug("INITIAL_SESSION","callback id",e,"session",n)}catch(t){await (null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),console.error(t)}})}async resetPasswordForEmail(e,t={}){let r=null,n=null;"pkce"===this.flowType&&([r,n]=await tm(this.storage,this.storageKey,!0));try{return await tE(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:n,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(eW(e))return{data:null,error:e};throw e}}async getUserIdentities(){var e;try{let{data:t,error:r}=await this.getUser();if(r)throw r;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(e){if(eW(e))return{data:null,error:e};throw e}}async linkIdentity(e){var t;try{let{data:r,error:n}=await this._useSession(async t=>{var r,n,i,s,o;let{data:a,error:l}=t;if(l)throw l;let c=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(r=e.options)||void 0===r?void 0:r.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await tE(this.fetch,"GET",c,{headers:this.headers,jwt:null!==(o=null===(s=a.session)||void 0===s?void 0:s.access_token)&&void 0!==o?o:void 0})});if(n)throw n;return!tr()||(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)||window.location.assign(null==r?void 0:r.url),{data:{provider:e.provider,url:null==r?void 0:r.url},error:null}}catch(t){if(eW(t))return{data:{provider:e.provider,url:null},error:t};throw t}}async unlinkIdentity(e){try{return await this._useSession(async t=>{var r,n;let{data:i,error:s}=t;if(s)throw s;
6return await tE(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(n=null===(r=i.session)||void 0===r?void 0:r.access_token)&&void 0!==n?n:void 0})})}catch(e){if(eW(e))return{data:null,error:e};throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{var r,n;let i=Date.now();return await (r=async r=>(r>0&&await th(200*Math.pow(2,r-1)),this._debug(t,"refreshing attempt",r),await tE(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:tO})),n=(e,t)=>t&&e5(t)&&Date.now()+200*Math.pow(2,e)-i<3e4,new Promise((e,t)=>{(async()=>{for(let i=0;i<1/0;i++)try{let t=await r(i);if(!n(i,null,t)){e(t);return}}catch(e){if(!n(i,e)){t(e);return}}})()}))}catch(e){if(this._debug(t,"error",e),eW(e))return{data:{session:null,user:null},error:e};throw e}finally{this._debug(t,"end")}}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){let r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",r),tr()&&!t.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e;let t="#_recoverAndRefresh()";this._debug(t,"begin");try{let r=await tl(this.storage,this.storageKey);if(this._debug(t,"session from storage",r),!this._isValidSession(r)){this._debug(t,"session is not valid"),null!==r&&await this._removeSession();return}let n=(null!==(e=r.expires_at)&&void 0!==e?e:1/0)*1e3-Date.now()<9e4;if(this._debug(t,`session has${n?"":" not"} expired with margin of 90000s`),n){if(this.autoRefreshToken&&r.refresh_token){let{error:e}=await this._callRefreshToken(r.refresh_token);e&&(console.error(e),e5(e)||(this._debug(t,"refresh failed with a non-retryable error, removing the session",e),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(e){this._debug(t,"error",e),console.error(e);return}finally{this._debug(t,"end")}}async _callRefreshToken(e){var t,r;if(!e)throw new eX;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let n=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{this.refreshingDeferred=new tu;let{data:t,error:r}=await this._refreshAccessToken(e);if(r)throw r;if(!t.session)throw new eX;await this._saveSession(t.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);let n={session:t.session,error:null};return this.refreshingDeferred.resolve(n),n}catch(e){if(this._debug(n,"error",e),eW(e)){let r={session:null,error:e};return e5(e)||await this._removeSession(),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(r),r}throw null===(r=this.refreshingDeferred)||void 0===r||r.reject(e),e}finally{this.refreshingDeferred=null,this._debug(n,"end")}}async _notifyAllSubscribers(e,t,r=!0){let n=`#_notifyAllSubscribers(${e})`;this._debug(n,"begin",t,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:t});let n=[],i=Array.from(this.stateChangeEmitters.values()).map(async r=>{try{await r.callback(e,t)}catch(e){n.push(e)}});if(await Promise.all(i),n.length>0){for(let e=0;e<n.length;e+=1)console.error(n[e]);throw n[0]}}finally{this._debug(n,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await ta(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await tc(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&tr()&&(null==window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(e){console.error("removing visibilitychange callback failed",e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");let e=setInterval(()=>this._autoRefreshTokenTick(),3e4);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:r}}=t;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}let n=Math.floor((1e3*r.expires_at-e)/3e4);this._debug("#_autoRefreshTokenTick()",`access token expires in ${n} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),n<=3&&await this._callRefreshToken(r.refresh_token)})}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof tB)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!tr()||!(null==window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null==window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(
6await this.initializePromise,await this._acquireLock(-1,async()=>{if("visible"!==document.visibilityState){this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,r){let n=[`provider=${encodeURIComponent(t)}`];if((null==r?void 0:r.redirectTo)&&n.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),(null==r?void 0:r.scopes)&&n.push(`scopes=${encodeURIComponent(r.scopes)}`),"pkce"===this.flowType){let[e,t]=await tm(this.storage,this.storageKey),r=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});n.push(r.toString())}if(null==r?void 0:r.queryParams){let e=new URLSearchParams(r.queryParams);n.push(e.toString())}return(null==r?void 0:r.skipBrowserRedirect)&&n.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${n.join("&")}`}async _unenroll(e){try{return await this._useSession(async t=>{var r;let{data:n,error:i}=t;return i?{data:null,error:i}:await tE(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token})})}catch(e){if(eW(e))return{data:null,error:e};throw e}}async _enroll(e){try{return await this._useSession(async t=>{var r,n;let{data:i,error:s}=t;if(s)return{data:null,error:s};let o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:{issuer:e.issuer}),{data:a,error:l}=await tE(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:null===(r=null==i?void 0:i.session)||void 0===r?void 0:r.access_token});return l?{data:null,error:l}:("totp"===e.factorType&&(null===(n=null==a?void 0:a.totp)||void 0===n?void 0:n.qr_code)&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})})}catch(e){if(eW(e))return{data:null,error:e};throw e}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var r;let{data:n,error:i}=t;if(i)return{data:null,error:i};let{data:s,error:o}=await tE(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:o})})}catch(e){if(eW(e))return{data:null,error:e};throw e}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async t=>{var r;let{data:n,error:i}=t;return i?{data:null,error:i}:await tE(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:null===(r=null==n?void 0:n.session)||void 0===r?void 0:r.access_token})})}catch(e){if(eW(e))return{data:null,error:e};throw e}})}async _challengeAndVerify(e){let{data:t,error:r}=await this._challenge({factorId:e.factorId});return r?{data:null,error:r}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let r=(null==e?void 0:e.factors)||[],n=r.filter(e=>"totp"===e.factor_type&&"verified"===e.status),i=r.filter(e=>"phone"===e.factor_type&&"verified"===e.status);return{data:{all:r,totp:n,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var t,r;let{data:{session:n},error:i}=e;if(i)return{data:null,error:i};if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:s}=td(n.access_token),o=null;s.aal&&(o=s.aal);let a=o;return(null!==(r=null===(t=n.user.factors)||void 0===t?void 0:t.filter(e=>"verified"===e.status))&&void 0!==r?r:[]).length>0&&(a="aal2"),{data:{currentLevel:o,nextLevel:a,currentAuthenticationMethods:s.amr||[]},error:null}}))}async fetchJwk(e,t={keys:[]}){let r=t.keys.find(t=>t.kid===e);if(r||(r=this.jwks.keys.find(t=>t.kid===e))&&this.jwks_cached_at+6e5>Date.now())return r;let{data:n,error:i}=await tE(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;if(!n.keys||0===n.keys.length)throw new e4("JWKS is empty");if(this.jwks=n,this.jwks_cached_at=Date.now(),!(r=n.keys.find(t=>t.kid===e)))throw new e4("No matching signing key found in JWKS");return r}async getClaims(e,t={keys:[]}){try{let r=e;if(!r){let{data:e,error:t}
6=await this.getSession();if(t||!e.session)return{data:null,error:t};r=e.session.access_token}let{header:n,payload:i,signature:s,raw:{header:o,payload:a}}=td(r);if(!function(e){if(!e)throw Error("Missing exp claim");if(e<=Math.floor(Date.now()/1e3))throw Error("JWT has expired")}(i.exp),!n.kid||"HS256"===n.alg||!("crypto"in globalThis&&"subtle"in globalThis.crypto)){let{error:e}=await this.getUser(r);if(e)throw e;return{data:{claims:i,header:n,signature:s},error:null}}let l=function(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw Error("Invalid alg claim")}}(n.alg),c=await this.fetchJwk(n.kid,t),u=await crypto.subtle.importKey("jwk",c,l,!0,["verify"]);if(!await crypto.subtle.verify(l,u,s,function(e){let t=[];return!function(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){let t=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|t)+65536,r+=1}!function(e,t){if(e<=127){t(e);return}if(e<=2047){t(192|e>>6),t(128|63&e);return}if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|63&e);return}if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|63&e);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}(n,t)}}(e,e=>t.push(e)),new Uint8Array(t)}(`${o}.${a}`)))throw new e4("Invalid JWT signature");return{data:{claims:i,header:n,signature:s},error:null}}catch(e){if(eW(e))return{data:null,error:e};throw e}}}tF.nextInstanceID=0;var tJ=tF;class tV extends tJ{constructor(e){super(e)}}class tW{constructor(e,t,r){var n,i,s;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw Error("supabaseUrl is required.");if(!t)throw Error("supabaseKey is required.");let o=new URL(e.endsWith("/")?e:e+"/");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);let a=`sb-${o.hostname.split(".")[0]}-auth-token`,l=function(e,t){var r,n;let{db:i,auth:s,realtime:o,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,h={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},c),s),realtime:Object.assign(Object.assign({},u),o),global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},null!==(r=null==d?void 0:d.headers)&&void 0!==r?r:{}),null!==(n=null==a?void 0:a.headers)&&void 0!==n?n:{})}),accessToken:()=>{var e,t,r,n;return e=this,t=void 0,n=function*(){return""},new(r=void 0,r=Promise)(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})}};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}(null!=r?r:{},{db:eN,realtime:e$,auth:Object.assign(Object.assign({},eL),{storageKey:a}),global:eR});this.storageKey=null!==(n=l.auth.storageKey)&&void 0!==n?n:"",this.headers=null!==(i=l.global.headers)&&void 0!==i?i:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(null!==(s=l.auth)&&void 0!==s?s:{},this.headers,l.global.fetch),this.fetch=ez(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.rest=new p(new URL("rest/v1",o).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),l.accessToken||this._listenForAuthEvents()}get functions(){return new f(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}get storage(){return new eI(this.storageUrl.href,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},r={}){return this.rest.rpc(e,t,r)}
6channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t,r,n,i,s;return r=this,n=void 0,i=void 0,s=function*(){if(this.accessToken)return yield this.accessToken();let{data:r}=yield this.auth.getSession();return null!==(t=null===(e=r.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null},new(i||(i=Promise))(function(e,t){function o(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(o,a)}l((s=s.apply(r,n||[])).next())})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,storageKey:i,flowType:s,lock:o,debug:a},l,c){let u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new tV({url:this.authUrl.href,headers:Object.assign(Object.assign({},u),l),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,flowType:s,lock:o,debug:a,fetch:c,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new eo(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)})}_handleTokenChanged(e,t,r){("TOKEN_REFRESHED"===e||"SIGNED_IN"===e)&&this.changedAccessToken!==r?this.changedAccessToken=r:"SIGNED_OUT"===e&&(this.realtime.setAuth(),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0)}}let tH=(e,t,r)=>new tW(e,t,r);var tK=Object.create,tY=Object.defineProperty,tX=Object.getOwnPropertyDescriptor,tZ=Object.getOwnPropertyNames,tQ=Object.getPrototypeOf,t0=Object.prototype.hasOwnProperty,t1=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of tZ(t))t0.call(e,i)||i===r||tY(e,i,{get:()=>t[i],enumerable:!(n=tX(t,i))||n.enumerable});return e},t2=(e,t,r)=>(r=null!=e?tK(tQ(e)):{},t1(!t&&e&&e.__esModule?r:tY(r,"default",{value:e,enumerable:!0}),e)),t5=(n={"../../node_modules/.pnpm/[email protected]/node_modules/cookie/index.js"(e){e.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var r={},i=(t||{}).decode||n,s=0;s<e.length;){var o=e.indexOf("=",s);if(-1===o)break;var a=e.indexOf(";",s);if(-1===a)a=e.length;else if(a<o){s=e.lastIndexOf(";",o-1)+1;continue}var l=e.slice(s,o).trim();if(void 0===r[l]){var c=e.slice(o+1,a).trim();34===c.charCodeAt(0)&&(c=c.slice(1,-1)),r[l]=function(e,t){try{return t(e)}catch(t){return e}}(c,i)}s=a+1}return r},e.serialize=function(e,n,s){var o=s||{},a=o.encode||i;if("function"!=typeof a)throw TypeError("option encode is invalid");if(!r.test(e))throw TypeError("argument name is invalid");var l=a(n);if(l&&!r.test(l))throw TypeError("argument val is invalid");var c=e+"="+l;if(null!=o.maxAge){var u=o.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(u)}if(o.domain){if(!r.test(o.domain))throw TypeError("option domain is invalid");c+="; Domain="+o.domain}if(o.path){if(!r.test(o.path))throw TypeError("option path is invalid");c+="; Path="+o.path}if(o.expires){var d=o.expires;if("[object Date]"!==t.call(d)&&!(d instanceof Date)||isNaN(d.valueOf()))throw TypeError("option expires is invali
6d");c+="; Expires="+d.toUTCString()}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.priority)switch("string"==typeof o.priority?o.priority.toLowerCase():o.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw TypeError("option priority is invalid")}if(o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c};var t=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n(e){return -1!==e.indexOf("%")?decodeURIComponent(e):e}function i(e){return encodeURIComponent(e)}}},function(){return i||(0,n[tZ(n)[0]])((i={exports:{}}).exports,i),i.exports}),t6=t2(t5()),t4=t2(t5());function t3(e){if(!e)return null;try{let t=JSON.parse(e);if(!t)return null;if("Object"===t.constructor.name)return t;if("Array"!==t.constructor.name)throw Error(`Unexpected format: ${t.constructor.name}`);let[r,n,i]=t[0].split("."),s=a(n),o=new TextDecoder,{exp:l,sub:c,...u}=JSON.parse(o.decode(s));return{expires_at:l,expires_in:l-Math.round(Date.now()/1e3),token_type:"bearer",access_token:t[0],refresh_token:t[1],provider_token:t[2],provider_refresh_token:t[3],user:{id:c,factors:t[4],...u}}}catch(e){return console.warn("Failed to parse cookie string:",e),null}}function t8(e){var t;return JSON.stringify([e.access_token,e.refresh_token,e.provider_token,e.provider_refresh_token,(null==(t=e.user)?void 0:t.factors)??null])}function t9(){return"undefined"!=typeof window&&void 0!==window.document}var t7={path:"/",sameSite:"lax",maxAge:31536e6},re=RegExp(".{1,3180}","g"),rt=class{constructor(e){this.cookieOptions={...t7,...e,maxAge:t7.maxAge}}getItem(e){let t=this.getCookie(e);if(e.endsWith("-code-verifier")&&t)return t;if(t)return JSON.stringify(t3(t));let r=function(e,t=()=>null){let r=[];for(let n=0;;n++){let i=t(`${e}.${n}`);if(!i)break;r.push(i)}return r.length?r.join(""):null}(e,e=>this.getCookie(e));return null!==r?JSON.stringify(t3(r)):null}setItem(e,t){if(e.endsWith("-code-verifier")){this.setCookie(e,t);return}(function(e,t,r){if(1===Math.ceil(t.length/((void 0)??3180)))return[{name:e,value:t}];let n=[],i=t.match(re);return null==i||i.forEach((t,r)=>{let i=`${e}.${r}`;n.push({name:i,value:t})}),n})(e,t8(JSON.parse(t))).forEach(e=>{this.setCookie(e.name,e.value)})}removeItem(e){this._deleteSingleCookie(e),this._deleteChunkedCookies(e)}_deleteSingleCookie(e){this.getCookie(e)&&this.deleteCookie(e)}_deleteChunkedCookies(e,t=0){for(let r=t;;r++){let t=`${e}.${r}`;if(void 0===this.getCookie(t))break;this.deleteCookie(t)}}},rr=class extends rt{constructor(e){super(e)}getCookie(e){return t9()?(0,t6.parse)(document.cookie)[e]:null}setCookie(e,t){if(!t9())return null;document.cookie=(0,t6.serialize)(e,t,{...this.cookieOptions,httpOnly:!1})}deleteCookie(e){if(!t9())return null;document.cookie=(0,t6.serialize)(e,"",{...this.cookieOptions,maxAge:0,httpOnly:!1})}};function rn(e,t,r){var n;let i=t9();return tH(e,t,{...r,auth:{flowType:"pkce",autoRefreshToken:i,detectSessionInUrl:i,persistSession:!0,storage:r.auth.storage,...(null==(n=r.auth)?void 0:n.storageKey)?{storageKey:r.auth.storageKey}:{}}})}var ri=t4.parse,rs=t4.serialize},6739:function(e,t,r){"use strict";function n(){return"undefined"!=typeof window}function i(){return(n()?window.vam:"production")||"production"}function s(){return"production"===i()}function o(e,t,r){var o,a;if(!n()){let e="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(s())console.warn(e);else throw Error(e);return}if(!t){null==(o=window.va)||o.call(window,"event",{name:e,options:r});return}try{let n=function(e,t){if(!e)return;let r=e,n=[];for(let[i,s]of Object.entries(e))"object"==typeof s&&null!==s&&(t.strip?r=function(e,{[e]:t,...r}){return r}(i,r):n.push(i));if(n.length>0&&!t.strip)throw Error(`The following properties are not valid: ${n.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return r}(t,{strip:s()});null==(a=window.va)||a.call(window,"event",{name:e,data:n,options:r})}catch(e){e instanceof Error&&"development"===i()&&console.error(e)}}r.d(t,{j:function(){return o}})},90512:function(e,t,r){"use strict";function n(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n)}return i}(e))&&(n&&(n+=" "),n+=t);return n}r.d(t,{W:function(){return n}})},64712:function(e,t,r){"use strict";r.d(t,{Am:function(){return v},x7:function(){return k}});var n=r(67294),i=r(73935);let s=e=>{switch(e){case"success":return l;case"info":return u;case"warning":return c;case"error":return d;default:return null}},o=Array(12).fill(0),a=({visible:e,className:t})=>n.createElement("div",{className:["sonner-loading-wrapper",t].filter(
6Boolean).join(" "),"data-visible":e},n.createElement("div",{className:"sonner-spinner"},o.map((e,t)=>n.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),l=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),c=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),u=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),d=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},n.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),h=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},n.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),f=()=>{let[e,t]=n.useState(document.hidden);return n.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e},p=1;class g{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,i="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:p++,s=this.toasts.find(e=>e.id===i),o=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:r}),{...t,...e,id:i,dismissible:o,title:r}):t):this.addToast({title:r,...n,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
6this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{let r,i;if(!t)return;void 0!==t.loading&&(i=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));let s=Promise.resolve(e instanceof Function?e():e),o=void 0!==i,a=s.then(async e=>{if(r=["resolve",e],n.isValidElement(e))o=!1,this.create({id:i,type:"default",message:e});else if(y(e)&&!e.ok){o=!1;let r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,s="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,a="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:i,type:"error",description:s,...a})}else if(e instanceof Error){o=!1;let r="function"==typeof t.error?await t.error(e):t.error,s="function"==typeof t.description?await t.description(e):t.description,a="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:i,type:"error",description:s,...a})}else if(void 0!==t.success){o=!1;let r="function"==typeof t.success?await t.success(e):t.success,s="function"==typeof t.description?await t.description(e):t.description,a="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:i,type:"success",description:s,...a})}}).catch(async e=>{if(r=["reject",e],void 0!==t.error){o=!1;let r="function"==typeof t.error?await t.error(e):t.error,s="function"==typeof t.description?await t.description(e):t.description,a="object"!=typeof r||n.isValidElement(r)?{message:r}:r;this.create({id:i,type:"error",description:s,...a})}}).finally(()=>{o&&(this.dismiss(i),i=void 0),null==t.finally||t.finally.call(t)}),l=()=>new Promise((e,t)=>a.then(()=>"reject"===r[0]?t(r[1]):e(r[1])).catch(t));return"string"!=typeof i&&"number"!=typeof i?{unwrap:l}:Object.assign(i,{unwrap:l})},this.custom=(e,t)=>{let r=(null==t?void 0:t.id)||p++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}let m=new g,y=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,v=Object.assign((e,t)=>{let r=(null==t?void 0:t.id)||p++;return m.addToast({title:e,...t,id:r}),r},{success:m.success,info:m.info,warning:m.warning,error:m.error,custom:m.custom,message:m.message,promise:m.promise,dismiss:m.dismiss,loading:m.loading},{getHistory:()=>m.toasts,getToasts:()=>m.getActiveToasts()});function b(e){return void 0!==e.label}function w(...e){return e.filter(Boolean).join(" ")}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}
vendor: 14,864 bytes, line 6
6("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
6let _=e=>{var t,r,i,o,l,c,u,d,p,g,m,y,v;let{invert:_,toast:x,unstyled:k,interacting:j,setHeights:E,visibleToasts:S,heights:O,index:C,toasts:T,expanded:A,removeToast:I,defaultRichColors:P,closeButton:R,style:N,cancelButtonStyle:L,actionButtonStyle:$,className:U="",descriptionClassName:M="",duration:B,position:z,gap:D,expandByDefault:G,classNames:q,icons:F,closeButtonAriaLabel:J="Close toast"}=e,[V,W]=n.useState(null),[H,K]=n.useState(null),[Y,X]=n.useState(!1),[Z,Q]=n.useState(!1),[ee,et]=n.useState(!1),[er,en]=n.useState(!1),[ei,es]=n.useState(!1),[eo,ea]=n.useState(0),[el,ec]=n.useState(0),eu=n.useRef(x.duration||B||4e3),ed=n.useRef(null),eh=n.useRef(null),ef=0===C,ep=C+1<=S,eg=x.type,em=!1!==x.dismissible,ey=x.className||"",ev=x.descriptionClassName||"",eb=n.useMemo(()=>O.findIndex(e=>e.toastId===x.id)||0,[O,x.id]),ew=n.useMemo(()=>{var e;return null!=(e=x.closeButton)?e:R},[x.closeButton,R]),e_=n.useMemo(()=>x.duration||B||4e3,[x.duration,B]),ex=n.useRef(0),ek=n.useRef(0),ej=n.useRef(0),eE=n.useRef(null),[eS,eO]=z.split("-"),eC=n.useMemo(()=>O.reduce((e,t,r)=>r>=eb?e:e+t.height,0),[O,eb]),eT=f(),eA=x.invert||_,eI="loading"===eg;ek.current=n.useMemo(()=>eb*D+eC,[eb,eC]),n.useEffect(()=>{eu.current=e_},[e_]),n.useEffect(()=>{X(!0)},[]),n.useEffect(()=>{let e=eh.current;if(e){let t=e.getBoundingClientRect().height;return ec(t),E(e=>[{toastId:x.id,height:t,position:x.position},...e]),()=>E(e=>e.filter(e=>e.toastId!==x.id))}},[E,x.id]),n.useLayoutEffect(()=>{if(!Y)return;let e=eh.current,t=e.style.height;e.style.height="auto";let r=e.getBoundingClientRect().height;e.style.height=t,ec(r),E(e=>e.find(e=>e.toastId===x.id)?e.map(e=>e.toastId===x.id?{...e,height:r}:e):[{toastId:x.id,height:r,position:x.position},...e])},[Y,x.title,x.description,E,x.id,x.jsx,x.action,x.cancel]);let eP=n.useCallback(()=>{Q(!0),ea(ek.current),E(e=>e.filter(e=>e.toastId!==x.id)),setTimeout(()=>{I(x)},200)},[x,I,E,ek]);n.useEffect(()=>{let e;if((!x.promise||"loading"!==eg)&&x.duration!==1/0&&"loading"!==x.type)return A||j||eT?(()=>{if(ej.current<ex.current){let e=new Date().getTime()-ex.current;eu.current=eu.current-e}ej.current=new Date().getTime()})():eu.current!==1/0&&(ex.current=new Date().getTime(),e=setTimeout(()=>{null==x.onAutoClose||x.onAutoClose.call(x,x),eP()},eu.current)),()=>clearTimeout(e)},[A,j,x,eg,eT,eP]),n.useEffect(()=>{x.delete&&(eP(),null==x.onDismiss||x.onDismiss.call(x,x))},[eP,x.delete]);let eR=x.icon||(null==F?void 0:F[eg])||s(eg);return n.createElement("li",{tabIndex:0,ref:eh,className:w(U,ey,null==q?void 0:q.toast,null==x?void 0:null==(t=x.classNames)?void 0:t.toast,null==q?void 0:q.default,null==q?void 0:q[eg],null==x?void 0:null==(r=x.classNames)?void 0:r[eg]),"data-sonner-toast":"","data-rich-colors":null!=(g=x.richColors)?g:P,"data-styled":!(x.jsx||x.unstyled||k),"data-mounted":Y,"data-promise":!!x.promise,"data-swiped":ei,"data-removed":Z,"data-visible":ep,"data-y-position":eS,"data-x-position":eO,"data-index":C,"data-front":ef,"data-swiping":ee,"data-dismissible":em,"data-type":eg,"data-invert":eA,"data-swipe-out":er,"data-swipe-direction":H,"data-expanded":!!(A||G&&Y),"data-testid":x.testId,style:{"--index":C,"--toasts-before":C,"--z-index":T.length-C,"--offset":`${Z?eo:ek.current}px`,"--initial-height":G?"auto":`${el}px`,...N,...x.style},onDragEnd:()=>{et(!1),W(null),eE.current=null},onPointerDown:e=>
6{2!==e.button&&!eI&&em&&(ed.current=new Date,ea(ek.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(et(!0),eE.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,r,n,i;if(er||!em)return;eE.current=null;let s=Number((null==(e=eh.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=eh.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=new Date().getTime()-(null==(r=ed.current)?void 0:r.getTime()),l="x"===V?s:o;if(Math.abs(l)>=45||Math.abs(l)/a>.11){ea(ek.current),null==x.onDismiss||x.onDismiss.call(x,x),"x"===V?K(s>0?"right":"left"):K(o>0?"down":"up"),eP(),en(!0);return}null==(n=eh.current)||n.style.setProperty("--swipe-amount-x","0px"),null==(i=eh.current)||i.style.setProperty("--swipe-amount-y","0px"),es(!1),et(!1),W(null)},onPointerMove:t=>{var r,n,i,s;if(!eE.current||!em||(null==(r=window.getSelection())?void 0:r.toString().length)>0)return;let o=t.clientY-eE.current.y,a=t.clientX-eE.current.x,l=null!=(s=e.swipeDirections)?s:function(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}(z);!V&&(Math.abs(a)>1||Math.abs(o)>1)&&W(Math.abs(a)>Math.abs(o)?"x":"y");let c={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if("y"===V){if(l.includes("top")||l.includes("bottom")){if(l.includes("top")&&o<0||l.includes("bottom")&&o>0)c.y=o;else{let e=o*u(o);c.y=Math.abs(e)<Math.abs(o)?e:o}}}else if("x"===V&&(l.includes("left")||l.includes("right"))){if(l.includes("left")&&a<0||l.includes("right")&&a>0)c.x=a;else{let e=a*u(a);c.x=Math.abs(e)<Math.abs(a)?e:a}}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&es(!0),null==(n=eh.current)||n.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(i=eh.current)||i.style.setProperty("--swipe-amount-y",`${c.y}px`)}},ew&&!x.jsx&&"loading"!==eg?n.createElement("button",{"aria-label":J,"data-disabled":eI,"data-close-button":!0,onClick:eI||!em?()=>{}:()=>{eP(),null==x.onDismiss||x.onDismiss.call(x,x)},className:w(null==q?void 0:q.closeButton,null==x?void 0:null==(i=x.classNames)?void 0:i.closeButton)},null!=(m=null==F?void 0:F.close)?m:h):null,(eg||x.icon||x.promise)&&null!==x.icon&&((null==F?void 0:F[eg])!==null||x.icon)?n.createElement("div",{"data-icon":"",className:w(null==q?void 0:q.icon,null==x?void 0:null==(o=x.classNames)?void 0:o.icon)},x.promise||"loading"===x.type&&!x.icon?x.icon||((null==F?void 0:F.loading)?n.createElement("div",{className:w(null==q?void 0:q.loader,null==x?void 0:null==(v=x.classNames)?void 0:v.loader,"sonner-loader"),"data-visible":"loading"===eg},F.loading):n.createElement(a,{className:w(null==q?void 0:q.loader,null==x?void 0:null==(y=x.classNames)?void 0:y.loader),visible:"loading"===eg})):null,"loading"!==x.type?eR:null):null,n.createElement("div",{"data-content":"",className:w(null==q?void 0:q.content,null==x?void 0:null==(l=x.classNames)?void 0:l.content)},n.createElement("div",{"data-title":"",className:w(null==q?void 0:q.title,null==x?void 0:null==(c=x.classNames)?void 0:c.title)},x.jsx?x.jsx:"function"==typeof x.title?x.title():x.title),x.description?n.createElement("div",{"data-description":"",className:w(M,ev,null==q?void 0:q.description,null==x?void 0:null==(u=x.classNames)?void 0:u.description)},"function"==typeof x.description?x.description():x.description):null),n.isValidElement(x.cancel)?x.cancel:x.cancel&&b(x.cancel)?n.createElement("button",{"data-button":!0,"data-cancel":!0,style:x.cancelButtonStyle||L,onClick:e=>{b(x.cancel)&&em&&(null==x.cancel.onClick||x.cancel.onClick.call(x.cancel,e),eP())},className:w(null==q?void 0:q.cancelButton,null==x?void 0:null==(d=x.classNames)?void 0:d.cancelButton)},x.cancel.label):null,n.isValidElement(x.action)?x.action:x.action&&b(x.action)?n.createElement("button",{"data-button":!0,"data-action":!0,style:x.actionButtonStyle||$,onClick:e=>{b(x.action)&&(null==x.action.onClick||x.action.onClick.call(x.action,e),e.defaultPrevented||eP())},className:w(null==q?void 0:q.actionButton,null==x?void 0:null==(p=x.classNames)?void 0:p.actionButton)},x.action.label):null)};function x(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}let k=n.forwardRef(function(e,t){let{id:r,invert:s,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:d,mobileOffset:h,theme:f="light",richColors:p,duration:g,style:y,visibleToasts:v=3,toastOptions:b,dir:w=x(),gap:k=14,icons:j,containerAriaLabel:E="Notifications"}=e,[S,O]=n.useState([]),C=n.useMemo(()=>r?S.filter(e=>e.toasterId===r):S.filter(e=>!e.toasterId),[S,r]),T=n.useMemo(()=>Array.from(new Set([o].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,o]),[A,I]=n.useState([]),[P,R]=n.useState(!1),[N,L]=n.useState(!1),[$,U]=n.useState("system"!==f?f:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
6k":"light"),M=n.useRef(null),B=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=n.useRef(null),D=n.useRef(!1),G=n.useCallback(e=>{O(t=>{var r;return(null==(r=t.find(t=>t.id===e.id))?void 0:r.delete)||m.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return n.useEffect(()=>m.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{O(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{i.flushSync(()=>{O(t=>{let r=t.findIndex(t=>t.id===e.id);return -1!==r?[...t.slice(0,r),{...t[r],...e},...t.slice(r+1)]:[e,...t]})})})}),[S]),n.useEffect(()=>{if("system"!==f){U(f);return}if("system"===f&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),"undefined"==typeof window)return;let e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{e?U("dark"):U("light")})}catch(t){e.addListener(({matches:e})=>{try{e?U("dark"):U("light")}catch(e){console.error(e)}})}},[f]),n.useEffect(()=>{S.length<=1&&R(!1)},[S]),n.useEffect(()=>{let e=e=>{var t,r;a.every(t=>e[t]||e.code===t)&&(R(!0),null==(r=M.current)||r.focus()),"Escape"===e.code&&(document.activeElement===M.current||(null==(t=M.current)?void 0:t.contains(document.activeElement)))&&R(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),n.useEffect(()=>{if(M.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,D.current=!1)}},[M.current]),n.createElement("section",{ref:t,"aria-label":`${E} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((t,r)=>{var i;let[o,a]=t.split("-");return C.length?n.createElement("ol",{key:t,dir:"auto"===w?x():w,tabIndex:-1,ref:M,className:u,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":o,"data-x-position":a,style:{"--front-toast-height":`${(null==(i=A[0])?void 0:i.height)||0}px`,"--width":"356px","--gap":`${k}px`,...y,...function(e,t){let r={};return[e,t].forEach((e,t)=>{let n=1===t,i=n?"--mobile-offset":"--offset",s=n?"16px":"24px";function o(e){["top","right","bottom","left"].forEach(t=>{r[`${i}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?o(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?r[`${i}-${t}`]=s:r[`${i}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):o(s)}),r}(d,h)},onBlur:e=>{D.current&&!e.currentTarget.contains(e.relatedTarget)&&(D.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||D.current||(D.current=!0,z.current=e.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{N||R(!1)},onDragEnd:()=>R(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L(!0)},onPointerUp:()=>L(!1)},C.filter(e=>!e.position&&0===r||e.position===t).map((r,i)=>{var o,a;return n.createElement(_,{key:r.id,icons:j,index:i,toast:r,defaultRichColors:p,duration:null!=(o=null==b?void 0:b.duration)?o:g,className:null==b?void 0:b.className,descriptionClassName:null==b?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:null!=(a=null==b?void 0:b.closeButton)?a:c,interacting:N,position:t,style:null==b?void 0:b.style,unstyled:null==b?void 0:b.unstyled,classNames:null==b?void 0:b.classNames,cancelButtonStyle:null==b?void 0:b.cancelButtonStyle,actionButtonStyle:null==b?void 0:b.actionButtonStyle,closeButtonAriaLabel:null==b?void 0:b.closeButtonAriaLabel,removeToast:G,toasts:C.filter(e=>e.position==r.position),heights:A.filter(e=>e.position==r.position),setHeights:I,expandByDefault:l,gap:k,expanded:P,swipeDirections:e.swipeDirections})})):null}))})}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(43079)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.