claude-mux 0.9.2 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +23 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/BU5h8NYO.js → dist/web/client/_app/immutable/chunks/1A3AeVAA.js} +1 -1
- package/dist/web/client/_app/immutable/chunks/CTGl6QSA.js +3 -0
- package/{web/.svelte-kit/output/client/_app/immutable/chunks/DHeexKFx.js → dist/web/client/_app/immutable/chunks/C_m4I3tU.js} +1 -1
- package/dist/web/client/_app/immutable/chunks/{BB9TuzmK.js → ZheqT_LH.js} +1 -1
- package/dist/web/client/_app/immutable/entry/{app.B24VM-EE.js → app.CfbgvVK7.js} +2 -2
- package/dist/web/client/_app/immutable/entry/start.DZs6fkCj.js +1 -0
- package/dist/web/client/_app/immutable/nodes/{0.BWJ-EEUf.js → 0.Dsfwy1bM.js} +1 -1
- package/dist/web/client/_app/immutable/nodes/{1.DILU-70h.js → 1.B6xIIS11.js} +1 -1
- package/dist/web/client/_app/immutable/nodes/{2.ClTKvGQu.js → 2.DnQQqi6w.js} +1 -1
- package/dist/web/client/_app/immutable/nodes/{3.BqgdxZ4J.js → 3.B4yVZvTz.js} +1 -1
- package/dist/web/client/_app/version.json +1 -1
- package/dist/web/server/chunks/{0-CWPTrtx7.js → 0-BMNVXQEW.js} +6 -6
- package/dist/web/server/chunks/{0-CWPTrtx7.js.map → 0-BMNVXQEW.js.map} +1 -1
- package/dist/web/server/chunks/{1-BvD2TuDo.js → 1-C4iDSSKl.js} +3 -3
- package/dist/web/server/chunks/{1-BvD2TuDo.js.map → 1-C4iDSSKl.js.map} +1 -1
- package/dist/web/server/chunks/{2-dcOGLSIi.js → 2-CEQq-65q.js} +5 -5
- package/dist/web/server/chunks/{2-dcOGLSIi.js.map → 2-CEQq-65q.js.map} +1 -1
- package/dist/web/server/chunks/{3-OuXGZ-UL.js → 3-BZJs1a9Z.js} +5 -5
- package/dist/web/server/chunks/{3-OuXGZ-UL.js.map → 3-BZJs1a9Z.js.map} +1 -1
- package/dist/web/server/index.js +1 -1
- package/dist/web/server/index.js.map +1 -1
- package/dist/web/server/manifest.js +9 -9
- package/dist/web/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/update.ts +22 -1
- package/src/utils/version.ts +1 -1
- package/web/.svelte-kit/adapter-bun/chunks/internal.js +1 -1
- package/web/.svelte-kit/adapter-bun/manifest-full.js +1 -1
- package/web/.svelte-kit/adapter-bun/manifest.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/0.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/1.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/2.js +1 -1
- package/web/.svelte-kit/adapter-bun/nodes/3.js +1 -1
- package/web/.svelte-kit/generated/server/internal.js +1 -1
- package/web/.svelte-kit/output/client/.vite/manifest.json +48 -48
- package/{dist/web/client/_app/immutable/chunks/BU5h8NYO.js → web/.svelte-kit/output/client/_app/immutable/chunks/1A3AeVAA.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/CTGl6QSA.js +3 -0
- package/{dist/web/client/_app/immutable/chunks/DHeexKFx.js → web/.svelte-kit/output/client/_app/immutable/chunks/C_m4I3tU.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/{BB9TuzmK.js → ZheqT_LH.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/entry/{app.B24VM-EE.js → app.CfbgvVK7.js} +2 -2
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.DZs6fkCj.js +1 -0
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.BWJ-EEUf.js → 0.Dsfwy1bM.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{1.DILU-70h.js → 1.B6xIIS11.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.ClTKvGQu.js → 2.DnQQqi6w.js} +1 -1
- package/web/.svelte-kit/output/client/_app/immutable/nodes/{3.BqgdxZ4J.js → 3.B4yVZvTz.js} +1 -1
- package/web/.svelte-kit/output/client/_app/version.json +1 -1
- package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
- package/web/.svelte-kit/output/server/manifest-full.js +1 -1
- package/web/.svelte-kit/output/server/manifest.js +1 -1
- package/web/.svelte-kit/output/server/nodes/0.js +1 -1
- package/web/.svelte-kit/output/server/nodes/1.js +1 -1
- package/web/.svelte-kit/output/server/nodes/2.js +1 -1
- package/web/.svelte-kit/output/server/nodes/3.js +1 -1
- package/dist/web/client/_app/immutable/chunks/jAm107uH.js +0 -3
- package/dist/web/client/_app/immutable/entry/start.DcbBqC7C.js +0 -1
- package/web/.svelte-kit/output/client/_app/immutable/chunks/jAm107uH.js +0 -3
- package/web/.svelte-kit/output/client/_app/immutable/entry/start.DcbBqC7C.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA8GpC,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAwDlE;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAS7C"}
|
package/dist/commands/update.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { execSync, spawnSync } from "child_process";
|
|
3
3
|
import { setTimeout as delay } from "timers/promises";
|
|
4
|
+
import { existsSync } from "fs";
|
|
5
|
+
import { join } from "path";
|
|
6
|
+
import { homedir } from "os";
|
|
4
7
|
import { VERSION } from "../utils/version.js";
|
|
5
8
|
import { runSetup } from "../setup/index.js";
|
|
6
9
|
import { isPidAlive } from "../utils/pid.js";
|
|
7
10
|
import { DEFAULT_SERVER_PORT } from "../utils/paths.js";
|
|
11
|
+
const UNIT_PATH = join(homedir(), ".config", "systemd", "user", "claude-mux.service");
|
|
12
|
+
// SSH non-login shells often lack XDG_RUNTIME_DIR, which `systemctl --user`
|
|
13
|
+
// needs to reach the user manager. Set it ourselves when missing.
|
|
14
|
+
function ensureXdgRuntime() {
|
|
15
|
+
if (process.env.XDG_RUNTIME_DIR)
|
|
16
|
+
return;
|
|
17
|
+
const uid = typeof process.getuid === "function" ? process.getuid() : null;
|
|
18
|
+
if (uid !== null)
|
|
19
|
+
process.env.XDG_RUNTIME_DIR = `/run/user/${uid}`;
|
|
20
|
+
}
|
|
8
21
|
function getLatestVersion() {
|
|
9
22
|
try {
|
|
10
23
|
const out = execSync("npm view claude-mux version", {
|
|
@@ -19,12 +32,19 @@ function getLatestVersion() {
|
|
|
19
32
|
}
|
|
20
33
|
const SYSTEMD_UNIT = "claude-mux.service";
|
|
21
34
|
function isSystemdManaged() {
|
|
35
|
+
// Unit file present means `service install` was run on this host; that's
|
|
36
|
+
// the authoritative signal. is-active can return false negatives under
|
|
37
|
+
// SSH non-login where XDG_RUNTIME_DIR is unset.
|
|
38
|
+
if (existsSync(UNIT_PATH))
|
|
39
|
+
return true;
|
|
40
|
+
ensureXdgRuntime();
|
|
22
41
|
const r = spawnSync("systemctl", ["--user", "is-active", "--quiet", SYSTEMD_UNIT], {
|
|
23
42
|
stdio: ["pipe", "pipe", "pipe"],
|
|
24
43
|
});
|
|
25
44
|
return r.status === 0;
|
|
26
45
|
}
|
|
27
46
|
function systemctlUser(...args) {
|
|
47
|
+
ensureXdgRuntime();
|
|
28
48
|
const r = spawnSync("systemctl", ["--user", ...args], { stdio: "inherit" });
|
|
29
49
|
return r.status ?? 1;
|
|
30
50
|
}
|
|
@@ -70,9 +90,11 @@ async function stopProd(pid) {
|
|
|
70
90
|
}
|
|
71
91
|
function startProd() {
|
|
72
92
|
console.log(`Starting prod server on 127.0.0.1:${DEFAULT_SERVER_PORT}...`);
|
|
93
|
+
// POSIX-clean: with stdin/stdout/stderr redirected, `&` alone fully detaches.
|
|
94
|
+
// `disown` is bash-only and breaks under /bin/sh = dash (Debian/Ubuntu).
|
|
73
95
|
const result = spawnSync("sh", [
|
|
74
96
|
"-c",
|
|
75
|
-
`nohup claude-mux serve --port ${DEFAULT_SERVER_PORT} --host 127.0.0.1 > /tmp/claude-mux-prod.log 2>&1
|
|
97
|
+
`nohup claude-mux serve --port ${DEFAULT_SERVER_PORT} --host 127.0.0.1 < /dev/null > /tmp/claude-mux-prod.log 2>&1 &`,
|
|
76
98
|
], { stdio: "inherit" });
|
|
77
99
|
if (result.status !== 0) {
|
|
78
100
|
console.warn("Failed to relaunch prod server; start it manually.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,SAAS,gBAAgB;IACvB,IAAI,CAAC;QACH,MAAM,GAAG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,CAAC,CAAC;QACtB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/utils/version.d.ts
CHANGED
package/dist/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bn as r,a_ as t,am as i,bb as p}from"./BIuG5Qqu.js";import{L as a}from"./
|
|
1
|
+
import{bn as r,a_ as t,am as i,bb as p}from"./BIuG5Qqu.js";import{L as a}from"./C_m4I3tU.js";const s=a("claude-mux-preferences",{terminalTheming:!0,keepAwake:!1});class f{#e=r(t(s.load()));get prefs(){return i(this.#e)}set prefs(e){p(this.#e,e,!0)}get terminalTheming(){return this.prefs.terminalTheming}set terminalTheming(e){this.prefs.terminalTheming!==e&&(this.prefs.terminalTheming=e,s.save(this.prefs))}get keepAwake(){return this.prefs.keepAwake}set keepAwake(e){this.prefs.keepAwake!==e&&(this.prefs.keepAwake=e,s.save(this.prefs))}toggle(e){typeof this.prefs[e]=="boolean"&&(this.prefs[e]=!this.prefs[e],s.save(this.prefs))}}const o=new f;export{o as p};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{bB as Pe,aW as He,bn as P,am as x,bb as N,bt as ie,bi as It}from"./BIuG5Qqu.js";class me{constructor(t,r){this.status=t,typeof r=="string"?this.body={message:r}:r?this.body=r:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class xe{constructor(t,r){try{new Headers({location:r})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(r)}: this string contains characters that cannot be used in HTTP headers`)}this.status=t,this.location=r}}class Ne extends Error{constructor(t,r,n){super(n),this.status=t,this.text=r}}new URL("sveltekit-internal://");function Tt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Ut(e){return e.split("%25").map(decodeURI).join("%25")}function Lt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function ke({href:e}){return e.split("#")[0]}function Pt(e,t,r,n=!1){const o=new URL(e);Object.defineProperty(o,"searchParams",{value:new Proxy(o.searchParams,{get(a,c){if(c==="get"||c==="getAll"||c==="has")return(l,...f)=>(r(l),a[c](l,...f));t();const s=Reflect.get(a,c);return typeof s=="function"?s.bind(a):s}}),enumerable:!0,configurable:!0});const i=["href","pathname","search","toString","toJSON"];n&&i.push("hash");for(const a of i)Object.defineProperty(o,a,{get(){return t(),e[a]},enumerable:!0,configurable:!0});return o}function C(){}function xt(...e){let t=5381;for(const r of e)if(typeof r=="string"){let n=r.length;for(;n;)t=t*33^r.charCodeAt(--n)}else if(ArrayBuffer.isView(r)){const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);let o=n.length;for(;o;)t=t*33^n[--o]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;function Nt(e){const t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}const Ot=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&z.delete(Oe(e)),Ot(e,t));const z=new Map;function jt(e,t){const r=Oe(e,t),n=document.querySelector(r);if(n?.textContent){n.remove();let{body:o,...i}=JSON.parse(n.textContent);const a=n.getAttribute("data-ttl");return a&&z.set(r,{body:o,init:i,ttl:1e3*Number(a)}),n.getAttribute("data-b64")!==null&&(o=Nt(o)),Promise.resolve(new Response(o,i))}return window.fetch(e,t)}function Ct(e,t,r){if(z.size>0){const n=Oe(e,r),o=z.get(n);if(o){if(performance.now()<o.ttl&&["default","force-cache","only-if-cached",void 0].includes(r?.cache))return new Response(o.body,o.init);z.delete(n)}}return window.fetch(t,r)}function Oe(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const o=[];t.headers&&o.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&o.push(t.body),n+=`[data-hash="${xt(...o)}"]`}return n}const Dt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function $t(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Ft(e).map(n=>{const o=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(n);if(o)return t.push({name:o[1],matcher:o[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(n);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!n)return;const a=n.split(/\[(.+?)\](?!\])/);return"/"+a.map((s,l)=>{if(l%2){if(s.startsWith("x+"))return Ee(String.fromCharCode(parseInt(s.slice(2),16)));if(s.startsWith("u+"))return Ee(String.fromCharCode(...s.slice(2).split("-").map(_=>parseInt(_,16))));const f=Dt.exec(s),[,h,d,p,u]=f;return t.push({name:p,matcher:u,optional:!!h,rest:!!d,chained:d?l===1&&a[0]==="":!1}),d?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Ee(s)}).join("")}).join("")}/?$`),params:t}}function Bt(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Ft(e){return e.slice(1).split("/").filter(Bt)}function Mt(e,t,r){const n={},o=e.slice(1),i=o.filter(c=>c!==void 0);let a=0;for(let c=0;c<t.length;c+=1){const s=t[c];let l=o[c-a];if(s.chained&&s.rest&&a&&(l=o.slice(c-a,c+1).filter(f=>f).join("/"),a=0),l===void 0)if(s.rest)l="";else continue;if(!s.matcher||r[s.matcher](l)){n[s.name]=l;const f=t[c+1],h=o[c+1];f&&!f.rest&&f.optional&&h&&s.chained&&(a=0),!f&&!h&&Object.keys(n).length===i.length&&(a=0);continue}if(s.optional&&s.chained){a++;continue}return}if(!a)return n}function Ee(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function qt({nodes:e,server_loads:t,dictionary:r,matchers:n}){const o=new Set(t);return Object.entries(r).map(([c,[s,l,f]])=>{const{pattern:h,params:d}=$t(c),p={id:c,exec:u=>{const _=h.exec(u);if(_)return Mt(_,d,n)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...l||[]].map(a),leaf:i(s)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function i(c){const s=c<0;return s&&(c=~c),[s,e[c]]}function a(c){return c===void 0?c:[o.has(c),e[c]]}}function rt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ge(e,t,r=JSON.stringify){const n=r(t);try{sessionStorage[e]=n}catch{}}const L=globalThis.__sveltekit_xe3lva?.base??"",Vt=globalThis.__sveltekit_xe3lva?.assets??L??"",Ht="1779191136372",nt="sveltekit:snapshot",at="sveltekit:scroll",ot="sveltekit:states",Gt="sveltekit:pageurl",H="sveltekit:history",ee="sveltekit:navigation",M={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ae=location.origin;function je(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const r=document.getElementsByTagName("base");t=r.length?r[0].href:document.URL}return new URL(e,t)}function q(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Ye={...M,"":M.hover};function st(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function it(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=st(e)}}function Re(e,t,r){let n;try{if(n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),r&&n.hash.match(/^#[^/]/)){const c=location.hash.split("#")[1]||"/";n.hash=`#${c}${n.hash}`}}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,i=!n||!!o||ye(n,t,r)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),a=n?.origin===ae&&e.hasAttribute("download");return{url:n,external:i,target:o,download:a}}function ce(e){let t=null,r=null,n=null,o=null,i=null,a=null,c=e;for(;c&&c!==document.documentElement;)n===null&&(n=V(c,"preload-code")),o===null&&(o=V(c,"preload-data")),t===null&&(t=V(c,"keepfocus")),r===null&&(r=V(c,"noscroll")),i===null&&(i=V(c,"reload")),a===null&&(a=V(c,"replacestate")),c=st(c);function s(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Ye[n??"off"],preload_data:Ye[o??"off"],keepfocus:s(t),noscroll:s(r),reload:s(i),replace_state:s(a)}}function We(e){const t=Pe(e);let r=!0;function n(){r=!0,t.update(a=>a)}function o(a){r=!1,t.set(a)}function i(a){let c;return t.subscribe(s=>{(c===void 0||r&&s!==c)&&a(c=s)})}return{notify:n,set:o,subscribe:i}}const ct={v:C};function Yt(){const{set:e,subscribe:t}=Pe(!1);let r;async function n(){clearTimeout(r);try{const o=await fetch(`${Vt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!o.ok)return!1;const a=(await o.json()).version!==Ht;return a&&(e(!0),ct.v(),clearTimeout(r)),a}catch{return!1}}return{subscribe:t,check:n}}function ye(e,t,r){return e.origin!==ae||!e.pathname.startsWith(t)?!0:r?e.pathname!==location.pathname:!1}function Cr(e){}const Wt=-1,Jt=-2,Kt=-3,Xt=-4,zt=-5,Zt=-6,Qt=-7,lt=2**32-1,Ie=lt-1;function er(e){return!(!Number.isInteger(e)||e<0||e>Ie)}function tr(e){return!(!Number.isInteger(e)||e<0||e>lt)}function rr(e){return Uint8Array.fromBase64(e).buffer}function nr(e){return Uint8Array.from(Buffer.from(e,"base64")).buffer}function ar(e){const t=atob(e),r=t.length,n=new Uint8Array(r);for(let o=0;o<r;o++)n[o]=t.charCodeAt(o);return n.buffer}const or=typeof Uint8Array.fromBase64=="function",sr=typeof process=="object"&&process.versions?.node!==void 0,ir=or?rr:sr?nr:ar;function cr(e,t){if(typeof e=="number")return i(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const r=e,n=Array(r.length);let o=null;function i(a,c=!1){if(a===Wt)return;if(a===Kt)return NaN;if(a===Xt)return 1/0;if(a===zt)return-1/0;if(a===Zt)return-0;if(c||typeof a!="number")throw new Error("Invalid input");if(a in n)return n[a];const s=r[a];if(!s||typeof s!="object")n[a]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const l=s[0],f=t&&Object.hasOwn(t,l)?t[l]:void 0;if(f){let h=s[1];if(typeof h!="number"&&(h=r.push(s[1])-1),o??=new Set,o.has(h))throw new Error("Invalid circular reference");return o.add(h),n[a]=f(i(h)),o.delete(h),n[a]}switch(l){case"Date":n[a]=new Date(s[1]);break;case"Set":const h=new Set;n[a]=h;for(let u=1;u<s.length;u+=1)h.add(i(s[u]));break;case"Map":const d=new Map;n[a]=d;for(let u=1;u<s.length;u+=2)d.set(i(s[u]),i(s[u+1]));break;case"RegExp":n[a]=new RegExp(s[1],s[2]);break;case"Object":{const u=s[1];if(typeof r[u]=="object"&&r[u][0]!=="BigInt")throw new Error("Invalid input");n[a]=Object(i(u));break}case"BigInt":n[a]=BigInt(s[1]);break;case"null":const p=Object.create(null);n[a]=p;for(let u=1;u<s.length;u+=2){if(s[u]==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");p[s[u]]=i(s[u+1])}break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Float16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":case"DataView":{if(r[s[1]][0]!=="ArrayBuffer")throw new Error("Invalid data");const u=globalThis[l],_=i(s[1]);n[a]=s[2]!==void 0?new u(_,s[2],s[3]):new u(_);break}case"ArrayBuffer":{const u=s[1];if(typeof u!="string")throw new Error("Invalid ArrayBuffer encoding");const _=ir(u);n[a]=_;break}case"Temporal.Duration":case"Temporal.Instant":case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.PlainMonthDay":case"Temporal.PlainYearMonth":case"Temporal.ZonedDateTime":{const u=l.slice(9);n[a]=Temporal[u].from(s[1]);break}case"URL":{const u=new URL(s[1]);n[a]=u;break}case"URLSearchParams":{const u=new URLSearchParams(s[1]);n[a]=u;break}default:throw new Error(`Unknown type ${l}`)}}else if(s[0]===Qt){const l=s[1];if(!tr(l))throw new Error("Invalid input");const f=[];n[a]=f,f[Ie]=void 0,delete f[Ie];for(let h=2;h<s.length;h+=2){const d=s[h];if(!er(d)||d>=l)throw new Error("Invalid input");f[d]=i(s[h+1])}f.length=l}else{const l=new Array(s.length);n[a]=l;for(let f=0;f<s.length;f+=1){const h=s[f];h!==Jt&&(l[f]=i(h))}}else{const l={};n[a]=l;for(const f of Object.keys(s)){if(f==="__proto__")throw new Error("Cannot parse an object with a `__proto__` property");const h=s[f];l[f]=i(h)}}return n[a]}return i(0)}const ft=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ft];const lr=new Set([...ft]);[...lr];function fr(e){return e.filter(t=>t!=null)}const ur="x-sveltekit-invalidated",dr="x-sveltekit-trailing-slash";function oe(e,t){return e+"/"+t}function le(e){return e instanceof me||e instanceof Ne?e.status:500}function hr(e){return e instanceof Ne?e.text:"Internal Error"}let I,te,Ae;const pr=He.toString().includes("$$")||/function \w+\(\) \{\}/.test(He.toString()),Je="a:";pr?(I={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Je)},te={current:null},Ae={current:!1}):(I=new class{#e=P({});get data(){return x(this.#e)}set data(t){N(this.#e,t)}#t=P(null);get form(){return x(this.#t)}set form(t){N(this.#t,t)}#r=P(null);get error(){return x(this.#r)}set error(t){N(this.#r,t)}#n=P({});get params(){return x(this.#n)}set params(t){N(this.#n,t)}#a=P({id:null});get route(){return x(this.#a)}set route(t){N(this.#a,t)}#o=P({});get state(){return x(this.#o)}set state(t){N(this.#o,t)}#s=P(-1);get status(){return x(this.#s)}set status(t){N(this.#s,t)}#i=P(new URL(Je));get url(){return x(this.#i)}set url(t){N(this.#i,t)}},te=new class{#e=P(null);get current(){return x(this.#e)}set current(t){N(this.#e,t)}},Ae=new class{#e=P(!1);get current(){return x(this.#e)}set current(t){N(this.#e,t)}},ct.v=()=>Ae.current=!0);function ut(e){Object.assign(I,e)}const _r="/__data.json",gr=".html__data.json";function mr(e){return e.endsWith(".html")?e.replace(/\.html$/,gr):e.replace(/\/$/,"")+_r}const Ke={spanContext(){return yr},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},yr={traceId:"",spanId:"",traceFlags:0};async function*wr(e){let t=!1,r="";const n=new TextDecoder;for(;;){let o=r.indexOf(`
|
|
2
|
+
`);for(;o!==-1;){const a=r.slice(0,o).trim();r=r.slice(o+1),a&&(yield JSON.parse(a)),o=r.indexOf(`
|
|
3
|
+
`)}if(t){const a=r.trim();a&&(yield JSON.parse(a));return}const i=await e.read();t=i.done,i.value&&(r+=n.decode(i.value,{stream:!0})),t&&(r+=n.decode())}}const vr=new Set(["icon","shortcut icon","apple-touch-icon"]);let K=null;const B=rt(at)??{},re=rt(nt)??{},$={url:We({}),page:We({}),navigating:Pe(null),updated:Yt()};function Ce(e){B[e]=q()}function br(e,t){let r=e+1;for(;B[r];)delete B[r],r+=1;for(r=t+1;re[r];)delete re[r],r+=1}function W(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(C)}async function dt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}let De,Te,fe,j,Ue,b;const ue=[],de=[];let T=null;function he(){T?.fork?.then(e=>e?.discard()),T=null}const se=new Map,ht=new Set,kr=new Set,Z=new Set;let y={branch:[],error:null,url:null},$e=!1,pe=!1,Xe=!0,ne=!1,X=!1,pt=!1,Be=!1,_t,S,U,D;const Q=new Set,ze=new Map,Ze=new Map;async function Fr(e,t,r){globalThis.__sveltekit_xe3lva&&(globalThis.__sveltekit_xe3lva.query,globalThis.__sveltekit_xe3lva.prerender),document.URL!==location.href&&(location.href=location.href),b=e,await e.hooks.init?.(),De=qt(e),j=document.documentElement,Ue=t,Te=e.nodes[0],fe=e.nodes[1],Te(),fe(),S=history.state?.[H],U=history.state?.[ee],S||(S=U=Date.now(),history.replaceState({...history.state,[H]:S,[ee]:U},""));const n=B[S];function o(){n&&(history.scrollRestoration="manual",scrollTo(n.x,n.y))}r?(o(),await xr(Ue,r)):(await G({type:"enter",url:je(b.hash?Or(new URL(location.href)):location.href),replace_state:!0}),o()),Pr()}function Er(){ue.length=0,Be=!1}function gt(e){de.some(t=>t?.snapshot)&&(re[e]=de.map(t=>t?.snapshot?.capture()))}function mt(e){re[e]?.forEach((t,r)=>{de[r]?.snapshot?.restore(t)})}function Qe(){Ce(S),Ge(at,B),gt(U),Ge(nt,re)}async function yt(e,t,r,n){let o,i;t.invalidateAll&&he(),await G({type:"goto",url:je(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:r,nav_token:n,accept:()=>{if(t.invalidateAll){Be=!0,o=new Set;for(const[a,c]of ze)for(const s of c.keys())o.add(oe(a,s));i=new Set;for(const[a,c]of Ze)for(const s of c.keys())i.add(oe(a,s))}t.invalidate&&t.invalidate.forEach(Lr)}}),t.invalidateAll&&ie().then(ie).then(()=>{for(const[a,c]of ze)for(const[s,{resource:l}]of c)o?.has(oe(a,s))&&l.refresh();for(const[a,c]of Ze)for(const[s,{resource:l}]of c)i?.has(oe(a,s))&&l.reconnect()})}async function Ar(e){if(e.id!==T?.id){he();const t={};Q.add(t),T={id:e.id,token:t,promise:bt({...e,preload:t}).then(r=>(Q.delete(t),r.type==="loaded"&&r.state.error&&he(),r)),fork:null}}return T.promise}async function Se(e){const t=(await ve(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(r=>r[1]()))}async function wt(e,t,r){const n={params:y.params,route:{id:y.route?.id??null},url:new URL(location.href)};y={...e.state,nav:n};const o=document.querySelector("style[data-sveltekit]");if(o&&o.remove(),ut(e.props.page),_t=new b.root({target:t,props:{...e.props,stores:$,components:de},hydrate:r,sync:!1,transformError:void 0}),await Promise.resolve(),mt(U),r){const i={from:null,to:{...n,scroll:B[S]??q()},willUnload:!1,type:"enter",complete:Promise.resolve()};Z.forEach(a=>a(i))}pe=!0}async function _e({url:e,params:t,branch:r,errors:n,status:o,error:i,route:a,form:c}){let s="never";if(L&&(e.pathname===L||e.pathname===L+"/"))s="always";else for(const u of r)u?.slash!==void 0&&(s=u.slash);e.pathname=Tt(e.pathname,s),e.search=e.search;const l={type:"loaded",state:{url:e,params:t,branch:r,error:i,route:a},props:{constructors:fr(r).map(u=>u.node.component),page:Ve(I)}};c!==void 0&&(l.props.form=c);let f={},h=!I,d=0;for(let u=0;u<Math.max(r.length,y.branch.length);u+=1){const _=r[u],k=y.branch[u];_?.data!==k?.data&&(h=!0),_&&(f={...f,..._.data},h&&(l.props[`data_${d}`]=f),d+=1)}return(!y.url||e.href!==y.url.href||y.error!==i||c!==void 0&&c!==I.form||h)&&(l.props.page={error:i,params:t,route:{id:a?.id??null},state:{},status:o,url:new URL(e),form:c??null,data:h?f:I.data}),l}async function Fe({loader:e,parent:t,url:r,params:n,route:o,server_data_node:i}){let a=null,c=!0;const s={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){let f=function(...d){for(const p of d){const{href:u}=new URL(p,r);s.dependencies.add(u)}};const h={tracing:{enabled:!1,root:Ke,current:Ke},route:new Proxy(o,{get:(d,p)=>(c&&(s.route=!0),d[p])}),params:new Proxy(n,{get:(d,p)=>(c&&s.params.add(p),d[p])}),data:i?.data??null,url:Pt(r,()=>{c&&(s.url=!0)},d=>{c&&s.search_params.add(d)},b.hash),async fetch(d,p){d instanceof Request&&(p={body:d.method==="GET"||d.method==="HEAD"?void 0:await d.blob(),cache:d.cache,credentials:d.credentials,headers:[...d.headers].length>0?d?.headers:void 0,integrity:d.integrity,keepalive:d.keepalive,method:d.method,mode:d.mode,redirect:d.redirect,referrer:d.referrer,referrerPolicy:d.referrerPolicy,signal:d.signal,...p});const{resolved:u,promise:_}=vt(d,p,r);return c&&f(u.href),_},setHeaders:C,depends:f,parent(){return c&&(s.parent=!0),t()},untrack(d){c=!1;try{return d()}finally{c=!0}}};a=await l.universal.load.call(null,h)??null}return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:a,uses:s}:null,data:a??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function vt(e,t,r){let n=e instanceof Request?e.url:e;const o=new URL(n,r);o.origin===r.origin&&(n=o.href.slice(r.origin.length));const i=pe?Ct(n,o.href,t):jt(n,t);return{resolved:o,promise:i}}function et(e,t,r,n,o,i){if(Be)return!0;if(!o)return!1;if(o.parent&&e||o.route&&t||o.url&&r)return!0;for(const a of o.search_params)if(n.has(a))return!0;for(const a of o.params)if(i[a]!==y.params[a])return!0;for(const a of o.dependencies)if(ue.some(c=>c(new URL(a))))return!0;return!1}function Me(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Sr(e,t){if(!e)return new Set(t.searchParams.keys());const r=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const n of r){const o=e.searchParams.getAll(n),i=t.searchParams.getAll(n);o.every(a=>i.includes(a))&&i.every(a=>o.includes(a))&&r.delete(n)}return r}function tt({error:e,url:t,route:r,params:n}){return{type:"loaded",state:{error:e,url:t,route:r,params:n,branch:[]},props:{page:Ve(I),constructors:[]}}}async function bt({id:e,invalidating:t,url:r,params:n,route:o,preload:i}){if(T?.id===e)return Q.delete(T.token),T.promise;const{errors:a,layouts:c,leaf:s}=o,l=[...c,s];a.forEach(m=>m?.().catch(C)),l.forEach(m=>m?.[1]().catch(C));let f=null;const h=y.url?e!==ge(y.url):!1,d=y.route?o.id!==y.route.id:!1,p=Sr(y.url,r);let u=!1;{const m=l.map((w,E)=>{const A=y.branch[E],v=!!w?.[0]&&(A?.loader!==w[1]||et(u,d,h,p,A.server?.uses,n));return v&&(u=!0),v});if(m.some(Boolean)){try{f=await At(r,m)}catch(w){const E=await Y(w,{url:r,params:n,route:{id:e}});return Q.has(i)?tt({error:E,url:r,params:n,route:o}):we({status:le(w),error:E,url:r,route:o})}if(f.type==="redirect")return f}}const _=f?.nodes;let k=!1;const g=l.map(async(m,w)=>{if(!m)return;const E=y.branch[w],A=_?.[w];if((!A||A.type==="skip")&&m[1]===E?.loader&&!et(k,d,h,p,E.universal?.uses,n))return E;if(k=!0,A?.type==="error")throw A;return Fe({loader:m[1],url:r,params:n,route:o,parent:async()=>{const O={};for(let F=0;F<w;F+=1)Object.assign(O,(await g[F])?.data);return O},server_data_node:Me(A===void 0&&m[0]?{type:"skip"}:A??null,m[0]?E?.server:void 0)})});for(const m of g)m.catch(C);const R=[];for(let m=0;m<l.length;m+=1)if(l[m])try{R.push(await g[m])}catch(w){if(w instanceof xe)return{type:"redirect",location:w.location};if(Q.has(i))return tt({error:await Y(w,{params:n,url:r,route:{id:o.id}}),url:r,params:n,route:o});let E=le(w),A;if(_?.includes(w))E=w.status??E,A=w.error;else if(w instanceof me)A=w.body;else{if(await $.updated.check())return await dt(),await W(r);A=await Y(w,{params:n,url:r,route:{id:o.id}})}const v=await Rr(m,R,a);return v?_e({url:r,params:n,branch:R.slice(0,v.idx).concat(v.node),errors:a,status:E,error:A,route:o}):await Et(r,{id:o.id},A,E)}else R.push(void 0);return _e({url:r,params:n,branch:R,errors:a,status:200,error:null,route:o,form:t?void 0:null})}async function Rr(e,t,r){for(;e--;)if(r[e]){let n=e;for(;!t[n];)n-=1;try{return{idx:n+1,node:{node:await r[e](),loader:r[e],data:{},server:null,universal:null}}}catch{continue}}}async function we({status:e,error:t,url:r,route:n}){const o={};let i=null;if(b.server_loads[0]===0)try{const c=await At(r,[!0]);if(c.type!=="data"||c.nodes[0]&&c.nodes[0].type!=="data")throw 0;i=c.nodes[0]??null}catch{(r.origin!==ae||r.pathname!==location.pathname||$e)&&await W(r)}try{const a=await Fe({loader:Te,url:r,params:o,route:n,parent:()=>Promise.resolve({}),server_data_node:Me(i)}),c={node:await fe(),loader:fe,universal:null,server:null,data:null};return _e({url:r,params:o,branch:[a,c],status:e,error:t,errors:[],route:null})}catch(a){if(a instanceof xe)return yt(new URL(a.location,location.href),{},0);throw a}}async function Ir(e){const t=e.href;if(se.has(t))return se.get(t);let r;try{const n=(async()=>{let o=await b.hooks.reroute({url:new URL(e),fetch:async(i,a)=>vt(i,a,e).promise})??e;if(typeof o=="string"){const i=new URL(e);b.hash?i.hash=o:i.pathname=o,o=i}return o})();se.set(t,n),r=await n}catch{se.delete(t);return}return r}async function ve(e,t){if(e&&!ye(e,L,b.hash)){const r=await Ir(e);if(!r)return;const n=Tr(r);for(const o of De){const i=o.exec(n);if(i)return{id:ge(e),invalidating:t,route:o,params:Lt(i),url:e}}}}function Tr(e){return Ut(b.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function ge(e){return(b.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function kt({url:e,type:t,intent:r,delta:n,event:o,scroll:i}){let a=!1;const c=qe(y,r,e,t,i??null);n!==void 0&&(c.navigation.delta=n),o!==void 0&&(c.navigation.event=o);const s={...c.navigation,cancel:()=>{a=!0,c.reject(new Error("navigation cancelled"))}};return ne||ht.forEach(l=>l(s)),a?null:c}async function G({type:e,url:t,popped:r,keepfocus:n,noscroll:o,replace_state:i,state:a={},redirect_count:c=0,nav_token:s={},accept:l=C,block:f=C,event:h}){const d=D;D=s;const p=await ve(t,!1),u=e==="enter"?qe(y,p,t,e):kt({url:t,type:e,delta:r?.delta,intent:p,scroll:r?.scroll,event:h});if(!u){f(),D===s&&(D=d);return}const _=S,k=U;l(),ne=!0,pe&&u.navigation.type!=="enter"&&$.navigating.set(te.current=u.navigation);let g=p&&await bt(p);if(!g){if(ye(t,L,b.hash))return await W(t,i);g=await Et(t,{id:null},await Y(new Ne(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=p?.url||t,D!==s)return u.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(c<20){await G({type:e,url:new URL(g.location,t),popped:r,keepfocus:n,noscroll:o,replace_state:i,state:a,redirect_count:c+1,nav_token:s}),u.fulfil(void 0);return}g=await we({status:500,error:await Y(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await dt(),await W(t,i));if(Er(),Ce(_),gt(k),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),a=r?r.state:a,!r){const v=i?0:1,O={[H]:S+=v,[ee]:U+=v,[ot]:a};(i?history.replaceState:history.pushState).call(history,O,"",t),i||br(S,U)}const R=p&&T?.id===p.id?T.fork:null;T?.fork&&!R&&he(),T=null,g.props.page.state=a;let m;if(pe){const v=(await Promise.all(Array.from(kr,J=>J(u.navigation)))).filter(J=>typeof J=="function");if(v.length>0){let J=function(){v.forEach(be=>{Z.delete(be)})};v.push(J),v.forEach(be=>{Z.add(be)})}const O=u.navigation.to;y={...g.state,nav:{params:O.params,route:O.route,url:O.url}},g.props.page&&(g.props.page.url=t);const F=R&&await R;F?m=F.commit():(K=null,_t.$set(g.props),K&&Object.assign(g.props.page,K),ut(g.props.page),m=It?.()),pt=!0}else await wt(g,Ue,!1);const{activeElement:w}=document;if(await m,await ie(),await ie(),D!==s)return u.reject(new Error("navigation aborted")),!1;g.props.page&&K&&Object.assign(g.props.page,K);let E=null;if(Xe){const v=r?r.scroll:o?q():null;v?scrollTo(v.x,v.y):(E=t.hash&&document.getElementById(Rt(t)))?E.scrollIntoView():scrollTo(0,0)}const A=document.activeElement!==w&&document.activeElement!==document.body;!n&&!A&&Nr(t,!E),Xe=!0,ne=!1,e==="popstate"&&mt(U),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=q()),Z.forEach(v=>v(u.navigation)),$.navigating.set(te.current=null)}async function Et(e,t,r,n,o){return e.origin===ae&&e.pathname===location.pathname&&!$e?await we({status:n,error:r,url:e,route:t}):await W(e,o)}function Ur(){let e,t={element:void 0,href:void 0},r;j.addEventListener("mousemove",c=>{const s=c.target;clearTimeout(e),e=setTimeout(()=>{i(s,M.hover)},20)});function n(c){c.defaultPrevented||i(c.composedPath()[0],M.tap)}j.addEventListener("mousedown",n),j.addEventListener("touchstart",n,{passive:!0});const o=new IntersectionObserver(c=>{for(const s of c)s.isIntersecting&&(Se(new URL(s.target.href)),o.unobserve(s.target))},{threshold:0});async function i(c,s){const l=it(c,j),f=l===t.element&&l?.href===t.href&&s>=r;if(!l||f)return;const{url:h,external:d,download:p}=Re(l,L,b.hash);if(d||p)return;const u=ce(l),_=h&&ge(y.url)===ge(h);if(!(u.reload||_))if(s<=u.preload_data){t={element:l,href:l.href},r=M.tap;const k=await ve(h,!1);if(!k)return;Ar(k)}else s<=u.preload_code&&(t={element:l,href:l.href},r=s,Se(h))}function a(){o.disconnect();for(const c of j.querySelectorAll("a")){const{url:s,external:l,download:f}=Re(c,L,b.hash);if(l||f)continue;const h=ce(c);h.reload||(h.preload_code===M.viewport&&o.observe(c),h.preload_code===M.eager&&Se(s))}}Z.add(a),a()}function Y(e,t){if(e instanceof me)return e.body;const r=le(e),n=hr(e);return b.hooks.handleError({error:e,event:t,status:r,message:n})??{message:n}}function Mr(e,t={}){return e=new URL(je(e)),e.origin!==ae?Promise.reject(new Error("goto: invalid URL")):yt(e,t,0)}function Lr(e){if(typeof e=="function")ue.push(e);else{const{href:t}=new URL(e,location.href);ue.push(r=>r.href===t)}}function Pr(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let r=!1;if(Qe(),!ne){const n=qe(y,void 0,null,"leave"),o={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};ht.forEach(i=>i(o))}r?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Qe()}),navigator.connection?.saveData||Ur(),j.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const r=it(t.composedPath()[0],j);if(!r)return;const{url:n,external:o,target:i,download:a}=Re(r,L,b.hash);if(!n)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ce(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||a)return;const[l,f]=(b.hash?n.hash.replace(/^#/,""):n.href).split("#"),h=l===ke(location);if(o||c.reload&&(!h||!f)){kt({url:n,type:"link",event:t})?ne=!0:t.preventDefault();return}if(f!==void 0&&h){const[,d]=y.url.href.split("#");if(d===f){if(t.preventDefault(),f===""||f==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const p=r.ownerDocument.getElementById(decodeURIComponent(f));p&&(p.scrollIntoView(),p.focus())}return}if(X=!0,Ce(S),e(n),!c.replace_state)return;X=!1}t.preventDefault(),await new Promise(d=>{requestAnimationFrame(()=>{setTimeout(d,0)}),setTimeout(d,100)}),await G({type:"link",url:n,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??n.href===location.href,event:t})}),j.addEventListener("submit",t=>{if(t.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(t.target),n=t.submitter;if((n?.formTarget||r.target)==="_blank"||(n?.formMethod||r.method)!=="get")return;const a=new URL(n?.hasAttribute("formaction")&&n?.formAction||r.action);if(ye(a,L,!1))return;const c=t.target,s=ce(c);if(s.reload)return;t.preventDefault(),t.stopPropagation();const l=new FormData(c,n);a.search=new URLSearchParams(l).toString(),G({type:"form",url:a,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??a.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Le){if(t.state?.[H]){const r=t.state[H];if(D={},r===S)return;const n=B[r],o=t.state[ot]??{},i=new URL(t.state[Gt]??location.href),a=t.state[ee],c=y.url?ke(location)===ke(y.url):!1;if(a===U&&(pt||c)){o!==I.state&&(I.state=o),e(i),B[S]=q(),n&&scrollTo(n.x,n.y),S=r;return}const l=r-S;await G({type:"popstate",url:i,popped:{state:o,scroll:n,delta:l},accept:()=>{S=r,U=a},block:()=>{history.go(-l)},nav_token:D,event:t})}else if(!X){const r=new URL(location.href);e(r),b.hash&&location.reload()}}}),addEventListener("hashchange",()=>{X&&(X=!1,history.replaceState({...history.state,[H]:++S,[ee]:U},"",location.href))});for(const t of document.querySelectorAll("link"))vr.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&$.navigating.set(te.current=null)});function e(t){y.url=I.url=t,$.page.set(Ve(I)),$.page.notify()}}async function xr(e,{status:t=200,error:r,node_ids:n,params:o,route:i,server_route:a,data:c,form:s}){$e=!0;const l=new URL(location.href);let f;({params:o={},route:i={id:null}}=await ve(l,!1)||{}),f=De.find(({id:p})=>p===i.id);let h,d=!0;try{const p=n.map(async(_,k)=>{const g=c[k];return g?.uses&&(g.uses=St(g.uses)),Fe({loader:b.nodes[_],url:l,params:o,route:i,parent:async()=>{const R={};for(let m=0;m<k;m+=1)Object.assign(R,(await p[m]).data);return R},server_data_node:Me(g)})}),u=await Promise.all(p);if(f){const _=f.layouts;for(let k=0;k<_.length;k++)_[k]||u.splice(k,0,void 0)}h=await _e({url:l,params:o,branch:u,status:t,error:r,errors:f?.errors,form:s,route:f??null})}catch(p){if(p instanceof xe){await W(new URL(p.location,location.href));return}h=await we({status:le(p),error:await Y(p,{url:l,params:o,route:i}),url:l,route:i}),e.textContent="",d=!1}h.props.page&&(h.props.page.state={}),await wt(h,e,d)}async function At(e,t){const r=new URL(e);r.pathname=mr(e.pathname),e.pathname.endsWith("/")&&r.searchParams.append(dr,"1"),r.searchParams.append(ur,t.map(i=>i?"1":"0").join(""));const n=window.fetch,o=await n(r.href,{});if(!o.ok){let i;throw o.headers.get("content-type")?.includes("application/json")?i=await o.json():o.status===404?i="Not Found":o.status===500&&(i="Internal Error"),new me(o.status,i)}return new Promise(async i=>{const a=new Map,c=o.body.getReader();function s(l){return cr(l,{...b.decoders,Promise:f=>new Promise((h,d)=>{a.set(f,{fulfil:h,reject:d})})})}for await(const l of wr(c)){if(l.type==="redirect")return i(l);if(l.type==="data")l.nodes?.forEach(f=>{f?.type==="data"&&(f.uses=St(f.uses),f.data=s(f.data))}),i(l);else if(l.type==="chunk"){const{id:f,data:h,error:d}=l,p=a.get(f);a.delete(f),d?p.reject(s(d)):p.fulfil(s(h))}}})}function St(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Le=!1;function Nr(e,t=!0){const r=document.querySelector("[autofocus]");if(r)r.focus();else{const n=Rt(e);if(n&&document.getElementById(n)){const{x:i,y:a}=q();setTimeout(()=>{const c=history.state;Le=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(c,"",e),t&&scrollTo(i,a),Le=!1})}else{const i=document.body,a=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),a!==null?i.setAttribute("tabindex",a):i.removeAttribute("tabindex")}const o=getSelection();if(o&&o.type!=="None"){const i=[];for(let a=0;a<o.rangeCount;a+=1)i.push(o.getRangeAt(a));setTimeout(()=>{if(o.rangeCount===i.length){for(let a=0;a<o.rangeCount;a+=1){const c=i[a],s=o.getRangeAt(a);if(c.commonAncestorContainer!==s.commonAncestorContainer||c.startContainer!==s.startContainer||c.endContainer!==s.endContainer||c.startOffset!==s.startOffset||c.endOffset!==s.endOffset)return}o.removeAllRanges()}})}}}function qe(e,t,r,n,o=null){let i,a;const c=new Promise((l,f)=>{i=l,a=f});return c.catch(C),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:q()},to:r&&{params:t?.params??null,route:{id:t?.route?.id??null},url:r,scroll:o},willUnload:!t,type:n,complete:c},fulfil:i,reject:a}}function Ve(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Or(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Rt(e){let t;if(b.hash){const[,,r]=e.hash.split("#",3);t=r??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{$ as a,Mr as g,Cr as l,I as p,Fr as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aH as Kr,au as pi,aU as bc,A as gi,az as te,ax as On,Z as rn,aL as yc,a5 as qt,h as mi,bg as it,as as Jr,am as g,b1 as wc,r as _c,bl as Go,bh as Le,ay as st,d as vi,o as kc,aE as Ko,a6 as At,k as We,_ as Tt,ae as Sc,bj as xc,ac as Ac,X as qr,j as Oc,i as Pc,aR as Cc,bm as Ar,E as Ec,D as Tc,b6 as bi,aX as yi,I as ur,b0 as wi,b as zc,g as Ic,a1 as Nc,aQ as Dc,ad as Pn,at as Or,m as _i,n as Mc,a4 as Rc,w as Fc,Q as ki,br as Si,H as Zc,af as Yr,bv as zt,b4 as xi,a7 as Ai,b9 as Lc,aO as Oi,C as Jo,J as qo,ba as jc,aG as Vc,u as Bc,a as Wc,N as Uc,ar as Hc,t as on,be as Yo,bd as Xo,V as Gc,ak as Kc,Y as Jc,U as qc,F as Yc,W as Xc,aN as Qc,bt as Pi,a2 as $c,bz as Ci,b8 as Qo,by as Te,b7 as el,ab as tl,bn as G,bb as O,a_ as Ge,bx as E,a$ as K,aj as M,aY as J,a0 as we,aT as ne,b5 as _e,bw as $o,aC as Lt,aw as nl,ap as es,bc as rl,ao as ol,ag as sl,bk as It,ai as il,aW as al,bu as cl}from"./BIuG5Qqu.js";import{a as ll}from"./
|
|
1
|
+
import{aH as Kr,au as pi,aU as bc,A as gi,az as te,ax as On,Z as rn,aL as yc,a5 as qt,h as mi,bg as it,as as Jr,am as g,b1 as wc,r as _c,bl as Go,bh as Le,ay as st,d as vi,o as kc,aE as Ko,a6 as At,k as We,_ as Tt,ae as Sc,bj as xc,ac as Ac,X as qr,j as Oc,i as Pc,aR as Cc,bm as Ar,E as Ec,D as Tc,b6 as bi,aX as yi,I as ur,b0 as wi,b as zc,g as Ic,a1 as Nc,aQ as Dc,ad as Pn,at as Or,m as _i,n as Mc,a4 as Rc,w as Fc,Q as ki,br as Si,H as Zc,af as Yr,bv as zt,b4 as xi,a7 as Ai,b9 as Lc,aO as Oi,C as Jo,J as qo,ba as jc,aG as Vc,u as Bc,a as Wc,N as Uc,ar as Hc,t as on,be as Yo,bd as Xo,V as Gc,ak as Kc,Y as Jc,U as qc,F as Yc,W as Xc,aN as Qc,bt as Pi,a2 as $c,bz as Ci,b8 as Qo,by as Te,b7 as el,ab as tl,bn as G,bb as O,a_ as Ge,bx as E,a$ as K,aj as M,aY as J,a0 as we,aT as ne,b5 as _e,bw as $o,aC as Lt,aw as nl,ap as es,bc as rl,ao as ol,ag as sl,bk as It,ai as il,aW as al,bu as cl}from"./BIuG5Qqu.js";import{a as ll}from"./CTGl6QSA.js";import{b as ul,n as dl,m as fl,h as hl,g as pl,f as gl,p as ml,c as vl,d as B,a as I,j as he,e as Ei,q as xe,r as et,o as bl,u as yl,k as wl}from"./D7LHlC1M.js";import{B as Xr,p as b,i as le,b as Cn,r as ee,a as oe,c as Re}from"./CGb10hB5.js";const _l=[];function kl(t,e=!1,n=!1){return xn(t,new Map,"",_l,null,n)}function xn(t,e,n,r,o=null,s=!1){if(typeof t=="object"&&t!==null){var i=e.get(t);if(i!==void 0)return i;if(t instanceof Map)return new Map(t);if(t instanceof Set)return new Set(t);if(Kr(t)){var a=Array(t.length);e.set(t,a),o!==null&&e.set(o,a);for(var c=0;c<t.length;c+=1){var l=t[c];c in t&&(a[c]=xn(l,e,n,r,null,s))}return a}if(pi(t)===bc){a={},e.set(t,a),o!==null&&e.set(o,a);for(var u of Object.keys(t))a[u]=xn(t[u],e,n,r,null,s);return a}if(t instanceof Date)return structuredClone(t);if(typeof t.toJSON=="function"&&!s)return xn(t.toJSON(),e,n,r,t)}if(t instanceof EventTarget)return t;try{return structuredClone(t)}catch{return t}}function Sl(){return Symbol(gi)}const xl=Symbol("NaN");function Al(t,e,n){te&&On();var r=new Xr(t),o=!yc();rn(()=>{var s=e();s!==s&&(s=xl),o&&s!==null&&typeof s=="object"&&(s={}),r.ensure(s,n)})}function Ol(t,e){return e}function Pl(t,e,n){for(var r=[],o=e.length,s,i=e.length,a=0;a<o;a++){let h=e[a];yi(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var d=t.outrogroups;Pr(t,qr(s.done)),d.delete(s),d.size===0&&(t.outrogroups=null)}}else i-=1},!1)}if(i===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;Nc(u),u.append(l),t.items.clear()}Pr(t,e,!c)}else s={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(s)}function Pr(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const i of t.pending.values())for(const a of i)r.add(t.items.get(a).e)}for(var o=0;o<e.length;o++){var s=e[o];if(r?.has(s)){s.f|=We;const i=document.createDocumentFragment();Dc(s,i)}else Pn(e[o],n)}}var ts;function Cl(t,e,n,r,o,s=null){var i=t,a=new Map,c=(e&mi)!==0;if(c){var l=t;i=te?it(Jr(l)):l.appendChild(qt())}te&&On();var u=null,h=Ac(()=>{var S=n();return Kr(S)?S:S==null?[]:qr(S)}),d,f=new Map,p=!0;function m(S){(A.effect.f&Tc)===0&&(A.pending.delete(S),A.fallback=u,El(A,d,i,e,r),u!==null&&(d.length===0?(u.f&We)===0?bi(u):(u.f^=We,Gt(u,null,i)):yi(u,()=>{u=null})))}function v(S){A.pending.delete(S)}var y=rn(()=>{d=g(h);var S=d.length;let w=!1;if(te){var P=wc(i)===_c;P!==(S===0)&&(i=Go(),it(i),Le(!1),w=!0)}for(var k=new Set,T=At,x=xc(),F=0;F<S;F+=1){te&&st.nodeType===vi&&st.data===kc&&(i=st,w=!0,Le(!1));var Z=d[F],Y=r(Z,F),X=p?null:a.get(Y);X?(X.v&&Ko(X.v,Z),X.i&&Ko(X.i,F),x&&T.unskip_effect(X.e)):(X=Tl(a,p?i:ts??=qt(),Z,Y,F,o,e,n),p||(X.e.f|=We),a.set(Y,X)),k.add(Y)}if(S===0&&s&&!u&&(p?u=Tt(()=>s(i)):(u=Tt(()=>s(ts??=qt())),u.f|=We)),S>k.size&&Sc(),te&&S>0&&it(Go()),!p)if(f.set(T,k),x){for(const[$,L]of a)k.has($)||T.skip_effect(L.e);T.oncommit(m),T.ondiscard(v)}else m(T);w&&Le(!0),g(h)}),A={effect:y,items:a,pending:f,outrogroups:null,fallback:u};p=!1,te&&(i=st)}function jt(t){for(;t!==null&&(t.f&zc)===0;)t=t.next;return t}function El(t,e,n,r,o){var s=(r&Ic)!==0,i=e.length,a=t.items,c=jt(t.effect.first),l,u=null,h,d=[],f=[],p,m,v,y;if(s)for(y=0;y<i;y+=1)p=e[y],m=o(p,y),v=a.get(m).e,(v.f&We)===0&&(v.nodes?.a?.measure(),(h??=new Set).add(v));for(y=0;y<i;y+=1){if(p=e[y],m=o(p,y),v=a.get(m).e,t.outrogroups!==null)for(const Z of t.outrogroups)Z.pending.delete(v),Z.done.delete(v);if((v.f&ur)!==0&&(bi(v),s&&(v.nodes?.a?.unfix(),(h??=new Set).delete(v))),(v.f&We)!==0)if(v.f^=We,v===c)Gt(v,null,n);else{var A=u?u.next:c;v===t.effect.last&&(t.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),rt(t,u,v),rt(t,v,A),Gt(v,A,n),u=v,d=[],f=[],c=jt(u.next);continue}if(v!==c){if(l!==void 0&&l.has(v)){if(d.length<f.length){var S=f[0],w;u=S.prev;var P=d[0],k=d[d.length-1];for(w=0;w<d.length;w+=1)Gt(d[w],S,n);for(w=0;w<f.length;w+=1)l.delete(f[w]);rt(t,P.prev,k.next),rt(t,u,P),rt(t,k,S),c=S,u=k,y-=1,d=[],f=[]}else l.delete(v),Gt(v,c,n),rt(t,v.prev,v.next),rt(t,v,u===null?t.effect.first:u.next),rt(t,u,v),u=v;continue}for(d=[],f=[];c!==null&&c!==v;)(l??=new Set).add(c),f.push(c),c=jt(c.next);if(c===null)continue}(v.f&We)===0&&d.push(v),u=v,c=jt(v.next)}if(t.outrogroups!==null){for(const Z of t.outrogroups)Z.pending.size===0&&(Pr(t,qr(Z.done)),t.outrogroups?.delete(Z));t.outrogroups.size===0&&(t.outrogroups=null)}if(c!==null||l!==void 0){var T=[];if(l!==void 0)for(v of l)(v.f&ur)===0&&T.push(v);for(;c!==null;)(c.f&ur)===0&&c!==t.fallback&&T.push(c),c=jt(c.next);var x=T.length;if(x>0){var F=(r&mi)!==0&&i===0?n:null;if(s){for(y=0;y<x;y+=1)T[y].nodes?.a?.measure();for(y=0;y<x;y+=1)T[y].nodes?.a?.fix()}Pl(t,T,F)}}s&&wi(()=>{if(h!==void 0)for(v of h)v.nodes?.a?.apply()})}function Tl(t,e,n,r,o,s,i,a){var c=(i&Oc)!==0?(i&Pc)===0?Cc(n,!1,!1):Ar(n):null,l=(i&Ec)!==0?Ar(o):null;return{v:c,i:l,e:Tt(()=>(s(e,c??n,l??o,a),()=>{t.delete(r)}))}}function Gt(t,e,n){if(t.nodes)for(var r=t.nodes.start,o=t.nodes.end,s=e&&(e.f&We)===0?e.nodes.start:n;r!==null;){var i=Or(r);if(s.before(r),r===o)return;r=i}}function rt(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function q(t,e,...n){var r=new Xr(t);rn(()=>{const o=e()??null;r.ensure(o,o&&(s=>o(s,...n)))},_i)}function zl(t,e,n,r,o,s){let i=te;te&&On();var a=null;te&&st.nodeType===Mc&&(a=st,On());var c=te?st:t,l=new Xr(c,!1);rn(()=>{const u=e()||null;var h=Fc;if(u===null){l.ensure(null,null);return}return l.ensure(u,d=>{if(u){if(a=te?a:Rc(u,h),ul(a,a),r){te&&dl(u)&&a.append(document.createComment(""));var f=te?Jr(a):a.appendChild(qt());te&&(f===null?Le(!1):it(f)),r(a,f)}ki.nodes.end=a,d.before(a)}te&&it(d)}),()=>{}},_i),Si(()=>{}),i&&(Le(!0),it(c))}function Dy(t,e){let n=null,r=te;var o;if(te){n=st;for(var s=Jr(document.head);s!==null&&(s.nodeType!==vi||s.data!==t);)s=Or(s);if(s===null)Le(!1);else{var i=Or(s);s.remove(),it(i)}}te||(o=document.head.appendChild(qt()));try{rn(()=>{var a=Tt(()=>e(o));a.f|=Zc})}finally{r&&(Le(!0),it(n))}}function My(t,e,n){Yr(()=>{var r=zt(()=>e(t,n?.())||{});if(n&&r?.update){var o=!1,s={};xi(()=>{var i=n();Ai(i),o&&Lc(s,i)&&(s=i,r.update(i))}),o=!0}if(r?.destroy)return()=>r.destroy()})}function Il(t,e){var n=void 0,r;Oi(()=>{n!==(n=e())&&(r&&(Pn(r),r=null),n&&(r=Tt(()=>{Yr(()=>n(t))})))})}function Ti(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Ti(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Yt(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Ti(t))&&(r&&(r+=" "),r+=e);return r}function Nl(t){return typeof t=="object"?Yt(t):t??""}const ns=[...`
|
|
2
2
|
\r\f \v\uFEFF`];function Dl(t,e,n){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),n){for(var o of Object.keys(n))if(n[o])r=r?r+" "+o:o;else if(r.length)for(var s=o.length,i=0;(i=r.indexOf(o,i))>=0;){var a=i+s;(i===0||ns.includes(r[i-1]))&&(a===r.length||ns.includes(r[a]))?r=(i===0?"":r.substring(0,i))+r.substring(a+1):i=a}}return r===""?null:r}function rs(t,e=!1){var n=e?" !important;":";",r="";for(var o of Object.keys(t)){var s=t[o];s!=null&&s!==""&&(r+=" "+o+": "+s+n)}return r}function dr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Ml(t,e){if(e){var n="",r,o;if(Array.isArray(e)?(r=e[0],o=e[1]):r=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,i=0,a=!1,c=[];r&&c.push(...Object.keys(r).map(dr)),o&&c.push(...Object.keys(o).map(dr));var l=0,u=-1;const m=t.length;for(var h=0;h<m;h++){var d=t[h];if(a?d==="/"&&t[h-1]==="*"&&(a=!1):s?s===d&&(s=!1):d==="/"&&t[h+1]==="*"?a=!0:d==='"'||d==="'"?s=d:d==="("?i++:d===")"&&i--,!a&&s===!1&&i===0){if(d===":"&&u===-1)u=h;else if(d===";"||h===m-1){if(u!==-1){var f=dr(t.substring(l,u).trim());if(!c.includes(f)){d!==";"&&h++;var p=t.substring(l,h).trim();n+=" "+p+";"}}l=h+1,u=-1}}}}return r&&(n+=rs(r)),o&&(n+=rs(o,!0)),n=n.trim(),n===""?null:n}return t==null?null:String(t)}function Rl(t,e,n,r,o,s){var i=t[Jo];if(te||i!==n||i===void 0){var a=Dl(n,r,s);(!te||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[Jo]=n}else if(s&&o!==s)for(var c in s){var l=!!s[c];(o==null||l!==!!o[c])&&t.classList.toggle(c,l)}return s}function fr(t,e={},n,r){for(var o in n){var s=n[o];e[o]!==s&&(n[o]==null?t.style.removeProperty(o):t.style.setProperty(o,s,r))}}function Fl(t,e,n,r){var o=t[qo];if(te||o!==e){var s=Ml(e,r);(!te||s!==t.getAttribute("style"))&&(s==null?t.removeAttribute("style"):t.style.cssText=s),t[qo]=e}else r&&(Array.isArray(r)?(fr(t,n?.[0],r[0]),fr(t,n?.[1],r[1],"important")):fr(t,n,r));return r}function Cr(t,e,n=!1){if(t.multiple){if(e==null)return;if(!Kr(e))return jc();for(var r of t.options)r.selected=e.includes(os(r));return}for(r of t.options){var o=os(r);if(Vc(o,e)){r.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Zl(t){var e=new MutationObserver(()=>{Cr(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Si(()=>{e.disconnect()})}function os(t){return"__value"in t?t.__value:t.value}const Vt=Symbol("class"),Bt=Symbol("style"),zi=Symbol("is custom element"),Ii=Symbol("is html"),Ll=on?"link":"LINK",jl=on?"input":"INPUT",Vl=on?"option":"OPTION",Bl=on?"select":"SELECT",Wl=on?"progress":"PROGRESS";function Ul(t){if(te){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;Qt(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var o=t.checked;Qt(t,"checked",null),t.checked=o}}};t[Yc]=n,wi(n),Xc()}}function Ry(t,e){var n=Yn(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!==Wl)||(t.value=e??"")}function Fy(t,e){var n=Yn(t);n.checked!==(n.checked=e??void 0)&&(t.checked=e)}function Hl(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Qt(t,e,n,r){var o=Yn(t);te&&(o[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===Ll)||o[e]!==(o[e]=n)&&(e==="loading"&&(t[Bc]=n),n==null?t.removeAttribute(e):typeof n!="string"&&Qr(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Zy(t,e,n){var r=Gc,o=ki;let s=te;te&&Le(!1),Yo(null),Xo(null);try{e!=="style"&&(Er.has(t.getAttribute("is")||t.nodeName)||!customElements||customElements.get(t.getAttribute("is")||t.nodeName.toLowerCase())?Qr(t).includes(e):n&&typeof n=="object")?t[e]=n:Qt(t,e,n==null?n:String(n))}finally{Yo(r),Xo(o),s&&Le(!0)}}function Gl(t,e,n,r,o=!1,s=!1){if(te&&o&&t.nodeName===jl){var i=t,a=i.type==="checkbox"?"defaultChecked":"defaultValue";a in n||Ul(i)}var c=Yn(t),l=c[zi],u=!c[Ii];let h=te&&l;h&&Le(!1);var d=e||{},f=t.nodeName===Vl;for(var p in e)p in n||(n[p]=null);n.class?n.class=Nl(n.class):n[Vt]&&(n.class=null),n[Bt]&&(n.style??=null);var m=Qr(t);for(const k in n){let T=n[k];if(f&&k==="value"&&T==null){t.value=t.__value="",d[k]=T;continue}if(k==="class"){var v=t.namespaceURI==="http://www.w3.org/1999/xhtml";Rl(t,v,T,r,e?.[Vt],n[Vt]),d[k]=T,d[Vt]=n[Vt];continue}if(k==="style"){Fl(t,T,e?.[Bt],n[Bt]),d[k]=T,d[Bt]=n[Bt];continue}var y=d[k];if(!(T===y&&!(T===void 0&&t.hasAttribute(k)))){d[k]=T;var A=k[0]+k[1];if(A!=="$$")if(A==="on"){const x={},F="$$"+k;let Z=k.slice(2);var S=vl(Z);if(fl(Z)&&(Z=Z.slice(0,-7),x.capture=!0),!S&&y){if(T!=null)continue;t.removeEventListener(Z,d[F],x),d[F]=null}if(S)hl(Z,t,T),pl([Z]);else if(T!=null){let Y=function(X){d[k].call(this,X)};d[F]=gl(Z,t,Y,x)}}else if(k==="style")Qt(t,k,T);else if(k==="autofocus")Jc(t,!!T);else if(!l&&(k==="__value"||k==="value"&&T!=null))t.value=t.__value=T;else if(k==="selected"&&f)Hl(t,T);else{var w=k;u||(w=ml(w));var P=w==="defaultValue"||w==="defaultChecked";if(T==null&&!l&&!P)if(c[k]=null,w==="value"||w==="checked"){let x=t;const F=e===void 0;if(w==="value"){let Z=x.defaultValue;x.removeAttribute(w),x.defaultValue=Z,x.value=x.__value=F?Z:null}else{let Z=x.defaultChecked;x.removeAttribute(w),x.defaultChecked=Z,x.checked=F?Z:!1}}else t.removeAttribute(k);else P||m.includes(w)&&(l||typeof T!="string")?(t[w]=T,w in c&&(c[w]=qc)):typeof T!="function"&&Qt(t,w,T)}}}return h&&Le(!0),d}function ge(t,e,n=[],r=[],o=[],s,i=!1,a=!1){Kc(o,n,r,c=>{var l=void 0,u={},h=t.nodeName===Bl,d=!1;if(Oi(()=>{var p=e(...c.map(g)),m=Gl(t,l,p,s,i,a);d&&h&&"value"in p&&Cr(t,p.value);for(let y of Object.getOwnPropertySymbols(u))p[y]||Pn(u[y]);for(let y of Object.getOwnPropertySymbols(p)){var v=p[y];y.description===gi&&(!l||v!==l[y])&&(u[y]&&Pn(u[y]),u[y]=Tt(()=>Il(t,()=>v))),m[y]=v}l=m}),h){var f=t;Yr(()=>{Cr(f,l.value,!0),Zl(f)})}d=!0})}function Yn(t){return t[Wc]??={[zi]:t.nodeName.includes("-"),[Ii]:t.namespaceURI===Uc}}var Er=new Map;function Qr(t){var e=t.getAttribute("is")||t.nodeName,n=Er.get(e);if(n)return n;Er.set(e,n=[]);for(var r,o=t,s=Element.prototype;s!==o;){r=Hc(o);for(var i in r)r[i].set&&i!=="innerHTML"&&i!=="textContent"&&i!=="innerText"&&n.push(i);o=pi(o)}return n}function Kl(t,e,n=e){var r=new WeakSet;Qc(t,"input",async o=>{var s=o?t.defaultValue:t.value;if(s=hr(t)?pr(s):s,n(s),At!==null&&r.add(At),await Pi(),s!==(s=e())){var i=t.selectionStart,a=t.selectionEnd,c=t.value.length;if(t.value=s??"",a!==null){var l=t.value.length;i===a&&a===c&&l>c?(t.selectionStart=l,t.selectionEnd=l):(t.selectionStart=i,t.selectionEnd=Math.min(a,l))}}}),(te&&t.defaultValue!==t.value||zt(e)==null&&t.value)&&(n(hr(t)?pr(t.value):t.value),At!==null&&r.add(At)),xi(()=>{var o=e();if(t===document.activeElement){var s=At;if(r.has(s))return}hr(t)&&o===pr(t.value)||t.type==="date"&&!o&&!t.value||o!==t.value&&(t.value=o??"")})}function hr(t){var e=t.type;return e==="number"||e==="range"}function pr(t){return t===""?null:+t}function Jl(t=!1){const e=$c,n=e.l.u;if(!n)return;let r=()=>Ai(e.s);if(t){let o=0,s={};const i=tl(()=>{let a=!1;const c=e.s;for(const l in c)c[l]!==s[l]&&(s[l]=c[l],a=!0);return a&&o++,o});r=()=>g(i)}n.b.length&&Ci(()=>{ss(e,r),Qo(n.b)}),Te(()=>{const o=zt(()=>n.m.map(el));return()=>{for(const s of o)typeof s=="function"&&s()}}),n.a.length&&Te(()=>{ss(e,r),Qo(n.a)})}function ss(t,e){if(t.l.s)for(const n of t.l.s)g(n);e()}const ql=()=>{const t=ll;return{page:{subscribe:t.page.subscribe},navigating:{subscribe:t.navigating.subscribe},updated:t.updated}},Ly={subscribe(t){return ql().page.subscribe(t)}},Yl={pingInterval:3e4,pongTimeout:1e4,baseReconnectDelay:1e3,maxReconnectDelay:3e4};class Xl{#e=G(!1);get connected(){return g(this.#e)}set connected(e){O(this.#e,e,!0)}ws=null;pingTimer=null;reconnectTimer=null;lastPong=0;reconnectAttempts=0;visibilityHandler=null;config;constructor(e){this.config={...Yl,...e}}shouldReconnect(){return!0}onConnected(){}onDisconnected(){}doConnect(){if(this.ws)return;const e=this.getWsUrl();this.ws=new WebSocket(e),this.ws.onopen=()=>{this.connected=!0,this.reconnectAttempts=0,this.lastPong=Date.now(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.startPingTimer(),this.setupVisibilityHandler(),this.onConnected()},this.ws.onmessage=n=>{if(n.data==="pong"){this.lastPong=Date.now();return}this.handleMessage(n)},this.ws.onclose=()=>{this.connected=!1,this.ws=null,this.stopPingTimer(),this.onDisconnected(),this.shouldReconnect()&&this.scheduleReconnect()},this.ws.onerror=()=>{this.ws?.close()}}doDisconnect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopPingTimer(),this.removeVisibilityHandler(),this.connected=!1,this.reconnectAttempts=0,this.ws&&(this.ws.onopen=null,this.ws.onclose=null,this.ws.onerror=null,this.ws.onmessage=null,this.ws.readyState!==WebSocket.CLOSED&&this.ws.close(),this.ws=null)}forceReconnect(){this.reconnectAttempts=0,this.ws&&(this.ws.onclose=null,this.ws.close(),this.ws=null),this.stopPingTimer(),this.connected=!1,this.doConnect()}startPingTimer(){this.stopPingTimer(),this.pingTimer=setInterval(()=>{if(this.ws?.readyState===WebSocket.OPEN){if(Date.now()-this.lastPong>this.config.pingInterval+this.config.pongTimeout){this.ws?.close();return}this.ws.send("ping")}},this.config.pingInterval)}stopPingTimer(){this.pingTimer&&(clearInterval(this.pingTimer),this.pingTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const e=Math.min(this.config.baseReconnectDelay*Math.pow(2,this.reconnectAttempts)+Math.random()*1e3,this.config.maxReconnectDelay);this.reconnectAttempts++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.doConnect()},e)}setupVisibilityHandler(){this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.shouldReconnect()&&(!this.ws||this.ws.readyState!==WebSocket.OPEN?this.forceReconnect():this.ws.send("ping"))},document.addEventListener("visibilitychange",this.visibilityHandler))}removeVisibilityHandler(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null)}}function is(t){return Array.isArray(t)?[...t]:t&&typeof t=="object"?{...t}:t}function as(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Ni(t,e){return{load(){try{const n=localStorage.getItem(t);if(n===null)return is(e);const r=JSON.parse(n);return as(e)&&as(r)?{...e,...r}:r}catch{return is(e)}},save(n){try{localStorage.setItem(t,JSON.stringify(n))}catch{}}}}var cs;function _(t,e,n){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:i,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,c);const l=i.prototype,u=Object.keys(l);for(let h=0;h<u.length;h++){const d=u[h];d in a||(a[d]=l[d].bind(a))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:t});function i(a){var c;const l=n?.Parent?new s:this;r(l,a),(c=l._zod).deferred??(c.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(i,"init",{value:r}),Object.defineProperty(i,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?!0:a?._zod?.traits?.has(t)}),Object.defineProperty(i,"name",{value:t}),i}class Ct extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Di extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}(cs=globalThis).__zod_globalConfig??(cs.__zod_globalConfig={});const $r=globalThis.__zod_globalConfig;function bt(t){return $r}function Mi(t){const e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>e.indexOf(+r)===-1).map(([r,o])=>o)}function Tr(t,e){return typeof e=="bigint"?e.toString():e}function Xn(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function eo(t){return t==null}function to(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Ql(t,e){const n=t/e,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const ls=Symbol("evaluating");function re(t,e,n){let r;Object.defineProperty(t,e,{get(){if(r!==ls)return r===void 0&&(r=ls,r=n()),r},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function kt(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function lt(...t){const e={};for(const n of t){const r=Object.getOwnPropertyDescriptors(n);Object.assign(e,r)}return Object.defineProperties({},e)}function us(t){return JSON.stringify(t)}function $l(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ri="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function $t(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const eu=Xn(()=>{if($r.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function en(t){if($t(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!($t(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Fi(t){return en(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const tu=new Set(["string","number","symbol"]);function Nt(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ut(t,e,n){const r=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(r._zod.parent=t),r}function W(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function nu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const ru={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ou(t,e){const n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=lt(t._zod.def,{get shape(){const i={};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(i[a]=n.shape[a])}return kt(this,"shape",i),i},checks:[]});return ut(t,s)}function su(t,e){const n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=lt(t._zod.def,{get shape(){const i={...t._zod.def.shape};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete i[a]}return kt(this,"shape",i),i},checks:[]});return ut(t,s)}function iu(t,e){if(!en(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0){const s=t._zod.def.shape;for(const i in e)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=lt(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return kt(this,"shape",s),s}});return ut(t,o)}function au(t,e){if(!en(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n=lt(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e};return kt(this,"shape",r),r}});return ut(t,n)}function cu(t,e){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=lt(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return kt(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return ut(t,n)}function lu(t,e,n){const o=e._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=lt(e._zod.def,{get shape(){const a=e._zod.def.shape,c={...a};if(n)for(const l in n){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=t?new t({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)c[l]=t?new t({type:"optional",innerType:a[l]}):a[l];return kt(this,"shape",c),c},checks:[]});return ut(e,i)}function uu(t,e,n){const r=lt(e._zod.def,{get shape(){const o=e._zod.def.shape,s={...o};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new t({type:"nonoptional",innerType:o[i]}))}else for(const i in o)s[i]=new t({type:"nonoptional",innerType:o[i]});return kt(this,"shape",s),s}});return ut(e,r)}function Pt(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function du(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function Zi(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function pn(t){return typeof t=="string"?t:t?.message}function yt(t,e,n){const r=t.message?t.message:pn(t.inst?._zod.def?.error?.(t))??pn(e?.error?.(t))??pn(n.customError?.(t))??pn(n.localeError?.(t))??"Invalid input",{inst:o,continue:s,input:i,...a}=t;return a.path??(a.path=[]),a.message=r,e?.reportInput&&(a.input=i),a}function no(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function tn(...t){const[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}const Li=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,Tr,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ji=_("$ZodError",Li),Vi=_("$ZodError",Li,{Parent:Error});function fu(t,e=n=>n.message){const n={},r=[];for(const o of t.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}function hu(t,e=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)n._errors.push(e(i));else{let c=n,l=0;for(;l<a.length;){const u=a[l];l===a.length-1?(c[u]=c[u]||{_errors:[]},c[u]._errors.push(e(i))):c[u]=c[u]||{_errors:[]},c=c[u],l++}}}};return r(t),n}const ro=t=>(e,n,r,o)=>{const s=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new Ct;if(i.issues.length){const a=new(o?.Err??t)(i.issues.map(c=>yt(c,s,bt())));throw Ri(a,o?.callee),a}return i.value},oo=t=>async(e,n,r,o)=>{const s=r?{...r,async:!0}:{async:!0};let i=e._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const a=new(o?.Err??t)(i.issues.map(c=>yt(c,s,bt())));throw Ri(a,o?.callee),a}return i.value},Qn=t=>(e,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=e._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Ct;return s.issues.length?{success:!1,error:new(t??ji)(s.issues.map(i=>yt(i,o,bt())))}:{success:!0,data:s.value}},pu=Qn(Vi),$n=t=>async(e,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=e._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(i=>yt(i,o,bt())))}:{success:!0,data:s.value}},gu=$n(Vi),mu=t=>(e,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ro(t)(e,n,o)},vu=t=>(e,n,r)=>ro(t)(e,n,r),bu=t=>async(e,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return oo(t)(e,n,o)},yu=t=>async(e,n,r)=>oo(t)(e,n,r),wu=t=>(e,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Qn(t)(e,n,o)},_u=t=>(e,n,r)=>Qn(t)(e,n,r),ku=t=>async(e,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return $n(t)(e,n,o)},Su=t=>async(e,n,r)=>$n(t)(e,n,r),xu=/^[cC][0-9a-z]{6,}$/,Au=/^[0-9a-z]+$/,Ou=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pu=/^[0-9a-vA-V]{20}$/,Cu=/^[A-Za-z0-9]{27}$/,Eu=/^[a-zA-Z0-9_-]{21}$/,Tu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zu=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ds=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Iu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Nu="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Du(){return new RegExp(Nu,"u")}const Mu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ru=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Fu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Zu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bi=/^[A-Za-z0-9_-]*$/,ju=/^https?$/,Vu=/^\+[1-9]\d{6,14}$/,Wi="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Bu=new RegExp(`^${Wi}$`);function Ui(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Wu(t){return new RegExp(`^${Ui(t)}$`)}function Uu(t){const e=Ui({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${Wi}T(?:${r})$`)}const Hu=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},Gu=/^-?\d+$/,Ku=/^-?\d+(?:\.\d+)?$/,Ju=/^(?:true|false)$/i,qu=/^[^A-Z]*$/,Yu=/^[^a-z]*$/,ze=_("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Hi={number:"number",bigint:"bigint",object:"date"},Gi=_("$ZodCheckLessThan",(t,e)=>{ze.init(t,e);const n=Hi[typeof e.value];t._zod.onattach.push(r=>{const o=r._zod.bag,s=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ki=_("$ZodCheckGreaterThan",(t,e)=>{ze.init(t,e);const n=Hi[typeof e.value];t._zod.onattach.push(r=>{const o=r._zod.bag,s=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Xu=_("$ZodCheckMultipleOf",(t,e)=>{ze.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Ql(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Qu=_("$ZodCheckNumberFormat",(t,e)=>{ze.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),r=n?"int":"number",[o,s]=ru[e.format];t._zod.onattach.push(i=>{const a=i._zod.bag;a.format=e.format,a.minimum=o,a.maximum=s,n&&(a.pattern=Gu)}),t._zod.check=i=>{const a=i.value;if(n){if(!Number.isInteger(a)){i.issues.push({expected:r,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?i.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort}):i.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort});return}}a<o&&i.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),a>s&&i.issues.push({origin:"number",input:a,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}}),$u=_("$ZodCheckMaxLength",(t,e)=>{var n;ze.init(t,e),(n=t._zod.def).when??(n.when=r=>{const o=r.value;return!eo(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const o=r.value;if(o.length<=e.maximum)return;const i=no(o);r.issues.push({origin:i,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),ed=_("$ZodCheckMinLength",(t,e)=>{var n;ze.init(t,e),(n=t._zod.def).when??(n.when=r=>{const o=r.value;return!eo(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const o=r.value;if(o.length>=e.minimum)return;const i=no(o);r.issues.push({origin:i,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),td=_("$ZodCheckLengthEquals",(t,e)=>{var n;ze.init(t,e),(n=t._zod.def).when??(n.when=r=>{const o=r.value;return!eo(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=r=>{const o=r.value,s=o.length;if(s===e.length)return;const i=no(o),a=s>e.length;r.issues.push({origin:i,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),er=_("$ZodCheckStringFormat",(t,e)=>{var n,r;ze.init(t,e),t._zod.onattach.push(o=>{const s=o._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),nd=_("$ZodCheckRegex",(t,e)=>{er.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),rd=_("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=qu),er.init(t,e)}),od=_("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Yu),er.init(t,e)}),sd=_("$ZodCheckIncludes",(t,e)=>{ze.init(t,e);const n=Nt(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),id=_("$ZodCheckStartsWith",(t,e)=>{ze.init(t,e);const n=new RegExp(`^${Nt(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),ad=_("$ZodCheckEndsWith",(t,e)=>{ze.init(t,e);const n=new RegExp(`.*${Nt(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),cd=_("$ZodCheckOverwrite",(t,e)=>{ze.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class ld{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
|
|
3
3
|
`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const e=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new e(...n,o.join(`
|
|
4
4
|
`))}}const ud={major:4,minor:4,patch:3},ue=_("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=ud;const r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(const o of r)for(const s of o._zod.onattach)s(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const o=(i,a,c)=>{let l=Pt(i),u;for(const h of a){if(h._zod.def.when){if(du(i)||!h._zod.def.when(i))continue}else if(l)continue;const d=i.issues.length,f=h._zod.check(i);if(f instanceof Promise&&c?.async===!1)throw new Ct;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,i.issues.length!==d&&(l||(l=Pt(i,d)))});else{if(i.issues.length===d)continue;l||(l=Pt(i,d))}}return u?u.then(()=>i):i},s=(i,a,c)=>{if(Pt(i))return i.aborted=!0,i;const l=o(a,r,c);if(l instanceof Promise){if(c.async===!1)throw new Ct;return l.then(u=>t._zod.parse(u,c))}return t._zod.parse(l,c)};t._zod.run=(i,a)=>{if(a.skipChecks)return t._zod.parse(i,a);if(a.direction==="backward"){const l=t._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return l instanceof Promise?l.then(u=>s(u,i,a)):s(l,i,a)}const c=t._zod.parse(i,a);if(c instanceof Promise){if(a.async===!1)throw new Ct;return c.then(l=>o(l,r,a))}return o(c,r,a)}}re(t,"~standard",()=>({validate:o=>{try{const s=pu(t,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return gu(t,o).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),so=_("$ZodString",(t,e)=>{ue.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Hu(t._zod.bag),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),ae=_("$ZodStringFormat",(t,e)=>{er.init(t,e),so.init(t,e)}),dd=_("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=zu),ae.init(t,e)}),fd=_("$ZodUUID",(t,e)=>{if(e.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=ds(r))}else e.pattern??(e.pattern=ds());ae.init(t,e)}),hd=_("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Iu),ae.init(t,e)}),pd=_("$ZodURL",(t,e)=>{ae.init(t,e),t._zod.check=n=>{try{const r=n.value.trim();if(!e.normalize&&e.protocol?.source===ju.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:t,continue:!e.abort});return}const o=new URL(r);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),gd=_("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Du()),ae.init(t,e)}),md=_("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Eu),ae.init(t,e)}),vd=_("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=xu),ae.init(t,e)}),bd=_("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Au),ae.init(t,e)}),yd=_("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Ou),ae.init(t,e)}),wd=_("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Pu),ae.init(t,e)}),_d=_("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Cu),ae.init(t,e)}),kd=_("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Uu(e)),ae.init(t,e)}),Sd=_("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Bu),ae.init(t,e)}),xd=_("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Wu(e)),ae.init(t,e)}),Ad=_("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Tu),ae.init(t,e)}),Od=_("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Mu),ae.init(t,e),t._zod.bag.format="ipv4"}),Pd=_("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Ru),ae.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),Cd=_("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Fu),ae.init(t,e)}),Ed=_("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Zu),ae.init(t,e),t._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const i=Number(s);if(`${i}`!==s)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Ji(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Td=_("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Lu),ae.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{Ji(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function zd(t){if(!Bi.test(t))return!1;const e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Ji(n)}const Id=_("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Bi),ae.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{zd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),Nd=_("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Vu),ae.init(t,e)});function Dd(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}const Md=_("$ZodJWT",(t,e)=>{ae.init(t,e),t._zod.check=n=>{Dd(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),qi=_("$ZodNumber",(t,e)=>{ue.init(t,e),t._zod.pattern=t._zod.bag.pattern??Ku,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...s?{received:s}:{}}),n}}),Rd=_("$ZodNumberFormat",(t,e)=>{Qu.init(t,e),qi.init(t,e)}),Fd=_("$ZodBoolean",(t,e)=>{ue.init(t,e),t._zod.pattern=Ju,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),n}}),Zd=_("$ZodUnknown",(t,e)=>{ue.init(t,e),t._zod.parse=n=>n}),Ld=_("$ZodNever",(t,e)=>{ue.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function fs(t,e,n){t.issues.length&&e.issues.push(...Zi(n,t.issues)),e.value[n]=t.value}const jd=_("$ZodArray",(t,e)=>{ue.init(t,e),t._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),n;n.value=Array(o.length);const s=[];for(let i=0;i<o.length;i++){const a=o[i],c=e.element._zod.run({value:a,issues:[]},r);c instanceof Promise?s.push(c.then(l=>fs(l,n,i))):fs(c,n,i)}return s.length?Promise.all(s).then(()=>n):n}});function En(t,e,n,r,o,s){const i=n in r;if(t.issues.length){if(o&&s&&!i)return;e.issues.push(...Zi(n,t.issues))}if(!i&&!o){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?i&&(e.value[n]=void 0):e.value[n]=t.value}function Yi(t){const e=Object.keys(t.shape);for(const r of e)if(!t.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=nu(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function Xi(t,e,n,r,o,s){const i=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,u=c.optin==="optional",h=c.optout==="optional";for(const d in e){if(d==="__proto__"||a.has(d))continue;if(l==="never"){i.push(d);continue}const f=c.run({value:e[d],issues:[]},r);f instanceof Promise?t.push(f.then(p=>En(p,n,d,e,u,h))):En(f,n,d,e,u,h)}return i.length&&n.issues.push({code:"unrecognized_keys",keys:i,input:e,inst:s}),t.length?Promise.all(t).then(()=>n):n}const Vd=_("$ZodObject",(t,e)=>{if(ue.init(t,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const a=e.shape;Object.defineProperty(e,"shape",{get:()=>{const c={...a};return Object.defineProperty(e,"shape",{value:c}),c}})}const r=Xn(()=>Yi(e));re(t._zod,"propValues",()=>{const a=e.shape,c={};for(const l in a){const u=a[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(const h of u.values)c[l].add(h)}}return c});const o=$t,s=e.catchall;let i;t._zod.parse=(a,c)=>{i??(i=r.value);const l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),a;a.value={};const u=[],h=i.shape;for(const d of i.keys){const f=h[d],p=f._zod.optin==="optional",m=f._zod.optout==="optional",v=f._zod.run({value:l[d],issues:[]},c);v instanceof Promise?u.push(v.then(y=>En(y,a,d,l,p,m))):En(v,a,d,l,p,m)}return s?Xi(u,l,a,c,r.value,t):u.length?Promise.all(u).then(()=>a):a}}),Bd=_("$ZodObjectJIT",(t,e)=>{Vd.init(t,e);const n=t._zod.parse,r=Xn(()=>Yi(e)),o=d=>{const f=new ld(["shape","payload","ctx"]),p=r.value,m=S=>{const w=us(S);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const S of p.keys)v[S]=`key_${y++}`;f.write("const newResult = {};");for(const S of p.keys){const w=v[S],P=us(S),k=d[S],T=k?._zod?.optin==="optional",x=k?._zod?.optout==="optional";f.write(`const ${w} = ${m(S)};`),T&&x?f.write(`
|