@ggui-ai/iframe-runtime 0.5.0-rc.0 → 0.5.0-rc.1

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.
@@ -37,7 +37,7 @@ var rL=Object.create;var Mb=Object.defineProperty;var nL=Object.getOwnPropertyDe
37
37
 
38
38
  `)}m.write("payload.value = newResult;"),m.write("return payload;");let h=m.compile();return($,_)=>h(f,$,_)},i,a=Ss,s=!Td.jitless,c=s&&Pb.value,u=t.catchall,p;e._zod.parse=(f,m)=>{p??(p=o.value);let g=f.value;return a(g)?s&&c&&m?.async===!1&&m.jitless!==!0?(i||(i=n(t.shape)),f=i(f,m),u?I6([],g,f,m,p,e):f):r(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});ec=w("$ZodUnion",(e,t)=>{se.init(e,t),fe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),fe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),fe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),fe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Id(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1,s=[];for(let l of t.options){let c=l._zod.run({value:n.value,issues:[]},i);if(c instanceof Promise)s.push(c),a=!0;else{if(c.issues.length===0)return c;s.push(c)}}return a?Promise.all(s).then(l=>v6(l,n,e,i)):v6(s,n,e,i)}});Zh=w("$ZodXor",(e,t)=>{ec.init(e,t),t.inclusive=!1;let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1,s=[];for(let l of t.options){let c=l._zod.run({value:n.value,issues:[]},i);c instanceof Promise?(s.push(c),a=!0):s.push(c)}return a?Promise.all(s).then(l=>$6(l,n,e,i)):$6(s,n,e,i)}}),Vh=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ec.init(e,t);let r=e._zod.parse;fe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,l]of Object.entries(a)){n[s]||(n[s]=new Set);for(let c of l)n[s].add(c)}}return n});let o=Hl(()=>{let n=t.options,i=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let l of s){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,a)}}return i});e._zod.parse=(n,i)=>{let a=n.value;if(!Ss(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),Hh=w("$ZodIntersection",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>b6(r,l,c)):b6(r,i,a)}});Hd=w("$ZodTuple",(e,t)=>{se.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),l=s===-1?0:r.length-s;if(!t.rest){let u=i.length>r.length,p=i.length<l-1;if(u||p)return o.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:i,inst:e,origin:"array"}),o}let c=-1;for(let u of r){if(c++,c>=i.length&&c>=l)continue;let p=u._zod.run({value:i[c],issues:[]},n);p instanceof Promise?a.push(p.then(f=>eh(f,o,c))):eh(p,o,c)}if(t.rest){let u=i.slice(r.length);for(let p of u){c++;let f=t.rest._zod.run({value:p,issues:[]},n);f instanceof Promise?a.push(f.then(m=>eh(m,o,c))):eh(f,o,c)}}return a.length?Promise.all(a).then(()=>o):o}});qh=w("$ZodRecord",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Wi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...ln(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...ln(c,u.issues)),r.value[c]=u.value)}let l;for(let c in n)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:l})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let l=t.keyType._zod.run({value:s,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Wg.test(s)&&l.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>Kr(p,o,ht())),input:s,path:[s],inst:e});continue}let u=t.valueType._zod.run({value:n[s],issues:[]},o);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...ln(s,p.issues)),r.value[l.value]=p.value})):(u.issues.length&&r.issues.push(...ln(s,u.issues)),r.value[l.value]=u.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Bh=w("$ZodMap",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[a,s]of n){let l=t.keyType._zod.run({value:a,issues:[]},o),c=t.valueType._zod.run({value:s,issues:[]},o);l instanceof Promise||c instanceof Promise?i.push(Promise.all([l,c]).then(([u,p])=>{x6(u,p,r,a,n,e,o)})):x6(l,c,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});Gh=w("$ZodSet",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(l=>_6(l,r))):_6(s,r)}return i.length?Promise.all(i).then(()=>r):r}});Fh=w("$ZodEnum",(e,t)=>{se.init(e,t);let r=Cd(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Od.has(typeof n)).map(n=>typeof n=="string"?_n(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Kh=w("$ZodLiteral",(e,t)=>{if(se.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?_n(o):o?_n(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Wh=w("$ZodFile",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Jh=w("$ZodTransform",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Gi(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new oo;return r.value=n,r}});qd=w("$ZodOptional",(e,t)=>{se.init(e,t),e._zod.optin="optional",e._zod.optout="optional",fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),fe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Id(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>S6(i,r.value)):S6(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Yh=w("$ZodExactOptional",(e,t)=>{qd.init(e,t),fe(e._zod,"values",()=>t.innerType._zod.values),fe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Xh=w("$ZodNullable",(e,t)=>{se.init(e,t),fe(e._zod,"optin",()=>t.innerType._zod.optin),fe(e._zod,"optout",()=>t.innerType._zod.optout),fe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Id(r.source)}|null)$`):void 0}),fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Qh=w("$ZodDefault",(e,t)=>{se.init(e,t),e._zod.optin="optional",fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>k6(i,t)):k6(n,t)}});e0=w("$ZodPrefault",(e,t)=>{se.init(e,t),e._zod.optin="optional",fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),t0=w("$ZodNonOptional",(e,t)=>{se.init(e,t),fe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>w6(i,e)):w6(n,e)}});r0=w("$ZodSuccess",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Gi("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),n0=w("$ZodCatch",(e,t)=>{se.init(e,t),fe(e._zod,"optin",()=>t.innerType._zod.optin),fe(e._zod,"optout",()=>t.innerType._zod.optout),fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>Kr(a,o,ht()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>Kr(i,o,ht()))},input:r.value}),r.issues=[]),r)}}),o0=w("$ZodNaN",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),i0=w("$ZodPipe",(e,t)=>{se.init(e,t),fe(e._zod,"values",()=>t.in._zod.values),fe(e._zod,"optin",()=>t.in._zod.optin),fe(e._zod,"optout",()=>t.out._zod.optout),fe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>th(a,t.in,o)):th(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>th(i,t.out,o)):th(n,t.out,o)}});tc=w("$ZodCodec",(e,t)=>{se.init(e,t),fe(e._zod,"values",()=>t.in._zod.values),fe(e._zod,"optin",()=>t.in._zod.optin),fe(e._zod,"optout",()=>t.out._zod.optout),fe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>rh(a,t,o)):rh(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>rh(a,t,o)):rh(i,t,o)}}});a0=w("$ZodReadonly",(e,t)=>{se.init(e,t),fe(e._zod,"propValues",()=>t.innerType._zod.propValues),fe(e._zod,"values",()=>t.innerType._zod.values),fe(e._zod,"optin",()=>t.innerType?._zod?.optin),fe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(E6):E6(n)}});s0=w("$ZodTemplateLiteral",(e,t)=>{se.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||Ub.has(typeof o))r.push(_n(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),l0=w("$ZodFunction",(e,t)=>(se.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Gl(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Gl(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Kl(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Kl(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new Hd({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),c0=w("$ZodPromise",(e,t)=>{se.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),u0=w("$ZodLazy",(e,t)=>{se.init(e,t),fe(e._zod,"innerType",()=>t.getter()),fe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),fe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),fe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),fe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),d0=w("$ZodCustom",(e,t)=>{Ke.init(e,t),se.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>T6(i,r,o,e));T6(n,r,o,e)}})});function O6(){return{localeError:rZ()}}var rZ,M6=x(()=>{X();rZ=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${D(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${C(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function A6(){return{localeError:nZ()}}var nZ,j6=x(()=>{X();nZ=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${D(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function N6(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}function D6(){return{localeError:oZ()}}var oZ,P6=x(()=>{X();oZ=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${D(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),l=N6(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),l=N6(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function U6(){return{localeError:iZ()}}var iZ,L6=x(()=>{X();iZ=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${D(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function Z6(){return{localeError:aZ()}}var aZ,V6=x(()=>{X();aZ=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${D(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${C(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}}});function H6(){return{localeError:sZ()}}var sZ,q6=x(()=>{X();sZ=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${D(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${C(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}}});function B6(){return{localeError:lZ()}}var lZ,G6=x(()=>{X();lZ=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${D(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}}});function F6(){return{localeError:cZ()}}var cZ,K6=x(()=>{X();cZ=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${D(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function p0(){return{localeError:uZ()}}var uZ,Bx=x(()=>{X();uZ=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`Invalid option: expected one of ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});function W6(){return{localeError:dZ()}}var dZ,J6=x(()=>{X();dZ=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${D(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}}});function Y6(){return{localeError:pZ()}}var pZ,X6=x(()=>{X();pZ=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${D(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}}});function Q6(){return{localeError:fZ()}}var fZ,ez=x(()=>{X();fZ=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${D(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${C(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${C(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function tz(){return{localeError:mZ()}}var mZ,rz=x(()=>{X();mZ=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${D(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${C(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function nz(){return{localeError:gZ()}}var gZ,oz=x(()=>{X();gZ=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${D(n.values[0])} attendu`:`Option invalide : une valeur parmi ${C(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${C(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function iz(){return{localeError:hZ()}}var hZ,az=x(()=>{X();hZ=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${D(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${C(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}}});function sz(){return{localeError:yZ()}}var yZ,lz=x(()=>{X();yZ=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,o=c=>{let u=r(c);return u?u.label:c??e.unknown.label},n=c=>`\u05D4${o(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,p=l[u??""]??o(u),f=L(c.input),m=l[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${D(c.values[0])}`;let u=c.values.map(m=>D(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let p=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let u=a(c.origin),p=n(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",v=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let f=c.inclusive?"<=":"<",m=i(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${c.maximum.toString()}`}case"too_small":{let u=a(c.origin),p=n(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let g=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let b=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let v=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`.trim()}let f=c.inclusive?">=":">",m=i(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${m} ${f}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let p=s[u.format],f=p?.label??u.format,g=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${g}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${C(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function cz(){return{localeError:vZ()}}var vZ,uz=x(()=>{X();vZ=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${D(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function dz(e,t,r){return Math.abs(e)===1?t:r}function rc(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}function pz(){return{localeError:$Z()}}var $Z,fz=x(()=>{X();$Z=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${D(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),l=dz(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${rc(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${rc(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),l=dz(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${rc(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${rc(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${C(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${rc(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${rc(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function mz(){return{localeError:bZ()}}var bZ,gz=x(()=>{X();bZ=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${D(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}}});function hz(){return{localeError:xZ()}}var xZ,yz=x(()=>{X();xZ=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${D(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${C(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}}});function vz(){return{localeError:_Z()}}var _Z,$z=x(()=>{X();_Z=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${D(n.values[0])}`:`Opzione non valida: atteso uno tra ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${C(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}}});function bz(){return{localeError:SZ()}}var SZ,xz=x(()=>{X();SZ=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${D(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${C(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${C(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function _z(){return{localeError:kZ()}}var kZ,Sz=x(()=>{X();kZ=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${D(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${C(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function f0(){return{localeError:wZ()}}var wZ,Gx=x(()=>{X();wZ=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${D(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${C(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function kz(){return f0()}var wz=x(()=>{Gx()});function Ez(){return{localeError:EZ()}}var EZ,Tz=x(()=>{X();EZ=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${D(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${C(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),l=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${l} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),l=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${l} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${C(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function zz(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}function Rz(){return{localeError:TZ()}}var Bd,TZ,Cz=x(()=>{X();Bd=e=>e.charAt(0).toUpperCase()+e.slice(1);TZ=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,i,a,s){let l=e[n]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${D(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${C(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,zz(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Bd(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Bd(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,zz(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Bd(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Bd(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${C(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${Bd(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function Iz(){return{localeError:zZ()}}var zZ,Oz=x(()=>{X();zZ=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function Mz(){return{localeError:RZ()}}var RZ,Az=x(()=>{X();RZ=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${D(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${C(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}}});function jz(){return{localeError:CZ()}}var CZ,Nz=x(()=>{X();CZ=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${D(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}}});function Dz(){return{localeError:IZ()}}var IZ,Pz=x(()=>{X();IZ=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${D(n.values[0])}`:`Ugyldig valg: forventet en av ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}}});function Uz(){return{localeError:OZ()}}var OZ,Lz=x(()=>{X();OZ=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${D(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function Zz(){return{localeError:MZ()}}var MZ,Vz=x(()=>{X();MZ=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${D(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${C(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${C(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function Hz(){return{localeError:AZ()}}var AZ,qz=x(()=>{X();AZ=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${D(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function Bz(){return{localeError:jZ()}}var jZ,Gz=x(()=>{X();jZ=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${D(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${C(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}}});function Fz(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}function Kz(){return{localeError:NZ()}}var NZ,Wz=x(()=>{X();NZ=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${D(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),l=Fz(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),l=Fz(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function Jz(){return{localeError:DZ()}}var DZ,Yz=x(()=>{X();DZ=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${D(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${C(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}}});function Xz(){return{localeError:PZ()}}var PZ,Qz=x(()=>{X();PZ=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${D(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${C(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function eR(){return{localeError:UZ()}}var UZ,tR=x(()=>{X();UZ=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${C(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function rR(){return{localeError:LZ()}}var LZ,nR=x(()=>{X();LZ=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${D(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${C(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function oR(){return{localeError:ZZ()}}var ZZ,iR=x(()=>{X();ZZ=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${D(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function m0(){return{localeError:VZ()}}var VZ,Fx=x(()=>{X();VZ=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${D(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${C(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function aR(){return m0()}var sR=x(()=>{Fx()});function lR(){return{localeError:HZ()}}var HZ,cR=x(()=>{X();HZ=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${D(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${C(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${C(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function uR(){return{localeError:qZ()}}var qZ,dR=x(()=>{X();qZ=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${D(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function pR(){return{localeError:BZ()}}var BZ,fR=x(()=>{X();BZ=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${D(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${C(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function mR(){return{localeError:GZ()}}var GZ,gR=x(()=>{X();GZ=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${D(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${C(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function hR(){return{localeError:FZ()}}var FZ,yR=x(()=>{X();FZ=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${D(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${C(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function vR(){return{localeError:KZ()}}var KZ,$R=x(()=>{X();KZ=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=L(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${D(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${C(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${C(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var zs={};Mt(zs,{ar:()=>O6,az:()=>A6,be:()=>D6,bg:()=>U6,ca:()=>Z6,cs:()=>H6,da:()=>B6,de:()=>F6,en:()=>p0,eo:()=>W6,es:()=>Y6,fa:()=>Q6,fi:()=>tz,fr:()=>nz,frCA:()=>iz,he:()=>sz,hu:()=>cz,hy:()=>pz,id:()=>mz,is:()=>hz,it:()=>vz,ja:()=>bz,ka:()=>_z,kh:()=>kz,km:()=>f0,ko:()=>Ez,lt:()=>Rz,mk:()=>Iz,ms:()=>Mz,nl:()=>jz,no:()=>Dz,ota:()=>Uz,pl:()=>Hz,ps:()=>Zz,pt:()=>Bz,ru:()=>Kz,sl:()=>Jz,sv:()=>Xz,ta:()=>eR,th:()=>rR,tr:()=>oR,ua:()=>aR,uk:()=>m0,ur:()=>lR,uz:()=>uR,vi:()=>pR,yo:()=>vR,zhCN:()=>mR,zhTW:()=>hR});var g0=x(()=>{M6();j6();P6();L6();V6();q6();G6();K6();Bx();J6();X6();ez();rz();oz();az();lz();uz();fz();gz();yz();$z();xz();Sz();wz();Gx();Tz();Cz();Oz();Az();Nz();Pz();Lz();Vz();qz();Gz();Wz();Yz();Qz();tR();nR();iR();sR();Fx();cR();dR();fR();gR();yR();$R()});function nc(){return new h0}var bR,Gd,Fd,h0,Bt,Kd=x(()=>{Gd=Symbol("ZodOutput"),Fd=Symbol("ZodInput"),h0=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(bR=globalThis).__zod_globalRegistry??(bR.__zod_globalRegistry=nc());Bt=globalThis.__zod_globalRegistry});function y0(e,t){return new e({type:"string",...V(t)})}function v0(e,t){return new e({type:"string",coerce:!0,...V(t)})}function Wd(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...V(t)})}function oc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...V(t)})}function Jd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...V(t)})}function Yd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...V(t)})}function Xd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...V(t)})}function Qd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...V(t)})}function ic(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...V(t)})}function ep(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...V(t)})}function tp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...V(t)})}function rp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...V(t)})}function np(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...V(t)})}function op(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...V(t)})}function ip(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...V(t)})}function ap(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...V(t)})}function sp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...V(t)})}function lp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...V(t)})}function $0(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...V(t)})}function cp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...V(t)})}function up(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...V(t)})}function dp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...V(t)})}function pp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...V(t)})}function fp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...V(t)})}function mp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...V(t)})}function b0(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...V(t)})}function x0(e,t){return new e({type:"string",format:"date",check:"string_format",...V(t)})}function _0(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...V(t)})}function S0(e,t){return new e({type:"string",format:"duration",check:"string_format",...V(t)})}function k0(e,t){return new e({type:"number",checks:[],...V(t)})}function w0(e,t){return new e({type:"number",coerce:!0,checks:[],...V(t)})}function E0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...V(t)})}function T0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...V(t)})}function z0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...V(t)})}function R0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...V(t)})}function C0(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...V(t)})}function I0(e,t){return new e({type:"boolean",...V(t)})}function O0(e,t){return new e({type:"boolean",coerce:!0,...V(t)})}function M0(e,t){return new e({type:"bigint",...V(t)})}function A0(e,t){return new e({type:"bigint",coerce:!0,...V(t)})}function j0(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...V(t)})}function N0(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...V(t)})}function D0(e,t){return new e({type:"symbol",...V(t)})}function P0(e,t){return new e({type:"undefined",...V(t)})}function U0(e,t){return new e({type:"null",...V(t)})}function L0(e){return new e({type:"any"})}function Z0(e){return new e({type:"unknown"})}function V0(e,t){return new e({type:"never",...V(t)})}function H0(e,t){return new e({type:"void",...V(t)})}function q0(e,t){return new e({type:"date",...V(t)})}function B0(e,t){return new e({type:"date",coerce:!0,...V(t)})}function G0(e,t){return new e({type:"nan",...V(t)})}function Sn(e,t){return new Yg({check:"less_than",...V(t),value:e,inclusive:!1})}function Sr(e,t){return new Yg({check:"less_than",...V(t),value:e,inclusive:!0})}function kn(e,t){return new Xg({check:"greater_than",...V(t),value:e,inclusive:!1})}function Qt(e,t){return new Xg({check:"greater_than",...V(t),value:e,inclusive:!0})}function ac(e){return kn(0,e)}function sc(e){return Sn(0,e)}function lc(e){return Sr(0,e)}function cc(e){return Qt(0,e)}function wo(e,t){return new $x({check:"multiple_of",...V(t),value:e})}function Eo(e,t){return new _x({check:"max_size",...V(t),maximum:e})}function wn(e,t){return new Sx({check:"min_size",...V(t),minimum:e})}function Xo(e,t){return new kx({check:"size_equals",...V(t),size:e})}function Qo(e,t){return new wx({check:"max_length",...V(t),maximum:e})}function io(e,t){return new Ex({check:"min_length",...V(t),minimum:e})}function ei(e,t){return new Tx({check:"length_equals",...V(t),length:e})}function Xi(e,t){return new zx({check:"string_format",format:"regex",...V(t),pattern:e})}function Qi(e){return new Rx({check:"string_format",format:"lowercase",...V(e)})}function ea(e){return new Cx({check:"string_format",format:"uppercase",...V(e)})}function ta(e,t){return new Ix({check:"string_format",format:"includes",...V(t),includes:e})}function ra(e,t){return new Ox({check:"string_format",format:"starts_with",...V(t),prefix:e})}function na(e,t){return new Mx({check:"string_format",format:"ends_with",...V(t),suffix:e})}function uc(e,t,r){return new Ax({check:"property",property:e,schema:t,...V(r)})}function oa(e,t){return new jx({check:"mime_type",mime:e,...V(t)})}function cn(e){return new Nx({check:"overwrite",tx:e})}function ia(e){return cn(t=>t.normalize(e))}function aa(){return cn(e=>e.trim())}function sa(){return cn(e=>e.toLowerCase())}function la(){return cn(e=>e.toUpperCase())}function Rs(){return cn(e=>Db(e))}function Kx(e,t,r){return new e({type:"array",element:t,...V(r)})}function JZ(e,t,r){return new e({type:"union",options:t,...V(r)})}function YZ(e,t,r){return new e({type:"union",options:t,inclusive:!1,...V(r)})}function XZ(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...V(o)})}function QZ(e,t,r){return new e({type:"intersection",left:t,right:r})}function eV(e,t,r,o){let n=r instanceof se,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...V(i)})}function tV(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...V(o)})}function rV(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...V(o)})}function nV(e,t,r){return new e({type:"set",valueType:t,...V(r)})}function oV(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...V(r)})}function iV(e,t,r){return new e({type:"enum",entries:t,...V(r)})}function aV(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...V(r)})}function F0(e,t){return new e({type:"file",...V(t)})}function sV(e,t){return new e({type:"transform",transform:t})}function lV(e,t){return new e({type:"optional",innerType:t})}function cV(e,t){return new e({type:"nullable",innerType:t})}function uV(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ug(r)}})}function dV(e,t,r){return new e({type:"nonoptional",innerType:t,...V(r)})}function pV(e,t){return new e({type:"success",innerType:t})}function fV(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function mV(e,t,r){return new e({type:"pipe",in:t,out:r})}function gV(e,t){return new e({type:"readonly",innerType:t})}function hV(e,t,r){return new e({type:"template_literal",parts:t,...V(r)})}function yV(e,t){return new e({type:"lazy",getter:t})}function vV(e,t){return new e({type:"promise",innerType:t})}function K0(e,t,r){let o=V(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function W0(e,t,r){return new e({type:"custom",check:"custom",fn:t,...V(r)})}function J0(e){let t=xR(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ql(o,r.value,t._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(ql(n))}},e(r.value,r)));return t}function xR(e,t){let r=new Ke({check:"custom",...V(t)});return r._zod.check=e,r}function Y0(e){let t=new Ke({check:"describe"});return t._zod.onattach=[r=>{let o=Bt.get(r)??{};Bt.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function X0(e){let t=new Ke({check:"meta"});return t._zod.onattach=[r=>{let o=Bt.get(r)??{};Bt.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Q0(e,t){let r=V(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(o),a=new Set(n),s=e.Codec??tc,l=e.Boolean??Ql,c=e.String??Yi,u=new c({type:"string",error:r.error}),p=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:u,out:p,transform:((m,g)=>{let v=m;return r.case!=="sensitive"&&(v=v.toLowerCase()),i.has(v)?!0:a.has(v)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:f,continue:!1}),{})}),reverseTransform:((m,g)=>m===!0?o[0]||"true":n[0]||"false"),error:r.error});return f}function Cs(e,t,r,o={}){let n=V(o),i={...V(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var gp,_R=x(()=>{Qg();Kd();qx();X();gp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function ca(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Bt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ze(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let f=a.schema,m=t.processors[n.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(e,t,f,u)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Ze(p,t,u),t.seen.get(p).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&jr(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ua(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=o.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,f=e.external.uri??(g=>g);if(p)return{ref:f(p)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${f("__shared")}#/${s}/${m}`}}if(a[1]===r)return{ref:"#"};let c=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=n(a);s.def={...s.schema},c&&(s.defId=c);let u=s.schema;for(let p in u)delete u[p];u.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
39
39
 
40
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function da(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let s=e.seen.get(a);if(s.ref===null)return;let l=s.def??s.schema,c={...l},u=s.ref;if(s.ref=null,u){o(u);let f=e.seen.get(u),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,c),a._zod.parent===u)for(let v in l)v==="$ref"||v==="allOf"||v in c||delete l[v];if(m.$ref&&f.def)for(let v in l)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(l[v])===JSON.stringify(f.def[v])&&delete l[v]}let p=a._zod.parent;if(p&&p!==u){o(p);let f=e.seen.get(p);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let m in l)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(l[m])===JSON.stringify(f.def[m])&&delete l[m]}e.override({zodSchema:a,jsonSchema:l,path:s.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.external?.defs??{};for(let a of e.seen.entries()){let s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:dc(t,"input",e.processors),output:dc(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function jr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return jr(o.element,r);if(o.type==="set")return jr(o.valueType,r);if(o.type==="lazy")return jr(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return jr(o.innerType,r);if(o.type==="intersection")return jr(o.left,r)||jr(o.right,r);if(o.type==="record"||o.type==="map")return jr(o.keyType,r)||jr(o.valueType,r);if(o.type==="pipe")return jr(o.in,r)||jr(o.out,r);if(o.type==="object"){for(let n in o.shape)if(jr(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(jr(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(jr(n,r))return!0;return!!(o.rest&&jr(o.rest,r))}return!1}var Wx,dc,hp=x(()=>{Kd();Wx=(e,t={})=>r=>{let o=ca({...r,processors:t});return Ze(e,o),ua(o,e),da(o,e)},dc=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=ca({...n??{},target:i,io:t,processors:r});return Ze(e,a),ua(a,e),da(a,e)}});function Is(e,t){if("_idmap"in e){let o=e,n=ca({...t,processors:ey}),i={};for(let l of o._idmap.entries()){let[c,u]=l;Ze(u,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let l of o._idmap.entries()){let[c,u]=l;ua(n,u),a[c]=da(n,u)}if(Object.keys(i).length>0){let l=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=ca({...t,processors:ey});return Ze(e,r),ua(r,e),da(r,e)}var $V,Jx,Yx,Xx,Qx,e_,t_,r_,n_,o_,i_,a_,s_,l_,c_,u_,d_,p_,f_,m_,g_,h_,y_,v_,$_,b_,ty,x_,__,S_,k_,w_,E_,T_,z_,R_,C_,I_,ry,O_,ey,pc=x(()=>{hp();X();$V={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jx=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=$V[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),c&&(n.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Yx=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof i=="number"&&(n.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof a=="number"&&(n.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof l=="number"&&(n.multipleOf=l)},Xx=(e,t,r,o)=>{r.type="boolean"},Qx=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},e_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},t_=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},r_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},n_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},o_=(e,t,r,o)=>{r.not={}},i_=(e,t,r,o)=>{},a_=(e,t,r,o)=>{},s_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},l_=(e,t,r,o)=>{let n=e._zod.def,i=Cd(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},c_=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},u_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},d_=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},p_=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),l?l.length===1?(i.contentMediaType=l[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(n,i)},f_=(e,t,r,o)=>{r.type="boolean"},m_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},g_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},h_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},y_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},v_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},$_=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=Ze(i.element,t,{...o,path:[...o.path,"items"]})},b_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let c in a)n.properties[c]=Ze(a[c],t,{...o,path:[...o.path,"properties",c]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(c=>{let u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(n.required=Array.from(l)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=Ze(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},ty=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,l)=>Ze(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},x_=(e,t,r,o)=>{let n=e._zod.def,i=Ze(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=Ze(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l},__=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((f,m)=>Ze(f,t,{...o,path:[...o.path,a,m]})),c=i.rest?Ze(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=l,c&&(n.items=c)):t.target==="openapi-3.0"?(n.items={anyOf:l},c&&n.items.anyOf.push(c),n.minItems=l.length,c||(n.maxItems=l.length)):(n.items=l,c&&(n.additionalItems=c));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(n.minItems=u),typeof p=="number"&&(n.maxItems=p)},S_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,l=a._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let u=Ze(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let p of l)n.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Ze(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=Ze(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let c=a._zod.values;if(c){let u=[...c].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(n.required=u)}},k_=(e,t,r,o)=>{let n=e._zod.def,i=Ze(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},w_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},E_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},T_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},z_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},R_=(e,t,r,o)=>{let n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Ze(i,t,o);let a=t.seen.get(e);a.ref=i},C_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},I_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},ry=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},O_=(e,t,r,o)=>{let n=e._zod.innerType;Ze(n,t,o);let i=t.seen.get(e);i.ref=n},ey={string:Jx,number:Yx,boolean:Xx,bigint:Qx,symbol:e_,null:t_,undefined:r_,void:n_,never:o_,any:i_,unknown:a_,date:s_,enum:l_,literal:c_,nan:u_,template_literal:d_,file:p_,success:f_,custom:m_,function:g_,transform:h_,map:y_,set:v_,array:$_,object:b_,union:ty,intersection:x_,tuple:__,record:S_,nullable:k_,nonoptional:w_,default:E_,prefault:T_,catch:z_,pipe:R_,readonly:C_,promise:I_,optional:ry,lazy:O_}});var ny,SR=x(()=>{pc();hp();ny=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=ca({processors:ey,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Ze(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),ua(this.ctx,t);let o=da(this.ctx,t),{"~standard":n,...i}=o;return i}}});var kR={};var wR=x(()=>{});var Jr={};Mt(Jr,{$ZodAny:()=>jh,$ZodArray:()=>Lh,$ZodAsyncError:()=>oo,$ZodBase64:()=>wh,$ZodBase64URL:()=>Eh,$ZodBigInt:()=>Vd,$ZodBigIntFormat:()=>Ih,$ZodBoolean:()=>Ql,$ZodCIDRv4:()=>Sh,$ZodCIDRv6:()=>kh,$ZodCUID:()=>dh,$ZodCUID2:()=>ph,$ZodCatch:()=>n0,$ZodCheck:()=>Ke,$ZodCheckBigIntFormat:()=>xx,$ZodCheckEndsWith:()=>Mx,$ZodCheckGreaterThan:()=>Xg,$ZodCheckIncludes:()=>Ix,$ZodCheckLengthEquals:()=>Tx,$ZodCheckLessThan:()=>Yg,$ZodCheckLowerCase:()=>Rx,$ZodCheckMaxLength:()=>wx,$ZodCheckMaxSize:()=>_x,$ZodCheckMimeType:()=>jx,$ZodCheckMinLength:()=>Ex,$ZodCheckMinSize:()=>Sx,$ZodCheckMultipleOf:()=>$x,$ZodCheckNumberFormat:()=>bx,$ZodCheckOverwrite:()=>Nx,$ZodCheckProperty:()=>Ax,$ZodCheckRegex:()=>zx,$ZodCheckSizeEquals:()=>kx,$ZodCheckStartsWith:()=>Ox,$ZodCheckStringFormat:()=>Xl,$ZodCheckUpperCase:()=>Cx,$ZodCodec:()=>tc,$ZodCustom:()=>d0,$ZodCustomStringFormat:()=>Rh,$ZodDate:()=>Uh,$ZodDefault:()=>Qh,$ZodDiscriminatedUnion:()=>Vh,$ZodE164:()=>Th,$ZodEmail:()=>sh,$ZodEmoji:()=>ch,$ZodEncodeError:()=>Gi,$ZodEnum:()=>Fh,$ZodError:()=>jd,$ZodExactOptional:()=>Yh,$ZodFile:()=>Wh,$ZodFunction:()=>l0,$ZodGUID:()=>ih,$ZodIPv4:()=>bh,$ZodIPv6:()=>xh,$ZodISODate:()=>yh,$ZodISODateTime:()=>hh,$ZodISODuration:()=>$h,$ZodISOTime:()=>vh,$ZodIntersection:()=>Hh,$ZodJWT:()=>zh,$ZodKSUID:()=>gh,$ZodLazy:()=>u0,$ZodLiteral:()=>Kh,$ZodMAC:()=>_h,$ZodMap:()=>Bh,$ZodNaN:()=>o0,$ZodNanoID:()=>uh,$ZodNever:()=>Dh,$ZodNonOptional:()=>t0,$ZodNull:()=>Ah,$ZodNullable:()=>Xh,$ZodNumber:()=>Zd,$ZodNumberFormat:()=>Ch,$ZodObject:()=>Vx,$ZodObjectJIT:()=>Hx,$ZodOptional:()=>qd,$ZodPipe:()=>i0,$ZodPrefault:()=>e0,$ZodPromise:()=>c0,$ZodReadonly:()=>a0,$ZodRealError:()=>Wr,$ZodRecord:()=>qh,$ZodRegistry:()=>h0,$ZodSet:()=>Gh,$ZodString:()=>Yi,$ZodStringFormat:()=>qe,$ZodSuccess:()=>r0,$ZodSymbol:()=>Oh,$ZodTemplateLiteral:()=>s0,$ZodTransform:()=>Jh,$ZodTuple:()=>Hd,$ZodType:()=>se,$ZodULID:()=>fh,$ZodURL:()=>lh,$ZodUUID:()=>ah,$ZodUndefined:()=>Mh,$ZodUnion:()=>ec,$ZodUnknown:()=>Nh,$ZodVoid:()=>Ph,$ZodXID:()=>mh,$ZodXor:()=>Zh,$brand:()=>Ll,$constructor:()=>w,$input:()=>Fd,$output:()=>Gd,Doc:()=>Ld,JSONSchema:()=>kR,JSONSchemaGenerator:()=>ny,NEVER:()=>zd,TimePrecision:()=>gp,_any:()=>L0,_array:()=>Kx,_base64:()=>dp,_base64url:()=>pp,_bigint:()=>M0,_boolean:()=>I0,_catch:()=>fV,_check:()=>xR,_cidrv4:()=>cp,_cidrv6:()=>up,_coercedBigint:()=>A0,_coercedBoolean:()=>O0,_coercedDate:()=>B0,_coercedNumber:()=>w0,_coercedString:()=>v0,_cuid:()=>rp,_cuid2:()=>np,_custom:()=>K0,_date:()=>q0,_decode:()=>Zg,_decodeAsync:()=>Hg,_default:()=>uV,_discriminatedUnion:()=>XZ,_e164:()=>fp,_email:()=>Wd,_emoji:()=>ep,_encode:()=>Lg,_encodeAsync:()=>Vg,_endsWith:()=>na,_enum:()=>oV,_file:()=>F0,_float32:()=>T0,_float64:()=>z0,_gt:()=>kn,_gte:()=>Qt,_guid:()=>oc,_includes:()=>ta,_int:()=>E0,_int32:()=>R0,_int64:()=>j0,_intersection:()=>QZ,_ipv4:()=>sp,_ipv6:()=>lp,_isoDate:()=>x0,_isoDateTime:()=>b0,_isoDuration:()=>S0,_isoTime:()=>_0,_jwt:()=>mp,_ksuid:()=>ap,_lazy:()=>yV,_length:()=>ei,_literal:()=>aV,_lowercase:()=>Qi,_lt:()=>Sn,_lte:()=>Sr,_mac:()=>$0,_map:()=>rV,_max:()=>Sr,_maxLength:()=>Qo,_maxSize:()=>Eo,_mime:()=>oa,_min:()=>Qt,_minLength:()=>io,_minSize:()=>wn,_multipleOf:()=>wo,_nan:()=>G0,_nanoid:()=>tp,_nativeEnum:()=>iV,_negative:()=>sc,_never:()=>V0,_nonnegative:()=>cc,_nonoptional:()=>dV,_nonpositive:()=>lc,_normalize:()=>ia,_null:()=>U0,_nullable:()=>cV,_number:()=>k0,_optional:()=>lV,_overwrite:()=>cn,_parse:()=>Bl,_parseAsync:()=>Fl,_pipe:()=>mV,_positive:()=>ac,_promise:()=>vV,_property:()=>uc,_readonly:()=>gV,_record:()=>tV,_refine:()=>W0,_regex:()=>Xi,_safeDecode:()=>Bg,_safeDecodeAsync:()=>Fg,_safeEncode:()=>qg,_safeEncodeAsync:()=>Gg,_safeParse:()=>Wl,_safeParseAsync:()=>Jl,_set:()=>nV,_size:()=>Xo,_slugify:()=>Rs,_startsWith:()=>ra,_string:()=>y0,_stringFormat:()=>Cs,_stringbool:()=>Q0,_success:()=>pV,_superRefine:()=>J0,_symbol:()=>D0,_templateLiteral:()=>hV,_toLowerCase:()=>sa,_toUpperCase:()=>la,_transform:()=>sV,_trim:()=>aa,_tuple:()=>eV,_uint32:()=>C0,_uint64:()=>N0,_ulid:()=>op,_undefined:()=>P0,_union:()=>JZ,_unknown:()=>Z0,_uppercase:()=>ea,_url:()=>ic,_uuid:()=>Jd,_uuidv4:()=>Yd,_uuidv6:()=>Xd,_uuidv7:()=>Qd,_void:()=>H0,_xid:()=>ip,_xor:()=>YZ,clone:()=>Xt,config:()=>ht,createStandardJSONSchemaMethod:()=>dc,createToJSONSchemaMethod:()=>Wx,decode:()=>o6,decodeAsync:()=>a6,describe:()=>Y0,encode:()=>n6,encodeAsync:()=>i6,extractDefs:()=>ua,finalize:()=>da,flattenError:()=>ks,formatError:()=>ws,globalConfig:()=>Td,globalRegistry:()=>Bt,initializeContext:()=>ca,isValidBase64:()=>Zx,isValidBase64URL:()=>z6,isValidJWT:()=>R6,locales:()=>zs,meta:()=>X0,parse:()=>Gl,parseAsync:()=>Kl,prettifyError:()=>Dd,process:()=>Ze,regexes:()=>Ar,registry:()=>nc,safeDecode:()=>l6,safeDecodeAsync:()=>u6,safeEncode:()=>s6,safeEncodeAsync:()=>c6,safeParse:()=>Es,safeParseAsync:()=>Yl,toDotPath:()=>r6,toJSONSchema:()=>Is,treeifyError:()=>Nd,util:()=>P,version:()=>Px});var Tt=x(()=>{Zl();qb();Hb();qx();Qg();Ux();X();Jg();g0();Kd();Dx();_R();hp();pc();SR();wR()});var oy={};Mt(oy,{endsWith:()=>na,gt:()=>kn,gte:()=>Qt,includes:()=>ta,length:()=>ei,lowercase:()=>Qi,lt:()=>Sn,lte:()=>Sr,maxLength:()=>Qo,maxSize:()=>Eo,mime:()=>oa,minLength:()=>io,minSize:()=>wn,multipleOf:()=>wo,negative:()=>sc,nonnegative:()=>cc,nonpositive:()=>lc,normalize:()=>ia,overwrite:()=>cn,positive:()=>ac,property:()=>uc,regex:()=>Xi,size:()=>Xo,slugify:()=>Rs,startsWith:()=>ra,toLowerCase:()=>sa,toUpperCase:()=>la,trim:()=>aa,uppercase:()=>ea});var iy=x(()=>{Tt()});var ti={};Mt(ti,{ZodISODate:()=>vp,ZodISODateTime:()=>yp,ZodISODuration:()=>bp,ZodISOTime:()=>$p,date:()=>A_,datetime:()=>M_,duration:()=>N_,time:()=>j_});function M_(e){return b0(yp,e)}function A_(e){return x0(vp,e)}function j_(e){return _0($p,e)}function N_(e){return S0(bp,e)}var yp,vp,$p,bp,xp=x(()=>{Tt();Sp();yp=w("ZodISODateTime",(e,t)=>{hh.init(e,t),Be.init(e,t)});vp=w("ZodISODate",(e,t)=>{yh.init(e,t),Be.init(e,t)});$p=w("ZodISOTime",(e,t)=>{vh.init(e,t),Be.init(e,t)});bp=w("ZodISODuration",(e,t)=>{$h.init(e,t),Be.init(e,t)})});var ER,TR,Nr,D_=x(()=>{Tt();Tt();X();ER=(e,t)=>{jd.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ws(e,r)},flatten:{value:r=>ks(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Vl,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Vl,2)}},isEmpty:{get(){return e.issues.length===0}}})},TR=w("ZodError",ER),Nr=w("ZodError",ER,{Parent:Error})});var ay,sy,ly,cy,uy,dy,py,fy,my,gy,hy,yy,P_=x(()=>{Tt();D_();ay=Bl(Nr),sy=Fl(Nr),ly=Wl(Nr),cy=Jl(Nr),uy=Lg(Nr),dy=Zg(Nr),py=Vg(Nr),fy=Hg(Nr),my=qg(Nr),gy=Bg(Nr),hy=Gg(Nr),yy=Fg(Nr)});var _p={};Mt(_p,{ZodAny:()=>_y,ZodArray:()=>Ey,ZodBase64:()=>Pp,ZodBase64URL:()=>Up,ZodBigInt:()=>Ds,ZodBigIntFormat:()=>Vp,ZodBoolean:()=>Ns,ZodCIDRv4:()=>Np,ZodCIDRv6:()=>Dp,ZodCUID:()=>Rp,ZodCUID2:()=>Cp,ZodCatch:()=>Gy,ZodCodec:()=>Kp,ZodCustom:()=>_c,ZodCustomStringFormat:()=>As,ZodDate:()=>yc,ZodDefault:()=>Ly,ZodDiscriminatedUnion:()=>zy,ZodE164:()=>Lp,ZodEmail:()=>Ep,ZodEmoji:()=>Tp,ZodEnum:()=>Os,ZodExactOptional:()=>Dy,ZodFile:()=>jy,ZodFunction:()=>tv,ZodGUID:()=>fc,ZodIPv4:()=>Ap,ZodIPv6:()=>jp,ZodIntersection:()=>Ry,ZodJWT:()=>Zp,ZodKSUID:()=>Mp,ZodLazy:()=>Xy,ZodLiteral:()=>Ay,ZodMAC:()=>vy,ZodMap:()=>Oy,ZodNaN:()=>Ky,ZodNanoID:()=>zp,ZodNever:()=>ky,ZodNonOptional:()=>Gp,ZodNull:()=>xy,ZodNullable:()=>Uy,ZodNumber:()=>js,ZodNumberFormat:()=>pa,ZodObject:()=>vc,ZodOptional:()=>Bp,ZodPipe:()=>Fp,ZodPrefault:()=>Vy,ZodPromise:()=>ev,ZodReadonly:()=>Wy,ZodRecord:()=>xc,ZodSet:()=>My,ZodString:()=>Ms,ZodStringFormat:()=>Be,ZodSuccess:()=>By,ZodSymbol:()=>$y,ZodTemplateLiteral:()=>Yy,ZodTransform:()=>Ny,ZodTuple:()=>Cy,ZodType:()=>ue,ZodULID:()=>Ip,ZodURL:()=>hc,ZodUUID:()=>ao,ZodUndefined:()=>by,ZodUnion:()=>$c,ZodUnknown:()=>Sy,ZodVoid:()=>wy,ZodXID:()=>Op,ZodXor:()=>Ty,_ZodString:()=>wp,_default:()=>Zy,_function:()=>L2,any:()=>_2,array:()=>ge,base64:()=>i2,base64url:()=>a2,bigint:()=>y2,boolean:()=>St,catch:()=>Fy,check:()=>Z2,cidrv4:()=>n2,cidrv6:()=>o2,codec:()=>D2,cuid:()=>W_,cuid2:()=>J_,custom:()=>Wp,date:()=>k2,describe:()=>V2,discriminatedUnion:()=>bc,e164:()=>s2,email:()=>U_,emoji:()=>F_,enum:()=>tr,exactOptional:()=>Py,file:()=>M2,float32:()=>f2,float64:()=>m2,function:()=>L2,guid:()=>L_,hash:()=>p2,hex:()=>d2,hostname:()=>u2,httpUrl:()=>G_,instanceof:()=>q2,int:()=>kp,int32:()=>g2,int64:()=>v2,intersection:()=>Us,ipv4:()=>e2,ipv6:()=>r2,json:()=>G2,jwt:()=>l2,keyof:()=>w2,ksuid:()=>Q_,lazy:()=>Qy,literal:()=>J,looseObject:()=>er,looseRecord:()=>R2,mac:()=>t2,map:()=>C2,meta:()=>H2,nan:()=>N2,nanoid:()=>K_,nativeEnum:()=>O2,never:()=>Hp,nonoptional:()=>qy,null:()=>Ps,nullable:()=>mc,nullish:()=>A2,number:()=>je,object:()=>F,optional:()=>rt,partialRecord:()=>z2,pipe:()=>gc,prefault:()=>Hy,preprocess:()=>Sc,promise:()=>U2,readonly:()=>Jy,record:()=>We,refine:()=>rv,set:()=>I2,strictObject:()=>E2,string:()=>I,stringFormat:()=>c2,stringbool:()=>B2,success:()=>j2,superRefine:()=>nv,symbol:()=>b2,templateLiteral:()=>P2,transform:()=>qp,tuple:()=>Iy,uint32:()=>h2,uint64:()=>$2,ulid:()=>Y_,undefined:()=>x2,union:()=>Ve,unknown:()=>Ge,url:()=>B_,uuid:()=>Z_,uuidv4:()=>V_,uuidv6:()=>H_,uuidv7:()=>q_,void:()=>S2,xid:()=>X_,xor:()=>T2});function I(e){return y0(Ms,e)}function U_(e){return Wd(Ep,e)}function L_(e){return oc(fc,e)}function Z_(e){return Jd(ao,e)}function V_(e){return Yd(ao,e)}function H_(e){return Xd(ao,e)}function q_(e){return Qd(ao,e)}function B_(e){return ic(hc,e)}function G_(e){return ic(hc,{protocol:/^https?$/,hostname:Ar.domain,...P.normalizeParams(e)})}function F_(e){return ep(Tp,e)}function K_(e){return tp(zp,e)}function W_(e){return rp(Rp,e)}function J_(e){return np(Cp,e)}function Y_(e){return op(Ip,e)}function X_(e){return ip(Op,e)}function Q_(e){return ap(Mp,e)}function e2(e){return sp(Ap,e)}function t2(e){return $0(vy,e)}function r2(e){return lp(jp,e)}function n2(e){return cp(Np,e)}function o2(e){return up(Dp,e)}function i2(e){return dp(Pp,e)}function a2(e){return pp(Up,e)}function s2(e){return fp(Lp,e)}function l2(e){return mp(Zp,e)}function c2(e,t,r={}){return Cs(As,e,t,r)}function u2(e){return Cs(As,"hostname",Ar.hostname,e)}function d2(e){return Cs(As,"hex",Ar.hex,e)}function p2(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Ar[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Cs(As,o,n,t)}function je(e){return k0(js,e)}function kp(e){return E0(pa,e)}function f2(e){return T0(pa,e)}function m2(e){return z0(pa,e)}function g2(e){return R0(pa,e)}function h2(e){return C0(pa,e)}function St(e){return I0(Ns,e)}function y2(e){return M0(Ds,e)}function v2(e){return j0(Vp,e)}function $2(e){return N0(Vp,e)}function b2(e){return D0($y,e)}function x2(e){return P0(by,e)}function Ps(e){return U0(xy,e)}function _2(){return L0(_y)}function Ge(){return Z0(Sy)}function Hp(e){return V0(ky,e)}function S2(e){return H0(wy,e)}function k2(e){return q0(yc,e)}function ge(e,t){return Kx(Ey,e,t)}function w2(e){let t=e._zod.def.shape;return tr(Object.keys(t))}function F(e,t){let r={type:"object",shape:e??{},...P.normalizeParams(t)};return new vc(r)}function E2(e,t){return new vc({type:"object",shape:e,catchall:Hp(),...P.normalizeParams(t)})}function er(e,t){return new vc({type:"object",shape:e,catchall:Ge(),...P.normalizeParams(t)})}function Ve(e,t){return new $c({type:"union",options:e,...P.normalizeParams(t)})}function T2(e,t){return new Ty({type:"union",options:e,inclusive:!1,...P.normalizeParams(t)})}function bc(e,t,r){return new zy({type:"union",options:t,discriminator:e,...P.normalizeParams(r)})}function Us(e,t){return new Ry({type:"intersection",left:e,right:t})}function Iy(e,t,r){let o=t instanceof se,n=o?r:t,i=o?t:null;return new Cy({type:"tuple",items:e,rest:i,...P.normalizeParams(n)})}function We(e,t,r){return new xc({type:"record",keyType:e,valueType:t,...P.normalizeParams(r)})}function z2(e,t,r){let o=Xt(e);return o._zod.values=void 0,new xc({type:"record",keyType:o,valueType:t,...P.normalizeParams(r)})}function R2(e,t,r){return new xc({type:"record",keyType:e,valueType:t,mode:"loose",...P.normalizeParams(r)})}function C2(e,t,r){return new Oy({type:"map",keyType:e,valueType:t,...P.normalizeParams(r)})}function I2(e,t){return new My({type:"set",valueType:e,...P.normalizeParams(t)})}function tr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Os({type:"enum",entries:r,...P.normalizeParams(t)})}function O2(e,t){return new Os({type:"enum",entries:e,...P.normalizeParams(t)})}function J(e,t){return new Ay({type:"literal",values:Array.isArray(e)?e:[e],...P.normalizeParams(t)})}function M2(e){return F0(jy,e)}function qp(e){return new Ny({type:"transform",transform:e})}function rt(e){return new Bp({type:"optional",innerType:e})}function Py(e){return new Dy({type:"optional",innerType:e})}function mc(e){return new Uy({type:"nullable",innerType:e})}function A2(e){return rt(mc(e))}function Zy(e,t){return new Ly({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function Hy(e,t){return new Vy({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function qy(e,t){return new Gp({type:"nonoptional",innerType:e,...P.normalizeParams(t)})}function j2(e){return new By({type:"success",innerType:e})}function Fy(e,t){return new Gy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function N2(e){return G0(Ky,e)}function gc(e,t){return new Fp({type:"pipe",in:e,out:t})}function D2(e,t,r){return new Kp({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Jy(e){return new Wy({type:"readonly",innerType:e})}function P2(e,t){return new Yy({type:"template_literal",parts:e,...P.normalizeParams(t)})}function Qy(e){return new Xy({type:"lazy",getter:e})}function U2(e){return new ev({type:"promise",innerType:e})}function L2(e){return new tv({type:"function",input:Array.isArray(e?.input)?Iy(e?.input):e?.input??ge(Ge()),output:e?.output??Ge()})}function Z2(e){let t=new Ke({check:"custom"});return t._zod.check=e,t}function Wp(e,t){return K0(_c,e??(()=>!0),t)}function rv(e,t={}){return W0(_c,e,t)}function nv(e){return J0(e)}function q2(e,t={}){let r=new _c({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...P.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}function G2(e){let t=Qy(()=>Ve([I(e),je(),St(),Ps(),ge(t),We(I(),t)]));return t}function Sc(e,t){return gc(qp(e),t)}var ue,wp,Ms,Be,Ep,fc,ao,hc,Tp,zp,Rp,Cp,Ip,Op,Mp,Ap,vy,jp,Np,Dp,Pp,Up,Lp,Zp,As,js,pa,Ns,Ds,Vp,$y,by,xy,_y,Sy,ky,wy,yc,Ey,vc,$c,Ty,zy,Ry,Cy,xc,Oy,My,Os,Ay,jy,Ny,Bp,Dy,Uy,Ly,Vy,Gp,By,Gy,Ky,Fp,Kp,Wy,Yy,Xy,ev,tv,_c,V2,H2,B2,Sp=x(()=>{Tt();Tt();pc();hp();iy();xp();P_();ue=w("ZodType",(e,t)=>(se.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dc(e,"input"),output:dc(e,"output")}}),e.toJSONSchema=Wx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(P.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(r,o)=>Xt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>ay(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>ly(e,r,o),e.parseAsync=async(r,o)=>sy(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>cy(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>uy(e,r,o),e.decode=(r,o)=>dy(e,r,o),e.encodeAsync=async(r,o)=>py(e,r,o),e.decodeAsync=async(r,o)=>fy(e,r,o),e.safeEncode=(r,o)=>my(e,r,o),e.safeDecode=(r,o)=>gy(e,r,o),e.safeEncodeAsync=async(r,o)=>hy(e,r,o),e.safeDecodeAsync=async(r,o)=>yy(e,r,o),e.refine=(r,o)=>e.check(rv(r,o)),e.superRefine=r=>e.check(nv(r)),e.overwrite=r=>e.check(cn(r)),e.optional=()=>rt(e),e.exactOptional=()=>Py(e),e.nullable=()=>mc(e),e.nullish=()=>rt(mc(e)),e.nonoptional=r=>qy(e,r),e.array=()=>ge(e),e.or=r=>Ve([e,r]),e.and=r=>Us(e,r),e.transform=r=>gc(e,qp(r)),e.default=r=>Zy(e,r),e.prefault=r=>Hy(e,r),e.catch=r=>Fy(e,r),e.pipe=r=>gc(e,r),e.readonly=()=>Jy(e),e.describe=r=>{let o=e.clone();return Bt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Bt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Bt.get(e);let o=e.clone();return Bt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),wp=w("_ZodString",(e,t)=>{Yi.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Jx(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(Xi(...o)),e.includes=(...o)=>e.check(ta(...o)),e.startsWith=(...o)=>e.check(ra(...o)),e.endsWith=(...o)=>e.check(na(...o)),e.min=(...o)=>e.check(io(...o)),e.max=(...o)=>e.check(Qo(...o)),e.length=(...o)=>e.check(ei(...o)),e.nonempty=(...o)=>e.check(io(1,...o)),e.lowercase=o=>e.check(Qi(o)),e.uppercase=o=>e.check(ea(o)),e.trim=()=>e.check(aa()),e.normalize=(...o)=>e.check(ia(...o)),e.toLowerCase=()=>e.check(sa()),e.toUpperCase=()=>e.check(la()),e.slugify=()=>e.check(Rs())}),Ms=w("ZodString",(e,t)=>{Yi.init(e,t),wp.init(e,t),e.email=r=>e.check(Wd(Ep,r)),e.url=r=>e.check(ic(hc,r)),e.jwt=r=>e.check(mp(Zp,r)),e.emoji=r=>e.check(ep(Tp,r)),e.guid=r=>e.check(oc(fc,r)),e.uuid=r=>e.check(Jd(ao,r)),e.uuidv4=r=>e.check(Yd(ao,r)),e.uuidv6=r=>e.check(Xd(ao,r)),e.uuidv7=r=>e.check(Qd(ao,r)),e.nanoid=r=>e.check(tp(zp,r)),e.guid=r=>e.check(oc(fc,r)),e.cuid=r=>e.check(rp(Rp,r)),e.cuid2=r=>e.check(np(Cp,r)),e.ulid=r=>e.check(op(Ip,r)),e.base64=r=>e.check(dp(Pp,r)),e.base64url=r=>e.check(pp(Up,r)),e.xid=r=>e.check(ip(Op,r)),e.ksuid=r=>e.check(ap(Mp,r)),e.ipv4=r=>e.check(sp(Ap,r)),e.ipv6=r=>e.check(lp(jp,r)),e.cidrv4=r=>e.check(cp(Np,r)),e.cidrv6=r=>e.check(up(Dp,r)),e.e164=r=>e.check(fp(Lp,r)),e.datetime=r=>e.check(M_(r)),e.date=r=>e.check(A_(r)),e.time=r=>e.check(j_(r)),e.duration=r=>e.check(N_(r))});Be=w("ZodStringFormat",(e,t)=>{qe.init(e,t),wp.init(e,t)}),Ep=w("ZodEmail",(e,t)=>{sh.init(e,t),Be.init(e,t)});fc=w("ZodGUID",(e,t)=>{ih.init(e,t),Be.init(e,t)});ao=w("ZodUUID",(e,t)=>{ah.init(e,t),Be.init(e,t)});hc=w("ZodURL",(e,t)=>{lh.init(e,t),Be.init(e,t)});Tp=w("ZodEmoji",(e,t)=>{ch.init(e,t),Be.init(e,t)});zp=w("ZodNanoID",(e,t)=>{uh.init(e,t),Be.init(e,t)});Rp=w("ZodCUID",(e,t)=>{dh.init(e,t),Be.init(e,t)});Cp=w("ZodCUID2",(e,t)=>{ph.init(e,t),Be.init(e,t)});Ip=w("ZodULID",(e,t)=>{fh.init(e,t),Be.init(e,t)});Op=w("ZodXID",(e,t)=>{mh.init(e,t),Be.init(e,t)});Mp=w("ZodKSUID",(e,t)=>{gh.init(e,t),Be.init(e,t)});Ap=w("ZodIPv4",(e,t)=>{bh.init(e,t),Be.init(e,t)});vy=w("ZodMAC",(e,t)=>{_h.init(e,t),Be.init(e,t)});jp=w("ZodIPv6",(e,t)=>{xh.init(e,t),Be.init(e,t)});Np=w("ZodCIDRv4",(e,t)=>{Sh.init(e,t),Be.init(e,t)});Dp=w("ZodCIDRv6",(e,t)=>{kh.init(e,t),Be.init(e,t)});Pp=w("ZodBase64",(e,t)=>{wh.init(e,t),Be.init(e,t)});Up=w("ZodBase64URL",(e,t)=>{Eh.init(e,t),Be.init(e,t)});Lp=w("ZodE164",(e,t)=>{Th.init(e,t),Be.init(e,t)});Zp=w("ZodJWT",(e,t)=>{zh.init(e,t),Be.init(e,t)});As=w("ZodCustomStringFormat",(e,t)=>{Rh.init(e,t),Be.init(e,t)});js=w("ZodNumber",(e,t)=>{Zd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Yx(e,o,n,i),e.gt=(o,n)=>e.check(kn(o,n)),e.gte=(o,n)=>e.check(Qt(o,n)),e.min=(o,n)=>e.check(Qt(o,n)),e.lt=(o,n)=>e.check(Sn(o,n)),e.lte=(o,n)=>e.check(Sr(o,n)),e.max=(o,n)=>e.check(Sr(o,n)),e.int=o=>e.check(kp(o)),e.safe=o=>e.check(kp(o)),e.positive=o=>e.check(kn(0,o)),e.nonnegative=o=>e.check(Qt(0,o)),e.negative=o=>e.check(Sn(0,o)),e.nonpositive=o=>e.check(Sr(0,o)),e.multipleOf=(o,n)=>e.check(wo(o,n)),e.step=(o,n)=>e.check(wo(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});pa=w("ZodNumberFormat",(e,t)=>{Ch.init(e,t),js.init(e,t)});Ns=w("ZodBoolean",(e,t)=>{Ql.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xx(e,r,o,n)});Ds=w("ZodBigInt",(e,t)=>{Vd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Qx(e,o,n,i),e.gte=(o,n)=>e.check(Qt(o,n)),e.min=(o,n)=>e.check(Qt(o,n)),e.gt=(o,n)=>e.check(kn(o,n)),e.gte=(o,n)=>e.check(Qt(o,n)),e.min=(o,n)=>e.check(Qt(o,n)),e.lt=(o,n)=>e.check(Sn(o,n)),e.lte=(o,n)=>e.check(Sr(o,n)),e.max=(o,n)=>e.check(Sr(o,n)),e.positive=o=>e.check(kn(BigInt(0),o)),e.negative=o=>e.check(Sn(BigInt(0),o)),e.nonpositive=o=>e.check(Sr(BigInt(0),o)),e.nonnegative=o=>e.check(Qt(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(wo(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});Vp=w("ZodBigIntFormat",(e,t)=>{Ih.init(e,t),Ds.init(e,t)});$y=w("ZodSymbol",(e,t)=>{Oh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>e_(e,r,o,n)});by=w("ZodUndefined",(e,t)=>{Mh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>r_(e,r,o,n)});xy=w("ZodNull",(e,t)=>{Ah.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>t_(e,r,o,n)});_y=w("ZodAny",(e,t)=>{jh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>i_(e,r,o,n)});Sy=w("ZodUnknown",(e,t)=>{Nh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>a_(e,r,o,n)});ky=w("ZodNever",(e,t)=>{Dh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>o_(e,r,o,n)});wy=w("ZodVoid",(e,t)=>{Ph.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>n_(e,r,o,n)});yc=w("ZodDate",(e,t)=>{Uh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>s_(e,o,n,i),e.min=(o,n)=>e.check(Qt(o,n)),e.max=(o,n)=>e.check(Sr(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});Ey=w("ZodArray",(e,t)=>{Lh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$_(e,r,o,n),e.element=t.element,e.min=(r,o)=>e.check(io(r,o)),e.nonempty=r=>e.check(io(1,r)),e.max=(r,o)=>e.check(Qo(r,o)),e.length=(r,o)=>e.check(ei(r,o)),e.unwrap=()=>e.element});vc=w("ZodObject",(e,t)=>{Hx.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>b_(e,r,o,n),P.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>tr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ge()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ge()}),e.strict=()=>e.clone({...e._zod.def,catchall:Hp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>P.extend(e,r),e.safeExtend=r=>P.safeExtend(e,r),e.merge=r=>P.merge(e,r),e.pick=r=>P.pick(e,r),e.omit=r=>P.omit(e,r),e.partial=(...r)=>P.partial(Bp,e,r[0]),e.required=(...r)=>P.required(Gp,e,r[0])});$c=w("ZodUnion",(e,t)=>{ec.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ty(e,r,o,n),e.options=t.options});Ty=w("ZodXor",(e,t)=>{$c.init(e,t),Zh.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ty(e,r,o,n),e.options=t.options});zy=w("ZodDiscriminatedUnion",(e,t)=>{$c.init(e,t),Vh.init(e,t)});Ry=w("ZodIntersection",(e,t)=>{Hh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>x_(e,r,o,n)});Cy=w("ZodTuple",(e,t)=>{Hd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>__(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});xc=w("ZodRecord",(e,t)=>{qh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>S_(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});Oy=w("ZodMap",(e,t)=>{Bh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>y_(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(wn(...r)),e.nonempty=r=>e.check(wn(1,r)),e.max=(...r)=>e.check(Eo(...r)),e.size=(...r)=>e.check(Xo(...r))});My=w("ZodSet",(e,t)=>{Gh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>v_(e,r,o,n),e.min=(...r)=>e.check(wn(...r)),e.nonempty=r=>e.check(wn(1,r)),e.max=(...r)=>e.check(Eo(...r)),e.size=(...r)=>e.check(Xo(...r))});Os=w("ZodEnum",(e,t)=>{Fh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>l_(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Os({...t,checks:[],...P.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Os({...t,checks:[],...P.normalizeParams(n),entries:i})}});Ay=w("ZodLiteral",(e,t)=>{Kh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>c_(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});jy=w("ZodFile",(e,t)=>{Wh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>p_(e,r,o,n),e.min=(r,o)=>e.check(wn(r,o)),e.max=(r,o)=>e.check(Eo(r,o)),e.mime=(r,o)=>e.check(oa(Array.isArray(r)?r:[r],o))});Ny=w("ZodTransform",(e,t)=>{Jh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>h_(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Gi(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(P.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(P.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});Bp=w("ZodOptional",(e,t)=>{qd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ry(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Dy=w("ZodExactOptional",(e,t)=>{Yh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ry(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Uy=w("ZodNullable",(e,t)=>{Xh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>k_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Ly=w("ZodDefault",(e,t)=>{Qh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>E_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Vy=w("ZodPrefault",(e,t)=>{e0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>T_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Gp=w("ZodNonOptional",(e,t)=>{t0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>w_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});By=w("ZodSuccess",(e,t)=>{r0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>f_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Gy=w("ZodCatch",(e,t)=>{n0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>z_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Ky=w("ZodNaN",(e,t)=>{o0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>u_(e,r,o,n)});Fp=w("ZodPipe",(e,t)=>{i0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>R_(e,r,o,n),e.in=t.in,e.out=t.out});Kp=w("ZodCodec",(e,t)=>{Fp.init(e,t),tc.init(e,t)});Wy=w("ZodReadonly",(e,t)=>{a0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>C_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Yy=w("ZodTemplateLiteral",(e,t)=>{s0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>d_(e,r,o,n)});Xy=w("ZodLazy",(e,t)=>{u0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>O_(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});ev=w("ZodPromise",(e,t)=>{c0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>I_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});tv=w("ZodFunction",(e,t)=>{l0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>g_(e,r,o,n)});_c=w("ZodCustom",(e,t)=>{d0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>m_(e,r,o,n)});V2=Y0,H2=X0;B2=(...e)=>Q0({Codec:Kp,Boolean:Ns,String:Ms},...e)});function RR(e){ht({customError:e})}function CR(){return ht().customError}var zR,ov,IR=x(()=>{Tt();Tt();zR={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};ov||(ov={})});function SV(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function kV(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function OR(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return B.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return B.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=kV(n,t),a=kr(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return B.null();if(n.length===0)return B.never();if(n.length===1)return B.literal(n[0]);if(n.every(a=>typeof a=="string"))return B.enum(n);let i=n.map(a=>B.literal(a));return i.length<2?i[0]:B.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return B.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return OR(a,t)});return n.length===0?B.never():n.length===1?n[0]:B.union(n)}if(!r)return B.any();let o;switch(r){case"string":{let n=B.string();if(e.format){let i=e.format;i==="email"?n=n.check(B.email()):i==="uri"||i==="uri-reference"?n=n.check(B.url()):i==="uuid"||i==="guid"?n=n.check(B.uuid()):i==="date-time"?n=n.check(B.iso.datetime()):i==="date"?n=n.check(B.iso.date()):i==="time"?n=n.check(B.iso.time()):i==="duration"?n=n.check(B.iso.duration()):i==="ipv4"?n=n.check(B.ipv4()):i==="ipv6"?n=n.check(B.ipv6()):i==="mac"?n=n.check(B.mac()):i==="cidr"?n=n.check(B.cidrv4()):i==="cidr-v6"?n=n.check(B.cidrv6()):i==="base64"?n=n.check(B.base64()):i==="base64url"?n=n.check(B.base64url()):i==="e164"?n=n.check(B.e164()):i==="jwt"?n=n.check(B.jwt()):i==="emoji"?n=n.check(B.emoji()):i==="nanoid"?n=n.check(B.nanoid()):i==="cuid"?n=n.check(B.cuid()):i==="cuid2"?n=n.check(B.cuid2()):i==="ulid"?n=n.check(B.ulid()):i==="xid"?n=n.check(B.xid()):i==="ksuid"&&(n=n.check(B.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?B.number().int():B.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=B.boolean();break}case"null":{o=B.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[l,c]of Object.entries(i)){let u=kr(c,t);n[l]=a.has(l)?u:u.optional()}if(e.propertyNames){let l=kr(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?kr(e.additionalProperties,t):B.any();if(Object.keys(n).length===0){o=B.record(l,c);break}let u=B.object(n).passthrough(),p=B.looseRecord(l,c);o=B.intersection(u,p);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let f of c){let m=kr(l[f],t),g=B.string().regex(new RegExp(f));u.push(B.looseRecord(g,m))}let p=[];if(Object.keys(n).length>0&&p.push(B.object(n).passthrough()),p.push(...u),p.length===0)o=B.object({}).passthrough();else if(p.length===1)o=p[0];else{let f=B.intersection(p[0],p[1]);for(let m=2;m<p.length;m++)f=B.intersection(f,p[m]);o=f}break}let s=B.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(kr(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(l=>kr(l,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?kr(i,t):void 0;s?o=B.tuple(a).rest(s):o=B.tuple(a),typeof e.minItems=="number"&&(o=o.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(B.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(l=>kr(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?kr(e.additionalItems,t):void 0;s?o=B.tuple(a).rest(s):o=B.tuple(a),typeof e.minItems=="number"&&(o=o.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(B.maxLength(e.maxItems)))}else if(i!==void 0){let a=kr(i,t),s=B.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=B.array(B.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function kr(e,t){if(typeof e=="boolean")return e?B.any():B.never();let r=OR(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>kr(c,t)),l=B.union(s);r=o?B.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>kr(c,t)),l=B.xor(s);r=o?B.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:B.any();else{let s=o?r:kr(e.allOf[0],t),l=o?0:1;for(let c=l;c<e.allOf.length;c++)s=B.intersection(s,kr(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=B.nullable(r)),e.readOnly===!0&&(r=B.readonly(r));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))_V.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function F2(e,t){if(typeof e=="boolean")return e?B.any():B.never();let r=SV(e,t?.defaultTarget),o=e.$defs||e.definitions||{},n={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Bt};return kr(e,n)}var B,_V,MR=x(()=>{Kd();iy();xp();Sp();B={..._p,...oy,iso:ti},_V=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var iv={};Mt(iv,{bigint:()=>zV,boolean:()=>TV,date:()=>RV,number:()=>EV,string:()=>wV});function wV(e){return v0(Ms,e)}function EV(e){return w0(js,e)}function TV(e){return O0(Ns,e)}function zV(e){return A0(Ds,e)}function RV(e){return B0(yc,e)}var AR=x(()=>{Tt();Sp()});var d={};Mt(d,{$brand:()=>Ll,$input:()=>Fd,$output:()=>Gd,NEVER:()=>zd,TimePrecision:()=>gp,ZodAny:()=>_y,ZodArray:()=>Ey,ZodBase64:()=>Pp,ZodBase64URL:()=>Up,ZodBigInt:()=>Ds,ZodBigIntFormat:()=>Vp,ZodBoolean:()=>Ns,ZodCIDRv4:()=>Np,ZodCIDRv6:()=>Dp,ZodCUID:()=>Rp,ZodCUID2:()=>Cp,ZodCatch:()=>Gy,ZodCodec:()=>Kp,ZodCustom:()=>_c,ZodCustomStringFormat:()=>As,ZodDate:()=>yc,ZodDefault:()=>Ly,ZodDiscriminatedUnion:()=>zy,ZodE164:()=>Lp,ZodEmail:()=>Ep,ZodEmoji:()=>Tp,ZodEnum:()=>Os,ZodError:()=>TR,ZodExactOptional:()=>Dy,ZodFile:()=>jy,ZodFirstPartyTypeKind:()=>ov,ZodFunction:()=>tv,ZodGUID:()=>fc,ZodIPv4:()=>Ap,ZodIPv6:()=>jp,ZodISODate:()=>vp,ZodISODateTime:()=>yp,ZodISODuration:()=>bp,ZodISOTime:()=>$p,ZodIntersection:()=>Ry,ZodIssueCode:()=>zR,ZodJWT:()=>Zp,ZodKSUID:()=>Mp,ZodLazy:()=>Xy,ZodLiteral:()=>Ay,ZodMAC:()=>vy,ZodMap:()=>Oy,ZodNaN:()=>Ky,ZodNanoID:()=>zp,ZodNever:()=>ky,ZodNonOptional:()=>Gp,ZodNull:()=>xy,ZodNullable:()=>Uy,ZodNumber:()=>js,ZodNumberFormat:()=>pa,ZodObject:()=>vc,ZodOptional:()=>Bp,ZodPipe:()=>Fp,ZodPrefault:()=>Vy,ZodPromise:()=>ev,ZodReadonly:()=>Wy,ZodRealError:()=>Nr,ZodRecord:()=>xc,ZodSet:()=>My,ZodString:()=>Ms,ZodStringFormat:()=>Be,ZodSuccess:()=>By,ZodSymbol:()=>$y,ZodTemplateLiteral:()=>Yy,ZodTransform:()=>Ny,ZodTuple:()=>Cy,ZodType:()=>ue,ZodULID:()=>Ip,ZodURL:()=>hc,ZodUUID:()=>ao,ZodUndefined:()=>by,ZodUnion:()=>$c,ZodUnknown:()=>Sy,ZodVoid:()=>wy,ZodXID:()=>Op,ZodXor:()=>Ty,_ZodString:()=>wp,_default:()=>Zy,_function:()=>L2,any:()=>_2,array:()=>ge,base64:()=>i2,base64url:()=>a2,bigint:()=>y2,boolean:()=>St,catch:()=>Fy,check:()=>Z2,cidrv4:()=>n2,cidrv6:()=>o2,clone:()=>Xt,codec:()=>D2,coerce:()=>iv,config:()=>ht,core:()=>Jr,cuid:()=>W_,cuid2:()=>J_,custom:()=>Wp,date:()=>k2,decode:()=>dy,decodeAsync:()=>fy,describe:()=>V2,discriminatedUnion:()=>bc,e164:()=>s2,email:()=>U_,emoji:()=>F_,encode:()=>uy,encodeAsync:()=>py,endsWith:()=>na,enum:()=>tr,exactOptional:()=>Py,file:()=>M2,flattenError:()=>ks,float32:()=>f2,float64:()=>m2,formatError:()=>ws,fromJSONSchema:()=>F2,function:()=>L2,getErrorMap:()=>CR,globalRegistry:()=>Bt,gt:()=>kn,gte:()=>Qt,guid:()=>L_,hash:()=>p2,hex:()=>d2,hostname:()=>u2,httpUrl:()=>G_,includes:()=>ta,instanceof:()=>q2,int:()=>kp,int32:()=>g2,int64:()=>v2,intersection:()=>Us,ipv4:()=>e2,ipv6:()=>r2,iso:()=>ti,json:()=>G2,jwt:()=>l2,keyof:()=>w2,ksuid:()=>Q_,lazy:()=>Qy,length:()=>ei,literal:()=>J,locales:()=>zs,looseObject:()=>er,looseRecord:()=>R2,lowercase:()=>Qi,lt:()=>Sn,lte:()=>Sr,mac:()=>t2,map:()=>C2,maxLength:()=>Qo,maxSize:()=>Eo,meta:()=>H2,mime:()=>oa,minLength:()=>io,minSize:()=>wn,multipleOf:()=>wo,nan:()=>N2,nanoid:()=>K_,nativeEnum:()=>O2,negative:()=>sc,never:()=>Hp,nonnegative:()=>cc,nonoptional:()=>qy,nonpositive:()=>lc,normalize:()=>ia,null:()=>Ps,nullable:()=>mc,nullish:()=>A2,number:()=>je,object:()=>F,optional:()=>rt,overwrite:()=>cn,parse:()=>ay,parseAsync:()=>sy,partialRecord:()=>z2,pipe:()=>gc,positive:()=>ac,prefault:()=>Hy,preprocess:()=>Sc,prettifyError:()=>Dd,promise:()=>U2,property:()=>uc,readonly:()=>Jy,record:()=>We,refine:()=>rv,regex:()=>Xi,regexes:()=>Ar,registry:()=>nc,safeDecode:()=>gy,safeDecodeAsync:()=>yy,safeEncode:()=>my,safeEncodeAsync:()=>hy,safeParse:()=>ly,safeParseAsync:()=>cy,set:()=>I2,setErrorMap:()=>RR,size:()=>Xo,slugify:()=>Rs,startsWith:()=>ra,strictObject:()=>E2,string:()=>I,stringFormat:()=>c2,stringbool:()=>B2,success:()=>j2,superRefine:()=>nv,symbol:()=>b2,templateLiteral:()=>P2,toJSONSchema:()=>Is,toLowerCase:()=>sa,toUpperCase:()=>la,transform:()=>qp,treeifyError:()=>Nd,trim:()=>aa,tuple:()=>Iy,uint32:()=>h2,uint64:()=>$2,ulid:()=>Y_,undefined:()=>x2,union:()=>Ve,unknown:()=>Ge,uppercase:()=>ea,url:()=>B_,util:()=>P,uuid:()=>Z_,uuidv4:()=>V_,uuidv6:()=>H_,uuidv7:()=>q_,void:()=>S2,xid:()=>X_,xor:()=>T2});var Jp=x(()=>{Tt();Sp();iy();D_();P_();IR();Tt();Bx();Tt();pc();MR();g0();xp();xp();AR();ht(p0())});var To=x(()=>{Jp();Jp()});var CV,IV,OV,jR,K2=x(()=>{"use strict";To();CV=/^--ggui-[a-zA-Z0-9-]+$/,IV=/^[^;{}<>@]*$/,OV=d.string().min(1).max(256).regex(IV,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment"),jR=d.object({mode:d.enum(["light","dark"]),cssVariables:d.record(d.string().regex(CV,"css var key must be --ggui-*"),OV).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:d.string().min(1).max(64).optional()}).strict()});function Dr(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var En=x(()=>{"use strict"});var AV,Y2,sv,Yp,Xp=x(()=>{"use strict";AV="draft-2026-06-12",Y2=AV,sv="UPGRADE_REQUIRED",Yp=Object.freeze([Y2])});var PR=x(()=>{"use strict"});var UR=x(()=>{"use strict"});var LR=x(()=>{"use strict"});var ZR=x(()=>{"use strict"});var VR=x(()=>{"use strict";En()});var HR=x(()=>{"use strict"});var qR=x(()=>{"use strict"});var BR=x(()=>{"use strict"});var Qp,GR,X2,FR,ef=x(()=>{"use strict";Qp="@ggui-ai/gadgets",GR="0.5.0-rc.0",X2=[{package:Qp,version:GR,exports:[{hook:"useCamera",permission:"camera",description:"Capture stills or live video from the device camera.",usage:"Mount when the intent names photo capture, QR / barcode scanning, video recording, or anything that requires a camera feed. The hook returns a stream once `start()` resolves; thread the resulting blob or stream URL into a contextSpec slot or an actionSpec payload to surface it to the agent.",example:{call:"const cam = useCamera({ facingMode: 'environment' }); // on button click: await cam.start()",returns:{status:"completed",value:{dataUrl:"data:image/png;base64,\u2026",width:640,height:480,mimeType:"image/png"}}}},{hook:"useClipboardPaste",permission:"clipboard-read",description:"Read the system clipboard contents on user gesture.",usage:"Mount when the intent involves importing copied content (paste-into-form, paste-image-to-upload, paste-link). The Permissions API requires a user gesture; gate `start()` behind a button click. Returned value lands in a contextSpec slot or an actionSpec payload.",example:{call:"const paste = useClipboardPaste(); // on button click: await paste.start()",returns:{status:"completed",value:"pasted clipboard text"}}},{hook:"useClipboardWrite",permission:"clipboard-write",description:"Write to the system clipboard on user gesture.",usage:"Mount when the intent includes copying generated text, share links, codes, or transcripts to the system clipboard. Fire an actionSpec event so the agent observes the act (it does not see the written value \u2014 that stays component-local).",example:{call:"const write = useClipboardWrite({ text: 'hello' }); // on button click: await write.start()",returns:{status:"completed",value:"hello"}}},{hook:"useFilePicker",description:"Open the native file picker and read selected files.",usage:"Mount when the intent names file upload, attachment selection, or document import. No permission required. The hook returns the picked files plus metadata; thread file refs / data URLs into a contextSpec slot or actionSpec payload.",example:{call:"const picker = useFilePicker({ accept: 'image/*' }); // on button click: await picker.start()",returns:{status:"completed",value:{files:[{name:"photo.png",type:"image/png",size:12345,_file:"<File>"}]}}}},{hook:"useGeolocation",permission:"geolocation",description:"Resolve the device's current geolocation.",usage:'Mount when the intent names "current location", maps, nearby search, location-aware UI. Browser prompts the user on `start()`; the hook returns coordinates once granted. Thread the resolved coords into a contextSpec slot so the agent observes the latest fix.',example:{call:"const geo = useGeolocation(); // on button click: await geo.start()",returns:{status:"completed",value:{latitude:37.7749,longitude:-122.4194,accuracy:20,timestamp:1718e9}}}},{hook:"useMicrophone",permission:"microphone",description:"Capture audio from the device microphone.",usage:"Mount when the intent names voice memos, audio messages, dictation, voice-driven UI. Returns an audio stream / blob; thread it into an actionSpec payload at recording-stop, or into a contextSpec slot for live transcription pipelines.",example:{call:"const mic = useMicrophone(); // record on click: await mic.start(); end with mic.stop()",returns:{status:"completed",value:{blob:"<Blob>",durationMs:4200,mimeType:"audio/webm"}}}},{hook:"useNotifications",permission:"notifications",description:"Show system / browser notifications to the user.",usage:"Mount when the intent involves alerting the user about something (reminders, completion of long tasks, incoming messages) and the UI may be in the background. Permission is prompted on first `start()`; the agent does NOT see notification dismissal directly \u2014 surface it via an actionSpec if needed.",example:{call:"const notify = useNotifications({ title: 'Done' }); // after the task completes: await notify.start()",returns:{status:"completed",value:{outcome:"closed"}}}}]}],FR=Object.freeze(new Set(X2.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)))});var Q2=x(()=>{"use strict"});var kc,tf,lv=x(()=>{"use strict";kc=/^use[A-Z][A-Za-z0-9]*$/,tf=/^[A-Z][A-Za-z0-9]*$/});var cv,Ble,rf=x(()=>{"use strict";ef();Q2();lv();cv=["geolocation","notifications","microphone","camera","persistent-storage","midi","clipboard-read","clipboard-write","speaker-selection","storage-access","background-sync","accelerometer","gyroscope","magnetometer","ambient-light-sensor","screen-wake-lock"],Ble=new Set(cv)});var ut,ri,DV,PV,UV,LV,ZV,VV,HV,qV,BV,GV,uv,FV,KR,YR,KV,WV,XR,WR,JR,QR,JV,YV,Yle,nf,Xle,XV,QV,eH,Qle,zo,Ls=x(()=>{"use strict";To();rf();ef();lv();lv();ut=d.lazy(()=>d.union([d.string(),d.number(),d.boolean(),d.null(),d.array(ut),d.record(d.string(),ut)])),ri=d.lazy(()=>d.object({type:d.enum(["string","number","integer","boolean","array","object","null"]).optional(),description:d.string().optional(),enum:d.array(ut).optional(),default:ut.optional(),example:ut.optional(),items:ri.optional(),properties:d.record(d.string(),ri).optional(),required:d.array(d.string()).optional(),additionalProperties:d.union([ri,d.boolean()]).optional(),format:d.string().optional()}).passthrough()),DV=d.object({description:d.string().optional(),schema:ri,required:d.boolean().optional(),default:ut.optional(),example:ut.optional(),sourceTool:d.string().optional()}).strict(),PV=d.object({description:d.string().optional(),properties:d.record(d.string(),DV)}).strict(),UV=d.object({description:d.string().optional(),label:d.string(),schema:ri.optional(),example:ut.optional(),icon:d.string().optional(),confirm:d.boolean().optional(),nextStep:d.string().min(1).optional()}).strict(),LV=d.record(d.string(),UV),ZV=d.object({description:d.string().optional(),schema:ri,example:ut.optional(),mode:d.enum(["append","replace"]).optional(),replay:d.enum(["latest","all","none"]).optional(),complete:d.boolean().optional(),source:d.object({tool:d.string(),args:d.record(d.string(),ut).optional()}).strict().optional()}).strict(),VV=d.record(d.string(),ZV),HV=d.object({description:d.string().optional(),schema:ri,default:ut.optional(),debounceMs:d.number().int().nonnegative().optional(),example:ut.optional()}).strict(),qV=d.record(d.string(),HV),BV=d.object({serverInfo:d.object({name:d.string(),version:d.string().optional()}).strict().optional(),toolInfo:d.object({inputSchema:ri,description:d.string().optional(),outputSchema:ri.optional()}).strict(),usage:d.string().optional(),example:d.object({input:ut,output:ut}).strict().optional()}).strict(),GV=d.object({tools:d.record(d.string(),BV)}).passthrough(),uv=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,FV=d.array(d.string().regex(uv)).readonly(),KR=/^sha384-[A-Za-z0-9+/]+=*$/,YR=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,KV=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,WV=/^[a-z0-9.-]+(:\d+)?$/,XR={gotchas:d.string().optional()},WR={...XR,description:d.string().optional(),usage:d.string().optional(),example:ut.optional(),permission:d.string().optional()},JR={...XR,description:d.string().min(1),usage:d.string().min(1),example:ut,permission:d.enum(cv).optional()},QR={version:d.string().regex(KV),package:d.string().regex(YR),bundleUrl:d.url().optional(),bundleHost:d.string().regex(WV).optional(),bundleSri:d.string().regex(KR).optional(),styleUrl:d.url().optional(),connect:d.array(d.url()).readonly().optional(),requires:FV.optional(),typesUrl:d.url().optional(),typesSri:d.string().regex(KR).optional()},JV=d.union([d.object({hook:d.string().regex(kc),...WR}).strict(),d.object({component:d.string().regex(tf),...WR}).strict()]),YV=d.union([d.object({hook:d.string().regex(kc),...JR}).strict(),d.object({component:d.string().regex(tf),...JR}).strict()]),Yle=d.object({...QR,exports:d.array(JV).min(1)}).strict(),nf=d.object({...QR,exports:d.array(YV).min(1)}).strict(),Xle=nf.refine(e=>e.package===Qp||typeof e.typesUrl=="string",{message:"registered GadgetDescriptor MUST declare a `typesUrl` (HTTPS URL to the package's .d.ts) \u2014 the code-gen sandbox loads it to typecheck generated component code against the export signatures. Run `tsup --dts` (or `tsc --declaration`) in the wrapper build and publish the emitted .d.ts. Only the first-party `@ggui-ai/gadgets` stdlib is exempt.",path:["typesUrl"]}),XV=d.object({description:d.string().optional(),usage:d.string().optional()}).strict(),QV=d.record(d.string().refine(e=>kc.test(e)||tf.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),XV).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),eH=d.object({gadgets:d.record(d.string().regex(YR),QV)}).strict(),Qle=d.record(d.string().regex(uv),d.string()).readonly(),zo=d.object({propsSpec:PV.optional(),actionSpec:LV.optional(),streamSpec:VV.optional(),contextSpec:qV.optional(),agentCapabilities:GV.optional(),clientCapabilities:eH.optional()}).passthrough()});var eS,tS,tH,rS,Zs,eC,rH,oce,of=x(()=>{"use strict";To();Ls();eS=d.object({kind:d.literal("llm"),generator:d.string().min(1),model:d.string().min(1)}).strict(),tS=d.object({kind:d.literal("user")}).strict(),tH=d.object({kind:d.literal("curated")}).strict(),rS=d.union([eS,tS,tH]),Zs=d.object({persona:d.string().optional().describe('Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.'),aesthetic:d.string().optional().describe('Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.'),context:d.record(d.string(),ut).optional().describe('Deliberate design-shaping signals (e.g. {situation:"sad"}) \u2014 part of cache identity. NOT for per-user runtime data; put that in propsSpec/contextSpec.'),seedPrompt:d.string().optional().describe("Generation seed directive. Part of cache identity.")}).strict(),eC=d.object({blueprintId:d.string().min(1),contractHash:d.string().min(1),appId:d.string().min(1),codeS3Url:d.string().optional(),codeHash:d.string().optional(),source:rS,validatorScore:d.number().min(0).max(1).optional(),variance:Zs,isOperatorDefault:d.literal(!0).optional(),createdAt:d.string().min(1),createdBy:d.enum(["agent","operator"]),contract:zo,contractEmbedding:d.array(d.number()).optional()}).strict(),rH=d.object({hash:d.number().min(0).optional(),embed:d.number().min(0).optional(),struct:d.number().min(0).optional(),variance:d.number().min(0).optional(),intent:d.number().min(0).optional()}).strict(),oce=d.object({weights:rH.optional(),threshold:d.number().min(0).max(1).optional(),topK:d.number().int().min(1).optional()}).strict()});var nH,oH,iH,aH,tC,sH,lH,cH,rC,nS=x(()=>{"use strict";To();Ls();of();nH=d.enum(["cache","agent","synth"]),oH=d.union([d.object({op:d.literal("add"),path:d.string(),value:ut}).strict(),d.object({op:d.literal("remove"),path:d.string()}).strict(),d.object({op:d.literal("replace"),path:d.string(),value:ut}).strict()]),iH=d.array(oH),aH=d.object({contract:zo,variance:d.object({persona:d.string().optional(),aesthetic:d.string().optional(),context:d.record(d.string(),ut).optional(),seedPrompt:d.string().optional()}).strict().optional(),generator:d.string().optional()}).strict(),tC=aH,sH=d.object({blueprintId:d.string().min(1).optional(),contractHash:d.string().min(1),codeHash:d.string().optional(),source:rS.optional(),variance:Zs,selectedReason:d.string().optional()}).strict(),lH=d.object({code:d.string().min(1),severity:d.enum(["error","warn"]),path:d.string(),message:d.string()}).strict(),cH=d.object({contractDiff:iH,reasoning:d.string()}).strict(),rC=d.object({origin:nH,rationale:d.string(),blueprintMeta:sH,proposedContractSummary:d.string().optional(),amendments:cH.optional(),validationFindings:d.array(lH).optional()}).strict()});var uH,nC,dH,mce,pH,gce,fH,hce,mH,yce,gH,vce,hH,$ce,yH,bce,vH,xce,_ce,Sce,$H,kce,bH,xH,_H,wce,Ece,Tce,zce,Rce,oS=x(()=>{"use strict";To();nS();Ls();of();uH=d.object({width:d.number(),height:d.number()}),nC=d.object({viewport:uH,platform:d.enum(["web","mobile","desktop"]),deviceType:d.enum(["phone","tablet","desktop"]),orientation:d.enum(["portrait","landscape"]),devicePixelRatio:d.number().optional(),touchPrimary:d.boolean().optional(),shellType:d.enum(["chat","fullscreen","spatial"]).optional(),colorScheme:d.enum(["light","dark"]).optional(),reducedMotion:d.boolean().optional()}).passthrough(),dH={sessionId:d.string().min(1).describe("Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found."),timeout:d.number().int().min(0).max(25).optional().describe("Inline long-poll seconds, integer in [0, 25]. 0 = immediate. Values outside the bound reject INVALID_PARAMS. Returns on first event OR timeout; re-call on empty to keep waiting \u2014 longer waits are your loop, not a bigger timeout.")},mce=d.object(dH),pH={sessionId:d.string().min(1),channel:d.string().min(1),payload:d.unknown(),complete:d.boolean().optional()},gce=d.object(pH),fH={sessionId:d.string().min(1).describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render.")},hce=d.object(fH),mH={},yce=d.object(mH),gH={query:d.string().min(1).describe("Natural-language description of the UI you're looking for"),limit:d.number().int().min(1).max(100).optional()},vce=d.object(gH),hH={blueprintId:d.string().min(1).describe("The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.")},$ce=d.object(hH),yH={},bce=d.object(yH),vH={serviceId:d.string().min(1),reason:d.string().optional(),sessionId:d.string().optional()},xce=d.object(vH),_ce=d.object({intent:d.string().min(1).describe('Concise purpose \u2014 same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:tC.describe("Agent's draft: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth)."),forceCreate:d.boolean().optional()}).strict(),Sce=d.object({handshakeId:d.string().describe("Stable id \u2014 pass to ggui_render / ggui_update"),action:d.enum(["create","reuse","update","replace","declined"]),suggestion:rC.describe("Server's suggestion \u2014 origin-routed (cache | agent | synth). Always carries a provisional `blueprintMeta` the agent reuses by rendering WITHOUT `override` (accept the proposal as-is)."),reason:d.string().max(280).optional().describe("Short rationale (\u2264280 chars) for the `action` value. Surfaced for agent + operator visibility; truncated to keep the structuredContent payload predictable."),nextStep:d.object({tool:d.literal("ggui_render"),description:d.string(),example:d.string()}).optional().describe("Wire-shape recovery hint. A worked literal example of the next ggui_render call the agent should emit \u2014 the example string can be copied verbatim and tweaked (e.g. fill in `props` placeholders). Top-level field so a skimming agent finds it immediately.")}),$H={handshakeId:d.string({message:"ggui_render: handshakeId is REQUIRED. Call ggui_handshake({intent, blueprintDraft}) first to negotiate \u2014 handshake returns a handshakeId + suggestion. Then render with {handshakeId, props} (accept the suggestion as-is) or {handshakeId, props, override: {contract?, variance?}} (re-aim the contract and/or variance). Direct-render without a handshakeId is not supported."}).min(1,"ggui_render: handshakeId must be a non-empty string from a prior ggui_handshake call."),props:d.record(d.string(),d.unknown()),themeId:d.string().min(1).optional().describe("Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme."),infra:d.object({model:d.string().min(1).optional().describe("Provider-prefixed model id (e.g., `anthropic/claude-haiku-4-5`, `openai/gpt-5`). Generator-specific prefixes (e.g., `bedrock/...` for AWS Bedrock routing) supported when the bound generator handles them.")}).strict().optional(),override:d.object({contract:zo.optional().describe("STRICT full re-draft of the contract \u2014 must already conform; the server will not repair it."),variance:Zs.optional().describe("Re-aim the variant (persona/aesthetic/context/seedPrompt); keeps the agreed contract.")}).strict().refine(e=>e.contract!==void 0||e.variance!==void 0,{message:"override must set contract and/or variance \u2014 omit override entirely to ACCEPT the handshake proposal as-is."}).optional().describe("Omit to ACCEPT the proposal as-is. Provide to re-aim contract and/or variance (PATCH semantics).")},kce=d.object($H),bH=d.object({hit:d.boolean().describe("True when a stored component was served without generating new code."),similarity:d.number().optional().describe("Cosine similarity of the matched component to the request (semantic match only)."),cachedBlueprintId:d.string().optional().describe("The stored component id that was matched. Equals top-level blueprintId on a hit."),llmCallsAvoided:d.number().describe("Generation calls skipped by serving the stored component (0 on a fresh generation)."),kind:d.enum(["full-template","cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),reason:d.string().optional().describe("Compact human-readable explanation of the cache outcome \u2014 why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.")}),xH=d.enum(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS"]),_H=d.object({code:xH.describe("Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server."),message:d.string().describe("Human-readable failure detail \u2014 fold into the next attempt or surface to the operator.")}),wce=d.object({sessionId:d.string(),resourceUri:d.string().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),action:d.enum(["create","reuse","update","replace","declined"]),contractHash:d.string().describe("Canonical hash of the rendered data contract (shape only \u2014 fields, types, specs). Same hash \u27FA same data flow."),blueprintId:d.string().describe("Opaque id of the materialised component for this render. On the handshake-decided reuse paths (accept a cache-origin proposal, or a variance re-aim that resolves to an existing variant) it is the stored id \u2014 equal ids across renders mean the same stored component. override.contract always generates cold and mints a fresh id, even for an identical contract."),variantKey:d.string().describe("Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own."),cache:bH.describe("Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided."),error:_H.optional().describe("Present iff the tool result is isError \u2014 canonical {code, message} for a failed/rejected generation. Absent on success."),nextStep:d.object({tool:d.literal("ggui_consume"),description:d.string(),example:d.string(),args:d.object({sessionId:d.string()})}).optional().describe("Recovery hint \u2014 when the rendered contract has actions, points the agent at ggui_consume({sessionId}) for the inbound action loop. Absent for pure-display renders.")}),Ece=d.discriminatedUnion("kind",[d.object({sessionId:d.string().describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render."),kind:d.literal("replace"),props:d.record(d.string(),d.unknown()).describe("Full replacement props map. New map IS the new state.")}).strict(),d.object({sessionId:d.string().describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render."),kind:d.literal("merge"),patch:d.record(d.string(),d.unknown()).describe("RFC 7396 JSON Merge Patch \u2014 null deletes a key; arrays fully replace.")}).strict()]),Tce=d.object({sessionId:d.string(),updated:d.boolean(),resourceUri:d.string()}),zce=d.object({toolCatalog:d.record(d.string(),d.object({name:d.string(),version:d.string().optional()}).strict()).describe("Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.")}).strict(),Rce=d.object({saved:d.boolean(),appId:d.string()}).strict()});var SH,kH,wH,oC,EH,TH,zH,RH,CH,IH,OH,MH,AH,jH,NH,DH,Mce,PH,Ace,iC=x(()=>{"use strict";To();oS();SH=d.object({type:d.literal("text"),text:d.string()}),kH=d.object({type:d.literal("tool_use"),id:d.string(),name:d.string(),input:d.record(d.string(),d.unknown())}),wH=d.object({type:d.literal("tool_result"),tool_use_id:d.string(),content:d.unknown(),is_error:d.boolean().optional()}),oC=d.discriminatedUnion("type",[SH,kH,wH]),EH=d.object({type:d.literal("text_delta"),text:d.string()}),TH=d.object({type:d.literal("input_json_delta"),partial_json:d.string()}),zH=d.discriminatedUnion("type",[EH,TH]),RH=d.object({type:d.literal("message_start"),message:d.object({id:d.string(),role:d.literal("assistant"),model:d.string().optional()})}),CH=d.object({type:d.literal("content_block_start"),index:d.number().int().nonnegative(),content_block:oC}),IH=d.object({type:d.literal("content_block_delta"),index:d.number().int().nonnegative(),delta:zH}),OH=d.object({type:d.literal("content_block_stop"),index:d.number().int().nonnegative()}),MH=d.object({type:d.literal("message_delta"),delta:d.object({stop_reason:d.enum(["end_turn","max_tokens","tool_use","error"]),stop_sequence:d.string().nullable().optional()}),usage:d.object({input_tokens:d.number().int().nonnegative(),output_tokens:d.number().int().nonnegative()})}),AH=d.object({type:d.literal("message_stop")}),jH=d.object({type:d.literal("ping")}),NH=d.enum(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),DH=d.object({type:d.literal("error"),error:d.object({code:NH,message:d.string(),retryAfterMs:d.number().int().nonnegative().optional()})}),Mce=d.discriminatedUnion("type",[RH,CH,IH,OH,MH,AH,jH,DH]),PH=d.object({role:d.enum(["user","assistant"]),content:d.union([d.string(),d.array(oC)])}),Ace=d.object({message:d.string(),history:d.array(PH).optional(),interfaceContext:nC.optional(),requestId:d.string().optional()})});var sC=H((Nce,aC)=>{"use strict";aC.exports=function e(t){if(typeof t=="number"&&isNaN(t))throw new Error("NaN is not allowed");if(typeof t=="number"&&!isFinite(t))throw new Error("Infinity is not allowed");return t===null||typeof t!="object"?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((n,i,a)=>`${n}${a===0?"":","}${e(i===void 0||typeof i=="symbol"?null:i)}`,"")}]`:`{${Object.keys(t).sort().reduce((o,n)=>{if(t[n]===void 0||typeof t[n]=="symbol")return o;let i=o.length===0?"":",";return`${o}${i}${e(n)}:${e(t[n])}`},"")}}`}});var UH,lC=x(()=>{"use strict";UH=O(sC(),1);En()});var cC=x(()=>{"use strict";En()});var uC=x(()=>{"use strict"});var dC=x(()=>{"use strict"});var pC=x(()=>{"use strict"});function iS(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function fC(e){return e==="inline"||e==="fullscreen"||e==="pip"}function dv(e){if(!iS(e))return;let t={};if(fC(e.displayMode)&&(t.currentDisplayMode=e.displayMode),Array.isArray(e.availableDisplayModes)){let r=e.availableDisplayModes.filter(fC);r.length>0&&(t.availableDisplayModes=r)}if(iS(e.containerDimensions)){let r={},o=e.containerDimensions;typeof o.width=="number"&&(r.width=o.width),typeof o.maxWidth=="number"&&(r.maxWidth=o.maxWidth),typeof o.height=="number"&&(r.height=o.height),typeof o.maxHeight=="number"&&(r.maxHeight=o.maxHeight),Object.keys(r).length>0&&(t.containerDimensions=r)}if((e.platform==="web"||e.platform==="desktop"||e.platform==="mobile")&&(t.platform=e.platform),iS(e.deviceCapabilities)){let r={},o=e.deviceCapabilities;typeof o.touch=="boolean"&&(r.touch=o.touch),typeof o.hover=="boolean"&&(r.hover=o.hover),Object.keys(r).length>0&&(t.deviceCapabilities=r)}return typeof e.locale=="string"&&e.locale.length>0&&(t.locale=e.locale),typeof e.timeZone=="string"&&e.timeZone.length>0&&(t.timeZone=e.timeZone),t}function aS(e,t){return e===t?!0:e===void 0||t===void 0?!1:JSON.stringify(e)===JSON.stringify(t)}var mC=x(()=>{"use strict"});var gC=x(()=>{"use strict"});var Bce,Gce,pv=x(()=>{"use strict";Bce=16*1024,Gce=64*1024});var hC=x(()=>{"use strict"});var yC=x(()=>{"use strict";En()});var vC=x(()=>{"use strict"});var $C=x(()=>{"use strict"});var tue,rue,nue,oue,iue,aue,sue,lue,cue,uue,bC=x(()=>{"use strict";To();Ls();of();tue=d.object({contract:zo,generator:d.string().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:d.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),aesthetic:d.string().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona \u2014 persona names the user mental model; aesthetic names the visual treatment."),context:d.record(d.string(),ut).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:d.string().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),setAsOperatorDefault:d.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict(),rue=d.object({blueprintId:d.string().min(1),codeHash:d.string().optional().describe("Content hash of the generated code body. Absent when the generator returned a non-`ok` result and persistence skipped \u2014 the failure mode is surfaced through generator-level error reporting elsewhere."),validatorScore:d.number().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),source:eS.describe("Provenance stamped on the persisted `Blueprint.source` \u2014 always the `llm` arm on this path: `generator` is the engine slug the dispatch resolved to (stamped from the engine's own metadata claim); `model` is the LLM model id the engine called.")}).strict(),nue=d.object({contract:zo,componentCode:d.string().min(1).describe("Verbatim component-code body to persist. Stored as-is \u2014 no LLM call, no validator pass. Operator owns correctness; the handler computes the canonical sha256 codeHash and routes the bytes through the same persistence seams as `*_generate_*`."),persona:d.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),aesthetic:d.string().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:d.record(d.string(),ut).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:d.string().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:d.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict(),oue=d.object({blueprintId:d.string().min(1),codeHash:d.string().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:tS.describe('Provenance stamped on the persisted `Blueprint.source` \u2014 always `{kind: "user"}` on this path: operator-supplied bytes, no LLM dispatch, no engine claim to record.')}).strict(),iue=d.object({contractHash:d.string().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:d.string().min(1).optional().describe('Filter to engine-generated blueprints (`source.kind === "llm"`) whose `source.generator` equals this slug. `user`-sourced rows never match (they carry no engine provenance).'),persona:d.string().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:d.array(d.string().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict(),aue=d.object({blueprints:d.array(eC)}).strict(),sue=d.object({blueprintId:d.string().min(1),isOperatorDefault:d.literal(!0).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` \u2014 to unpin, set another blueprint in the same group as default, or delete this one."),variance:Zs.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')}).strict(),lue=d.object({blueprintId:d.string().min(1),updatedAt:d.string().min(1)}).strict(),cue=d.object({blueprintId:d.string().min(1)}).strict(),uue=d.object({deleted:d.literal(!0)}).strict()});var xC=x(()=>{"use strict"});var _C=x(()=>{"use strict"});var SC=x(()=>{"use strict"});var kC=x(()=>{"use strict"});var wC=x(()=>{"use strict"});var EC=x(()=>{"use strict"});function LH(e){return"schemaVersion"in e?e.schemaVersion:Y2}function TC(e){let t={sessionId:e.sessionId,type:e.type};e.payload!==void 0&&(t.payload=e.payload),e.clientSeq!==void 0&&(t.clientSeq=e.clientSeq);let r=LH(e);return r!==void 0&&(t.schemaVersion=r),t}var zC=x(()=>{"use strict";Xp()});var af,sS=x(()=>{"use strict";Xp();af=class extends Error{code=sv;observedVersion;acceptedVersions;observedBy;constructor(t){let r=t.observedVersion===void 0?"unknown":Array.isArray(t.observedVersion)?t.observedVersion.join(", "):String(t.observedVersion),o=t.acceptedVersions.join(", ");super(`UPGRADE_REQUIRED: ${t.observedBy==="server"?"client":"server"} speaks version '${r}' which is not in the ${t.observedBy==="server"?"server":"client"}'s accepted set [${o}].`),this.name="UpgradeRequiredError",t.observedVersion!==void 0&&(this.observedVersion=t.observedVersion),this.acceptedVersions=t.acceptedVersions,this.observedBy=t.observedBy}}});var RC=x(()=>{"use strict";rf()});var cf=H(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.regexpCode=Ne.getEsmExportName=Ne.getProperty=Ne.safeStringify=Ne.stringify=Ne.strConcat=Ne.addCodeArg=Ne.str=Ne._=Ne.nil=Ne._Code=Ne.Name=Ne.IDENTIFIER=Ne._CodeOrName=void 0;var sf=class{};Ne._CodeOrName=sf;Ne.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Vs=class extends sf{constructor(t){if(super(),!Ne.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ne.Name=Vs;var Tn=class extends sf{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof Vs&&(r[o.str]=(r[o.str]||0)+1),r),{})}};Ne._Code=Tn;Ne.nil=new Tn("");function CC(e,...t){let r=[e[0]],o=0;for(;o<t.length;)cS(r,t[o]),r.push(e[++o]);return new Tn(r)}Ne._=CC;var lS=new Tn("+");function IC(e,...t){let r=[lf(e[0])],o=0;for(;o<t.length;)r.push(lS),cS(r,t[o]),r.push(lS,lf(e[++o]));return ZH(r),new Tn(r)}Ne.str=IC;function cS(e,t){t instanceof Tn?e.push(...t._items):t instanceof Vs?e.push(t):e.push(qH(t))}Ne.addCodeArg=cS;function ZH(e){let t=1;for(;t<e.length-1;){if(e[t]===lS){let r=VH(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function VH(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Vs||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Vs))return`"${e}${t.slice(1)}`}function HH(e,t){return t.emptyStr()?e:e.emptyStr()?t:IC`${e}${t}`}Ne.strConcat=HH;function qH(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:lf(Array.isArray(e)?e.join(","):e)}function BH(e){return new Tn(lf(e))}Ne.stringify=BH;function lf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ne.safeStringify=lf;function GH(e){return typeof e=="string"&&Ne.IDENTIFIER.test(e)?new Tn(`.${e}`):CC`[${e}]`}Ne.getProperty=GH;function FH(e){if(typeof e=="string"&&Ne.IDENTIFIER.test(e))return new Tn(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ne.getEsmExportName=FH;function KH(e){return new Tn(e.toString())}Ne.regexpCode=KH});var pS=H(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.ValueScope=Xr.ValueScopeName=Xr.Scope=Xr.varKinds=Xr.UsedValueState=void 0;var Yr=cf(),uS=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},fv;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(fv||(Xr.UsedValueState=fv={}));Xr.varKinds={const:new Yr.Name("const"),let:new Yr.Name("let"),var:new Yr.Name("var")};var mv=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Yr.Name?t:this.name(t)}name(t){return new Yr.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||o===void 0)&&o.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Xr.Scope=mv;var gv=class extends Yr.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,Yr._)`.${new Yr.Name(r)}[${o}]`}};Xr.ValueScopeName=gv;var WH=(0,Yr._)`\n`,dS=class extends mv{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?WH:Yr.nil}}get(){return this._scope}name(t){return new gv(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,a=(o=r.key)!==null&&o!==void 0?o:r.ref,s=this._values[i];if(s){let u=s.get(a);if(u)return u}else s=this._values[i]=new Map;s.set(a,n);let l=this._scope[i]||(this._scope[i]=[]),c=l.length;return l[c]=r.ref,n.setValue(r,{property:i,itemIndex:c}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,Yr._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=Yr.nil;for(let a in t){let s=t[a];if(!s)continue;let l=o[a]=o[a]||new Map;s.forEach(c=>{if(l.has(c))return;l.set(c,fv.Started);let u=r(c);if(u){let p=this.opts.es5?Xr.varKinds.var:Xr.varKinds.const;i=(0,Yr._)`${i}${p} ${c} = ${u};${this.opts._n}`}else if(u=n?.(c))i=(0,Yr._)`${i}${u}${this.opts._n}`;else throw new uS(c);l.set(c,fv.Completed)})}return i}};Xr.ValueScope=dS});var he=H($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.or=$e.and=$e.not=$e.CodeGen=$e.operators=$e.varKinds=$e.ValueScopeName=$e.ValueScope=$e.Scope=$e.Name=$e.regexpCode=$e.stringify=$e.getProperty=$e.nil=$e.strConcat=$e.str=$e._=void 0;var Ee=cf(),so=pS(),fa=cf();Object.defineProperty($e,"_",{enumerable:!0,get:function(){return fa._}});Object.defineProperty($e,"str",{enumerable:!0,get:function(){return fa.str}});Object.defineProperty($e,"strConcat",{enumerable:!0,get:function(){return fa.strConcat}});Object.defineProperty($e,"nil",{enumerable:!0,get:function(){return fa.nil}});Object.defineProperty($e,"getProperty",{enumerable:!0,get:function(){return fa.getProperty}});Object.defineProperty($e,"stringify",{enumerable:!0,get:function(){return fa.stringify}});Object.defineProperty($e,"regexpCode",{enumerable:!0,get:function(){return fa.regexpCode}});Object.defineProperty($e,"Name",{enumerable:!0,get:function(){return fa.Name}});var $v=pS();Object.defineProperty($e,"Scope",{enumerable:!0,get:function(){return $v.Scope}});Object.defineProperty($e,"ValueScope",{enumerable:!0,get:function(){return $v.ValueScope}});Object.defineProperty($e,"ValueScopeName",{enumerable:!0,get:function(){return $v.ValueScopeName}});Object.defineProperty($e,"varKinds",{enumerable:!0,get:function(){return $v.varKinds}});$e.operators={GT:new Ee._Code(">"),GTE:new Ee._Code(">="),LT:new Ee._Code("<"),LTE:new Ee._Code("<="),EQ:new Ee._Code("==="),NEQ:new Ee._Code("!=="),NOT:new Ee._Code("!"),OR:new Ee._Code("||"),AND:new Ee._Code("&&"),ADD:new Ee._Code("+")};var ni=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},fS=class extends ni{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?so.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ec(this.rhs,t,r)),this}get names(){return this.rhs instanceof Ee._CodeOrName?this.rhs.names:{}}},hv=class extends ni{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof Ee.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ec(this.rhs,t,r),this}get names(){let t=this.lhs instanceof Ee.Name?{}:{...this.lhs.names};return vv(t,this.rhs)}},mS=class extends hv{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},gS=class extends ni{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},hS=class extends ni{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},yS=class extends ni{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},vS=class extends ni{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ec(this.code,t,r),this}get names(){return this.code instanceof Ee._CodeOrName?this.code.names:{}}},uf=class extends ni{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(JH(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Bs(t,r.names),{})}},oi=class extends uf{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},$S=class extends uf{},wc=class extends oi{};wc.kind="else";var Hs=class e extends oi{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new wc(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(OC(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ec(this.condition,t,r),this}get names(){let t=super.names;return vv(t,this.condition),this.else&&Bs(t,this.else.names),t}};Hs.kind="if";var qs=class extends oi{};qs.kind="for";var bS=class extends qs{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ec(this.iteration,t,r),this}get names(){return Bs(super.names,this.iteration.names)}},xS=class extends qs{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?so.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=vv(super.names,this.from);return vv(t,this.to)}},yv=class extends qs{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ec(this.iterable,t,r),this}get names(){return Bs(super.names,this.iterable.names)}},df=class extends oi{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};df.kind="func";var pf=class extends uf{render(t){return"return "+super.render(t)}};pf.kind="return";var _S=class extends oi{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Bs(t,this.catch.names),this.finally&&Bs(t,this.finally.names),t}},ff=class extends oi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ff.kind="catch";var mf=class extends oi{render(t){return"finally"+super.render(t)}};mf.kind="finally";var SS=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
40
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function da(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let s=e.seen.get(a);if(s.ref===null)return;let l=s.def??s.schema,c={...l},u=s.ref;if(s.ref=null,u){o(u);let f=e.seen.get(u),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,c),a._zod.parent===u)for(let v in l)v==="$ref"||v==="allOf"||v in c||delete l[v];if(m.$ref&&f.def)for(let v in l)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(l[v])===JSON.stringify(f.def[v])&&delete l[v]}let p=a._zod.parent;if(p&&p!==u){o(p);let f=e.seen.get(p);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let m in l)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(l[m])===JSON.stringify(f.def[m])&&delete l[m]}e.override({zodSchema:a,jsonSchema:l,path:s.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.external?.defs??{};for(let a of e.seen.entries()){let s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:dc(t,"input",e.processors),output:dc(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function jr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return jr(o.element,r);if(o.type==="set")return jr(o.valueType,r);if(o.type==="lazy")return jr(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return jr(o.innerType,r);if(o.type==="intersection")return jr(o.left,r)||jr(o.right,r);if(o.type==="record"||o.type==="map")return jr(o.keyType,r)||jr(o.valueType,r);if(o.type==="pipe")return jr(o.in,r)||jr(o.out,r);if(o.type==="object"){for(let n in o.shape)if(jr(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(jr(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(jr(n,r))return!0;return!!(o.rest&&jr(o.rest,r))}return!1}var Wx,dc,hp=x(()=>{Kd();Wx=(e,t={})=>r=>{let o=ca({...r,processors:t});return Ze(e,o),ua(o,e),da(o,e)},dc=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=ca({...n??{},target:i,io:t,processors:r});return Ze(e,a),ua(a,e),da(a,e)}});function Is(e,t){if("_idmap"in e){let o=e,n=ca({...t,processors:ey}),i={};for(let l of o._idmap.entries()){let[c,u]=l;Ze(u,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let l of o._idmap.entries()){let[c,u]=l;ua(n,u),a[c]=da(n,u)}if(Object.keys(i).length>0){let l=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=ca({...t,processors:ey});return Ze(e,r),ua(r,e),da(r,e)}var $V,Jx,Yx,Xx,Qx,e_,t_,r_,n_,o_,i_,a_,s_,l_,c_,u_,d_,p_,f_,m_,g_,h_,y_,v_,$_,b_,ty,x_,__,S_,k_,w_,E_,T_,z_,R_,C_,I_,ry,O_,ey,pc=x(()=>{hp();X();$V={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jx=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=$V[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),c&&(n.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Yx=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof i=="number"&&(n.minimum=i,typeof u=="number"&&t.target!=="draft-04"&&(u>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof a=="number"&&(n.maximum=a,typeof c=="number"&&t.target!=="draft-04"&&(c<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof l=="number"&&(n.multipleOf=l)},Xx=(e,t,r,o)=>{r.type="boolean"},Qx=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},e_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},t_=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},r_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},n_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},o_=(e,t,r,o)=>{r.not={}},i_=(e,t,r,o)=>{},a_=(e,t,r,o)=>{},s_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},l_=(e,t,r,o)=>{let n=e._zod.def,i=Cd(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},c_=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},u_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},d_=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},p_=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),l?l.length===1?(i.contentMediaType=l[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(n,i)},f_=(e,t,r,o)=>{r.type="boolean"},m_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},g_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},h_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},y_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},v_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},$_=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=Ze(i.element,t,{...o,path:[...o.path,"items"]})},b_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let c in a)n.properties[c]=Ze(a[c],t,{...o,path:[...o.path,"properties",c]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(c=>{let u=i.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(n.required=Array.from(l)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=Ze(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},ty=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,l)=>Ze(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},x_=(e,t,r,o)=>{let n=e._zod.def,i=Ze(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=Ze(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l},__=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((f,m)=>Ze(f,t,{...o,path:[...o.path,a,m]})),c=i.rest?Ze(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=l,c&&(n.items=c)):t.target==="openapi-3.0"?(n.items={anyOf:l},c&&n.items.anyOf.push(c),n.minItems=l.length,c||(n.maxItems=l.length)):(n.items=l,c&&(n.additionalItems=c));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(n.minItems=u),typeof p=="number"&&(n.maxItems=p)},S_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,l=a._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let u=Ze(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let p of l)n.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Ze(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=Ze(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let c=a._zod.values;if(c){let u=[...c].filter(p=>typeof p=="string"||typeof p=="number");u.length>0&&(n.required=u)}},k_=(e,t,r,o)=>{let n=e._zod.def,i=Ze(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},w_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},E_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},T_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},z_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},R_=(e,t,r,o)=>{let n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Ze(i,t,o);let a=t.seen.get(e);a.ref=i},C_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},I_=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},ry=(e,t,r,o)=>{let n=e._zod.def;Ze(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},O_=(e,t,r,o)=>{let n=e._zod.innerType;Ze(n,t,o);let i=t.seen.get(e);i.ref=n},ey={string:Jx,number:Yx,boolean:Xx,bigint:Qx,symbol:e_,null:t_,undefined:r_,void:n_,never:o_,any:i_,unknown:a_,date:s_,enum:l_,literal:c_,nan:u_,template_literal:d_,file:p_,success:f_,custom:m_,function:g_,transform:h_,map:y_,set:v_,array:$_,object:b_,union:ty,intersection:x_,tuple:__,record:S_,nullable:k_,nonoptional:w_,default:E_,prefault:T_,catch:z_,pipe:R_,readonly:C_,promise:I_,optional:ry,lazy:O_}});var ny,SR=x(()=>{pc();hp();ny=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=ca({processors:ey,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Ze(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),ua(this.ctx,t);let o=da(this.ctx,t),{"~standard":n,...i}=o;return i}}});var kR={};var wR=x(()=>{});var Jr={};Mt(Jr,{$ZodAny:()=>jh,$ZodArray:()=>Lh,$ZodAsyncError:()=>oo,$ZodBase64:()=>wh,$ZodBase64URL:()=>Eh,$ZodBigInt:()=>Vd,$ZodBigIntFormat:()=>Ih,$ZodBoolean:()=>Ql,$ZodCIDRv4:()=>Sh,$ZodCIDRv6:()=>kh,$ZodCUID:()=>dh,$ZodCUID2:()=>ph,$ZodCatch:()=>n0,$ZodCheck:()=>Ke,$ZodCheckBigIntFormat:()=>xx,$ZodCheckEndsWith:()=>Mx,$ZodCheckGreaterThan:()=>Xg,$ZodCheckIncludes:()=>Ix,$ZodCheckLengthEquals:()=>Tx,$ZodCheckLessThan:()=>Yg,$ZodCheckLowerCase:()=>Rx,$ZodCheckMaxLength:()=>wx,$ZodCheckMaxSize:()=>_x,$ZodCheckMimeType:()=>jx,$ZodCheckMinLength:()=>Ex,$ZodCheckMinSize:()=>Sx,$ZodCheckMultipleOf:()=>$x,$ZodCheckNumberFormat:()=>bx,$ZodCheckOverwrite:()=>Nx,$ZodCheckProperty:()=>Ax,$ZodCheckRegex:()=>zx,$ZodCheckSizeEquals:()=>kx,$ZodCheckStartsWith:()=>Ox,$ZodCheckStringFormat:()=>Xl,$ZodCheckUpperCase:()=>Cx,$ZodCodec:()=>tc,$ZodCustom:()=>d0,$ZodCustomStringFormat:()=>Rh,$ZodDate:()=>Uh,$ZodDefault:()=>Qh,$ZodDiscriminatedUnion:()=>Vh,$ZodE164:()=>Th,$ZodEmail:()=>sh,$ZodEmoji:()=>ch,$ZodEncodeError:()=>Gi,$ZodEnum:()=>Fh,$ZodError:()=>jd,$ZodExactOptional:()=>Yh,$ZodFile:()=>Wh,$ZodFunction:()=>l0,$ZodGUID:()=>ih,$ZodIPv4:()=>bh,$ZodIPv6:()=>xh,$ZodISODate:()=>yh,$ZodISODateTime:()=>hh,$ZodISODuration:()=>$h,$ZodISOTime:()=>vh,$ZodIntersection:()=>Hh,$ZodJWT:()=>zh,$ZodKSUID:()=>gh,$ZodLazy:()=>u0,$ZodLiteral:()=>Kh,$ZodMAC:()=>_h,$ZodMap:()=>Bh,$ZodNaN:()=>o0,$ZodNanoID:()=>uh,$ZodNever:()=>Dh,$ZodNonOptional:()=>t0,$ZodNull:()=>Ah,$ZodNullable:()=>Xh,$ZodNumber:()=>Zd,$ZodNumberFormat:()=>Ch,$ZodObject:()=>Vx,$ZodObjectJIT:()=>Hx,$ZodOptional:()=>qd,$ZodPipe:()=>i0,$ZodPrefault:()=>e0,$ZodPromise:()=>c0,$ZodReadonly:()=>a0,$ZodRealError:()=>Wr,$ZodRecord:()=>qh,$ZodRegistry:()=>h0,$ZodSet:()=>Gh,$ZodString:()=>Yi,$ZodStringFormat:()=>qe,$ZodSuccess:()=>r0,$ZodSymbol:()=>Oh,$ZodTemplateLiteral:()=>s0,$ZodTransform:()=>Jh,$ZodTuple:()=>Hd,$ZodType:()=>se,$ZodULID:()=>fh,$ZodURL:()=>lh,$ZodUUID:()=>ah,$ZodUndefined:()=>Mh,$ZodUnion:()=>ec,$ZodUnknown:()=>Nh,$ZodVoid:()=>Ph,$ZodXID:()=>mh,$ZodXor:()=>Zh,$brand:()=>Ll,$constructor:()=>w,$input:()=>Fd,$output:()=>Gd,Doc:()=>Ld,JSONSchema:()=>kR,JSONSchemaGenerator:()=>ny,NEVER:()=>zd,TimePrecision:()=>gp,_any:()=>L0,_array:()=>Kx,_base64:()=>dp,_base64url:()=>pp,_bigint:()=>M0,_boolean:()=>I0,_catch:()=>fV,_check:()=>xR,_cidrv4:()=>cp,_cidrv6:()=>up,_coercedBigint:()=>A0,_coercedBoolean:()=>O0,_coercedDate:()=>B0,_coercedNumber:()=>w0,_coercedString:()=>v0,_cuid:()=>rp,_cuid2:()=>np,_custom:()=>K0,_date:()=>q0,_decode:()=>Zg,_decodeAsync:()=>Hg,_default:()=>uV,_discriminatedUnion:()=>XZ,_e164:()=>fp,_email:()=>Wd,_emoji:()=>ep,_encode:()=>Lg,_encodeAsync:()=>Vg,_endsWith:()=>na,_enum:()=>oV,_file:()=>F0,_float32:()=>T0,_float64:()=>z0,_gt:()=>kn,_gte:()=>Qt,_guid:()=>oc,_includes:()=>ta,_int:()=>E0,_int32:()=>R0,_int64:()=>j0,_intersection:()=>QZ,_ipv4:()=>sp,_ipv6:()=>lp,_isoDate:()=>x0,_isoDateTime:()=>b0,_isoDuration:()=>S0,_isoTime:()=>_0,_jwt:()=>mp,_ksuid:()=>ap,_lazy:()=>yV,_length:()=>ei,_literal:()=>aV,_lowercase:()=>Qi,_lt:()=>Sn,_lte:()=>Sr,_mac:()=>$0,_map:()=>rV,_max:()=>Sr,_maxLength:()=>Qo,_maxSize:()=>Eo,_mime:()=>oa,_min:()=>Qt,_minLength:()=>io,_minSize:()=>wn,_multipleOf:()=>wo,_nan:()=>G0,_nanoid:()=>tp,_nativeEnum:()=>iV,_negative:()=>sc,_never:()=>V0,_nonnegative:()=>cc,_nonoptional:()=>dV,_nonpositive:()=>lc,_normalize:()=>ia,_null:()=>U0,_nullable:()=>cV,_number:()=>k0,_optional:()=>lV,_overwrite:()=>cn,_parse:()=>Bl,_parseAsync:()=>Fl,_pipe:()=>mV,_positive:()=>ac,_promise:()=>vV,_property:()=>uc,_readonly:()=>gV,_record:()=>tV,_refine:()=>W0,_regex:()=>Xi,_safeDecode:()=>Bg,_safeDecodeAsync:()=>Fg,_safeEncode:()=>qg,_safeEncodeAsync:()=>Gg,_safeParse:()=>Wl,_safeParseAsync:()=>Jl,_set:()=>nV,_size:()=>Xo,_slugify:()=>Rs,_startsWith:()=>ra,_string:()=>y0,_stringFormat:()=>Cs,_stringbool:()=>Q0,_success:()=>pV,_superRefine:()=>J0,_symbol:()=>D0,_templateLiteral:()=>hV,_toLowerCase:()=>sa,_toUpperCase:()=>la,_transform:()=>sV,_trim:()=>aa,_tuple:()=>eV,_uint32:()=>C0,_uint64:()=>N0,_ulid:()=>op,_undefined:()=>P0,_union:()=>JZ,_unknown:()=>Z0,_uppercase:()=>ea,_url:()=>ic,_uuid:()=>Jd,_uuidv4:()=>Yd,_uuidv6:()=>Xd,_uuidv7:()=>Qd,_void:()=>H0,_xid:()=>ip,_xor:()=>YZ,clone:()=>Xt,config:()=>ht,createStandardJSONSchemaMethod:()=>dc,createToJSONSchemaMethod:()=>Wx,decode:()=>o6,decodeAsync:()=>a6,describe:()=>Y0,encode:()=>n6,encodeAsync:()=>i6,extractDefs:()=>ua,finalize:()=>da,flattenError:()=>ks,formatError:()=>ws,globalConfig:()=>Td,globalRegistry:()=>Bt,initializeContext:()=>ca,isValidBase64:()=>Zx,isValidBase64URL:()=>z6,isValidJWT:()=>R6,locales:()=>zs,meta:()=>X0,parse:()=>Gl,parseAsync:()=>Kl,prettifyError:()=>Dd,process:()=>Ze,regexes:()=>Ar,registry:()=>nc,safeDecode:()=>l6,safeDecodeAsync:()=>u6,safeEncode:()=>s6,safeEncodeAsync:()=>c6,safeParse:()=>Es,safeParseAsync:()=>Yl,toDotPath:()=>r6,toJSONSchema:()=>Is,treeifyError:()=>Nd,util:()=>P,version:()=>Px});var Tt=x(()=>{Zl();qb();Hb();qx();Qg();Ux();X();Jg();g0();Kd();Dx();_R();hp();pc();SR();wR()});var oy={};Mt(oy,{endsWith:()=>na,gt:()=>kn,gte:()=>Qt,includes:()=>ta,length:()=>ei,lowercase:()=>Qi,lt:()=>Sn,lte:()=>Sr,maxLength:()=>Qo,maxSize:()=>Eo,mime:()=>oa,minLength:()=>io,minSize:()=>wn,multipleOf:()=>wo,negative:()=>sc,nonnegative:()=>cc,nonpositive:()=>lc,normalize:()=>ia,overwrite:()=>cn,positive:()=>ac,property:()=>uc,regex:()=>Xi,size:()=>Xo,slugify:()=>Rs,startsWith:()=>ra,toLowerCase:()=>sa,toUpperCase:()=>la,trim:()=>aa,uppercase:()=>ea});var iy=x(()=>{Tt()});var ti={};Mt(ti,{ZodISODate:()=>vp,ZodISODateTime:()=>yp,ZodISODuration:()=>bp,ZodISOTime:()=>$p,date:()=>A_,datetime:()=>M_,duration:()=>N_,time:()=>j_});function M_(e){return b0(yp,e)}function A_(e){return x0(vp,e)}function j_(e){return _0($p,e)}function N_(e){return S0(bp,e)}var yp,vp,$p,bp,xp=x(()=>{Tt();Sp();yp=w("ZodISODateTime",(e,t)=>{hh.init(e,t),Be.init(e,t)});vp=w("ZodISODate",(e,t)=>{yh.init(e,t),Be.init(e,t)});$p=w("ZodISOTime",(e,t)=>{vh.init(e,t),Be.init(e,t)});bp=w("ZodISODuration",(e,t)=>{$h.init(e,t),Be.init(e,t)})});var ER,TR,Nr,D_=x(()=>{Tt();Tt();X();ER=(e,t)=>{jd.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ws(e,r)},flatten:{value:r=>ks(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Vl,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Vl,2)}},isEmpty:{get(){return e.issues.length===0}}})},TR=w("ZodError",ER),Nr=w("ZodError",ER,{Parent:Error})});var ay,sy,ly,cy,uy,dy,py,fy,my,gy,hy,yy,P_=x(()=>{Tt();D_();ay=Bl(Nr),sy=Fl(Nr),ly=Wl(Nr),cy=Jl(Nr),uy=Lg(Nr),dy=Zg(Nr),py=Vg(Nr),fy=Hg(Nr),my=qg(Nr),gy=Bg(Nr),hy=Gg(Nr),yy=Fg(Nr)});var _p={};Mt(_p,{ZodAny:()=>_y,ZodArray:()=>Ey,ZodBase64:()=>Pp,ZodBase64URL:()=>Up,ZodBigInt:()=>Ds,ZodBigIntFormat:()=>Vp,ZodBoolean:()=>Ns,ZodCIDRv4:()=>Np,ZodCIDRv6:()=>Dp,ZodCUID:()=>Rp,ZodCUID2:()=>Cp,ZodCatch:()=>Gy,ZodCodec:()=>Kp,ZodCustom:()=>_c,ZodCustomStringFormat:()=>As,ZodDate:()=>yc,ZodDefault:()=>Ly,ZodDiscriminatedUnion:()=>zy,ZodE164:()=>Lp,ZodEmail:()=>Ep,ZodEmoji:()=>Tp,ZodEnum:()=>Os,ZodExactOptional:()=>Dy,ZodFile:()=>jy,ZodFunction:()=>tv,ZodGUID:()=>fc,ZodIPv4:()=>Ap,ZodIPv6:()=>jp,ZodIntersection:()=>Ry,ZodJWT:()=>Zp,ZodKSUID:()=>Mp,ZodLazy:()=>Xy,ZodLiteral:()=>Ay,ZodMAC:()=>vy,ZodMap:()=>Oy,ZodNaN:()=>Ky,ZodNanoID:()=>zp,ZodNever:()=>ky,ZodNonOptional:()=>Gp,ZodNull:()=>xy,ZodNullable:()=>Uy,ZodNumber:()=>js,ZodNumberFormat:()=>pa,ZodObject:()=>vc,ZodOptional:()=>Bp,ZodPipe:()=>Fp,ZodPrefault:()=>Vy,ZodPromise:()=>ev,ZodReadonly:()=>Wy,ZodRecord:()=>xc,ZodSet:()=>My,ZodString:()=>Ms,ZodStringFormat:()=>Be,ZodSuccess:()=>By,ZodSymbol:()=>$y,ZodTemplateLiteral:()=>Yy,ZodTransform:()=>Ny,ZodTuple:()=>Cy,ZodType:()=>ue,ZodULID:()=>Ip,ZodURL:()=>hc,ZodUUID:()=>ao,ZodUndefined:()=>by,ZodUnion:()=>$c,ZodUnknown:()=>Sy,ZodVoid:()=>wy,ZodXID:()=>Op,ZodXor:()=>Ty,_ZodString:()=>wp,_default:()=>Zy,_function:()=>L2,any:()=>_2,array:()=>ge,base64:()=>i2,base64url:()=>a2,bigint:()=>y2,boolean:()=>St,catch:()=>Fy,check:()=>Z2,cidrv4:()=>n2,cidrv6:()=>o2,codec:()=>D2,cuid:()=>W_,cuid2:()=>J_,custom:()=>Wp,date:()=>k2,describe:()=>V2,discriminatedUnion:()=>bc,e164:()=>s2,email:()=>U_,emoji:()=>F_,enum:()=>tr,exactOptional:()=>Py,file:()=>M2,float32:()=>f2,float64:()=>m2,function:()=>L2,guid:()=>L_,hash:()=>p2,hex:()=>d2,hostname:()=>u2,httpUrl:()=>G_,instanceof:()=>q2,int:()=>kp,int32:()=>g2,int64:()=>v2,intersection:()=>Us,ipv4:()=>e2,ipv6:()=>r2,json:()=>G2,jwt:()=>l2,keyof:()=>w2,ksuid:()=>Q_,lazy:()=>Qy,literal:()=>J,looseObject:()=>er,looseRecord:()=>R2,mac:()=>t2,map:()=>C2,meta:()=>H2,nan:()=>N2,nanoid:()=>K_,nativeEnum:()=>O2,never:()=>Hp,nonoptional:()=>qy,null:()=>Ps,nullable:()=>mc,nullish:()=>A2,number:()=>je,object:()=>F,optional:()=>rt,partialRecord:()=>z2,pipe:()=>gc,prefault:()=>Hy,preprocess:()=>Sc,promise:()=>U2,readonly:()=>Jy,record:()=>We,refine:()=>rv,set:()=>I2,strictObject:()=>E2,string:()=>I,stringFormat:()=>c2,stringbool:()=>B2,success:()=>j2,superRefine:()=>nv,symbol:()=>b2,templateLiteral:()=>P2,transform:()=>qp,tuple:()=>Iy,uint32:()=>h2,uint64:()=>$2,ulid:()=>Y_,undefined:()=>x2,union:()=>Ve,unknown:()=>Ge,url:()=>B_,uuid:()=>Z_,uuidv4:()=>V_,uuidv6:()=>H_,uuidv7:()=>q_,void:()=>S2,xid:()=>X_,xor:()=>T2});function I(e){return y0(Ms,e)}function U_(e){return Wd(Ep,e)}function L_(e){return oc(fc,e)}function Z_(e){return Jd(ao,e)}function V_(e){return Yd(ao,e)}function H_(e){return Xd(ao,e)}function q_(e){return Qd(ao,e)}function B_(e){return ic(hc,e)}function G_(e){return ic(hc,{protocol:/^https?$/,hostname:Ar.domain,...P.normalizeParams(e)})}function F_(e){return ep(Tp,e)}function K_(e){return tp(zp,e)}function W_(e){return rp(Rp,e)}function J_(e){return np(Cp,e)}function Y_(e){return op(Ip,e)}function X_(e){return ip(Op,e)}function Q_(e){return ap(Mp,e)}function e2(e){return sp(Ap,e)}function t2(e){return $0(vy,e)}function r2(e){return lp(jp,e)}function n2(e){return cp(Np,e)}function o2(e){return up(Dp,e)}function i2(e){return dp(Pp,e)}function a2(e){return pp(Up,e)}function s2(e){return fp(Lp,e)}function l2(e){return mp(Zp,e)}function c2(e,t,r={}){return Cs(As,e,t,r)}function u2(e){return Cs(As,"hostname",Ar.hostname,e)}function d2(e){return Cs(As,"hex",Ar.hex,e)}function p2(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Ar[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Cs(As,o,n,t)}function je(e){return k0(js,e)}function kp(e){return E0(pa,e)}function f2(e){return T0(pa,e)}function m2(e){return z0(pa,e)}function g2(e){return R0(pa,e)}function h2(e){return C0(pa,e)}function St(e){return I0(Ns,e)}function y2(e){return M0(Ds,e)}function v2(e){return j0(Vp,e)}function $2(e){return N0(Vp,e)}function b2(e){return D0($y,e)}function x2(e){return P0(by,e)}function Ps(e){return U0(xy,e)}function _2(){return L0(_y)}function Ge(){return Z0(Sy)}function Hp(e){return V0(ky,e)}function S2(e){return H0(wy,e)}function k2(e){return q0(yc,e)}function ge(e,t){return Kx(Ey,e,t)}function w2(e){let t=e._zod.def.shape;return tr(Object.keys(t))}function F(e,t){let r={type:"object",shape:e??{},...P.normalizeParams(t)};return new vc(r)}function E2(e,t){return new vc({type:"object",shape:e,catchall:Hp(),...P.normalizeParams(t)})}function er(e,t){return new vc({type:"object",shape:e,catchall:Ge(),...P.normalizeParams(t)})}function Ve(e,t){return new $c({type:"union",options:e,...P.normalizeParams(t)})}function T2(e,t){return new Ty({type:"union",options:e,inclusive:!1,...P.normalizeParams(t)})}function bc(e,t,r){return new zy({type:"union",options:t,discriminator:e,...P.normalizeParams(r)})}function Us(e,t){return new Ry({type:"intersection",left:e,right:t})}function Iy(e,t,r){let o=t instanceof se,n=o?r:t,i=o?t:null;return new Cy({type:"tuple",items:e,rest:i,...P.normalizeParams(n)})}function We(e,t,r){return new xc({type:"record",keyType:e,valueType:t,...P.normalizeParams(r)})}function z2(e,t,r){let o=Xt(e);return o._zod.values=void 0,new xc({type:"record",keyType:o,valueType:t,...P.normalizeParams(r)})}function R2(e,t,r){return new xc({type:"record",keyType:e,valueType:t,mode:"loose",...P.normalizeParams(r)})}function C2(e,t,r){return new Oy({type:"map",keyType:e,valueType:t,...P.normalizeParams(r)})}function I2(e,t){return new My({type:"set",valueType:e,...P.normalizeParams(t)})}function tr(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Os({type:"enum",entries:r,...P.normalizeParams(t)})}function O2(e,t){return new Os({type:"enum",entries:e,...P.normalizeParams(t)})}function J(e,t){return new Ay({type:"literal",values:Array.isArray(e)?e:[e],...P.normalizeParams(t)})}function M2(e){return F0(jy,e)}function qp(e){return new Ny({type:"transform",transform:e})}function rt(e){return new Bp({type:"optional",innerType:e})}function Py(e){return new Dy({type:"optional",innerType:e})}function mc(e){return new Uy({type:"nullable",innerType:e})}function A2(e){return rt(mc(e))}function Zy(e,t){return new Ly({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function Hy(e,t){return new Vy({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function qy(e,t){return new Gp({type:"nonoptional",innerType:e,...P.normalizeParams(t)})}function j2(e){return new By({type:"success",innerType:e})}function Fy(e,t){return new Gy({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function N2(e){return G0(Ky,e)}function gc(e,t){return new Fp({type:"pipe",in:e,out:t})}function D2(e,t,r){return new Kp({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Jy(e){return new Wy({type:"readonly",innerType:e})}function P2(e,t){return new Yy({type:"template_literal",parts:e,...P.normalizeParams(t)})}function Qy(e){return new Xy({type:"lazy",getter:e})}function U2(e){return new ev({type:"promise",innerType:e})}function L2(e){return new tv({type:"function",input:Array.isArray(e?.input)?Iy(e?.input):e?.input??ge(Ge()),output:e?.output??Ge()})}function Z2(e){let t=new Ke({check:"custom"});return t._zod.check=e,t}function Wp(e,t){return K0(_c,e??(()=>!0),t)}function rv(e,t={}){return W0(_c,e,t)}function nv(e){return J0(e)}function q2(e,t={}){let r=new _c({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...P.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}function G2(e){let t=Qy(()=>Ve([I(e),je(),St(),Ps(),ge(t),We(I(),t)]));return t}function Sc(e,t){return gc(qp(e),t)}var ue,wp,Ms,Be,Ep,fc,ao,hc,Tp,zp,Rp,Cp,Ip,Op,Mp,Ap,vy,jp,Np,Dp,Pp,Up,Lp,Zp,As,js,pa,Ns,Ds,Vp,$y,by,xy,_y,Sy,ky,wy,yc,Ey,vc,$c,Ty,zy,Ry,Cy,xc,Oy,My,Os,Ay,jy,Ny,Bp,Dy,Uy,Ly,Vy,Gp,By,Gy,Ky,Fp,Kp,Wy,Yy,Xy,ev,tv,_c,V2,H2,B2,Sp=x(()=>{Tt();Tt();pc();hp();iy();xp();P_();ue=w("ZodType",(e,t)=>(se.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:dc(e,"input"),output:dc(e,"output")}}),e.toJSONSchema=Wx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(P.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(r,o)=>Xt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>ay(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>ly(e,r,o),e.parseAsync=async(r,o)=>sy(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>cy(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>uy(e,r,o),e.decode=(r,o)=>dy(e,r,o),e.encodeAsync=async(r,o)=>py(e,r,o),e.decodeAsync=async(r,o)=>fy(e,r,o),e.safeEncode=(r,o)=>my(e,r,o),e.safeDecode=(r,o)=>gy(e,r,o),e.safeEncodeAsync=async(r,o)=>hy(e,r,o),e.safeDecodeAsync=async(r,o)=>yy(e,r,o),e.refine=(r,o)=>e.check(rv(r,o)),e.superRefine=r=>e.check(nv(r)),e.overwrite=r=>e.check(cn(r)),e.optional=()=>rt(e),e.exactOptional=()=>Py(e),e.nullable=()=>mc(e),e.nullish=()=>rt(mc(e)),e.nonoptional=r=>qy(e,r),e.array=()=>ge(e),e.or=r=>Ve([e,r]),e.and=r=>Us(e,r),e.transform=r=>gc(e,qp(r)),e.default=r=>Zy(e,r),e.prefault=r=>Hy(e,r),e.catch=r=>Fy(e,r),e.pipe=r=>gc(e,r),e.readonly=()=>Jy(e),e.describe=r=>{let o=e.clone();return Bt.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Bt.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Bt.get(e);let o=e.clone();return Bt.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),wp=w("_ZodString",(e,t)=>{Yi.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Jx(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(Xi(...o)),e.includes=(...o)=>e.check(ta(...o)),e.startsWith=(...o)=>e.check(ra(...o)),e.endsWith=(...o)=>e.check(na(...o)),e.min=(...o)=>e.check(io(...o)),e.max=(...o)=>e.check(Qo(...o)),e.length=(...o)=>e.check(ei(...o)),e.nonempty=(...o)=>e.check(io(1,...o)),e.lowercase=o=>e.check(Qi(o)),e.uppercase=o=>e.check(ea(o)),e.trim=()=>e.check(aa()),e.normalize=(...o)=>e.check(ia(...o)),e.toLowerCase=()=>e.check(sa()),e.toUpperCase=()=>e.check(la()),e.slugify=()=>e.check(Rs())}),Ms=w("ZodString",(e,t)=>{Yi.init(e,t),wp.init(e,t),e.email=r=>e.check(Wd(Ep,r)),e.url=r=>e.check(ic(hc,r)),e.jwt=r=>e.check(mp(Zp,r)),e.emoji=r=>e.check(ep(Tp,r)),e.guid=r=>e.check(oc(fc,r)),e.uuid=r=>e.check(Jd(ao,r)),e.uuidv4=r=>e.check(Yd(ao,r)),e.uuidv6=r=>e.check(Xd(ao,r)),e.uuidv7=r=>e.check(Qd(ao,r)),e.nanoid=r=>e.check(tp(zp,r)),e.guid=r=>e.check(oc(fc,r)),e.cuid=r=>e.check(rp(Rp,r)),e.cuid2=r=>e.check(np(Cp,r)),e.ulid=r=>e.check(op(Ip,r)),e.base64=r=>e.check(dp(Pp,r)),e.base64url=r=>e.check(pp(Up,r)),e.xid=r=>e.check(ip(Op,r)),e.ksuid=r=>e.check(ap(Mp,r)),e.ipv4=r=>e.check(sp(Ap,r)),e.ipv6=r=>e.check(lp(jp,r)),e.cidrv4=r=>e.check(cp(Np,r)),e.cidrv6=r=>e.check(up(Dp,r)),e.e164=r=>e.check(fp(Lp,r)),e.datetime=r=>e.check(M_(r)),e.date=r=>e.check(A_(r)),e.time=r=>e.check(j_(r)),e.duration=r=>e.check(N_(r))});Be=w("ZodStringFormat",(e,t)=>{qe.init(e,t),wp.init(e,t)}),Ep=w("ZodEmail",(e,t)=>{sh.init(e,t),Be.init(e,t)});fc=w("ZodGUID",(e,t)=>{ih.init(e,t),Be.init(e,t)});ao=w("ZodUUID",(e,t)=>{ah.init(e,t),Be.init(e,t)});hc=w("ZodURL",(e,t)=>{lh.init(e,t),Be.init(e,t)});Tp=w("ZodEmoji",(e,t)=>{ch.init(e,t),Be.init(e,t)});zp=w("ZodNanoID",(e,t)=>{uh.init(e,t),Be.init(e,t)});Rp=w("ZodCUID",(e,t)=>{dh.init(e,t),Be.init(e,t)});Cp=w("ZodCUID2",(e,t)=>{ph.init(e,t),Be.init(e,t)});Ip=w("ZodULID",(e,t)=>{fh.init(e,t),Be.init(e,t)});Op=w("ZodXID",(e,t)=>{mh.init(e,t),Be.init(e,t)});Mp=w("ZodKSUID",(e,t)=>{gh.init(e,t),Be.init(e,t)});Ap=w("ZodIPv4",(e,t)=>{bh.init(e,t),Be.init(e,t)});vy=w("ZodMAC",(e,t)=>{_h.init(e,t),Be.init(e,t)});jp=w("ZodIPv6",(e,t)=>{xh.init(e,t),Be.init(e,t)});Np=w("ZodCIDRv4",(e,t)=>{Sh.init(e,t),Be.init(e,t)});Dp=w("ZodCIDRv6",(e,t)=>{kh.init(e,t),Be.init(e,t)});Pp=w("ZodBase64",(e,t)=>{wh.init(e,t),Be.init(e,t)});Up=w("ZodBase64URL",(e,t)=>{Eh.init(e,t),Be.init(e,t)});Lp=w("ZodE164",(e,t)=>{Th.init(e,t),Be.init(e,t)});Zp=w("ZodJWT",(e,t)=>{zh.init(e,t),Be.init(e,t)});As=w("ZodCustomStringFormat",(e,t)=>{Rh.init(e,t),Be.init(e,t)});js=w("ZodNumber",(e,t)=>{Zd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Yx(e,o,n,i),e.gt=(o,n)=>e.check(kn(o,n)),e.gte=(o,n)=>e.check(Qt(o,n)),e.min=(o,n)=>e.check(Qt(o,n)),e.lt=(o,n)=>e.check(Sn(o,n)),e.lte=(o,n)=>e.check(Sr(o,n)),e.max=(o,n)=>e.check(Sr(o,n)),e.int=o=>e.check(kp(o)),e.safe=o=>e.check(kp(o)),e.positive=o=>e.check(kn(0,o)),e.nonnegative=o=>e.check(Qt(0,o)),e.negative=o=>e.check(Sn(0,o)),e.nonpositive=o=>e.check(Sr(0,o)),e.multipleOf=(o,n)=>e.check(wo(o,n)),e.step=(o,n)=>e.check(wo(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});pa=w("ZodNumberFormat",(e,t)=>{Ch.init(e,t),js.init(e,t)});Ns=w("ZodBoolean",(e,t)=>{Ql.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xx(e,r,o,n)});Ds=w("ZodBigInt",(e,t)=>{Vd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Qx(e,o,n,i),e.gte=(o,n)=>e.check(Qt(o,n)),e.min=(o,n)=>e.check(Qt(o,n)),e.gt=(o,n)=>e.check(kn(o,n)),e.gte=(o,n)=>e.check(Qt(o,n)),e.min=(o,n)=>e.check(Qt(o,n)),e.lt=(o,n)=>e.check(Sn(o,n)),e.lte=(o,n)=>e.check(Sr(o,n)),e.max=(o,n)=>e.check(Sr(o,n)),e.positive=o=>e.check(kn(BigInt(0),o)),e.negative=o=>e.check(Sn(BigInt(0),o)),e.nonpositive=o=>e.check(Sr(BigInt(0),o)),e.nonnegative=o=>e.check(Qt(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(wo(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});Vp=w("ZodBigIntFormat",(e,t)=>{Ih.init(e,t),Ds.init(e,t)});$y=w("ZodSymbol",(e,t)=>{Oh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>e_(e,r,o,n)});by=w("ZodUndefined",(e,t)=>{Mh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>r_(e,r,o,n)});xy=w("ZodNull",(e,t)=>{Ah.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>t_(e,r,o,n)});_y=w("ZodAny",(e,t)=>{jh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>i_(e,r,o,n)});Sy=w("ZodUnknown",(e,t)=>{Nh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>a_(e,r,o,n)});ky=w("ZodNever",(e,t)=>{Dh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>o_(e,r,o,n)});wy=w("ZodVoid",(e,t)=>{Ph.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>n_(e,r,o,n)});yc=w("ZodDate",(e,t)=>{Uh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>s_(e,o,n,i),e.min=(o,n)=>e.check(Qt(o,n)),e.max=(o,n)=>e.check(Sr(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});Ey=w("ZodArray",(e,t)=>{Lh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$_(e,r,o,n),e.element=t.element,e.min=(r,o)=>e.check(io(r,o)),e.nonempty=r=>e.check(io(1,r)),e.max=(r,o)=>e.check(Qo(r,o)),e.length=(r,o)=>e.check(ei(r,o)),e.unwrap=()=>e.element});vc=w("ZodObject",(e,t)=>{Hx.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>b_(e,r,o,n),P.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>tr(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ge()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ge()}),e.strict=()=>e.clone({...e._zod.def,catchall:Hp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>P.extend(e,r),e.safeExtend=r=>P.safeExtend(e,r),e.merge=r=>P.merge(e,r),e.pick=r=>P.pick(e,r),e.omit=r=>P.omit(e,r),e.partial=(...r)=>P.partial(Bp,e,r[0]),e.required=(...r)=>P.required(Gp,e,r[0])});$c=w("ZodUnion",(e,t)=>{ec.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ty(e,r,o,n),e.options=t.options});Ty=w("ZodXor",(e,t)=>{$c.init(e,t),Zh.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ty(e,r,o,n),e.options=t.options});zy=w("ZodDiscriminatedUnion",(e,t)=>{$c.init(e,t),Vh.init(e,t)});Ry=w("ZodIntersection",(e,t)=>{Hh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>x_(e,r,o,n)});Cy=w("ZodTuple",(e,t)=>{Hd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>__(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});xc=w("ZodRecord",(e,t)=>{qh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>S_(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});Oy=w("ZodMap",(e,t)=>{Bh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>y_(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(wn(...r)),e.nonempty=r=>e.check(wn(1,r)),e.max=(...r)=>e.check(Eo(...r)),e.size=(...r)=>e.check(Xo(...r))});My=w("ZodSet",(e,t)=>{Gh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>v_(e,r,o,n),e.min=(...r)=>e.check(wn(...r)),e.nonempty=r=>e.check(wn(1,r)),e.max=(...r)=>e.check(Eo(...r)),e.size=(...r)=>e.check(Xo(...r))});Os=w("ZodEnum",(e,t)=>{Fh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(o,n,i)=>l_(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Os({...t,checks:[],...P.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Os({...t,checks:[],...P.normalizeParams(n),entries:i})}});Ay=w("ZodLiteral",(e,t)=>{Kh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>c_(e,r,o,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});jy=w("ZodFile",(e,t)=>{Wh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>p_(e,r,o,n),e.min=(r,o)=>e.check(wn(r,o)),e.max=(r,o)=>e.check(Eo(r,o)),e.mime=(r,o)=>e.check(oa(Array.isArray(r)?r:[r],o))});Ny=w("ZodTransform",(e,t)=>{Jh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>h_(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Gi(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(P.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(P.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});Bp=w("ZodOptional",(e,t)=>{qd.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ry(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Dy=w("ZodExactOptional",(e,t)=>{Yh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ry(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Uy=w("ZodNullable",(e,t)=>{Xh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>k_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Ly=w("ZodDefault",(e,t)=>{Qh.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>E_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Vy=w("ZodPrefault",(e,t)=>{e0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>T_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Gp=w("ZodNonOptional",(e,t)=>{t0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>w_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});By=w("ZodSuccess",(e,t)=>{r0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>f_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Gy=w("ZodCatch",(e,t)=>{n0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>z_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Ky=w("ZodNaN",(e,t)=>{o0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>u_(e,r,o,n)});Fp=w("ZodPipe",(e,t)=>{i0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>R_(e,r,o,n),e.in=t.in,e.out=t.out});Kp=w("ZodCodec",(e,t)=>{Fp.init(e,t),tc.init(e,t)});Wy=w("ZodReadonly",(e,t)=>{a0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>C_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});Yy=w("ZodTemplateLiteral",(e,t)=>{s0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>d_(e,r,o,n)});Xy=w("ZodLazy",(e,t)=>{u0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>O_(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});ev=w("ZodPromise",(e,t)=>{c0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>I_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});tv=w("ZodFunction",(e,t)=>{l0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>g_(e,r,o,n)});_c=w("ZodCustom",(e,t)=>{d0.init(e,t),ue.init(e,t),e._zod.processJSONSchema=(r,o,n)=>m_(e,r,o,n)});V2=Y0,H2=X0;B2=(...e)=>Q0({Codec:Kp,Boolean:Ns,String:Ms},...e)});function RR(e){ht({customError:e})}function CR(){return ht().customError}var zR,ov,IR=x(()=>{Tt();Tt();zR={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};ov||(ov={})});function SV(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function kV(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function OR(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return B.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return B.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=kV(n,t),a=kr(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return B.null();if(n.length===0)return B.never();if(n.length===1)return B.literal(n[0]);if(n.every(a=>typeof a=="string"))return B.enum(n);let i=n.map(a=>B.literal(a));return i.length<2?i[0]:B.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return B.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return OR(a,t)});return n.length===0?B.never():n.length===1?n[0]:B.union(n)}if(!r)return B.any();let o;switch(r){case"string":{let n=B.string();if(e.format){let i=e.format;i==="email"?n=n.check(B.email()):i==="uri"||i==="uri-reference"?n=n.check(B.url()):i==="uuid"||i==="guid"?n=n.check(B.uuid()):i==="date-time"?n=n.check(B.iso.datetime()):i==="date"?n=n.check(B.iso.date()):i==="time"?n=n.check(B.iso.time()):i==="duration"?n=n.check(B.iso.duration()):i==="ipv4"?n=n.check(B.ipv4()):i==="ipv6"?n=n.check(B.ipv6()):i==="mac"?n=n.check(B.mac()):i==="cidr"?n=n.check(B.cidrv4()):i==="cidr-v6"?n=n.check(B.cidrv6()):i==="base64"?n=n.check(B.base64()):i==="base64url"?n=n.check(B.base64url()):i==="e164"?n=n.check(B.e164()):i==="jwt"?n=n.check(B.jwt()):i==="emoji"?n=n.check(B.emoji()):i==="nanoid"?n=n.check(B.nanoid()):i==="cuid"?n=n.check(B.cuid()):i==="cuid2"?n=n.check(B.cuid2()):i==="ulid"?n=n.check(B.ulid()):i==="xid"?n=n.check(B.xid()):i==="ksuid"&&(n=n.check(B.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?B.number().int():B.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=B.boolean();break}case"null":{o=B.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[l,c]of Object.entries(i)){let u=kr(c,t);n[l]=a.has(l)?u:u.optional()}if(e.propertyNames){let l=kr(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?kr(e.additionalProperties,t):B.any();if(Object.keys(n).length===0){o=B.record(l,c);break}let u=B.object(n).passthrough(),p=B.looseRecord(l,c);o=B.intersection(u,p);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let f of c){let m=kr(l[f],t),g=B.string().regex(new RegExp(f));u.push(B.looseRecord(g,m))}let p=[];if(Object.keys(n).length>0&&p.push(B.object(n).passthrough()),p.push(...u),p.length===0)o=B.object({}).passthrough();else if(p.length===1)o=p[0];else{let f=B.intersection(p[0],p[1]);for(let m=2;m<p.length;m++)f=B.intersection(f,p[m]);o=f}break}let s=B.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(kr(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(l=>kr(l,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?kr(i,t):void 0;s?o=B.tuple(a).rest(s):o=B.tuple(a),typeof e.minItems=="number"&&(o=o.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(B.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(l=>kr(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?kr(e.additionalItems,t):void 0;s?o=B.tuple(a).rest(s):o=B.tuple(a),typeof e.minItems=="number"&&(o=o.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(B.maxLength(e.maxItems)))}else if(i!==void 0){let a=kr(i,t),s=B.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=B.array(B.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function kr(e,t){if(typeof e=="boolean")return e?B.any():B.never();let r=OR(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>kr(c,t)),l=B.union(s);r=o?B.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>kr(c,t)),l=B.xor(s);r=o?B.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:B.any();else{let s=o?r:kr(e.allOf[0],t),l=o?0:1;for(let c=l;c<e.allOf.length;c++)s=B.intersection(s,kr(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=B.nullable(r)),e.readOnly===!0&&(r=B.readonly(r));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))_V.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function F2(e,t){if(typeof e=="boolean")return e?B.any():B.never();let r=SV(e,t?.defaultTarget),o=e.$defs||e.definitions||{},n={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??Bt};return kr(e,n)}var B,_V,MR=x(()=>{Kd();iy();xp();Sp();B={..._p,...oy,iso:ti},_V=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var iv={};Mt(iv,{bigint:()=>zV,boolean:()=>TV,date:()=>RV,number:()=>EV,string:()=>wV});function wV(e){return v0(Ms,e)}function EV(e){return w0(js,e)}function TV(e){return O0(Ns,e)}function zV(e){return A0(Ds,e)}function RV(e){return B0(yc,e)}var AR=x(()=>{Tt();Sp()});var d={};Mt(d,{$brand:()=>Ll,$input:()=>Fd,$output:()=>Gd,NEVER:()=>zd,TimePrecision:()=>gp,ZodAny:()=>_y,ZodArray:()=>Ey,ZodBase64:()=>Pp,ZodBase64URL:()=>Up,ZodBigInt:()=>Ds,ZodBigIntFormat:()=>Vp,ZodBoolean:()=>Ns,ZodCIDRv4:()=>Np,ZodCIDRv6:()=>Dp,ZodCUID:()=>Rp,ZodCUID2:()=>Cp,ZodCatch:()=>Gy,ZodCodec:()=>Kp,ZodCustom:()=>_c,ZodCustomStringFormat:()=>As,ZodDate:()=>yc,ZodDefault:()=>Ly,ZodDiscriminatedUnion:()=>zy,ZodE164:()=>Lp,ZodEmail:()=>Ep,ZodEmoji:()=>Tp,ZodEnum:()=>Os,ZodError:()=>TR,ZodExactOptional:()=>Dy,ZodFile:()=>jy,ZodFirstPartyTypeKind:()=>ov,ZodFunction:()=>tv,ZodGUID:()=>fc,ZodIPv4:()=>Ap,ZodIPv6:()=>jp,ZodISODate:()=>vp,ZodISODateTime:()=>yp,ZodISODuration:()=>bp,ZodISOTime:()=>$p,ZodIntersection:()=>Ry,ZodIssueCode:()=>zR,ZodJWT:()=>Zp,ZodKSUID:()=>Mp,ZodLazy:()=>Xy,ZodLiteral:()=>Ay,ZodMAC:()=>vy,ZodMap:()=>Oy,ZodNaN:()=>Ky,ZodNanoID:()=>zp,ZodNever:()=>ky,ZodNonOptional:()=>Gp,ZodNull:()=>xy,ZodNullable:()=>Uy,ZodNumber:()=>js,ZodNumberFormat:()=>pa,ZodObject:()=>vc,ZodOptional:()=>Bp,ZodPipe:()=>Fp,ZodPrefault:()=>Vy,ZodPromise:()=>ev,ZodReadonly:()=>Wy,ZodRealError:()=>Nr,ZodRecord:()=>xc,ZodSet:()=>My,ZodString:()=>Ms,ZodStringFormat:()=>Be,ZodSuccess:()=>By,ZodSymbol:()=>$y,ZodTemplateLiteral:()=>Yy,ZodTransform:()=>Ny,ZodTuple:()=>Cy,ZodType:()=>ue,ZodULID:()=>Ip,ZodURL:()=>hc,ZodUUID:()=>ao,ZodUndefined:()=>by,ZodUnion:()=>$c,ZodUnknown:()=>Sy,ZodVoid:()=>wy,ZodXID:()=>Op,ZodXor:()=>Ty,_ZodString:()=>wp,_default:()=>Zy,_function:()=>L2,any:()=>_2,array:()=>ge,base64:()=>i2,base64url:()=>a2,bigint:()=>y2,boolean:()=>St,catch:()=>Fy,check:()=>Z2,cidrv4:()=>n2,cidrv6:()=>o2,clone:()=>Xt,codec:()=>D2,coerce:()=>iv,config:()=>ht,core:()=>Jr,cuid:()=>W_,cuid2:()=>J_,custom:()=>Wp,date:()=>k2,decode:()=>dy,decodeAsync:()=>fy,describe:()=>V2,discriminatedUnion:()=>bc,e164:()=>s2,email:()=>U_,emoji:()=>F_,encode:()=>uy,encodeAsync:()=>py,endsWith:()=>na,enum:()=>tr,exactOptional:()=>Py,file:()=>M2,flattenError:()=>ks,float32:()=>f2,float64:()=>m2,formatError:()=>ws,fromJSONSchema:()=>F2,function:()=>L2,getErrorMap:()=>CR,globalRegistry:()=>Bt,gt:()=>kn,gte:()=>Qt,guid:()=>L_,hash:()=>p2,hex:()=>d2,hostname:()=>u2,httpUrl:()=>G_,includes:()=>ta,instanceof:()=>q2,int:()=>kp,int32:()=>g2,int64:()=>v2,intersection:()=>Us,ipv4:()=>e2,ipv6:()=>r2,iso:()=>ti,json:()=>G2,jwt:()=>l2,keyof:()=>w2,ksuid:()=>Q_,lazy:()=>Qy,length:()=>ei,literal:()=>J,locales:()=>zs,looseObject:()=>er,looseRecord:()=>R2,lowercase:()=>Qi,lt:()=>Sn,lte:()=>Sr,mac:()=>t2,map:()=>C2,maxLength:()=>Qo,maxSize:()=>Eo,meta:()=>H2,mime:()=>oa,minLength:()=>io,minSize:()=>wn,multipleOf:()=>wo,nan:()=>N2,nanoid:()=>K_,nativeEnum:()=>O2,negative:()=>sc,never:()=>Hp,nonnegative:()=>cc,nonoptional:()=>qy,nonpositive:()=>lc,normalize:()=>ia,null:()=>Ps,nullable:()=>mc,nullish:()=>A2,number:()=>je,object:()=>F,optional:()=>rt,overwrite:()=>cn,parse:()=>ay,parseAsync:()=>sy,partialRecord:()=>z2,pipe:()=>gc,positive:()=>ac,prefault:()=>Hy,preprocess:()=>Sc,prettifyError:()=>Dd,promise:()=>U2,property:()=>uc,readonly:()=>Jy,record:()=>We,refine:()=>rv,regex:()=>Xi,regexes:()=>Ar,registry:()=>nc,safeDecode:()=>gy,safeDecodeAsync:()=>yy,safeEncode:()=>my,safeEncodeAsync:()=>hy,safeParse:()=>ly,safeParseAsync:()=>cy,set:()=>I2,setErrorMap:()=>RR,size:()=>Xo,slugify:()=>Rs,startsWith:()=>ra,strictObject:()=>E2,string:()=>I,stringFormat:()=>c2,stringbool:()=>B2,success:()=>j2,superRefine:()=>nv,symbol:()=>b2,templateLiteral:()=>P2,toJSONSchema:()=>Is,toLowerCase:()=>sa,toUpperCase:()=>la,transform:()=>qp,treeifyError:()=>Nd,trim:()=>aa,tuple:()=>Iy,uint32:()=>h2,uint64:()=>$2,ulid:()=>Y_,undefined:()=>x2,union:()=>Ve,unknown:()=>Ge,uppercase:()=>ea,url:()=>B_,util:()=>P,uuid:()=>Z_,uuidv4:()=>V_,uuidv6:()=>H_,uuidv7:()=>q_,void:()=>S2,xid:()=>X_,xor:()=>T2});var Jp=x(()=>{Tt();Sp();iy();D_();P_();IR();Tt();Bx();Tt();pc();MR();g0();xp();xp();AR();ht(p0())});var To=x(()=>{Jp();Jp()});var CV,IV,OV,jR,K2=x(()=>{"use strict";To();CV=/^--ggui-[a-zA-Z0-9-]+$/,IV=/^[^;{}<>@]*$/,OV=d.string().min(1).max(256).regex(IV,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment"),jR=d.object({mode:d.enum(["light","dark"]),cssVariables:d.record(d.string().regex(CV,"css var key must be --ggui-*"),OV).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:d.string().min(1).max(64).optional()}).strict()});function Dr(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var En=x(()=>{"use strict"});var AV,Y2,sv,Yp,Xp=x(()=>{"use strict";AV="draft-2026-06-12",Y2=AV,sv="UPGRADE_REQUIRED",Yp=Object.freeze([Y2])});var PR=x(()=>{"use strict"});var UR=x(()=>{"use strict"});var LR=x(()=>{"use strict"});var ZR=x(()=>{"use strict"});var VR=x(()=>{"use strict";En()});var HR=x(()=>{"use strict"});var qR=x(()=>{"use strict"});var BR=x(()=>{"use strict"});var Qp,GR,X2,FR,ef=x(()=>{"use strict";Qp="@ggui-ai/gadgets",GR="0.5.0-rc.1",X2=[{package:Qp,version:GR,exports:[{hook:"useCamera",permission:"camera",description:"Capture stills or live video from the device camera.",usage:"Mount when the intent names photo capture, QR / barcode scanning, video recording, or anything that requires a camera feed. The hook returns a stream once `start()` resolves; thread the resulting blob or stream URL into a contextSpec slot or an actionSpec payload to surface it to the agent.",example:{call:"const cam = useCamera({ facingMode: 'environment' }); // on button click: await cam.start()",returns:{status:"completed",value:{dataUrl:"data:image/png;base64,\u2026",width:640,height:480,mimeType:"image/png"}}}},{hook:"useClipboardPaste",permission:"clipboard-read",description:"Read the system clipboard contents on user gesture.",usage:"Mount when the intent involves importing copied content (paste-into-form, paste-image-to-upload, paste-link). The Permissions API requires a user gesture; gate `start()` behind a button click. Returned value lands in a contextSpec slot or an actionSpec payload.",example:{call:"const paste = useClipboardPaste(); // on button click: await paste.start()",returns:{status:"completed",value:"pasted clipboard text"}}},{hook:"useClipboardWrite",permission:"clipboard-write",description:"Write to the system clipboard on user gesture.",usage:"Mount when the intent includes copying generated text, share links, codes, or transcripts to the system clipboard. Fire an actionSpec event so the agent observes the act (it does not see the written value \u2014 that stays component-local).",example:{call:"const write = useClipboardWrite({ text: 'hello' }); // on button click: await write.start()",returns:{status:"completed",value:"hello"}}},{hook:"useFilePicker",description:"Open the native file picker and read selected files.",usage:"Mount when the intent names file upload, attachment selection, or document import. No permission required. The hook returns the picked files plus metadata; thread file refs / data URLs into a contextSpec slot or actionSpec payload.",example:{call:"const picker = useFilePicker({ accept: 'image/*' }); // on button click: await picker.start()",returns:{status:"completed",value:{files:[{name:"photo.png",type:"image/png",size:12345,_file:"<File>"}]}}}},{hook:"useGeolocation",permission:"geolocation",description:"Resolve the device's current geolocation.",usage:'Mount when the intent names "current location", maps, nearby search, location-aware UI. Browser prompts the user on `start()`; the hook returns coordinates once granted. Thread the resolved coords into a contextSpec slot so the agent observes the latest fix.',example:{call:"const geo = useGeolocation(); // on button click: await geo.start()",returns:{status:"completed",value:{latitude:37.7749,longitude:-122.4194,accuracy:20,timestamp:1718e9}}}},{hook:"useMicrophone",permission:"microphone",description:"Capture audio from the device microphone.",usage:"Mount when the intent names voice memos, audio messages, dictation, voice-driven UI. Returns an audio stream / blob; thread it into an actionSpec payload at recording-stop, or into a contextSpec slot for live transcription pipelines.",example:{call:"const mic = useMicrophone(); // record on click: await mic.start(); end with mic.stop()",returns:{status:"completed",value:{blob:"<Blob>",durationMs:4200,mimeType:"audio/webm"}}}},{hook:"useNotifications",permission:"notifications",description:"Show system / browser notifications to the user.",usage:"Mount when the intent involves alerting the user about something (reminders, completion of long tasks, incoming messages) and the UI may be in the background. Permission is prompted on first `start()`; the agent does NOT see notification dismissal directly \u2014 surface it via an actionSpec if needed.",example:{call:"const notify = useNotifications({ title: 'Done' }); // after the task completes: await notify.start()",returns:{status:"completed",value:{outcome:"closed"}}}}]}],FR=Object.freeze(new Set(X2.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)))});var Q2=x(()=>{"use strict"});var kc,tf,lv=x(()=>{"use strict";kc=/^use[A-Z][A-Za-z0-9]*$/,tf=/^[A-Z][A-Za-z0-9]*$/});var cv,Ble,rf=x(()=>{"use strict";ef();Q2();lv();cv=["geolocation","notifications","microphone","camera","persistent-storage","midi","clipboard-read","clipboard-write","speaker-selection","storage-access","background-sync","accelerometer","gyroscope","magnetometer","ambient-light-sensor","screen-wake-lock"],Ble=new Set(cv)});var ut,ri,DV,PV,UV,LV,ZV,VV,HV,qV,BV,GV,uv,FV,KR,YR,KV,WV,XR,WR,JR,QR,JV,YV,Yle,nf,Xle,XV,QV,eH,Qle,zo,Ls=x(()=>{"use strict";To();rf();ef();lv();lv();ut=d.lazy(()=>d.union([d.string(),d.number(),d.boolean(),d.null(),d.array(ut),d.record(d.string(),ut)])),ri=d.lazy(()=>d.object({type:d.enum(["string","number","integer","boolean","array","object","null"]).optional(),description:d.string().optional(),enum:d.array(ut).optional(),default:ut.optional(),example:ut.optional(),items:ri.optional(),properties:d.record(d.string(),ri).optional(),required:d.array(d.string()).optional(),additionalProperties:d.union([ri,d.boolean()]).optional(),format:d.string().optional()}).passthrough()),DV=d.object({description:d.string().optional(),schema:ri,required:d.boolean().optional(),default:ut.optional(),example:ut.optional(),sourceTool:d.string().optional()}).strict(),PV=d.object({description:d.string().optional(),properties:d.record(d.string(),DV)}).strict(),UV=d.object({description:d.string().optional(),label:d.string(),schema:ri.optional(),example:ut.optional(),icon:d.string().optional(),confirm:d.boolean().optional(),nextStep:d.string().min(1).optional()}).strict(),LV=d.record(d.string(),UV),ZV=d.object({description:d.string().optional(),schema:ri,example:ut.optional(),mode:d.enum(["append","replace"]).optional(),replay:d.enum(["latest","all","none"]).optional(),complete:d.boolean().optional(),source:d.object({tool:d.string(),args:d.record(d.string(),ut).optional()}).strict().optional()}).strict(),VV=d.record(d.string(),ZV),HV=d.object({description:d.string().optional(),schema:ri,default:ut.optional(),debounceMs:d.number().int().nonnegative().optional(),example:ut.optional()}).strict(),qV=d.record(d.string(),HV),BV=d.object({serverInfo:d.object({name:d.string(),version:d.string().optional()}).strict().optional(),toolInfo:d.object({inputSchema:ri,description:d.string().optional(),outputSchema:ri.optional()}).strict(),usage:d.string().optional(),example:d.object({input:ut,output:ut}).strict().optional()}).strict(),GV=d.object({tools:d.record(d.string(),BV)}).passthrough(),uv=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,FV=d.array(d.string().regex(uv)).readonly(),KR=/^sha384-[A-Za-z0-9+/]+=*$/,YR=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,KV=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,WV=/^[a-z0-9.-]+(:\d+)?$/,XR={gotchas:d.string().optional()},WR={...XR,description:d.string().optional(),usage:d.string().optional(),example:ut.optional(),permission:d.string().optional()},JR={...XR,description:d.string().min(1),usage:d.string().min(1),example:ut,permission:d.enum(cv).optional()},QR={version:d.string().regex(KV),package:d.string().regex(YR),bundleUrl:d.url().optional(),bundleHost:d.string().regex(WV).optional(),bundleSri:d.string().regex(KR).optional(),styleUrl:d.url().optional(),connect:d.array(d.url()).readonly().optional(),requires:FV.optional(),typesUrl:d.url().optional(),typesSri:d.string().regex(KR).optional()},JV=d.union([d.object({hook:d.string().regex(kc),...WR}).strict(),d.object({component:d.string().regex(tf),...WR}).strict()]),YV=d.union([d.object({hook:d.string().regex(kc),...JR}).strict(),d.object({component:d.string().regex(tf),...JR}).strict()]),Yle=d.object({...QR,exports:d.array(JV).min(1)}).strict(),nf=d.object({...QR,exports:d.array(YV).min(1)}).strict(),Xle=nf.refine(e=>e.package===Qp||typeof e.typesUrl=="string",{message:"registered GadgetDescriptor MUST declare a `typesUrl` (HTTPS URL to the package's .d.ts) \u2014 the code-gen sandbox loads it to typecheck generated component code against the export signatures. Run `tsup --dts` (or `tsc --declaration`) in the wrapper build and publish the emitted .d.ts. Only the first-party `@ggui-ai/gadgets` stdlib is exempt.",path:["typesUrl"]}),XV=d.object({description:d.string().optional(),usage:d.string().optional()}).strict(),QV=d.record(d.string().refine(e=>kc.test(e)||tf.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),XV).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),eH=d.object({gadgets:d.record(d.string().regex(YR),QV)}).strict(),Qle=d.record(d.string().regex(uv),d.string()).readonly(),zo=d.object({propsSpec:PV.optional(),actionSpec:LV.optional(),streamSpec:VV.optional(),contextSpec:qV.optional(),agentCapabilities:GV.optional(),clientCapabilities:eH.optional()}).passthrough()});var eS,tS,tH,rS,Zs,eC,rH,oce,of=x(()=>{"use strict";To();Ls();eS=d.object({kind:d.literal("llm"),generator:d.string().min(1),model:d.string().min(1)}).strict(),tS=d.object({kind:d.literal("user")}).strict(),tH=d.object({kind:d.literal("curated")}).strict(),rS=d.union([eS,tS,tH]),Zs=d.object({persona:d.string().optional().describe('Design persona, e.g. "minimalist" / "data-dense". Part of cache identity.'),aesthetic:d.string().optional().describe('Visual aesthetic, e.g. "calm" / "ornate". Part of cache identity.'),context:d.record(d.string(),ut).optional().describe('Deliberate design-shaping signals (e.g. {situation:"sad"}) \u2014 part of cache identity. NOT for per-user runtime data; put that in propsSpec/contextSpec.'),seedPrompt:d.string().optional().describe("Generation seed directive. Part of cache identity.")}).strict(),eC=d.object({blueprintId:d.string().min(1),contractHash:d.string().min(1),appId:d.string().min(1),codeS3Url:d.string().optional(),codeHash:d.string().optional(),source:rS,validatorScore:d.number().min(0).max(1).optional(),variance:Zs,isOperatorDefault:d.literal(!0).optional(),createdAt:d.string().min(1),createdBy:d.enum(["agent","operator"]),contract:zo,contractEmbedding:d.array(d.number()).optional()}).strict(),rH=d.object({hash:d.number().min(0).optional(),embed:d.number().min(0).optional(),struct:d.number().min(0).optional(),variance:d.number().min(0).optional(),intent:d.number().min(0).optional()}).strict(),oce=d.object({weights:rH.optional(),threshold:d.number().min(0).max(1).optional(),topK:d.number().int().min(1).optional()}).strict()});var nH,oH,iH,aH,tC,sH,lH,cH,rC,nS=x(()=>{"use strict";To();Ls();of();nH=d.enum(["cache","agent","synth"]),oH=d.union([d.object({op:d.literal("add"),path:d.string(),value:ut}).strict(),d.object({op:d.literal("remove"),path:d.string()}).strict(),d.object({op:d.literal("replace"),path:d.string(),value:ut}).strict()]),iH=d.array(oH),aH=d.object({contract:zo,variance:d.object({persona:d.string().optional(),aesthetic:d.string().optional(),context:d.record(d.string(),ut).optional(),seedPrompt:d.string().optional()}).strict().optional(),generator:d.string().optional()}).strict(),tC=aH,sH=d.object({blueprintId:d.string().min(1).optional(),contractHash:d.string().min(1),codeHash:d.string().optional(),source:rS.optional(),variance:Zs,selectedReason:d.string().optional()}).strict(),lH=d.object({code:d.string().min(1),severity:d.enum(["error","warn"]),path:d.string(),message:d.string()}).strict(),cH=d.object({contractDiff:iH,reasoning:d.string()}).strict(),rC=d.object({origin:nH,rationale:d.string(),blueprintMeta:sH,proposedContractSummary:d.string().optional(),amendments:cH.optional(),validationFindings:d.array(lH).optional()}).strict()});var uH,nC,dH,mce,pH,gce,fH,hce,mH,yce,gH,vce,hH,$ce,yH,bce,vH,xce,_ce,Sce,$H,kce,bH,xH,_H,wce,Ece,Tce,zce,Rce,oS=x(()=>{"use strict";To();nS();Ls();of();uH=d.object({width:d.number(),height:d.number()}),nC=d.object({viewport:uH,platform:d.enum(["web","mobile","desktop"]),deviceType:d.enum(["phone","tablet","desktop"]),orientation:d.enum(["portrait","landscape"]),devicePixelRatio:d.number().optional(),touchPrimary:d.boolean().optional(),shellType:d.enum(["chat","fullscreen","spatial"]).optional(),colorScheme:d.enum(["light","dark"]).optional(),reducedMotion:d.boolean().optional()}).passthrough(),dH={sessionId:d.string().min(1).describe("Globally-unique sessionId to consume events from. Cross-tenant access surfaces uniformly as session_not_found."),timeout:d.number().int().min(0).max(25).optional().describe("Inline long-poll seconds, integer in [0, 25]. 0 = immediate. Values outside the bound reject INVALID_PARAMS. Returns on first event OR timeout; re-call on empty to keep waiting \u2014 longer waits are your loop, not a bigger timeout.")},mce=d.object(dH),pH={sessionId:d.string().min(1),channel:d.string().min(1),payload:d.unknown(),complete:d.boolean().optional()},gce=d.object(pH),fH={sessionId:d.string().min(1).describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render.")},hce=d.object(fH),mH={},yce=d.object(mH),gH={query:d.string().min(1).describe("Natural-language description of the UI you're looking for"),limit:d.number().int().min(1).max(100).optional()},vce=d.object(gH),hH={blueprintId:d.string().min(1).describe("The stable blueprint id declared via ggui.ui.json#id. Must match an entry in this server's UI registry.")},$ce=d.object(hH),yH={},bce=d.object(yH),vH={serviceId:d.string().min(1),reason:d.string().optional(),sessionId:d.string().optional()},xce=d.object(vH),_ce=d.object({intent:d.string().min(1).describe('Concise purpose \u2014 same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:tC.describe("Agent's draft: contract (required) + optional variance + optional generator slug hint. The server combines this with cached blueprints + validator outcomes to produce a three-mode suggestion (cache / agent / synth)."),forceCreate:d.boolean().optional()}).strict(),Sce=d.object({handshakeId:d.string().describe("Stable id \u2014 pass to ggui_render / ggui_update"),action:d.enum(["create","reuse","update","replace","declined"]),suggestion:rC.describe("Server's suggestion \u2014 origin-routed (cache | agent | synth). Always carries a provisional `blueprintMeta` the agent reuses by rendering WITHOUT `override` (accept the proposal as-is)."),reason:d.string().max(280).optional().describe("Short rationale (\u2264280 chars) for the `action` value. Surfaced for agent + operator visibility; truncated to keep the structuredContent payload predictable."),nextStep:d.object({tool:d.literal("ggui_render"),description:d.string(),example:d.string()}).optional().describe("Wire-shape recovery hint. A worked literal example of the next ggui_render call the agent should emit \u2014 the example string can be copied verbatim and tweaked (e.g. fill in `props` placeholders). Top-level field so a skimming agent finds it immediately.")}),$H={handshakeId:d.string({message:"ggui_render: handshakeId is REQUIRED. Call ggui_handshake({intent, blueprintDraft}) first to negotiate \u2014 handshake returns a handshakeId + suggestion. Then render with {handshakeId, props} (accept the suggestion as-is) or {handshakeId, props, override: {contract?, variance?}} (re-aim the contract and/or variance). Direct-render without a handshakeId is not supported."}).min(1,"ggui_render: handshakeId must be a non-empty string from a prior ggui_handshake call."),props:d.record(d.string(),d.unknown()),themeId:d.string().min(1).optional().describe("Per-render theme override. Wins over App.defaultThemeId for THIS render. Omit to inherit the app theme."),infra:d.object({model:d.string().min(1).optional().describe("Provider-prefixed model id (e.g., `anthropic/claude-haiku-4-5`, `openai/gpt-5`). Generator-specific prefixes (e.g., `bedrock/...` for AWS Bedrock routing) supported when the bound generator handles them.")}).strict().optional(),override:d.object({contract:zo.optional().describe("STRICT full re-draft of the contract \u2014 must already conform; the server will not repair it."),variance:Zs.optional().describe("Re-aim the variant (persona/aesthetic/context/seedPrompt); keeps the agreed contract.")}).strict().refine(e=>e.contract!==void 0||e.variance!==void 0,{message:"override must set contract and/or variance \u2014 omit override entirely to ACCEPT the handshake proposal as-is."}).optional().describe("Omit to ACCEPT the proposal as-is. Provide to re-aim contract and/or variance (PATCH semantics).")},kce=d.object($H),bH=d.object({hit:d.boolean().describe("True when a stored component was served without generating new code."),similarity:d.number().optional().describe("Cosine similarity of the matched component to the request (semantic match only)."),cachedBlueprintId:d.string().optional().describe("The stored component id that was matched. Equals top-level blueprintId on a hit."),llmCallsAvoided:d.number().describe("Generation calls skipped by serving the stored component (0 on a fresh generation)."),kind:d.enum(["full-template","cold"]).optional().describe("full-template = a whole stored component was served; cold = freshly generated."),reason:d.string().optional().describe("Compact human-readable explanation of the cache outcome \u2014 why this render reused a stored component or generated cold. Diagnostic; default-available without the verbose env-gated trace.")}),xH=d.enum(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS"]),_H=d.object({code:xH.describe("Canonical failure class. PRODUCTION_FAILED: generation did not produce a component. VALIDATION_ERROR: a server-side precondition rejected the render before generation. NO_PLATFORM_KEY: the server's managed provider-key configuration has no key for the resolved route. NO_CREDENTIALS: no generation credentials are configured on the server."),message:d.string().describe("Human-readable failure detail \u2014 fold into the next attempt or surface to the operator.")}),wce=d.object({sessionId:d.string(),resourceUri:d.string().optional().describe("MCP-Apps mount URI (ui://ggui/render/{id}). Present iff the render is mountable; absent on a failed render."),action:d.enum(["create","reuse","update","replace","declined"]),contractHash:d.string().describe("Canonical hash of the rendered data contract (shape only \u2014 fields, types, specs). Same hash \u27FA same data flow."),blueprintId:d.string().describe("Opaque id of the materialised component for this render. On the handshake-decided reuse paths (accept a cache-origin proposal, or a variance re-aim that resolves to an existing variant) it is the stored id \u2014 equal ids across renders mean the same stored component. override.contract always generates cold and mints a fresh id, even for an identical contract."),variantKey:d.string().describe("Canonical hash of the design-time variance (persona, aesthetic, seed prompt, context). With contractHash it forms the reuse key: the same pair reuses one component; a different variant of the same contract gets its own."),cache:bH.describe("Reuse outcome for this render: whether a stored component was served, its similarity, the matched component id, and how many generation calls that avoided."),error:_H.optional().describe("Present iff the tool result is isError \u2014 canonical {code, message} for a failed/rejected generation. Absent on success."),nextStep:d.object({tool:d.literal("ggui_consume"),description:d.string(),example:d.string(),args:d.object({sessionId:d.string()})}).optional().describe("Recovery hint \u2014 when the rendered contract has actions, points the agent at ggui_consume({sessionId}) for the inbound action loop. Absent for pure-display renders.")}),Ece=d.discriminatedUnion("kind",[d.object({sessionId:d.string().describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render."),kind:d.literal("replace"),props:d.record(d.string(),d.unknown()).describe("Full replacement props map. New map IS the new state.")}).strict(),d.object({sessionId:d.string().describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render."),kind:d.literal("merge"),patch:d.record(d.string(),d.unknown()).describe("RFC 7396 JSON Merge Patch \u2014 null deletes a key; arrays fully replace.")}).strict()]),Tce=d.object({sessionId:d.string(),updated:d.boolean(),resourceUri:d.string()}),zce=d.object({toolCatalog:d.record(d.string(),d.object({name:d.string(),version:d.string().optional()}).strict()).describe("Per-app canonical tool identities: bare tool name -> its server's initialize-declared serverInfo. Host/library-supplied; not an agent action.")}).strict(),Rce=d.object({saved:d.boolean(),appId:d.string()}).strict()});var SH,kH,wH,oC,EH,TH,zH,RH,CH,IH,OH,MH,AH,jH,NH,DH,Mce,PH,Ace,iC=x(()=>{"use strict";To();oS();SH=d.object({type:d.literal("text"),text:d.string()}),kH=d.object({type:d.literal("tool_use"),id:d.string(),name:d.string(),input:d.record(d.string(),d.unknown())}),wH=d.object({type:d.literal("tool_result"),tool_use_id:d.string(),content:d.unknown(),is_error:d.boolean().optional()}),oC=d.discriminatedUnion("type",[SH,kH,wH]),EH=d.object({type:d.literal("text_delta"),text:d.string()}),TH=d.object({type:d.literal("input_json_delta"),partial_json:d.string()}),zH=d.discriminatedUnion("type",[EH,TH]),RH=d.object({type:d.literal("message_start"),message:d.object({id:d.string(),role:d.literal("assistant"),model:d.string().optional()})}),CH=d.object({type:d.literal("content_block_start"),index:d.number().int().nonnegative(),content_block:oC}),IH=d.object({type:d.literal("content_block_delta"),index:d.number().int().nonnegative(),delta:zH}),OH=d.object({type:d.literal("content_block_stop"),index:d.number().int().nonnegative()}),MH=d.object({type:d.literal("message_delta"),delta:d.object({stop_reason:d.enum(["end_turn","max_tokens","tool_use","error"]),stop_sequence:d.string().nullable().optional()}),usage:d.object({input_tokens:d.number().int().nonnegative(),output_tokens:d.number().int().nonnegative()})}),AH=d.object({type:d.literal("message_stop")}),jH=d.object({type:d.literal("ping")}),NH=d.enum(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),DH=d.object({type:d.literal("error"),error:d.object({code:NH,message:d.string(),retryAfterMs:d.number().int().nonnegative().optional()})}),Mce=d.discriminatedUnion("type",[RH,CH,IH,OH,MH,AH,jH,DH]),PH=d.object({role:d.enum(["user","assistant"]),content:d.union([d.string(),d.array(oC)])}),Ace=d.object({message:d.string(),history:d.array(PH).optional(),interfaceContext:nC.optional(),requestId:d.string().optional()})});var sC=H((Nce,aC)=>{"use strict";aC.exports=function e(t){if(typeof t=="number"&&isNaN(t))throw new Error("NaN is not allowed");if(typeof t=="number"&&!isFinite(t))throw new Error("Infinity is not allowed");return t===null||typeof t!="object"?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((n,i,a)=>`${n}${a===0?"":","}${e(i===void 0||typeof i=="symbol"?null:i)}`,"")}]`:`{${Object.keys(t).sort().reduce((o,n)=>{if(t[n]===void 0||typeof t[n]=="symbol")return o;let i=o.length===0?"":",";return`${o}${i}${e(n)}:${e(t[n])}`},"")}}`}});var UH,lC=x(()=>{"use strict";UH=O(sC(),1);En()});var cC=x(()=>{"use strict";En()});var uC=x(()=>{"use strict"});var dC=x(()=>{"use strict"});var pC=x(()=>{"use strict"});function iS(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function fC(e){return e==="inline"||e==="fullscreen"||e==="pip"}function dv(e){if(!iS(e))return;let t={};if(fC(e.displayMode)&&(t.currentDisplayMode=e.displayMode),Array.isArray(e.availableDisplayModes)){let r=e.availableDisplayModes.filter(fC);r.length>0&&(t.availableDisplayModes=r)}if(iS(e.containerDimensions)){let r={},o=e.containerDimensions;typeof o.width=="number"&&(r.width=o.width),typeof o.maxWidth=="number"&&(r.maxWidth=o.maxWidth),typeof o.height=="number"&&(r.height=o.height),typeof o.maxHeight=="number"&&(r.maxHeight=o.maxHeight),Object.keys(r).length>0&&(t.containerDimensions=r)}if((e.platform==="web"||e.platform==="desktop"||e.platform==="mobile")&&(t.platform=e.platform),iS(e.deviceCapabilities)){let r={},o=e.deviceCapabilities;typeof o.touch=="boolean"&&(r.touch=o.touch),typeof o.hover=="boolean"&&(r.hover=o.hover),Object.keys(r).length>0&&(t.deviceCapabilities=r)}return typeof e.locale=="string"&&e.locale.length>0&&(t.locale=e.locale),typeof e.timeZone=="string"&&e.timeZone.length>0&&(t.timeZone=e.timeZone),t}function aS(e,t){return e===t?!0:e===void 0||t===void 0?!1:JSON.stringify(e)===JSON.stringify(t)}var mC=x(()=>{"use strict"});var gC=x(()=>{"use strict"});var Bce,Gce,pv=x(()=>{"use strict";Bce=16*1024,Gce=64*1024});var hC=x(()=>{"use strict"});var yC=x(()=>{"use strict";En()});var vC=x(()=>{"use strict"});var $C=x(()=>{"use strict"});var tue,rue,nue,oue,iue,aue,sue,lue,cue,uue,bC=x(()=>{"use strict";To();Ls();of();tue=d.object({contract:zo,generator:d.string().min(1).optional().describe("Generator slug (e.g. `ui-gen-default-haiku-4-5`). When omitted, dispatches through `GeneratorRegistry.defaultGenerator()`."),persona:d.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),aesthetic:d.string().optional().describe("Free-form aesthetic tag (e.g. 'glassmorphic', 'brutalist', 'editorial'). Persisted on `Blueprint.variance.aesthetic`. Distinct from persona \u2014 persona names the user mental model; aesthetic names the visual treatment."),context:d.record(d.string(),ut).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:d.string().optional().describe("The raw operator prompt that produced this variant. Round-trip input for the variant-selector + audit trail."),setAsOperatorDefault:d.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict(),rue=d.object({blueprintId:d.string().min(1),codeHash:d.string().optional().describe("Content hash of the generated code body. Absent when the generator returned a non-`ok` result and persistence skipped \u2014 the failure mode is surfaced through generator-level error reporting elsewhere."),validatorScore:d.number().min(0).max(1).optional().describe("Advanced generator's iterative-loop validator score (0-1). Absent for default-generator output."),source:eS.describe("Provenance stamped on the persisted `Blueprint.source` \u2014 always the `llm` arm on this path: `generator` is the engine slug the dispatch resolved to (stamped from the engine's own metadata claim); `model` is the LLM model id the engine called.")}).strict(),nue=d.object({contract:zo,componentCode:d.string().min(1).describe("Verbatim component-code body to persist. Stored as-is \u2014 no LLM call, no validator pass. Operator owns correctness; the handler computes the canonical sha256 codeHash and routes the bytes through the same persistence seams as `*_generate_*`."),persona:d.string().optional().describe("Free-form persona tag (e.g. 'minimalist', 'data-dense'). Normalized via lowercase+trim before persistence; logged as a warning when within Levenshtein distance < 2 of an existing tag for the same appId."),aesthetic:d.string().optional().describe("Free-form aesthetic tag. Persisted on `Blueprint.variance.aesthetic`."),context:d.record(d.string(),ut).optional().describe("Small structured signal carried alongside the persona. Persisted on `Blueprint.variance.context`."),seedPrompt:d.string().optional().describe("Optional originating prompt for audit + round-tripping (e.g. the prose the operator originally fed into `*_generate_*` before exporting)."),setAsOperatorDefault:d.boolean().optional().describe("When true, pins the new blueprint as the operator default for its `(appId, contractHash)` group, clearing any prior default in the same group.")}).strict(),oue=d.object({blueprintId:d.string().min(1),codeHash:d.string().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:tS.describe('Provenance stamped on the persisted `Blueprint.source` \u2014 always `{kind: "user"}` on this path: operator-supplied bytes, no LLM dispatch, no engine claim to record.')}).strict(),iue=d.object({contractHash:d.string().min(1).optional().describe("Filter to a single `(appId, contractHash)` group. Combine with `generator` / `persona` to narrow within the group."),generator:d.string().min(1).optional().describe('Filter to engine-generated blueprints (`source.kind === "llm"`) whose `source.generator` equals this slug. `user`-sourced rows never match (they carry no engine provenance).'),persona:d.string().optional().describe("Filter on `variance.persona`. Normalized to match persisted form (lowercase+trim)."),intentKeywords:d.array(d.string().min(1)).optional().describe("Semantic-search tokens. When set, dispatches through `BlueprintSearch.search()` rather than indexed `list()`.")}).strict(),aue=d.object({blueprints:d.array(eC)}).strict(),sue=d.object({blueprintId:d.string().min(1),isOperatorDefault:d.literal(!0).optional().describe("When `true`, pins this blueprint as the operator default for its `(appId, contractHash)` group. Clears any prior default. Cannot set to `false` \u2014 to unpin, set another blueprint in the same group as default, or delete this one."),variance:Zs.optional().describe('Partial-merge into the existing variance. Supplied keys overwrite; omitted keys preserve. Pass `{persona: ""}` to clear a persona (handler treats empty string as removal).')}).strict(),lue=d.object({blueprintId:d.string().min(1),updatedAt:d.string().min(1)}).strict(),cue=d.object({blueprintId:d.string().min(1)}).strict(),uue=d.object({deleted:d.literal(!0)}).strict()});var xC=x(()=>{"use strict"});var _C=x(()=>{"use strict"});var SC=x(()=>{"use strict"});var kC=x(()=>{"use strict"});var wC=x(()=>{"use strict"});var EC=x(()=>{"use strict"});function LH(e){return"schemaVersion"in e?e.schemaVersion:Y2}function TC(e){let t={sessionId:e.sessionId,type:e.type};e.payload!==void 0&&(t.payload=e.payload),e.clientSeq!==void 0&&(t.clientSeq=e.clientSeq);let r=LH(e);return r!==void 0&&(t.schemaVersion=r),t}var zC=x(()=>{"use strict";Xp()});var af,sS=x(()=>{"use strict";Xp();af=class extends Error{code=sv;observedVersion;acceptedVersions;observedBy;constructor(t){let r=t.observedVersion===void 0?"unknown":Array.isArray(t.observedVersion)?t.observedVersion.join(", "):String(t.observedVersion),o=t.acceptedVersions.join(", ");super(`UPGRADE_REQUIRED: ${t.observedBy==="server"?"client":"server"} speaks version '${r}' which is not in the ${t.observedBy==="server"?"server":"client"}'s accepted set [${o}].`),this.name="UpgradeRequiredError",t.observedVersion!==void 0&&(this.observedVersion=t.observedVersion),this.acceptedVersions=t.acceptedVersions,this.observedBy=t.observedBy}}});var RC=x(()=>{"use strict";rf()});var cf=H(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.regexpCode=Ne.getEsmExportName=Ne.getProperty=Ne.safeStringify=Ne.stringify=Ne.strConcat=Ne.addCodeArg=Ne.str=Ne._=Ne.nil=Ne._Code=Ne.Name=Ne.IDENTIFIER=Ne._CodeOrName=void 0;var sf=class{};Ne._CodeOrName=sf;Ne.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Vs=class extends sf{constructor(t){if(super(),!Ne.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ne.Name=Vs;var Tn=class extends sf{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof Vs&&(r[o.str]=(r[o.str]||0)+1),r),{})}};Ne._Code=Tn;Ne.nil=new Tn("");function CC(e,...t){let r=[e[0]],o=0;for(;o<t.length;)cS(r,t[o]),r.push(e[++o]);return new Tn(r)}Ne._=CC;var lS=new Tn("+");function IC(e,...t){let r=[lf(e[0])],o=0;for(;o<t.length;)r.push(lS),cS(r,t[o]),r.push(lS,lf(e[++o]));return ZH(r),new Tn(r)}Ne.str=IC;function cS(e,t){t instanceof Tn?e.push(...t._items):t instanceof Vs?e.push(t):e.push(qH(t))}Ne.addCodeArg=cS;function ZH(e){let t=1;for(;t<e.length-1;){if(e[t]===lS){let r=VH(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function VH(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Vs||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof Vs))return`"${e}${t.slice(1)}`}function HH(e,t){return t.emptyStr()?e:e.emptyStr()?t:IC`${e}${t}`}Ne.strConcat=HH;function qH(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:lf(Array.isArray(e)?e.join(","):e)}function BH(e){return new Tn(lf(e))}Ne.stringify=BH;function lf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ne.safeStringify=lf;function GH(e){return typeof e=="string"&&Ne.IDENTIFIER.test(e)?new Tn(`.${e}`):CC`[${e}]`}Ne.getProperty=GH;function FH(e){if(typeof e=="string"&&Ne.IDENTIFIER.test(e))return new Tn(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ne.getEsmExportName=FH;function KH(e){return new Tn(e.toString())}Ne.regexpCode=KH});var pS=H(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.ValueScope=Xr.ValueScopeName=Xr.Scope=Xr.varKinds=Xr.UsedValueState=void 0;var Yr=cf(),uS=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},fv;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(fv||(Xr.UsedValueState=fv={}));Xr.varKinds={const:new Yr.Name("const"),let:new Yr.Name("let"),var:new Yr.Name("var")};var mv=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof Yr.Name?t:this.name(t)}name(t){return new Yr.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||o===void 0)&&o.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};Xr.Scope=mv;var gv=class extends Yr.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,Yr._)`.${new Yr.Name(r)}[${o}]`}};Xr.ValueScopeName=gv;var WH=(0,Yr._)`\n`,dS=class extends mv{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?WH:Yr.nil}}get(){return this._scope}name(t){return new gv(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,a=(o=r.key)!==null&&o!==void 0?o:r.ref,s=this._values[i];if(s){let u=s.get(a);if(u)return u}else s=this._values[i]=new Map;s.set(a,n);let l=this._scope[i]||(this._scope[i]=[]),c=l.length;return l[c]=r.ref,n.setValue(r,{property:i,itemIndex:c}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,Yr._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=Yr.nil;for(let a in t){let s=t[a];if(!s)continue;let l=o[a]=o[a]||new Map;s.forEach(c=>{if(l.has(c))return;l.set(c,fv.Started);let u=r(c);if(u){let p=this.opts.es5?Xr.varKinds.var:Xr.varKinds.const;i=(0,Yr._)`${i}${p} ${c} = ${u};${this.opts._n}`}else if(u=n?.(c))i=(0,Yr._)`${i}${u}${this.opts._n}`;else throw new uS(c);l.set(c,fv.Completed)})}return i}};Xr.ValueScope=dS});var he=H($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.or=$e.and=$e.not=$e.CodeGen=$e.operators=$e.varKinds=$e.ValueScopeName=$e.ValueScope=$e.Scope=$e.Name=$e.regexpCode=$e.stringify=$e.getProperty=$e.nil=$e.strConcat=$e.str=$e._=void 0;var Ee=cf(),so=pS(),fa=cf();Object.defineProperty($e,"_",{enumerable:!0,get:function(){return fa._}});Object.defineProperty($e,"str",{enumerable:!0,get:function(){return fa.str}});Object.defineProperty($e,"strConcat",{enumerable:!0,get:function(){return fa.strConcat}});Object.defineProperty($e,"nil",{enumerable:!0,get:function(){return fa.nil}});Object.defineProperty($e,"getProperty",{enumerable:!0,get:function(){return fa.getProperty}});Object.defineProperty($e,"stringify",{enumerable:!0,get:function(){return fa.stringify}});Object.defineProperty($e,"regexpCode",{enumerable:!0,get:function(){return fa.regexpCode}});Object.defineProperty($e,"Name",{enumerable:!0,get:function(){return fa.Name}});var $v=pS();Object.defineProperty($e,"Scope",{enumerable:!0,get:function(){return $v.Scope}});Object.defineProperty($e,"ValueScope",{enumerable:!0,get:function(){return $v.ValueScope}});Object.defineProperty($e,"ValueScopeName",{enumerable:!0,get:function(){return $v.ValueScopeName}});Object.defineProperty($e,"varKinds",{enumerable:!0,get:function(){return $v.varKinds}});$e.operators={GT:new Ee._Code(">"),GTE:new Ee._Code(">="),LT:new Ee._Code("<"),LTE:new Ee._Code("<="),EQ:new Ee._Code("==="),NEQ:new Ee._Code("!=="),NOT:new Ee._Code("!"),OR:new Ee._Code("||"),AND:new Ee._Code("&&"),ADD:new Ee._Code("+")};var ni=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},fS=class extends ni{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?so.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=Ec(this.rhs,t,r)),this}get names(){return this.rhs instanceof Ee._CodeOrName?this.rhs.names:{}}},hv=class extends ni{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof Ee.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Ec(this.rhs,t,r),this}get names(){let t=this.lhs instanceof Ee.Name?{}:{...this.lhs.names};return vv(t,this.rhs)}},mS=class extends hv{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},gS=class extends ni{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},hS=class extends ni{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},yS=class extends ni{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},vS=class extends ni{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=Ec(this.code,t,r),this}get names(){return this.code instanceof Ee._CodeOrName?this.code.names:{}}},uf=class extends ni{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(JH(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Bs(t,r.names),{})}},oi=class extends uf{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},$S=class extends uf{},wc=class extends oi{};wc.kind="else";var Hs=class e extends oi{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new wc(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(OC(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=Ec(this.condition,t,r),this}get names(){let t=super.names;return vv(t,this.condition),this.else&&Bs(t,this.else.names),t}};Hs.kind="if";var qs=class extends oi{};qs.kind="for";var bS=class extends qs{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=Ec(this.iteration,t,r),this}get names(){return Bs(super.names,this.iteration.names)}},xS=class extends qs{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?so.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=vv(super.names,this.from);return vv(t,this.to)}},yv=class extends qs{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=Ec(this.iterable,t,r),this}get names(){return Bs(super.names,this.iterable.names)}},df=class extends oi{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};df.kind="func";var pf=class extends uf{render(t){return"return "+super.render(t)}};pf.kind="return";var _S=class extends oi{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Bs(t,this.catch.names),this.finally&&Bs(t,this.finally.names),t}},ff=class extends oi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ff.kind="catch";var mf=class extends oi{render(t){return"finally"+super.render(t)}};mf.kind="finally";var SS=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
41
41
  `:""},this._extScope=t,this._scope=new so.Scope({parent:t}),this._nodes=[new $S]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let o=this._extScope.value(t,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new fS(t,i,o)),i}const(t,r,o){return this._def(so.varKinds.const,t,r,o)}let(t,r,o){return this._def(so.varKinds.let,t,r,o)}var(t,r,o){return this._def(so.varKinds.var,t,r,o)}assign(t,r,o){return this._leafNode(new hv(t,r,o))}add(t,r){return this._leafNode(new mS(t,$e.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==Ee.nil&&this._leafNode(new vS(t)),this}object(...t){let r=["{"];for(let[o,n]of t)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,Ee.addCodeArg)(r,n));return r.push("}"),new Ee._Code(r)}if(t,r,o){if(this._blockNode(new Hs(t)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Hs(t))}else(){return this._elseNode(new wc)}endIf(){return this._endBlockNode(Hs,wc)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new bS(t),r)}forRange(t,r,o,n,i=this.opts.es5?so.varKinds.var:so.varKinds.let){let a=this._scope.toName(t);return this._for(new xS(i,a,r,o),()=>n(a))}forOf(t,r,o,n=so.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=r instanceof Ee.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Ee._)`${a}.length`,s=>{this.var(i,(0,Ee._)`${a}[${s}]`),o(i)})}return this._for(new yv("of",n,i,r),()=>o(i))}forIn(t,r,o,n=this.opts.es5?so.varKinds.var:so.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,Ee._)`Object.keys(${r})`,o);let i=this._scope.toName(t);return this._for(new yv("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(qs)}label(t){return this._leafNode(new gS(t))}break(t){return this._leafNode(new hS(t))}return(t){let r=new pf;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(pf)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new _S;if(this._blockNode(n),this.code(t),r){let i=this.name("e");this._currNode=n.catch=new ff(i),r(i)}return o&&(this._currNode=n.finally=new mf,this.code(o)),this._endBlockNode(ff,mf)}throw(t){return this._leafNode(new yS(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=Ee.nil,o,n){return this._blockNode(new df(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(df)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let o=this._currNode;if(o instanceof t||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Hs))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};$e.CodeGen=SS;function Bs(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function vv(e,t){return t instanceof Ee._CodeOrName?Bs(e,t.names):e}function Ec(e,t,r){if(e instanceof Ee.Name)return o(e);if(!n(e))return e;return new Ee._Code(e._items.reduce((i,a)=>(a instanceof Ee.Name&&(a=o(a)),a instanceof Ee._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=r[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function n(i){return i instanceof Ee._Code&&i._items.some(a=>a instanceof Ee.Name&&t[a.str]===1&&r[a.str]!==void 0)}}function JH(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function OC(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Ee._)`!${kS(e)}`}$e.not=OC;var YH=MC($e.operators.AND);function XH(...e){return e.reduce(YH)}$e.and=XH;var QH=MC($e.operators.OR);function eq(...e){return e.reduce(QH)}$e.or=eq;function MC(e){return(t,r)=>t===Ee.nil?r:r===Ee.nil?t:(0,Ee._)`${kS(t)} ${e} ${kS(r)}`}function kS(e){return e instanceof Ee.Name?e:(0,Ee._)`(${e})`}});var Ie=H(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.checkStrictMode=_e.getErrorPath=_e.Type=_e.useFunc=_e.setEvaluated=_e.evaluatedPropsToName=_e.mergeEvaluated=_e.eachItem=_e.unescapeJsonPointer=_e.escapeJsonPointer=_e.escapeFragment=_e.unescapeFragment=_e.schemaRefOrVal=_e.schemaHasRulesButRef=_e.schemaHasRules=_e.checkUnknownRules=_e.alwaysValidSchema=_e.toHash=void 0;var nt=he(),tq=cf();function rq(e){let t={};for(let r of e)t[r]=!0;return t}_e.toHash=rq;function nq(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(NC(e,t),!DC(t,e.self.RULES.all))}_e.alwaysValidSchema=nq;function NC(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=o.RULES.keywords;for(let i in t)n[i]||LC(e,`unknown keyword: "${i}"`)}_e.checkUnknownRules=NC;function DC(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}_e.schemaHasRules=DC;function oq(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}_e.schemaHasRulesButRef=oq;function iq({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,nt._)`${r}`}return(0,nt._)`${e}${t}${(0,nt.getProperty)(o)}`}_e.schemaRefOrVal=iq;function aq(e){return PC(decodeURIComponent(e))}_e.unescapeFragment=aq;function sq(e){return encodeURIComponent(ES(e))}_e.escapeFragment=sq;function ES(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}_e.escapeJsonPointer=ES;function PC(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}_e.unescapeJsonPointer=PC;function lq(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}_e.eachItem=lq;function AC({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,a,s)=>{let l=a===void 0?i:a instanceof nt.Name?(i instanceof nt.Name?e(n,i,a):t(n,i,a),a):i instanceof nt.Name?(t(n,a,i),i):r(i,a);return s===nt.Name&&!(l instanceof nt.Name)?o(n,l):l}}_e.mergeEvaluated={props:AC({mergeNames:(e,t,r)=>e.if((0,nt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,nt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,nt._)`${r} || {}`).code((0,nt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,nt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,nt._)`${r} || {}`),TS(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:UC}),items:AC({mergeNames:(e,t,r)=>e.if((0,nt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,nt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,nt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,nt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function UC(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,nt._)`{}`);return t!==void 0&&TS(e,r,t),r}_e.evaluatedPropsToName=UC;function TS(e,t,r){Object.keys(r).forEach(o=>e.assign((0,nt._)`${t}${(0,nt.getProperty)(o)}`,!0))}_e.setEvaluated=TS;var jC={};function cq(e,t){return e.scopeValue("func",{ref:t,code:jC[t.code]||(jC[t.code]=new tq._Code(t.code))})}_e.useFunc=cq;var wS;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(wS||(_e.Type=wS={}));function uq(e,t,r){if(e instanceof nt.Name){let o=t===wS.Num;return r?o?(0,nt._)`"[" + ${e} + "]"`:(0,nt._)`"['" + ${e} + "']"`:o?(0,nt._)`"/" + ${e}`:(0,nt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,nt.getProperty)(e).toString():"/"+ES(e)}_e.getErrorPath=uq;function LC(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}_e.checkStrictMode=LC});var ii=H(zS=>{"use strict";Object.defineProperty(zS,"__esModule",{value:!0});var wr=he(),dq={data:new wr.Name("data"),valCxt:new wr.Name("valCxt"),instancePath:new wr.Name("instancePath"),parentData:new wr.Name("parentData"),parentDataProperty:new wr.Name("parentDataProperty"),rootData:new wr.Name("rootData"),dynamicAnchors:new wr.Name("dynamicAnchors"),vErrors:new wr.Name("vErrors"),errors:new wr.Name("errors"),this:new wr.Name("this"),self:new wr.Name("self"),scope:new wr.Name("scope"),json:new wr.Name("json"),jsonPos:new wr.Name("jsonPos"),jsonLen:new wr.Name("jsonLen"),jsonPart:new wr.Name("jsonPart")};zS.default=dq});var gf=H(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.extendErrors=Er.resetErrorsCount=Er.reportExtraError=Er.reportError=Er.keyword$DataError=Er.keywordError=void 0;var Oe=he(),bv=Ie(),Pr=ii();Er.keywordError={message:({keyword:e})=>(0,Oe.str)`must pass "${e}" keyword validation`};Er.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,Oe.str)`"${e}" keyword must be ${t} ($data)`:(0,Oe.str)`"${e}" keyword is invalid ($data)`};function pq(e,t=Er.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:a,allErrors:s}=n,l=HC(e,t,r);o??(a||s)?ZC(i,l):VC(n,(0,Oe._)`[${l}]`)}Er.reportError=pq;function fq(e,t=Er.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:a}=o,s=HC(e,t,r);ZC(n,s),i||a||VC(o,Pr.default.vErrors)}Er.reportExtraError=fq;function mq(e,t){e.assign(Pr.default.errors,t),e.if((0,Oe._)`${Pr.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,Oe._)`${Pr.default.vErrors}.length`,t),()=>e.assign(Pr.default.vErrors,null)))}Er.resetErrorsCount=mq;function gq({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",n,Pr.default.errors,s=>{e.const(a,(0,Oe._)`${Pr.default.vErrors}[${s}]`),e.if((0,Oe._)`${a}.instancePath === undefined`,()=>e.assign((0,Oe._)`${a}.instancePath`,(0,Oe.strConcat)(Pr.default.instancePath,i.errorPath))),e.assign((0,Oe._)`${a}.schemaPath`,(0,Oe.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,Oe._)`${a}.schema`,r),e.assign((0,Oe._)`${a}.data`,o))})}Er.extendErrors=gq;function ZC(e,t){let r=e.const("err",t);e.if((0,Oe._)`${Pr.default.vErrors} === null`,()=>e.assign(Pr.default.vErrors,(0,Oe._)`[${r}]`),(0,Oe._)`${Pr.default.vErrors}.push(${r})`),e.code((0,Oe._)`${Pr.default.errors}++`)}function VC(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw((0,Oe._)`new ${e.ValidationError}(${t})`):(r.assign((0,Oe._)`${o}.errors`,t),r.return(!1))}var Gs={keyword:new Oe.Name("keyword"),schemaPath:new Oe.Name("schemaPath"),params:new Oe.Name("params"),propertyName:new Oe.Name("propertyName"),message:new Oe.Name("message"),schema:new Oe.Name("schema"),parentSchema:new Oe.Name("parentSchema")};function HC(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,Oe._)`{}`:hq(e,t,r)}function hq(e,t,r={}){let{gen:o,it:n}=e,i=[yq(n,r),vq(e,r)];return $q(e,t,i),o.object(...i)}function yq({errorPath:e},{instancePath:t}){let r=t?(0,Oe.str)`${e}${(0,bv.getErrorPath)(t,bv.Type.Str)}`:e;return[Pr.default.instancePath,(0,Oe.strConcat)(Pr.default.instancePath,r)]}function vq({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:(0,Oe.str)`${t}/${e}`;return r&&(n=(0,Oe.str)`${n}${(0,bv.getErrorPath)(r,bv.Type.Str)}`),[Gs.schemaPath,n]}function $q(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:a,it:s}=e,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:p}=s;o.push([Gs.keyword,n],[Gs.params,typeof t=="function"?t(e):t||(0,Oe._)`{}`]),l.messages&&o.push([Gs.message,typeof r=="function"?r(e):r]),l.verbose&&o.push([Gs.schema,a],[Gs.parentSchema,(0,Oe._)`${u}${p}`],[Pr.default.data,i]),c&&o.push([Gs.propertyName,c])}});var BC=H(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.boolOrEmptySchema=Tc.topBoolOrEmptySchema=void 0;var bq=gf(),xq=he(),_q=ii(),Sq={message:"boolean schema is false"};function kq(e){let{gen:t,schema:r,validateName:o}=e;r===!1?qC(e,!1):typeof r=="object"&&r.$async===!0?t.return(_q.default.data):(t.assign((0,xq._)`${o}.errors`,null),t.return(!0))}Tc.topBoolOrEmptySchema=kq;function wq(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),qC(e)):r.var(t,!0)}Tc.boolOrEmptySchema=wq;function qC(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,bq.reportError)(n,Sq,void 0,t)}});var RS=H(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.getRules=zc.isJSONType=void 0;var Eq=["string","number","integer","boolean","null","object","array"],Tq=new Set(Eq);function zq(e){return typeof e=="string"&&Tq.has(e)}zc.isJSONType=zq;function Rq(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}zc.getRules=Rq});var CS=H(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.shouldUseRule=ma.shouldUseGroup=ma.schemaHasRulesForType=void 0;function Cq({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&GC(e,o)}ma.schemaHasRulesForType=Cq;function GC(e,t){return t.rules.some(r=>FC(e,r))}ma.shouldUseGroup=GC;function FC(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(o=>e[o]!==void 0))}ma.shouldUseRule=FC});var hf=H(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.reportTypeError=Tr.checkDataTypes=Tr.checkDataType=Tr.coerceAndCheckDataType=Tr.getJSONTypes=Tr.getSchemaTypes=Tr.DataType=void 0;var Iq=RS(),Oq=CS(),Mq=gf(),me=he(),KC=Ie(),Rc;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Rc||(Tr.DataType=Rc={}));function Aq(e){let t=WC(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Tr.getSchemaTypes=Aq;function WC(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(Iq.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Tr.getJSONTypes=WC;function jq(e,t){let{gen:r,data:o,opts:n}=e,i=Nq(t,n.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,Oq.schemaHasRulesForType)(e,t[0]));if(a){let s=OS(t,o,n.strictNumbers,Rc.Wrong);r.if(s,()=>{i.length?Dq(e,t,i):MS(e)})}return a}Tr.coerceAndCheckDataType=jq;var JC=new Set(["string","number","integer","boolean","null"]);function Nq(e,t){return t?e.filter(r=>JC.has(r)||t==="array"&&r==="array"):[]}function Dq(e,t,r){let{gen:o,data:n,opts:i}=e,a=o.let("dataType",(0,me._)`typeof ${n}`),s=o.let("coerced",(0,me._)`undefined`);i.coerceTypes==="array"&&o.if((0,me._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,me._)`${n}[0]`).assign(a,(0,me._)`typeof ${n}`).if(OS(t,n,i.strictNumbers),()=>o.assign(s,n))),o.if((0,me._)`${s} !== undefined`);for(let c of r)(JC.has(c)||c==="array"&&i.coerceTypes==="array")&&l(c);o.else(),MS(e),o.endIf(),o.if((0,me._)`${s} !== undefined`,()=>{o.assign(n,s),Pq(e,s)});function l(c){switch(c){case"string":o.elseIf((0,me._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,me._)`"" + ${n}`).elseIf((0,me._)`${n} === null`).assign(s,(0,me._)`""`);return;case"number":o.elseIf((0,me._)`${a} == "boolean" || ${n} === null
42
42
  || (${a} == "string" && ${n} && ${n} == +${n})`).assign(s,(0,me._)`+${n}`);return;case"integer":o.elseIf((0,me._)`${a} === "boolean" || ${n} === null
43
43
  || (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(s,(0,me._)`+${n}`);return;case"boolean":o.elseIf((0,me._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(s,!1).elseIf((0,me._)`${n} === "true" || ${n} === 1`).assign(s,!0);return;case"null":o.elseIf((0,me._)`${n} === "" || ${n} === 0 || ${n} === false`),o.assign(s,null);return;case"array":o.elseIf((0,me._)`${a} === "string" || ${a} === "number"
@@ -150,7 +150,7 @@ ${c}`,()=>{s?.remove()}},[i,t,r]),(0,o8.jsx)(_re.Provider,{value:n,children:o})}
150
150
 
151
151
  `),document.head.appendChild(e),()=>{e.remove()}},[]),null}function b9(){let[e,t]=(0,Ui.useState)(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return(0,Ui.useEffect)(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)"),o=n=>t(!n.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),{motionEnabled:e}}function x9(e){let[t,r]=(0,Ui.useState)(0),o=(0,Ui.useRef)(!0);return(0,Ui.useEffect)(()=>{if(o.current){o.current=!1;return}r(n=>n+1)},[e]),t}var Ui,v9,_9=x(()=>{"use strict";Ui=O(te(),1);md();v9="ggui-motion-keyframes"});var S9={};Mt(S9,{Accordion:()=>h9,Alert:()=>Q8,Avatar:()=>Ol,Badge:()=>Wo,Box:()=>E8,Button:()=>et,Card:()=>Oi,Checkbox:()=>Il,Container:()=>$8,Divider:()=>zl,Grid:()=>k8,Heading:()=>bn,Icon:()=>Re,Image:()=>gb,Input:()=>ud,Link:()=>yb,MotionKeyframes:()=>$9,Progress:()=>mb,RadioGroup:()=>Z8,Row:()=>bo,Select:()=>pb,Skeleton:()=>W8,Slider:()=>q8,Spacer:()=>z8,Spinner:()=>Lt,Stack:()=>Et,Table:()=>c9,Tabs:()=>d9,Text:()=>ct,TextArea:()=>Eg,Toast:()=>m9,Toggle:()=>P8,Tooltip:()=>a9,useAnimationKey:()=>x9,useMotion:()=>b9});var zg=x(()=>{"use strict";b8();_8();sd();cb();w8();T8();iT();R8();kg();db();Mi();cT();uT();N8();dT();U8();V8();B8();F8();Ko();J8();fb();e9();mT();r9();an();gT();s9();u9();p9();g9();y9();_9()});async function D9(e){if(typeof window>"u")return{outcome:"unsupported",mechanism:null};let t=null;try{t=window.open(e,"_blank","noopener,noreferrer")}catch{t=null}try{let o=document.createElement("a");o.href=e,o.target="_blank",o.rel="noopener noreferrer",o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o)}catch{}try{window.parent.postMessage({jsonrpc:"2.0",method:"ui/request/open-url",params:{url:e}},"*")}catch{}try{window.parent.postMessage({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"tools/call",params:{name:"open_url",arguments:{url:e}}},"*")}catch{}let r=!1;if(typeof navigator<"u"&&navigator.clipboard)try{await Promise.race([navigator.clipboard.writeText(e).then(()=>{r=!0},()=>{r=!1}),new Promise(n=>setTimeout(n,1500))])}catch{r=!1}return t!==null?{outcome:"opened",mechanism:"window.open"}:r?{outcome:"copied",mechanism:"clipboard"}:{outcome:"unsupported",mechanism:null}}var P9=x(()=>{"use strict"});var gd,Or,Cg,gs,hs,ys,Ig,U9,L9,eoe,toe,roe,noe,Z9,ooe,ioe,aoe,soe,V9,m2e,H9=x(()=>{gd=function(e,t){let n=e,i=Cg[t],a=null,s=0,l=null,c=[],u={},p=function(S,T){s=n*4+17,a=(function(z){let R=new Array(z);for(let M=0;M<z;M+=1){R[M]=new Array(z);for(let Z=0;Z<z;Z+=1)R[M][Z]=null}return R})(s),f(0,0),f(s-7,0),f(0,s-7),v(),g(),y(S,T),n>=7&&b(S),l==null&&(l=_(n,i,c)),h(l,T)},f=function(S,T){for(let z=-1;z<=7;z+=1)if(!(S+z<=-1||s<=S+z))for(let R=-1;R<=7;R+=1)T+R<=-1||s<=T+R||(0<=z&&z<=6&&(R==0||R==6)||0<=R&&R<=6&&(z==0||z==6)||2<=z&&z<=4&&2<=R&&R<=4?a[S+z][T+R]=!0:a[S+z][T+R]=!1)},m=function(){let S=0,T=0;for(let z=0;z<8;z+=1){p(!0,z);let R=hs.getLostPoint(u);(z==0||S>R)&&(S=R,T=z)}return T},g=function(){for(let S=8;S<s-8;S+=1)a[S][6]==null&&(a[S][6]=S%2==0);for(let S=8;S<s-8;S+=1)a[6][S]==null&&(a[6][S]=S%2==0)},v=function(){let S=hs.getPatternPosition(n);for(let T=0;T<S.length;T+=1)for(let z=0;z<S.length;z+=1){let R=S[T],M=S[z];if(a[R][M]==null)for(let Z=-2;Z<=2;Z+=1)for(let N=-2;N<=2;N+=1)Z==-2||Z==2||N==-2||N==2||Z==0&&N==0?a[R+Z][M+N]=!0:a[R+Z][M+N]=!1}},b=function(S){let T=hs.getBCHTypeNumber(n);for(let z=0;z<18;z+=1){let R=!S&&(T>>z&1)==1;a[Math.floor(z/3)][z%3+s-8-3]=R}for(let z=0;z<18;z+=1){let R=!S&&(T>>z&1)==1;a[z%3+s-8-3][Math.floor(z/3)]=R}},y=function(S,T){let z=i<<3|T,R=hs.getBCHTypeInfo(z);for(let M=0;M<15;M+=1){let Z=!S&&(R>>M&1)==1;M<6?a[M][8]=Z:M<8?a[M+1][8]=Z:a[s-15+M][8]=Z}for(let M=0;M<15;M+=1){let Z=!S&&(R>>M&1)==1;M<8?a[8][s-M-1]=Z:M<9?a[8][15-M-1+1]=Z:a[8][15-M-1]=Z}a[s-8][8]=!S},h=function(S,T){let z=-1,R=s-1,M=7,Z=0,N=hs.getMaskFunction(T);for(let Q=s-1;Q>0;Q-=2)for(Q==6&&(Q-=1);;){for(let Ce=0;Ce<2;Ce+=1)if(a[R][Q-Ce]==null){let at=!1;Z<S.length&&(at=(S[Z]>>>M&1)==1),N(R,Q-Ce)&&(at=!at),a[R][Q-Ce]=at,M-=1,M==-1&&(Z+=1,M=7)}if(R+=z,R<0||s<=R){R-=z,z=-z;break}}},$=function(S,T){let z=0,R=0,M=0,Z=new Array(T.length),N=new Array(T.length);for(let oe=0;oe<T.length;oe+=1){let Fe=T[oe].dataCount,_t=T[oe].totalCount-Fe;R=Math.max(R,Fe),M=Math.max(M,_t),Z[oe]=new Array(Fe);for(let dr=0;dr<Z[oe].length;dr+=1)Z[oe][dr]=255&S.getBuffer()[dr+z];z+=Fe;let De=hs.getErrorCorrectPolynomial(_t),no=Ig(Z[oe],De.getLength()-1).mod(De);N[oe]=new Array(De.getLength()-1);for(let dr=0;dr<N[oe].length;dr+=1){let xs=dr+no.getLength()-N[oe].length;N[oe][dr]=xs>=0?no.getAt(xs):0}}let Q=0;for(let oe=0;oe<T.length;oe+=1)Q+=T[oe].totalCount;let Ce=new Array(Q),at=0;for(let oe=0;oe<R;oe+=1)for(let Fe=0;Fe<T.length;Fe+=1)oe<Z[Fe].length&&(Ce[at]=Z[Fe][oe],at+=1);for(let oe=0;oe<M;oe+=1)for(let Fe=0;Fe<T.length;Fe+=1)oe<N[Fe].length&&(Ce[at]=N[Fe][oe],at+=1);return Ce},_=function(S,T,z){let R=U9.getRSBlocks(S,T),M=L9();for(let N=0;N<z.length;N+=1){let Q=z[N];M.put(Q.getMode(),4),M.put(Q.getLength(),hs.getLengthInBits(Q.getMode(),S)),Q.write(M)}let Z=0;for(let N=0;N<R.length;N+=1)Z+=R[N].dataCount;if(M.getLengthInBits()>Z*8)throw"code length overflow. ("+M.getLengthInBits()+">"+Z*8+")";for(M.getLengthInBits()+4<=Z*8&&M.put(0,4);M.getLengthInBits()%8!=0;)M.putBit(!1);for(;!(M.getLengthInBits()>=Z*8||(M.put(236,8),M.getLengthInBits()>=Z*8));)M.put(17,8);return $(M,R)};u.addData=function(S,T){T=T||"Byte";let z=null;switch(T){case"Numeric":z=eoe(S);break;case"Alphanumeric":z=toe(S);break;case"Byte":z=roe(S);break;case"Kanji":z=noe(S);break;default:throw"mode:"+T}c.push(z),l=null},u.isDark=function(S,T){if(S<0||s<=S||T<0||s<=T)throw S+","+T;return a[S][T]},u.getModuleCount=function(){return s},u.make=function(){if(n<1){let S=1;for(;S<40;S++){let T=U9.getRSBlocks(S,i),z=L9();for(let M=0;M<c.length;M++){let Z=c[M];z.put(Z.getMode(),4),z.put(Z.getLength(),hs.getLengthInBits(Z.getMode(),S)),Z.write(z)}let R=0;for(let M=0;M<T.length;M++)R+=T[M].dataCount;if(z.getLengthInBits()<=R*8)break}n=S}p(!1,m())},u.createTableTag=function(S,T){S=S||2,T=typeof T>"u"?S*4:T;let z="";z+='<table style="',z+=" border-width: 0px; border-style: none;",z+=" border-collapse: collapse;",z+=" padding: 0px; margin: "+T+"px;",z+='">',z+="<tbody>";for(let R=0;R<u.getModuleCount();R+=1){z+="<tr>";for(let M=0;M<u.getModuleCount();M+=1)z+='<td style="',z+=" border-width: 0px; border-style: none;",z+=" border-collapse: collapse;",z+=" padding: 0px; margin: 0px;",z+=" width: "+S+"px;",z+=" height: "+S+"px;",z+=" background-color: ",z+=u.isDark(R,M)?"#000000":"#ffffff",z+=";",z+='"/>';z+="</tr>"}return z+="</tbody>",z+="</table>",z},u.createSvgTag=function(S,T,z,R){let M={};typeof arguments[0]=="object"&&(M=arguments[0],S=M.cellSize,T=M.margin,z=M.alt,R=M.title),S=S||2,T=typeof T>"u"?S*4:T,z=typeof z=="string"?{text:z}:z||{},z.text=z.text||null,z.id=z.text?z.id||"qrcode-description":null,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-title":null;let Z=u.getModuleCount()*S+T*2,N,Q,Ce,at,oe="",Fe;for(Fe="l"+S+",0 0,"+S+" -"+S+",0 0,-"+S+"z ",oe+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',oe+=M.scalable?"":' width="'+Z+'px" height="'+Z+'px"',oe+=' viewBox="0 0 '+Z+" "+Z+'" ',oe+=' preserveAspectRatio="xMinYMin meet"',oe+=R.text||z.text?' role="img" aria-labelledby="'+k([R.id,z.id].join(" ").trim())+'"':"",oe+=">",oe+=R.text?'<title id="'+k(R.id)+'">'+k(R.text)+"</title>":"",oe+=z.text?'<description id="'+k(z.id)+'">'+k(z.text)+"</description>":"",oe+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',oe+='<path d="',Ce=0;Ce<u.getModuleCount();Ce+=1)for(at=Ce*S+T,N=0;N<u.getModuleCount();N+=1)u.isDark(Ce,N)&&(Q=N*S+T,oe+="M"+Q+","+at+Fe);return oe+='" stroke="transparent" fill="black"/>',oe+="</svg>",oe},u.createDataURL=function(S,T){S=S||2,T=typeof T>"u"?S*4:T;let z=u.getModuleCount()*S+T*2,R=T,M=z-T;return soe(z,z,function(Z,N){if(R<=Z&&Z<M&&R<=N&&N<M){let Q=Math.floor((Z-R)/S),Ce=Math.floor((N-R)/S);return u.isDark(Ce,Q)?0:1}else return 1})},u.createImgTag=function(S,T,z){S=S||2,T=typeof T>"u"?S*4:T;let R=u.getModuleCount()*S+T*2,M="";return M+="<img",M+=' src="',M+=u.createDataURL(S,T),M+='"',M+=' width="',M+=R,M+='"',M+=' height="',M+=R,M+='"',z&&(M+=' alt="',M+=k(z),M+='"'),M+="/>",M};let k=function(S){let T="";for(let z=0;z<S.length;z+=1){let R=S.charAt(z);switch(R){case"<":T+="&lt;";break;case">":T+="&gt;";break;case"&":T+="&amp;";break;case'"':T+="&quot;";break;default:T+=R;break}}return T},j=function(S){S=typeof S>"u"?2:S;let z=u.getModuleCount()*1+S*2,R=S,M=z-S,Z,N,Q,Ce,at,oe={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},Fe={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},_t="";for(Z=0;Z<z;Z+=2){for(Q=Math.floor((Z-R)/1),Ce=Math.floor((Z+1-R)/1),N=0;N<z;N+=1)at="\u2588",R<=N&&N<M&&R<=Z&&Z<M&&u.isDark(Q,Math.floor((N-R)/1))&&(at=" "),R<=N&&N<M&&R<=Z+1&&Z+1<M&&u.isDark(Ce,Math.floor((N-R)/1))?at+=" ":at+="\u2588",_t+=S<1&&Z+1>=M?Fe[at]:oe[at];_t+=`
152
152
  `}return z%2&&S>0?_t.substring(0,_t.length-z-1)+Array(z+1).join("\u2580"):_t.substring(0,_t.length-1)};return u.createASCII=function(S,T){if(S=S||1,S<2)return j(T);S-=1,T=typeof T>"u"?S*2:T;let z=u.getModuleCount()*S+T*2,R=T,M=z-T,Z,N,Q,Ce,at=Array(S+1).join("\u2588\u2588"),oe=Array(S+1).join(" "),Fe="",_t="";for(Z=0;Z<z;Z+=1){for(Q=Math.floor((Z-R)/S),_t="",N=0;N<z;N+=1)Ce=1,R<=N&&N<M&&R<=Z&&Z<M&&u.isDark(Q,Math.floor((N-R)/S))&&(Ce=0),_t+=Ce?at:oe;for(Q=0;Q<S;Q+=1)Fe+=_t+`
153
- `}return Fe.substring(0,Fe.length-1)},u.renderTo2dContext=function(S,T){T=T||2;let z=u.getModuleCount();for(let R=0;R<z;R++)for(let M=0;M<z;M++)S.fillStyle=u.isDark(R,M)?"black":"white",S.fillRect(M*T,R*T,T,T)},u};gd.stringToBytes=function(e){let t=[];for(let r=0;r<e.length;r+=1){let o=e.charCodeAt(r);t.push(o&255)}return t};gd.createStringToBytes=function(e,t){let r=(function(){let n=ioe(e),i=function(){let l=n.read();if(l==-1)throw"eof";return l},a=0,s={};for(;;){let l=n.read();if(l==-1)break;let c=i(),u=i(),p=i(),f=String.fromCharCode(l<<8|c),m=u<<8|p;s[f]=m,a+=1}if(a!=t)throw a+" != "+t;return s})(),o=63;return function(n){let i=[];for(let a=0;a<n.length;a+=1){let s=n.charCodeAt(a);if(s<128)i.push(s);else{let l=r[n.charAt(a)];typeof l=="number"?(l&255)==l?i.push(l):(i.push(l>>>8),i.push(l&255)):i.push(o)}}return i}};Or={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Cg={L:1,M:0,Q:3,H:2},gs={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},hs=(function(){let e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],t=1335,r=7973,o=21522,n={},i=function(a){let s=0;for(;a!=0;)s+=1,a>>>=1;return s};return n.getBCHTypeInfo=function(a){let s=a<<10;for(;i(s)-i(t)>=0;)s^=t<<i(s)-i(t);return(a<<10|s)^o},n.getBCHTypeNumber=function(a){let s=a<<12;for(;i(s)-i(r)>=0;)s^=r<<i(s)-i(r);return a<<12|s},n.getPatternPosition=function(a){return e[a-1]},n.getMaskFunction=function(a){switch(a){case gs.PATTERN000:return function(s,l){return(s+l)%2==0};case gs.PATTERN001:return function(s,l){return s%2==0};case gs.PATTERN010:return function(s,l){return l%3==0};case gs.PATTERN011:return function(s,l){return(s+l)%3==0};case gs.PATTERN100:return function(s,l){return(Math.floor(s/2)+Math.floor(l/3))%2==0};case gs.PATTERN101:return function(s,l){return s*l%2+s*l%3==0};case gs.PATTERN110:return function(s,l){return(s*l%2+s*l%3)%2==0};case gs.PATTERN111:return function(s,l){return(s*l%3+(s+l)%2)%2==0};default:throw"bad maskPattern:"+a}},n.getErrorCorrectPolynomial=function(a){let s=Ig([1],0);for(let l=0;l<a;l+=1)s=s.multiply(Ig([1,ys.gexp(l)],0));return s},n.getLengthInBits=function(a,s){if(1<=s&&s<10)switch(a){case Or.MODE_NUMBER:return 10;case Or.MODE_ALPHA_NUM:return 9;case Or.MODE_8BIT_BYTE:return 8;case Or.MODE_KANJI:return 8;default:throw"mode:"+a}else if(s<27)switch(a){case Or.MODE_NUMBER:return 12;case Or.MODE_ALPHA_NUM:return 11;case Or.MODE_8BIT_BYTE:return 16;case Or.MODE_KANJI:return 10;default:throw"mode:"+a}else if(s<41)switch(a){case Or.MODE_NUMBER:return 14;case Or.MODE_ALPHA_NUM:return 13;case Or.MODE_8BIT_BYTE:return 16;case Or.MODE_KANJI:return 12;default:throw"mode:"+a}else throw"type:"+s},n.getLostPoint=function(a){let s=a.getModuleCount(),l=0;for(let p=0;p<s;p+=1)for(let f=0;f<s;f+=1){let m=0,g=a.isDark(p,f);for(let v=-1;v<=1;v+=1)if(!(p+v<0||s<=p+v))for(let b=-1;b<=1;b+=1)f+b<0||s<=f+b||v==0&&b==0||g==a.isDark(p+v,f+b)&&(m+=1);m>5&&(l+=3+m-5)}for(let p=0;p<s-1;p+=1)for(let f=0;f<s-1;f+=1){let m=0;a.isDark(p,f)&&(m+=1),a.isDark(p+1,f)&&(m+=1),a.isDark(p,f+1)&&(m+=1),a.isDark(p+1,f+1)&&(m+=1),(m==0||m==4)&&(l+=3)}for(let p=0;p<s;p+=1)for(let f=0;f<s-6;f+=1)a.isDark(p,f)&&!a.isDark(p,f+1)&&a.isDark(p,f+2)&&a.isDark(p,f+3)&&a.isDark(p,f+4)&&!a.isDark(p,f+5)&&a.isDark(p,f+6)&&(l+=40);for(let p=0;p<s;p+=1)for(let f=0;f<s-6;f+=1)a.isDark(f,p)&&!a.isDark(f+1,p)&&a.isDark(f+2,p)&&a.isDark(f+3,p)&&a.isDark(f+4,p)&&!a.isDark(f+5,p)&&a.isDark(f+6,p)&&(l+=40);let c=0;for(let p=0;p<s;p+=1)for(let f=0;f<s;f+=1)a.isDark(f,p)&&(c+=1);let u=Math.abs(100*c/s/s-50)/5;return l+=u*10,l},n})(),ys=(function(){let e=new Array(256),t=new Array(256);for(let o=0;o<8;o+=1)e[o]=1<<o;for(let o=8;o<256;o+=1)e[o]=e[o-4]^e[o-5]^e[o-6]^e[o-8];for(let o=0;o<255;o+=1)t[e[o]]=o;let r={};return r.glog=function(o){if(o<1)throw"glog("+o+")";return t[o]},r.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return e[o]},r})(),Ig=function(e,t){if(typeof e.length>"u")throw e.length+"/"+t;let r=(function(){let n=0;for(;n<e.length&&e[n]==0;)n+=1;let i=new Array(e.length-n+t);for(let a=0;a<e.length-n;a+=1)i[a]=e[a+n];return i})(),o={};return o.getAt=function(n){return r[n]},o.getLength=function(){return r.length},o.multiply=function(n){let i=new Array(o.getLength()+n.getLength()-1);for(let a=0;a<o.getLength();a+=1)for(let s=0;s<n.getLength();s+=1)i[a+s]^=ys.gexp(ys.glog(o.getAt(a))+ys.glog(n.getAt(s)));return Ig(i,0)},o.mod=function(n){if(o.getLength()-n.getLength()<0)return o;let i=ys.glog(o.getAt(0))-ys.glog(n.getAt(0)),a=new Array(o.getLength());for(let s=0;s<o.getLength();s+=1)a[s]=o.getAt(s);for(let s=0;s<n.getLength();s+=1)a[s]^=ys.gexp(ys.glog(n.getAt(s))+i);return Ig(a,0).mod(n)},o},U9=(function(){let e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(n,i){let a={};return a.totalCount=n,a.dataCount=i,a},r={},o=function(n,i){switch(i){case Cg.L:return e[(n-1)*4+0];case Cg.M:return e[(n-1)*4+1];case Cg.Q:return e[(n-1)*4+2];case Cg.H:return e[(n-1)*4+3];default:return}};return r.getRSBlocks=function(n,i){let a=o(n,i);if(typeof a>"u")throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;let s=a.length/3,l=[];for(let c=0;c<s;c+=1){let u=a[c*3+0],p=a[c*3+1],f=a[c*3+2];for(let m=0;m<u;m+=1)l.push(t(p,f))}return l},r})(),L9=function(){let e=[],t=0,r={};return r.getBuffer=function(){return e},r.getAt=function(o){let n=Math.floor(o/8);return(e[n]>>>7-o%8&1)==1},r.put=function(o,n){for(let i=0;i<n;i+=1)r.putBit((o>>>n-i-1&1)==1)},r.getLengthInBits=function(){return t},r.putBit=function(o){let n=Math.floor(t/8);e.length<=n&&e.push(0),o&&(e[n]|=128>>>t%8),t+=1},r},eoe=function(e){let t=Or.MODE_NUMBER,r=e,o={};o.getMode=function(){return t},o.getLength=function(a){return r.length},o.write=function(a){let s=r,l=0;for(;l+2<s.length;)a.put(n(s.substring(l,l+3)),10),l+=3;l<s.length&&(s.length-l==1?a.put(n(s.substring(l,l+1)),4):s.length-l==2&&a.put(n(s.substring(l,l+2)),7))};let n=function(a){let s=0;for(let l=0;l<a.length;l+=1)s=s*10+i(a.charAt(l));return s},i=function(a){if("0"<=a&&a<="9")return a.charCodeAt(0)-48;throw"illegal char :"+a};return o},toe=function(e){let t=Or.MODE_ALPHA_NUM,r=e,o={};o.getMode=function(){return t},o.getLength=function(i){return r.length},o.write=function(i){let a=r,s=0;for(;s+1<a.length;)i.put(n(a.charAt(s))*45+n(a.charAt(s+1)),11),s+=2;s<a.length&&i.put(n(a.charAt(s)),6)};let n=function(i){if("0"<=i&&i<="9")return i.charCodeAt(0)-48;if("A"<=i&&i<="Z")return i.charCodeAt(0)-65+10;switch(i){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+i}};return o},roe=function(e){let t=Or.MODE_8BIT_BYTE,r=e,o=gd.stringToBytes(e),n={};return n.getMode=function(){return t},n.getLength=function(i){return o.length},n.write=function(i){for(let a=0;a<o.length;a+=1)i.put(o[a],8)},n},noe=function(e){let t=Or.MODE_KANJI,r=e,o=gd.stringToBytes;(function(a,s){let l=o(a);if(l.length!=2||(l[0]<<8|l[1])!=s)throw"sjis not supported."})("\u53CB",38726);let n=o(e),i={};return i.getMode=function(){return t},i.getLength=function(a){return~~(n.length/2)},i.write=function(a){let s=n,l=0;for(;l+1<s.length;){let c=(255&s[l])<<8|255&s[l+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(l+1)+"/"+c;c=(c>>>8&255)*192+(c&255),a.put(c,13),l+=2}if(l<s.length)throw"illegal char at "+(l+1)},i},Z9=function(){let e=[],t={};return t.writeByte=function(r){e.push(r&255)},t.writeShort=function(r){t.writeByte(r),t.writeByte(r>>>8)},t.writeBytes=function(r,o,n){o=o||0,n=n||r.length;for(let i=0;i<n;i+=1)t.writeByte(r[i+o])},t.writeString=function(r){for(let o=0;o<r.length;o+=1)t.writeByte(r.charCodeAt(o))},t.toByteArray=function(){return e},t.toString=function(){let r="";r+="[";for(let o=0;o<e.length;o+=1)o>0&&(r+=","),r+=e[o];return r+="]",r},t},ooe=function(){let e=0,t=0,r=0,o="",n={},i=function(s){o+=String.fromCharCode(a(s&63))},a=function(s){if(s<0)throw"n:"+s;if(s<26)return 65+s;if(s<52)return 97+(s-26);if(s<62)return 48+(s-52);if(s==62)return 43;if(s==63)return 47;throw"n:"+s};return n.writeByte=function(s){for(e=e<<8|s&255,t+=8,r+=1;t>=6;)i(e>>>t-6),t-=6},n.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),r%3!=0){let s=3-r%3;for(let l=0;l<s;l+=1)o+="="}},n.toString=function(){return o},n},ioe=function(e){let t=e,r=0,o=0,n=0,i={};i.read=function(){for(;n<8;){if(r>=t.length){if(n==0)return-1;throw"unexpected end of file./"+n}let l=t.charAt(r);if(r+=1,l=="=")return n=0,-1;if(l.match(/^\s$/))continue;o=o<<6|a(l.charCodeAt(0)),n+=6}let s=o>>>n-8&255;return n-=8,s};let a=function(s){if(65<=s&&s<=90)return s-65;if(97<=s&&s<=122)return s-97+26;if(48<=s&&s<=57)return s-48+52;if(s==43)return 62;if(s==47)return 63;throw"c:"+s};return i},aoe=function(e,t){let r=e,o=t,n=new Array(e*t),i={};i.setPixel=function(c,u,p){n[u*r+c]=p},i.write=function(c){c.writeString("GIF87a"),c.writeShort(r),c.writeShort(o),c.writeByte(128),c.writeByte(0),c.writeByte(0),c.writeByte(0),c.writeByte(0),c.writeByte(0),c.writeByte(255),c.writeByte(255),c.writeByte(255),c.writeString(","),c.writeShort(0),c.writeShort(0),c.writeShort(r),c.writeShort(o),c.writeByte(0);let u=2,p=s(u);c.writeByte(u);let f=0;for(;p.length-f>255;)c.writeByte(255),c.writeBytes(p,f,255),f+=255;c.writeByte(p.length-f),c.writeBytes(p,f,p.length-f),c.writeByte(0),c.writeString(";")};let a=function(c){let u=c,p=0,f=0,m={};return m.write=function(g,v){if(g>>>v)throw"length over";for(;p+v>=8;)u.writeByte(255&(g<<p|f)),v-=8-p,g>>>=8-p,f=0,p=0;f=g<<p|f,p=p+v},m.flush=function(){p>0&&u.writeByte(f)},m},s=function(c){let u=1<<c,p=(1<<c)+1,f=c+1,m=l();for(let h=0;h<u;h+=1)m.add(String.fromCharCode(h));m.add(String.fromCharCode(u)),m.add(String.fromCharCode(p));let g=Z9(),v=a(g);v.write(u,f);let b=0,y=String.fromCharCode(n[b]);for(b+=1;b<n.length;){let h=String.fromCharCode(n[b]);b+=1,m.contains(y+h)?y=y+h:(v.write(m.indexOf(y),f),m.size()<4095&&(m.size()==1<<f&&(f+=1),m.add(y+h)),y=h)}return v.write(m.indexOf(y),f),v.write(p,f),v.flush(),g.toByteArray()},l=function(){let c={},u=0,p={};return p.add=function(f){if(p.contains(f))throw"dup key:"+f;c[f]=u,u+=1},p.size=function(){return u},p.indexOf=function(f){return c[f]},p.contains=function(f){return typeof c[f]<"u"},p};return i},soe=function(e,t,r){let o=aoe(e,t);for(let s=0;s<t;s+=1)for(let l=0;l<e;l+=1)o.setPixel(l,s,r(l,s));let n=Z9();o.write(n);let i=ooe(),a=n.toByteArray();for(let s=0;s<a.length;s+=1)i.writeByte(a[s]);return i.flush(),"data:image/gif;base64,"+i},V9=gd,m2e=gd.stringToBytes});function B9({value:e,size:t=128,errorCorrection:r="M",foreground:o="var(--ggui-color-onSurface, #18181b)",background:n="var(--ggui-color-surface, #ffffff)",ariaLabel:i}){let a=q9.useMemo(()=>{try{let l=V9(0,r);l.addData(e),l.make();let c=l.getModuleCount(),u=[];for(let p=0;p<c;p+=1){let f=[];for(let m=0;m<c;m+=1)f.push(l.isDark(p,m));u.push(f)}return u}catch{return null}},[e,r]);if(a===null)return null;let s=a.length;return(0,Og.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${s} ${s}`,width:t,height:t,role:"img","aria-label":i??`QR code for ${e}`,shapeRendering:"crispEdges",style:{display:"block",flexShrink:0},children:[(0,Og.jsx)("rect",{width:s,height:s,fill:n}),a.flatMap((l,c)=>l.map((u,p)=>u?(0,Og.jsx)("rect",{x:p,y:c,width:1,height:1,fill:o},`${p}-${c}`):null))]})}var q9,Og,G9=x(()=>{"use strict";q9=O(te(),1);H9();Og=O(W(),1)});function coe(){let e="var(--ggui-color-onSurface, #292929)",t="var(--ggui-color-neutral-300, #d1d5db)";return(0,Ue.jsxs)("svg",{viewBox:"0 0 224 50",width:"72",height:"16",role:"img","aria-label":"ggui",style:{display:"block",flexShrink:0},children:[(0,Ue.jsx)("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:t}),(0,Ue.jsx)("rect",{x:"33",y:"33",width:"17",height:"17",fill:e}),(0,Ue.jsx)("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:e}),(0,Ue.jsx)("rect",{x:"91",y:"33",width:"17",height:"17",fill:t}),(0,Ue.jsx)("path",{d:"M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z",fill:e}),(0,Ue.jsx)("rect",{x:"174",y:"0",width:"50",height:"50",fill:t})]})}function ST({settingsUrl:e,intent:t}){let[r,o]=_b.useState("idle"),n=_b.useCallback(()=>{typeof console<"u"&&console.log("[ggui:no-creds-card] click \u2192 settingsUrl =",e),o("working"),D9(e).then(s=>{typeof console<"u"&&console.log("[ggui:no-creds-card] requestOpenUrl resolved \u2192",s);let l=s.outcome==="opened"?"opened":s.outcome==="copied"?"copied":"manual";o(l),typeof window<"u"&&window.setTimeout(()=>o("idle"),uoe)})},[e]);return(0,Ue.jsx)(Oi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,Ue.jsxs)(Et,{gap:"lg",children:[(0,Ue.jsxs)(Et,{gap:"md",children:[(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,Ue.jsx)(coe,{}),(0,Ue.jsx)(Wo,{variant:"info",children:"Setup needed"})]}),(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ue.jsx)(bn,{level:3,children:"Connect an LLM provider"}),(0,Ue.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:"var(--ggui-color-onSurfaceVariant, #71717a)",opacity:.7,userSelect:"all"},title:"iframe-runtime build identifier \u2014 useful for diagnosing stale caches",children:loe})]}),(0,Ue.jsx)(ct,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:"ggui needs an LLM key to render UIs. Open this server\u2019s settings page to paste an Anthropic, OpenAI, Google, or OpenRouter API key."})]}),(0,Ue.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-3, 12px)",padding:"var(--ggui-spacing-4, 16px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:(0,Ue.jsxs)("div",{style:{display:"flex",gap:"var(--ggui-spacing-4, 16px)",alignItems:"flex-start",flexWrap:"wrap"},children:[(0,Ue.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)"},children:[(0,Ue.jsx)("div",{style:{padding:"var(--ggui-spacing-2, 8px)",background:"#ffffff",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:0},children:(0,Ue.jsx)(B9,{value:e,size:120,foreground:"#000000",background:"#ffffff"})}),(0,Ue.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)",textAlign:"center"},children:"Scan with your phone"})]}),(0,Ue.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",flex:"1 1 240px",minWidth:"200px"},children:[(0,Ue.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:"var(--ggui-font-weight-semibold, 600)",textTransform:"uppercase",letterSpacing:"0.06em",fontSize:"var(--ggui-font-size-xs, 11px)"},children:"Or open this URL in your browser"}),(0,Ue.jsx)("div",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",wordBreak:"break-all",userSelect:"all",padding:"var(--ggui-spacing-3, 12px)",background:"var(--ggui-color-surface, #fff)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:"1.45"},children:e}),(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ue.jsx)(et,{variant:"primary",size:"md",onClick:n,disabled:r==="working",children:r==="working"?"Opening\u2026":r==="opened"?"Opened in browser \u2713":r==="copied"?"URL copied \u2014 paste in your browser":r==="manual"?"Tap the URL above to copy":"Open settings"}),r==="idle"||r==="working"?(0,Ue.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.85},children:"or tap-and-hold the URL above to copy"}):null]})]})]})}),t?(0,Ue.jsxs)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Pending prompt: ",t]}):null]})})}var _b,Ue,loe,uoe,F9=x(()=>{"use strict";_b=O(te(),1);zg();P9();G9();Ue=O(W(),1),loe="0.5.0-rc.0+2d5c0c17";uoe=4e3});function poe(){let e=xn.useRef(1e4),t=xn.useRef(new Map);return xn.useEffect(()=>{let r=o=>{let n=o.data;if(n===null||typeof n!="object")return;let i=n.id;if(typeof i!="number")return;let a=t.current.get(i);a!==void 0&&(t.current.delete(i),a(n))};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[]),xn.useCallback((r,o)=>new Promise(n=>{let i=e.current;e.current+=1,t.current.set(i,n);try{window.parent.postMessage({jsonrpc:"2.0",id:i,method:r,params:o??{}},"*")}catch(a){t.current.delete(i),n({error:{code:-32099,message:a instanceof Error?a.message:String(a)}})}window.setTimeout(()=>{t.current.delete(i)&&n({error:{code:-32001,message:"TIMEOUT"}})},doe)}),[])}function foe(){let[e,t]=xn.useState([]),r=xn.useRef(0);return xn.useEffect(()=>{let o=n=>{let i=n.data;if(i===null||typeof i!="object")return;let a=i;if(a.jsonrpc!=="2.0"||typeof a.method!="string"||typeof a.id=="number"&&a.id>=1e4&&(a.method==="ui/message"||a.method==="ui/update-model-context"||a.method==="ui/open-link"||a.method==="ui/request-display-mode"||a.method==="tools/call"))return;r.current+=1;let l={id:r.current,tsIso:new Date().toISOString(),method:a.method,params:a.params};t(c=>[l,...c].slice(0,50))};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),e}function moe(e){switch(e){case"ui/message":return{role:"user",content:[{type:"text",text:"[ggui:probe] hello from the protocol probe card"}]};case"ui/update-model-context":return{content:[{type:"text",text:"[ggui:probe] this user prefers concise replies"}]};case"ui/open-link":return{url:"https://ggui.ai"};case"ui/request-display-mode":return{mode:"fullscreen"};case"tools/call":return{name:"ggui_runtime_submit_action",arguments:{kind:"dispatch",payload:{intent:"probe-click",data:{note:"hello from the protocol probe"}},sessionId:"probe-render",appId:"probe-app",actionId:"00000000",firedAt:new Date().toISOString()}}}}function goe(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function hoe(e){if(e==null||typeof e!="object"||Array.isArray(e))return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,n])=>{if(n===null)return`${o}: null`;if(typeof n=="string")return`${o}: ${n}`;if(typeof n=="number"||typeof n=="boolean")return`${o}: ${n}`;let i=JSON.stringify(n);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function Mg({method:e,description:t,call:r}){let[o,n]=xn.useState({state:"idle"}),i=xn.useCallback(()=>{let l=Date.now();n({state:"pending",startedAtMs:l});let c=moe(e);r(e,c).then(u=>{if(u.error){n({state:"error",code:u.error.code??"?",message:u.error.message??"(no message)"});return}if(n({state:"success",result:u.result??{}}),e==="tools/call"){let f=(c.arguments??{}).payload??{},m=String(f.intent??"?"),g=f.data,v=hoe(g),b=v===""?"":` (${v})`,y=new Date().toISOString(),h=goe(`${m}|${JSON.stringify(g??null)}|${y}`);r("ui/update-model-context",{content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:h,intent:m,data:g??null,firedAt:y})}`}]}),r("ui/message",{role:"user",content:[{type:"text",text:`Please proceed with **${m}**${b}. [id: \`${h}\`]`}]})}})},[r,e]),a=o.state==="pending"?"Sending\u2026":o.state==="success"?"Send again \u2713":o.state==="error"?"Retry":"Send",s=o.state==="idle"?(0,ve.jsx)(Wo,{variant:"default",children:"idle"}):o.state==="pending"?(0,ve.jsx)(Wo,{variant:"info",children:"pending"}):o.state==="success"?(0,ve.jsx)(Wo,{variant:"success",children:"success"}):(0,ve.jsx)(Wo,{variant:"warning",children:"error"});return(0,ve.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",padding:"var(--ggui-spacing-3, 12px)",borderRadius:"var(--ggui-shape-radius-md, 10px)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",background:"var(--ggui-color-surface, #fff)"},children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),s]}),(0,ve.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:t}),(0,ve.jsx)("div",{style:{display:"flex",gap:"var(--ggui-spacing-2, 8px)"},children:(0,ve.jsx)(et,{variant:"primary",size:"sm",onClick:i,disabled:o.state==="pending",children:a})}),o.state==="success"||o.state==="error"?(0,ve.jsx)("pre",{style:{margin:0,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:o.state==="error"?"var(--ggui-color-warning, #b45309)":"var(--ggui-color-onSurfaceVariant, #52525b)",background:"var(--ggui-color-neutral-100, #f4f4f5)",padding:"var(--ggui-spacing-2, 8px)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",overflow:"auto",maxHeight:"120px",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o.state==="error"?`${o.code}: ${o.message}`:JSON.stringify(o.result,null,2)}):null]})}function kT({intent:e}){let t=poe(),r=foe();return(0,ve.jsx)(Oi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,ve.jsxs)(Et,{gap:"lg",children:[(0,ve.jsxs)(Et,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)(bn,{level:3,children:"MCP Apps protocol probe"}),(0,ve.jsx)(Wo,{variant:"info",children:"diagnostic"})]}),(0,ve.jsxs)(ct,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:["One button per primary host effect emitted by the iframe runtime's gesture surfaces (submit-action bridge / native- idiom interceptors). Click each to verify which methods this host honors. The",(0,ve.jsx)("code",{children:"tools/call"})," row chains the full submit-action bridge (audit + context + consent), reproducing the production ",(0,ve.jsx)("code",{children:"dispatchSubmitAction"})," envelope shape verbatim. The receive log below captures every notification the host emits while this card is mounted."]})]}),(0,ve.jsxs)(Et,{gap:"md",children:[(0,ve.jsx)(Mg,{method:"ui/message",description:"Submit-action bridge step 3 \u2014 consent-gated user authorization. Host pre-fills + waits for user confirm before the LLM acts on the paired pending-action context.",call:t}),(0,ve.jsx)(Mg,{method:"ui/update-model-context",description:"Submit-action bridge step 2 \u2014 silent structured `[ggui:pending-action]` context drop. LLM honors on next turn. No immediate UI.",call:t}),(0,ve.jsx)(Mg,{method:"ui/open-link",description:"Native-idiom anchor click interceptor primary effect. Opens ggui.ai in the host's browser / new tab. Real iframe code triggers via `<a href target='_blank'>` or cross-origin href.",call:t}),(0,ve.jsx)(Mg,{method:"ui/request-display-mode",description:"Native-idiom fullscreen interceptor primary effect. Request fullscreen \u2014 real iframe code calls `el.requestFullscreen()`; the runtime overrides the prototype to route through here.",call:t}),(0,ve.jsx)(Mg,{method:"tools/call",description:"Full submit-action bridge: `tools/call ggui_runtime_submit_action` (audit, kind:'dispatch') + `ui/update-model-context` + `ui/message`. Spec \xA7401 requires `_meta.ui.visibility:['app']` on the receiving tool.",call:t})]}),(0,ve.jsxs)(Et,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,ve.jsx)(bn,{level:4,children:"Receive log"}),(0,ve.jsxs)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[r.length," ",r.length===1?"event":"events"]})]}),r.length===0?(0,ve.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontStyle:"italic"},children:"No host notifications observed yet. Click a probe button or wait for the host to emit one."}):(0,ve.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",maxHeight:"320px",overflow:"auto",padding:"var(--ggui-spacing-2, 8px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:r.map(o=>(0,ve.jsxs)("details",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[(0,ve.jsxs)("summary",{style:{cursor:"pointer",padding:"var(--ggui-spacing-1, 4px) 0",color:"var(--ggui-color-onSurface, #111)"},children:[(0,ve.jsx)("span",{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginRight:"8px"},children:o.tsIso.slice(11,19)}),(0,ve.jsx)("span",{style:{fontWeight:600},children:o.method})]}),(0,ve.jsx)("pre",{style:{margin:"4px 0 0 16px",whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:JSON.stringify(o.params,null,2)})]},o.id))})]}),e?(0,ve.jsxs)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Triggered by: ",e]}):null]})})}var xn,ve,doe,K9=x(()=>{"use strict";xn=O(te(),1);zg();ve=O(W(),1),doe=5e3});function W9(){if(typeof window>"u")return!1;try{let e=window.location?.hostname??"";if(e.endsWith("claudemcpcontent.com")||/(^|\.)claude\.ai$/i.test(e)||/claude/i.test(e))return!0;let t=typeof document<"u"?document.referrer:"";if(/claude\.ai/i.test(t))return!0;let r=typeof navigator<"u"?navigator.userAgent:"";if(/Claude/.test(r))return!0}catch{}return!1}function J9(){let e=hd.useCallback(()=>typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),[t,r]=hd.useState(e);return hd.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),n=a=>{r(a.matches?"dark":"light")};if(typeof o.addEventListener=="function")return o.addEventListener("change",n),()=>{o.removeEventListener("change",n)};let i=o;return i.addListener(n),()=>{i.removeListener(n)}},[]),t}var hd,Y9=x(()=>{"use strict";hd=O(te(),1)});var t7={};Mt(t7,{NoCredentialsCard:()=>ST,ProtocolProbeCard:()=>kT,SYSTEM_CARD_REGISTRY:()=>Q9,SystemCardHost:()=>voe,renderSystemCard:()=>e7});function X9(e,t){return function(o){let n=e,i=t(o);return vs.createElement(n,i)}}function yoe({kind:e,props:t}){return vs.createElement("div",{style:{padding:"16px",border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)",fontFamily:"var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, sans-serif)",background:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"}},vs.createElement("div",{style:{fontWeight:600,marginBottom:8}},`Unknown system card: ${e}`),vs.createElement("div",{style:{fontSize:12,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, monospace)",opacity:.7,wordBreak:"break-all"}},JSON.stringify(t)))}function e7(e,t){let r=Q9[e];return r?vs.createElement(r,t):vs.createElement(yoe,{kind:e,props:t})}function voe({kind:e,props:t,themeId:r}){let o=W9(),n=J9();return vs.createElement(BE,{theme:n==="dark"?qE:$g,mode:n,transparent:o,children:e7(e,t)})}var vs,Q9,r7=x(()=>{"use strict";vs=O(te(),1);GE();F9();K9();Y9();Q9={"no-credentials":X9(ST,e=>{let t=typeof e.settingsUrl=="string"?e.settingsUrl:"",r=typeof e.intent=="string"?e.intent:void 0;return{settingsUrl:t,...r!==void 0?{intent:r}:{}}}),"mcp-apps-probe":X9(kT,e=>{let t=typeof e.intent=="string"?e.intent:void 0;return{...t!==void 0?{intent:t}:{}}})}});var Ag,Qn,ET,TT,zT,RT,kb,E,xt=x(()=>{"use strict";Ag={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Qn={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},ET={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},TT={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},zT={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},RT={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},kb={textPrimary:Qn[900],textSecondary:Qn[600],textMuted:Qn[400],textInverse:"#ffffff",bgPrimary:"#ffffff",bgSecondary:Qn[50],bgTertiary:Qn[100],bgInverse:Qn[900],borderLight:Qn[200],borderDefault:Qn[300],borderDark:Qn[400],focus:Ag[500],hover:Ag[50],active:Ag[100],disabled:Qn[300],success:ET[500],warning:TT[500],error:zT[500],info:RT[500]},E={primary:Ag,gray:Qn,success:ET,warning:TT,error:zT,info:RT,semantic:kb,white:"#ffffff",black:"#000000",transparent:"transparent"}});function f7({value:e,onChange:t,onSearch:r,placeholder:o="Search...",showButton:n=!1,buttonText:i="Search",loading:a,disabled:s,size:l="md",style:c,className:u}){let[p,f]=(0,p7.useState)(""),m=e!==void 0?e:p,g=h=>{e===void 0&&f(h),t?.(h)},v=()=>{r?.(m)},b=h=>{h.key==="Enter"&&!s&&v()},y={sm:"sm",md:"md",lg:"md"};return(0,Li.jsxs)("div",{className:u,style:{display:"flex",gap:"8px",alignItems:"flex-end",...c},children:[(0,Li.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,Li.jsx)("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:E.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:a?(0,Li.jsx)(Lt,{size:16}):(0,Li.jsx)(Re,{name:"search",size:16})}),(0,Li.jsx)("input",{type:"search",value:m,onChange:h=>g(h.target.value),onKeyDown:b,placeholder:o,disabled:s||a,style:{width:"100%",padding:l==="sm"?"6px 10px 6px 36px":l==="lg"?"12px 14px 12px 40px":"10px 12px 10px 38px",paddingLeft:"36px",fontSize:l==="lg"?"16px":"14px",borderRadius:"6px",border:`1px solid ${E.gray[300]}`,backgroundColor:s?E.gray[50]:E.white,color:E.gray[900],outline:"none",boxSizing:"border-box"}})]}),n&&(0,Li.jsx)(et,{onClick:v,disabled:s||a,size:y[l],loading:a,children:i})]})}var Li,p7,m7=x(()=>{"use strict";Li=O(W(),1),p7=O(te(),1);Mi();Ko();an();xt()});function g7({label:e,children:t,error:r,helperText:o,required:n,description:i,style:a,className:s}){let l=!!r;return(0,Nl.jsxs)("div",{className:s,style:{display:"flex",flexDirection:"column",gap:"4px",...a},children:[(0,Nl.jsxs)("label",{style:{fontSize:q.sm,fontWeight:ce.medium,color:E.gray[700]},children:[e,n&&(0,Nl.jsx)("span",{style:{color:E.error[500],marginLeft:"2px"},children:"*"})]}),i&&(0,Nl.jsx)("span",{style:{fontSize:q.xs,color:E.gray[500],marginBottom:"4px"},children:i}),t,(r||o)&&(0,Nl.jsx)("span",{style:{fontSize:q.xs,color:l?E.error[500]:E.gray[500]},children:r||o})]})}var Nl,h7=x(()=>{"use strict";Nl=O(W(),1);xt();Ut()});function wb({label:e,icon:t,rightElement:r,onClick:o,disabled:n,active:i,danger:a,style:s,className:l}){let c=a?E.error[600]:E.gray[700],u=a?E.error[50]:E.gray[100],p=a?E.error[100]:E.primary[50];return(0,yd.jsxs)("button",{onClick:n?void 0:o,disabled:n,className:l,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:Qe.md,backgroundColor:i?p:"transparent",color:n?E.gray[400]:c,fontSize:q.sm,fontWeight:i?ce.medium:ce.normal,textAlign:"left",cursor:n?"not-allowed":"pointer",transition:"background-color 0.15s",...s},onMouseEnter:f=>{!n&&!i&&(f.target.style.backgroundColor=u)},onMouseLeave:f=>{!n&&!i&&(f.target.style.backgroundColor="transparent")},children:[t&&(0,yd.jsx)("span",{style:{display:"flex",flexShrink:0},children:t}),(0,yd.jsx)("span",{style:{flex:1},children:e}),r&&(0,yd.jsx)("span",{style:{display:"flex",flexShrink:0,color:E.gray[400]},children:r})]})}var yd,CT=x(()=>{"use strict";yd=O(W(),1);xt();sr();Ut()});function y7({children:e,variant:t="default",size:r="md",closable:o,onClose:n,icon:i,style:a,className:s}){let l=koe[r];return(0,Dl.jsxs)("span",{className:s,style:{display:"inline-flex",alignItems:"center",gap:l.gap,padding:l.padding,fontSize:l.fontSize,fontWeight:ce.medium,borderRadius:"6px",...Soe[t],...a},children:[i&&(0,Dl.jsx)("span",{style:{display:"flex"},children:i}),e,o&&(0,Dl.jsx)("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",color:"inherit",cursor:"pointer",opacity:.7,marginLeft:"2px"},"aria-label":"Remove",children:(0,Dl.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:(0,Dl.jsx)("path",{d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z"})})})]})}var Dl,Soe,koe,v7=x(()=>{"use strict";Dl=O(W(),1);xt();Ut();Soe={default:{backgroundColor:E.gray[100],color:E.gray[700],border:`1px solid ${E.gray[200]}`},primary:{backgroundColor:E.primary[50],color:E.primary[700],border:`1px solid ${E.primary[200]}`},success:{backgroundColor:E.success[50],color:E.success[700],border:`1px solid ${E.success[200]}`},warning:{backgroundColor:E.warning[50],color:E.warning[700],border:`1px solid ${E.warning[200]}`},error:{backgroundColor:E.error[50],color:E.error[700],border:`1px solid ${E.error[200]}`},info:{backgroundColor:E.info[50],color:E.info[700],border:`1px solid ${E.info[200]}`}},koe={sm:{padding:"2px 6px",fontSize:q.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:q.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:q.sm,gap:"6px"}}});function $7({trigger:e,options:t,value:r,onChange:o,placement:n="bottom-start",disabled:i,style:a,className:s}){let[l,c]=(0,Pl.useState)(!1),u=(0,Pl.useRef)(null);(0,Pl.useEffect)(()=>{let m=g=>{u.current&&!u.current.contains(g.target)&&c(!1)};if(l)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[l]),(0,Pl.useEffect)(()=>{let m=g=>{g.key==="Escape"&&c(!1)};if(l)return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]);let p=m=>{o?.(m),c(!1)},f=()=>{switch(n){case"bottom-start":return{top:"100%",left:0,marginTop:"4px"};case"bottom-end":return{top:"100%",right:0,marginTop:"4px"};case"top-start":return{bottom:"100%",left:0,marginBottom:"4px"};case"top-end":return{bottom:"100%",right:0,marginBottom:"4px"};default:return{top:"100%",left:0,marginTop:"4px"}}};return(0,vd.jsxs)("div",{ref:u,className:s,style:{position:"relative",display:"inline-block",...a},children:[(0,vd.jsx)("div",{onClick:()=>!i&&c(!l),style:{cursor:i?"not-allowed":"pointer"},children:e}),l&&(0,vd.jsx)("div",{style:{position:"absolute",...f(),minWidth:"160px",backgroundColor:E.white,border:`1px solid ${E.gray[200]}`,borderRadius:Qe.lg,boxShadow:Wt.lg,zIndex:Pt.dropdown,padding:"4px"},children:t.map(m=>(0,vd.jsx)(wb,{label:m.label,icon:m.icon,onClick:()=>p(m.value),disabled:m.disabled,active:r===m.value,danger:m.danger},m.value))})]})}var vd,Pl,b7=x(()=>{"use strict";vd=O(W(),1),Pl=O(te(),1);CT();xt();sr()});function x7({value:e="",onChange:t,onSelect:r,options:o,placeholder:n,label:i,loading:a,disabled:s,error:l,noResultsText:c="No results found",style:u,className:p}){let[f,m]=(0,Zi.useState)(!1),[g,v]=(0,Zi.useState)(-1),b=(0,Zi.useRef)(null),y=(0,Zi.useMemo)(()=>{if(!e)return o;let k=e.toLowerCase();return o.filter(j=>j.label.toLowerCase().includes(k)||j.value.toLowerCase().includes(k))},[o,e]);(0,Zi.useEffect)(()=>{let k=j=>{b.current&&!b.current.contains(j.target)&&m(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);let h=k=>{t?.(k),m(!0),v(-1)},$=k=>{t?.(k.label),r?.(k),m(!1),v(-1)},_=k=>{if(!f){(k.key==="ArrowDown"||k.key==="ArrowUp")&&m(!0);return}switch(k.key){case"ArrowDown":k.preventDefault(),v(j=>j<y.length-1?j+1:j);break;case"ArrowUp":k.preventDefault(),v(j=>j>0?j-1:j);break;case"Enter":k.preventDefault(),g>=0&&y[g]&&$(y[g]);break;case"Escape":m(!1),v(-1);break}};return(0,sn.jsxs)("div",{ref:b,className:p,style:{position:"relative",...u},children:[(0,sn.jsx)("div",{onKeyDown:_,children:(0,sn.jsx)(ud,{label:i,value:e,onChange:h,onFocus:()=>m(!0),placeholder:n,disabled:s,error:l})}),f&&(0,sn.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:E.white,border:`1px solid ${E.gray[200]}`,borderRadius:Qe.lg,boxShadow:Wt.lg,zIndex:Pt.dropdown,maxHeight:"240px",overflow:"auto"},children:a?(0,sn.jsx)("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:(0,sn.jsx)(Lt,{size:20})}):y.length===0?(0,sn.jsx)("div",{style:{padding:"12px",textAlign:"center",color:E.gray[500],fontSize:q.sm},children:c}):y.map((k,j)=>(0,sn.jsxs)("div",{onClick:()=>!k.disabled&&$(k),style:{padding:"8px 12px",cursor:k.disabled?"not-allowed":"pointer",backgroundColor:g===j?E.gray[100]:"transparent",color:k.disabled?E.gray[400]:E.gray[900],fontSize:q.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>v(j),children:[k.icon&&(0,sn.jsx)("span",{style:{flexShrink:0},children:k.icon}),(0,sn.jsxs)("div",{style:{flex:1},children:[(0,sn.jsx)("div",{children:k.label}),k.description&&(0,sn.jsx)("div",{style:{fontSize:q.xs,color:E.gray[500]},children:k.description})]})]},k.value))})]})}var sn,Zi,_7=x(()=>{"use strict";sn=O(W(),1),Zi=O(te(),1);cT();Ko();xt();sr();Ut()});function k7({items:e,separator:t="/",onItemClick:r,style:o,className:n}){return(0,Vi.jsx)("nav",{"aria-label":"Breadcrumb",className:n,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:q.sm,...o},children:e.map((i,a)=>{let s=a===e.length-1;return(0,Vi.jsxs)(S7.Fragment,{children:[a>0&&(0,Vi.jsx)("span",{style:{color:E.gray[400]},children:t}),i.icon&&(0,Vi.jsx)("span",{style:{display:"flex",alignItems:"center",color:s?E.gray[900]:E.gray[500]},children:i.icon}),s?(0,Vi.jsx)("span",{style:{color:E.gray[900],fontWeight:500},"aria-current":"page",children:i.label}):i.href?(0,Vi.jsx)(yb,{href:i.href,tone:"muted",underline:"hover",onClick:l=>{r&&(l.preventDefault(),r(i,a))},children:i.label}):(0,Vi.jsx)("button",{onClick:()=>r?.(i,a),style:{background:"none",border:"none",padding:0,color:E.gray[500],cursor:"pointer",fontSize:"inherit"},children:i.label})]},a)})})}var Vi,S7,w7=x(()=>{"use strict";Vi=O(W(),1),S7=O(te(),1);gT();xt();Ut()});function E7({currentPage:e,totalPages:t,onPageChange:r,showFirstLast:o=!0,maxVisible:n=5,size:i="md",disabled:a,style:s,className:l}){let c=()=>{let m=[];if(t<=n)for(let g=1;g<=t;g++)m.push(g);else{m.push(1);let g=Math.floor((n-3)/2),v=Math.max(2,e-g),b=Math.min(t-1,e+g);e<=g+2&&(b=Math.min(t-1,n-2)),e>=t-g-1&&(v=Math.max(2,t-n+3)),v>2&&m.push("ellipsis");for(let y=v;y<=b;y++)m.push(y);b<t-1&&m.push("ellipsis"),m.push(t)}return m},u=i==="sm"?"xs":i==="lg"?"md":"sm",p=i==="sm"?14:i==="lg"?20:16,f=({page:m,active:g})=>(0,Mr.jsx)("button",{onClick:()=>!a&&r?.(m),disabled:a,style:{minWidth:i==="sm"?"28px":i==="lg"?"40px":"32px",height:i==="sm"?"28px":i==="lg"?"40px":"32px",padding:"0 8px",border:"none",borderRadius:"6px",backgroundColor:g?E.primary[600]:"transparent",color:g?E.white:E.gray[700],fontSize:i==="sm"?q.xs:q.sm,fontWeight:g?ce.medium:ce.normal,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,transition:"all 0.15s"},children:m});return(0,Mr.jsxs)("nav",{"aria-label":"Pagination",className:l,style:{display:"flex",alignItems:"center",gap:"4px",...s},children:[o&&(0,Mr.jsxs)(et,{variant:"ghost",size:u,onClick:()=>r?.(1),disabled:a||e===1,"aria-label":"First page",children:[(0,Mr.jsx)(Re,{name:"chevron-left",size:p}),(0,Mr.jsx)(Re,{name:"chevron-left",size:p,style:{marginLeft:"-8px"}})]}),(0,Mr.jsx)(et,{variant:"ghost",size:u,onClick:()=>r?.(e-1),disabled:a||e===1,"aria-label":"Previous page",children:(0,Mr.jsx)(Re,{name:"chevron-left",size:p})}),c().map((m,g)=>m==="ellipsis"?(0,Mr.jsx)("span",{style:{padding:"0 4px",color:E.gray[400]},children:"..."},`ellipsis-${g}`):(0,Mr.jsx)(f,{page:m,active:m===e},m)),(0,Mr.jsx)(et,{variant:"ghost",size:u,onClick:()=>r?.(e+1),disabled:a||e===t,"aria-label":"Next page",children:(0,Mr.jsx)(Re,{name:"chevron-right",size:p})}),o&&(0,Mr.jsxs)(et,{variant:"ghost",size:u,onClick:()=>r?.(t),disabled:a||e===t,"aria-label":"Last page",children:[(0,Mr.jsx)(Re,{name:"chevron-right",size:p}),(0,Mr.jsx)(Re,{name:"chevron-right",size:p,style:{marginLeft:"-8px"}})]})]})}var Mr,T7=x(()=>{"use strict";Mr=O(W(),1);Mi();an();xt();Ut()});function z7({icon:e,title:t,description:r,action:o,style:n,className:i}){let a={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...n};return(0,Ul.jsxs)(Et,{align:"center",gap:"sm",className:i,style:a,children:[e!==void 0&&(typeof e=="string"?(0,Ul.jsx)(Re,{name:e,size:40,tone:"subtle"}):e),(0,Ul.jsx)(bn,{level:3,children:t}),r!==void 0&&(0,Ul.jsx)(ct,{tone:"muted",children:r}),o!==void 0&&(0,Ul.jsx)("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:o})]})}var Ul,R7=x(()=>{"use strict";Ul=O(W(),1);sd();an();db();kg()});function C7({label:e,value:t,delta:r,trend:o="neutral",icon:n,style:i,className:a}){let s=o==="up"?"success":o==="down"?"error":"muted";return(0,Hi.jsxs)(Et,{gap:"xs",className:a,style:i,children:[(0,Hi.jsxs)(bo,{gap:"xs",align:"center",children:[n!==void 0&&(typeof n=="string"?(0,Hi.jsx)(Re,{name:n,size:16,tone:"muted"}):n),(0,Hi.jsx)(ct,{size:"xs",weight:"semibold",caps:!0,tone:"muted",children:e})]}),(0,Hi.jsxs)(bo,{gap:"sm",align:"end",children:[(0,Hi.jsx)(ct,{size:"3xl",weight:"bold",children:t}),r!==void 0&&(0,Hi.jsx)(ct,{size:"sm",weight:"semibold",tone:s,children:r})]})]})}var Hi,I7=x(()=>{"use strict";Hi=O(W(),1);sd();cb();kg();an()});function woe(e,t){return e<t?"completed":e===t?"current":"upcoming"}function Toe({index:e,state:t}){return(0,Ht.jsx)("span",{"aria-hidden":"true",style:{width:IT,height:IT,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxSizing:"border-box",transition:"background-color 0.2s, border-color 0.2s, color 0.2s",...Eoe[t]},children:t==="completed"?(0,Ht.jsx)(Re,{name:"check",size:16,tone:"inherit"}):(0,Ht.jsx)(ct,{is:"span",size:"sm",weight:"semibold",tone:"inherit",children:e+1})})}function zoe({label:e,state:t}){return(0,Ht.jsx)(ct,{is:"span",size:"sm",weight:t==="current"?"semibold":"normal",tone:t==="upcoming"?"muted":"default",children:e})}function O7({steps:e,current:t,orientation:r="horizontal",onStepClick:o,style:n,className:i}){let a=(s,l)=>{let c=woe(l,t),u=(0,Ht.jsxs)(bo,{gap:"sm",align:"center",children:[(0,Ht.jsx)(Toe,{index:l,state:c}),(0,Ht.jsx)(zoe,{label:s,state:c})]});return o===void 0?(0,Ht.jsx)("span",{"aria-current":c==="current"?"step":void 0,children:u}):(0,Ht.jsx)("button",{type:"button",onClick:()=>o(l),"aria-current":c==="current"?"step":void 0,style:{background:"none",border:"none",padding:0,margin:0,font:"inherit",textAlign:"inherit",cursor:"pointer"},children:u})};return r==="vertical"?(0,Ht.jsx)("nav",{"aria-label":"Progress",className:i,style:n,children:(0,Ht.jsx)(Et,{gap:"none",align:"start",children:e.map((s,l)=>(0,Ht.jsxs)(Et,{gap:"none",align:"start",children:[l>0&&(0,Ht.jsx)("span",{style:{width:IT,height:16,display:"inline-flex",justifyContent:"center"},children:(0,Ht.jsx)(zl,{orientation:"vertical",margin:0})}),a(s,l)]},l))})}):(0,Ht.jsx)("nav",{"aria-label":"Progress",className:i,style:n,children:(0,Ht.jsx)(bo,{gap:"sm",align:"center",children:e.map((s,l)=>(0,Ht.jsxs)(bo,{gap:"sm",align:"center",style:l>0?{flex:1}:void 0,children:[l>0&&(0,Ht.jsx)(zl,{style:{flex:1,minWidth:16,margin:0}}),a(s,l)]},l))})})}var Ht,IT,Eoe,M7=x(()=>{"use strict";Ht=O(W(),1);sd();cb();kg();an();iT();IT=28;Eoe={completed:{backgroundColor:"var(--ggui-color-primary-100, #e0f2fe)",border:"1px solid var(--ggui-color-primary-300, #7dd3fc)",color:"var(--ggui-color-primary-700, #0369a1)"},current:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",border:"1px solid var(--ggui-color-primary-600, #0284c7)",color:"var(--ggui-color-onPrimary, #ffffff)"},upcoming:{backgroundColor:"var(--ggui-color-surface, #fafafa)",border:"1px solid var(--ggui-color-outline, #d4d4d8)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"}}});var A7={};Mt(A7,{Autocomplete:()=>x7,Breadcrumb:()=>k7,Dropdown:()=>$7,EmptyState:()=>z7,FormField:()=>g7,MenuItem:()=>wb,Pagination:()=>E7,SearchField:()=>f7,Stat:()=>C7,Stepper:()=>O7,Tag:()=>y7});var j7=x(()=>{"use strict";m7();h7();CT();v7();b7();_7();w7();T7();R7();I7();M7()});function N7({logo:e,navigation:t,actions:r,sticky:o=!1,background:n,bordered:i=!0,style:a,className:s}){return(0,$d.jsxs)("header",{className:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:n||E.white,borderBottom:i?`1px solid ${E.gray[200]}`:void 0,...o&&{position:"sticky",top:0,zIndex:Pt.sticky,boxShadow:Wt.sm},...a},children:[e&&(0,$d.jsx)("div",{style:{flexShrink:0},children:e}),t&&(0,$d.jsx)("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:t}),r&&(0,$d.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:r})]})}var $d,D7=x(()=>{"use strict";$d=O(W(),1);xt();sr()});function U7({item:e,activeId:t,onItemClick:r,collapsed:o,depth:n=0}){let[i,a]=(0,P7.useState)(!1),s=e.children&&e.children.length>0,l=t===e.id;return(0,Yt.jsxs)("div",{children:[(0,Yt.jsxs)("button",{onClick:()=>{s&&!o&&a(!i),r?.(e)},disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:o?"10px":"10px 12px",paddingLeft:o?"10px":`${12+n*16}px`,border:"none",borderRadius:Qe.md,backgroundColor:l?E.primary[50]:"transparent",color:e.disabled?E.gray[400]:l?E.primary[700]:E.gray[700],fontSize:q.sm,fontWeight:l?ce.medium:ce.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:o?"center":"flex-start"},children:[e.icon&&(0,Yt.jsx)("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!o&&(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("span",{style:{flex:1},children:e.label}),e.badge&&(0,Yt.jsx)("span",{children:e.badge}),s&&(0,Yt.jsx)(Re,{name:i?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),s&&i&&!o&&(0,Yt.jsx)("div",{style:{marginTop:"4px"},children:e.children.map(u=>(0,Yt.jsx)(U7,{item:u,activeId:t,onItemClick:r,collapsed:o,depth:n+1},u.id))})]})}function L7({items:e,activeId:t,onItemClick:r,collapsed:o=!1,header:n,footer:i,width:a=256,collapsedWidth:s=64,style:l,className:c}){let u=o?s:a;return(0,Yt.jsxs)("aside",{className:c,style:{width:u,minWidth:u,height:"100%",display:"flex",flexDirection:"column",backgroundColor:E.white,borderRight:`1px solid ${E.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...l},children:[n&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderBottom:`1px solid ${E.gray[200]}`},children:n}),(0,Yt.jsx)("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:(0,Yt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(p=>(0,Yt.jsx)(U7,{item:p,activeId:t,onItemClick:r,collapsed:o},p.id))})}),i&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderTop:`1px solid ${E.gray[200]}`},children:i})]})}var Yt,P7,Z7=x(()=>{"use strict";Yt=O(W(),1),P7=O(te(),1);xt();sr();Ut();an()});function H7({children:e,columns:t=3,gap:r=16,style:o,className:n}){return(0,V7.jsx)("div",{className:n,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))",gap:`${r}px`,...o},children:e})}var V7,q7=x(()=>{"use strict";V7=O(W(),1)});function B7({comment:e,onReply:t,onReaction:r,depth:o=0}){let[n,i]=(0,Eb.useState)(!1),[a,s]=(0,Eb.useState)(""),l=()=>{a.trim()&&(t?.(e.id,a),s(""),i(!1))},c=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,Le.jsxs)("div",{style:{marginLeft:o>0?"40px":0},children:[(0,Le.jsxs)("div",{style:{display:"flex",gap:"12px"},children:[(0,Le.jsx)(Ol,{name:e.author.name,src:e.author.avatar,size:"sm"}),(0,Le.jsxs)("div",{style:{flex:1},children:[(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Le.jsx)("span",{style:{fontWeight:500,fontSize:q.sm},children:e.author.name}),(0,Le.jsx)("span",{style:{color:E.gray[500],fontSize:q.xs},children:c})]}),(0,Le.jsx)("p",{style:{margin:"4px 0 8px",fontSize:q.sm,color:E.gray[700]},children:e.content}),(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.reactions?.map(u=>(0,Le.jsxs)("button",{onClick:()=>r?.(e.id,u.emoji),style:{padding:"2px 8px",border:`1px solid ${E.gray[200]}`,borderRadius:"12px",backgroundColor:E.gray[50],fontSize:q.xs,cursor:"pointer"},children:[u.emoji," ",u.count]},u.emoji)),(0,Le.jsx)("button",{onClick:()=>i(!n),style:{background:"none",border:"none",color:E.gray[500],fontSize:q.xs,cursor:"pointer"},children:"Reply"})]}),n&&(0,Le.jsxs)("div",{style:{marginTop:"12px"},children:[(0,Le.jsx)(Eg,{value:a,onChange:s,placeholder:"Write a reply...",rows:2}),(0,Le.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[(0,Le.jsx)(et,{size:"sm",onClick:l,children:"Reply"}),(0,Le.jsx)(et,{size:"sm",variant:"ghost",onClick:()=>i(!1),children:"Cancel"})]})]})]})]}),e.replies?.map(u=>(0,Le.jsx)("div",{style:{marginTop:"16px"},children:(0,Le.jsx)(B7,{comment:u,onReply:t,onReaction:r,depth:o+1})},u.id))]})}function G7({comments:e,currentUser:t,onAddComment:r,onReply:o,onReaction:n,loading:i,style:a,className:s}){let[l,c]=(0,Eb.useState)(""),u=()=>{l.trim()&&(r?.(l),c(""))};return(0,Le.jsxs)("div",{className:s,style:{...a},children:[t&&(0,Le.jsxs)("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[(0,Le.jsx)(Ol,{name:t.name,src:t.avatar,size:"sm"}),(0,Le.jsxs)("div",{style:{flex:1},children:[(0,Le.jsx)(Eg,{value:l,onChange:c,placeholder:"Write a comment...",rows:3}),(0,Le.jsx)("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:(0,Le.jsx)(et,{onClick:u,disabled:!l.trim(),children:"Comment"})})]})]}),i?(0,Le.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Le.jsx)(Lt,{size:24})}):(0,Le.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(p=>(0,Le.jsx)(B7,{comment:p,onReply:o,onReaction:n},p.id))})]})}var Le,Eb,F7=x(()=>{"use strict";Le=O(W(),1),Eb=O(te(),1);fb();Mi();uT();Ko();xt();Ut()});function K7({columns:e,data:t,rowKey:r="id",loading:o,emptyText:n="No data",onSort:i,sortKey:a,sortDirection:s,onRowClick:l,selectable:c,selectedKeys:u=[],onSelectionChange:p,style:f,className:m}){let g=($,_)=>typeof r=="function"?r($):String($[r]??_),v=$=>{p?.($?t.map((_,k)=>g(_,k)):[])},b=($,_)=>{p?.(_?[...u,$]:u.filter(k=>k!==$))},y=t.length>0&&u.length===t.length,h=u.length>0&&u.length<t.length;return(0,It.jsx)("div",{className:m,style:{border:`1px solid ${E.gray[200]}`,borderRadius:"8px",overflow:"hidden",...f},children:(0,It.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:q.sm},children:[(0,It.jsx)("thead",{children:(0,It.jsxs)("tr",{style:{backgroundColor:E.gray[50]},children:[c&&(0,It.jsx)("th",{style:{width:"40px",padding:"12px"},children:(0,It.jsx)(Il,{checked:y,indeterminate:h,onChange:v})}),e.map($=>(0,It.jsx)("th",{style:{padding:"12px 16px",textAlign:$.align||"left",fontWeight:ce.semibold,color:E.gray[700],borderBottom:`1px solid ${E.gray[200]}`,cursor:$.sortable?"pointer":void 0,width:$.width},onClick:()=>$.sortable&&i?.($.key,a===$.key&&s==="asc"?"desc":"asc"),children:(0,It.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[$.header,$.sortable&&a===$.key&&(0,It.jsx)(Re,{name:s==="asc"?"chevron-up":"chevron-down",size:14})]})},$.key))]})}),(0,It.jsx)("tbody",{children:o?(0,It.jsx)("tr",{children:(0,It.jsx)("td",{colSpan:e.length+(c?1:0),style:{padding:"48px",textAlign:"center"},children:(0,It.jsx)(Lt,{size:24})})}):t.length===0?(0,It.jsx)("tr",{children:(0,It.jsx)("td",{colSpan:e.length+(c?1:0),style:{padding:"48px",textAlign:"center",color:E.gray[500]},children:n})}):t.map(($,_)=>{let k=g($,_),j=u.includes(k);return(0,It.jsxs)("tr",{onClick:()=>l?.($,_),style:{backgroundColor:j?E.primary[50]:void 0,cursor:l?"pointer":void 0,transition:"background-color 0.15s"},children:[c&&(0,It.jsx)("td",{style:{padding:"12px"},children:(0,It.jsx)(Il,{checked:j,onChange:S=>b(k,S)})}),e.map(S=>(0,It.jsx)("td",{style:{padding:"12px 16px",textAlign:S.align||"left",color:E.gray[900],borderBottom:`1px solid ${E.gray[100]}`},children:S.render?S.render($[S.key],$,_):String($[S.key]??"")},S.key))]},k)})})]})})}var It,W7=x(()=>{"use strict";It=O(W(),1);dT();Ko();an();xt();Ut()});function J7({messages:e,currentUserId:t,onSendMessage:r,loading:o,typing:n,placeholder:i="Type a message...",header:a,style:s,className:l}){let[c,u]=(0,bd.useState)(""),p=(0,bd.useRef)(null);(0,bd.useEffect)(()=>{p.current?.scrollIntoView({behavior:"smooth"})},[e]);let f=()=>{c.trim()&&(r?.(c),u(""))},m=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),f())};return(0,Ot.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${E.gray[200]}`,borderRadius:Qe.lg,backgroundColor:E.white,overflow:"hidden",...s},children:[a&&(0,Ot.jsx)("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${E.gray[200]}`},children:a}),(0,Ot.jsxs)("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[o?(0,Ot.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Ot.jsx)(Lt,{size:24})}):e.map(g=>{let v=g.sender.id===t,b=g.timestamp instanceof Date?g.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g.timestamp;return(0,Ot.jsxs)("div",{style:{display:"flex",flexDirection:v?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!v&&(0,Ot.jsx)(Ol,{name:g.sender.name,src:g.sender.avatar,size:"xs"}),(0,Ot.jsxs)("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Qe.lg,backgroundColor:v?E.primary[600]:E.gray[100],color:v?E.white:E.gray[900]},children:[(0,Ot.jsx)("p",{style:{margin:0,fontSize:q.sm},children:g.content}),(0,Ot.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:q.xs,opacity:.7},children:[(0,Ot.jsx)("span",{children:b}),v&&g.status&&(0,Ot.jsxs)("span",{children:[g.status==="sending"&&"\u2022",g.status==="sent"&&"\u2713",g.status==="delivered"&&"\u2713\u2713",g.status==="read"&&"\u2713\u2713",g.status==="error"&&"!"]})]})]})]},g.id)}),n&&(0,Ot.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,Ot.jsxs)("span",{style:{fontSize:q.xs,color:E.gray[500]},children:[n.name," is typing..."]})}),(0,Ot.jsx)("div",{ref:p})]}),(0,Ot.jsxs)("div",{style:{padding:"12px 16px",borderTop:`1px solid ${E.gray[200]}`,display:"flex",gap:"8px"},children:[(0,Ot.jsx)("input",{type:"text",value:c,onChange:g=>u(g.target.value),onKeyDown:m,placeholder:i,style:{flex:1,padding:"10px 14px",border:`1px solid ${E.gray[300]}`,borderRadius:Qe.full,fontSize:q.sm,outline:"none"}}),(0,Ot.jsx)(et,{onClick:f,disabled:!c.trim(),children:(0,Ot.jsx)(Re,{name:"chevron-right",size:18})})]})]})}var Ot,bd,Y7=x(()=>{"use strict";Ot=O(W(),1),bd=O(te(),1);fb();Mi();Ko();an();xt();sr();Ut()});function X7({items:e,activeId:t,onItemClick:r,orientation:o="horizontal",variant:n="default",style:i,className:a}){let s=l=>{let c=t===l.id,u={display:"flex",alignItems:"center",gap:"8px",padding:o==="horizontal"?"8px 16px":"10px 16px",border:"none",background:"none",fontSize:q.sm,cursor:l.disabled?"not-allowed":"pointer",opacity:l.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},p={default:{fontWeight:c?ce.medium:ce.normal,color:c?E.primary[600]:E.gray[600]},pills:{borderRadius:Qe.full,backgroundColor:c?E.primary[100]:"transparent",color:c?E.primary[700]:E.gray[600],fontWeight:c?ce.medium:ce.normal},underline:{borderBottom:c?`2px solid ${E.primary[600]}`:"2px solid transparent",color:c?E.primary[600]:E.gray[600],fontWeight:c?ce.medium:ce.normal,borderRadius:0}},f=()=>{l.disabled||r?.(l)},m=(0,Jo.jsxs)(Jo.Fragment,{children:[l.icon&&(0,Jo.jsx)("span",{style:{display:"flex"},children:l.icon}),(0,Jo.jsx)("span",{children:l.label})]});return l.href?(0,Jo.jsx)("a",{href:l.href,onClick:g=>{g.preventDefault(),f()},style:{...u,...p[n]},children:m},l.id):(0,Jo.jsx)("button",{onClick:f,disabled:l.disabled,style:{...u,...p[n]},children:m},l.id)};return(0,Jo.jsx)("nav",{className:a,style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",gap:o==="horizontal"?"4px":"2px",...n==="underline"&&o==="horizontal"&&{borderBottom:`1px solid ${E.gray[200]}`},...i},children:e.map(s)})}var Jo,Q7=x(()=>{"use strict";Jo=O(W(),1);xt();sr();Ut()});function eU(e){if(e===0)return"0 B";let t=1024,r=["B","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,o)).toFixed(1))} ${r[o]}`}function tU({files:e=[],onFilesSelected:t,onFileRemove:r,accept:o,multiple:n=!0,maxSize:i,maxFiles:a,disabled:s,dragDrop:l=!0,style:c,className:u}){let[p,f]=(0,Tb.useState)(!1),m=(0,Tb.useRef)(null),g=h=>{if(!h)return;let $=Array.from(h);a&&($=$.slice(0,a-e.length)),i&&($=$.filter(_=>_.size<=i)),t?.($)},v=h=>{h.preventDefault(),f(!1),!s&&l&&g(h.dataTransfer.files)},b=h=>{h.preventDefault(),!s&&l&&f(!0)},y=()=>{f(!1)};return(0,ur.jsxs)("div",{className:u,style:{...c},children:[(0,ur.jsxs)("div",{onClick:()=>!s&&m.current?.click(),onDrop:v,onDragOver:b,onDragLeave:y,style:{border:`2px dashed ${p?E.primary[400]:E.gray[300]}`,borderRadius:Qe.lg,padding:"32px",textAlign:"center",backgroundColor:p?E.primary[50]:E.gray[50],cursor:s?"not-allowed":"pointer",transition:"all 0.2s",opacity:s?.5:1},children:[(0,ur.jsx)("input",{ref:m,type:"file",accept:o,multiple:n,onChange:h=>g(h.target.files),disabled:s,style:{display:"none"}}),(0,ur.jsx)(Re,{name:"plus",size:32,tone:"subtle"}),(0,ur.jsx)("p",{style:{margin:"12px 0 4px",color:E.gray[700],fontSize:q.sm},children:l?"Drag and drop files here, or click to browse":"Click to browse files"}),(0,ur.jsxs)("p",{style:{margin:0,color:E.gray[500],fontSize:q.xs},children:[o&&`Accepted: ${o}`,i&&` \u2022 Max size: ${eU(i)}`,a&&` \u2022 Max files: ${a}`]})]}),e.length>0&&(0,ur.jsx)("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map(h=>(0,ur.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${E.gray[200]}`,borderRadius:Qe.md,backgroundColor:E.white},children:[(0,ur.jsx)(Re,{name:"menu",size:20,tone:"subtle"}),(0,ur.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,ur.jsx)("p",{style:{margin:0,fontSize:q.sm,color:E.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h.name}),(0,ur.jsxs)("p",{style:{margin:"2px 0 0",fontSize:q.xs,color:E.gray[500]},children:[eU(h.size),h.error&&(0,ur.jsx)("span",{style:{color:E.error[500],marginLeft:"8px"},children:h.error})]}),h.status==="uploading"&&h.progress!==void 0&&(0,ur.jsx)(mb,{value:h.progress,size:"sm",style:{marginTop:"8px"}})]}),(0,ur.jsx)(et,{variant:"ghost",size:"sm",onClick:()=>r?.(h.id),children:(0,ur.jsx)(Re,{name:"x",size:16})})]},h.id))})]})}var ur,Tb,rU=x(()=>{"use strict";ur=O(W(),1),Tb=O(te(),1);Mi();mT();an();xt();sr();Ut()});function Coe({notification:e,onMarkAsRead:t,onDismiss:r}){let o=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,n=Roe[e.type||"info"];return(0,tt.jsxs)("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":E.primary[50],borderRadius:Qe.md,transition:"background-color 0.15s"},children:[(0,tt.jsx)("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":n,flexShrink:0,marginTop:"6px"}}),(0,tt.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[(0,tt.jsx)("p",{style:{margin:0,fontWeight:ce.medium,color:E.gray[900],fontSize:q.sm},children:e.title}),(0,tt.jsx)("button",{onClick:()=>r?.(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:E.gray[400],flexShrink:0},children:(0,tt.jsx)(Re,{name:"x",size:14})})]}),e.message&&(0,tt.jsx)("p",{style:{margin:"4px 0 0",color:E.gray[600],fontSize:q.xs},children:e.message}),(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[(0,tt.jsx)("span",{style:{color:E.gray[400],fontSize:q.xs},children:o}),!e.read&&(0,tt.jsx)("button",{onClick:()=>t?.(e.id),style:{background:"none",border:"none",padding:0,color:E.primary[600],fontSize:q.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&(0,tt.jsx)("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:E.primary[600],fontSize:q.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function nU({notifications:e,onMarkAsRead:t,onMarkAllAsRead:r,onDismiss:o,onClearAll:n,emptyText:i="No notifications",loading:a,style:s,className:l}){let c=e.filter(u=>!u.read).length;return(0,tt.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",...s},children:[(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${E.gray[200]}`},children:[(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,tt.jsx)("span",{style:{fontWeight:ce.semibold,color:E.gray[900]},children:"Notifications"}),c>0&&(0,tt.jsx)("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:E.primary[100],color:E.primary[700],fontSize:q.xs,fontWeight:ce.medium},children:c})]}),(0,tt.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[c>0&&(0,tt.jsx)(et,{variant:"ghost",size:"sm",onClick:r,children:"Mark all read"}),e.length>0&&(0,tt.jsx)(et,{variant:"ghost",size:"sm",onClick:n,children:"Clear all"})]})]}),(0,tt.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,tt.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,tt.jsx)(Lt,{size:24})}):e.length===0?(0,tt.jsx)("div",{style:{textAlign:"center",padding:"32px",color:E.gray[500]},children:i}):(0,tt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(u=>(0,tt.jsx)(Coe,{notification:u,onMarkAsRead:t,onDismiss:o},u.id))})})]})}var tt,Roe,oU=x(()=>{"use strict";tt=O(W(),1);Mi();Ko();an();xt();sr();Ut();Roe={info:E.info[500],success:E.success[500],warning:E.warning[500],error:E.error[500]}});function iU({open:e,onClose:t,title:r,children:o,footer:n,size:i="md",closeOnOverlayClick:a=!0,closeOnEscape:s=!0,showCloseButton:l=!0,style:c,className:u}){let p=(0,zb.useCallback)(g=>{g.key==="Escape"&&s&&t()},[s,t]);if((0,zb.useEffect)(()=>{if(e)return document.addEventListener("keydown",p),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}},[e,p]),!e)return null;let f=g=>{g.target===g.currentTarget&&a&&t()},m=i==="full";return(0,ko.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:Pt.modal,display:"flex",alignItems:m?"stretch":"center",justifyContent:"center",padding:m?0:"24px"},children:[(0,ko.jsx)("div",{onClick:f,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:ms.fadeIn}}),(0,ko.jsxs)("div",{role:"dialog","aria-modal":"true",className:u,style:{position:"relative",width:Ioe[i],maxWidth:m?"100%":"calc(100vw - 48px)",maxHeight:m?"100%":"calc(100vh - 48px)",backgroundColor:E.white,borderRadius:m?0:Qe.xl,boxShadow:Wt["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:ms.scaleIn,...c},children:[(r||l)&&(0,ko.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${E.gray[200]}`},children:[r&&(0,ko.jsx)(bn,{level:4,children:r}),l&&(0,ko.jsx)(et,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close modal",style:{marginLeft:"auto"},children:(0,ko.jsx)(Re,{name:"x",size:20})})]}),(0,ko.jsx)("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:o}),n&&(0,ko.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${E.gray[200]}`},children:n})]})]})}var ko,zb,Ioe,aU=x(()=>{"use strict";ko=O(W(),1),zb=O(te(),1);Mi();an();db();xt();sr();md();Ioe={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"}});function sU({open:e,onClose:t,commands:r,onSelect:o,placeholder:n="Search commands...",recentIds:i=[],loading:a,style:s,className:l}){let[c,u]=(0,eo.useState)(""),[p,f]=(0,eo.useState)(0),m=(0,eo.useMemo)(()=>{let y=c?r.filter($=>$.label.toLowerCase().includes(c.toLowerCase())||$.description?.toLowerCase().includes(c.toLowerCase())):r,h=new Map;if(!c&&i.length>0){let $=i.map(_=>r.find(k=>k.id===_)).filter(Boolean);$.length>0&&h.set("Recent",$)}return y.forEach($=>{let _=$.group||"Commands";h.has(_)||h.set(_,[]),!(!c&&i.includes($.id)&&h.has("Recent"))&&h.get(_).push($)}),h},[r,c,i]),g=(0,eo.useMemo)(()=>{let y=[];return m.forEach(h=>y.push(...h)),y},[m]);(0,eo.useEffect)(()=>{f(0)},[c]),(0,eo.useEffect)(()=>{e&&(u(""),f(0))},[e]);let v=(0,eo.useCallback)(y=>{if(y.key==="Escape"){t();return}if(y.key==="ArrowDown")y.preventDefault(),f(h=>Math.min(h+1,g.length-1));else if(y.key==="ArrowUp")y.preventDefault(),f(h=>Math.max(h-1,0));else if(y.key==="Enter"){y.preventDefault();let h=g[p];h&&!h.disabled&&(o(h),t())}},[g,p,o,t]);if((0,eo.useEffect)(()=>{if(e)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[e,v]),!e)return null;let b=0;return(0,gt.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:Pt.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[(0,gt.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,gt.jsxs)("div",{role:"dialog",className:l,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:E.white,borderRadius:Qe.xl,boxShadow:Wt["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...s},children:[(0,gt.jsx)("div",{style:{padding:"12px",borderBottom:`1px solid ${E.gray[200]}`},children:(0,gt.jsxs)("div",{style:{position:"relative"},children:[(0,gt.jsx)(Re,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),(0,gt.jsx)("input",{type:"text",value:c,onChange:y=>u(y.target.value),placeholder:n,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:q.base,outline:"none",backgroundColor:"transparent"}})]})}),(0,gt.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,gt.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,gt.jsx)(Lt,{size:24})}):g.length===0?(0,gt.jsx)("div",{style:{textAlign:"center",padding:"32px",color:E.gray[500]},children:"No commands found"}):Array.from(m.entries()).map(([y,h])=>(0,gt.jsxs)("div",{style:{marginBottom:"8px"},children:[(0,gt.jsx)("div",{style:{padding:"8px 12px",fontSize:q.xs,fontWeight:ce.semibold,color:E.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:y}),h.map($=>{let k=b++===p;return(0,gt.jsxs)("button",{onClick:()=>{$.disabled||(o($),t())},disabled:$.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Qe.md,backgroundColor:k?E.gray[100]:"transparent",color:$.disabled?E.gray[400]:E.gray[900],textAlign:"left",cursor:$.disabled?"not-allowed":"pointer"},children:[$.icon&&(0,gt.jsx)("span",{style:{display:"flex",color:E.gray[500]},children:$.icon}),(0,gt.jsxs)("div",{style:{flex:1},children:[(0,gt.jsx)("div",{style:{fontSize:q.sm},children:$.label}),$.description&&(0,gt.jsx)("div",{style:{fontSize:q.xs,color:E.gray[500]},children:$.description})]}),$.shortcut&&(0,gt.jsx)("kbd",{style:{padding:"2px 6px",backgroundColor:E.gray[100],borderRadius:Qe.sm,fontSize:q.xs,color:E.gray[500],fontFamily:"inherit"},children:$.shortcut})]},$.id)})]},y))}),(0,gt.jsxs)("div",{style:{padding:"8px 12px",borderTop:`1px solid ${E.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:q.xs,color:E.gray[500]},children:[(0,gt.jsx)("span",{children:"\u2191\u2193 Navigate"}),(0,gt.jsx)("span",{children:"\u21B5 Select"}),(0,gt.jsx)("span",{children:"Esc Close"})]})]})]})}var gt,eo,lU=x(()=>{"use strict";gt=O(W(),1),eo=O(te(),1);Ko();an();xt();sr();Ut()});function cU({brand:e,columns:t,socialLinks:r,bottomText:o,bottomLinks:n,background:i,bordered:a=!0,style:s,className:l}){return(0,Fr.jsxs)("footer",{className:l,role:"contentinfo",style:{backgroundColor:i||E.gray[50],borderTop:a?`1px solid ${E.gray[200]}`:void 0,...s},children:[(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&(0,Fr.jsx)("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),t?.map((c,u)=>(0,Fr.jsxs)("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[c.title&&(0,Fr.jsx)("h4",{style:{fontSize:q.sm,fontWeight:ce.semibold,color:E.gray[900],lineHeight:Jt.normal,margin:"0 0 16px 0",padding:0},children:c.title}),(0,Fr.jsx)("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:c.links.map((p,f)=>(0,Fr.jsx)("li",{children:(0,Fr.jsx)("a",{href:p.href,onClick:p.onClick?m=>{m.preventDefault(),p.onClick?.()}:void 0,style:{fontSize:q.sm,color:E.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:Jt.normal},"aria-label":p.label,children:p.label})},f))})]},u))]}),(o||n||r)&&(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"20px 24px",maxWidth:"1280px",margin:"0 auto",borderTop:`1px solid ${E.gray[200]}`},children:[o&&(0,Fr.jsx)("span",{style:{fontSize:q.sm,color:E.gray[500],lineHeight:Jt.normal},children:o}),(0,Fr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[r?.map((c,u)=>(0,Fr.jsx)("a",{href:c.href,"aria-label":c.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:E.gray[500],transition:"color 0.15s"},children:c.icon},u)),n?.map((c,u)=>(0,Fr.jsx)("a",{href:c.href,onClick:c.onClick?p=>{p.preventDefault(),c.onClick?.()}:void 0,style:{fontSize:q.sm,color:E.gray[500],textDecoration:"none",transition:"color 0.15s"},children:c.label},u))]})]})]})}var Fr,uU=x(()=>{"use strict";Fr=O(W(),1);xt();Ut()});function dU({heading:e,description:t,primaryAction:r,secondaryAction:o,media:n,align:i="center",size:a="md",background:s,backgroundImage:l,overlay:c=!1,style:u,className:p}){let f={sm:{padding:"48px 24px",headingSize:q["3xl"],descSize:q.lg},md:{padding:"80px 24px",headingSize:q["4xl"],descSize:q.xl},lg:{padding:"120px 24px",headingSize:q["5xl"],descSize:q.xl}},m=f[a]||f.md,g=!!l,v=g&&c;return(0,to.jsxs)("section",{className:p,style:{position:"relative",backgroundColor:s||(g?void 0:E.white),...g&&{backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...u},children:[v&&(0,to.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,to.jsxs)("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:m.padding,display:"flex",flexDirection:i==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:i==="center"?"center":"left"},children:[(0,to.jsxs)("div",{style:{flex:i==="left"&&n?"1 1 50%":void 0,maxWidth:i==="center"?"800px":void 0},children:[e&&(0,to.jsx)("h1",{style:{fontSize:m.headingSize,fontWeight:ce.bold,lineHeight:Jt.tight,letterSpacing:Fo.tight,color:v?E.white:E.gray[900],margin:"0 0 16px 0",padding:0},children:e}),t&&(0,to.jsx)("p",{style:{fontSize:m.descSize,lineHeight:Jt.relaxed,color:v?"rgba(255,255,255,0.9)":E.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:i==="center"?"640px":void 0,...i==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:t}),(r||o)&&(0,to.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:i==="center"?"center":"flex-start"},children:[r&&(0,to.jsx)("button",{onClick:r.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:ce.semibold,color:E.white,backgroundColor:E.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:Jt.normal},children:r.label}),o&&(0,to.jsx)("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:ce.semibold,color:v?E.white:E.gray[700],backgroundColor:"transparent",border:`1px solid ${v?"rgba(255,255,255,0.3)":E.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:Jt.normal},children:o.label})]})]}),n&&(0,to.jsx)("div",{style:{flex:i==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...i==="center"&&{marginTop:"16px"}},children:n})]})]})}var to,pU=x(()=>{"use strict";to=O(W(),1);xt();Ut()});var fU={};Mt(fU,{CardGrid:()=>H7,ChatWindow:()=>J7,CommandPalette:()=>sU,CommentThread:()=>G7,DataTable:()=>K7,FileUploader:()=>tU,Footer:()=>cU,Header:()=>N7,Hero:()=>dU,Modal:()=>iU,NavigationBar:()=>X7,NotificationCenter:()=>nU,Sidebar:()=>L7});var mU=x(()=>{"use strict";D7();Z7();q7();F7();W7();Y7();Q7();rU();oU();aU();lU();uU();pU()});var gU,jg,hU,yU=x(()=>{"use strict";gU=O(W(),1),jg=O(te(),1),hU=(0,jg.forwardRef)(function({children:t,onClick:r,onDoubleClick:o,hoverStyle:n,activeStyle:i,cursor:a,transition:s="all 200ms ease",disabled:l=!1,role:c,"aria-label":u,tabIndex:p,style:f,className:m,...g},v){let[b,y]=(0,jg.useState)(!1),[h,$]=(0,jg.useState)(!1),_=!!r,k=l?"not-allowed":a??(_?"pointer":void 0),j=c??(_?"button":void 0),S=p??(_?0:void 0),T=R=>{l||!r||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r(R))},z={...f,cursor:k,transition:s,opacity:l?.5:void 0,...b&&!l?n:{},...h&&!l?i:{}};return(0,gU.jsx)("div",{ref:v,className:m,style:z,onClick:l?void 0:r,onDoubleClick:l?void 0:o,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),$(!1)},onMouseDown:()=>$(!0),onMouseUp:()=>$(!1),onKeyDown:T,role:j,"aria-label":u,"aria-disabled":l||void 0,tabIndex:S,...g,children:t})})});var vU,Rb,$U,bU=x(()=>{"use strict";vU=O(W(),1),Rb=O(te(),1),$U=(0,Rb.forwardRef)(function({children:t,hoverStyle:r,onHoverChange:o,transition:n="all 200ms ease",style:i,className:a,...s},l){let[c,u]=(0,Rb.useState)(!1),p={...i,transition:n,...c?r:{}};return(0,vU.jsx)("div",{ref:l,className:a,style:p,onMouseEnter:()=>{u(!0),o?.(!0)},onMouseLeave:()=>{u(!1),o?.(!1)},...s,children:t})})});var xU,xd,_U,SU=x(()=>{"use strict";xU=O(W(),1),xd=O(te(),1),_U=(0,xd.forwardRef)(function({children:t,onPress:r,onLongPress:o,longPressDelay:n=500,hoverStyle:i,pressStyle:a,disabled:s=!1,transition:l="all 150ms ease",role:c,"aria-label":u,tabIndex:p,style:f,className:m,...g},v){let[b,y]=(0,xd.useState)(!1),[h,$]=(0,xd.useState)(!1),[_,k]=(0,xd.useState)(null),j=!!r||!!o,S=Z=>{if(!s&&($(!0),o)){let N=setTimeout(()=>{o(Z)},n);k(N)}},T=Z=>{s||($(!1),_?(clearTimeout(_),k(null),r?.(Z)):o||r?.(Z))},z=Z=>{s||!r||(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),r(Z))},R={...f,cursor:s?"not-allowed":j?"pointer":void 0,transition:l,opacity:s?.5:void 0,userSelect:j?"none":void 0,...b&&!s?i:{},...h&&!s?a:{}},M=typeof t=="function"?t({pressed:h,hovered:b}):t;return(0,xU.jsx)("div",{ref:v,className:m,style:R,onMouseDown:S,onMouseUp:T,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),$(!1),_&&clearTimeout(_)},onKeyDown:z,role:c??(j?"button":void 0),"aria-label":u,"aria-disabled":s||void 0,tabIndex:p??(j?0:void 0),...g,children:M})})});var kU={};Mt(kU,{Clickable:()=>hU,Hoverable:()=>$U,Pressable:()=>_U});var wU=x(()=>{"use strict";yU();bU();SU()});var Ooe,Moe,EU,TU,_d,Aoe,zU,RU,CU,joe,IU=x(()=>{"use strict";Ooe={primary50:"#f0f9ff",primary100:"#e0f2fe",primary200:"#bae6fd",primary300:"#7dd3fc",primary400:"#38bdf8",primary500:"#0ea5e9",primary600:"#0284c7",primary700:"#0369a1",primary800:"#075985",primary900:"#0c4a6e",gray50:"#f9fafb",gray100:"#f3f4f6",gray200:"#e5e7eb",gray300:"#d1d5db",gray400:"#9ca3af",gray500:"#6b7280",gray600:"#4b5563",gray700:"#374151",gray800:"#1f2937",gray900:"#111827",info50:"#ecfeff",info100:"#cffafe",info200:"#a5f3fc",info500:"#06b6d4",info600:"#0891b2",info700:"#0e7490",info800:"#155e75",success50:"#f0fdf4",success100:"#dcfce7",success200:"#bbf7d0",success500:"#22c55e",success600:"#16a34a",success700:"#15803d",success800:"#166534",warning50:"#fffbeb",warning100:"#fef3c7",warning200:"#fde68a",warning500:"#f59e0b",warning600:"#d97706",warning700:"#b45309",warning800:"#92400e",error50:"#fef2f2",error100:"#fee2e2",error200:"#fecaca",error500:"#ef4444",error600:"#dc2626",error700:"#b91c1c",error800:"#991b1b",background:"#ffffff",surface:"#ffffff",textPrimary:"#111827",textSecondary:"#6b7280",textDisabled:"#d1d5db",white:"#ffffff",black:"#000000"},Moe={primary50:"#0c4a6e",primary100:"#075985",primary200:"#0369a1",primary300:"#0284c7",primary400:"#0ea5e9",primary500:"#38bdf8",primary600:"#7dd3fc",primary700:"#bae6fd",primary800:"#e0f2fe",primary900:"#f0f9ff",gray50:"#111827",gray100:"#1f2937",gray200:"#374151",gray300:"#4b5563",gray400:"#6b7280",gray500:"#9ca3af",gray600:"#d1d5db",gray700:"#e5e7eb",gray800:"#f3f4f6",gray900:"#f9fafb",info50:"#083344",info100:"#164e63",info200:"#155e75",info500:"#06b6d4",info600:"#22d3ee",info700:"#67e8f9",info800:"#a5f3fc",success50:"#052e16",success100:"#14532d",success200:"#166534",success500:"#22c55e",success600:"#4ade80",success700:"#86efac",success800:"#bbf7d0",warning50:"#451a03",warning100:"#78350f",warning200:"#92400e",warning500:"#f59e0b",warning600:"#fbbf24",warning700:"#fcd34d",warning800:"#fde68a",error50:"#450a0a",error100:"#7f1d1d",error200:"#991b1b",error500:"#ef4444",error600:"#f87171",error700:"#fca5a5",error800:"#fecaca",background:"#0f172a",surface:"#1e293b",textPrimary:"#f1f5f9",textSecondary:"#94a3b8",textDisabled:"#475569",white:"#ffffff",black:"#000000"},EU={xs:4,sm:8,md:16,lg:24,xl:32,"2xl":48,"3xl":64},TU={fontFamily:{sans:"System",mono:"Courier"},fontSize:{xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:20,normal:24,relaxed:28}},_d={sm:{shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:2,elevation:1},md:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.1,shadowRadius:6,elevation:3},lg:{shadowColor:"#000000",shadowOffset:{width:0,height:10},shadowOpacity:.1,shadowRadius:15,elevation:6},xl:{shadowColor:"#000000",shadowOffset:{width:0,height:20},shadowOpacity:.1,shadowRadius:25,elevation:10},"2xl":{shadowColor:"#000000",shadowOffset:{width:0,height:25},shadowOpacity:.25,shadowRadius:50,elevation:15}},Aoe={sm:{..._d.sm,shadowOpacity:.3},md:{..._d.md,shadowOpacity:.4},lg:{..._d.lg,shadowOpacity:.4},xl:{..._d.xl,shadowOpacity:.5},"2xl":{..._d["2xl"],shadowOpacity:.6}},zU={instant:0,fast:100,normal:200,slow:300,slower:500},RU={linear:[0,0,1,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],spring:[.175,.885,.32,1.275]},CU={none:0,sm:4,md:8,lg:12,xl:16,"2xl":24,full:9999},joe={light:{colors:Ooe,spacing:EU,typography:TU,shadows:_d,radius:CU,duration:zU,easing:RU},dark:{colors:Moe,spacing:EU,typography:TU,shadows:Aoe,radius:CU,duration:zU,easing:RU}}});var OU,MU,AU,OT,MT=x(()=>{"use strict";OU={color:"#0284c7",width:"2px",offset:"2px",style:"solid"},MU={duration:"0ms",transition:"none"},AU={borderWidth:"2px",textColor:"#000000",backgroundColor:"#ffffff",linkColor:"#0369a1"},OT={focusRing:OU,reducedMotion:MU,highContrast:AU}});var AT,jT=x(()=>{"use strict";sr();sr();AT={level0:{shadow:"none",zIndex:0},level1:{shadow:Wt.sm,zIndex:"auto"},level2:{shadow:Wt.md,zIndex:Pt.dropdown},level3:{shadow:Wt.lg,zIndex:Pt.banner},level4:{shadow:Wt.xl,zIndex:Pt.modal},level5:{shadow:Wt["2xl"],zIndex:Pt.tooltip}}});var NT,DT=x(()=>{"use strict";NT={success:"var(--ggui-color-success-500, #10b981)",error:"var(--ggui-color-error-500, #ef4444)",warning:"var(--ggui-color-warning-500, #f59e0b)",info:"var(--ggui-color-info-500, #06b6d4)",primary:"var(--ggui-color-primary-600, #0284c7)",gray:"var(--ggui-color-neutral-400, #9ca3af)",grayLight:"var(--ggui-color-neutral-200, #e5e7eb)",grayDark:"var(--ggui-color-neutral-600, #4b5563)"}});var jU={};Mt(jU,{THINKING_DEFAULT_STYLE:()=>yT,accessibility:()=>OT,animation:()=>ms,chartColors:()=>NT,colors:()=>E,duration:()=>ae,easing:()=>re,elevation:()=>AT,error:()=>zT,focusRing:()=>OU,fontFamily:()=>ub,fontSize:()=>q,fontSizeValues:()=>I8,fontWeight:()=>ce,gray:()=>Qn,headingStyles:()=>wg,highContrast:()=>AU,info:()=>RT,keyframes:()=>jl,letterSpacing:()=>Fo,lineHeight:()=>Jt,maxWidth:()=>Jn,motionSafe:()=>Nne,nativeTokens:()=>joe,primary:()=>Ag,radius:()=>Qe,reducedMotion:()=>MU,reducedMotionCSS:()=>Tg,semantic:()=>kb,shadow:()=>Wt,spacing:()=>tT,spacingValues:()=>sne,success:()=>ET,thinkingAnimation:()=>Vt,thinkingKeyframes:()=>Zt,thinkingPresets:()=>hT,tokens:()=>Noe,transition:()=>lT,typography:()=>sT,warning:()=>TT,zIndex:()=>Pt});var Noe,NU=x(()=>{"use strict";xt();sr();Ut();xo();IU();MT();jT();DT();md();xt();sr();Ut();xo();MT();jT();DT();md();Noe={colors:E,semantic:kb,spacing:tT,radius:Qe,shadow:Wt,maxWidth:Jn,zIndex:Pt,typography:sT,fontFamily:ub,fontSize:q,fontWeight:ce,lineHeight:Jt,duration:ae,easing:re,transition:lT,accessibility:OT,elevation:AT,chartColors:NT,keyframes:jl,animation:ms,reducedMotionCSS:Tg,thinkingKeyframes:Zt,thinkingAnimation:Vt,thinkingPresets:hT,THINKING_DEFAULT_STYLE:yT}});var ZU={};Mt(ZU,{CachingGadgetCatalog:()=>Loe,InMemoryGadgetCatalog:()=>LU,WrapperConformanceError:()=>PT,createGguiGadget:()=>Doe,defineGadgetPackage:()=>Poe,getPublicEnv:()=>Zoe,useCamera:()=>Xoe,useClipboardPaste:()=>Goe,useClipboardWrite:()=>qoe,useFilePicker:()=>Woe,useGeolocation:()=>Voe,useMicrophone:()=>Yoe,useNotifications:()=>Foe});function Doe(e){let{hookImpl:t,hook:r,description:o,usage:n,example:i,gotchas:a,permission:s,...l}=e,c=[];typeof t!="function"&&c.push({path:["hookImpl"],message:"`hookImpl` MUST be a React hook function"});let u={hook:r,description:o,usage:n,example:i,...a!==void 0?{gotchas:a}:{},...s!==void 0?{permission:s}:{}},p={...l,exports:[u]},f=nf.safeParse(p);if(!f.success)for(let v of f.error.issues)c.push({path:v.path.map(b=>typeof b=="symbol"?b.toString():b),message:v.message});if(!f.success||c.length>0)throw new PT(typeof e.hook=="string"?e.hook:void 0,c);let m=f.data;return Object.assign((v=>t(v)),{descriptor:Object.freeze(m)})}function Poe(e){let{exports:t,...r}=e,o=[];t.length===0&&o.push({path:["exports"],message:"a gadget package MUST declare at least one export"});let n=t.map((a,s)=>{typeof a.impl!="function"&&o.push({path:["exports",s,"impl"],message:"`impl` MUST be a function (a React hook or component)"});let l={description:a.description,usage:a.usage,example:a.example,...a.gotchas!==void 0?{gotchas:a.gotchas}:{},...a.permission!==void 0?{permission:a.permission}:{}};return"hook"in a?{hook:a.hook,...l}:{component:a.component,...l}}),i=nf.safeParse({...r,exports:n});if(!i.success)for(let a of i.error.issues)o.push({path:a.path.map(s=>typeof s=="symbol"?s.toString():s),message:a.message});if(!i.success||o.length>0)throw new PT(e.package,o);return i.data}function Zoe(e,t,r=globalThis){let o=r.__ggui__;if(!o)throw new Error(`getPublicEnv('${e}'): globalThis.__ggui__ is not initialized. This function must be invoked from inside a ggui-rendered component or wrapper hook, after the iframe runtime has booted.`);let n=o.publicEnv??{};if(Object.prototype.hasOwnProperty.call(n,e))return n[e];if(t?.optional)return;let i=Object.keys(n);throw new Error(`getPublicEnv('${e}'): not provided in App.publicEnv. Available: [${i.join(", ")||"(none)"}]. Operators set this on the App record; gadget authors declare the key in 'requires' so the render gate verifies it before mount.`)}function DU(e){let t=e.coords;return{...{latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,timestamp:e.timestamp},...t.altitude!==null&&{altitude:t.altitude},...t.altitudeAccuracy!==null&&{altitudeAccuracy:t.altitudeAccuracy},...t.heading!==null&&{heading:t.heading},...t.speed!==null&&{speed:t.speed}}}function PU(e){return e.code===e.PERMISSION_DENIED?{code:"permission_denied",message:e.message}:e.code===e.TIMEOUT?{code:"timeout",message:e.message}:{code:"unknown",message:e.message}}function Hoe(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}function Boe(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}function Koe(e){return{name:e.name,size:e.size,type:e.type,_file:e}}function Joe(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:e.name==="NotFoundError"||e.name==="OverconstrainedError"?{code:"not_supported",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}function UU(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:e.name==="NotFoundError"||e.name==="OverconstrainedError"?{code:"not_supported",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}var qi,Sd,kd,wd,Ed,ro,Bi,PT,LU,Uoe,Loe,Voe,qoe,Goe,Foe,Woe,Yoe,Xoe,VU=x(()=>{"use strict";Ao();Ao();qi=O(te(),1),Sd=O(te(),1),kd=O(te(),1),wd=O(te(),1),Ed=O(te(),1),ro=O(te(),1),Bi=O(te(),1),PT=class extends Error{code="wrapper_conformance";violations;constructor(e,t){let r=e?` (${e})`:"",o=t.map(n=>` - ${n.path.join(".")||"<root>"}: ${n.message}`).join(`
153
+ `}return Fe.substring(0,Fe.length-1)},u.renderTo2dContext=function(S,T){T=T||2;let z=u.getModuleCount();for(let R=0;R<z;R++)for(let M=0;M<z;M++)S.fillStyle=u.isDark(R,M)?"black":"white",S.fillRect(M*T,R*T,T,T)},u};gd.stringToBytes=function(e){let t=[];for(let r=0;r<e.length;r+=1){let o=e.charCodeAt(r);t.push(o&255)}return t};gd.createStringToBytes=function(e,t){let r=(function(){let n=ioe(e),i=function(){let l=n.read();if(l==-1)throw"eof";return l},a=0,s={};for(;;){let l=n.read();if(l==-1)break;let c=i(),u=i(),p=i(),f=String.fromCharCode(l<<8|c),m=u<<8|p;s[f]=m,a+=1}if(a!=t)throw a+" != "+t;return s})(),o=63;return function(n){let i=[];for(let a=0;a<n.length;a+=1){let s=n.charCodeAt(a);if(s<128)i.push(s);else{let l=r[n.charAt(a)];typeof l=="number"?(l&255)==l?i.push(l):(i.push(l>>>8),i.push(l&255)):i.push(o)}}return i}};Or={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Cg={L:1,M:0,Q:3,H:2},gs={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},hs=(function(){let e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],t=1335,r=7973,o=21522,n={},i=function(a){let s=0;for(;a!=0;)s+=1,a>>>=1;return s};return n.getBCHTypeInfo=function(a){let s=a<<10;for(;i(s)-i(t)>=0;)s^=t<<i(s)-i(t);return(a<<10|s)^o},n.getBCHTypeNumber=function(a){let s=a<<12;for(;i(s)-i(r)>=0;)s^=r<<i(s)-i(r);return a<<12|s},n.getPatternPosition=function(a){return e[a-1]},n.getMaskFunction=function(a){switch(a){case gs.PATTERN000:return function(s,l){return(s+l)%2==0};case gs.PATTERN001:return function(s,l){return s%2==0};case gs.PATTERN010:return function(s,l){return l%3==0};case gs.PATTERN011:return function(s,l){return(s+l)%3==0};case gs.PATTERN100:return function(s,l){return(Math.floor(s/2)+Math.floor(l/3))%2==0};case gs.PATTERN101:return function(s,l){return s*l%2+s*l%3==0};case gs.PATTERN110:return function(s,l){return(s*l%2+s*l%3)%2==0};case gs.PATTERN111:return function(s,l){return(s*l%3+(s+l)%2)%2==0};default:throw"bad maskPattern:"+a}},n.getErrorCorrectPolynomial=function(a){let s=Ig([1],0);for(let l=0;l<a;l+=1)s=s.multiply(Ig([1,ys.gexp(l)],0));return s},n.getLengthInBits=function(a,s){if(1<=s&&s<10)switch(a){case Or.MODE_NUMBER:return 10;case Or.MODE_ALPHA_NUM:return 9;case Or.MODE_8BIT_BYTE:return 8;case Or.MODE_KANJI:return 8;default:throw"mode:"+a}else if(s<27)switch(a){case Or.MODE_NUMBER:return 12;case Or.MODE_ALPHA_NUM:return 11;case Or.MODE_8BIT_BYTE:return 16;case Or.MODE_KANJI:return 10;default:throw"mode:"+a}else if(s<41)switch(a){case Or.MODE_NUMBER:return 14;case Or.MODE_ALPHA_NUM:return 13;case Or.MODE_8BIT_BYTE:return 16;case Or.MODE_KANJI:return 12;default:throw"mode:"+a}else throw"type:"+s},n.getLostPoint=function(a){let s=a.getModuleCount(),l=0;for(let p=0;p<s;p+=1)for(let f=0;f<s;f+=1){let m=0,g=a.isDark(p,f);for(let v=-1;v<=1;v+=1)if(!(p+v<0||s<=p+v))for(let b=-1;b<=1;b+=1)f+b<0||s<=f+b||v==0&&b==0||g==a.isDark(p+v,f+b)&&(m+=1);m>5&&(l+=3+m-5)}for(let p=0;p<s-1;p+=1)for(let f=0;f<s-1;f+=1){let m=0;a.isDark(p,f)&&(m+=1),a.isDark(p+1,f)&&(m+=1),a.isDark(p,f+1)&&(m+=1),a.isDark(p+1,f+1)&&(m+=1),(m==0||m==4)&&(l+=3)}for(let p=0;p<s;p+=1)for(let f=0;f<s-6;f+=1)a.isDark(p,f)&&!a.isDark(p,f+1)&&a.isDark(p,f+2)&&a.isDark(p,f+3)&&a.isDark(p,f+4)&&!a.isDark(p,f+5)&&a.isDark(p,f+6)&&(l+=40);for(let p=0;p<s;p+=1)for(let f=0;f<s-6;f+=1)a.isDark(f,p)&&!a.isDark(f+1,p)&&a.isDark(f+2,p)&&a.isDark(f+3,p)&&a.isDark(f+4,p)&&!a.isDark(f+5,p)&&a.isDark(f+6,p)&&(l+=40);let c=0;for(let p=0;p<s;p+=1)for(let f=0;f<s;f+=1)a.isDark(f,p)&&(c+=1);let u=Math.abs(100*c/s/s-50)/5;return l+=u*10,l},n})(),ys=(function(){let e=new Array(256),t=new Array(256);for(let o=0;o<8;o+=1)e[o]=1<<o;for(let o=8;o<256;o+=1)e[o]=e[o-4]^e[o-5]^e[o-6]^e[o-8];for(let o=0;o<255;o+=1)t[e[o]]=o;let r={};return r.glog=function(o){if(o<1)throw"glog("+o+")";return t[o]},r.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return e[o]},r})(),Ig=function(e,t){if(typeof e.length>"u")throw e.length+"/"+t;let r=(function(){let n=0;for(;n<e.length&&e[n]==0;)n+=1;let i=new Array(e.length-n+t);for(let a=0;a<e.length-n;a+=1)i[a]=e[a+n];return i})(),o={};return o.getAt=function(n){return r[n]},o.getLength=function(){return r.length},o.multiply=function(n){let i=new Array(o.getLength()+n.getLength()-1);for(let a=0;a<o.getLength();a+=1)for(let s=0;s<n.getLength();s+=1)i[a+s]^=ys.gexp(ys.glog(o.getAt(a))+ys.glog(n.getAt(s)));return Ig(i,0)},o.mod=function(n){if(o.getLength()-n.getLength()<0)return o;let i=ys.glog(o.getAt(0))-ys.glog(n.getAt(0)),a=new Array(o.getLength());for(let s=0;s<o.getLength();s+=1)a[s]=o.getAt(s);for(let s=0;s<n.getLength();s+=1)a[s]^=ys.gexp(ys.glog(n.getAt(s))+i);return Ig(a,0).mod(n)},o},U9=(function(){let e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(n,i){let a={};return a.totalCount=n,a.dataCount=i,a},r={},o=function(n,i){switch(i){case Cg.L:return e[(n-1)*4+0];case Cg.M:return e[(n-1)*4+1];case Cg.Q:return e[(n-1)*4+2];case Cg.H:return e[(n-1)*4+3];default:return}};return r.getRSBlocks=function(n,i){let a=o(n,i);if(typeof a>"u")throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;let s=a.length/3,l=[];for(let c=0;c<s;c+=1){let u=a[c*3+0],p=a[c*3+1],f=a[c*3+2];for(let m=0;m<u;m+=1)l.push(t(p,f))}return l},r})(),L9=function(){let e=[],t=0,r={};return r.getBuffer=function(){return e},r.getAt=function(o){let n=Math.floor(o/8);return(e[n]>>>7-o%8&1)==1},r.put=function(o,n){for(let i=0;i<n;i+=1)r.putBit((o>>>n-i-1&1)==1)},r.getLengthInBits=function(){return t},r.putBit=function(o){let n=Math.floor(t/8);e.length<=n&&e.push(0),o&&(e[n]|=128>>>t%8),t+=1},r},eoe=function(e){let t=Or.MODE_NUMBER,r=e,o={};o.getMode=function(){return t},o.getLength=function(a){return r.length},o.write=function(a){let s=r,l=0;for(;l+2<s.length;)a.put(n(s.substring(l,l+3)),10),l+=3;l<s.length&&(s.length-l==1?a.put(n(s.substring(l,l+1)),4):s.length-l==2&&a.put(n(s.substring(l,l+2)),7))};let n=function(a){let s=0;for(let l=0;l<a.length;l+=1)s=s*10+i(a.charAt(l));return s},i=function(a){if("0"<=a&&a<="9")return a.charCodeAt(0)-48;throw"illegal char :"+a};return o},toe=function(e){let t=Or.MODE_ALPHA_NUM,r=e,o={};o.getMode=function(){return t},o.getLength=function(i){return r.length},o.write=function(i){let a=r,s=0;for(;s+1<a.length;)i.put(n(a.charAt(s))*45+n(a.charAt(s+1)),11),s+=2;s<a.length&&i.put(n(a.charAt(s)),6)};let n=function(i){if("0"<=i&&i<="9")return i.charCodeAt(0)-48;if("A"<=i&&i<="Z")return i.charCodeAt(0)-65+10;switch(i){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+i}};return o},roe=function(e){let t=Or.MODE_8BIT_BYTE,r=e,o=gd.stringToBytes(e),n={};return n.getMode=function(){return t},n.getLength=function(i){return o.length},n.write=function(i){for(let a=0;a<o.length;a+=1)i.put(o[a],8)},n},noe=function(e){let t=Or.MODE_KANJI,r=e,o=gd.stringToBytes;(function(a,s){let l=o(a);if(l.length!=2||(l[0]<<8|l[1])!=s)throw"sjis not supported."})("\u53CB",38726);let n=o(e),i={};return i.getMode=function(){return t},i.getLength=function(a){return~~(n.length/2)},i.write=function(a){let s=n,l=0;for(;l+1<s.length;){let c=(255&s[l])<<8|255&s[l+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(l+1)+"/"+c;c=(c>>>8&255)*192+(c&255),a.put(c,13),l+=2}if(l<s.length)throw"illegal char at "+(l+1)},i},Z9=function(){let e=[],t={};return t.writeByte=function(r){e.push(r&255)},t.writeShort=function(r){t.writeByte(r),t.writeByte(r>>>8)},t.writeBytes=function(r,o,n){o=o||0,n=n||r.length;for(let i=0;i<n;i+=1)t.writeByte(r[i+o])},t.writeString=function(r){for(let o=0;o<r.length;o+=1)t.writeByte(r.charCodeAt(o))},t.toByteArray=function(){return e},t.toString=function(){let r="";r+="[";for(let o=0;o<e.length;o+=1)o>0&&(r+=","),r+=e[o];return r+="]",r},t},ooe=function(){let e=0,t=0,r=0,o="",n={},i=function(s){o+=String.fromCharCode(a(s&63))},a=function(s){if(s<0)throw"n:"+s;if(s<26)return 65+s;if(s<52)return 97+(s-26);if(s<62)return 48+(s-52);if(s==62)return 43;if(s==63)return 47;throw"n:"+s};return n.writeByte=function(s){for(e=e<<8|s&255,t+=8,r+=1;t>=6;)i(e>>>t-6),t-=6},n.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),r%3!=0){let s=3-r%3;for(let l=0;l<s;l+=1)o+="="}},n.toString=function(){return o},n},ioe=function(e){let t=e,r=0,o=0,n=0,i={};i.read=function(){for(;n<8;){if(r>=t.length){if(n==0)return-1;throw"unexpected end of file./"+n}let l=t.charAt(r);if(r+=1,l=="=")return n=0,-1;if(l.match(/^\s$/))continue;o=o<<6|a(l.charCodeAt(0)),n+=6}let s=o>>>n-8&255;return n-=8,s};let a=function(s){if(65<=s&&s<=90)return s-65;if(97<=s&&s<=122)return s-97+26;if(48<=s&&s<=57)return s-48+52;if(s==43)return 62;if(s==47)return 63;throw"c:"+s};return i},aoe=function(e,t){let r=e,o=t,n=new Array(e*t),i={};i.setPixel=function(c,u,p){n[u*r+c]=p},i.write=function(c){c.writeString("GIF87a"),c.writeShort(r),c.writeShort(o),c.writeByte(128),c.writeByte(0),c.writeByte(0),c.writeByte(0),c.writeByte(0),c.writeByte(0),c.writeByte(255),c.writeByte(255),c.writeByte(255),c.writeString(","),c.writeShort(0),c.writeShort(0),c.writeShort(r),c.writeShort(o),c.writeByte(0);let u=2,p=s(u);c.writeByte(u);let f=0;for(;p.length-f>255;)c.writeByte(255),c.writeBytes(p,f,255),f+=255;c.writeByte(p.length-f),c.writeBytes(p,f,p.length-f),c.writeByte(0),c.writeString(";")};let a=function(c){let u=c,p=0,f=0,m={};return m.write=function(g,v){if(g>>>v)throw"length over";for(;p+v>=8;)u.writeByte(255&(g<<p|f)),v-=8-p,g>>>=8-p,f=0,p=0;f=g<<p|f,p=p+v},m.flush=function(){p>0&&u.writeByte(f)},m},s=function(c){let u=1<<c,p=(1<<c)+1,f=c+1,m=l();for(let h=0;h<u;h+=1)m.add(String.fromCharCode(h));m.add(String.fromCharCode(u)),m.add(String.fromCharCode(p));let g=Z9(),v=a(g);v.write(u,f);let b=0,y=String.fromCharCode(n[b]);for(b+=1;b<n.length;){let h=String.fromCharCode(n[b]);b+=1,m.contains(y+h)?y=y+h:(v.write(m.indexOf(y),f),m.size()<4095&&(m.size()==1<<f&&(f+=1),m.add(y+h)),y=h)}return v.write(m.indexOf(y),f),v.write(p,f),v.flush(),g.toByteArray()},l=function(){let c={},u=0,p={};return p.add=function(f){if(p.contains(f))throw"dup key:"+f;c[f]=u,u+=1},p.size=function(){return u},p.indexOf=function(f){return c[f]},p.contains=function(f){return typeof c[f]<"u"},p};return i},soe=function(e,t,r){let o=aoe(e,t);for(let s=0;s<t;s+=1)for(let l=0;l<e;l+=1)o.setPixel(l,s,r(l,s));let n=Z9();o.write(n);let i=ooe(),a=n.toByteArray();for(let s=0;s<a.length;s+=1)i.writeByte(a[s]);return i.flush(),"data:image/gif;base64,"+i},V9=gd,m2e=gd.stringToBytes});function B9({value:e,size:t=128,errorCorrection:r="M",foreground:o="var(--ggui-color-onSurface, #18181b)",background:n="var(--ggui-color-surface, #ffffff)",ariaLabel:i}){let a=q9.useMemo(()=>{try{let l=V9(0,r);l.addData(e),l.make();let c=l.getModuleCount(),u=[];for(let p=0;p<c;p+=1){let f=[];for(let m=0;m<c;m+=1)f.push(l.isDark(p,m));u.push(f)}return u}catch{return null}},[e,r]);if(a===null)return null;let s=a.length;return(0,Og.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${s} ${s}`,width:t,height:t,role:"img","aria-label":i??`QR code for ${e}`,shapeRendering:"crispEdges",style:{display:"block",flexShrink:0},children:[(0,Og.jsx)("rect",{width:s,height:s,fill:n}),a.flatMap((l,c)=>l.map((u,p)=>u?(0,Og.jsx)("rect",{x:p,y:c,width:1,height:1,fill:o},`${p}-${c}`):null))]})}var q9,Og,G9=x(()=>{"use strict";q9=O(te(),1);H9();Og=O(W(),1)});function coe(){let e="var(--ggui-color-onSurface, #292929)",t="var(--ggui-color-neutral-300, #d1d5db)";return(0,Ue.jsxs)("svg",{viewBox:"0 0 224 50",width:"72",height:"16",role:"img","aria-label":"ggui",style:{display:"block",flexShrink:0},children:[(0,Ue.jsx)("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:t}),(0,Ue.jsx)("rect",{x:"33",y:"33",width:"17",height:"17",fill:e}),(0,Ue.jsx)("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:e}),(0,Ue.jsx)("rect",{x:"91",y:"33",width:"17",height:"17",fill:t}),(0,Ue.jsx)("path",{d:"M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z",fill:e}),(0,Ue.jsx)("rect",{x:"174",y:"0",width:"50",height:"50",fill:t})]})}function ST({settingsUrl:e,intent:t}){let[r,o]=_b.useState("idle"),n=_b.useCallback(()=>{typeof console<"u"&&console.log("[ggui:no-creds-card] click \u2192 settingsUrl =",e),o("working"),D9(e).then(s=>{typeof console<"u"&&console.log("[ggui:no-creds-card] requestOpenUrl resolved \u2192",s);let l=s.outcome==="opened"?"opened":s.outcome==="copied"?"copied":"manual";o(l),typeof window<"u"&&window.setTimeout(()=>o("idle"),uoe)})},[e]);return(0,Ue.jsx)(Oi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,Ue.jsxs)(Et,{gap:"lg",children:[(0,Ue.jsxs)(Et,{gap:"md",children:[(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,Ue.jsx)(coe,{}),(0,Ue.jsx)(Wo,{variant:"info",children:"Setup needed"})]}),(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ue.jsx)(bn,{level:3,children:"Connect an LLM provider"}),(0,Ue.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:"var(--ggui-color-onSurfaceVariant, #71717a)",opacity:.7,userSelect:"all"},title:"iframe-runtime build identifier \u2014 useful for diagnosing stale caches",children:loe})]}),(0,Ue.jsx)(ct,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:"ggui needs an LLM key to render UIs. Open this server\u2019s settings page to paste an Anthropic, OpenAI, Google, or OpenRouter API key."})]}),(0,Ue.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-3, 12px)",padding:"var(--ggui-spacing-4, 16px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:(0,Ue.jsxs)("div",{style:{display:"flex",gap:"var(--ggui-spacing-4, 16px)",alignItems:"flex-start",flexWrap:"wrap"},children:[(0,Ue.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)"},children:[(0,Ue.jsx)("div",{style:{padding:"var(--ggui-spacing-2, 8px)",background:"#ffffff",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:0},children:(0,Ue.jsx)(B9,{value:e,size:120,foreground:"#000000",background:"#ffffff"})}),(0,Ue.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)",textAlign:"center"},children:"Scan with your phone"})]}),(0,Ue.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",flex:"1 1 240px",minWidth:"200px"},children:[(0,Ue.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:"var(--ggui-font-weight-semibold, 600)",textTransform:"uppercase",letterSpacing:"0.06em",fontSize:"var(--ggui-font-size-xs, 11px)"},children:"Or open this URL in your browser"}),(0,Ue.jsx)("div",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",wordBreak:"break-all",userSelect:"all",padding:"var(--ggui-spacing-3, 12px)",background:"var(--ggui-color-surface, #fff)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:"1.45"},children:e}),(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ue.jsx)(et,{variant:"primary",size:"md",onClick:n,disabled:r==="working",children:r==="working"?"Opening\u2026":r==="opened"?"Opened in browser \u2713":r==="copied"?"URL copied \u2014 paste in your browser":r==="manual"?"Tap the URL above to copy":"Open settings"}),r==="idle"||r==="working"?(0,Ue.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.85},children:"or tap-and-hold the URL above to copy"}):null]})]})]})}),t?(0,Ue.jsxs)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Pending prompt: ",t]}):null]})})}var _b,Ue,loe,uoe,F9=x(()=>{"use strict";_b=O(te(),1);zg();P9();G9();Ue=O(W(),1),loe="0.5.0-rc.1+676503b2";uoe=4e3});function poe(){let e=xn.useRef(1e4),t=xn.useRef(new Map);return xn.useEffect(()=>{let r=o=>{let n=o.data;if(n===null||typeof n!="object")return;let i=n.id;if(typeof i!="number")return;let a=t.current.get(i);a!==void 0&&(t.current.delete(i),a(n))};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[]),xn.useCallback((r,o)=>new Promise(n=>{let i=e.current;e.current+=1,t.current.set(i,n);try{window.parent.postMessage({jsonrpc:"2.0",id:i,method:r,params:o??{}},"*")}catch(a){t.current.delete(i),n({error:{code:-32099,message:a instanceof Error?a.message:String(a)}})}window.setTimeout(()=>{t.current.delete(i)&&n({error:{code:-32001,message:"TIMEOUT"}})},doe)}),[])}function foe(){let[e,t]=xn.useState([]),r=xn.useRef(0);return xn.useEffect(()=>{let o=n=>{let i=n.data;if(i===null||typeof i!="object")return;let a=i;if(a.jsonrpc!=="2.0"||typeof a.method!="string"||typeof a.id=="number"&&a.id>=1e4&&(a.method==="ui/message"||a.method==="ui/update-model-context"||a.method==="ui/open-link"||a.method==="ui/request-display-mode"||a.method==="tools/call"))return;r.current+=1;let l={id:r.current,tsIso:new Date().toISOString(),method:a.method,params:a.params};t(c=>[l,...c].slice(0,50))};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),e}function moe(e){switch(e){case"ui/message":return{role:"user",content:[{type:"text",text:"[ggui:probe] hello from the protocol probe card"}]};case"ui/update-model-context":return{content:[{type:"text",text:"[ggui:probe] this user prefers concise replies"}]};case"ui/open-link":return{url:"https://ggui.ai"};case"ui/request-display-mode":return{mode:"fullscreen"};case"tools/call":return{name:"ggui_runtime_submit_action",arguments:{kind:"dispatch",payload:{intent:"probe-click",data:{note:"hello from the protocol probe"}},sessionId:"probe-render",appId:"probe-app",actionId:"00000000",firedAt:new Date().toISOString()}}}}function goe(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function hoe(e){if(e==null||typeof e!="object"||Array.isArray(e))return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,n])=>{if(n===null)return`${o}: null`;if(typeof n=="string")return`${o}: ${n}`;if(typeof n=="number"||typeof n=="boolean")return`${o}: ${n}`;let i=JSON.stringify(n);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function Mg({method:e,description:t,call:r}){let[o,n]=xn.useState({state:"idle"}),i=xn.useCallback(()=>{let l=Date.now();n({state:"pending",startedAtMs:l});let c=moe(e);r(e,c).then(u=>{if(u.error){n({state:"error",code:u.error.code??"?",message:u.error.message??"(no message)"});return}if(n({state:"success",result:u.result??{}}),e==="tools/call"){let f=(c.arguments??{}).payload??{},m=String(f.intent??"?"),g=f.data,v=hoe(g),b=v===""?"":` (${v})`,y=new Date().toISOString(),h=goe(`${m}|${JSON.stringify(g??null)}|${y}`);r("ui/update-model-context",{content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:h,intent:m,data:g??null,firedAt:y})}`}]}),r("ui/message",{role:"user",content:[{type:"text",text:`Please proceed with **${m}**${b}. [id: \`${h}\`]`}]})}})},[r,e]),a=o.state==="pending"?"Sending\u2026":o.state==="success"?"Send again \u2713":o.state==="error"?"Retry":"Send",s=o.state==="idle"?(0,ve.jsx)(Wo,{variant:"default",children:"idle"}):o.state==="pending"?(0,ve.jsx)(Wo,{variant:"info",children:"pending"}):o.state==="success"?(0,ve.jsx)(Wo,{variant:"success",children:"success"}):(0,ve.jsx)(Wo,{variant:"warning",children:"error"});return(0,ve.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",padding:"var(--ggui-spacing-3, 12px)",borderRadius:"var(--ggui-shape-radius-md, 10px)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",background:"var(--ggui-color-surface, #fff)"},children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),s]}),(0,ve.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:t}),(0,ve.jsx)("div",{style:{display:"flex",gap:"var(--ggui-spacing-2, 8px)"},children:(0,ve.jsx)(et,{variant:"primary",size:"sm",onClick:i,disabled:o.state==="pending",children:a})}),o.state==="success"||o.state==="error"?(0,ve.jsx)("pre",{style:{margin:0,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:o.state==="error"?"var(--ggui-color-warning, #b45309)":"var(--ggui-color-onSurfaceVariant, #52525b)",background:"var(--ggui-color-neutral-100, #f4f4f5)",padding:"var(--ggui-spacing-2, 8px)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",overflow:"auto",maxHeight:"120px",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o.state==="error"?`${o.code}: ${o.message}`:JSON.stringify(o.result,null,2)}):null]})}function kT({intent:e}){let t=poe(),r=foe();return(0,ve.jsx)(Oi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,ve.jsxs)(Et,{gap:"lg",children:[(0,ve.jsxs)(Et,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)(bn,{level:3,children:"MCP Apps protocol probe"}),(0,ve.jsx)(Wo,{variant:"info",children:"diagnostic"})]}),(0,ve.jsxs)(ct,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:["One button per primary host effect emitted by the iframe runtime's gesture surfaces (submit-action bridge / native- idiom interceptors). Click each to verify which methods this host honors. The",(0,ve.jsx)("code",{children:"tools/call"})," row chains the full submit-action bridge (audit + context + consent), reproducing the production ",(0,ve.jsx)("code",{children:"dispatchSubmitAction"})," envelope shape verbatim. The receive log below captures every notification the host emits while this card is mounted."]})]}),(0,ve.jsxs)(Et,{gap:"md",children:[(0,ve.jsx)(Mg,{method:"ui/message",description:"Submit-action bridge step 3 \u2014 consent-gated user authorization. Host pre-fills + waits for user confirm before the LLM acts on the paired pending-action context.",call:t}),(0,ve.jsx)(Mg,{method:"ui/update-model-context",description:"Submit-action bridge step 2 \u2014 silent structured `[ggui:pending-action]` context drop. LLM honors on next turn. No immediate UI.",call:t}),(0,ve.jsx)(Mg,{method:"ui/open-link",description:"Native-idiom anchor click interceptor primary effect. Opens ggui.ai in the host's browser / new tab. Real iframe code triggers via `<a href target='_blank'>` or cross-origin href.",call:t}),(0,ve.jsx)(Mg,{method:"ui/request-display-mode",description:"Native-idiom fullscreen interceptor primary effect. Request fullscreen \u2014 real iframe code calls `el.requestFullscreen()`; the runtime overrides the prototype to route through here.",call:t}),(0,ve.jsx)(Mg,{method:"tools/call",description:"Full submit-action bridge: `tools/call ggui_runtime_submit_action` (audit, kind:'dispatch') + `ui/update-model-context` + `ui/message`. Spec \xA7401 requires `_meta.ui.visibility:['app']` on the receiving tool.",call:t})]}),(0,ve.jsxs)(Et,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,ve.jsx)(bn,{level:4,children:"Receive log"}),(0,ve.jsxs)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[r.length," ",r.length===1?"event":"events"]})]}),r.length===0?(0,ve.jsx)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontStyle:"italic"},children:"No host notifications observed yet. Click a probe button or wait for the host to emit one."}):(0,ve.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",maxHeight:"320px",overflow:"auto",padding:"var(--ggui-spacing-2, 8px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:r.map(o=>(0,ve.jsxs)("details",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[(0,ve.jsxs)("summary",{style:{cursor:"pointer",padding:"var(--ggui-spacing-1, 4px) 0",color:"var(--ggui-color-onSurface, #111)"},children:[(0,ve.jsx)("span",{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginRight:"8px"},children:o.tsIso.slice(11,19)}),(0,ve.jsx)("span",{style:{fontWeight:600},children:o.method})]}),(0,ve.jsx)("pre",{style:{margin:"4px 0 0 16px",whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:JSON.stringify(o.params,null,2)})]},o.id))})]}),e?(0,ve.jsxs)(ct,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Triggered by: ",e]}):null]})})}var xn,ve,doe,K9=x(()=>{"use strict";xn=O(te(),1);zg();ve=O(W(),1),doe=5e3});function W9(){if(typeof window>"u")return!1;try{let e=window.location?.hostname??"";if(e.endsWith("claudemcpcontent.com")||/(^|\.)claude\.ai$/i.test(e)||/claude/i.test(e))return!0;let t=typeof document<"u"?document.referrer:"";if(/claude\.ai/i.test(t))return!0;let r=typeof navigator<"u"?navigator.userAgent:"";if(/Claude/.test(r))return!0}catch{}return!1}function J9(){let e=hd.useCallback(()=>typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),[t,r]=hd.useState(e);return hd.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),n=a=>{r(a.matches?"dark":"light")};if(typeof o.addEventListener=="function")return o.addEventListener("change",n),()=>{o.removeEventListener("change",n)};let i=o;return i.addListener(n),()=>{i.removeListener(n)}},[]),t}var hd,Y9=x(()=>{"use strict";hd=O(te(),1)});var t7={};Mt(t7,{NoCredentialsCard:()=>ST,ProtocolProbeCard:()=>kT,SYSTEM_CARD_REGISTRY:()=>Q9,SystemCardHost:()=>voe,renderSystemCard:()=>e7});function X9(e,t){return function(o){let n=e,i=t(o);return vs.createElement(n,i)}}function yoe({kind:e,props:t}){return vs.createElement("div",{style:{padding:"16px",border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)",fontFamily:"var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, sans-serif)",background:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"}},vs.createElement("div",{style:{fontWeight:600,marginBottom:8}},`Unknown system card: ${e}`),vs.createElement("div",{style:{fontSize:12,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, monospace)",opacity:.7,wordBreak:"break-all"}},JSON.stringify(t)))}function e7(e,t){let r=Q9[e];return r?vs.createElement(r,t):vs.createElement(yoe,{kind:e,props:t})}function voe({kind:e,props:t,themeId:r}){let o=W9(),n=J9();return vs.createElement(BE,{theme:n==="dark"?qE:$g,mode:n,transparent:o,children:e7(e,t)})}var vs,Q9,r7=x(()=>{"use strict";vs=O(te(),1);GE();F9();K9();Y9();Q9={"no-credentials":X9(ST,e=>{let t=typeof e.settingsUrl=="string"?e.settingsUrl:"",r=typeof e.intent=="string"?e.intent:void 0;return{settingsUrl:t,...r!==void 0?{intent:r}:{}}}),"mcp-apps-probe":X9(kT,e=>{let t=typeof e.intent=="string"?e.intent:void 0;return{...t!==void 0?{intent:t}:{}}})}});var Ag,Qn,ET,TT,zT,RT,kb,E,xt=x(()=>{"use strict";Ag={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},Qn={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},ET={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},TT={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},zT={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},RT={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},kb={textPrimary:Qn[900],textSecondary:Qn[600],textMuted:Qn[400],textInverse:"#ffffff",bgPrimary:"#ffffff",bgSecondary:Qn[50],bgTertiary:Qn[100],bgInverse:Qn[900],borderLight:Qn[200],borderDefault:Qn[300],borderDark:Qn[400],focus:Ag[500],hover:Ag[50],active:Ag[100],disabled:Qn[300],success:ET[500],warning:TT[500],error:zT[500],info:RT[500]},E={primary:Ag,gray:Qn,success:ET,warning:TT,error:zT,info:RT,semantic:kb,white:"#ffffff",black:"#000000",transparent:"transparent"}});function f7({value:e,onChange:t,onSearch:r,placeholder:o="Search...",showButton:n=!1,buttonText:i="Search",loading:a,disabled:s,size:l="md",style:c,className:u}){let[p,f]=(0,p7.useState)(""),m=e!==void 0?e:p,g=h=>{e===void 0&&f(h),t?.(h)},v=()=>{r?.(m)},b=h=>{h.key==="Enter"&&!s&&v()},y={sm:"sm",md:"md",lg:"md"};return(0,Li.jsxs)("div",{className:u,style:{display:"flex",gap:"8px",alignItems:"flex-end",...c},children:[(0,Li.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,Li.jsx)("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:E.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:a?(0,Li.jsx)(Lt,{size:16}):(0,Li.jsx)(Re,{name:"search",size:16})}),(0,Li.jsx)("input",{type:"search",value:m,onChange:h=>g(h.target.value),onKeyDown:b,placeholder:o,disabled:s||a,style:{width:"100%",padding:l==="sm"?"6px 10px 6px 36px":l==="lg"?"12px 14px 12px 40px":"10px 12px 10px 38px",paddingLeft:"36px",fontSize:l==="lg"?"16px":"14px",borderRadius:"6px",border:`1px solid ${E.gray[300]}`,backgroundColor:s?E.gray[50]:E.white,color:E.gray[900],outline:"none",boxSizing:"border-box"}})]}),n&&(0,Li.jsx)(et,{onClick:v,disabled:s||a,size:y[l],loading:a,children:i})]})}var Li,p7,m7=x(()=>{"use strict";Li=O(W(),1),p7=O(te(),1);Mi();Ko();an();xt()});function g7({label:e,children:t,error:r,helperText:o,required:n,description:i,style:a,className:s}){let l=!!r;return(0,Nl.jsxs)("div",{className:s,style:{display:"flex",flexDirection:"column",gap:"4px",...a},children:[(0,Nl.jsxs)("label",{style:{fontSize:q.sm,fontWeight:ce.medium,color:E.gray[700]},children:[e,n&&(0,Nl.jsx)("span",{style:{color:E.error[500],marginLeft:"2px"},children:"*"})]}),i&&(0,Nl.jsx)("span",{style:{fontSize:q.xs,color:E.gray[500],marginBottom:"4px"},children:i}),t,(r||o)&&(0,Nl.jsx)("span",{style:{fontSize:q.xs,color:l?E.error[500]:E.gray[500]},children:r||o})]})}var Nl,h7=x(()=>{"use strict";Nl=O(W(),1);xt();Ut()});function wb({label:e,icon:t,rightElement:r,onClick:o,disabled:n,active:i,danger:a,style:s,className:l}){let c=a?E.error[600]:E.gray[700],u=a?E.error[50]:E.gray[100],p=a?E.error[100]:E.primary[50];return(0,yd.jsxs)("button",{onClick:n?void 0:o,disabled:n,className:l,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:Qe.md,backgroundColor:i?p:"transparent",color:n?E.gray[400]:c,fontSize:q.sm,fontWeight:i?ce.medium:ce.normal,textAlign:"left",cursor:n?"not-allowed":"pointer",transition:"background-color 0.15s",...s},onMouseEnter:f=>{!n&&!i&&(f.target.style.backgroundColor=u)},onMouseLeave:f=>{!n&&!i&&(f.target.style.backgroundColor="transparent")},children:[t&&(0,yd.jsx)("span",{style:{display:"flex",flexShrink:0},children:t}),(0,yd.jsx)("span",{style:{flex:1},children:e}),r&&(0,yd.jsx)("span",{style:{display:"flex",flexShrink:0,color:E.gray[400]},children:r})]})}var yd,CT=x(()=>{"use strict";yd=O(W(),1);xt();sr();Ut()});function y7({children:e,variant:t="default",size:r="md",closable:o,onClose:n,icon:i,style:a,className:s}){let l=koe[r];return(0,Dl.jsxs)("span",{className:s,style:{display:"inline-flex",alignItems:"center",gap:l.gap,padding:l.padding,fontSize:l.fontSize,fontWeight:ce.medium,borderRadius:"6px",...Soe[t],...a},children:[i&&(0,Dl.jsx)("span",{style:{display:"flex"},children:i}),e,o&&(0,Dl.jsx)("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",color:"inherit",cursor:"pointer",opacity:.7,marginLeft:"2px"},"aria-label":"Remove",children:(0,Dl.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:(0,Dl.jsx)("path",{d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z"})})})]})}var Dl,Soe,koe,v7=x(()=>{"use strict";Dl=O(W(),1);xt();Ut();Soe={default:{backgroundColor:E.gray[100],color:E.gray[700],border:`1px solid ${E.gray[200]}`},primary:{backgroundColor:E.primary[50],color:E.primary[700],border:`1px solid ${E.primary[200]}`},success:{backgroundColor:E.success[50],color:E.success[700],border:`1px solid ${E.success[200]}`},warning:{backgroundColor:E.warning[50],color:E.warning[700],border:`1px solid ${E.warning[200]}`},error:{backgroundColor:E.error[50],color:E.error[700],border:`1px solid ${E.error[200]}`},info:{backgroundColor:E.info[50],color:E.info[700],border:`1px solid ${E.info[200]}`}},koe={sm:{padding:"2px 6px",fontSize:q.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:q.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:q.sm,gap:"6px"}}});function $7({trigger:e,options:t,value:r,onChange:o,placement:n="bottom-start",disabled:i,style:a,className:s}){let[l,c]=(0,Pl.useState)(!1),u=(0,Pl.useRef)(null);(0,Pl.useEffect)(()=>{let m=g=>{u.current&&!u.current.contains(g.target)&&c(!1)};if(l)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[l]),(0,Pl.useEffect)(()=>{let m=g=>{g.key==="Escape"&&c(!1)};if(l)return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]);let p=m=>{o?.(m),c(!1)},f=()=>{switch(n){case"bottom-start":return{top:"100%",left:0,marginTop:"4px"};case"bottom-end":return{top:"100%",right:0,marginTop:"4px"};case"top-start":return{bottom:"100%",left:0,marginBottom:"4px"};case"top-end":return{bottom:"100%",right:0,marginBottom:"4px"};default:return{top:"100%",left:0,marginTop:"4px"}}};return(0,vd.jsxs)("div",{ref:u,className:s,style:{position:"relative",display:"inline-block",...a},children:[(0,vd.jsx)("div",{onClick:()=>!i&&c(!l),style:{cursor:i?"not-allowed":"pointer"},children:e}),l&&(0,vd.jsx)("div",{style:{position:"absolute",...f(),minWidth:"160px",backgroundColor:E.white,border:`1px solid ${E.gray[200]}`,borderRadius:Qe.lg,boxShadow:Wt.lg,zIndex:Pt.dropdown,padding:"4px"},children:t.map(m=>(0,vd.jsx)(wb,{label:m.label,icon:m.icon,onClick:()=>p(m.value),disabled:m.disabled,active:r===m.value,danger:m.danger},m.value))})]})}var vd,Pl,b7=x(()=>{"use strict";vd=O(W(),1),Pl=O(te(),1);CT();xt();sr()});function x7({value:e="",onChange:t,onSelect:r,options:o,placeholder:n,label:i,loading:a,disabled:s,error:l,noResultsText:c="No results found",style:u,className:p}){let[f,m]=(0,Zi.useState)(!1),[g,v]=(0,Zi.useState)(-1),b=(0,Zi.useRef)(null),y=(0,Zi.useMemo)(()=>{if(!e)return o;let k=e.toLowerCase();return o.filter(j=>j.label.toLowerCase().includes(k)||j.value.toLowerCase().includes(k))},[o,e]);(0,Zi.useEffect)(()=>{let k=j=>{b.current&&!b.current.contains(j.target)&&m(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]);let h=k=>{t?.(k),m(!0),v(-1)},$=k=>{t?.(k.label),r?.(k),m(!1),v(-1)},_=k=>{if(!f){(k.key==="ArrowDown"||k.key==="ArrowUp")&&m(!0);return}switch(k.key){case"ArrowDown":k.preventDefault(),v(j=>j<y.length-1?j+1:j);break;case"ArrowUp":k.preventDefault(),v(j=>j>0?j-1:j);break;case"Enter":k.preventDefault(),g>=0&&y[g]&&$(y[g]);break;case"Escape":m(!1),v(-1);break}};return(0,sn.jsxs)("div",{ref:b,className:p,style:{position:"relative",...u},children:[(0,sn.jsx)("div",{onKeyDown:_,children:(0,sn.jsx)(ud,{label:i,value:e,onChange:h,onFocus:()=>m(!0),placeholder:n,disabled:s,error:l})}),f&&(0,sn.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:E.white,border:`1px solid ${E.gray[200]}`,borderRadius:Qe.lg,boxShadow:Wt.lg,zIndex:Pt.dropdown,maxHeight:"240px",overflow:"auto"},children:a?(0,sn.jsx)("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:(0,sn.jsx)(Lt,{size:20})}):y.length===0?(0,sn.jsx)("div",{style:{padding:"12px",textAlign:"center",color:E.gray[500],fontSize:q.sm},children:c}):y.map((k,j)=>(0,sn.jsxs)("div",{onClick:()=>!k.disabled&&$(k),style:{padding:"8px 12px",cursor:k.disabled?"not-allowed":"pointer",backgroundColor:g===j?E.gray[100]:"transparent",color:k.disabled?E.gray[400]:E.gray[900],fontSize:q.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>v(j),children:[k.icon&&(0,sn.jsx)("span",{style:{flexShrink:0},children:k.icon}),(0,sn.jsxs)("div",{style:{flex:1},children:[(0,sn.jsx)("div",{children:k.label}),k.description&&(0,sn.jsx)("div",{style:{fontSize:q.xs,color:E.gray[500]},children:k.description})]})]},k.value))})]})}var sn,Zi,_7=x(()=>{"use strict";sn=O(W(),1),Zi=O(te(),1);cT();Ko();xt();sr();Ut()});function k7({items:e,separator:t="/",onItemClick:r,style:o,className:n}){return(0,Vi.jsx)("nav",{"aria-label":"Breadcrumb",className:n,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:q.sm,...o},children:e.map((i,a)=>{let s=a===e.length-1;return(0,Vi.jsxs)(S7.Fragment,{children:[a>0&&(0,Vi.jsx)("span",{style:{color:E.gray[400]},children:t}),i.icon&&(0,Vi.jsx)("span",{style:{display:"flex",alignItems:"center",color:s?E.gray[900]:E.gray[500]},children:i.icon}),s?(0,Vi.jsx)("span",{style:{color:E.gray[900],fontWeight:500},"aria-current":"page",children:i.label}):i.href?(0,Vi.jsx)(yb,{href:i.href,tone:"muted",underline:"hover",onClick:l=>{r&&(l.preventDefault(),r(i,a))},children:i.label}):(0,Vi.jsx)("button",{onClick:()=>r?.(i,a),style:{background:"none",border:"none",padding:0,color:E.gray[500],cursor:"pointer",fontSize:"inherit"},children:i.label})]},a)})})}var Vi,S7,w7=x(()=>{"use strict";Vi=O(W(),1),S7=O(te(),1);gT();xt();Ut()});function E7({currentPage:e,totalPages:t,onPageChange:r,showFirstLast:o=!0,maxVisible:n=5,size:i="md",disabled:a,style:s,className:l}){let c=()=>{let m=[];if(t<=n)for(let g=1;g<=t;g++)m.push(g);else{m.push(1);let g=Math.floor((n-3)/2),v=Math.max(2,e-g),b=Math.min(t-1,e+g);e<=g+2&&(b=Math.min(t-1,n-2)),e>=t-g-1&&(v=Math.max(2,t-n+3)),v>2&&m.push("ellipsis");for(let y=v;y<=b;y++)m.push(y);b<t-1&&m.push("ellipsis"),m.push(t)}return m},u=i==="sm"?"xs":i==="lg"?"md":"sm",p=i==="sm"?14:i==="lg"?20:16,f=({page:m,active:g})=>(0,Mr.jsx)("button",{onClick:()=>!a&&r?.(m),disabled:a,style:{minWidth:i==="sm"?"28px":i==="lg"?"40px":"32px",height:i==="sm"?"28px":i==="lg"?"40px":"32px",padding:"0 8px",border:"none",borderRadius:"6px",backgroundColor:g?E.primary[600]:"transparent",color:g?E.white:E.gray[700],fontSize:i==="sm"?q.xs:q.sm,fontWeight:g?ce.medium:ce.normal,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,transition:"all 0.15s"},children:m});return(0,Mr.jsxs)("nav",{"aria-label":"Pagination",className:l,style:{display:"flex",alignItems:"center",gap:"4px",...s},children:[o&&(0,Mr.jsxs)(et,{variant:"ghost",size:u,onClick:()=>r?.(1),disabled:a||e===1,"aria-label":"First page",children:[(0,Mr.jsx)(Re,{name:"chevron-left",size:p}),(0,Mr.jsx)(Re,{name:"chevron-left",size:p,style:{marginLeft:"-8px"}})]}),(0,Mr.jsx)(et,{variant:"ghost",size:u,onClick:()=>r?.(e-1),disabled:a||e===1,"aria-label":"Previous page",children:(0,Mr.jsx)(Re,{name:"chevron-left",size:p})}),c().map((m,g)=>m==="ellipsis"?(0,Mr.jsx)("span",{style:{padding:"0 4px",color:E.gray[400]},children:"..."},`ellipsis-${g}`):(0,Mr.jsx)(f,{page:m,active:m===e},m)),(0,Mr.jsx)(et,{variant:"ghost",size:u,onClick:()=>r?.(e+1),disabled:a||e===t,"aria-label":"Next page",children:(0,Mr.jsx)(Re,{name:"chevron-right",size:p})}),o&&(0,Mr.jsxs)(et,{variant:"ghost",size:u,onClick:()=>r?.(t),disabled:a||e===t,"aria-label":"Last page",children:[(0,Mr.jsx)(Re,{name:"chevron-right",size:p}),(0,Mr.jsx)(Re,{name:"chevron-right",size:p,style:{marginLeft:"-8px"}})]})]})}var Mr,T7=x(()=>{"use strict";Mr=O(W(),1);Mi();an();xt();Ut()});function z7({icon:e,title:t,description:r,action:o,style:n,className:i}){let a={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...n};return(0,Ul.jsxs)(Et,{align:"center",gap:"sm",className:i,style:a,children:[e!==void 0&&(typeof e=="string"?(0,Ul.jsx)(Re,{name:e,size:40,tone:"subtle"}):e),(0,Ul.jsx)(bn,{level:3,children:t}),r!==void 0&&(0,Ul.jsx)(ct,{tone:"muted",children:r}),o!==void 0&&(0,Ul.jsx)("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:o})]})}var Ul,R7=x(()=>{"use strict";Ul=O(W(),1);sd();an();db();kg()});function C7({label:e,value:t,delta:r,trend:o="neutral",icon:n,style:i,className:a}){let s=o==="up"?"success":o==="down"?"error":"muted";return(0,Hi.jsxs)(Et,{gap:"xs",className:a,style:i,children:[(0,Hi.jsxs)(bo,{gap:"xs",align:"center",children:[n!==void 0&&(typeof n=="string"?(0,Hi.jsx)(Re,{name:n,size:16,tone:"muted"}):n),(0,Hi.jsx)(ct,{size:"xs",weight:"semibold",caps:!0,tone:"muted",children:e})]}),(0,Hi.jsxs)(bo,{gap:"sm",align:"end",children:[(0,Hi.jsx)(ct,{size:"3xl",weight:"bold",children:t}),r!==void 0&&(0,Hi.jsx)(ct,{size:"sm",weight:"semibold",tone:s,children:r})]})]})}var Hi,I7=x(()=>{"use strict";Hi=O(W(),1);sd();cb();kg();an()});function woe(e,t){return e<t?"completed":e===t?"current":"upcoming"}function Toe({index:e,state:t}){return(0,Ht.jsx)("span",{"aria-hidden":"true",style:{width:IT,height:IT,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,boxSizing:"border-box",transition:"background-color 0.2s, border-color 0.2s, color 0.2s",...Eoe[t]},children:t==="completed"?(0,Ht.jsx)(Re,{name:"check",size:16,tone:"inherit"}):(0,Ht.jsx)(ct,{is:"span",size:"sm",weight:"semibold",tone:"inherit",children:e+1})})}function zoe({label:e,state:t}){return(0,Ht.jsx)(ct,{is:"span",size:"sm",weight:t==="current"?"semibold":"normal",tone:t==="upcoming"?"muted":"default",children:e})}function O7({steps:e,current:t,orientation:r="horizontal",onStepClick:o,style:n,className:i}){let a=(s,l)=>{let c=woe(l,t),u=(0,Ht.jsxs)(bo,{gap:"sm",align:"center",children:[(0,Ht.jsx)(Toe,{index:l,state:c}),(0,Ht.jsx)(zoe,{label:s,state:c})]});return o===void 0?(0,Ht.jsx)("span",{"aria-current":c==="current"?"step":void 0,children:u}):(0,Ht.jsx)("button",{type:"button",onClick:()=>o(l),"aria-current":c==="current"?"step":void 0,style:{background:"none",border:"none",padding:0,margin:0,font:"inherit",textAlign:"inherit",cursor:"pointer"},children:u})};return r==="vertical"?(0,Ht.jsx)("nav",{"aria-label":"Progress",className:i,style:n,children:(0,Ht.jsx)(Et,{gap:"none",align:"start",children:e.map((s,l)=>(0,Ht.jsxs)(Et,{gap:"none",align:"start",children:[l>0&&(0,Ht.jsx)("span",{style:{width:IT,height:16,display:"inline-flex",justifyContent:"center"},children:(0,Ht.jsx)(zl,{orientation:"vertical",margin:0})}),a(s,l)]},l))})}):(0,Ht.jsx)("nav",{"aria-label":"Progress",className:i,style:n,children:(0,Ht.jsx)(bo,{gap:"sm",align:"center",children:e.map((s,l)=>(0,Ht.jsxs)(bo,{gap:"sm",align:"center",style:l>0?{flex:1}:void 0,children:[l>0&&(0,Ht.jsx)(zl,{style:{flex:1,minWidth:16,margin:0}}),a(s,l)]},l))})})}var Ht,IT,Eoe,M7=x(()=>{"use strict";Ht=O(W(),1);sd();cb();kg();an();iT();IT=28;Eoe={completed:{backgroundColor:"var(--ggui-color-primary-100, #e0f2fe)",border:"1px solid var(--ggui-color-primary-300, #7dd3fc)",color:"var(--ggui-color-primary-700, #0369a1)"},current:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",border:"1px solid var(--ggui-color-primary-600, #0284c7)",color:"var(--ggui-color-onPrimary, #ffffff)"},upcoming:{backgroundColor:"var(--ggui-color-surface, #fafafa)",border:"1px solid var(--ggui-color-outline, #d4d4d8)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"}}});var A7={};Mt(A7,{Autocomplete:()=>x7,Breadcrumb:()=>k7,Dropdown:()=>$7,EmptyState:()=>z7,FormField:()=>g7,MenuItem:()=>wb,Pagination:()=>E7,SearchField:()=>f7,Stat:()=>C7,Stepper:()=>O7,Tag:()=>y7});var j7=x(()=>{"use strict";m7();h7();CT();v7();b7();_7();w7();T7();R7();I7();M7()});function N7({logo:e,navigation:t,actions:r,sticky:o=!1,background:n,bordered:i=!0,style:a,className:s}){return(0,$d.jsxs)("header",{className:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:n||E.white,borderBottom:i?`1px solid ${E.gray[200]}`:void 0,...o&&{position:"sticky",top:0,zIndex:Pt.sticky,boxShadow:Wt.sm},...a},children:[e&&(0,$d.jsx)("div",{style:{flexShrink:0},children:e}),t&&(0,$d.jsx)("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:t}),r&&(0,$d.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:r})]})}var $d,D7=x(()=>{"use strict";$d=O(W(),1);xt();sr()});function U7({item:e,activeId:t,onItemClick:r,collapsed:o,depth:n=0}){let[i,a]=(0,P7.useState)(!1),s=e.children&&e.children.length>0,l=t===e.id;return(0,Yt.jsxs)("div",{children:[(0,Yt.jsxs)("button",{onClick:()=>{s&&!o&&a(!i),r?.(e)},disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:o?"10px":"10px 12px",paddingLeft:o?"10px":`${12+n*16}px`,border:"none",borderRadius:Qe.md,backgroundColor:l?E.primary[50]:"transparent",color:e.disabled?E.gray[400]:l?E.primary[700]:E.gray[700],fontSize:q.sm,fontWeight:l?ce.medium:ce.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:o?"center":"flex-start"},children:[e.icon&&(0,Yt.jsx)("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!o&&(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("span",{style:{flex:1},children:e.label}),e.badge&&(0,Yt.jsx)("span",{children:e.badge}),s&&(0,Yt.jsx)(Re,{name:i?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),s&&i&&!o&&(0,Yt.jsx)("div",{style:{marginTop:"4px"},children:e.children.map(u=>(0,Yt.jsx)(U7,{item:u,activeId:t,onItemClick:r,collapsed:o,depth:n+1},u.id))})]})}function L7({items:e,activeId:t,onItemClick:r,collapsed:o=!1,header:n,footer:i,width:a=256,collapsedWidth:s=64,style:l,className:c}){let u=o?s:a;return(0,Yt.jsxs)("aside",{className:c,style:{width:u,minWidth:u,height:"100%",display:"flex",flexDirection:"column",backgroundColor:E.white,borderRight:`1px solid ${E.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...l},children:[n&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderBottom:`1px solid ${E.gray[200]}`},children:n}),(0,Yt.jsx)("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:(0,Yt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(p=>(0,Yt.jsx)(U7,{item:p,activeId:t,onItemClick:r,collapsed:o},p.id))})}),i&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderTop:`1px solid ${E.gray[200]}`},children:i})]})}var Yt,P7,Z7=x(()=>{"use strict";Yt=O(W(),1),P7=O(te(),1);xt();sr();Ut();an()});function H7({children:e,columns:t=3,gap:r=16,style:o,className:n}){return(0,V7.jsx)("div",{className:n,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))",gap:`${r}px`,...o},children:e})}var V7,q7=x(()=>{"use strict";V7=O(W(),1)});function B7({comment:e,onReply:t,onReaction:r,depth:o=0}){let[n,i]=(0,Eb.useState)(!1),[a,s]=(0,Eb.useState)(""),l=()=>{a.trim()&&(t?.(e.id,a),s(""),i(!1))},c=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,Le.jsxs)("div",{style:{marginLeft:o>0?"40px":0},children:[(0,Le.jsxs)("div",{style:{display:"flex",gap:"12px"},children:[(0,Le.jsx)(Ol,{name:e.author.name,src:e.author.avatar,size:"sm"}),(0,Le.jsxs)("div",{style:{flex:1},children:[(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Le.jsx)("span",{style:{fontWeight:500,fontSize:q.sm},children:e.author.name}),(0,Le.jsx)("span",{style:{color:E.gray[500],fontSize:q.xs},children:c})]}),(0,Le.jsx)("p",{style:{margin:"4px 0 8px",fontSize:q.sm,color:E.gray[700]},children:e.content}),(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.reactions?.map(u=>(0,Le.jsxs)("button",{onClick:()=>r?.(e.id,u.emoji),style:{padding:"2px 8px",border:`1px solid ${E.gray[200]}`,borderRadius:"12px",backgroundColor:E.gray[50],fontSize:q.xs,cursor:"pointer"},children:[u.emoji," ",u.count]},u.emoji)),(0,Le.jsx)("button",{onClick:()=>i(!n),style:{background:"none",border:"none",color:E.gray[500],fontSize:q.xs,cursor:"pointer"},children:"Reply"})]}),n&&(0,Le.jsxs)("div",{style:{marginTop:"12px"},children:[(0,Le.jsx)(Eg,{value:a,onChange:s,placeholder:"Write a reply...",rows:2}),(0,Le.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[(0,Le.jsx)(et,{size:"sm",onClick:l,children:"Reply"}),(0,Le.jsx)(et,{size:"sm",variant:"ghost",onClick:()=>i(!1),children:"Cancel"})]})]})]})]}),e.replies?.map(u=>(0,Le.jsx)("div",{style:{marginTop:"16px"},children:(0,Le.jsx)(B7,{comment:u,onReply:t,onReaction:r,depth:o+1})},u.id))]})}function G7({comments:e,currentUser:t,onAddComment:r,onReply:o,onReaction:n,loading:i,style:a,className:s}){let[l,c]=(0,Eb.useState)(""),u=()=>{l.trim()&&(r?.(l),c(""))};return(0,Le.jsxs)("div",{className:s,style:{...a},children:[t&&(0,Le.jsxs)("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[(0,Le.jsx)(Ol,{name:t.name,src:t.avatar,size:"sm"}),(0,Le.jsxs)("div",{style:{flex:1},children:[(0,Le.jsx)(Eg,{value:l,onChange:c,placeholder:"Write a comment...",rows:3}),(0,Le.jsx)("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:(0,Le.jsx)(et,{onClick:u,disabled:!l.trim(),children:"Comment"})})]})]}),i?(0,Le.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Le.jsx)(Lt,{size:24})}):(0,Le.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(p=>(0,Le.jsx)(B7,{comment:p,onReply:o,onReaction:n},p.id))})]})}var Le,Eb,F7=x(()=>{"use strict";Le=O(W(),1),Eb=O(te(),1);fb();Mi();uT();Ko();xt();Ut()});function K7({columns:e,data:t,rowKey:r="id",loading:o,emptyText:n="No data",onSort:i,sortKey:a,sortDirection:s,onRowClick:l,selectable:c,selectedKeys:u=[],onSelectionChange:p,style:f,className:m}){let g=($,_)=>typeof r=="function"?r($):String($[r]??_),v=$=>{p?.($?t.map((_,k)=>g(_,k)):[])},b=($,_)=>{p?.(_?[...u,$]:u.filter(k=>k!==$))},y=t.length>0&&u.length===t.length,h=u.length>0&&u.length<t.length;return(0,It.jsx)("div",{className:m,style:{border:`1px solid ${E.gray[200]}`,borderRadius:"8px",overflow:"hidden",...f},children:(0,It.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:q.sm},children:[(0,It.jsx)("thead",{children:(0,It.jsxs)("tr",{style:{backgroundColor:E.gray[50]},children:[c&&(0,It.jsx)("th",{style:{width:"40px",padding:"12px"},children:(0,It.jsx)(Il,{checked:y,indeterminate:h,onChange:v})}),e.map($=>(0,It.jsx)("th",{style:{padding:"12px 16px",textAlign:$.align||"left",fontWeight:ce.semibold,color:E.gray[700],borderBottom:`1px solid ${E.gray[200]}`,cursor:$.sortable?"pointer":void 0,width:$.width},onClick:()=>$.sortable&&i?.($.key,a===$.key&&s==="asc"?"desc":"asc"),children:(0,It.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[$.header,$.sortable&&a===$.key&&(0,It.jsx)(Re,{name:s==="asc"?"chevron-up":"chevron-down",size:14})]})},$.key))]})}),(0,It.jsx)("tbody",{children:o?(0,It.jsx)("tr",{children:(0,It.jsx)("td",{colSpan:e.length+(c?1:0),style:{padding:"48px",textAlign:"center"},children:(0,It.jsx)(Lt,{size:24})})}):t.length===0?(0,It.jsx)("tr",{children:(0,It.jsx)("td",{colSpan:e.length+(c?1:0),style:{padding:"48px",textAlign:"center",color:E.gray[500]},children:n})}):t.map(($,_)=>{let k=g($,_),j=u.includes(k);return(0,It.jsxs)("tr",{onClick:()=>l?.($,_),style:{backgroundColor:j?E.primary[50]:void 0,cursor:l?"pointer":void 0,transition:"background-color 0.15s"},children:[c&&(0,It.jsx)("td",{style:{padding:"12px"},children:(0,It.jsx)(Il,{checked:j,onChange:S=>b(k,S)})}),e.map(S=>(0,It.jsx)("td",{style:{padding:"12px 16px",textAlign:S.align||"left",color:E.gray[900],borderBottom:`1px solid ${E.gray[100]}`},children:S.render?S.render($[S.key],$,_):String($[S.key]??"")},S.key))]},k)})})]})})}var It,W7=x(()=>{"use strict";It=O(W(),1);dT();Ko();an();xt();Ut()});function J7({messages:e,currentUserId:t,onSendMessage:r,loading:o,typing:n,placeholder:i="Type a message...",header:a,style:s,className:l}){let[c,u]=(0,bd.useState)(""),p=(0,bd.useRef)(null);(0,bd.useEffect)(()=>{p.current?.scrollIntoView({behavior:"smooth"})},[e]);let f=()=>{c.trim()&&(r?.(c),u(""))},m=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),f())};return(0,Ot.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${E.gray[200]}`,borderRadius:Qe.lg,backgroundColor:E.white,overflow:"hidden",...s},children:[a&&(0,Ot.jsx)("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${E.gray[200]}`},children:a}),(0,Ot.jsxs)("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[o?(0,Ot.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Ot.jsx)(Lt,{size:24})}):e.map(g=>{let v=g.sender.id===t,b=g.timestamp instanceof Date?g.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g.timestamp;return(0,Ot.jsxs)("div",{style:{display:"flex",flexDirection:v?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!v&&(0,Ot.jsx)(Ol,{name:g.sender.name,src:g.sender.avatar,size:"xs"}),(0,Ot.jsxs)("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Qe.lg,backgroundColor:v?E.primary[600]:E.gray[100],color:v?E.white:E.gray[900]},children:[(0,Ot.jsx)("p",{style:{margin:0,fontSize:q.sm},children:g.content}),(0,Ot.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:q.xs,opacity:.7},children:[(0,Ot.jsx)("span",{children:b}),v&&g.status&&(0,Ot.jsxs)("span",{children:[g.status==="sending"&&"\u2022",g.status==="sent"&&"\u2713",g.status==="delivered"&&"\u2713\u2713",g.status==="read"&&"\u2713\u2713",g.status==="error"&&"!"]})]})]})]},g.id)}),n&&(0,Ot.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,Ot.jsxs)("span",{style:{fontSize:q.xs,color:E.gray[500]},children:[n.name," is typing..."]})}),(0,Ot.jsx)("div",{ref:p})]}),(0,Ot.jsxs)("div",{style:{padding:"12px 16px",borderTop:`1px solid ${E.gray[200]}`,display:"flex",gap:"8px"},children:[(0,Ot.jsx)("input",{type:"text",value:c,onChange:g=>u(g.target.value),onKeyDown:m,placeholder:i,style:{flex:1,padding:"10px 14px",border:`1px solid ${E.gray[300]}`,borderRadius:Qe.full,fontSize:q.sm,outline:"none"}}),(0,Ot.jsx)(et,{onClick:f,disabled:!c.trim(),children:(0,Ot.jsx)(Re,{name:"chevron-right",size:18})})]})]})}var Ot,bd,Y7=x(()=>{"use strict";Ot=O(W(),1),bd=O(te(),1);fb();Mi();Ko();an();xt();sr();Ut()});function X7({items:e,activeId:t,onItemClick:r,orientation:o="horizontal",variant:n="default",style:i,className:a}){let s=l=>{let c=t===l.id,u={display:"flex",alignItems:"center",gap:"8px",padding:o==="horizontal"?"8px 16px":"10px 16px",border:"none",background:"none",fontSize:q.sm,cursor:l.disabled?"not-allowed":"pointer",opacity:l.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},p={default:{fontWeight:c?ce.medium:ce.normal,color:c?E.primary[600]:E.gray[600]},pills:{borderRadius:Qe.full,backgroundColor:c?E.primary[100]:"transparent",color:c?E.primary[700]:E.gray[600],fontWeight:c?ce.medium:ce.normal},underline:{borderBottom:c?`2px solid ${E.primary[600]}`:"2px solid transparent",color:c?E.primary[600]:E.gray[600],fontWeight:c?ce.medium:ce.normal,borderRadius:0}},f=()=>{l.disabled||r?.(l)},m=(0,Jo.jsxs)(Jo.Fragment,{children:[l.icon&&(0,Jo.jsx)("span",{style:{display:"flex"},children:l.icon}),(0,Jo.jsx)("span",{children:l.label})]});return l.href?(0,Jo.jsx)("a",{href:l.href,onClick:g=>{g.preventDefault(),f()},style:{...u,...p[n]},children:m},l.id):(0,Jo.jsx)("button",{onClick:f,disabled:l.disabled,style:{...u,...p[n]},children:m},l.id)};return(0,Jo.jsx)("nav",{className:a,style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",gap:o==="horizontal"?"4px":"2px",...n==="underline"&&o==="horizontal"&&{borderBottom:`1px solid ${E.gray[200]}`},...i},children:e.map(s)})}var Jo,Q7=x(()=>{"use strict";Jo=O(W(),1);xt();sr();Ut()});function eU(e){if(e===0)return"0 B";let t=1024,r=["B","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,o)).toFixed(1))} ${r[o]}`}function tU({files:e=[],onFilesSelected:t,onFileRemove:r,accept:o,multiple:n=!0,maxSize:i,maxFiles:a,disabled:s,dragDrop:l=!0,style:c,className:u}){let[p,f]=(0,Tb.useState)(!1),m=(0,Tb.useRef)(null),g=h=>{if(!h)return;let $=Array.from(h);a&&($=$.slice(0,a-e.length)),i&&($=$.filter(_=>_.size<=i)),t?.($)},v=h=>{h.preventDefault(),f(!1),!s&&l&&g(h.dataTransfer.files)},b=h=>{h.preventDefault(),!s&&l&&f(!0)},y=()=>{f(!1)};return(0,ur.jsxs)("div",{className:u,style:{...c},children:[(0,ur.jsxs)("div",{onClick:()=>!s&&m.current?.click(),onDrop:v,onDragOver:b,onDragLeave:y,style:{border:`2px dashed ${p?E.primary[400]:E.gray[300]}`,borderRadius:Qe.lg,padding:"32px",textAlign:"center",backgroundColor:p?E.primary[50]:E.gray[50],cursor:s?"not-allowed":"pointer",transition:"all 0.2s",opacity:s?.5:1},children:[(0,ur.jsx)("input",{ref:m,type:"file",accept:o,multiple:n,onChange:h=>g(h.target.files),disabled:s,style:{display:"none"}}),(0,ur.jsx)(Re,{name:"plus",size:32,tone:"subtle"}),(0,ur.jsx)("p",{style:{margin:"12px 0 4px",color:E.gray[700],fontSize:q.sm},children:l?"Drag and drop files here, or click to browse":"Click to browse files"}),(0,ur.jsxs)("p",{style:{margin:0,color:E.gray[500],fontSize:q.xs},children:[o&&`Accepted: ${o}`,i&&` \u2022 Max size: ${eU(i)}`,a&&` \u2022 Max files: ${a}`]})]}),e.length>0&&(0,ur.jsx)("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map(h=>(0,ur.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${E.gray[200]}`,borderRadius:Qe.md,backgroundColor:E.white},children:[(0,ur.jsx)(Re,{name:"menu",size:20,tone:"subtle"}),(0,ur.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,ur.jsx)("p",{style:{margin:0,fontSize:q.sm,color:E.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h.name}),(0,ur.jsxs)("p",{style:{margin:"2px 0 0",fontSize:q.xs,color:E.gray[500]},children:[eU(h.size),h.error&&(0,ur.jsx)("span",{style:{color:E.error[500],marginLeft:"8px"},children:h.error})]}),h.status==="uploading"&&h.progress!==void 0&&(0,ur.jsx)(mb,{value:h.progress,size:"sm",style:{marginTop:"8px"}})]}),(0,ur.jsx)(et,{variant:"ghost",size:"sm",onClick:()=>r?.(h.id),children:(0,ur.jsx)(Re,{name:"x",size:16})})]},h.id))})]})}var ur,Tb,rU=x(()=>{"use strict";ur=O(W(),1),Tb=O(te(),1);Mi();mT();an();xt();sr();Ut()});function Coe({notification:e,onMarkAsRead:t,onDismiss:r}){let o=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,n=Roe[e.type||"info"];return(0,tt.jsxs)("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":E.primary[50],borderRadius:Qe.md,transition:"background-color 0.15s"},children:[(0,tt.jsx)("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":n,flexShrink:0,marginTop:"6px"}}),(0,tt.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[(0,tt.jsx)("p",{style:{margin:0,fontWeight:ce.medium,color:E.gray[900],fontSize:q.sm},children:e.title}),(0,tt.jsx)("button",{onClick:()=>r?.(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:E.gray[400],flexShrink:0},children:(0,tt.jsx)(Re,{name:"x",size:14})})]}),e.message&&(0,tt.jsx)("p",{style:{margin:"4px 0 0",color:E.gray[600],fontSize:q.xs},children:e.message}),(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[(0,tt.jsx)("span",{style:{color:E.gray[400],fontSize:q.xs},children:o}),!e.read&&(0,tt.jsx)("button",{onClick:()=>t?.(e.id),style:{background:"none",border:"none",padding:0,color:E.primary[600],fontSize:q.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&(0,tt.jsx)("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:E.primary[600],fontSize:q.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function nU({notifications:e,onMarkAsRead:t,onMarkAllAsRead:r,onDismiss:o,onClearAll:n,emptyText:i="No notifications",loading:a,style:s,className:l}){let c=e.filter(u=>!u.read).length;return(0,tt.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",...s},children:[(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${E.gray[200]}`},children:[(0,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,tt.jsx)("span",{style:{fontWeight:ce.semibold,color:E.gray[900]},children:"Notifications"}),c>0&&(0,tt.jsx)("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:E.primary[100],color:E.primary[700],fontSize:q.xs,fontWeight:ce.medium},children:c})]}),(0,tt.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[c>0&&(0,tt.jsx)(et,{variant:"ghost",size:"sm",onClick:r,children:"Mark all read"}),e.length>0&&(0,tt.jsx)(et,{variant:"ghost",size:"sm",onClick:n,children:"Clear all"})]})]}),(0,tt.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,tt.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,tt.jsx)(Lt,{size:24})}):e.length===0?(0,tt.jsx)("div",{style:{textAlign:"center",padding:"32px",color:E.gray[500]},children:i}):(0,tt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(u=>(0,tt.jsx)(Coe,{notification:u,onMarkAsRead:t,onDismiss:o},u.id))})})]})}var tt,Roe,oU=x(()=>{"use strict";tt=O(W(),1);Mi();Ko();an();xt();sr();Ut();Roe={info:E.info[500],success:E.success[500],warning:E.warning[500],error:E.error[500]}});function iU({open:e,onClose:t,title:r,children:o,footer:n,size:i="md",closeOnOverlayClick:a=!0,closeOnEscape:s=!0,showCloseButton:l=!0,style:c,className:u}){let p=(0,zb.useCallback)(g=>{g.key==="Escape"&&s&&t()},[s,t]);if((0,zb.useEffect)(()=>{if(e)return document.addEventListener("keydown",p),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",p),document.body.style.overflow=""}},[e,p]),!e)return null;let f=g=>{g.target===g.currentTarget&&a&&t()},m=i==="full";return(0,ko.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:Pt.modal,display:"flex",alignItems:m?"stretch":"center",justifyContent:"center",padding:m?0:"24px"},children:[(0,ko.jsx)("div",{onClick:f,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:ms.fadeIn}}),(0,ko.jsxs)("div",{role:"dialog","aria-modal":"true",className:u,style:{position:"relative",width:Ioe[i],maxWidth:m?"100%":"calc(100vw - 48px)",maxHeight:m?"100%":"calc(100vh - 48px)",backgroundColor:E.white,borderRadius:m?0:Qe.xl,boxShadow:Wt["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:ms.scaleIn,...c},children:[(r||l)&&(0,ko.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${E.gray[200]}`},children:[r&&(0,ko.jsx)(bn,{level:4,children:r}),l&&(0,ko.jsx)(et,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close modal",style:{marginLeft:"auto"},children:(0,ko.jsx)(Re,{name:"x",size:20})})]}),(0,ko.jsx)("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:o}),n&&(0,ko.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${E.gray[200]}`},children:n})]})]})}var ko,zb,Ioe,aU=x(()=>{"use strict";ko=O(W(),1),zb=O(te(),1);Mi();an();db();xt();sr();md();Ioe={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"}});function sU({open:e,onClose:t,commands:r,onSelect:o,placeholder:n="Search commands...",recentIds:i=[],loading:a,style:s,className:l}){let[c,u]=(0,eo.useState)(""),[p,f]=(0,eo.useState)(0),m=(0,eo.useMemo)(()=>{let y=c?r.filter($=>$.label.toLowerCase().includes(c.toLowerCase())||$.description?.toLowerCase().includes(c.toLowerCase())):r,h=new Map;if(!c&&i.length>0){let $=i.map(_=>r.find(k=>k.id===_)).filter(Boolean);$.length>0&&h.set("Recent",$)}return y.forEach($=>{let _=$.group||"Commands";h.has(_)||h.set(_,[]),!(!c&&i.includes($.id)&&h.has("Recent"))&&h.get(_).push($)}),h},[r,c,i]),g=(0,eo.useMemo)(()=>{let y=[];return m.forEach(h=>y.push(...h)),y},[m]);(0,eo.useEffect)(()=>{f(0)},[c]),(0,eo.useEffect)(()=>{e&&(u(""),f(0))},[e]);let v=(0,eo.useCallback)(y=>{if(y.key==="Escape"){t();return}if(y.key==="ArrowDown")y.preventDefault(),f(h=>Math.min(h+1,g.length-1));else if(y.key==="ArrowUp")y.preventDefault(),f(h=>Math.max(h-1,0));else if(y.key==="Enter"){y.preventDefault();let h=g[p];h&&!h.disabled&&(o(h),t())}},[g,p,o,t]);if((0,eo.useEffect)(()=>{if(e)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[e,v]),!e)return null;let b=0;return(0,gt.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:Pt.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[(0,gt.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,gt.jsxs)("div",{role:"dialog",className:l,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:E.white,borderRadius:Qe.xl,boxShadow:Wt["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...s},children:[(0,gt.jsx)("div",{style:{padding:"12px",borderBottom:`1px solid ${E.gray[200]}`},children:(0,gt.jsxs)("div",{style:{position:"relative"},children:[(0,gt.jsx)(Re,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),(0,gt.jsx)("input",{type:"text",value:c,onChange:y=>u(y.target.value),placeholder:n,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:q.base,outline:"none",backgroundColor:"transparent"}})]})}),(0,gt.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,gt.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,gt.jsx)(Lt,{size:24})}):g.length===0?(0,gt.jsx)("div",{style:{textAlign:"center",padding:"32px",color:E.gray[500]},children:"No commands found"}):Array.from(m.entries()).map(([y,h])=>(0,gt.jsxs)("div",{style:{marginBottom:"8px"},children:[(0,gt.jsx)("div",{style:{padding:"8px 12px",fontSize:q.xs,fontWeight:ce.semibold,color:E.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:y}),h.map($=>{let k=b++===p;return(0,gt.jsxs)("button",{onClick:()=>{$.disabled||(o($),t())},disabled:$.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Qe.md,backgroundColor:k?E.gray[100]:"transparent",color:$.disabled?E.gray[400]:E.gray[900],textAlign:"left",cursor:$.disabled?"not-allowed":"pointer"},children:[$.icon&&(0,gt.jsx)("span",{style:{display:"flex",color:E.gray[500]},children:$.icon}),(0,gt.jsxs)("div",{style:{flex:1},children:[(0,gt.jsx)("div",{style:{fontSize:q.sm},children:$.label}),$.description&&(0,gt.jsx)("div",{style:{fontSize:q.xs,color:E.gray[500]},children:$.description})]}),$.shortcut&&(0,gt.jsx)("kbd",{style:{padding:"2px 6px",backgroundColor:E.gray[100],borderRadius:Qe.sm,fontSize:q.xs,color:E.gray[500],fontFamily:"inherit"},children:$.shortcut})]},$.id)})]},y))}),(0,gt.jsxs)("div",{style:{padding:"8px 12px",borderTop:`1px solid ${E.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:q.xs,color:E.gray[500]},children:[(0,gt.jsx)("span",{children:"\u2191\u2193 Navigate"}),(0,gt.jsx)("span",{children:"\u21B5 Select"}),(0,gt.jsx)("span",{children:"Esc Close"})]})]})]})}var gt,eo,lU=x(()=>{"use strict";gt=O(W(),1),eo=O(te(),1);Ko();an();xt();sr();Ut()});function cU({brand:e,columns:t,socialLinks:r,bottomText:o,bottomLinks:n,background:i,bordered:a=!0,style:s,className:l}){return(0,Fr.jsxs)("footer",{className:l,role:"contentinfo",style:{backgroundColor:i||E.gray[50],borderTop:a?`1px solid ${E.gray[200]}`:void 0,...s},children:[(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&(0,Fr.jsx)("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),t?.map((c,u)=>(0,Fr.jsxs)("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[c.title&&(0,Fr.jsx)("h4",{style:{fontSize:q.sm,fontWeight:ce.semibold,color:E.gray[900],lineHeight:Jt.normal,margin:"0 0 16px 0",padding:0},children:c.title}),(0,Fr.jsx)("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:c.links.map((p,f)=>(0,Fr.jsx)("li",{children:(0,Fr.jsx)("a",{href:p.href,onClick:p.onClick?m=>{m.preventDefault(),p.onClick?.()}:void 0,style:{fontSize:q.sm,color:E.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:Jt.normal},"aria-label":p.label,children:p.label})},f))})]},u))]}),(o||n||r)&&(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"20px 24px",maxWidth:"1280px",margin:"0 auto",borderTop:`1px solid ${E.gray[200]}`},children:[o&&(0,Fr.jsx)("span",{style:{fontSize:q.sm,color:E.gray[500],lineHeight:Jt.normal},children:o}),(0,Fr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[r?.map((c,u)=>(0,Fr.jsx)("a",{href:c.href,"aria-label":c.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:E.gray[500],transition:"color 0.15s"},children:c.icon},u)),n?.map((c,u)=>(0,Fr.jsx)("a",{href:c.href,onClick:c.onClick?p=>{p.preventDefault(),c.onClick?.()}:void 0,style:{fontSize:q.sm,color:E.gray[500],textDecoration:"none",transition:"color 0.15s"},children:c.label},u))]})]})]})}var Fr,uU=x(()=>{"use strict";Fr=O(W(),1);xt();Ut()});function dU({heading:e,description:t,primaryAction:r,secondaryAction:o,media:n,align:i="center",size:a="md",background:s,backgroundImage:l,overlay:c=!1,style:u,className:p}){let f={sm:{padding:"48px 24px",headingSize:q["3xl"],descSize:q.lg},md:{padding:"80px 24px",headingSize:q["4xl"],descSize:q.xl},lg:{padding:"120px 24px",headingSize:q["5xl"],descSize:q.xl}},m=f[a]||f.md,g=!!l,v=g&&c;return(0,to.jsxs)("section",{className:p,style:{position:"relative",backgroundColor:s||(g?void 0:E.white),...g&&{backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...u},children:[v&&(0,to.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,to.jsxs)("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:m.padding,display:"flex",flexDirection:i==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:i==="center"?"center":"left"},children:[(0,to.jsxs)("div",{style:{flex:i==="left"&&n?"1 1 50%":void 0,maxWidth:i==="center"?"800px":void 0},children:[e&&(0,to.jsx)("h1",{style:{fontSize:m.headingSize,fontWeight:ce.bold,lineHeight:Jt.tight,letterSpacing:Fo.tight,color:v?E.white:E.gray[900],margin:"0 0 16px 0",padding:0},children:e}),t&&(0,to.jsx)("p",{style:{fontSize:m.descSize,lineHeight:Jt.relaxed,color:v?"rgba(255,255,255,0.9)":E.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:i==="center"?"640px":void 0,...i==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:t}),(r||o)&&(0,to.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:i==="center"?"center":"flex-start"},children:[r&&(0,to.jsx)("button",{onClick:r.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:ce.semibold,color:E.white,backgroundColor:E.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:Jt.normal},children:r.label}),o&&(0,to.jsx)("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:ce.semibold,color:v?E.white:E.gray[700],backgroundColor:"transparent",border:`1px solid ${v?"rgba(255,255,255,0.3)":E.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:Jt.normal},children:o.label})]})]}),n&&(0,to.jsx)("div",{style:{flex:i==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...i==="center"&&{marginTop:"16px"}},children:n})]})]})}var to,pU=x(()=>{"use strict";to=O(W(),1);xt();Ut()});var fU={};Mt(fU,{CardGrid:()=>H7,ChatWindow:()=>J7,CommandPalette:()=>sU,CommentThread:()=>G7,DataTable:()=>K7,FileUploader:()=>tU,Footer:()=>cU,Header:()=>N7,Hero:()=>dU,Modal:()=>iU,NavigationBar:()=>X7,NotificationCenter:()=>nU,Sidebar:()=>L7});var mU=x(()=>{"use strict";D7();Z7();q7();F7();W7();Y7();Q7();rU();oU();aU();lU();uU();pU()});var gU,jg,hU,yU=x(()=>{"use strict";gU=O(W(),1),jg=O(te(),1),hU=(0,jg.forwardRef)(function({children:t,onClick:r,onDoubleClick:o,hoverStyle:n,activeStyle:i,cursor:a,transition:s="all 200ms ease",disabled:l=!1,role:c,"aria-label":u,tabIndex:p,style:f,className:m,...g},v){let[b,y]=(0,jg.useState)(!1),[h,$]=(0,jg.useState)(!1),_=!!r,k=l?"not-allowed":a??(_?"pointer":void 0),j=c??(_?"button":void 0),S=p??(_?0:void 0),T=R=>{l||!r||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r(R))},z={...f,cursor:k,transition:s,opacity:l?.5:void 0,...b&&!l?n:{},...h&&!l?i:{}};return(0,gU.jsx)("div",{ref:v,className:m,style:z,onClick:l?void 0:r,onDoubleClick:l?void 0:o,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),$(!1)},onMouseDown:()=>$(!0),onMouseUp:()=>$(!1),onKeyDown:T,role:j,"aria-label":u,"aria-disabled":l||void 0,tabIndex:S,...g,children:t})})});var vU,Rb,$U,bU=x(()=>{"use strict";vU=O(W(),1),Rb=O(te(),1),$U=(0,Rb.forwardRef)(function({children:t,hoverStyle:r,onHoverChange:o,transition:n="all 200ms ease",style:i,className:a,...s},l){let[c,u]=(0,Rb.useState)(!1),p={...i,transition:n,...c?r:{}};return(0,vU.jsx)("div",{ref:l,className:a,style:p,onMouseEnter:()=>{u(!0),o?.(!0)},onMouseLeave:()=>{u(!1),o?.(!1)},...s,children:t})})});var xU,xd,_U,SU=x(()=>{"use strict";xU=O(W(),1),xd=O(te(),1),_U=(0,xd.forwardRef)(function({children:t,onPress:r,onLongPress:o,longPressDelay:n=500,hoverStyle:i,pressStyle:a,disabled:s=!1,transition:l="all 150ms ease",role:c,"aria-label":u,tabIndex:p,style:f,className:m,...g},v){let[b,y]=(0,xd.useState)(!1),[h,$]=(0,xd.useState)(!1),[_,k]=(0,xd.useState)(null),j=!!r||!!o,S=Z=>{if(!s&&($(!0),o)){let N=setTimeout(()=>{o(Z)},n);k(N)}},T=Z=>{s||($(!1),_?(clearTimeout(_),k(null),r?.(Z)):o||r?.(Z))},z=Z=>{s||!r||(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),r(Z))},R={...f,cursor:s?"not-allowed":j?"pointer":void 0,transition:l,opacity:s?.5:void 0,userSelect:j?"none":void 0,...b&&!s?i:{},...h&&!s?a:{}},M=typeof t=="function"?t({pressed:h,hovered:b}):t;return(0,xU.jsx)("div",{ref:v,className:m,style:R,onMouseDown:S,onMouseUp:T,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),$(!1),_&&clearTimeout(_)},onKeyDown:z,role:c??(j?"button":void 0),"aria-label":u,"aria-disabled":s||void 0,tabIndex:p??(j?0:void 0),...g,children:M})})});var kU={};Mt(kU,{Clickable:()=>hU,Hoverable:()=>$U,Pressable:()=>_U});var wU=x(()=>{"use strict";yU();bU();SU()});var Ooe,Moe,EU,TU,_d,Aoe,zU,RU,CU,joe,IU=x(()=>{"use strict";Ooe={primary50:"#f0f9ff",primary100:"#e0f2fe",primary200:"#bae6fd",primary300:"#7dd3fc",primary400:"#38bdf8",primary500:"#0ea5e9",primary600:"#0284c7",primary700:"#0369a1",primary800:"#075985",primary900:"#0c4a6e",gray50:"#f9fafb",gray100:"#f3f4f6",gray200:"#e5e7eb",gray300:"#d1d5db",gray400:"#9ca3af",gray500:"#6b7280",gray600:"#4b5563",gray700:"#374151",gray800:"#1f2937",gray900:"#111827",info50:"#ecfeff",info100:"#cffafe",info200:"#a5f3fc",info500:"#06b6d4",info600:"#0891b2",info700:"#0e7490",info800:"#155e75",success50:"#f0fdf4",success100:"#dcfce7",success200:"#bbf7d0",success500:"#22c55e",success600:"#16a34a",success700:"#15803d",success800:"#166534",warning50:"#fffbeb",warning100:"#fef3c7",warning200:"#fde68a",warning500:"#f59e0b",warning600:"#d97706",warning700:"#b45309",warning800:"#92400e",error50:"#fef2f2",error100:"#fee2e2",error200:"#fecaca",error500:"#ef4444",error600:"#dc2626",error700:"#b91c1c",error800:"#991b1b",background:"#ffffff",surface:"#ffffff",textPrimary:"#111827",textSecondary:"#6b7280",textDisabled:"#d1d5db",white:"#ffffff",black:"#000000"},Moe={primary50:"#0c4a6e",primary100:"#075985",primary200:"#0369a1",primary300:"#0284c7",primary400:"#0ea5e9",primary500:"#38bdf8",primary600:"#7dd3fc",primary700:"#bae6fd",primary800:"#e0f2fe",primary900:"#f0f9ff",gray50:"#111827",gray100:"#1f2937",gray200:"#374151",gray300:"#4b5563",gray400:"#6b7280",gray500:"#9ca3af",gray600:"#d1d5db",gray700:"#e5e7eb",gray800:"#f3f4f6",gray900:"#f9fafb",info50:"#083344",info100:"#164e63",info200:"#155e75",info500:"#06b6d4",info600:"#22d3ee",info700:"#67e8f9",info800:"#a5f3fc",success50:"#052e16",success100:"#14532d",success200:"#166534",success500:"#22c55e",success600:"#4ade80",success700:"#86efac",success800:"#bbf7d0",warning50:"#451a03",warning100:"#78350f",warning200:"#92400e",warning500:"#f59e0b",warning600:"#fbbf24",warning700:"#fcd34d",warning800:"#fde68a",error50:"#450a0a",error100:"#7f1d1d",error200:"#991b1b",error500:"#ef4444",error600:"#f87171",error700:"#fca5a5",error800:"#fecaca",background:"#0f172a",surface:"#1e293b",textPrimary:"#f1f5f9",textSecondary:"#94a3b8",textDisabled:"#475569",white:"#ffffff",black:"#000000"},EU={xs:4,sm:8,md:16,lg:24,xl:32,"2xl":48,"3xl":64},TU={fontFamily:{sans:"System",mono:"Courier"},fontSize:{xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:20,normal:24,relaxed:28}},_d={sm:{shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:2,elevation:1},md:{shadowColor:"#000000",shadowOffset:{width:0,height:4},shadowOpacity:.1,shadowRadius:6,elevation:3},lg:{shadowColor:"#000000",shadowOffset:{width:0,height:10},shadowOpacity:.1,shadowRadius:15,elevation:6},xl:{shadowColor:"#000000",shadowOffset:{width:0,height:20},shadowOpacity:.1,shadowRadius:25,elevation:10},"2xl":{shadowColor:"#000000",shadowOffset:{width:0,height:25},shadowOpacity:.25,shadowRadius:50,elevation:15}},Aoe={sm:{..._d.sm,shadowOpacity:.3},md:{..._d.md,shadowOpacity:.4},lg:{..._d.lg,shadowOpacity:.4},xl:{..._d.xl,shadowOpacity:.5},"2xl":{..._d["2xl"],shadowOpacity:.6}},zU={instant:0,fast:100,normal:200,slow:300,slower:500},RU={linear:[0,0,1,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],spring:[.175,.885,.32,1.275]},CU={none:0,sm:4,md:8,lg:12,xl:16,"2xl":24,full:9999},joe={light:{colors:Ooe,spacing:EU,typography:TU,shadows:_d,radius:CU,duration:zU,easing:RU},dark:{colors:Moe,spacing:EU,typography:TU,shadows:Aoe,radius:CU,duration:zU,easing:RU}}});var OU,MU,AU,OT,MT=x(()=>{"use strict";OU={color:"#0284c7",width:"2px",offset:"2px",style:"solid"},MU={duration:"0ms",transition:"none"},AU={borderWidth:"2px",textColor:"#000000",backgroundColor:"#ffffff",linkColor:"#0369a1"},OT={focusRing:OU,reducedMotion:MU,highContrast:AU}});var AT,jT=x(()=>{"use strict";sr();sr();AT={level0:{shadow:"none",zIndex:0},level1:{shadow:Wt.sm,zIndex:"auto"},level2:{shadow:Wt.md,zIndex:Pt.dropdown},level3:{shadow:Wt.lg,zIndex:Pt.banner},level4:{shadow:Wt.xl,zIndex:Pt.modal},level5:{shadow:Wt["2xl"],zIndex:Pt.tooltip}}});var NT,DT=x(()=>{"use strict";NT={success:"var(--ggui-color-success-500, #10b981)",error:"var(--ggui-color-error-500, #ef4444)",warning:"var(--ggui-color-warning-500, #f59e0b)",info:"var(--ggui-color-info-500, #06b6d4)",primary:"var(--ggui-color-primary-600, #0284c7)",gray:"var(--ggui-color-neutral-400, #9ca3af)",grayLight:"var(--ggui-color-neutral-200, #e5e7eb)",grayDark:"var(--ggui-color-neutral-600, #4b5563)"}});var jU={};Mt(jU,{THINKING_DEFAULT_STYLE:()=>yT,accessibility:()=>OT,animation:()=>ms,chartColors:()=>NT,colors:()=>E,duration:()=>ae,easing:()=>re,elevation:()=>AT,error:()=>zT,focusRing:()=>OU,fontFamily:()=>ub,fontSize:()=>q,fontSizeValues:()=>I8,fontWeight:()=>ce,gray:()=>Qn,headingStyles:()=>wg,highContrast:()=>AU,info:()=>RT,keyframes:()=>jl,letterSpacing:()=>Fo,lineHeight:()=>Jt,maxWidth:()=>Jn,motionSafe:()=>Nne,nativeTokens:()=>joe,primary:()=>Ag,radius:()=>Qe,reducedMotion:()=>MU,reducedMotionCSS:()=>Tg,semantic:()=>kb,shadow:()=>Wt,spacing:()=>tT,spacingValues:()=>sne,success:()=>ET,thinkingAnimation:()=>Vt,thinkingKeyframes:()=>Zt,thinkingPresets:()=>hT,tokens:()=>Noe,transition:()=>lT,typography:()=>sT,warning:()=>TT,zIndex:()=>Pt});var Noe,NU=x(()=>{"use strict";xt();sr();Ut();xo();IU();MT();jT();DT();md();xt();sr();Ut();xo();MT();jT();DT();md();Noe={colors:E,semantic:kb,spacing:tT,radius:Qe,shadow:Wt,maxWidth:Jn,zIndex:Pt,typography:sT,fontFamily:ub,fontSize:q,fontWeight:ce,lineHeight:Jt,duration:ae,easing:re,transition:lT,accessibility:OT,elevation:AT,chartColors:NT,keyframes:jl,animation:ms,reducedMotionCSS:Tg,thinkingKeyframes:Zt,thinkingAnimation:Vt,thinkingPresets:hT,THINKING_DEFAULT_STYLE:yT}});var ZU={};Mt(ZU,{CachingGadgetCatalog:()=>Loe,InMemoryGadgetCatalog:()=>LU,WrapperConformanceError:()=>PT,createGguiGadget:()=>Doe,defineGadgetPackage:()=>Poe,getPublicEnv:()=>Zoe,useCamera:()=>Xoe,useClipboardPaste:()=>Goe,useClipboardWrite:()=>qoe,useFilePicker:()=>Woe,useGeolocation:()=>Voe,useMicrophone:()=>Yoe,useNotifications:()=>Foe});function Doe(e){let{hookImpl:t,hook:r,description:o,usage:n,example:i,gotchas:a,permission:s,...l}=e,c=[];typeof t!="function"&&c.push({path:["hookImpl"],message:"`hookImpl` MUST be a React hook function"});let u={hook:r,description:o,usage:n,example:i,...a!==void 0?{gotchas:a}:{},...s!==void 0?{permission:s}:{}},p={...l,exports:[u]},f=nf.safeParse(p);if(!f.success)for(let v of f.error.issues)c.push({path:v.path.map(b=>typeof b=="symbol"?b.toString():b),message:v.message});if(!f.success||c.length>0)throw new PT(typeof e.hook=="string"?e.hook:void 0,c);let m=f.data;return Object.assign((v=>t(v)),{descriptor:Object.freeze(m)})}function Poe(e){let{exports:t,...r}=e,o=[];t.length===0&&o.push({path:["exports"],message:"a gadget package MUST declare at least one export"});let n=t.map((a,s)=>{typeof a.impl!="function"&&o.push({path:["exports",s,"impl"],message:"`impl` MUST be a function (a React hook or component)"});let l={description:a.description,usage:a.usage,example:a.example,...a.gotchas!==void 0?{gotchas:a.gotchas}:{},...a.permission!==void 0?{permission:a.permission}:{}};return"hook"in a?{hook:a.hook,...l}:{component:a.component,...l}}),i=nf.safeParse({...r,exports:n});if(!i.success)for(let a of i.error.issues)o.push({path:a.path.map(s=>typeof s=="symbol"?s.toString():s),message:a.message});if(!i.success||o.length>0)throw new PT(e.package,o);return i.data}function Zoe(e,t,r=globalThis){let o=r.__ggui__;if(!o)throw new Error(`getPublicEnv('${e}'): globalThis.__ggui__ is not initialized. This function must be invoked from inside a ggui-rendered component or wrapper hook, after the iframe runtime has booted.`);let n=o.publicEnv??{};if(Object.prototype.hasOwnProperty.call(n,e))return n[e];if(t?.optional)return;let i=Object.keys(n);throw new Error(`getPublicEnv('${e}'): not provided in App.publicEnv. Available: [${i.join(", ")||"(none)"}]. Operators set this on the App record; gadget authors declare the key in 'requires' so the render gate verifies it before mount.`)}function DU(e){let t=e.coords;return{...{latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,timestamp:e.timestamp},...t.altitude!==null&&{altitude:t.altitude},...t.altitudeAccuracy!==null&&{altitudeAccuracy:t.altitudeAccuracy},...t.heading!==null&&{heading:t.heading},...t.speed!==null&&{speed:t.speed}}}function PU(e){return e.code===e.PERMISSION_DENIED?{code:"permission_denied",message:e.message}:e.code===e.TIMEOUT?{code:"timeout",message:e.message}:{code:"unknown",message:e.message}}function Hoe(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}function Boe(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}function Koe(e){return{name:e.name,size:e.size,type:e.type,_file:e}}function Joe(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:e.name==="NotFoundError"||e.name==="OverconstrainedError"?{code:"not_supported",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}function UU(e){return e instanceof Error?e.name==="NotAllowedError"?{code:"permission_denied",message:e.message}:e.name==="NotFoundError"||e.name==="OverconstrainedError"?{code:"not_supported",message:e.message}:{code:"unknown",message:e.message}:{code:"unknown",message:String(e)}}var qi,Sd,kd,wd,Ed,ro,Bi,PT,LU,Uoe,Loe,Voe,qoe,Goe,Foe,Woe,Yoe,Xoe,VU=x(()=>{"use strict";Ao();Ao();qi=O(te(),1),Sd=O(te(),1),kd=O(te(),1),wd=O(te(),1),Ed=O(te(),1),ro=O(te(),1),Bi=O(te(),1),PT=class extends Error{code="wrapper_conformance";violations;constructor(e,t){let r=e?` (${e})`:"",o=t.map(n=>` - ${n.path.join(".")||"<root>"}: ${n.message}`).join(`
154
154
  `);super(`gadget spec conformance failed${r}
155
155
  ${o}`),this.name="WrapperConformanceError",this.violations=t}};LU=class{#e;constructor(e){this.#e=e}static withDefault(e,t){let r=new Map;if(t)for(let[o,n]of t)r.set(o,n);return new Uoe(r,e)}async list(e){return this.#e.get(e)??[]}},Uoe=class extends LU{#e;constructor(e,t){super(e),this.#e=t}async list(e){let t=await super.list(e);return t.length>0?t:this.#e}},Loe=class{#e;#r;#n;#t=new Map;#o=new Map;constructor(e,t={}){this.#e=e,this.#r=t.ttlMs??3e4,this.#n=t.now??Date.now}async list(e){let t=this.#n(),r=this.#t.get(e);if(r!==void 0&&r.expiresAt>t)return r.entries;let o=this.#o.get(e);if(o!==void 0)return o;let n=(async()=>{try{let i=await this.#e.list(e);return this.#r>0&&this.#t.set(e,{entries:i,expiresAt:this.#n()+this.#r}),i}finally{this.#o.delete(e)}})();return this.#o.set(e,n),n}invalidate(e){if(e===void 0){this.#t.clear();return}this.#t.delete(e)}};Voe=e=>{let[t,r]=(0,qi.useState)(void 0),[o,n]=(0,qi.useState)("idle"),[i,a]=(0,qi.useState)(void 0),s=(0,qi.useRef)(null),l=(0,qi.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.geolocation){a({code:"not_supported",message:"Geolocation API unavailable in this environment."}),n("error");return}n("prompting"),a(void 0);let u={enableHighAccuracy:e?.enableHighAccuracy??!1,maximumAge:e?.maximumAge??0,timeout:e?.timeout??Number.POSITIVE_INFINITY};return e?.watch?new Promise(p=>{let f=!1;s.current=navigator.geolocation.watchPosition(m=>{let g=DU(m);r(g),n("active"),f||(f=!0,p(g))},m=>{let g=PU(m);a(g),n(g.code==="permission_denied"?"denied":"error"),f||(f=!0,p(void 0))},u)}):new Promise(p=>{navigator.geolocation.getCurrentPosition(f=>{let m=DU(f);r(m),n("completed"),p(m)},f=>{let m=PU(f);a(m),n(m.code==="permission_denied"?"denied":"error"),p(void 0)},u)})},[e?.enableHighAccuracy,e?.maximumAge,e?.timeout,e?.watch]),c=(0,qi.useCallback)(()=>{s.current!==null&&typeof navigator<"u"&&(navigator.geolocation.clearWatch(s.current),s.current=null),n("completed")},[]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:l,stop:c}};qoe=e=>{let[t,r]=(0,Sd.useState)(void 0),[o,n]=(0,Sd.useState)("idle"),[i,a]=(0,Sd.useState)(void 0),s=(0,Sd.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.clipboard||typeof navigator.clipboard.writeText!="function"){a({code:"not_supported",message:"Clipboard write API unavailable in this environment."}),n("error");return}let l=e?.text;if(typeof l!="string"){a({code:"unknown",message:"useClipboardWrite: `text` option is required at start() time."}),n("error");return}n("prompting"),a(void 0);try{return await navigator.clipboard.writeText(l),r(l),n("completed"),l}catch(c){let u=Hoe(c);a(u),n(u.code==="permission_denied"?"denied":"error");return}},[e?.text]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:s}};Goe=()=>{let[e,t]=(0,kd.useState)(void 0),[r,o]=(0,kd.useState)("idle"),[n,i]=(0,kd.useState)(void 0),a=(0,kd.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.clipboard||typeof navigator.clipboard.readText!="function"){i({code:"not_supported",message:"Clipboard read API unavailable in this environment."}),o("error");return}o("prompting"),i(void 0);try{let s=await navigator.clipboard.readText();return t(s),o("completed"),s}catch(s){let l=Boe(s);i(l),o(l.code==="permission_denied"?"denied":"error");return}},[]);return{value:e,status:r,...n!==void 0?{error:n}:{},start:a}},Foe=e=>{let[t,r]=(0,wd.useState)(void 0),[o,n]=(0,wd.useState)("idle"),[i,a]=(0,wd.useState)(void 0),s=(0,wd.useCallback)(async()=>{if(typeof Notification>"u"){a({code:"not_supported",message:"Notification API unavailable in this environment."}),n("error");return}if(!e?.title){a({code:"unknown",message:"useNotifications: `title` option required at start()."}),n("error");return}n("prompting"),a(void 0);let l=Notification.permission;if(l==="default")try{l=await Notification.requestPermission()}catch(c){let u={code:"unknown",message:c instanceof Error?c.message:String(c)};a(u),n("error");return}if(l!=="granted"){a({code:"permission_denied",message:"Notification permission not granted."}),n("denied");return}return new Promise(c=>{let u=new Notification(e.title,{...e.body!==void 0?{body:e.body}:{},...e.icon!==void 0?{icon:e.icon}:{},...e.tag!==void 0?{tag:e.tag}:{}}),p=f=>{let m={outcome:f,...e.tag!==void 0?{tag:e.tag}:{}};r(m),n("completed"),c(m)};u.onclick=()=>p("clicked"),u.onclose=()=>p("closed")})},[e?.title,e?.body,e?.icon,e?.tag]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:s}};Woe=e=>{let[t,r]=(0,Ed.useState)(void 0),[o,n]=(0,Ed.useState)("idle"),[i,a]=(0,Ed.useState)(void 0),s=(0,Ed.useCallback)(async()=>{if(typeof document>"u"){a({code:"not_supported",message:"File picker requires a DOM environment."}),n("error");return}return n("prompting"),a(void 0),new Promise(l=>{let c=document.createElement("input");c.type="file",e?.multiple&&(c.multiple=!0),e?.accept&&(c.accept=e.accept),c.onchange=()=>{let u=c.files?Array.from(c.files):[];if(u.length===0){a({code:"aborted",message:"File picker cancelled by user."}),n("denied"),l(void 0);return}let p={files:u.map(Koe)};r(p),n("completed"),l(p)},c.click()})},[e?.multiple,e?.accept]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:s}};Yoe=e=>{let[t,r]=(0,ro.useState)(void 0),[o,n]=(0,ro.useState)("idle"),[i,a]=(0,ro.useState)(void 0),s=(0,ro.useRef)(null),l=(0,ro.useRef)(null),c=(0,ro.useRef)(0),u=(0,ro.useRef)(null),p=(0,ro.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.mediaDevices||typeof navigator.mediaDevices.getUserMedia!="function"||typeof MediaRecorder>"u"){a({code:"not_supported",message:"MediaRecorder / getUserMedia unavailable."}),n("error");return}n("prompting"),a(void 0);let m;try{m=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(y){let h=Joe(y);a(h),n(h.code==="permission_denied"?"denied":"error");return}l.current=m;let g=e?.mimeType??"audio/webm",v;try{v=new MediaRecorder(m,{mimeType:g})}catch{v=new MediaRecorder(m)}s.current=v;let b=[];return v.ondataavailable=y=>{y.data&&y.data.size>0&&b.push(y.data)},new Promise(y=>{u.current=y,v.onstop=()=>{let h=new Blob(b,{type:v.mimeType}),$=Date.now()-c.current,_={blob:h,durationMs:$,mimeType:v.mimeType};r(_),n("completed"),l.current?.getTracks().forEach(k=>k.stop()),l.current=null,s.current=null,u.current=null,y(_)},c.current=Date.now(),v.start(),n("active")})},[e?.mimeType]),f=(0,ro.useCallback)(()=>{s.current&&s.current.state==="recording"?s.current.stop():n("completed")},[]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:p,stop:f}};Xoe=e=>{let[t,r]=(0,Bi.useState)(void 0),[o,n]=(0,Bi.useState)("idle"),[i,a]=(0,Bi.useState)(void 0),s=(0,Bi.useRef)(null),l=(0,Bi.useCallback)(()=>{s.current&&(s.current.getTracks().forEach(u=>u.stop()),s.current=null),n("completed")},[]),c=(0,Bi.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.mediaDevices||typeof navigator.mediaDevices.getUserMedia!="function"||typeof document>"u"){a({code:"not_supported",message:"getUserMedia / DOM unavailable."}),n("error");return}n("prompting"),a(void 0);let u;try{u=await navigator.mediaDevices.getUserMedia({video:e?.facingMode?{facingMode:e.facingMode}:!0})}catch(p){let f=UU(p);a(f),n(f.code==="permission_denied"?"denied":"error");return}s.current=u,n("active");try{let p=document.createElement("video");p.srcObject=u,p.muted=!0,await p.play(),await new Promise($=>requestAnimationFrame(()=>$()));let f=document.createElement("canvas"),m=p.videoWidth||640,g=p.videoHeight||480;f.width=m,f.height=g;let v=f.getContext("2d");if(!v){a({code:"unknown",message:"2D canvas context unavailable."}),n("error"),l();return}v.drawImage(p,0,0,m,g);let b=e?.mimeType??"image/png",h={dataUrl:e?.quality!==void 0?f.toDataURL(b,e.quality):f.toDataURL(b),width:m,height:g,mimeType:b};return r(h),n("completed"),l(),h}catch(p){let f=UU(p);a(f),n("error"),l();return}},[e?.facingMode,e?.mimeType,e?.quality,l]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:c,stop:l}}});var HU={};Mt(HU,{getGlobalRegistry:()=>eie,installGlobalRegistry:()=>Qoe});function Qoe(e,t=globalThis){let o=t.__ggui__?.contexts??{},n={react:e.react,reactDom:e.reactDom,primitives:e.primitives,components:e.components,compositions:e.compositions,interact:e.interact,wire:e.wire,tokens:e.tokens,gadgets:e.gadgets??{},publicEnv:e.publicEnv??{},contexts:o};t.__ggui__=n;let i=t;return i[bs.react]=e.react,i[bs.primitives]=e.primitives,i[bs.components]=e.components,i[bs.compositions]=e.compositions,i[bs.interact]=e.interact,i[bs.tokens]=e.tokens,i[bs.gadgets]=n.gadgets,i[bs.publicEnv]=n.publicEnv,n}function eie(e=globalThis){return e.__ggui__}var bs,qU=x(()=>{"use strict";bs={react:"__REACT",primitives:"__GGUI_PRIMITIVES",components:"__GGUI_COMPONENTS",compositions:"__GGUI_COMPOSITIONS",interact:"__GGUI_INTERACT",tokens:"__GGUI_TOKENS",gadgets:"__GGUI_CLIENT_LIBRARIES",publicEnv:"__GGUI_PUBLIC_ENV"}});var BU={};Mt(BU,{loadGadgetRegistry:()=>nie});async function nie(e,t,r={}){let o=r.importer??tie,n=r.integrityLoader??rie,i=r.logger??console,a={"@ggui-ai/gadgets":e};for(let s of t){if(s.package in a)continue;let l=s.bundleUrl??s.package;if(l.length===0){i.warn(`[gadgets] package '${s.package}' has an empty load target \u2014 skipping.`);continue}let c=s.bundleUrl!==void 0&&typeof s.bundleSri=="string"&&s.bundleSri.length>0?{url:s.bundleUrl,integrity:s.bundleSri}:void 0;try{let u=c!==void 0?await n({url:c.url,integrity:c.integrity,name:s.package}):await o(l);a[s.package]=u}catch(u){i.warn(`[gadgets] Failed to load package '${s.package}' from '${l}':`,u)}}return a}var tie,rie,GU=x(()=>{"use strict";tie=e=>import(e),rie=({url:e,integrity:t,name:r})=>new Promise((o,n)=>{if(typeof document>"u"){n(new Error(`[gadgets] SRI loader requires a document; cannot load '${r}' from '${e}' in this runtime.`));return}let i=document.createElement("link");i.rel="modulepreload",i.href=e,i.integrity=t,i.crossOrigin="anonymous",i.addEventListener("load",()=>{import(e).then(a=>o(a),a=>n(a instanceof Error?a:new Error(`[gadgets] post-preload import failed for '${r}' from '${e}'`)))},{once:!0}),i.addEventListener("error",()=>{n(new Error(`[gadgets] integrity-load failed for '${r}' from '${e}' (likely SRI mismatch or network failure)`))},{once:!0}),document.head.appendChild(i)})});K2();En();var MV="ai.ggui/render";function W2(e){if(!Dr(e))return{ok:!0};let t=e[MV];if(t===void 0)return{ok:!0};if(!Dr(t))return{ok:!1,reason:"MALFORMED_RENDER"};let r=t;if(typeof r.sessionId!="string"||r.sessionId.length===0||typeof r.appId!="string"||r.appId.length===0||typeof r.runtimeUrl!="string"||r.runtimeUrl.length===0)return{ok:!1,reason:"MALFORMED_RENDER"};let o=r.wsUrl,n=r.wsToken,i=r.expiresAt,a=typeof o=="string"&&o.length>0,s=typeof n=="string"&&n.length>0;if(a!==s)return{ok:!1,reason:"MALFORMED_RENDER"};if(i!==void 0&&typeof i!="string")return{ok:!1,reason:"MALFORMED_RENDER"};let l=r.lastSequence;if(l!==void 0&&(typeof l!="number"||!Number.isInteger(l)||l<0))return{ok:!1,reason:"MALFORMED_RENDER"};let c=r.codeUrl,u=r.kind,p=r.codeHash;if(c!==void 0&&(typeof c!="string"||c.length===0))return{ok:!1,reason:"MALFORMED_RENDER"};if(u!==void 0&&(typeof u!="string"||u.length===0))return{ok:!1,reason:"MALFORMED_RENDER"};if(p!==void 0&&(typeof p!="string"||p.length===0))return{ok:!1,reason:"MALFORMED_RENDER"};if(typeof c=="string"&&c.length>0&&typeof u=="string"&&u.length>0)return{ok:!1,reason:"MALFORMED_RENDER"};let f=r.contractHash,m=r.validatorsUrl,g=typeof f=="string"&&f.length>0&&typeof m=="string"&&m.length>0,v=r.theme!==void 0?jR.safeParse(r.theme):void 0,b=v?.success===!0?v.data:void 0;return{ok:!0,meta:{sessionId:r.sessionId,appId:r.appId,runtimeUrl:r.runtimeUrl,...a&&s?{wsUrl:o,wsToken:n}:{},...i!==void 0?{expiresAt:i}:{},...r.pollingUrl!==void 0?{pollingUrl:r.pollingUrl}:{},...r.themeId!==void 0?{themeId:r.themeId}:{},...r.themeMode!==void 0?{themeMode:r.themeMode}:{},...b!==void 0?{theme:b}:{},...r.gadgets!==void 0?{gadgets:r.gadgets}:{},...r.publicEnv!==void 0?{publicEnv:r.publicEnv}:{},...r.streamWebSocketLocalTools!==void 0?{streamWebSocketLocalTools:r.streamWebSocketLocalTools}:{},...r.permissionsPolicy!==void 0?{permissionsPolicy:r.permissionsPolicy}:{},...l!==void 0?{lastSequence:l}:{},...r.propsJson!==void 0?{propsJson:r.propsJson}:{},...r.contextSlots!==void 0?{contextSlots:r.contextSlots}:{},...g?{contractHash:f,validatorsUrl:m}:{},...typeof c=="string"&&c.length>0?{codeUrl:c}:{},...typeof p=="string"&&p.length>0?{codeHash:p}:{},...typeof u=="string"&&u.length>0?{kind:u}:{}}}}var av="ggui:renderer-ready",J2="ggui:bootstrap-failed",NR="ggui:observe",DR="ggui:lifecycle";Ao();function Qs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jo(e){return typeof e=="string"&&e.length>0}function QW(e){if(e===void 0)return;if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!Qs(r))return[];let o=r.name,n=r.contextName,i=r.schema;if(!jo(o))return[];if(!jo(n))return[];if(!Qs(i))return[];let a=r.debounceMs;if(a!==void 0&&typeof a!="number")return[];if(!("default"in r))return[];let s={name:o,contextName:n,schema:i,default:r.default,...a!==void 0?{debounceMs:a}:{}};t.push(s)}return t}function eJ(e){if(e===void 0||!Array.isArray(e))return;let t=[];for(let r of e){if(!Qs(r))return;let o=r.package;if(!jo(o))return;let n=r.bundleUrl,i=r.bundleSri,a=jo(n)?n:void 0,s=jo(i)&&a!==void 0?i:void 0;t.push({package:o,...a!==void 0?{bundleUrl:a}:{},...s!==void 0?{bundleSri:s}:{}})}return t}function tJ(e){if(e===void 0||!Qs(e))return;let t={};for(let[r,o]of Object.entries(e)){if(!uv.test(r)||typeof o!="string")return;t[r]=o}if(Object.keys(t).length!==0)return t}function rJ(e,t){let r=e.expiresAt,o=!1;if(r!==void 0){let g=Date.parse(r);if(Number.isNaN(g))return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};if(g<=Date.now()){if(!t)return{ok:!1,reason:"EXPIRED_BOOTSTRAP"};o=!0,r=void 0}}let n=eJ(e.gadgets),i=tJ(e.publicEnv),a=e.permissionsPolicy,s=Array.isArray(a)&&a.every(g=>typeof g=="string"&&g.length>0)?a:void 0,l=e.streamWebSocketLocalTools,c=Array.isArray(l)&&l.length>0&&l.every(g=>typeof g=="string"&&g.length>0)?l:void 0,u=e.themeMode,p=u==="light"||u==="dark"?u:void 0,f=QW(e.contextSlots);return{ok:!0,meta:{sessionId:e.sessionId,appId:e.appId,runtimeUrl:e.runtimeUrl,...o?{}:{...e.wsUrl!==void 0&&e.wsToken!==void 0?{wsUrl:e.wsUrl,wsToken:e.wsToken}:{}},...r!==void 0?{expiresAt:r}:{},...e.pollingUrl!==void 0?{pollingUrl:e.pollingUrl}:{},...e.themeId!==void 0?{themeId:e.themeId}:{},...p!==void 0?{themeMode:p}:{},...e.theme!==void 0?{theme:e.theme}:{},...n!==void 0?{gadgets:n}:{},...i!==void 0?{publicEnv:i}:{},...c!==void 0?{streamWebSocketLocalTools:c}:{},...s!==void 0?{permissionsPolicy:s}:{},...e.lastSequence!==void 0?{lastSequence:e.lastSequence}:{},...e.propsJson!==void 0?{propsJson:e.propsJson}:{},...f!==void 0?{contextSlots:f}:{},...e.contractHash!==void 0&&e.validatorsUrl!==void 0?{contractHash:e.contractHash,validatorsUrl:e.validatorsUrl}:{},...e.codeUrl!==void 0?{codeUrl:e.codeUrl}:{},...e.codeHash!==void 0?{codeHash:e.codeHash}:{},...e.kind!==void 0?{kind:e.kind}:{}}}}function ZM(e){if(!jo(e.runtimeUrl))return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let t=jo(e.wsUrl)&&jo(e.wsToken),r=jo(e.codeUrl),o=jo(e.kind),n=r||o;if(!t&&!n)return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let i=rJ(e,n);return i.ok?{ok:!0,meta:i.meta}:i}function ck(){if(typeof globalThis>"u")return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let e=globalThis.__GGUI_META__;if(!Qs(e))return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let t=W2(e);return t.ok?t.meta===void 0?{ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}:ZM(t.meta):{ok:!1,reason:"MALFORMED_BOOTSTRAP"}}function VM(e){if(!Qs(e))return{ok:!1,reason:"MISSING_TOOL_OUTPUT"};let t=e._meta;if(!Qs(t))return{ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"};let o=W2(t);return o.ok?o.meta===void 0?{ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}:ZM(o.meta):{ok:!1,reason:"MALFORMED_BOOTSTRAP"}}Ao();var we;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let a of n)i[a]=a;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),a={};for(let s of i)a[s]=n[s];return e.objectValues(a)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},e.find=(n,i)=>{for(let a of n)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(we||(we={}));var HM;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(HM||(HM={}));var K=we.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(e)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(e)?K.array:e===null?K.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?K.promise:typeof Map<"u"&&e instanceof Map?K.map:typeof Set<"u"&&e instanceof Set?K.set:typeof Date<"u"&&e instanceof Date?K.date:K.object;default:return K.unknown}};var U=we.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var un=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)o._errors.push(r(a));else{let s=o,l=0;for(;l<a.path.length;){let c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,we.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};un.create=e=>new un(e);var nJ=(e,t)=>{let r;switch(e.code){case U.invalid_type:e.received===K.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case U.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,we.jsonStringifyReplacer)}`;break;case U.unrecognized_keys:r=`Unrecognized key(s) in object: ${we.joinValues(e.keys,", ")}`;break;case U.invalid_union:r="Invalid input";break;case U.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${we.joinValues(e.options)}`;break;case U.invalid_enum_value:r=`Invalid enum value. Expected ${we.joinValues(e.options)}, received '${e.received}'`;break;case U.invalid_arguments:r="Invalid function arguments";break;case U.invalid_return_type:r="Invalid function return type";break;case U.invalid_date:r="Invalid date";break;case U.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:we.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case U.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case U.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case U.custom:r="Invalid input";break;case U.invalid_intersection_types:r="Intersection results could not be merged";break;case U.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case U.not_finite:r="Number must be finite";break;default:r=t.defaultError,we.assertNever(e)}return{message:r}},_a=nJ;var oJ=_a;function Zf(){return oJ}var Qv=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let s="",l=o.filter(c=>!!c).slice().reverse();for(let c of l)s=c(a,{data:t,defaultError:s}).message;return{...n,path:i,message:s}};function G(e,t){let r=Zf(),o=Qv({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===_a?void 0:_a].filter(n=>!!n)});e.common.issues.push(o)}var zr=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return ie;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,a=await n.value;o.push({key:i,value:a})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return ie;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}},ie=Object.freeze({status:"aborted"}),Fc=e=>({status:"dirty",value:e}),Lr=e=>({status:"valid",value:e}),uk=e=>e.status==="aborted",dk=e=>e.status==="dirty",el=e=>e.status==="valid",Vf=e=>typeof Promise<"u"&&e instanceof Promise;var Y;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Y||(Y={}));var In=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},qM=(e,t)=>{if(el(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new un(e.common.issues);return this._error=r,this._error}}};function de(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(a,s)=>{let{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??r??s.defaultError}},description:n}}var be=class{get description(){return this._def.description}_getType(t){return si(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new zr,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Vf(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},n=this._parseSync({data:t,path:o.path,parent:o});return qM(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return el(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>el(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Vf(n)?n:Promise.resolve(n));return qM(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let a=t(n),s=()=>i.addIssue({code:U.custom,...o(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new mo({schema:this,typeName:ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return fo.create(this,this._def)}nullable(){return ui.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ka.create(this)}promise(){return tl.create(this,this._def)}or(t){return Xc.create([this,t],this._def)}and(t){return Qc.create(this,t,this._def)}transform(t){return new mo({...de(this._def),schema:this,typeName:ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new ou({...de(this._def),innerType:this,defaultValue:r,typeName:ne.ZodDefault})}brand(){return new e1({typeName:ne.ZodBranded,type:this,...de(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new iu({...de(this._def),innerType:this,catchValue:r,typeName:ne.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return t1.create(this,t)}readonly(){return au.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},iJ=/^c[^\s-]{8,}$/i,aJ=/^[0-9a-z]+$/,sJ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lJ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,cJ=/^[a-z0-9_-]{21}$/i,uJ=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,dJ=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pJ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fJ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",pk,mJ=/^(?:(?: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])$/,gJ=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,hJ=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,yJ=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vJ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$J=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,BM="((\\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])))",bJ=new RegExp(`^${BM}$`);function GM(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function xJ(e){return new RegExp(`^${GM(e)}$`)}function _J(e){let t=`${BM}T${GM(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function SJ(e,t){return!!((t==="v4"||!t)&&mJ.test(e)||(t==="v6"||!t)&&hJ.test(e))}function kJ(e,t){if(!uJ.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function wJ(e,t){return!!((t==="v4"||!t)&&gJ.test(e)||(t==="v6"||!t)&&yJ.test(e))}var Wc=class e extends be{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==K.string){let i=this._getOrReturnCtx(t);return G(i,{code:U.invalid_type,expected:K.string,received:i.parsedType}),ie}let o=new zr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),G(n,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),G(n,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(n=this._getOrReturnCtx(t,n),a?G(n,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&G(n,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")pJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"email",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")pk||(pk=new RegExp(fJ,"u")),pk.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"emoji",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")lJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"uuid",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")cJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"nanoid",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")iJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"cuid",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")aJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"cuid2",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")sJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"ulid",code:U.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),G(n,{validation:"url",code:U.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"regex",code:U.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),G(n,{code:U.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),G(n,{code:U.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),G(n,{code:U.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?_J(i).test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{code:U.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?bJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{code:U.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?xJ(i).test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{code:U.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?dJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"duration",code:U.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?SJ(t.data,i.version)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"ip",code:U.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?kJ(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"jwt",code:U.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?wJ(t.data,i.version)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"cidr",code:U.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?vJ.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"base64",code:U.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?$J.test(t.data)||(n=this._getOrReturnCtx(t,n),G(n,{validation:"base64url",code:U.invalid_string,message:i.message}),o.dirty()):we.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:U.invalid_string,...Y.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Y.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Y.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Y.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Y.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Y.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Y.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Y.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Y.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Y.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Y.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Y.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Y.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Y.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Y.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Y.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Y.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Y.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Y.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Y.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Y.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Y.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Y.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Y.errToObj(r)})}nonempty(t){return this.min(1,Y.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Wc.create=e=>new Wc({checks:[],typeName:ne.ZodString,coerce:e?.coerce??!1,...de(e)});function EJ(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),a=Number.parseInt(t.toFixed(n).replace(".",""));return i%a/10**n}var Hf=class e extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==K.number){let i=this._getOrReturnCtx(t);return G(i,{code:U.invalid_type,expected:K.number,received:i.parsedType}),ie}let o,n=new zr;for(let i of this._def.checks)i.kind==="int"?we.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),G(o,{code:U.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),G(o,{code:U.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),G(o,{code:U.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?EJ(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),G(o,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),G(o,{code:U.not_finite,message:i.message}),n.dirty()):we.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Y.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Y.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Y.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Y.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:Y.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Y.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Y.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Y.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Y.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Y.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Y.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Y.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Y.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Y.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&we.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};Hf.create=e=>new Hf({checks:[],typeName:ne.ZodNumber,coerce:e?.coerce||!1,...de(e)});var qf=class e extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==K.bigint)return this._getInvalidInput(t);let o,n=new zr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),G(o,{code:U.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),G(o,{code:U.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),G(o,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):we.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return G(r,{code:U.invalid_type,expected:K.bigint,received:r.parsedType}),ie}gte(t,r){return this.setLimit("min",t,!0,Y.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Y.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Y.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Y.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:Y.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Y.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Y.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Y.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Y.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Y.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};qf.create=e=>new qf({checks:[],typeName:ne.ZodBigInt,coerce:e?.coerce??!1,...de(e)});var Bf=class extends be{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==K.boolean){let o=this._getOrReturnCtx(t);return G(o,{code:U.invalid_type,expected:K.boolean,received:o.parsedType}),ie}return Lr(t.data)}};Bf.create=e=>new Bf({typeName:ne.ZodBoolean,coerce:e?.coerce||!1,...de(e)});var Gf=class e extends be{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==K.date){let i=this._getOrReturnCtx(t);return G(i,{code:U.invalid_type,expected:K.date,received:i.parsedType}),ie}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return G(i,{code:U.invalid_date}),ie}let o=new zr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),G(n,{code:U.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),G(n,{code:U.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):we.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Y.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Y.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Gf.create=e=>new Gf({checks:[],coerce:e?.coerce||!1,typeName:ne.ZodDate,...de(e)});var Ff=class extends be{_parse(t){if(this._getType(t)!==K.symbol){let o=this._getOrReturnCtx(t);return G(o,{code:U.invalid_type,expected:K.symbol,received:o.parsedType}),ie}return Lr(t.data)}};Ff.create=e=>new Ff({typeName:ne.ZodSymbol,...de(e)});var Jc=class extends be{_parse(t){if(this._getType(t)!==K.undefined){let o=this._getOrReturnCtx(t);return G(o,{code:U.invalid_type,expected:K.undefined,received:o.parsedType}),ie}return Lr(t.data)}};Jc.create=e=>new Jc({typeName:ne.ZodUndefined,...de(e)});var Yc=class extends be{_parse(t){if(this._getType(t)!==K.null){let o=this._getOrReturnCtx(t);return G(o,{code:U.invalid_type,expected:K.null,received:o.parsedType}),ie}return Lr(t.data)}};Yc.create=e=>new Yc({typeName:ne.ZodNull,...de(e)});var Kf=class extends be{constructor(){super(...arguments),this._any=!0}_parse(t){return Lr(t.data)}};Kf.create=e=>new Kf({typeName:ne.ZodAny,...de(e)});var Sa=class extends be{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Lr(t.data)}};Sa.create=e=>new Sa({typeName:ne.ZodUnknown,...de(e)});var No=class extends be{_parse(t){let r=this._getOrReturnCtx(t);return G(r,{code:U.invalid_type,expected:K.never,received:r.parsedType}),ie}};No.create=e=>new No({typeName:ne.ZodNever,...de(e)});var Wf=class extends be{_parse(t){if(this._getType(t)!==K.undefined){let o=this._getOrReturnCtx(t);return G(o,{code:U.invalid_type,expected:K.void,received:o.parsedType}),ie}return Lr(t.data)}};Wf.create=e=>new Wf({typeName:ne.ZodVoid,...de(e)});var ka=class e extends be{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==K.array)return G(r,{code:U.invalid_type,expected:K.array,received:r.parsedType}),ie;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,s=r.data.length<n.exactLength.value;(a||s)&&(G(r,{code:a?U.too_big:U.too_small,minimum:s?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(G(r,{code:U.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(G(r,{code:U.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>n.type._parseAsync(new In(r,a,r.path,s)))).then(a=>zr.mergeArray(o,a));let i=[...r.data].map((a,s)=>n.type._parseSync(new In(r,a,r.path,s)));return zr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Y.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Y.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Y.toString(r)}})}nonempty(t){return this.min(1,t)}};ka.create=(e,t)=>new ka({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ne.ZodArray,...de(t)});function Kc(e){if(e instanceof dn){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=fo.create(Kc(o))}return new dn({...e._def,shape:()=>t})}else return e instanceof ka?new ka({...e._def,type:Kc(e.element)}):e instanceof fo?fo.create(Kc(e.unwrap())):e instanceof ui?ui.create(Kc(e.unwrap())):e instanceof ci?ci.create(e.items.map(t=>Kc(t))):e}var dn=class e extends be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=we.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==K.object){let c=this._getOrReturnCtx(t);return G(c,{code:U.invalid_type,expected:K.object,received:c.parsedType}),ie}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof No&&this._def.unknownKeys==="strip"))for(let c in n.data)a.includes(c)||s.push(c);let l=[];for(let c of a){let u=i[c],p=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new In(n,p,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof No){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")s.length>0&&(G(n,{code:U.unrecognized_keys,keys:s}),o.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let p=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new In(n,p,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let p=await u.key,f=await u.value;c.push({key:p,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>zr.mergeObjectSync(o,c)):zr.mergeObjectSync(o,l)}get shape(){return this._def.shape()}strict(t){return Y.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:Y.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ne.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of we.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of we.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Kc(this)}partial(t){let r={};for(let o of we.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of we.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof fo;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return FM(we.objectKeys(this.shape))}};dn.create=(e,t)=>new dn({shape:()=>e,unknownKeys:"strip",catchall:No.create(),typeName:ne.ZodObject,...de(t)});dn.strictCreate=(e,t)=>new dn({shape:()=>e,unknownKeys:"strict",catchall:No.create(),typeName:ne.ZodObject,...de(t)});dn.lazycreate=(e,t)=>new dn({shape:e,unknownKeys:"strip",catchall:No.create(),typeName:ne.ZodObject,...de(t)});var Xc=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new un(s.ctx.common.issues));return G(r,{code:U.invalid_union,unionErrors:a}),ie}if(r.common.async)return Promise.all(o.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let i,a=[];for(let l of o){let c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(l=>new un(l));return G(r,{code:U.invalid_union,unionErrors:s}),ie}}get options(){return this._def.options}};Xc.create=(e,t)=>new Xc({options:e,typeName:ne.ZodUnion,...de(t)});var li=e=>e instanceof eu?li(e.schema):e instanceof mo?li(e.innerType()):e instanceof tu?[e.value]:e instanceof ru?e.options:e instanceof nu?we.objectValues(e.enum):e instanceof ou?li(e._def.innerType):e instanceof Jc?[void 0]:e instanceof Yc?[null]:e instanceof fo?[void 0,...li(e.unwrap())]:e instanceof ui?[null,...li(e.unwrap())]:e instanceof e1||e instanceof au?li(e.unwrap()):e instanceof iu?li(e._def.innerType):[],fk=class e extends be{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==K.object)return G(r,{code:U.invalid_type,expected:K.object,received:r.parsedType}),ie;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(G(r,{code:U.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let a=li(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(n.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);n.set(s,i)}}return new e({typeName:ne.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...de(o)})}};function mk(e,t){let r=si(e),o=si(t);if(e===t)return{valid:!0,data:e};if(r===K.object&&o===K.object){let n=we.objectKeys(t),i=we.objectKeys(e).filter(s=>n.indexOf(s)!==-1),a={...e,...t};for(let s of i){let l=mk(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(r===K.array&&o===K.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],l=mk(a,s);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return r===K.date&&o===K.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Qc=class extends be{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,a)=>{if(uk(i)||uk(a))return ie;let s=mk(i.value,a.value);return s.valid?((dk(i)||dk(a))&&r.dirty(),{status:r.value,value:s.data}):(G(o,{code:U.invalid_intersection_types}),ie)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>n(i,a)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Qc.create=(e,t,r)=>new Qc({left:e,right:t,typeName:ne.ZodIntersection,...de(r)});var ci=class e extends be{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==K.array)return G(o,{code:U.invalid_type,expected:K.array,received:o.parsedType}),ie;if(o.data.length<this._def.items.length)return G(o,{code:U.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&o.data.length>this._def.items.length&&(G(o,{code:U.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((a,s)=>{let l=this._def.items[s]||this._def.rest;return l?l._parse(new In(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>zr.mergeArray(r,a)):zr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ci.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ci({items:e,typeName:ne.ZodTuple,rest:null,...de(t)})};var gk=class e extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==K.object)return G(o,{code:U.invalid_type,expected:K.object,received:o.parsedType}),ie;let n=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)n.push({key:i._parse(new In(o,s,o.path,s)),value:a._parse(new In(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?zr.mergeObjectAsync(r,n):zr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof be?new e({keyType:t,valueType:r,typeName:ne.ZodRecord,...de(o)}):new e({keyType:Wc.create(),valueType:t,typeName:ne.ZodRecord,...de(r)})}},Jf=class extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==K.map)return G(o,{code:U.invalid_type,expected:K.map,received:o.parsedType}),ie;let n=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,l],c)=>({key:n._parse(new In(o,s,o.path,[c,"key"])),value:i._parse(new In(o,l,o.path,[c,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let l of a){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ie;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let l of a){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ie;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}}}};Jf.create=(e,t,r)=>new Jf({valueType:t,keyType:e,typeName:ne.ZodMap,...de(r)});var Yf=class e extends be{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==K.set)return G(o,{code:U.invalid_type,expected:K.set,received:o.parsedType}),ie;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(G(o,{code:U.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(G(o,{code:U.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function a(l){let c=new Set;for(let u of l){if(u.status==="aborted")return ie;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}let s=[...o.data.values()].map((l,c)=>i._parse(new In(o,l,o.path,c)));return o.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:Y.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Y.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Yf.create=(e,t)=>new Yf({valueType:e,minSize:null,maxSize:null,typeName:ne.ZodSet,...de(t)});var hk=class e extends be{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==K.function)return G(r,{code:U.invalid_type,expected:K.function,received:r.parsedType}),ie;function o(s,l){return Qv({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Zf(),_a].filter(c=>!!c),issueData:{code:U.invalid_arguments,argumentsError:l}})}function n(s,l){return Qv({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Zf(),_a].filter(c=>!!c),issueData:{code:U.invalid_return_type,returnTypeError:l}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof tl){let s=this;return Lr(async function(...l){let c=new un([]),u=await s._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(o(l,m)),c}),p=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(p,i).catch(m=>{throw c.addIssue(n(p,m)),c})})}else{let s=this;return Lr(function(...l){let c=s._def.args.safeParse(l,i);if(!c.success)throw new un([o(l,c.error)]);let u=Reflect.apply(a,this,c.data),p=s._def.returns.safeParse(u,i);if(!p.success)throw new un([n(u,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ci.create(t).rest(Sa.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||ci.create([]).rest(Sa.create()),returns:r||Sa.create(),typeName:ne.ZodFunction,...de(o)})}},eu=class extends be{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};eu.create=(e,t)=>new eu({getter:e,typeName:ne.ZodLazy,...de(t)});var tu=class extends be{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return G(r,{received:r.data,code:U.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:t.data}}get value(){return this._def.value}};tu.create=(e,t)=>new tu({value:e,typeName:ne.ZodLiteral,...de(t)});function FM(e,t){return new ru({values:e,typeName:ne.ZodEnum,...de(t)})}var ru=class e extends be{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return G(r,{expected:we.joinValues(o),received:r.parsedType,code:U.invalid_type}),ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return G(r,{received:r.data,code:U.invalid_enum_value,options:o}),ie}return Lr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ru.create=FM;var nu=class extends be{_parse(t){let r=we.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==K.string&&o.parsedType!==K.number){let n=we.objectValues(r);return G(o,{expected:we.joinValues(n),received:o.parsedType,code:U.invalid_type}),ie}if(this._cache||(this._cache=new Set(we.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=we.objectValues(r);return G(o,{received:o.data,code:U.invalid_enum_value,options:n}),ie}return Lr(t.data)}get enum(){return this._def.values}};nu.create=(e,t)=>new nu({values:e,typeName:ne.ZodNativeEnum,...de(t)});var tl=class extends be{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==K.promise&&r.common.async===!1)return G(r,{code:U.invalid_type,expected:K.promise,received:r.parsedType}),ie;let o=r.parsedType===K.promise?r.data:Promise.resolve(r.data);return Lr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};tl.create=(e,t)=>new tl({type:e,typeName:ne.ZodPromise,...de(t)});var mo=class extends be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:a=>{G(o,a),a.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let a=n.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return ie;let l=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return l.status==="aborted"?ie:l.status==="dirty"?Fc(l.value):r.value==="dirty"?Fc(l.value):l});{if(r.value==="aborted")return ie;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?ie:s.status==="dirty"?Fc(s.value):r.value==="dirty"?Fc(s.value):s}}if(n.type==="refinement"){let a=s=>{let l=n.refinement(s,i);if(o.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?ie:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?ie:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(n.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!el(a))return ie;let s=n.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>el(a)?Promise.resolve(n.transform(a.value,i)).then(s=>({status:r.value,value:s})):ie);we.assertNever(n)}};mo.create=(e,t,r)=>new mo({schema:e,typeName:ne.ZodEffects,effect:t,...de(r)});mo.createWithPreprocess=(e,t,r)=>new mo({schema:t,effect:{type:"preprocess",transform:e},typeName:ne.ZodEffects,...de(r)});var fo=class extends be{_parse(t){return this._getType(t)===K.undefined?Lr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};fo.create=(e,t)=>new fo({innerType:e,typeName:ne.ZodOptional,...de(t)});var ui=class extends be{_parse(t){return this._getType(t)===K.null?Lr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ui.create=(e,t)=>new ui({innerType:e,typeName:ne.ZodNullable,...de(t)});var ou=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===K.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ou.create=(e,t)=>new ou({innerType:e,typeName:ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...de(t)});var iu=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Vf(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new un(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new un(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};iu.create=(e,t)=>new iu({innerType:e,typeName:ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...de(t)});var Xf=class extends be{_parse(t){if(this._getType(t)!==K.nan){let o=this._getOrReturnCtx(t);return G(o,{code:U.invalid_type,expected:K.nan,received:o.parsedType}),ie}return{status:"valid",value:t.data}}};Xf.create=e=>new Xf({typeName:ne.ZodNaN,...de(e)});var vme=Symbol("zod_brand"),e1=class extends be{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},t1=class e extends be{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ie:i.status==="dirty"?(r.dirty(),Fc(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?ie:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:ne.ZodPipeline})}},au=class extends be{_parse(t){let r=this._def.innerType._parse(t),o=n=>(el(n)&&(n.value=Object.freeze(n.value)),n);return Vf(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};au.create=(e,t)=>new au({innerType:e,typeName:ne.ZodReadonly,...de(t)});var $me={object:dn.lazycreate},ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ne||(ne={}));var bme=Wc.create,xme=Hf.create,_me=Xf.create,Sme=qf.create,kme=Bf.create,wme=Gf.create,Eme=Ff.create,Tme=Jc.create,zme=Yc.create,Rme=Kf.create,Cme=Sa.create,Ime=No.create,Ome=Wf.create,Mme=ka.create,TJ=dn.create,Ame=dn.strictCreate,jme=Xc.create,Nme=fk.create,Dme=Qc.create,Pme=ci.create,Ume=gk.create,Lme=Jf.create,Zme=Yf.create,Vme=hk.create,Hme=eu.create,qme=tu.create,Bme=ru.create,Gme=nu.create,Fme=tl.create,Kme=mo.create,Wme=fo.create,Jme=ui.create,Yme=mo.createWithPreprocess,Xme=t1.create;Tt();Tt();Tt();X();Tt();Tt();pc();g0();Tt();Tt();function r1(e){return!!e._zod}function n1(e,t){return r1(e)?Es(e,t):e.safeParse(t)}function JM(e){if(!e)return;let t;if(r1(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function YM(e){if(r1(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let o=e.value;if(o!==void 0)return o}Qf();var wa="io.modelcontextprotocol/related-task",i1="2.0",mr=Wp(e=>e!==null&&(typeof e=="object"||typeof e=="function")),QM=Ve([I(),je().int()]),eA=I(),Mge=er({ttl:Ve([je(),Ps()]).optional(),pollInterval:je().optional()}),jJ=F({ttl:je().optional()}),NJ=F({taskId:I()}),bk=er({progressToken:QM.optional(),[wa]:NJ.optional()}),pn=F({_meta:bk.optional()}),em=pn.extend({task:jJ.optional()}),tA=e=>em.safeParse(e).success,gr=F({method:I(),params:pn.loose().optional()}),On=F({_meta:bk.optional()}),Mn=F({method:I(),params:On.loose().optional()}),hr=er({_meta:bk.optional()}),lu=Ve([I(),je().int()]),rA=F({jsonrpc:J(i1),id:lu,...gr.shape}).strict(),xk=e=>rA.safeParse(e).success,nA=F({jsonrpc:J(i1),...Mn.shape}).strict(),oA=e=>nA.safeParse(e).success,_k=F({jsonrpc:J(i1),id:lu,result:hr}).strict(),tm=e=>_k.safeParse(e).success;var He;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(He||(He={}));var Sk=F({jsonrpc:J(i1),id:lu.optional(),error:F({code:je().int(),message:I(),data:Ge().optional()})}).strict();var iA=e=>Sk.safeParse(e).success;var aA=Ve([rA,nA,_k,Sk]),Age=Ve([_k,Sk]),a1=hr.strict(),DJ=On.extend({requestId:lu.optional(),reason:I().optional()}),s1=Mn.extend({method:J("notifications/cancelled"),params:DJ}),PJ=F({src:I(),mimeType:I().optional(),sizes:ge(I()).optional(),theme:tr(["light","dark"]).optional()}),rm=F({icons:ge(PJ).optional()}),su=F({name:I(),title:I().optional()}),nm=su.extend({...su.shape,...rm.shape,version:I(),websiteUrl:I().optional(),description:I().optional()}),UJ=Us(F({applyDefaults:St().optional()}),We(I(),Ge())),LJ=Sc(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Us(F({form:UJ.optional(),url:mr.optional()}),We(I(),Ge()).optional())),ZJ=er({list:mr.optional(),cancel:mr.optional(),requests:er({sampling:er({createMessage:mr.optional()}).optional(),elicitation:er({create:mr.optional()}).optional()}).optional()}),VJ=er({list:mr.optional(),cancel:mr.optional(),requests:er({tools:er({call:mr.optional()}).optional()}).optional()}),HJ=F({experimental:We(I(),mr).optional(),sampling:F({context:mr.optional(),tools:mr.optional()}).optional(),elicitation:LJ.optional(),roots:F({listChanged:St().optional()}).optional(),tasks:ZJ.optional()}),qJ=pn.extend({protocolVersion:I(),capabilities:HJ,clientInfo:nm}),BJ=gr.extend({method:J("initialize"),params:qJ});var GJ=F({experimental:We(I(),mr).optional(),logging:mr.optional(),completions:mr.optional(),prompts:F({listChanged:St().optional()}).optional(),resources:F({subscribe:St().optional(),listChanged:St().optional()}).optional(),tools:F({listChanged:St().optional()}).optional(),tasks:VJ.optional()}),FJ=hr.extend({protocolVersion:I(),capabilities:GJ,serverInfo:nm,instructions:I().optional()}),KJ=Mn.extend({method:J("notifications/initialized"),params:On.optional()});var cu=gr.extend({method:J("ping"),params:pn.optional()}),WJ=F({progress:je(),total:rt(je()),message:rt(I())}),JJ=F({...On.shape,...WJ.shape,progressToken:QM}),l1=Mn.extend({method:J("notifications/progress"),params:JJ}),YJ=pn.extend({cursor:eA.optional()}),om=gr.extend({params:YJ.optional()}),im=hr.extend({nextCursor:eA.optional()}),XJ=tr(["working","input_required","completed","failed","cancelled"]),am=F({taskId:I(),status:XJ,ttl:Ve([je(),Ps()]),createdAt:I(),lastUpdatedAt:I(),pollInterval:rt(je()),statusMessage:rt(I())}),c1=hr.extend({task:am}),QJ=On.merge(am),sm=Mn.extend({method:J("notifications/tasks/status"),params:QJ}),u1=gr.extend({method:J("tasks/get"),params:pn.extend({taskId:I()})}),d1=hr.merge(am),p1=gr.extend({method:J("tasks/result"),params:pn.extend({taskId:I()})}),jge=hr.loose(),f1=om.extend({method:J("tasks/list")}),m1=im.extend({tasks:ge(am)}),g1=gr.extend({method:J("tasks/cancel"),params:pn.extend({taskId:I()})}),sA=hr.merge(am),lA=F({uri:I(),mimeType:rt(I()),_meta:We(I(),Ge()).optional()}),cA=lA.extend({text:I()}),kk=I().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),uA=lA.extend({blob:kk}),lm=tr(["user","assistant"]),uu=F({audience:ge(lm).optional(),priority:je().min(0).max(1).optional(),lastModified:ti.datetime({offset:!0}).optional()}),dA=F({...su.shape,...rm.shape,uri:I(),description:rt(I()),mimeType:rt(I()),annotations:uu.optional(),_meta:rt(er({}))}),eY=F({...su.shape,...rm.shape,uriTemplate:I(),description:rt(I()),mimeType:rt(I()),annotations:uu.optional(),_meta:rt(er({}))}),tY=om.extend({method:J("resources/list")}),wk=im.extend({resources:ge(dA)}),rY=om.extend({method:J("resources/templates/list")}),nY=im.extend({resourceTemplates:ge(eY)}),Ek=pn.extend({uri:I()}),oY=Ek,iY=gr.extend({method:J("resources/read"),params:oY}),Tk=hr.extend({contents:ge(Ve([cA,uA]))}),aY=Mn.extend({method:J("notifications/resources/list_changed"),params:On.optional()}),sY=Ek,lY=gr.extend({method:J("resources/subscribe"),params:sY}),cY=Ek,uY=gr.extend({method:J("resources/unsubscribe"),params:cY}),dY=On.extend({uri:I()}),pY=Mn.extend({method:J("notifications/resources/updated"),params:dY}),fY=F({name:I(),description:rt(I()),required:rt(St())}),mY=F({...su.shape,...rm.shape,description:rt(I()),arguments:rt(ge(fY)),_meta:rt(er({}))}),gY=om.extend({method:J("prompts/list")}),hY=im.extend({prompts:ge(mY)}),yY=pn.extend({name:I(),arguments:We(I(),I()).optional()}),vY=gr.extend({method:J("prompts/get"),params:yY}),zk=F({type:J("text"),text:I(),annotations:uu.optional(),_meta:We(I(),Ge()).optional()}),Rk=F({type:J("image"),data:kk,mimeType:I(),annotations:uu.optional(),_meta:We(I(),Ge()).optional()}),Ck=F({type:J("audio"),data:kk,mimeType:I(),annotations:uu.optional(),_meta:We(I(),Ge()).optional()}),$Y=F({type:J("tool_use"),name:I(),id:I(),input:We(I(),Ge()),_meta:We(I(),Ge()).optional()}),Ik=F({type:J("resource"),resource:Ve([cA,uA]),annotations:uu.optional(),_meta:We(I(),Ge()).optional()}),Ok=dA.extend({type:J("resource_link")}),du=Ve([zk,Rk,Ck,Ok,Ik]),bY=F({role:lm,content:du}),xY=hr.extend({description:I().optional(),messages:ge(bY)}),_Y=Mn.extend({method:J("notifications/prompts/list_changed"),params:On.optional()}),SY=F({title:I().optional(),readOnlyHint:St().optional(),destructiveHint:St().optional(),idempotentHint:St().optional(),openWorldHint:St().optional()}),kY=F({taskSupport:tr(["required","optional","forbidden"]).optional()}),h1=F({...su.shape,...rm.shape,description:I().optional(),inputSchema:F({type:J("object"),properties:We(I(),mr).optional(),required:ge(I()).optional()}).catchall(Ge()),outputSchema:F({type:J("object"),properties:We(I(),mr).optional(),required:ge(I()).optional()}).catchall(Ge()).optional(),annotations:SY.optional(),execution:kY.optional(),_meta:We(I(),Ge()).optional()}),Mk=om.extend({method:J("tools/list")}),wY=im.extend({tools:ge(h1)}),pu=hr.extend({content:ge(du).default([]),structuredContent:We(I(),Ge()).optional(),isError:St().optional()}),Nge=pu.or(hr.extend({toolResult:Ge()})),EY=em.extend({name:I(),arguments:We(I(),Ge()).optional()}),Ak=gr.extend({method:J("tools/call"),params:EY}),TY=Mn.extend({method:J("notifications/tools/list_changed"),params:On.optional()}),Dge=F({autoRefresh:St().default(!0),debounceMs:je().int().nonnegative().default(300)}),pA=tr(["debug","info","notice","warning","error","critical","alert","emergency"]),zY=pn.extend({level:pA}),RY=gr.extend({method:J("logging/setLevel"),params:zY}),CY=On.extend({level:pA,logger:I().optional(),data:Ge()}),IY=Mn.extend({method:J("notifications/message"),params:CY}),OY=F({name:I().optional()}),MY=F({hints:ge(OY).optional(),costPriority:je().min(0).max(1).optional(),speedPriority:je().min(0).max(1).optional(),intelligencePriority:je().min(0).max(1).optional()}),AY=F({mode:tr(["auto","required","none"]).optional()}),jY=F({type:J("tool_result"),toolUseId:I().describe("The unique identifier for the corresponding tool call."),content:ge(du).default([]),structuredContent:F({}).loose().optional(),isError:St().optional(),_meta:We(I(),Ge()).optional()}),NY=bc("type",[zk,Rk,Ck]),o1=bc("type",[zk,Rk,Ck,$Y,jY]),DY=F({role:lm,content:Ve([o1,ge(o1)]),_meta:We(I(),Ge()).optional()}),PY=em.extend({messages:ge(DY),modelPreferences:MY.optional(),systemPrompt:I().optional(),includeContext:tr(["none","thisServer","allServers"]).optional(),temperature:je().optional(),maxTokens:je().int(),stopSequences:ge(I()).optional(),metadata:mr.optional(),tools:ge(h1).optional(),toolChoice:AY.optional()}),UY=gr.extend({method:J("sampling/createMessage"),params:PY}),jk=hr.extend({model:I(),stopReason:rt(tr(["endTurn","stopSequence","maxTokens"]).or(I())),role:lm,content:NY}),Nk=hr.extend({model:I(),stopReason:rt(tr(["endTurn","stopSequence","maxTokens","toolUse"]).or(I())),role:lm,content:Ve([o1,ge(o1)])}),LY=F({type:J("boolean"),title:I().optional(),description:I().optional(),default:St().optional()}),ZY=F({type:J("string"),title:I().optional(),description:I().optional(),minLength:je().optional(),maxLength:je().optional(),format:tr(["email","uri","date","date-time"]).optional(),default:I().optional()}),VY=F({type:tr(["number","integer"]),title:I().optional(),description:I().optional(),minimum:je().optional(),maximum:je().optional(),default:je().optional()}),HY=F({type:J("string"),title:I().optional(),description:I().optional(),enum:ge(I()),default:I().optional()}),qY=F({type:J("string"),title:I().optional(),description:I().optional(),oneOf:ge(F({const:I(),title:I()})),default:I().optional()}),BY=F({type:J("string"),title:I().optional(),description:I().optional(),enum:ge(I()),enumNames:ge(I()).optional(),default:I().optional()}),GY=Ve([HY,qY]),FY=F({type:J("array"),title:I().optional(),description:I().optional(),minItems:je().optional(),maxItems:je().optional(),items:F({type:J("string"),enum:ge(I())}),default:ge(I()).optional()}),KY=F({type:J("array"),title:I().optional(),description:I().optional(),minItems:je().optional(),maxItems:je().optional(),items:F({anyOf:ge(F({const:I(),title:I()}))}),default:ge(I()).optional()}),WY=Ve([FY,KY]),JY=Ve([BY,GY,WY]),YY=Ve([JY,LY,ZY,VY]),XY=em.extend({mode:J("form").optional(),message:I(),requestedSchema:F({type:J("object"),properties:We(I(),YY),required:ge(I()).optional()})}),QY=em.extend({mode:J("url"),message:I(),elicitationId:I(),url:I().url()}),eX=Ve([XY,QY]),tX=gr.extend({method:J("elicitation/create"),params:eX}),rX=On.extend({elicitationId:I()}),nX=Mn.extend({method:J("notifications/elicitation/complete"),params:rX}),oX=hr.extend({action:tr(["accept","decline","cancel"]),content:Sc(e=>e===null?void 0:e,We(I(),Ve([I(),je(),St(),ge(I())])).optional())}),iX=F({type:J("ref/resource"),uri:I()});var aX=F({type:J("ref/prompt"),name:I()}),sX=pn.extend({ref:Ve([aX,iX]),argument:F({name:I(),value:I()}),context:F({arguments:We(I(),I()).optional()}).optional()}),lX=gr.extend({method:J("completion/complete"),params:sX});var cX=hr.extend({completion:er({values:ge(I()).max(100),total:rt(je().int()),hasMore:rt(St())})}),uX=F({uri:I().startsWith("file://"),name:I().optional(),_meta:We(I(),Ge()).optional()}),dX=gr.extend({method:J("roots/list"),params:pn.optional()}),pX=hr.extend({roots:ge(uX)}),fX=Mn.extend({method:J("notifications/roots/list_changed"),params:On.optional()}),Pge=Ve([cu,BJ,lX,RY,vY,gY,tY,rY,iY,lY,uY,Ak,Mk,u1,p1,f1,g1]),Uge=Ve([s1,l1,KJ,fX,sm]),Lge=Ve([a1,jk,Nk,oX,pX,d1,m1,c1]),Zge=Ve([cu,UY,tX,dX,u1,p1,f1,g1]),Vge=Ve([s1,l1,IY,pY,aY,TY,_Y,sm,nX]),Hge=Ve([a1,FJ,cX,xY,hY,wk,nY,Tk,pu,wY,d1,m1,c1]),Me=class e extends Error{constructor(t,r,o){super(`MCP error ${t}: ${r}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,r,o){if(t===He.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new $k(n.elicitations,r)}return new e(t,r,o)}},$k=class extends Me{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(He.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Ea(e){return e==="completed"||e==="failed"||e==="cancelled"}var mX=Symbol("Let zodToJsonSchema decide on which parser to use");var She=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Dk(e){let r=JM(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=YM(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Pk(e,t){let r=n1(e,t);if(!r.success)throw r.error;return r.data}var bX=6e4,y1=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(s1,r=>{this._oncancel(r)}),this.setNotificationHandler(l1,r=>{this._onprogress(r)}),this.setRequestHandler(cu,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(u1,async(r,o)=>{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new Me(He.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(p1,async(r,o)=>{let n=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(i,o.sessionId);){if(s.type==="response"||s.type==="error"){let l=s.message,c=l.id,u=this._requestResolvers.get(c);if(u)if(this._requestResolvers.delete(c),s.type==="response")u(l);else{let p=l,f=new Me(p.error.code,p.error.message,p.error.data);u(f)}else{let p=s.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${c}`))}continue}await this._transport?.send(s.message,{relatedRequestId:o.requestId})}}let a=await this._taskStore.getTask(i,o.sessionId);if(!a)throw new Me(He.InvalidParams,`Task not found: ${i}`);if(!Ea(a.status))return await this._waitForTaskUpdate(i,o.signal),await n();if(Ea(a.status)){let s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[wa]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(f1,async(r,o)=>{try{let{tasks:n,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,o.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(n){throw new Me(He.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(g1,async(r,o)=>{try{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new Me(He.InvalidParams,`Task not found: ${r.params.taskId}`);if(Ea(n.status))throw new Me(He.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!i)throw new Me(He.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(n){throw n instanceof Me?n:new Me(He.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,o,n,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:n})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let o=Date.now()-r.startTime;if(r.maxTotalTimeout&&o>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),Me.fromError(He.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:o});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let n=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{n?.(i,a),tm(i)||iA(i)?this._onresponse(i):xk(i)?this._onrequest(i,a):oA(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let r=Me.fromError(He.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,r){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,i=t.params?._meta?.[wa]?.taskId;if(o===void 0){let u={jsonrpc:"2.0",id:t.id,error:{code:He.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:u,timestamp:Date.now()},n?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):n?.send(u).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);let s=tA(t.params)?t.params.task:void 0,l=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,c={signal:a.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async u=>{if(a.signal.aborted)return;let p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(u,p)},sendRequest:async(u,p,f)=>{if(a.signal.aborted)throw new Me(He.ConnectionClosed,"Request was cancelled");let m={...f,relatedRequestId:t.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});let g=m.relatedTask?.taskId??i;return g&&l&&await l.updateTaskStatus(g,"input_required"),await this.request(u,p,m)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:l,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,c)).then(async u=>{if(a.signal.aborted)return;let p={result:u,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:p,timestamp:Date.now()},n?.sessionId):await n?.send(p)},async u=>{if(a.signal.aborted)return;let p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(u.code)?u.code:He.InternalError,message:u.message??"Internal error",...u.data!==void 0&&{data:u.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},n?.sessionId):await n?.send(p)}).catch(u=>this._onerror(new Error(`Failed to send response: ${u}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...o}=t.params,n=Number(r),i=this._progressHandlers.get(n);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(n),s=this._timeoutInfo.get(n);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(l){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),a(l);return}i(o)}_onresponse(t){let r=Number(t.id),o=this._requestResolvers.get(r);if(o){if(this._requestResolvers.delete(r),tm(t))o(t);else{let a=new Me(t.error.code,t.error.message,t.error.data);o(a)}return}let n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(tm(t)&&t.result&&typeof t.result=="object"){let a=t.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(i=!0,this._taskProgressTokens.set(s.taskId,r))}}if(i||this._progressHandlers.delete(r),tm(t))n(t);else{let a=Me.fromError(t.error.code,t.error.message,t.error.data);n(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,o){let{task:n}=o??{};if(!n){try{yield{type:"result",result:await this.request(t,r,o)}}catch(a){yield{type:"error",error:a instanceof Me?a:new Me(He.InternalError,String(a))}}return}let i;try{let a=await this.request(t,c1,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new Me(He.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Ea(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)}:s.status==="failed"?yield{type:"error",error:new Me(He.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new Me(He.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)};return}let l=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(c=>setTimeout(c,l)),o?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof Me?a:new Me(He.InternalError,String(a))}}}request(t,r,o){let{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:l}=o??{};return new Promise((c,u)=>{let p=h=>{u(h)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(h){p(h);return}o?.signal?.throwIfAborted();let f=this._requestMessageId++,m={...t,jsonrpc:"2.0",id:f};o?.onprogress&&(this._progressHandlers.set(f,o.onprogress),m.params={...t.params,_meta:{...t.params?._meta||{},progressToken:f}}),s&&(m.params={...m.params,task:s}),l&&(m.params={...m.params,_meta:{...m.params?._meta||{},[wa]:l}});let g=h=>{this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(h)}},{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`)));let $=h instanceof Me?h:new Me(He.RequestTimeout,String(h));u($)};this._responseHandlers.set(f,h=>{if(!o?.signal?.aborted){if(h instanceof Error)return u(h);try{let $=n1(r,h.result);$.success?c($.data):u($.error)}catch($){u($)}}}),o?.signal?.addEventListener("abort",()=>{g(o?.signal?.reason)});let v=o?.timeout??bX,b=()=>g(Me.fromError(He.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,o?.maxTotalTimeout,b,o?.resetTimeoutOnProgress??!1);let y=l?.taskId;if(y){let h=$=>{let _=this._responseHandlers.get(f);_?_($):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,h),this._enqueueTaskMessage(y,{type:"request",message:m,timestamp:Date.now()}).catch($=>{this._cleanupTimeout(f),u($)})}else this._transport.send(m,{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a}).catch(h=>{this._cleanupTimeout(f),u(h)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},d1,r)}async getTaskResult(t,r,o){return this.request({method:"tasks/result",params:t},r,o)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},m1,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},sA,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=r?.relatedTask?.taskId;if(o){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[wa]:r.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[wa]:r.relatedTask}}}),this._transport?.send(s,r).catch(l=>this._onerror(l))});return}let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[wa]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){let o=Dk(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(n,i)=>{let a=Pk(t,n);return Promise.resolve(r(a,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let o=Dk(t);this._notificationHandlers.set(o,n=>{let i=Pk(t,n);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,o,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,r);for(let n of o)if(n.type==="request"&&xk(n.message)){let i=n.message.id,a=this._requestResolvers.get(i);a?(a(new Me(He.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let o=this._options?.defaultTaskPollInterval??1e3;try{let n=await this._taskStore?.getTask(t);n?.pollInterval&&(o=n.pollInterval)}catch{}return new Promise((n,i)=>{if(r.aborted){i(new Me(He.InvalidRequest,"Request cancelled"));return}let a=setTimeout(n,o);r.addEventListener("abort",()=>{clearTimeout(a),i(new Me(He.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await o.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{let i=await o.getTask(n,r);if(!i)throw new Me(He.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(n,i,a)=>{await o.storeTaskResult(n,i,a,r);let s=await o.getTask(n,r);if(s){let l=sm.parse({method:"notifications/tasks/status",params:s});await this.notification(l),Ea(s.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>o.getTaskResult(n,r),updateTaskStatus:async(n,i,a)=>{let s=await o.getTask(n,r);if(!s)throw new Me(He.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Ea(s.status))throw new Me(He.InvalidParams,`Cannot update task "${n}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(n,i,a,r);let l=await o.getTask(n,r);if(l){let c=sm.parse({method:"notifications/tasks/status",params:l});await this.notification(c),Ea(l.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>o.listTasks(n,r)}}};function fA(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function mA(e,t){let r={...e};for(let o in t){let n=o,i=t[n];if(i===void 0)continue;let a=r[n];fA(a)&&fA(i)?r[n]={...a,...i}:r[n]=i}return r}Qf();Qf();var Sve=(e=>typeof _s<"u"?_s:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof _s<"u"?_s:t)[r]}):e)(function(e){if(typeof _s<"u")return _s.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Uk=class extends y1{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(t,r){}_ensureEventSlot(t){let r=this._eventSlots.get(t);if(!r){let o=this.eventSchemas[t];if(!o)throw Error(`Unknown event: ${String(t)}`);r={listeners:[]},this._eventSlots.set(t,r);let n=o.shape.method.value;this._registeredMethods.add(n);let i=r;super.setNotificationHandler(o,a=>{let s=a.params;this.onEventDispatch(t,s),i.onHandler?.(s);for(let l of[...i.listeners])l(s)})}return r}setEventHandler(t,r){let o=this._ensureEventSlot(t);o.onHandler&&r&&console.warn(`[MCP Apps] on${String(t)} handler replaced. Use addEventListener("${String(t)}", \u2026) to add multiple listeners without replacing.`),o.onHandler=r}getEventHandler(t){return this._eventSlots.get(t)?.onHandler}addEventListener(t,r){this._ensureEventSlot(t).listeners.push(r)}removeEventListener(t,r){let o=this._eventSlots.get(t);if(!o)return;let n=o.listeners.indexOf(r);n!==-1&&o.listeners.splice(n,1)}setRequestHandler=(t,r)=>{this._assertMethodNotRegistered(t,"setRequestHandler"),super.setRequestHandler(t,r)};setNotificationHandler=(t,r)=>{this._assertMethodNotRegistered(t,"setNotificationHandler"),super.setNotificationHandler(t,r)};warnIfRequestHandlerReplaced(t,r,o){r&&o&&console.warn(`[MCP Apps] ${t} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(t,r)=>{let o=t.shape.method.value;this._registeredMethods.add(o),super.setRequestHandler(t,r)};_assertMethodNotRegistered(t,r){let o=t.shape.method.value;if(this._registeredMethods.has(o))throw Error(`Handler for "${o}" already registered (via ${r}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(o)}},xX="2026-01-26";var _X="ui/notifications/tool-input-partial";var um=class{eventTarget;eventSource;messageListener;constructor(t=window.parent,r){this.eventTarget=t,this.eventSource=r,this.messageListener=o=>{if(r&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let n=aA.safeParse(o.data);n.success?(console.debug("Parsed message",n.data),this.onmessage?.(n.data)):o.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",n.error.message,o):(console.error("Failed to parse message",n.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(t,r){t.method!==_X&&console.debug("Sending message",t),this.eventTarget.postMessage(t,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},SX=d.union([d.literal("light"),d.literal("dark")]).describe("Color theme preference for the host environment."),dm=d.union([d.literal("inline"),d.literal("fullscreen"),d.literal("pip")]).describe("Display mode for UI presentation."),kX=d.union([d.literal("--color-background-primary"),d.literal("--color-background-secondary"),d.literal("--color-background-tertiary"),d.literal("--color-background-inverse"),d.literal("--color-background-ghost"),d.literal("--color-background-info"),d.literal("--color-background-danger"),d.literal("--color-background-success"),d.literal("--color-background-warning"),d.literal("--color-background-disabled"),d.literal("--color-text-primary"),d.literal("--color-text-secondary"),d.literal("--color-text-tertiary"),d.literal("--color-text-inverse"),d.literal("--color-text-ghost"),d.literal("--color-text-info"),d.literal("--color-text-danger"),d.literal("--color-text-success"),d.literal("--color-text-warning"),d.literal("--color-text-disabled"),d.literal("--color-border-primary"),d.literal("--color-border-secondary"),d.literal("--color-border-tertiary"),d.literal("--color-border-inverse"),d.literal("--color-border-ghost"),d.literal("--color-border-info"),d.literal("--color-border-danger"),d.literal("--color-border-success"),d.literal("--color-border-warning"),d.literal("--color-border-disabled"),d.literal("--color-ring-primary"),d.literal("--color-ring-secondary"),d.literal("--color-ring-inverse"),d.literal("--color-ring-info"),d.literal("--color-ring-danger"),d.literal("--color-ring-success"),d.literal("--color-ring-warning"),d.literal("--font-sans"),d.literal("--font-mono"),d.literal("--font-weight-normal"),d.literal("--font-weight-medium"),d.literal("--font-weight-semibold"),d.literal("--font-weight-bold"),d.literal("--font-text-xs-size"),d.literal("--font-text-sm-size"),d.literal("--font-text-md-size"),d.literal("--font-text-lg-size"),d.literal("--font-heading-xs-size"),d.literal("--font-heading-sm-size"),d.literal("--font-heading-md-size"),d.literal("--font-heading-lg-size"),d.literal("--font-heading-xl-size"),d.literal("--font-heading-2xl-size"),d.literal("--font-heading-3xl-size"),d.literal("--font-text-xs-line-height"),d.literal("--font-text-sm-line-height"),d.literal("--font-text-md-line-height"),d.literal("--font-text-lg-line-height"),d.literal("--font-heading-xs-line-height"),d.literal("--font-heading-sm-line-height"),d.literal("--font-heading-md-line-height"),d.literal("--font-heading-lg-line-height"),d.literal("--font-heading-xl-line-height"),d.literal("--font-heading-2xl-line-height"),d.literal("--font-heading-3xl-line-height"),d.literal("--border-radius-xs"),d.literal("--border-radius-sm"),d.literal("--border-radius-md"),d.literal("--border-radius-lg"),d.literal("--border-radius-xl"),d.literal("--border-radius-full"),d.literal("--border-width-regular"),d.literal("--shadow-hairline"),d.literal("--shadow-sm"),d.literal("--shadow-md"),d.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),wX=d.record(kX.describe(`Style variables for theming MCP apps.
156
156
 
@@ -251,7 +251,7 @@ ${p}`}var Ere=["useAction","useStream","useAuth","useApp","useRender","useGguiCo
251
251
  }
252
252
  }`,vT=[k9,w9,E9,T9].join(`
253
253
 
254
- `);var Rg=O(W(),1),z9=O(te(),1);function Lne(){if(typeof document>"u"||document.getElementById($b))return;let e=document.createElement("style");e.id=$b,e.textContent=vT,document.head.appendChild(e)}function $T({children:e,frozen:t=!1,className:r,style:o}){(0,z9.useEffect)(()=>{Lne()},[]);let n={position:"relative",cursor:"progress",backgroundColor:"var(--ggui-color-surface-subtle, rgba(148, 163, 184, 0.08))",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",...o},i={position:"absolute",inset:0,backgroundImage:"linear-gradient(110deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%, transparent 100%)",backgroundSize:"200% 100%",animation:t?"none":"ggui-preview-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite",pointerEvents:"none",mixBlendMode:"overlay"};return(0,Rg.jsxs)("div",{"data-ggui-preview":"","data-ggui-preview-frozen":t?"":void 0,className:r,style:n,"aria-busy":"true",children:[(0,Rg.jsx)("div",{style:{position:"relative",pointerEvents:"none"},children:e}),(0,Rg.jsx)("div",{"aria-hidden":"true",style:i})]})}var R9=O(W(),1);function bT({children:e,delayMs:t=0,className:r,style:o}){let n={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,t)}ms`,...o};return(0,R9.jsx)("div",{className:r,style:n,children:e})}var bb=O(W(),1);function xb({children:e,streaming:t=!1,className:r,style:o}){let n={display:"inline",...o};return(0,bb.jsxs)("span",{className:r,"data-ggui-preview-streaming":t?"":void 0,style:n,children:[e,t?(0,bb.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.5ch",height:"1em",marginLeft:"0.1em",verticalAlign:"text-bottom",borderRight:"0.08em solid currentColor",animation:"ggui-preview-caret 900ms steps(1, end) infinite"}}):null]})}var C9=O(W(),1),I9=O(te(),1);var Zne="_ggui:preview",Vne="root",A9={surfaceId:null,fragments:new Map};function Hne(e,t){if("createSurface"in t)return{surfaceId:t.createSurface.surfaceId,fragments:new Map};if("updateComponents"in t){if(e.surfaceId!==t.updateComponents.surfaceId)return e;let r=new Map(e.fragments);for(let o of t.updateComponents.components)r.set(o.id,o);return{...e,fragments:r}}return"deleteSurface"in t?e.surfaceId!==t.deleteSurface.surfaceId?e:A9:e}function qne(e){let t=A9;for(let r of e){let o=h8(r.payload);o.ok&&(t=Hne(t,o.value))}return t}function O9(){return(0,Se.createElement)("div",{style:{minHeight:24,minWidth:32,borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-outlineVariant, rgba(148, 163, 184, 0.18))"},"aria-hidden":"true"})}function Bne({name:e}){return(0,Se.createElement)(Oi,{padding:12,shadow:"none",border:!0},(0,Se.createElement)(ct,{size:"xs",tone:"muted"},`[${e}]`))}function xT(){}function _T(e,t){let r=i=>i?i.map(a=>{let s=t.get(a);return s?_T(s,t):(0,Se.createElement)(O9,{key:a})}):[],{id:o}=e,n=i=>(0,Se.createElement)(bT,{key:o,children:i});switch(e.component){case"Row":return n((0,Se.createElement)(bo,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...r(e.children)));case"Column":return n((0,Se.createElement)(Et,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...r(e.children)));case"List":return n((0,Se.createElement)(Et,{direction:"vertical",gap:8},...r(e.children)));case"Card":{let i=e.child?t.get(e.child):void 0,a=e.child&&!i?(0,Se.createElement)(O9):i?_T(i,t):null;return n((0,Se.createElement)(Oi,{padding:16,shadow:"sm"},a))}case"Divider":return n((0,Se.createElement)(zl,{orientation:e.orientation??"horizontal"}));case"Text":{let i=e.variant??"body",a=/^h([1-6])$/.exec(i);if(a){let l=Number(a[1]);return n((0,Se.createElement)(bn,{level:l},(0,Se.createElement)(xb,null,e.text)))}return n((0,Se.createElement)(ct,i==="caption"?{size:"xs",tone:"muted"}:i==="label"?{size:"sm",weight:"medium"}:{},(0,Se.createElement)(xb,null,e.text)))}case"Image":return n((0,Se.createElement)(gb,{src:e.src,alt:e.alt??""}));case"Icon":return n((0,Se.createElement)(Re,{name:e.name}));case"Button":return n((0,Se.createElement)(et,{disabled:!0},e.label));case"TextField":return n((0,Se.createElement)(ud,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:xT}));case"CheckBox":return n((0,Se.createElement)(Il,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:xT}));case"ChoicePicker":{let i=e.options??[];return n((0,Se.createElement)(pb,{disabled:!0,label:e.label,value:e.value??"",options:i,onChange:xT}))}default:return n((0,Se.createElement)(Bne,{name:e.component}))}}function Gne({envelopes:e,suspended:t,fallback:r}){let o=qne(e);if(t)return null;let n=o.fragments.get(Vne);return n?(0,Se.createElement)($T,null,_T(n,o.fragments)):(0,Se.createElement)(Se.Fragment,null,r??(0,Se.createElement)(Fne))}function Fne(){return(0,Se.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80}},(0,Se.createElement)(Lt))}function Kne({controlRef:e,onAttach:t,fallback:r}){let[o,n]=(0,Se.useState)([]),[i,a]=(0,Se.useState)(!1);return(0,Se.useEffect)(()=>(e.current={pushEnvelope:s=>{s.channel===Zne&&n(l=>[...l,s])},suspend:()=>a(!0),resume:()=>a(!1)},t?.(),()=>{e.current=null}),[e,t]),(0,Se.createElement)(Gne,{envelopes:o,suspended:i,...r!==void 0?{fallback:r}:{}})}function j9(e,t={}){e.replaceChildren();let r=(0,M9.createRoot)(e),o={current:null},n=[],i=null;function a(){let s=o.current;if(s!==null){for(let l of n)s.pushEnvelope(l);n.length=0,i===!0&&s.suspend(),i===!1&&s.resume(),i=null}}return r.render((0,Se.createElement)(Kne,{controlRef:o,onAttach:a,...t.fallback!==void 0?{fallback:t.fallback}:{}})),{pushEnvelope(s){if(o.current===null){n.push(s);return}o.current.pushEnvelope(s)},suspend(){if(o.current===null){i=!0;return}o.current.suspend()},resume(){if(o.current===null){i=!1;return}o.current.resume()},unmount(){r.unmount(),e.replaceChildren()}}}var Wne={"--color-primary":"#0284c7","--color-surface":"#ffffff","--color-text":"#111111","--font-family":"system-ui, -apple-system, sans-serif","--border-radius-md":"8px"};function Jne(e){let t=e.serverBaseUrl.replace(/\/$/,""),r=new URLSearchParams({session:e.sessionId,item:e.itemId});return`${t}/mcp-apps/resource?${r.toString()}`}function Yne(e){return`${e.replace(/\/$/,"")}/mcp-apps/tools-call`}function Xne(){return"allow-scripts allow-forms"}function Qne(e){let t=e.permissions;if(!t)return;let r=[];return t.camera&&r.push("camera 'self'"),t.microphone&&r.push("microphone 'self'"),t.geolocation&&r.push("geolocation 'self'"),t.clipboardWrite&&r.push("clipboard-write 'self'"),r.length>0?r.join("; "):void 0}function N9(e,t){e.replaceChildren();let r=t.serverBaseUrl??"",o=Jne({serverBaseUrl:r,sessionId:t.sessionId,itemId:t.render.id}),n=Yne(r),i={width:t.render.containerDimensions?.width,height:t.render.containerDimensions?.height,maxWidth:t.render.containerDimensions?.maxWidth,maxHeight:t.render.containerDimensions?.maxHeight},a=e.ownerDocument.createElement("iframe");a.setAttribute("data-ggui-mcp-apps","iframe"),a.setAttribute("data-ggui-session-id",t.render.id),a.setAttribute("data-ggui-connector-id",t.render.source.connectorId),a.src=o,a.title=t.render.description??"MCP App",a.setAttribute("sandbox",Xne());let s=Qne(t.render);s!==void 0&&a.setAttribute("allow",s),a.style.width=i.width!==void 0?`${i.width}px`:"100%",a.style.height=i.height!==void 0?`${i.height}px`:"480px",a.style.maxWidth=i.maxWidth!==void 0?`${i.maxWidth}px`:"100%",i.maxHeight!==void 0&&(a.style.maxHeight=`${i.maxHeight}px`),a.style.border="1px solid #e5e5e5",a.style.borderRadius="8px",a.style.display="block",e.appendChild(a);let l=a.contentWindow,c=p=>{u(p)};async function u(p){if(a.contentWindow===null||p.source!==a.contentWindow)return;let f=p.data;if(f===null||typeof f!="object"||f.jsonrpc!=="2.0"||typeof f.method!="string")return;let m=f.id??0,g;switch(f.method){case"ui/initialize":{g={jsonrpc:"2.0",id:m,result:{theme:t.theme??Wne,containerDimensions:i,locale:t.locale??(typeof navigator<"u"?navigator.language:"en-US")}};break}case"tools/call":{let v=typeof f.params?.name=="string"?f.params.name:"",b=f.params?.arguments,y=b!==null&&typeof b=="object"&&!Array.isArray(b)?b:{};if(v.length===0){g={jsonrpc:"2.0",id:m,error:{code:-32602,message:"tools/call requires params.name"}};break}try{let h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:t.sessionId,item:t.render.id,tool:v,arguments:y})});if(h.ok){let $=await h.json();g={jsonrpc:"2.0",id:m,result:$}}else{let $=await h.json().catch(()=>({}));g={jsonrpc:"2.0",id:m,error:{code:h.status===403?-32003:-32e3,message:$.error??`proxy_error_${h.status}`}}}}catch(h){g={jsonrpc:"2.0",id:m,error:{code:-32e3,message:`proxy_fetch_failed: ${String(h)}`}}}break}default:g={jsonrpc:"2.0",id:m,error:{code:-32601,message:"method_not_supported"}}}a.contentWindow?.postMessage(g,"*")}return window.addEventListener("message",c),{element:a,unmount(){window.removeEventListener("message",c);let p=a.contentWindow??l;try{p?.postMessage({jsonrpc:"2.0",method:"ui/resource-teardown",params:{reason:"host_unmount"}},"*")}catch{}l=null,a.parentNode!==null&&a.parentNode.removeChild(a)}}}function n7(e){if(e.type==="mcpApps")return"mcpApps";if(e.type==="system")return"system";let t=e.componentCode;return typeof t=="string"&&t.trim().length>0?"react":"provisional"}async function o7(e,t){let r=t,o="none",n=null,i=null,a=null,s=null,l=null,c=null;function u(){n!==null&&(n.unmount(),n=null),i!==null&&(i.unmount(),i=null),a!==null&&(a.unmount(),a=null),l!==null&&(l.unmount(),l=null,c=null),s!==null&&(s(),s=null),o="none"}async function p(g){if(g==="mcpApps"){let y=r.render;a=N9(e,{render:y,sessionId:r.sessionId}),o="mcpApps";return}if(g==="system"){let y=r.render;if(y.type!=="system")return;let[h,$]=await Promise.all([Promise.resolve().then(()=>O(vg(),1)),Promise.resolve().then(()=>(r7(),t7))]),_=h.createRoot(e),k=j=>{j.type==="system"&&_.render((0,wT.createElement)($.SystemCardHost,{kind:j.kind,props:j.props??{},...r.themeId!==void 0?{themeId:r.themeId}:{}}))};k(y),l=_,c=k,o="system";return}if(g==="provisional"){i=j9(e),s=r.streamBus.subscribe("_ggui:preview",y=>{i?.pushEnvelope(y)}),o="provisional";return}let v=r.render;if(v.type==="mcpApps"||v.type==="system")return;let b="gadgetDescriptors"in v&&v.gadgetDescriptors!==void 0?v.gadgetDescriptors.map(y=>y.package):r.gadgetPackages;n=await p8(e,{render:{...v.id!==void 0?{id:v.id}:{},componentCode:v.componentCode??"",...v.props!==void 0?{props:v.props}:{}},...b!==void 0?{gadgetPackages:b}:{},...r.themeId!==void 0?{themeId:r.themeId}:{},...r.themeMode!==void 0?{themeMode:r.themeMode}:{},...r.appTheme!==void 0?{appTheme:r.appTheme}:{},...r.cssOverrides!==void 0?{cssOverrides:r.cssOverrides}:{},...r.onError!==void 0?{onError:r.onError}:{},renderWrapper:f}),o="react"}function f(g){let v=r.scopedWireConfig===null?g:(0,wT.createElement)(_1,{config:r.scopedWireConfig,children:g});return r.wrapOuter!==void 0?r.wrapOuter(v):v}let m=n7(t.render);return await p(m),{get kind(){return o},async update(g){let v=o;r=g;let b=n7(g.render);if(b!==v){u(),await p(b);return}if(b==="react"&&n!==null){let y=g.render;if(y.type==="mcpApps"||y.type==="system")return;await n.update({render:{...y.id!==void 0?{id:y.id}:{},componentCode:y.componentCode??"",...y.props!==void 0?{props:y.props}:{}},...g.themeId!==void 0?{themeId:g.themeId}:{},...g.themeMode!==void 0?{themeMode:g.themeMode}:{},...g.appTheme!==void 0?{appTheme:g.appTheme}:{},...g.cssOverrides!==void 0?{cssOverrides:g.cssOverrides}:{},...g.onError!==void 0?{onError:g.onError}:{},renderWrapper:f});return}if(b==="system"&&c!==null){let y=g.render;if(y.type!=="system")return;c(y);return}},unmount:u}}function i7(e){if(typeof window>"u"||window.parent===null)return;let t={type:NR,event:e};try{window.parent.postMessage(t,"*")}catch{}}function a7(e){if(typeof window>"u"||window.parent===null)return;let t={type:DR,event:e};try{window.parent.postMessage(t,"*")}catch{}}function Sb(e,t){if(t===void 0)return{state:e};let{sessionId:r,error:o}=t;return{state:e,...typeof r=="string"&&r.length>0?{sessionId:r}:{},...o!==void 0?{error:o}:{}}}Ao();var $s=new Map;function boe(e,t,r){let o=e[r.contextName],n;return o!==void 0?n=o:(n=t.createContext([r.default,()=>{}]),n.displayName=r.contextName,e[r.contextName]=n),{name:r.name,contextName:r.contextName,schema:r.schema,debounceMs:r.debounceMs??300,default:r.default,contextRef:n}}function s7(e,t,r){let o=[];for(let n of r)o.push(boe(e,t,n)),$s.set(n.name,n.default);return o}function xoe(e){return{[e.name]:{schema:e.schema}}}function l7(e,t,r){let o=`[ggui:context] ${JSON.stringify(t)}`;e.postUpdateModelContext({content:[{type:"text",text:o}]}),r&&e.postContextMirror({sessionId:r.sessionId,appId:r.appId,snapshot:t})}function c7(){let e={};for(let[t,r]of $s)e[t]=r;return e}function _oe(e){let{react:t,poster:r,consoleWarn:o,identity:n}=e;return a=>{let{slot:s,children:l}=a,[c,u]=t.useState(s.default),p=t.useRef(null);return t.useEffect(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null);let f=()=>{let m=d3(xoe(s),s.name,c);if(!m.valid){o!==void 0&&o(`[ggui:context] slot '${s.name}' value rejected:`,m.violations);return}$s.set(s.name,c),l7(r,c7(),n)};return s.debounceMs<=0?f():p.current=setTimeout(f,s.debounceMs),()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)}},[c,s.name,s.debounceMs,s.schema]),t.createElement(s.contextRef.Provider,{value:[c,u]},l)}}function u7(e){let t=_oe(e);return o=>{let{slots:n,children:i}=o;return n.length===0?e.react.createElement(e.react.Fragment,null,i):n.reduceRight((a,s)=>e.react.createElement(t,{key:s.contextName,slot:s},a),e.react.createElement(e.react.Fragment,null,i))}}function d7(e,t,r){if(t!==void 0)for(let o of Array.from($s.keys()))t.has(o)||$s.delete(o);$s.size>0&&l7(e,c7(),r)}var VT="0.5.0-rc.0",WU=3e4,UT=new Set;function oie(e){return UT.add(e),()=>{UT.delete(e)}}function iie(e){for(let t of UT)try{if(t(e)===!0)return}catch{}}var aie={name:"ggui-iframe-runtime",version:VT},sie={availableDisplayModes:["inline","fullscreen","pip"]};function lie(){let e=new v1(aie,sie,{autoResize:!0}),t=new um(window.parent,window.parent);return{app:e,transport:t}}var HT=null;function cie(e){HT=e}function Ng(){return HT}function xwe(){HT=null}async function uie(e,t){try{return await e.connect(t),{ok:!0}}catch(r){return{ok:!1,message:r instanceof Error?r.message:String(r)}}}function die(){try{let e={type:av,version:VT};window.parent.postMessage(e,"*")}catch{}}function pie(e,t){try{let r={type:J2,reason:e,message:t};window.parent.postMessage(r,"*")}catch{}}async function fie(e){let{doc:t,app:r,transport:o,notifyParent:n,renderer:i,onProtocolError:a,onObserve:s,onLifecycle:l}=e,c=e.connectFn??$3,u=e.toolResultTimeoutMs??WU,p=(N,Q)=>{n({type:J2,reason:N,message:Q}),a?.(m3(N,Q)),l?.(Sb("error",{error:{code:N,message:Q}}))},f=v3(t),m=null;jn(f,"Negotiating with host\u2026","connecting"),n({type:av,version:VT}),l?.(Sb("mounting"));let g=e.preResolvedMeta!==void 0?Promise.resolve(null):bie(r,u),v=await uie(r,o);if(!v.ok)return jn(f,`ui/initialize failed: ${v.message}`,"error"),p("UI_INITIALIZE_FAILED",v.message),{ok:!1,mountedRender:m};cie(r);let b;if(e.preResolvedMeta!==void 0)b={ok:!0,meta:e.preResolvedMeta};else{let N=ck();if(N.ok)b=N;else{let Q=await g;Q!==null?b={ok:!0,meta:Q}:b={ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}}}let y=r.getHostContext();if(y!==void 0&&Gk(y),b.ok&&b.hostContext===void 0){let N=dv(y);N!==void 0&&(b={...b,hostContext:N})}if(!b.ok){let N=`slice-meta parse failed: ${b.reason}`;return jn(f,N,"error"),p(b.reason,N),{ok:!1,mountedRender:m}}let h=b.meta;a3(await S3(h.validatorsUrl));let $=h.sessionId,_=i!==void 0?i.setup({meta:h,renderInto:f.renderRoot,statusRefs:f,...s!==void 0?{onObserve:s}:{}}):null;jn(f,`Connecting to ${h.sessionId}\u2026`,"connecting");let k=_===null?mie({meta:h,statusRefs:f,pinnedSessionId:$}):null,j=_?.channelRegistry??k,S=async N=>{let Q=N.session;Q!==void 0&&Q.id===$&&(m=Q,_!==null&&(await _.applyRender(Q),Q.type!=="mcpApps"&&Q.type!=="system"&&_.channelTransport.applyRender({sessionId:Q.id,...Q.streamSpec!==void 0?{streamSpec:Q.streamSpec}:{}})))},T=!1,z=()=>{T||(T=!0,l?.(Sb("code-ready",{sessionId:h.sessionId})))},R=typeof h.codeUrl=="string"&&h.codeUrl.length>0||typeof h.kind=="string"&&h.kind.length>0,M=typeof h.wsUrl=="string"&&h.wsUrl.length>0&&typeof h.wsToken=="string"&&h.wsToken.length>0;if(_!==null&&R){h.gadgets!==void 0&&h.gadgets.length>0&&await _.composedGadgets;let N=null;try{N=await JU(h)}catch(Q){let Ce=Q instanceof Error?Q.message:String(Q);if(!M)return jn(f,`static mount failed: ${Ce}`,"error"),p("UI_INITIALIZE_FAILED",Ce),{ok:!1,mountedRender:m};console.warn(`[ggui] static seed fetch failed (${Ce}); falling back to the live channel for render delivery`),N=null}N!==null&&(await _.applyRender(N),m=N,z())}if(!M){if(m===null){let N="bootstrap carries neither static content (codeUrl/kind) nor a live trio (wsUrl/wsToken)";return jn(f,N,"error"),p("MISSING_META_GGUI_BOOTSTRAP",N),{ok:!1,mountedRender:m}}return b.hostContext!==void 0&&(qk({sessionId:h.sessionId,send:()=>{},initial:b.hostContext}),Bk({app:r})),pm(f),{ok:!0,mountedRender:m}}let Z;try{Z=await c({meta:h,registry:j,onStatusChange:N=>{jn(f,N==="connected"?"Connected.":`Connection ${N}\u2026`,N),_!==null&&_.channelTransport.onWsStatusChange(N)},...a!==void 0?{onProtocolError:a}:{},...s!==void 0?{onObserve:s}:{},onResubscribeAck:N=>{S(N)},...typeof h.pollingUrl=="string"&&h.pollingUrl.length>0?{polling:b3({baseUrl:h.pollingUrl,...h.lastSequence!==void 0?{initialSinceSequence:h.lastSequence}:{}})}:{}})}catch(N){if(gie(N)){_!==null&&i?.teardown?.(_);let Ce=N.message;return jn(f,Ce,"upgrade-required"),p("UPGRADE_REQUIRED",Ce),{ok:!1,mountedRender:m}}let Q=N instanceof Error?N.message:String(N);return m!==null?(jn(f,`live updates unavailable: ${Q}`,"connecting"),z(),{ok:!0,mountedRender:m}):(_!==null&&i?.teardown?.(_),jn(f,`WS handshake failed: ${Q}`,"error"),p("WS_HANDSHAKE_FAILED",Q),{ok:!1,mountedRender:m})}return _!==null&&i?.attachManager!==void 0&&i.attachManager(_,{send:N=>Z.handle.send(N)}),b.hostContext!==void 0&&(qk({sessionId:h.sessionId,send:N=>Z.handle.send(N),initial:b.hostContext}),Bk({app:r})),await S(Z.ack),pm(f),z(),{ok:!0,mountedRender:m}}function mie(e){let t=new vu({subscribeFrameBuilder:()=>({type:"subscribe",payload:{sessionId:e.meta.sessionId,appId:e.meta.appId,...e.meta.wsToken!==void 0?{wsToken:e.meta.wsToken}:{}}})});return t.register(I1({statusRefs:e.statusRefs,pinnedSessionId:e.pinnedSessionId})),t}function gie(e){return e!==null&&typeof e=="object"&&e.name==="UpgradeRequiredError"&&e.code==="UPGRADE_REQUIRED"&&typeof e.message=="string"}function hie(){return typeof process>"u"?!0:process.env?.GGUI_RENDERER_AUTOSTART!=="false"}function yie(){let e=ck();return e.ok?e.meta:null}function vie(e){if(e!==void 0)try{let t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:void 0}catch{return}}async function JU(e){let t=vie(e.propsJson);if(e.kind!==void 0)return{id:e.sessionId,appId:e.appId,type:"system",kind:e.kind,...t!==void 0?{props:t}:{}};if(e.codeUrl===void 0)return null;let r=await fetch(e.codeUrl);if(!r.ok)throw new Error(`buildGguiSessionSeedInput: codeUrl fetch failed (${r.status}): ${e.codeUrl}`);let o=await r.text();return{id:e.sessionId,appId:e.appId,componentCode:o,...t!==void 0?{props:t}:{}}}function Ob(e){let t=VM(e);return t.ok?t.meta:null}function $ie(){if(typeof window>"u")return null;let e=window.__GGUI_PENDING_TOOL_RESULTS__;if(!Array.isArray(e)||e.length===0)return null;for(let t of e){let r=Ob(t);if(r!==null)return r}return null}function bie(e,t){return new Promise(r=>{let o=!1,n=a=>{if(o)return;let s=Ob(a);s!==null&&(o=!0,e.removeEventListener("toolresult",n),clearTimeout(i),r(s))};e.addEventListener("toolresult",n);let i=setTimeout(()=>{o||(o=!0,e.removeEventListener("toolresult",n),r(null))},t)})}function xie(e){return typeof window>"u"?Promise.resolve(null):new Promise(t=>{let r=!1,o=a=>{r||(r=!0,window.removeEventListener("message",n),clearTimeout(i),t(a))},n=a=>{let s=a.data;if(s==null||s.jsonrpc!=="2.0"||s.method!=="ui/notifications/tool-result")return;let l=Ob(s.params);l!==null&&o(l)};window.addEventListener("message",n);let i=setTimeout(()=>o(null),e)})}var FU=!1,YU=null,LT=!1,ZT=!1;function qT(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function _ie(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){let o=JSON.stringify(e);return o.length>60?`${o.slice(0,57)}\u2026`:o}if(typeof e!="object")return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,n])=>{if(n===null)return`${o}: null`;if(n===void 0)return`${o}: undefined`;if(typeof n=="string")return`${o}: ${n}`;if(typeof n=="number"||typeof n=="boolean")return`${o}: ${n}`;let i=JSON.stringify(n)??String(n);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function BT(e){if(!(typeof window>"u"))try{window.parent.postMessage(e,"*")}catch{}}function XU(e){let t=Ng();t!==null&&t.updateModelContext(e).catch(()=>{})}function Sie(e){let t=Ng();t!==null&&t.openLink(e).catch(()=>{})}function kie(e){let t=Ng();t!==null&&t.requestDisplayMode(e).catch(()=>{})}var QU={postUpdateModelContext:e=>{XU(e)},postContextMirror:e=>{BT({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"tools/call",params:{name:"ggui_runtime_sync_context",arguments:{sessionId:e.sessionId,appId:e.appId,snapshot:e.snapshot}}})}};async function eL(e,t){let r=Ng();if(r===null)return{error:{message:"callServerToolSpec: no App bound \u2014 call setCurrentApp() first"}};try{return{jsonrpc:"2.0",result:await r.callServerTool({name:e,arguments:t})}}catch(o){return{error:{message:o instanceof Error?o.message:String(o)}}}}function tL(e){BT({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"tools/call",params:{name:e.toolName,arguments:{kind:e.kind,payload:e.payload,sessionId:e.sessionId,appId:e.appId,actionId:e.actionId,firedAt:e.firedAt}}})}function wie(e){if(e===null||typeof e!="object"||"error"in e&&e.error!==void 0&&e.error!==null)return"fallback";let t=e.result;if(t===null||typeof t!="object")return"fallback";let r=t;return(r.structuredContent&&typeof r.structuredContent=="object"?r.structuredContent:r).ok===!0?"success":"fallback"}function Eie(e){if(e===null||typeof e!="object")return;let t=e.result;if(t===null||typeof t!="object")return;let r=t,n=(r.structuredContent&&typeof r.structuredContent=="object"?r.structuredContent:r).consumerPresent;return typeof n=="boolean"?n:void 0}function Cb(e,t){if(typeof document>"u"||window.__GGUI_TOAST_DISABLED__)return;let o="__ggui-action-toast__",n=document.getElementById(o);n||(n=document.createElement("div"),n.id=o,n.style.cssText=["position:fixed","bottom:16px","left:50%","transform:translateX(-50%)","z-index:2147483647","pointer-events:auto","max-width:90%","padding:8px 14px","border-radius:8px","font:13px/1.4 system-ui,sans-serif","color:#fff","box-shadow:0 4px 12px rgba(0,0,0,.18)","transition:opacity 180ms ease,transform 180ms ease","opacity:0","white-space:nowrap","overflow:hidden","text-overflow:ellipsis","cursor:pointer"].join(";"),document.body.appendChild(n));let i=t==="pending"?"rgba(60,60,68,.92)":t==="success"?"rgba(34,139,84,.94)":t==="fallback"||t==="action_required"?"rgba(110,89,165,.94)":"rgba(178,54,54,.94)";n.style.background=i,n.textContent=e,n.style.opacity="1",n.style.transform="translateX(-50%) translateY(0)";let a=n;a.__toastTimer&&clearTimeout(a.__toastTimer),t==="action_required"?n.onclick=()=>{n&&(n.style.opacity="0",n.style.transform="translateX(-50%) translateY(8px)",n.onclick=null)}:(n.onclick=null,(t==="success"||t==="fallback"||t==="error")&&(a.__toastTimer=window.setTimeout(()=>{n&&(n.style.opacity="0",n.style.transform="translateX(-50%) translateY(8px)")},2500)))}function Tie(){if(typeof document>"u")return;let e=document.getElementById("__ggui-action-toast__");if(!e)return;e.style.opacity="0",e.style.transform="translateX(-50%) translateY(8px)";let t=e;t.__toastTimer&&(clearTimeout(t.__toastTimer),t.__toastTimer=void 0)}oie(e=>typeof e.eventId!="string"||e.eventId.length===0?!1:(Tie(),!0));function zie(){let e={};for(let[t,r]of $s)e[t]=r;return e}function Rie(e){let t=JSON.stringify({sessionId:e.sessionId}),r=[`Your REQUIRED FIRST TOOL CALL is ggui_consume with arguments ${t}. Call it NOW to retrieve and process the pending interaction. Do not respond conversationally; do not summarize. Issue the tool call as your next action.`,"",'<ggui_directive kind="user-action">',` <session_id>${e.sessionId}</session_id>`," <next_tool>ggui_consume</next_tool>",` <next_args>${t}</next_args>`,"</ggui_directive>","",`The user interacted with render ${e.sessionId} while no ggui_consume long-poll was active. The gesture is queued on the consume pipe for that render \u2014 it is NOT in this message. After ggui_consume returns, react to the returned event with the appropriate domain tool, then call ggui_update on the SAME sessionId (${e.sessionId}).`].join(`
254
+ `);var Rg=O(W(),1),z9=O(te(),1);function Lne(){if(typeof document>"u"||document.getElementById($b))return;let e=document.createElement("style");e.id=$b,e.textContent=vT,document.head.appendChild(e)}function $T({children:e,frozen:t=!1,className:r,style:o}){(0,z9.useEffect)(()=>{Lne()},[]);let n={position:"relative",cursor:"progress",backgroundColor:"var(--ggui-color-surface-subtle, rgba(148, 163, 184, 0.08))",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",...o},i={position:"absolute",inset:0,backgroundImage:"linear-gradient(110deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%, transparent 100%)",backgroundSize:"200% 100%",animation:t?"none":"ggui-preview-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite",pointerEvents:"none",mixBlendMode:"overlay"};return(0,Rg.jsxs)("div",{"data-ggui-preview":"","data-ggui-preview-frozen":t?"":void 0,className:r,style:n,"aria-busy":"true",children:[(0,Rg.jsx)("div",{style:{position:"relative",pointerEvents:"none"},children:e}),(0,Rg.jsx)("div",{"aria-hidden":"true",style:i})]})}var R9=O(W(),1);function bT({children:e,delayMs:t=0,className:r,style:o}){let n={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,t)}ms`,...o};return(0,R9.jsx)("div",{className:r,style:n,children:e})}var bb=O(W(),1);function xb({children:e,streaming:t=!1,className:r,style:o}){let n={display:"inline",...o};return(0,bb.jsxs)("span",{className:r,"data-ggui-preview-streaming":t?"":void 0,style:n,children:[e,t?(0,bb.jsx)("span",{"aria-hidden":"true",style:{display:"inline-block",width:"0.5ch",height:"1em",marginLeft:"0.1em",verticalAlign:"text-bottom",borderRight:"0.08em solid currentColor",animation:"ggui-preview-caret 900ms steps(1, end) infinite"}}):null]})}var C9=O(W(),1),I9=O(te(),1);var Zne="_ggui:preview",Vne="root",A9={surfaceId:null,fragments:new Map};function Hne(e,t){if("createSurface"in t)return{surfaceId:t.createSurface.surfaceId,fragments:new Map};if("updateComponents"in t){if(e.surfaceId!==t.updateComponents.surfaceId)return e;let r=new Map(e.fragments);for(let o of t.updateComponents.components)r.set(o.id,o);return{...e,fragments:r}}return"deleteSurface"in t?e.surfaceId!==t.deleteSurface.surfaceId?e:A9:e}function qne(e){let t=A9;for(let r of e){let o=h8(r.payload);o.ok&&(t=Hne(t,o.value))}return t}function O9(){return(0,Se.createElement)("div",{style:{minHeight:24,minWidth:32,borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-outlineVariant, rgba(148, 163, 184, 0.18))"},"aria-hidden":"true"})}function Bne({name:e}){return(0,Se.createElement)(Oi,{padding:12,shadow:"none",border:!0},(0,Se.createElement)(ct,{size:"xs",tone:"muted"},`[${e}]`))}function xT(){}function _T(e,t){let r=i=>i?i.map(a=>{let s=t.get(a);return s?_T(s,t):(0,Se.createElement)(O9,{key:a})}):[],{id:o}=e,n=i=>(0,Se.createElement)(bT,{key:o,children:i});switch(e.component){case"Row":return n((0,Se.createElement)(bo,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...r(e.children)));case"Column":return n((0,Se.createElement)(Et,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...r(e.children)));case"List":return n((0,Se.createElement)(Et,{direction:"vertical",gap:8},...r(e.children)));case"Card":{let i=e.child?t.get(e.child):void 0,a=e.child&&!i?(0,Se.createElement)(O9):i?_T(i,t):null;return n((0,Se.createElement)(Oi,{padding:16,shadow:"sm"},a))}case"Divider":return n((0,Se.createElement)(zl,{orientation:e.orientation??"horizontal"}));case"Text":{let i=e.variant??"body",a=/^h([1-6])$/.exec(i);if(a){let l=Number(a[1]);return n((0,Se.createElement)(bn,{level:l},(0,Se.createElement)(xb,null,e.text)))}return n((0,Se.createElement)(ct,i==="caption"?{size:"xs",tone:"muted"}:i==="label"?{size:"sm",weight:"medium"}:{},(0,Se.createElement)(xb,null,e.text)))}case"Image":return n((0,Se.createElement)(gb,{src:e.src,alt:e.alt??""}));case"Icon":return n((0,Se.createElement)(Re,{name:e.name}));case"Button":return n((0,Se.createElement)(et,{disabled:!0},e.label));case"TextField":return n((0,Se.createElement)(ud,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:xT}));case"CheckBox":return n((0,Se.createElement)(Il,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:xT}));case"ChoicePicker":{let i=e.options??[];return n((0,Se.createElement)(pb,{disabled:!0,label:e.label,value:e.value??"",options:i,onChange:xT}))}default:return n((0,Se.createElement)(Bne,{name:e.component}))}}function Gne({envelopes:e,suspended:t,fallback:r}){let o=qne(e);if(t)return null;let n=o.fragments.get(Vne);return n?(0,Se.createElement)($T,null,_T(n,o.fragments)):(0,Se.createElement)(Se.Fragment,null,r??(0,Se.createElement)(Fne))}function Fne(){return(0,Se.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80}},(0,Se.createElement)(Lt))}function Kne({controlRef:e,onAttach:t,fallback:r}){let[o,n]=(0,Se.useState)([]),[i,a]=(0,Se.useState)(!1);return(0,Se.useEffect)(()=>(e.current={pushEnvelope:s=>{s.channel===Zne&&n(l=>[...l,s])},suspend:()=>a(!0),resume:()=>a(!1)},t?.(),()=>{e.current=null}),[e,t]),(0,Se.createElement)(Gne,{envelopes:o,suspended:i,...r!==void 0?{fallback:r}:{}})}function j9(e,t={}){e.replaceChildren();let r=(0,M9.createRoot)(e),o={current:null},n=[],i=null;function a(){let s=o.current;if(s!==null){for(let l of n)s.pushEnvelope(l);n.length=0,i===!0&&s.suspend(),i===!1&&s.resume(),i=null}}return r.render((0,Se.createElement)(Kne,{controlRef:o,onAttach:a,...t.fallback!==void 0?{fallback:t.fallback}:{}})),{pushEnvelope(s){if(o.current===null){n.push(s);return}o.current.pushEnvelope(s)},suspend(){if(o.current===null){i=!0;return}o.current.suspend()},resume(){if(o.current===null){i=!1;return}o.current.resume()},unmount(){r.unmount(),e.replaceChildren()}}}var Wne={"--color-primary":"#0284c7","--color-surface":"#ffffff","--color-text":"#111111","--font-family":"system-ui, -apple-system, sans-serif","--border-radius-md":"8px"};function Jne(e){let t=e.serverBaseUrl.replace(/\/$/,""),r=new URLSearchParams({session:e.sessionId,item:e.itemId});return`${t}/mcp-apps/resource?${r.toString()}`}function Yne(e){return`${e.replace(/\/$/,"")}/mcp-apps/tools-call`}function Xne(){return"allow-scripts allow-forms"}function Qne(e){let t=e.permissions;if(!t)return;let r=[];return t.camera&&r.push("camera 'self'"),t.microphone&&r.push("microphone 'self'"),t.geolocation&&r.push("geolocation 'self'"),t.clipboardWrite&&r.push("clipboard-write 'self'"),r.length>0?r.join("; "):void 0}function N9(e,t){e.replaceChildren();let r=t.serverBaseUrl??"",o=Jne({serverBaseUrl:r,sessionId:t.sessionId,itemId:t.render.id}),n=Yne(r),i={width:t.render.containerDimensions?.width,height:t.render.containerDimensions?.height,maxWidth:t.render.containerDimensions?.maxWidth,maxHeight:t.render.containerDimensions?.maxHeight},a=e.ownerDocument.createElement("iframe");a.setAttribute("data-ggui-mcp-apps","iframe"),a.setAttribute("data-ggui-session-id",t.render.id),a.setAttribute("data-ggui-connector-id",t.render.source.connectorId),a.src=o,a.title=t.render.description??"MCP App",a.setAttribute("sandbox",Xne());let s=Qne(t.render);s!==void 0&&a.setAttribute("allow",s),a.style.width=i.width!==void 0?`${i.width}px`:"100%",a.style.height=i.height!==void 0?`${i.height}px`:"480px",a.style.maxWidth=i.maxWidth!==void 0?`${i.maxWidth}px`:"100%",i.maxHeight!==void 0&&(a.style.maxHeight=`${i.maxHeight}px`),a.style.border="1px solid #e5e5e5",a.style.borderRadius="8px",a.style.display="block",e.appendChild(a);let l=a.contentWindow,c=p=>{u(p)};async function u(p){if(a.contentWindow===null||p.source!==a.contentWindow)return;let f=p.data;if(f===null||typeof f!="object"||f.jsonrpc!=="2.0"||typeof f.method!="string")return;let m=f.id??0,g;switch(f.method){case"ui/initialize":{g={jsonrpc:"2.0",id:m,result:{theme:t.theme??Wne,containerDimensions:i,locale:t.locale??(typeof navigator<"u"?navigator.language:"en-US")}};break}case"tools/call":{let v=typeof f.params?.name=="string"?f.params.name:"",b=f.params?.arguments,y=b!==null&&typeof b=="object"&&!Array.isArray(b)?b:{};if(v.length===0){g={jsonrpc:"2.0",id:m,error:{code:-32602,message:"tools/call requires params.name"}};break}try{let h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:t.sessionId,item:t.render.id,tool:v,arguments:y})});if(h.ok){let $=await h.json();g={jsonrpc:"2.0",id:m,result:$}}else{let $=await h.json().catch(()=>({}));g={jsonrpc:"2.0",id:m,error:{code:h.status===403?-32003:-32e3,message:$.error??`proxy_error_${h.status}`}}}}catch(h){g={jsonrpc:"2.0",id:m,error:{code:-32e3,message:`proxy_fetch_failed: ${String(h)}`}}}break}default:g={jsonrpc:"2.0",id:m,error:{code:-32601,message:"method_not_supported"}}}a.contentWindow?.postMessage(g,"*")}return window.addEventListener("message",c),{element:a,unmount(){window.removeEventListener("message",c);let p=a.contentWindow??l;try{p?.postMessage({jsonrpc:"2.0",method:"ui/resource-teardown",params:{reason:"host_unmount"}},"*")}catch{}l=null,a.parentNode!==null&&a.parentNode.removeChild(a)}}}function n7(e){if(e.type==="mcpApps")return"mcpApps";if(e.type==="system")return"system";let t=e.componentCode;return typeof t=="string"&&t.trim().length>0?"react":"provisional"}async function o7(e,t){let r=t,o="none",n=null,i=null,a=null,s=null,l=null,c=null;function u(){n!==null&&(n.unmount(),n=null),i!==null&&(i.unmount(),i=null),a!==null&&(a.unmount(),a=null),l!==null&&(l.unmount(),l=null,c=null),s!==null&&(s(),s=null),o="none"}async function p(g){if(g==="mcpApps"){let y=r.render;a=N9(e,{render:y,sessionId:r.sessionId}),o="mcpApps";return}if(g==="system"){let y=r.render;if(y.type!=="system")return;let[h,$]=await Promise.all([Promise.resolve().then(()=>O(vg(),1)),Promise.resolve().then(()=>(r7(),t7))]),_=h.createRoot(e),k=j=>{j.type==="system"&&_.render((0,wT.createElement)($.SystemCardHost,{kind:j.kind,props:j.props??{},...r.themeId!==void 0?{themeId:r.themeId}:{}}))};k(y),l=_,c=k,o="system";return}if(g==="provisional"){i=j9(e),s=r.streamBus.subscribe("_ggui:preview",y=>{i?.pushEnvelope(y)}),o="provisional";return}let v=r.render;if(v.type==="mcpApps"||v.type==="system")return;let b="gadgetDescriptors"in v&&v.gadgetDescriptors!==void 0?v.gadgetDescriptors.map(y=>y.package):r.gadgetPackages;n=await p8(e,{render:{...v.id!==void 0?{id:v.id}:{},componentCode:v.componentCode??"",...v.props!==void 0?{props:v.props}:{}},...b!==void 0?{gadgetPackages:b}:{},...r.themeId!==void 0?{themeId:r.themeId}:{},...r.themeMode!==void 0?{themeMode:r.themeMode}:{},...r.appTheme!==void 0?{appTheme:r.appTheme}:{},...r.cssOverrides!==void 0?{cssOverrides:r.cssOverrides}:{},...r.onError!==void 0?{onError:r.onError}:{},renderWrapper:f}),o="react"}function f(g){let v=r.scopedWireConfig===null?g:(0,wT.createElement)(_1,{config:r.scopedWireConfig,children:g});return r.wrapOuter!==void 0?r.wrapOuter(v):v}let m=n7(t.render);return await p(m),{get kind(){return o},async update(g){let v=o;r=g;let b=n7(g.render);if(b!==v){u(),await p(b);return}if(b==="react"&&n!==null){let y=g.render;if(y.type==="mcpApps"||y.type==="system")return;await n.update({render:{...y.id!==void 0?{id:y.id}:{},componentCode:y.componentCode??"",...y.props!==void 0?{props:y.props}:{}},...g.themeId!==void 0?{themeId:g.themeId}:{},...g.themeMode!==void 0?{themeMode:g.themeMode}:{},...g.appTheme!==void 0?{appTheme:g.appTheme}:{},...g.cssOverrides!==void 0?{cssOverrides:g.cssOverrides}:{},...g.onError!==void 0?{onError:g.onError}:{},renderWrapper:f});return}if(b==="system"&&c!==null){let y=g.render;if(y.type!=="system")return;c(y);return}},unmount:u}}function i7(e){if(typeof window>"u"||window.parent===null)return;let t={type:NR,event:e};try{window.parent.postMessage(t,"*")}catch{}}function a7(e){if(typeof window>"u"||window.parent===null)return;let t={type:DR,event:e};try{window.parent.postMessage(t,"*")}catch{}}function Sb(e,t){if(t===void 0)return{state:e};let{sessionId:r,error:o}=t;return{state:e,...typeof r=="string"&&r.length>0?{sessionId:r}:{},...o!==void 0?{error:o}:{}}}Ao();var $s=new Map;function boe(e,t,r){let o=e[r.contextName],n;return o!==void 0?n=o:(n=t.createContext([r.default,()=>{}]),n.displayName=r.contextName,e[r.contextName]=n),{name:r.name,contextName:r.contextName,schema:r.schema,debounceMs:r.debounceMs??300,default:r.default,contextRef:n}}function s7(e,t,r){let o=[];for(let n of r)o.push(boe(e,t,n)),$s.set(n.name,n.default);return o}function xoe(e){return{[e.name]:{schema:e.schema}}}function l7(e,t,r){let o=`[ggui:context] ${JSON.stringify(t)}`;e.postUpdateModelContext({content:[{type:"text",text:o}]}),r&&e.postContextMirror({sessionId:r.sessionId,appId:r.appId,snapshot:t})}function c7(){let e={};for(let[t,r]of $s)e[t]=r;return e}function _oe(e){let{react:t,poster:r,consoleWarn:o,identity:n}=e;return a=>{let{slot:s,children:l}=a,[c,u]=t.useState(s.default),p=t.useRef(null);return t.useEffect(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null);let f=()=>{let m=d3(xoe(s),s.name,c);if(!m.valid){o!==void 0&&o(`[ggui:context] slot '${s.name}' value rejected:`,m.violations);return}$s.set(s.name,c),l7(r,c7(),n)};return s.debounceMs<=0?f():p.current=setTimeout(f,s.debounceMs),()=>{p.current!==null&&(clearTimeout(p.current),p.current=null)}},[c,s.name,s.debounceMs,s.schema]),t.createElement(s.contextRef.Provider,{value:[c,u]},l)}}function u7(e){let t=_oe(e);return o=>{let{slots:n,children:i}=o;return n.length===0?e.react.createElement(e.react.Fragment,null,i):n.reduceRight((a,s)=>e.react.createElement(t,{key:s.contextName,slot:s},a),e.react.createElement(e.react.Fragment,null,i))}}function d7(e,t,r){if(t!==void 0)for(let o of Array.from($s.keys()))t.has(o)||$s.delete(o);$s.size>0&&l7(e,c7(),r)}var VT="0.5.0-rc.1",WU=3e4,UT=new Set;function oie(e){return UT.add(e),()=>{UT.delete(e)}}function iie(e){for(let t of UT)try{if(t(e)===!0)return}catch{}}var aie={name:"ggui-iframe-runtime",version:VT},sie={availableDisplayModes:["inline","fullscreen","pip"]};function lie(){let e=new v1(aie,sie,{autoResize:!0}),t=new um(window.parent,window.parent);return{app:e,transport:t}}var HT=null;function cie(e){HT=e}function Ng(){return HT}function xwe(){HT=null}async function uie(e,t){try{return await e.connect(t),{ok:!0}}catch(r){return{ok:!1,message:r instanceof Error?r.message:String(r)}}}function die(){try{let e={type:av,version:VT};window.parent.postMessage(e,"*")}catch{}}function pie(e,t){try{let r={type:J2,reason:e,message:t};window.parent.postMessage(r,"*")}catch{}}async function fie(e){let{doc:t,app:r,transport:o,notifyParent:n,renderer:i,onProtocolError:a,onObserve:s,onLifecycle:l}=e,c=e.connectFn??$3,u=e.toolResultTimeoutMs??WU,p=(N,Q)=>{n({type:J2,reason:N,message:Q}),a?.(m3(N,Q)),l?.(Sb("error",{error:{code:N,message:Q}}))},f=v3(t),m=null;jn(f,"Negotiating with host\u2026","connecting"),n({type:av,version:VT}),l?.(Sb("mounting"));let g=e.preResolvedMeta!==void 0?Promise.resolve(null):bie(r,u),v=await uie(r,o);if(!v.ok)return jn(f,`ui/initialize failed: ${v.message}`,"error"),p("UI_INITIALIZE_FAILED",v.message),{ok:!1,mountedRender:m};cie(r);let b;if(e.preResolvedMeta!==void 0)b={ok:!0,meta:e.preResolvedMeta};else{let N=ck();if(N.ok)b=N;else{let Q=await g;Q!==null?b={ok:!0,meta:Q}:b={ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}}}let y=r.getHostContext();if(y!==void 0&&Gk(y),b.ok&&b.hostContext===void 0){let N=dv(y);N!==void 0&&(b={...b,hostContext:N})}if(!b.ok){let N=`slice-meta parse failed: ${b.reason}`;return jn(f,N,"error"),p(b.reason,N),{ok:!1,mountedRender:m}}let h=b.meta;a3(await S3(h.validatorsUrl));let $=h.sessionId,_=i!==void 0?i.setup({meta:h,renderInto:f.renderRoot,statusRefs:f,...s!==void 0?{onObserve:s}:{}}):null;jn(f,`Connecting to ${h.sessionId}\u2026`,"connecting");let k=_===null?mie({meta:h,statusRefs:f,pinnedSessionId:$}):null,j=_?.channelRegistry??k,S=async N=>{let Q=N.session;Q!==void 0&&Q.id===$&&(m=Q,_!==null&&(await _.applyRender(Q),Q.type!=="mcpApps"&&Q.type!=="system"&&_.channelTransport.applyRender({sessionId:Q.id,...Q.streamSpec!==void 0?{streamSpec:Q.streamSpec}:{}})))},T=!1,z=()=>{T||(T=!0,l?.(Sb("code-ready",{sessionId:h.sessionId})))},R=typeof h.codeUrl=="string"&&h.codeUrl.length>0||typeof h.kind=="string"&&h.kind.length>0,M=typeof h.wsUrl=="string"&&h.wsUrl.length>0&&typeof h.wsToken=="string"&&h.wsToken.length>0;if(_!==null&&R){h.gadgets!==void 0&&h.gadgets.length>0&&await _.composedGadgets;let N=null;try{N=await JU(h)}catch(Q){let Ce=Q instanceof Error?Q.message:String(Q);if(!M)return jn(f,`static mount failed: ${Ce}`,"error"),p("UI_INITIALIZE_FAILED",Ce),{ok:!1,mountedRender:m};console.warn(`[ggui] static seed fetch failed (${Ce}); falling back to the live channel for render delivery`),N=null}N!==null&&(await _.applyRender(N),m=N,z())}if(!M){if(m===null){let N="bootstrap carries neither static content (codeUrl/kind) nor a live trio (wsUrl/wsToken)";return jn(f,N,"error"),p("MISSING_META_GGUI_BOOTSTRAP",N),{ok:!1,mountedRender:m}}return b.hostContext!==void 0&&(qk({sessionId:h.sessionId,send:()=>{},initial:b.hostContext}),Bk({app:r})),pm(f),{ok:!0,mountedRender:m}}let Z;try{Z=await c({meta:h,registry:j,onStatusChange:N=>{jn(f,N==="connected"?"Connected.":`Connection ${N}\u2026`,N),_!==null&&_.channelTransport.onWsStatusChange(N)},...a!==void 0?{onProtocolError:a}:{},...s!==void 0?{onObserve:s}:{},onResubscribeAck:N=>{S(N)},...typeof h.pollingUrl=="string"&&h.pollingUrl.length>0?{polling:b3({baseUrl:h.pollingUrl,...h.lastSequence!==void 0?{initialSinceSequence:h.lastSequence}:{}})}:{}})}catch(N){if(gie(N)){_!==null&&i?.teardown?.(_);let Ce=N.message;return jn(f,Ce,"upgrade-required"),p("UPGRADE_REQUIRED",Ce),{ok:!1,mountedRender:m}}let Q=N instanceof Error?N.message:String(N);return m!==null?(jn(f,`live updates unavailable: ${Q}`,"connecting"),z(),{ok:!0,mountedRender:m}):(_!==null&&i?.teardown?.(_),jn(f,`WS handshake failed: ${Q}`,"error"),p("WS_HANDSHAKE_FAILED",Q),{ok:!1,mountedRender:m})}return _!==null&&i?.attachManager!==void 0&&i.attachManager(_,{send:N=>Z.handle.send(N)}),b.hostContext!==void 0&&(qk({sessionId:h.sessionId,send:N=>Z.handle.send(N),initial:b.hostContext}),Bk({app:r})),await S(Z.ack),pm(f),z(),{ok:!0,mountedRender:m}}function mie(e){let t=new vu({subscribeFrameBuilder:()=>({type:"subscribe",payload:{sessionId:e.meta.sessionId,appId:e.meta.appId,...e.meta.wsToken!==void 0?{wsToken:e.meta.wsToken}:{}}})});return t.register(I1({statusRefs:e.statusRefs,pinnedSessionId:e.pinnedSessionId})),t}function gie(e){return e!==null&&typeof e=="object"&&e.name==="UpgradeRequiredError"&&e.code==="UPGRADE_REQUIRED"&&typeof e.message=="string"}function hie(){return typeof process>"u"?!0:process.env?.GGUI_RENDERER_AUTOSTART!=="false"}function yie(){let e=ck();return e.ok?e.meta:null}function vie(e){if(e!==void 0)try{let t=JSON.parse(e);return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:void 0}catch{return}}async function JU(e){let t=vie(e.propsJson);if(e.kind!==void 0)return{id:e.sessionId,appId:e.appId,type:"system",kind:e.kind,...t!==void 0?{props:t}:{}};if(e.codeUrl===void 0)return null;let r=await fetch(e.codeUrl);if(!r.ok)throw new Error(`buildGguiSessionSeedInput: codeUrl fetch failed (${r.status}): ${e.codeUrl}`);let o=await r.text();return{id:e.sessionId,appId:e.appId,componentCode:o,...t!==void 0?{props:t}:{}}}function Ob(e){let t=VM(e);return t.ok?t.meta:null}function $ie(){if(typeof window>"u")return null;let e=window.__GGUI_PENDING_TOOL_RESULTS__;if(!Array.isArray(e)||e.length===0)return null;for(let t of e){let r=Ob(t);if(r!==null)return r}return null}function bie(e,t){return new Promise(r=>{let o=!1,n=a=>{if(o)return;let s=Ob(a);s!==null&&(o=!0,e.removeEventListener("toolresult",n),clearTimeout(i),r(s))};e.addEventListener("toolresult",n);let i=setTimeout(()=>{o||(o=!0,e.removeEventListener("toolresult",n),r(null))},t)})}function xie(e){return typeof window>"u"?Promise.resolve(null):new Promise(t=>{let r=!1,o=a=>{r||(r=!0,window.removeEventListener("message",n),clearTimeout(i),t(a))},n=a=>{let s=a.data;if(s==null||s.jsonrpc!=="2.0"||s.method!=="ui/notifications/tool-result")return;let l=Ob(s.params);l!==null&&o(l)};window.addEventListener("message",n);let i=setTimeout(()=>o(null),e)})}var FU=!1,YU=null,LT=!1,ZT=!1;function qT(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function _ie(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){let o=JSON.stringify(e);return o.length>60?`${o.slice(0,57)}\u2026`:o}if(typeof e!="object")return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,n])=>{if(n===null)return`${o}: null`;if(n===void 0)return`${o}: undefined`;if(typeof n=="string")return`${o}: ${n}`;if(typeof n=="number"||typeof n=="boolean")return`${o}: ${n}`;let i=JSON.stringify(n)??String(n);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function BT(e){if(!(typeof window>"u"))try{window.parent.postMessage(e,"*")}catch{}}function XU(e){let t=Ng();t!==null&&t.updateModelContext(e).catch(()=>{})}function Sie(e){let t=Ng();t!==null&&t.openLink(e).catch(()=>{})}function kie(e){let t=Ng();t!==null&&t.requestDisplayMode(e).catch(()=>{})}var QU={postUpdateModelContext:e=>{XU(e)},postContextMirror:e=>{BT({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"tools/call",params:{name:"ggui_runtime_sync_context",arguments:{sessionId:e.sessionId,appId:e.appId,snapshot:e.snapshot}}})}};async function eL(e,t){let r=Ng();if(r===null)return{error:{message:"callServerToolSpec: no App bound \u2014 call setCurrentApp() first"}};try{return{jsonrpc:"2.0",result:await r.callServerTool({name:e,arguments:t})}}catch(o){return{error:{message:o instanceof Error?o.message:String(o)}}}}function tL(e){BT({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"tools/call",params:{name:e.toolName,arguments:{kind:e.kind,payload:e.payload,sessionId:e.sessionId,appId:e.appId,actionId:e.actionId,firedAt:e.firedAt}}})}function wie(e){if(e===null||typeof e!="object"||"error"in e&&e.error!==void 0&&e.error!==null)return"fallback";let t=e.result;if(t===null||typeof t!="object")return"fallback";let r=t;return(r.structuredContent&&typeof r.structuredContent=="object"?r.structuredContent:r).ok===!0?"success":"fallback"}function Eie(e){if(e===null||typeof e!="object")return;let t=e.result;if(t===null||typeof t!="object")return;let r=t,n=(r.structuredContent&&typeof r.structuredContent=="object"?r.structuredContent:r).consumerPresent;return typeof n=="boolean"?n:void 0}function Cb(e,t){if(typeof document>"u"||window.__GGUI_TOAST_DISABLED__)return;let o="__ggui-action-toast__",n=document.getElementById(o);n||(n=document.createElement("div"),n.id=o,n.style.cssText=["position:fixed","bottom:16px","left:50%","transform:translateX(-50%)","z-index:2147483647","pointer-events:auto","max-width:90%","padding:8px 14px","border-radius:8px","font:13px/1.4 system-ui,sans-serif","color:#fff","box-shadow:0 4px 12px rgba(0,0,0,.18)","transition:opacity 180ms ease,transform 180ms ease","opacity:0","white-space:nowrap","overflow:hidden","text-overflow:ellipsis","cursor:pointer"].join(";"),document.body.appendChild(n));let i=t==="pending"?"rgba(60,60,68,.92)":t==="success"?"rgba(34,139,84,.94)":t==="fallback"||t==="action_required"?"rgba(110,89,165,.94)":"rgba(178,54,54,.94)";n.style.background=i,n.textContent=e,n.style.opacity="1",n.style.transform="translateX(-50%) translateY(0)";let a=n;a.__toastTimer&&clearTimeout(a.__toastTimer),t==="action_required"?n.onclick=()=>{n&&(n.style.opacity="0",n.style.transform="translateX(-50%) translateY(8px)",n.onclick=null)}:(n.onclick=null,(t==="success"||t==="fallback"||t==="error")&&(a.__toastTimer=window.setTimeout(()=>{n&&(n.style.opacity="0",n.style.transform="translateX(-50%) translateY(8px)")},2500)))}function Tie(){if(typeof document>"u")return;let e=document.getElementById("__ggui-action-toast__");if(!e)return;e.style.opacity="0",e.style.transform="translateX(-50%) translateY(8px)";let t=e;t.__toastTimer&&(clearTimeout(t.__toastTimer),t.__toastTimer=void 0)}oie(e=>typeof e.eventId!="string"||e.eventId.length===0?!1:(Tie(),!0));function zie(){let e={};for(let[t,r]of $s)e[t]=r;return e}function Rie(e){let t=JSON.stringify({sessionId:e.sessionId}),r=[`Your REQUIRED FIRST TOOL CALL is ggui_consume with arguments ${t}. Call it NOW to retrieve and process the pending interaction. Do not respond conversationally; do not summarize. Issue the tool call as your next action.`,"",'<ggui_directive kind="user-action">',` <session_id>${e.sessionId}</session_id>`," <next_tool>ggui_consume</next_tool>",` <next_args>${t}</next_args>`,"</ggui_directive>","",`The user interacted with render ${e.sessionId} while no ggui_consume long-poll was active. The gesture is queued on the consume pipe for that render \u2014 it is NOT in this message. After ggui_consume returns, react to the returned event with the appropriate domain tool, then call ggui_update on the SAME sessionId (${e.sessionId}).`].join(`
255
255
  `),n={kind:"user-action",description:`User interacted with render ${e.sessionId}; call ggui_consume to retrieve and process it.`,sessionId:e.sessionId,actionId:e.actionId,submittedAt:e.submittedAt,intent:e.intent,nextStep:{tool:"ggui_consume",args:{sessionId:e.sessionId}}};BT({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"ui/message",params:{role:"user",content:[{type:"text",text:r,_meta:{"ai.ggui/userAction":n}}]}})}function Cie(e){if(typeof window>"u")return;let{toolName:t,intent:r,data:o,sessionId:n,appId:i}=e,a=new Date().toISOString(),s=qT(`${r}|${JSON.stringify(o??null)}|${a}`),l=_ie(o),c=l===""?"":` (${l})`,u=zie();XU({content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:s,intent:r,data:o??null,firedAt:a,sessionId:n,appId:i})}`}]}),Cb(`\u2192 ${r}${c}`,"pending"),(async()=>{let p=null;try{p=await eL(t,{kind:"dispatch",payload:{intent:r,actionData:o??null,uiContext:u},sessionId:n,appId:i,actionId:s,firedAt:a})}catch{Cb(`\u26A0 ${r} \u2014 transport error`,"error"),p=null}if(p!==null&&wie(p)==="success"){if(Eie(p)===!1){Cb(`\u{1F4AC} ${r}${c} \u2014 agent not listening, sent to chat`,"action_required"),Rie({intent:r,sessionId:n,actionId:s,submittedAt:a});return}return}Cb(`\u26A0 ${r} \u2014 could not reach the agent`,"error")})()}function Iie(){if(typeof window>"u")return"ggui_runtime_submit_action";let e=window.__GGUI_DISPATCH_TOOL__;return typeof e=="string"&&e.length>0?e:"ggui_runtime_submit_action"}function Oie(e){let{actionName:t,data:r,meta:o,dispatchToolName:n}=e;Cie({toolName:n,intent:t,data:r,sessionId:o.sessionId,appId:o.appId})}function Mie(e){if(typeof window>"u")return;let{toolName:t,url:r,sessionId:o,appId:n}=e;if(typeof r!="string"||r.length===0)throw new RangeError("wire.openLink(url): `url` must be a non-empty string.");let i=new Date().toISOString(),a=qT(`openLink|${r}|${i}`);tL({toolName:t,kind:"openLink",payload:{url:r},sessionId:o,appId:n,actionId:a,firedAt:i}),Sie({url:r})}function KU(e){if(typeof window>"u")return;let{toolName:t,mode:r,sessionId:o,appId:n}=e,i=new Date().toISOString(),a=qT(`requestDisplayMode|${r}|${i}`);tL({toolName:t,kind:"requestDisplayMode",payload:{mode:r},sessionId:o,appId:n,actionId:a,firedAt:i}),kie({mode:r})}function Aie(e){if(LT||typeof window>"u"||typeof document>"u")return;LT=!0;let{dispatchToolName:t,sessionId:r,appId:o}=e,n=i=>{if(i.defaultPrevented)return;let a=i.target;if(a===null||!(a instanceof Element))return;let s=a.closest("a[href]");if(s===null||!(s instanceof HTMLAnchorElement))return;let l=s.getAttribute("href");if(l===null||l.startsWith("#"))return;let c=s.href,u;try{u=new URL(c)}catch{return}if(u.protocol!=="http:"&&u.protocol!=="https:")return;let f=s.getAttribute("target")==="_blank",m=u.origin!==window.location.origin;!f&&!m||(i.preventDefault(),Mie({toolName:t,url:c,sessionId:r,appId:o}))};document.addEventListener("click",n,{capture:!0})}function jie(e){if(ZT||typeof window>"u"||typeof Element>"u"||typeof Document>"u")return;ZT=!0;let{dispatchToolName:t,sessionId:r,appId:o}=e;Element.prototype.requestFullscreen=function(n){return KU({toolName:t,mode:"fullscreen",sessionId:r,appId:o}),Promise.resolve()},Document.prototype.exitFullscreen=function(){return KU({toolName:t,mode:"inline",sessionId:r,appId:o}),Promise.resolve()}}function _we(){LT=!1,ZT=!1}function Nie(){if(FU)return;let e=Ng();if(e===null)return;FU=!0;let t=null;e.addEventListener("toolresult",r=>{let o=Ob(r);if(o===null)return;let n=typeof o.wsUrl=="string"&&o.wsUrl.length>0&&typeof o.wsToken=="string"&&o.wsToken.length>0?"live":"-",i=[o.sessionId,o.kind??"-",o.codeUrl??"-",o.propsJson??"-",n].join("|");if(i===t)return;t=i;let a=YU;a!==null&&JU(o).then(s=>{s!==null&&a(s).then(()=>{let l=new Set((o.contextSlots??[]).map(c=>c.name));d7(QU,l,{sessionId:o.sessionId,appId:o.appId})})})})}function Die(){if(typeof window>"u")return!1;let e=window.__GGUI_META__;if(e===null||typeof e!="object"||Array.isArray(e))return!1;let r=e["ai.ggui/render"];if(r===null||typeof r!="object"||Array.isArray(r))return!1;let o=r;return typeof o.wsUrl=="string"&&o.wsUrl.length>0&&typeof o.wsToken=="string"&&o.wsToken.length>0&&typeof o.sessionId=="string"&&o.sessionId.length>0&&typeof o.appId=="string"&&o.appId.length>0}function Ib(e){let{app:t,transport:r}=lie();Pie({doc:document,app:t,transport:r,notifyParent:o=>{if(o.type===av){die();return}pie(o.reason,o.message)},onObserve:i7,onLifecycle:a7,...e!==void 0?{preResolvedMeta:e}:{}})}if(hie()&&typeof window<"u"){let e=yie();if(e!==null)Ib(e);else{let t=$ie();t!==null?Ib(t):Die()?Ib():xie(WU).then(r=>{Ib(r??void 0)})}}async function Pie(e){let[t,r,o,n,i,a,s,l,c]=await Promise.all([Promise.resolve().then(()=>O(te(),1)),Promise.resolve().then(()=>O(vg(),1)),Promise.resolve().then(()=>(zg(),S9)),Promise.resolve().then(()=>(j7(),A7)),Promise.resolve().then(()=>(mU(),fU)),Promise.resolve().then(()=>(wU(),kU)),Promise.resolve().then(()=>(NU(),jU)),Promise.resolve().then(()=>(z1(),i3)),Promise.resolve().then(()=>(VU(),ZU))]),[u,p]=await Promise.all([Promise.resolve().then(()=>(qU(),HU)),Promise.resolve().then(()=>(GU(),BU))]),f={setup:({meta:m,renderInto:g,statusRefs:v,onObserve:b})=>{let y=p.loadGadgetRegistry(c,m.gadgets??[]);u.installGlobalRegistry({react:t,reactDom:r,primitives:o,components:n,compositions:i,interact:a,tokens:s,wire:l,gadgets:{"@ggui-ai/gadgets":c},publicEnv:m.publicEnv??{}}),y.then(De=>{let qt=u.getGlobalRegistry();if(qt===void 0)return;let no=qt.gadgets;for(let[dr,xs]of Object.entries(De))dr in no||(no[dr]=xs)});let h=u.getGlobalRegistry(),$=h!==void 0&&m.contextSlots!==void 0?s7(h.contexts,t,m.contextSlots):[],_=u7({react:t,poster:QU,consoleWarn:typeof console<"u"&&typeof console.warn=="function"?console.warn.bind(console):void 0,identity:{sessionId:m.sessionId,appId:m.appId}}),k=new rl,j=[],S=null,T={send:De=>{if(S!==null){S.send(De);return}j.push(De)},__attachReal(De){for(S=De;j.length>0;){let qt=j.shift();qt!==void 0&&De.send(qt)}}},z=null,R=null,M=Iie();Aie({dispatchToolName:M,sessionId:m.sessionId,appId:m.appId}),jie({dispatchToolName:M,sessionId:m.sessionId,appId:m.appId});let Z=h3({sessionId:m.sessionId,appId:m.appId,getCurrentGguiSession:()=>z,manager:T,streamBus:k,onDispatchEnvelope:De=>{if(De.type!=="data:submit")return;let qt=De.payload;qt===void 0||typeof qt.action!="string"||qt.action.length===0||Oie({actionName:qt.action,data:qt.data,meta:{sessionId:m.sessionId,appId:m.appId},dispatchToolName:M})}}),N=De=>{if(!(De.type==="mcpApps"||De.type==="system"))return qt=>t.createElement(_,{slots:$,children:qt})},Q=De=>De.type==="mcpApps"||De.type==="system"?null:Z,Ce=De=>{let qt=N(De);return{render:De,scopedWireConfig:Q(De),streamBus:k,sessionId:m.sessionId,...m.gadgets!==void 0?{gadgetPackages:m.gadgets.map(no=>no.package)}:{},...m.themeId!==void 0?{themeId:m.themeId}:{},...m.themeMode!==void 0?{themeMode:m.themeMode}:{},...m.theme!==void 0?{appTheme:m.theme}:{},...qt!==void 0?{wrapOuter:qt}:{}}},at=async De=>{if(z=De,R===null){R=await o7(g,Ce(De));return}await R.update(Ce(De))};YU=at,Nie();let oe={reservedValidators:s3(void 0,void 0)},Fe=y3({sessionId:m.sessionId,appId:m.appId,...m.streamWebSocketLocalTools!==void 0?{streamWebSocketLocalTools:m.streamWebSocketLocalTools}:{},send:De=>T.send(De),toolsCall:async({toolName:De,args:qt})=>{let no=await eL(De,qt);if(no.error!==void 0)throw new Error(no.error.message??"tools/call failed");let dr=no.result;if(dr===null||typeof dr!="object")return null;let xs=dr.structuredContent;return xs!==void 0?xs:dr},streamBus:k,...b!==void 0?{onObserve:b}:{}}),_t=new vu({subscribeFrameBuilder:()=>({type:"subscribe",payload:{sessionId:m.sessionId,appId:m.appId,...m.wsToken!==void 0?{wsToken:m.wsToken}:{}}})});return _t.register(I1({statusRefs:v,pinnedSessionId:m.sessionId,applyRender:at,getChannelTransport:()=>Fe})),_t.register(pw({getCurrentGguiSession:()=>z,streamBus:k,validatorCtx:oe})),_t.register(uw({getCurrentGguiSession:()=>z,applyRender:at})),_t.register(dw({dispatch:iie})),_t.register(fw({getChannelTransport:()=>Fe})),_t.register(mw({getChannelTransport:()=>Fe})),_t.register(gw({...b!==void 0?{onObserve:b}:{}})),{rootWireConfig:Z,streamBus:k,applyRender:at,getCurrentGguiSession:()=>z,validatorCtx:oe,manager:T,channelTransport:Fe,channelRegistry:_t,composedGadgets:y}},attachManager:(m,g)=>{let v=m.manager;typeof v.__attachReal=="function"&&v.__attachReal(g)},teardown:m=>{m.channelTransport.dispose()}};await fie({doc:e.doc,app:e.app,transport:e.transport,notifyParent:e.notifyParent,renderer:f,...e.onObserve!==void 0?{onObserve:e.onObserve}:{},...e.onLifecycle!==void 0?{onLifecycle:e.onLifecycle}:{},...e.preResolvedMeta!==void 0?{preResolvedMeta:e.preResolvedMeta}:{}})}export{xwe as __resetAppForTest,_we as __resetInterceptorsForTest,fie as bootSequence,JU as buildGguiSessionSeedInput,Cie as dispatchSubmitAction,tL as emitAudit,Ob as extractMetaFromToolResult,_ie as formatSubmitActionDataInline,Aie as installAnchorClickInterceptor,jie as installFullscreenInterceptors,Mie as openLinkInParent,yie as readSelfContainedMeta,KU as requestDisplayModeInParent,Iie as resolveDispatchToolName,Oie as routeDispatch,cie as setCurrentApp,oie as subscribeDrainAck};
256
256
  /*! Bundled license information:
257
257