@ggui-ai/iframe-runtime 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/iframe-runtime.js
CHANGED
|
@@ -62,7 +62,7 @@ var JU=Object.create;var o1=Object.defineProperty;var WU=Object.getOwnPropertyDe
|
|
|
62
62
|
|
|
63
63
|
`)}f.write("payload.value = newResult;"),f.write("return payload;");let h=f.compile();return($,x)=>h(m,$,x)},i,a=Xa,s=!Wa.jitless,c=s&&c1.value,u=t.catchall,p;e._zod.parse=(m,f)=>{p??(p=o.value);let g=m.value;return a(g)?s&&c&&f?.async===!1&&f.jitless!==!0?(i||(i=r(t.shape)),m=i(m,f),u?iz([],g,m,f,p,e):m):n(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m)}});ed=E("$ZodUnion",(e,t)=>{ne.init(e,t),fe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),fe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),fe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),fe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${o.map(r=>Vu(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:o.value,issues:[]},r);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(s=>q6(s,o,e,r)):q6(a,o,e,r)}});Q$=E("$ZodXor",(e,t)=>{ed.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:o.value,issues:[]},r);l instanceof Promise?(a.push(l),i=!0):a.push(l)}return i?Promise.all(a).then(s=>Z6(s,o,e,r)):Z6(a,o,e,r)}}),eb=E("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ed.init(e,t);let n=e._zod.parse;fe(e._zod,"propValues",()=>{let r={};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)){r[s]||(r[s]=new Set);for(let c of l)r[s].add(c)}}return r});let o=hl(()=>{let r=t.options,i=new Map;for(let a of r){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=(r,i)=>{let a=r.value;if(!Xa(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback||i.direction==="backward"?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),tb=E("$ZodIntersection",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>B6(n,l,c)):B6(n,i,a)}});Zm=E("$ZodTuple",(e,t)=>{ne.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{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=G6(n,"optin"),l=G6(n,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let c=new Array(n.length);for(let u=0;u<n.length;u++){let p=n[u]._zod.run({value:i[u],issues:[]},r);p instanceof Promise?a.push(p.then(m=>{c[u]=m})):c[u]=p}if(t.rest){let u=n.length-1,p=i.slice(n.length);for(let m of p){u++;let f=t.rest._zod.run({value:m,issues:[]},r);f instanceof Promise?a.push(f.then(g=>F6(g,o,u))):F6(f,o,u)}}return a.length?Promise.all(a).then(()=>K6(c,o,n,i,l)):K6(c,o,n,i,l)}});nb=E("$ZodRecord",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Oi(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],a=t.keyType._zod.values;if(a){n.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.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(f=>En(f,o,ft())),input:c,path:[c],inst:e});continue}let p=u.value,m=t.valueType._zod.run({value:r[c],issues:[]},o);m instanceof Promise?i.push(m.then(f=>{f.issues.length&&n.issues.push(...Un(c,f.issues)),n.value[p]=f.value})):(m.issues.length&&n.issues.push(...Un(c,m.issues)),n.value[p]=m.value)}let l;for(let c in r)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))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"&&Mm.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"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>En(p,o,ft())),input:s,path:[s],inst:e});continue}let u=t.valueType._zod.run({value:r[s],issues:[]},o);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&n.issues.push(...Un(s,p.issues)),n.value[l.value]=p.value})):(u.issues.length&&n.issues.push(...Un(s,u.issues)),n.value[l.value]=u.value)}}return i.length?Promise.all(i).then(()=>n):n}}),rb=E("$ZodMap",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){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])=>{J6(u,p,n,a,r,e,o)})):J6(l,c,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});ob=E("$ZodSet",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(l=>W6(l,n))):W6(s,n)}return i.length?Promise.all(i).then(()=>n):n}});ib=E("$ZodEnum",(e,t)=>{ne.init(e,t);let n=Hu(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>qu.has(typeof r)).map(r=>typeof r=="string"?yr(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),ab=E("$ZodLiteral",(e,t)=>{if(ne.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?yr(o):o?yr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),sb=E("$ZodFile",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),lb=E("$ZodTransform",(e,t)=>{ne.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ci(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new Kr;return n.value=r,n.fallback=!0,n}});Bm=E("$ZodOptional",(e,t)=>{ne.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 n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vu(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(a=>Y6(a,r)):Y6(i,r)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),cb=E("$ZodExactOptional",(e,t)=>{Bm.init(e,t),fe(e._zod,"values",()=>t.innerType._zod.values),fe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o)}),ub=E("$ZodNullable",(e,t)=>{ne.init(e,t),fe(e._zod,"optin",()=>t.innerType._zod.optin),fe(e._zod,"optout",()=>t.innerType._zod.optout),fe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Vu(n.source)}|null)$`):void 0}),fe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),db=E("$ZodDefault",(e,t)=>{ne.init(e,t),e._zod.optin="optional",fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>X6(i,t)):X6(r,t)}});pb=E("$ZodPrefault",(e,t)=>{ne.init(e,t),e._zod.optin="optional",fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),fb=E("$ZodNonOptional",(e,t)=>{ne.init(e,t),fe(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Q6(i,e)):Q6(r,e)}});mb=E("$ZodSuccess",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ci("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),gb=E("$ZodCatch",(e,t)=>{ne.init(e,t),e._zod.optin="optional",fe(e._zod,"optout",()=>t.innerType._zod.optout),fe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>En(a,o,ft()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>En(i,o,ft()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),hb=E("$ZodNaN",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Gm=E("$ZodPipe",(e,t)=>{ne.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=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>Pm(a,t.in,o)):Pm(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Pm(i,t.out,o)):Pm(r,t.out,o)}});td=E("$ZodCodec",(e,t)=>{ne.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=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(a=>Um(a,t,o)):Um(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>Um(a,t,o)):Um(i,t,o)}}});yb=E("$ZodPreprocess",(e,t)=>{Gm.init(e,t)}),vb=E("$ZodReadonly",(e,t)=>{ne.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=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(ez):ez(r)}});$b=E("$ZodTemplateLiteral",(e,t)=>{ne.init(e,t);let n=[];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 r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||d1.has(typeof o))n.push(yr(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>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)}),bb=E("$ZodFunction",(e,t)=>(ne.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Fu(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Fu(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Ku(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Ku(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Zm({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),xb=E("$ZodPromise",(e,t)=>{ne.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),_b=E("$ZodLazy",(e,t)=>{ne.init(e,t),fe(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),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=(n,o)=>e._zod.innerType._zod.run(n,o)}),Sb=E("$ZodCustom",(e,t)=>{Xe.init(e,t),ne.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>tz(i,n,o,e));tz(r,n,o,e)}})});function sz(){return{localeError:tH()}}var tH,lz=_(()=>{F();tH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.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 ${j(r.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: ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.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 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.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 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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 "${r.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}`:`${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${I(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.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 ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function cz(){return{localeError:nH()}}var nH,uz=_(()=>{F();nH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${j(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${I(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function dz(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}function pz(){return{localeError:rH()}}var rH,fz=_(()=>{F();rH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.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 r.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 ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=dz(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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=dz(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 ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.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 ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${I(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function mz(){return{localeError:oH()}}var oH,gz=_(()=>{F();oH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.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 r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.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 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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} ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${I(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function hz(){return{localeError:iH()}}var iH,yz=_(()=>{F();iH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${j(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${I(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}}});function vz(){return{localeError:aH()}}var aH,$z=_(()=>{F();aH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${j(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${I(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}}});function bz(){return{localeError:sH()}}var sH,xz=_(()=>{F();sH=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${j(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${I(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}}});function _z(){return{localeError:lH()}}var lH,Sz=_(()=>{F();lH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${j(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;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: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${I(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function kz(){return{localeError:cH()}}var cH,wz=_(()=>{F();cH=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${j(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${I(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function Fm(){return{localeError:uH()}}var uH,wb=_(()=>{F();uH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${j(r.values[0])}`:`Invalid option: expected one of ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}}});function Ez(){return{localeError:dH()}}var dH,zz=_(()=>{F();dH=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${j(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}}});function Tz(){return{localeError:pH()}}var pH,Cz=_(()=>{F();pH=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${j(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}}});function Iz(){return{localeError:fH()}}var fH,Rz=_(()=>{F();fH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.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 r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${j(r.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 ${I(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;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`:`${n[i.format]??r.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 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${I(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.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 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function Oz(){return{localeError:mH()}}var mH,Mz=_(()=>{F();mH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${j(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${I(r.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 Az(){return{localeError:gH()}}var gH,jz=_(()=>{F();gH=()=>{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(r){return e[r]??null}let n={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={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${j(r.values[0])} attendu`:`Option invalide : une valeur parmi ${I(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${o[r.origin]??"valeur"} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${I(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function Nz(){return{localeError:hH()}}var hH,Dz=_(()=>{F();hH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${j(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`${n[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${I(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}}});function Pz(){return{localeError:yH()}}var yH,Uz=_(()=>{F();yH=()=>{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"}},n=c=>c?e[c]:void 0,o=c=>{let u=n(c);return u?u.label:c??e.unknown.label},r=c=>`\u05D4${o(c)}`,i=c=>(n(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),m=N(c.input),f=l[m]??e[m]?.label??m;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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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 ${j(c.values[0])}`;let u=c.values.map(f=>j(f));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=r(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 m=c.inclusive?"<=":"<",f=i(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${c.maximum.toString()}`}case"too_small":{let u=a(c.origin),p=r(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 m=c.inclusive?">=":">",f=i(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${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],m=p?.label??u.format,g=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \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"}: ${I(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${r(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function Lz(){return{localeError:vH()}}var vH,Hz=_(()=>{F();vH=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${j(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=o[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${I(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return"Neispravan unos"}}}});function Vz(){return{localeError:$H()}}var $H,qz=_(()=>{F();$H=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${j(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function Zz(e,t,n){return Math.abs(e)===1?t:n}function El(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}function Bz(){return{localeError:bH()}}var bH,Gz=_(()=>{F();bH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.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 ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=Zz(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 ${El(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.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 ${El(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=Zz(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 ${El(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.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 ${El(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.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 ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${I(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${El(r.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 ${El(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function Fz(){return{localeError:xH()}}var xH,Kz=_(()=>{F();xH=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${j(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`${n[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}}});function Jz(){return{localeError:_H()}}var _H,Wz=_(()=>{F();_H=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${j(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${I(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}}});function Yz(){return{localeError:SH()}}var SH,Xz=_(()=>{F();SH=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${j(r.values[0])}`:`Opzione non valida: atteso uno tra ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`Input non valido: ${n[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${I(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}}});function Qz(){return{localeError:kH()}}var kH,eT=_(()=>{F();kH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.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 r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${j(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${I(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;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${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.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${r.keys.length>1?"\u7FA4":""}: ${I(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function tT(){return{localeError:wH()}}var wH,nT=_(()=>{F();wH=()=>{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(r){return e[r]??null}let n={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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\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:"\u10D5\u10D4\u10DA\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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.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 ${j(r.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 ${I(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.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 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${r.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 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.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 ${r.origin} ${a.verb} ${i}${r.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 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 \u10D5\u10D4\u10DA\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 \u10D5\u10D4\u10DA\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 \u10D5\u10D4\u10DA\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 ${n[i.format]??r.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 ${r.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${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${I(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.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 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function Km(){return{localeError:EH()}}var EH,Eb=_(()=>{F();EH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.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 ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${I(r.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 ${r.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 ${r.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 rT(){return Km()}var oT=_(()=>{Eb()});function iT(){return{localeError:zH()}}var zH,aT=_(()=>{F();zH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.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 r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${j(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${I(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${I(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function sT(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}function lT(){return{localeError:TH()}}var nd,TH,cT=_(()=>{F();nd=e=>e.charAt(0).toUpperCase()+e.slice(1);TH=()=>{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(r,i,a,s){let l=e[r]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${j(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${I(r.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[r.origin]??r.origin,a=t(r.origin,sT(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${nd(i??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${nd(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[r.origin]??r.origin,a=t(r.origin,sT(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${nd(i??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${nd(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${I(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[r.origin]??r.origin;return`${nd(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function uT(){return{localeError:CH()}}var CH,dT=_(()=>{F();CH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.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 r.values.length===1?`Invalid input: expected ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.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 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.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 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`${r.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"}: ${I(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.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 ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function pT(){return{localeError:IH()}}var IH,fT=_(()=>{F();IH=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${j(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`${n[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${I(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}}});function mT(){return{localeError:RH()}}var RH,gT=_(()=>{F();RH=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${j(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;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: ${n[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}}});function hT(){return{localeError:OH()}}var OH,yT=_(()=>{F();OH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${j(r.values[0])}`:`Ugyldig valg: forventet en av ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${I(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}}});function vT(){return{localeError:MH()}}var MH,$T=_(()=>{F();MH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${j(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function bT(){return{localeError:AH()}}var AH,xT=_(()=>{F();AH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.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 r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${j(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${I(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;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`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${I(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.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 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function _T(){return{localeError:jH()}}var jH,ST=_(()=>{F();jH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${j(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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) ${n[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function kT(){return{localeError:NH()}}var NH,wT=_(()=>{F();NH=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${j(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`${n[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${I(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}}});function ET(){return{localeError:DH()}}var DH,zT=_(()=>{F();DH=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${j(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${I(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}}});function TT(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}function CT(){return{localeError:PH()}}var PH,IT=_(()=>{F();PH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.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 r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=TT(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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=TT(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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.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 ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${I(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.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 ${r.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 RT(){return{localeError:UH()}}var UH,OT=_(()=>{F();UH=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${j(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${I(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}}});function MT(){return{localeError:LH()}}var LH,AT=_(()=>{F();LH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${j(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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) ${n[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${I(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function jT(){return{localeError:HH()}}var HH,NT=_(()=>{F();HH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.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 ${j(r.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 ${I(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.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 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.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 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.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 ${r.origin} ${i}${r.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 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.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${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${I(r.keys,", ")}`;case"invalid_key":return`${r.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`${r.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 DT(){return{localeError:VH()}}var VH,PT=_(()=>{F();VH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;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: ${n[i.format]??r.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 ${r.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: ${I(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.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 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function UT(){return{localeError:qH()}}var qH,LT=_(()=>{F();qH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${j(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${I(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function Jm(){return{localeError:ZH()}}var ZH,zb=_(()=>{F();ZH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.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 ${r.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 r.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 ${j(r.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 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${r.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 ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.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 ${r.origin} ${a.verb} ${i}${r.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 ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${I(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.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 ${r.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 HT(){return Jm()}var VT=_(()=>{zb()});function qT(){return{localeError:BH()}}var BH,ZT=_(()=>{F();BH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.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 r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${j(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${I(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.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: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.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${r.keys.length>1?"\u0632":""}: ${I(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function BT(){return{localeError:GH()}}var GH,GT=_(()=>{F();GH=()=>{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"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${j(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${I(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function FT(){return{localeError:FH()}}var FH,KT=_(()=>{F();FH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.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 r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${j(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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}`:`${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${I(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.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 ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function JT(){return{localeError:KH()}}var KH,WT=_(()=>{F();KH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.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 r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${j(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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${n[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${I(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function YT(){return{localeError:JH()}}var JH,XT=_(()=>{F();JH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.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 r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${j(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;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 ${n[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${I(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function QT(){return{localeError:WH()}}var WH,eC=_(()=>{F();WH=()=>{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(r){return e[r]??null}let n={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 r=>{switch(r.code){case"invalid_type":{let i=o[r.expected]??r.expected,a=N(r.input),s=o[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.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 r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${j(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${I(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;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: ${n[i.format]??r.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 ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${I(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.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 ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var zl={};bt(zl,{ar:()=>sz,az:()=>cz,be:()=>pz,bg:()=>mz,ca:()=>hz,cs:()=>vz,da:()=>bz,de:()=>_z,el:()=>kz,en:()=>Fm,eo:()=>Ez,es:()=>Tz,fa:()=>Iz,fi:()=>Oz,fr:()=>Az,frCA:()=>Nz,he:()=>Pz,hr:()=>Lz,hu:()=>Vz,hy:()=>Bz,id:()=>Fz,is:()=>Jz,it:()=>Yz,ja:()=>Qz,ka:()=>tT,kh:()=>rT,km:()=>Km,ko:()=>iT,lt:()=>lT,mk:()=>uT,ms:()=>pT,nl:()=>mT,no:()=>hT,ota:()=>vT,pl:()=>_T,ps:()=>bT,pt:()=>kT,ro:()=>ET,ru:()=>CT,sl:()=>RT,sv:()=>MT,ta:()=>jT,th:()=>DT,tr:()=>UT,ua:()=>HT,uk:()=>Jm,ur:()=>qT,uz:()=>BT,vi:()=>FT,yo:()=>QT,zhCN:()=>JT,zhTW:()=>YT});var Tb=_(()=>{lz();uz();fz();gz();yz();$z();xz();Sz();wz();wb();zz();Cz();Rz();Mz();jz();Dz();Uz();Hz();qz();Gz();Kz();Wz();Xz();eT();nT();oT();Eb();aT();cT();dT();fT();gT();yT();$T();xT();ST();wT();zT();IT();OT();AT();NT();PT();LT();VT();zb();ZT();GT();KT();WT();XT();eC()});function rd(){return new Wm}var tC,Ym,Xm,Wm,Bt,od=_(()=>{Ym=Symbol("ZodOutput"),Xm=Symbol("ZodInput"),Wm=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[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 n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(tC=globalThis).__zod_globalRegistry??(tC.__zod_globalRegistry=rd());Bt=globalThis.__zod_globalRegistry});function Cb(e,t){return new e({type:"string",...H(t)})}function Ib(e,t){return new e({type:"string",coerce:!0,...H(t)})}function Qm(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...H(t)})}function id(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...H(t)})}function eg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...H(t)})}function tg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...H(t)})}function ng(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...H(t)})}function rg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...H(t)})}function ad(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H(t)})}function og(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...H(t)})}function ig(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...H(t)})}function ag(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...H(t)})}function sg(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...H(t)})}function lg(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...H(t)})}function cg(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...H(t)})}function ug(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...H(t)})}function dg(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...H(t)})}function pg(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...H(t)})}function Rb(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...H(t)})}function fg(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...H(t)})}function mg(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...H(t)})}function gg(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...H(t)})}function hg(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...H(t)})}function yg(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...H(t)})}function vg(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...H(t)})}function Ob(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...H(t)})}function Mb(e,t){return new e({type:"string",format:"date",check:"string_format",...H(t)})}function Ab(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...H(t)})}function jb(e,t){return new e({type:"string",format:"duration",check:"string_format",...H(t)})}function Nb(e,t){return new e({type:"number",checks:[],...H(t)})}function Db(e,t){return new e({type:"number",coerce:!0,checks:[],...H(t)})}function Pb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H(t)})}function Ub(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...H(t)})}function Lb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...H(t)})}function Hb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...H(t)})}function Vb(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...H(t)})}function qb(e,t){return new e({type:"boolean",...H(t)})}function Zb(e,t){return new e({type:"boolean",coerce:!0,...H(t)})}function Bb(e,t){return new e({type:"bigint",...H(t)})}function Gb(e,t){return new e({type:"bigint",coerce:!0,...H(t)})}function Fb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...H(t)})}function Kb(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...H(t)})}function Jb(e,t){return new e({type:"symbol",...H(t)})}function Wb(e,t){return new e({type:"undefined",...H(t)})}function Yb(e,t){return new e({type:"null",...H(t)})}function Xb(e){return new e({type:"any"})}function Qb(e){return new e({type:"unknown"})}function ex(e,t){return new e({type:"never",...H(t)})}function tx(e,t){return new e({type:"void",...H(t)})}function nx(e,t){return new e({type:"date",...H(t)})}function rx(e,t){return new e({type:"date",coerce:!0,...H(t)})}function ox(e,t){return new e({type:"nan",...H(t)})}function Jr(e,t){return new jm({check:"less_than",...H(t),value:e,inclusive:!1})}function Vn(e,t){return new jm({check:"less_than",...H(t),value:e,inclusive:!0})}function Wr(e,t){return new Nm({check:"greater_than",...H(t),value:e,inclusive:!1})}function vn(e,t){return new Nm({check:"greater_than",...H(t),value:e,inclusive:!0})}function sd(e){return Wr(0,e)}function ld(e){return Jr(0,e)}function cd(e){return Vn(0,e)}function ud(e){return vn(0,e)}function Do(e,t){return new F1({check:"multiple_of",...H(t),value:e})}function Po(e,t){return new W1({check:"max_size",...H(t),maximum:e})}function Yr(e,t){return new Y1({check:"min_size",...H(t),minimum:e})}function Ai(e,t){return new X1({check:"size_equals",...H(t),size:e})}function ji(e,t){return new Q1({check:"max_length",...H(t),maximum:e})}function fo(e,t){return new e$({check:"min_length",...H(t),minimum:e})}function Ni(e,t){return new t$({check:"length_equals",...H(t),length:e})}function ts(e,t){return new n$({check:"string_format",format:"regex",...H(t),pattern:e})}function ns(e){return new r$({check:"string_format",format:"lowercase",...H(e)})}function rs(e){return new o$({check:"string_format",format:"uppercase",...H(e)})}function os(e,t){return new i$({check:"string_format",format:"includes",...H(t),includes:e})}function is(e,t){return new a$({check:"string_format",format:"starts_with",...H(t),prefix:e})}function as(e,t){return new s$({check:"string_format",format:"ends_with",...H(t),suffix:e})}function dd(e,t,n){return new l$({check:"property",property:e,schema:t,...H(n)})}function ss(e,t){return new c$({check:"mime_type",mime:e,...H(t)})}function vr(e){return new u$({check:"overwrite",tx:e})}function ls(e){return vr(t=>t.normalize(e))}function cs(){return vr(e=>e.trim())}function us(){return vr(e=>e.toLowerCase())}function ds(){return vr(e=>e.toUpperCase())}function ps(){return vr(e=>l1(e))}function ix(e,t,n){return new e({type:"array",element:t,...H(n)})}function XH(e,t,n){return new e({type:"union",options:t,...H(n)})}function QH(e,t,n){return new e({type:"union",options:t,inclusive:!1,...H(n)})}function eV(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...H(o)})}function tV(e,t,n){return new e({type:"intersection",left:t,right:n})}function nV(e,t,n,o){let r=n instanceof ne,i=r?o:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...H(i)})}function rV(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...H(o)})}function oV(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...H(o)})}function iV(e,t,n){return new e({type:"set",valueType:t,...H(n)})}function aV(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...H(n)})}function sV(e,t,n){return new e({type:"enum",entries:t,...H(n)})}function lV(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...H(n)})}function ax(e,t){return new e({type:"file",...H(t)})}function cV(e,t){return new e({type:"transform",transform:t})}function uV(e,t){return new e({type:"optional",innerType:t})}function dV(e,t){return new e({type:"nullable",innerType:t})}function pV(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():u1(n)}})}function fV(e,t,n){return new e({type:"nonoptional",innerType:t,...H(n)})}function mV(e,t){return new e({type:"success",innerType:t})}function gV(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function hV(e,t,n){return new e({type:"pipe",in:t,out:n})}function yV(e,t){return new e({type:"readonly",innerType:t})}function vV(e,t,n){return new e({type:"template_literal",parts:t,...H(n)})}function $V(e,t){return new e({type:"lazy",getter:t})}function bV(e,t){return new e({type:"promise",innerType:t})}function sx(e,t,n){let o=H(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function lx(e,t,n){return new e({type:"custom",check:"custom",fn:t,...H(n)})}function cx(e,t){let n=nC(o=>(o.addIssue=r=>{if(typeof r=="string")o.issues.push(yl(r,o.value,n._zod.def));else{let i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(yl(i))}},e(o.value,o)),t);return n}function nC(e,t){let n=new Xe({check:"custom",...H(t)});return n._zod.check=e,n}function ux(e){let t=new Xe({check:"describe"});return t._zod.onattach=[n=>{let o=Bt.get(n)??{};Bt.add(n,{...o,description:e})}],t._zod.check=()=>{},t}function dx(e){let t=new Xe({check:"meta"});return t._zod.onattach=[n=>{let o=Bt.get(n)??{};Bt.add(n,{...o,...e})}],t._zod.check=()=>{},t}function px(e,t){let n=H(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let i=new Set(o),a=new Set(r),s=e.Codec??td,l=e.Boolean??Qu,c=e.String??es,u=new c({type:"string",error:n.error}),p=new l({type:"boolean",error:n.error}),m=new s({type:"pipe",in:u,out:p,transform:((f,g)=>{let v=f;return n.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:m,continue:!1}),{})}),reverseTransform:((f,g)=>f===!0?o[0]||"true":r[0]||"false"),error:n.error});return m}function Tl(e,t,n,o={}){let r=H(o),i={...H(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}var $g,rC=_(()=>{Dm();od();kb();F();$g={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function Di(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 Ae(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let m=a.schema,f=t.processors[r.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,m,u)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Ae(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"&&zn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Pi(e,t){let n=e.seen.get(t);if(!n)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 r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,m=e.external.uri??(g=>g);if(p)return{ref:m(p)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${f}`}}if(a[1]===n)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}=r(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>
|
|
64
64
|
|
|
65
|
-
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 Ui(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},p=l.ref;if(l.ref=null,p){o(p);let f=e.seen.get(p),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,u),s._zod.parent===p)for(let b in c)b==="$ref"||b==="allOf"||b in u||delete c[b];if(g.$ref&&f.def)for(let b in c)b==="$ref"||b==="allOf"||b in f.def&&JSON.stringify(c[b])===JSON.stringify(f.def[b])&&delete c[b]}let m=s._zod.parent;if(m&&m!==p){o(m);let f=e.seen.get(m);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Cl(t,"input",e.processors),output:Cl(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function zn(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return zn(o.element,n);if(o.type==="set")return zn(o.valueType,n);if(o.type==="lazy")return zn(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return zn(o.innerType,n);if(o.type==="intersection")return zn(o.left,n)||zn(o.right,n);if(o.type==="record"||o.type==="map")return zn(o.keyType,n)||zn(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:zn(o.in,n)||zn(o.out,n);if(o.type==="object"){for(let r in o.shape)if(zn(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(zn(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(zn(r,n))return!0;return!!(o.rest&&zn(o.rest,n))}return!1}var fx,Cl,pd=_(()=>{od();fx=(e,t={})=>n=>{let o=Di({...n,processors:t});return Ae(e,o),Pi(o,e),Ui(o,e)},Cl=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},a=Di({...r??{},target:i,io:t,processors:n});return Ae(e,a),Pi(a,e),Ui(a,e)}});function fd(e,t){if("_idmap"in e){let o=e,r=Di({...t,processors:bg}),i={};for(let l of o._idmap.entries()){let[c,u]=l;Ae(u,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let l of o._idmap.entries()){let[c,u]=l;Pi(r,u),a[c]=Ui(r,u)}if(Object.keys(i).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let n=Di({...t,processors:bg});return Ae(e,n),Pi(n,e),Ui(n,e)}var xV,mx,gx,hx,yx,vx,$x,bx,xx,_x,Sx,kx,wx,Ex,zx,Tx,Cx,Ix,Rx,Ox,Mx,Ax,jx,Nx,Dx,Px,xg,Ux,Lx,Hx,Vx,qx,Zx,Bx,Gx,Fx,Kx,Jx,_g,Wx,bg,md=_(()=>{pd();F();xV={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mx=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof a=="number"&&(r.maxLength=a),s&&(r.format=xV[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},gx=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let p=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";p?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof i=="number"&&(r.minimum=i),m?f?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),typeof l=="number"&&(r.multipleOf=l)},hx=(e,t,n,o)=>{n.type="boolean"},yx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},vx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},$x=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},bx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},xx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},_x=(e,t,n,o)=>{n.not={}},Sx=(e,t,n,o)=>{},kx=(e,t,n,o)=>{},wx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Ex=(e,t,n,o)=>{let r=e._zod.def,i=Hu(r.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},zx=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.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];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Tx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Cx=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},Ix=(e,t,n,o)=>{let r=n,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(r,i)):(Object.assign(r,i),r.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(r,i)},Rx=(e,t,n,o)=>{n.type="boolean"},Ox=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Mx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Ax=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},jx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Nx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Dx=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Ae(i.element,t,{...o,path:[...o.path,"items"]})},Px=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let c in a)r.properties[c]=Ae(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&&(r.required=Array.from(l)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Ae(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},xg=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,l)=>Ae(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=a:n.anyOf=a},Ux=(e,t,n,o)=>{let r=e._zod.def,i=Ae(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=Ae(r.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]];n.allOf=l},Lx=(e,t,n,o)=>{let r=n,i=e._zod.def;r.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((m,f)=>Ae(m,t,{...o,path:[...o.path,a,f]})),c=i.rest?Ae(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,c&&(r.items=c)):t.target==="openapi-3.0"?(r.items={anyOf:l},c&&r.items.anyOf.push(c),r.minItems=l.length,c||(r.maxItems=l.length)):(r.items=l,c&&(r.additionalItems=c));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(r.minItems=u),typeof p=="number"&&(r.maxItems=p)},Hx=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,l=a._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let u=Ae(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let p of l)r.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ae(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Ae(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&&(r.required=u)}},Vx=(e,t,n,o)=>{let r=e._zod.def,i=Ae(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},qx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Zx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Bx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Gx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Fx=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;Ae(a,t,o);let s=t.seen.get(e);s.ref=a},Kx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},Jx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},_g=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Wx=(e,t,n,o)=>{let r=e._zod.innerType;Ae(r,t,o);let i=t.seen.get(e);i.ref=r},bg={string:mx,number:gx,boolean:hx,bigint:yx,symbol:vx,null:$x,undefined:bx,void:xx,never:_x,any:Sx,unknown:kx,date:wx,enum:Ex,literal:zx,nan:Tx,template_literal:Cx,file:Ix,success:Rx,custom:Ox,function:Mx,transform:Ax,map:jx,set:Nx,array:Dx,object:Px,union:xg,intersection:Ux,tuple:Lx,record:Hx,nullable:Vx,nonoptional:qx,default:Zx,prefault:Bx,catch:Gx,pipe:Fx,readonly:Kx,promise:Jx,optional:_g,lazy:Wx}});var Sg,oC=_(()=>{md();pd();Sg=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 n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Di({processors:bg,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Ae(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Pi(this.ctx,t);let o=Ui(this.ctx,t),{"~standard":r,...i}=o;return i}}});var iC={};var aC=_(()=>{});var mo={};bt(mo,{$ZodAny:()=>G$,$ZodArray:()=>Y$,$ZodAsyncError:()=>Kr,$ZodBase64:()=>N$,$ZodBase64URL:()=>D$,$ZodBigInt:()=>qm,$ZodBigIntFormat:()=>V$,$ZodBoolean:()=>Qu,$ZodCIDRv4:()=>M$,$ZodCIDRv6:()=>A$,$ZodCUID:()=>x$,$ZodCUID2:()=>_$,$ZodCatch:()=>gb,$ZodCheck:()=>Xe,$ZodCheckBigIntFormat:()=>J1,$ZodCheckEndsWith:()=>s$,$ZodCheckGreaterThan:()=>Nm,$ZodCheckIncludes:()=>i$,$ZodCheckLengthEquals:()=>t$,$ZodCheckLessThan:()=>jm,$ZodCheckLowerCase:()=>r$,$ZodCheckMaxLength:()=>Q1,$ZodCheckMaxSize:()=>W1,$ZodCheckMimeType:()=>c$,$ZodCheckMinLength:()=>e$,$ZodCheckMinSize:()=>Y1,$ZodCheckMultipleOf:()=>F1,$ZodCheckNumberFormat:()=>K1,$ZodCheckOverwrite:()=>u$,$ZodCheckProperty:()=>l$,$ZodCheckRegex:()=>n$,$ZodCheckSizeEquals:()=>X1,$ZodCheckStartsWith:()=>a$,$ZodCheckStringFormat:()=>wl,$ZodCheckUpperCase:()=>o$,$ZodCodec:()=>td,$ZodCustom:()=>Sb,$ZodCustomStringFormat:()=>L$,$ZodDate:()=>W$,$ZodDefault:()=>db,$ZodDiscriminatedUnion:()=>eb,$ZodE164:()=>P$,$ZodEmail:()=>y$,$ZodEmoji:()=>$$,$ZodEncodeError:()=>Ci,$ZodEnum:()=>ib,$ZodError:()=>Gu,$ZodExactOptional:()=>cb,$ZodFile:()=>sb,$ZodFunction:()=>bb,$ZodGUID:()=>g$,$ZodIPv4:()=>I$,$ZodIPv6:()=>R$,$ZodISODate:()=>z$,$ZodISODateTime:()=>E$,$ZodISODuration:()=>C$,$ZodISOTime:()=>T$,$ZodIntersection:()=>tb,$ZodJWT:()=>U$,$ZodKSUID:()=>w$,$ZodLazy:()=>_b,$ZodLiteral:()=>ab,$ZodMAC:()=>O$,$ZodMap:()=>rb,$ZodNaN:()=>hb,$ZodNanoID:()=>b$,$ZodNever:()=>K$,$ZodNonOptional:()=>fb,$ZodNull:()=>B$,$ZodNullable:()=>ub,$ZodNumber:()=>Vm,$ZodNumberFormat:()=>H$,$ZodObject:()=>az,$ZodObjectJIT:()=>X$,$ZodOptional:()=>Bm,$ZodPipe:()=>Gm,$ZodPrefault:()=>pb,$ZodPreprocess:()=>yb,$ZodPromise:()=>xb,$ZodReadonly:()=>vb,$ZodRealError:()=>Ln,$ZodRecord:()=>nb,$ZodRegistry:()=>Wm,$ZodSet:()=>ob,$ZodString:()=>es,$ZodStringFormat:()=>qe,$ZodSuccess:()=>mb,$ZodSymbol:()=>q$,$ZodTemplateLiteral:()=>$b,$ZodTransform:()=>lb,$ZodTuple:()=>Zm,$ZodType:()=>ne,$ZodULID:()=>S$,$ZodURL:()=>v$,$ZodUUID:()=>h$,$ZodUndefined:()=>Z$,$ZodUnion:()=>ed,$ZodUnknown:()=>F$,$ZodVoid:()=>J$,$ZodXID:()=>k$,$ZodXor:()=>Q$,$brand:()=>$m,$constructor:()=>E,$input:()=>Xm,$output:()=>Ym,Doc:()=>Xu,JSONSchema:()=>iC,JSONSchemaGenerator:()=>Sg,NEVER:()=>vm,TimePrecision:()=>$g,_any:()=>Xb,_array:()=>ix,_base64:()=>gg,_base64url:()=>hg,_bigint:()=>Bb,_boolean:()=>qb,_catch:()=>gV,_check:()=>nC,_cidrv4:()=>fg,_cidrv6:()=>mg,_coercedBigint:()=>Gb,_coercedBoolean:()=>Zb,_coercedDate:()=>rx,_coercedNumber:()=>Db,_coercedString:()=>Ib,_cuid:()=>ag,_cuid2:()=>sg,_custom:()=>sx,_date:()=>nx,_decode:()=>wm,_decodeAsync:()=>zm,_default:()=>pV,_discriminatedUnion:()=>eV,_e164:()=>yg,_email:()=>Qm,_emoji:()=>og,_encode:()=>km,_encodeAsync:()=>Em,_endsWith:()=>as,_enum:()=>aV,_file:()=>ax,_float32:()=>Ub,_float64:()=>Lb,_gt:()=>Wr,_gte:()=>vn,_guid:()=>id,_includes:()=>os,_int:()=>Pb,_int32:()=>Hb,_int64:()=>Fb,_intersection:()=>tV,_ipv4:()=>dg,_ipv6:()=>pg,_isoDate:()=>Mb,_isoDateTime:()=>Ob,_isoDuration:()=>jb,_isoTime:()=>Ab,_jwt:()=>vg,_ksuid:()=>ug,_lazy:()=>$V,_length:()=>Ni,_literal:()=>lV,_lowercase:()=>ns,_lt:()=>Jr,_lte:()=>Vn,_mac:()=>Rb,_map:()=>oV,_max:()=>Vn,_maxLength:()=>ji,_maxSize:()=>Po,_mime:()=>ss,_min:()=>vn,_minLength:()=>fo,_minSize:()=>Yr,_multipleOf:()=>Do,_nan:()=>ox,_nanoid:()=>ig,_nativeEnum:()=>sV,_negative:()=>ld,_never:()=>ex,_nonnegative:()=>ud,_nonoptional:()=>fV,_nonpositive:()=>cd,_normalize:()=>ls,_null:()=>Yb,_nullable:()=>dV,_number:()=>Nb,_optional:()=>uV,_overwrite:()=>vr,_parse:()=>bl,_parseAsync:()=>xl,_pipe:()=>hV,_positive:()=>sd,_promise:()=>bV,_property:()=>dd,_readonly:()=>yV,_record:()=>rV,_refine:()=>lx,_regex:()=>ts,_safeDecode:()=>Cm,_safeDecodeAsync:()=>Rm,_safeEncode:()=>Tm,_safeEncodeAsync:()=>Im,_safeParse:()=>_l,_safeParseAsync:()=>kl,_set:()=>iV,_size:()=>Ai,_slugify:()=>ps,_startsWith:()=>is,_string:()=>Cb,_stringFormat:()=>Tl,_stringbool:()=>px,_success:()=>mV,_superRefine:()=>cx,_symbol:()=>Jb,_templateLiteral:()=>vV,_toLowerCase:()=>us,_toUpperCase:()=>ds,_transform:()=>cV,_trim:()=>cs,_tuple:()=>nV,_uint32:()=>Vb,_uint64:()=>Kb,_ulid:()=>lg,_undefined:()=>Wb,_union:()=>XH,_unknown:()=>Qb,_uppercase:()=>rs,_url:()=>ad,_uuid:()=>eg,_uuidv4:()=>tg,_uuidv6:()=>ng,_uuidv7:()=>rg,_void:()=>tx,_xid:()=>cg,_xor:()=>QH,clone:()=>yn,config:()=>ft,createStandardJSONSchemaMethod:()=>Cl,createToJSONSchemaMethod:()=>fx,decode:()=>C6,decodeAsync:()=>R6,describe:()=>ux,encode:()=>T6,encodeAsync:()=>I6,extractDefs:()=>Pi,finalize:()=>Ui,flattenError:()=>vl,formatError:()=>$l,globalConfig:()=>Wa,globalRegistry:()=>Bt,initializeContext:()=>Di,isValidBase64:()=>j$,isValidBase64URL:()=>nz,isValidJWT:()=>rz,locales:()=>zl,meta:()=>dx,parse:()=>Fu,parseAsync:()=>Ku,prettifyError:()=>Sm,process:()=>Ae,regexes:()=>Hn,registry:()=>rd,safeDecode:()=>M6,safeDecodeAsync:()=>j6,safeEncode:()=>O6,safeEncodeAsync:()=>A6,safeParse:()=>Sl,safeParseAsync:()=>Ju,toDotPath:()=>z6,toJSONSchema:()=>fd,treeifyError:()=>_m,util:()=>P,version:()=>p$});var qn=_(()=>{Ya();y1();h1();kb();Dm();f$();F();Am();Tb();od();d$();rC();pd();md();oC();aC()});var kg={};bt(kg,{endsWith:()=>as,gt:()=>Wr,gte:()=>vn,includes:()=>os,length:()=>Ni,lowercase:()=>ns,lt:()=>Jr,lte:()=>Vn,maxLength:()=>ji,maxSize:()=>Po,mime:()=>ss,minLength:()=>fo,minSize:()=>Yr,multipleOf:()=>Do,negative:()=>ld,nonnegative:()=>ud,nonpositive:()=>cd,normalize:()=>ls,overwrite:()=>vr,positive:()=>sd,property:()=>dd,regex:()=>ts,size:()=>Ai,slugify:()=>ps,startsWith:()=>is,toLowerCase:()=>us,toUpperCase:()=>ds,trim:()=>cs,uppercase:()=>rs});var wg=_(()=>{qn()});var Uo={};bt(Uo,{ZodISODate:()=>hd,ZodISODateTime:()=>gd,ZodISODuration:()=>vd,ZodISOTime:()=>yd,date:()=>Xx,datetime:()=>Yx,duration:()=>e_,time:()=>Qx});function Yx(e){return Ob(gd,e)}function Xx(e){return Mb(hd,e)}function Qx(e){return Ab(yd,e)}function e_(e){return jb(vd,e)}var gd,hd,yd,vd,$d=_(()=>{qn();xd();gd=E("ZodISODateTime",(e,t)=>{E$.init(e,t),De.init(e,t)});hd=E("ZodISODate",(e,t)=>{z$.init(e,t),De.init(e,t)});yd=E("ZodISOTime",(e,t)=>{T$.init(e,t),De.init(e,t)});vd=E("ZodISODuration",(e,t)=>{C$.init(e,t),De.init(e,t)})});var sC,lC,Tn,t_=_(()=>{qn();qn();F();sC=(e,t)=>{Gu.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>$l(e,n)},flatten:{value:n=>vl(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,gl,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,gl,2)}},isEmpty:{get(){return e.issues.length===0}}})},lC=E("ZodError",sC),Tn=E("ZodError",sC,{Parent:Error})});var Eg,zg,Tg,Cg,Ig,Rg,Og,Mg,Ag,jg,Ng,Dg,n_=_(()=>{qn();t_();Eg=bl(Tn),zg=xl(Tn),Tg=_l(Tn),Cg=kl(Tn),Ig=km(Tn),Rg=wm(Tn),Og=Em(Tn),Mg=zm(Tn),Ag=Tm(Tn),jg=Cm(Tn),Ng=Im(Tn),Dg=Rm(Tn)});var bd={};bt(bd,{ZodAny:()=>Vg,ZodArray:()=>Gg,ZodBase64:()=>Pd,ZodBase64URL:()=>Ud,ZodBigInt:()=>$s,ZodBigIntFormat:()=>Vd,ZodBoolean:()=>vs,ZodCIDRv4:()=>Nd,ZodCIDRv6:()=>Dd,ZodCUID:()=>Cd,ZodCUID2:()=>Id,ZodCatch:()=>ph,ZodCodec:()=>Ul,ZodCustom:()=>Ll,ZodCustomStringFormat:()=>hs,ZodDate:()=>Al,ZodDefault:()=>ah,ZodDiscriminatedUnion:()=>Kg,ZodE164:()=>Ld,ZodEmail:()=>Ed,ZodEmoji:()=>zd,ZodEnum:()=>ms,ZodExactOptional:()=>rh,ZodFile:()=>th,ZodFunction:()=>_h,ZodGUID:()=>Il,ZodIPv4:()=>Ad,ZodIPv6:()=>jd,ZodIntersection:()=>Jg,ZodJWT:()=>Hd,ZodKSUID:()=>Md,ZodLazy:()=>$h,ZodLiteral:()=>eh,ZodMAC:()=>Pg,ZodMap:()=>Xg,ZodNaN:()=>mh,ZodNanoID:()=>Td,ZodNever:()=>Zg,ZodNonOptional:()=>Gd,ZodNull:()=>Hg,ZodNullable:()=>ih,ZodNumber:()=>ys,ZodNumberFormat:()=>Li,ZodObject:()=>jl,ZodOptional:()=>Bd,ZodPipe:()=>Pl,ZodPrefault:()=>lh,ZodPreprocess:()=>gh,ZodPromise:()=>xh,ZodReadonly:()=>hh,ZodRecord:()=>fs,ZodSet:()=>Qg,ZodString:()=>gs,ZodStringFormat:()=>De,ZodSuccess:()=>dh,ZodSymbol:()=>Ug,ZodTemplateLiteral:()=>vh,ZodTransform:()=>nh,ZodTuple:()=>Wg,ZodType:()=>ie,ZodULID:()=>Rd,ZodURL:()=>Ol,ZodUUID:()=>Xr,ZodUndefined:()=>Lg,ZodUnion:()=>Nl,ZodUnknown:()=>qg,ZodVoid:()=>Bg,ZodXID:()=>Od,ZodXor:()=>Fg,_ZodString:()=>wd,_default:()=>sh,_function:()=>i2,any:()=>L_,array:()=>ce,base64:()=>S_,base64url:()=>k_,bigint:()=>j_,boolean:()=>ht,catch:()=>fh,check:()=>a2,cidrv4:()=>x_,cidrv6:()=>__,codec:()=>t2,cuid:()=>f_,cuid2:()=>m_,custom:()=>Fd,date:()=>V_,describe:()=>s2,discriminatedUnion:()=>Dl,e164:()=>w_,email:()=>r_,emoji:()=>d_,enum:()=>Ft,exactOptional:()=>oh,file:()=>Y_,float32:()=>R_,float64:()=>O_,function:()=>i2,guid:()=>o_,hash:()=>I_,hex:()=>C_,hostname:()=>T_,httpUrl:()=>u_,instanceof:()=>c2,int:()=>_d,int32:()=>M_,int64:()=>N_,intersection:()=>bs,invertCodec:()=>n2,ipv4:()=>v_,ipv6:()=>b_,json:()=>d2,jwt:()=>E_,keyof:()=>q_,ksuid:()=>y_,lazy:()=>bh,literal:()=>K,looseObject:()=>Gt,looseRecord:()=>F_,mac:()=>$_,map:()=>K_,meta:()=>l2,nan:()=>e2,nanoid:()=>p_,nativeEnum:()=>W_,never:()=>qd,nonoptional:()=>uh,null:()=>Ml,nullable:()=>Rl,nullish:()=>X_,number:()=>ke,object:()=>B,optional:()=>Ze,partialRecord:()=>G_,pipe:()=>Sd,prefault:()=>ch,preprocess:()=>Hl,promise:()=>o2,readonly:()=>yh,record:()=>je,refine:()=>Sh,set:()=>J_,strictObject:()=>Z_,string:()=>R,stringFormat:()=>z_,stringbool:()=>u2,success:()=>Q_,superRefine:()=>kh,symbol:()=>P_,templateLiteral:()=>r2,transform:()=>Zd,tuple:()=>Yg,uint32:()=>A_,uint64:()=>D_,ulid:()=>g_,undefined:()=>U_,union:()=>Ue,unknown:()=>Pe,url:()=>c_,uuid:()=>i_,uuidv4:()=>a_,uuidv6:()=>s_,uuidv7:()=>l_,void:()=>H_,xid:()=>h_,xor:()=>B_});function kd(e,t,n){let o=Object.getPrototypeOf(e),r=cC.get(o);if(r||(r=new Set,cC.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function R(e){return Cb(gs,e)}function r_(e){return Qm(Ed,e)}function o_(e){return id(Il,e)}function i_(e){return eg(Xr,e)}function a_(e){return tg(Xr,e)}function s_(e){return ng(Xr,e)}function l_(e){return rg(Xr,e)}function c_(e){return ad(Ol,e)}function u_(e){return ad(Ol,{protocol:Hn.httpProtocol,hostname:Hn.domain,...P.normalizeParams(e)})}function d_(e){return og(zd,e)}function p_(e){return ig(Td,e)}function f_(e){return ag(Cd,e)}function m_(e){return sg(Id,e)}function g_(e){return lg(Rd,e)}function h_(e){return cg(Od,e)}function y_(e){return ug(Md,e)}function v_(e){return dg(Ad,e)}function $_(e){return Rb(Pg,e)}function b_(e){return pg(jd,e)}function x_(e){return fg(Nd,e)}function __(e){return mg(Dd,e)}function S_(e){return gg(Pd,e)}function k_(e){return hg(Ud,e)}function w_(e){return yg(Ld,e)}function E_(e){return vg(Hd,e)}function z_(e,t,n={}){return Tl(hs,e,t,n)}function T_(e){return Tl(hs,"hostname",Hn.hostname,e)}function C_(e){return Tl(hs,"hex",Hn.hex,e)}function I_(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=Hn[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return Tl(hs,o,r,t)}function ke(e){return Nb(ys,e)}function _d(e){return Pb(Li,e)}function R_(e){return Ub(Li,e)}function O_(e){return Lb(Li,e)}function M_(e){return Hb(Li,e)}function A_(e){return Vb(Li,e)}function ht(e){return qb(vs,e)}function j_(e){return Bb($s,e)}function N_(e){return Fb(Vd,e)}function D_(e){return Kb(Vd,e)}function P_(e){return Jb(Ug,e)}function U_(e){return Wb(Lg,e)}function Ml(e){return Yb(Hg,e)}function L_(){return Xb(Vg)}function Pe(){return Qb(qg)}function qd(e){return ex(Zg,e)}function H_(e){return tx(Bg,e)}function V_(e){return nx(Al,e)}function ce(e,t){return ix(Gg,e,t)}function q_(e){let t=e._zod.def.shape;return Ft(Object.keys(t))}function B(e,t){let n={type:"object",shape:e??{},...P.normalizeParams(t)};return new jl(n)}function Z_(e,t){return new jl({type:"object",shape:e,catchall:qd(),...P.normalizeParams(t)})}function Gt(e,t){return new jl({type:"object",shape:e,catchall:Pe(),...P.normalizeParams(t)})}function Ue(e,t){return new Nl({type:"union",options:e,...P.normalizeParams(t)})}function B_(e,t){return new Fg({type:"union",options:e,inclusive:!1,...P.normalizeParams(t)})}function Dl(e,t,n){return new Kg({type:"union",options:t,discriminator:e,...P.normalizeParams(n)})}function bs(e,t){return new Jg({type:"intersection",left:e,right:t})}function Yg(e,t,n){let o=t instanceof ne,r=o?n:t,i=o?t:null;return new Wg({type:"tuple",items:e,rest:i,...P.normalizeParams(r)})}function je(e,t,n){return!t||!t._zod?new fs({type:"record",keyType:R(),valueType:e,...P.normalizeParams(t)}):new fs({type:"record",keyType:e,valueType:t,...P.normalizeParams(n)})}function G_(e,t,n){let o=yn(e);return o._zod.values=void 0,new fs({type:"record",keyType:o,valueType:t,...P.normalizeParams(n)})}function F_(e,t,n){return new fs({type:"record",keyType:e,valueType:t,mode:"loose",...P.normalizeParams(n)})}function K_(e,t,n){return new Xg({type:"map",keyType:e,valueType:t,...P.normalizeParams(n)})}function J_(e,t){return new Qg({type:"set",valueType:e,...P.normalizeParams(t)})}function Ft(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ms({type:"enum",entries:n,...P.normalizeParams(t)})}function W_(e,t){return new ms({type:"enum",entries:e,...P.normalizeParams(t)})}function K(e,t){return new eh({type:"literal",values:Array.isArray(e)?e:[e],...P.normalizeParams(t)})}function Y_(e){return ax(th,e)}function Zd(e){return new nh({type:"transform",transform:e})}function Ze(e){return new Bd({type:"optional",innerType:e})}function oh(e){return new rh({type:"optional",innerType:e})}function Rl(e){return new ih({type:"nullable",innerType:e})}function X_(e){return Ze(Rl(e))}function sh(e,t){return new ah({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function ch(e,t){return new lh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function uh(e,t){return new Gd({type:"nonoptional",innerType:e,...P.normalizeParams(t)})}function Q_(e){return new dh({type:"success",innerType:e})}function fh(e,t){return new ph({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function e2(e){return ox(mh,e)}function Sd(e,t){return new Pl({type:"pipe",in:e,out:t})}function t2(e,t,n){return new Ul({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function n2(e){let t=e._zod.def;return new Ul({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function yh(e){return new hh({type:"readonly",innerType:e})}function r2(e,t){return new vh({type:"template_literal",parts:e,...P.normalizeParams(t)})}function bh(e){return new $h({type:"lazy",getter:e})}function o2(e){return new xh({type:"promise",innerType:e})}function i2(e){return new _h({type:"function",input:Array.isArray(e?.input)?Yg(e?.input):e?.input??ce(Pe()),output:e?.output??Pe()})}function a2(e){let t=new Xe({check:"custom"});return t._zod.check=e,t}function Fd(e,t){return sx(Ll,e??(()=>!0),t)}function Sh(e,t={}){return lx(Ll,e,t)}function kh(e,t){return cx(e,t)}function c2(e,t={}){let n=new Ll({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...P.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function d2(e){let t=bh(()=>Ue([R(e),ke(),ht(),Ml(),ce(t),je(R(),t)]));return t}function Hl(e,t){return new gh({type:"pipe",in:Zd(e),out:t})}var cC,ie,wd,gs,De,Ed,Il,Xr,Ol,zd,Td,Cd,Id,Rd,Od,Md,Ad,Pg,jd,Nd,Dd,Pd,Ud,Ld,Hd,hs,ys,Li,vs,$s,Vd,Ug,Lg,Hg,Vg,qg,Zg,Bg,Al,Gg,jl,Nl,Fg,Kg,Jg,Wg,fs,Xg,Qg,ms,eh,th,nh,Bd,rh,ih,ah,lh,Gd,dh,ph,mh,Pl,Ul,gh,hh,vh,$h,xh,_h,Ll,s2,l2,u2,xd=_(()=>{qn();qn();md();pd();wg();$d();n_();cC=new WeakMap;ie=E("ZodType",(e,t)=>(ne.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Cl(e,"input"),output:Cl(e,"output")}}),e.toJSONSchema=fx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Eg(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Tg(e,n,o),e.parseAsync=async(n,o)=>zg(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Cg(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Ig(e,n,o),e.decode=(n,o)=>Rg(e,n,o),e.encodeAsync=async(n,o)=>Og(e,n,o),e.decodeAsync=async(n,o)=>Mg(e,n,o),e.safeEncode=(n,o)=>Ag(e,n,o),e.safeDecode=(n,o)=>jg(e,n,o),e.safeEncodeAsync=async(n,o)=>Ng(e,n,o),e.safeDecodeAsync=async(n,o)=>Dg(e,n,o),kd(e,"ZodType",{check(...n){let o=this.def;return this.clone(P.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return yn(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Sh(n,o))},superRefine(n,o){return this.check(kh(n,o))},overwrite(n){return this.check(vr(n))},optional(){return Ze(this)},exactOptional(){return oh(this)},nullable(){return Rl(this)},nullish(){return Ze(Rl(this))},nonoptional(n){return uh(this,n)},array(){return ce(this)},or(n){return Ue([this,n])},and(n){return bs(this,n)},transform(n){return Sd(this,Zd(n))},default(n){return sh(this,n)},prefault(n){return ch(this,n)},catch(n){return fh(this,n)},pipe(n){return Sd(this,n)},readonly(){return yh(this)},describe(n){let o=this.clone();return Bt.add(o,{description:n}),o},meta(...n){if(n.length===0)return Bt.get(this);let o=this.clone();return Bt.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Bt.get(e)?.description},configurable:!0}),e)),wd=E("_ZodString",(e,t)=>{es.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>mx(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,kd(e,"_ZodString",{regex(...o){return this.check(ts(...o))},includes(...o){return this.check(os(...o))},startsWith(...o){return this.check(is(...o))},endsWith(...o){return this.check(as(...o))},min(...o){return this.check(fo(...o))},max(...o){return this.check(ji(...o))},length(...o){return this.check(Ni(...o))},nonempty(...o){return this.check(fo(1,...o))},lowercase(o){return this.check(ns(o))},uppercase(o){return this.check(rs(o))},trim(){return this.check(cs())},normalize(...o){return this.check(ls(...o))},toLowerCase(){return this.check(us())},toUpperCase(){return this.check(ds())},slugify(){return this.check(ps())}})}),gs=E("ZodString",(e,t)=>{es.init(e,t),wd.init(e,t),e.email=n=>e.check(Qm(Ed,n)),e.url=n=>e.check(ad(Ol,n)),e.jwt=n=>e.check(vg(Hd,n)),e.emoji=n=>e.check(og(zd,n)),e.guid=n=>e.check(id(Il,n)),e.uuid=n=>e.check(eg(Xr,n)),e.uuidv4=n=>e.check(tg(Xr,n)),e.uuidv6=n=>e.check(ng(Xr,n)),e.uuidv7=n=>e.check(rg(Xr,n)),e.nanoid=n=>e.check(ig(Td,n)),e.guid=n=>e.check(id(Il,n)),e.cuid=n=>e.check(ag(Cd,n)),e.cuid2=n=>e.check(sg(Id,n)),e.ulid=n=>e.check(lg(Rd,n)),e.base64=n=>e.check(gg(Pd,n)),e.base64url=n=>e.check(hg(Ud,n)),e.xid=n=>e.check(cg(Od,n)),e.ksuid=n=>e.check(ug(Md,n)),e.ipv4=n=>e.check(dg(Ad,n)),e.ipv6=n=>e.check(pg(jd,n)),e.cidrv4=n=>e.check(fg(Nd,n)),e.cidrv6=n=>e.check(mg(Dd,n)),e.e164=n=>e.check(yg(Ld,n)),e.datetime=n=>e.check(Yx(n)),e.date=n=>e.check(Xx(n)),e.time=n=>e.check(Qx(n)),e.duration=n=>e.check(e_(n))});De=E("ZodStringFormat",(e,t)=>{qe.init(e,t),wd.init(e,t)}),Ed=E("ZodEmail",(e,t)=>{y$.init(e,t),De.init(e,t)});Il=E("ZodGUID",(e,t)=>{g$.init(e,t),De.init(e,t)});Xr=E("ZodUUID",(e,t)=>{h$.init(e,t),De.init(e,t)});Ol=E("ZodURL",(e,t)=>{v$.init(e,t),De.init(e,t)});zd=E("ZodEmoji",(e,t)=>{$$.init(e,t),De.init(e,t)});Td=E("ZodNanoID",(e,t)=>{b$.init(e,t),De.init(e,t)});Cd=E("ZodCUID",(e,t)=>{x$.init(e,t),De.init(e,t)});Id=E("ZodCUID2",(e,t)=>{_$.init(e,t),De.init(e,t)});Rd=E("ZodULID",(e,t)=>{S$.init(e,t),De.init(e,t)});Od=E("ZodXID",(e,t)=>{k$.init(e,t),De.init(e,t)});Md=E("ZodKSUID",(e,t)=>{w$.init(e,t),De.init(e,t)});Ad=E("ZodIPv4",(e,t)=>{I$.init(e,t),De.init(e,t)});Pg=E("ZodMAC",(e,t)=>{O$.init(e,t),De.init(e,t)});jd=E("ZodIPv6",(e,t)=>{R$.init(e,t),De.init(e,t)});Nd=E("ZodCIDRv4",(e,t)=>{M$.init(e,t),De.init(e,t)});Dd=E("ZodCIDRv6",(e,t)=>{A$.init(e,t),De.init(e,t)});Pd=E("ZodBase64",(e,t)=>{N$.init(e,t),De.init(e,t)});Ud=E("ZodBase64URL",(e,t)=>{D$.init(e,t),De.init(e,t)});Ld=E("ZodE164",(e,t)=>{P$.init(e,t),De.init(e,t)});Hd=E("ZodJWT",(e,t)=>{U$.init(e,t),De.init(e,t)});hs=E("ZodCustomStringFormat",(e,t)=>{L$.init(e,t),De.init(e,t)});ys=E("ZodNumber",(e,t)=>{Vm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>gx(e,o,r,i),kd(e,"ZodNumber",{gt(o,r){return this.check(Wr(o,r))},gte(o,r){return this.check(vn(o,r))},min(o,r){return this.check(vn(o,r))},lt(o,r){return this.check(Jr(o,r))},lte(o,r){return this.check(Vn(o,r))},max(o,r){return this.check(Vn(o,r))},int(o){return this.check(_d(o))},safe(o){return this.check(_d(o))},positive(o){return this.check(Wr(0,o))},nonnegative(o){return this.check(vn(0,o))},negative(o){return this.check(Jr(0,o))},nonpositive(o){return this.check(Vn(0,o))},multipleOf(o,r){return this.check(Do(o,r))},step(o,r){return this.check(Do(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});Li=E("ZodNumberFormat",(e,t)=>{H$.init(e,t),ys.init(e,t)});vs=E("ZodBoolean",(e,t)=>{Qu.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hx(e,n,o,r)});$s=E("ZodBigInt",(e,t)=>{qm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>yx(e,o,r,i),e.gte=(o,r)=>e.check(vn(o,r)),e.min=(o,r)=>e.check(vn(o,r)),e.gt=(o,r)=>e.check(Wr(o,r)),e.gte=(o,r)=>e.check(vn(o,r)),e.min=(o,r)=>e.check(vn(o,r)),e.lt=(o,r)=>e.check(Jr(o,r)),e.lte=(o,r)=>e.check(Vn(o,r)),e.max=(o,r)=>e.check(Vn(o,r)),e.positive=o=>e.check(Wr(BigInt(0),o)),e.negative=o=>e.check(Jr(BigInt(0),o)),e.nonpositive=o=>e.check(Vn(BigInt(0),o)),e.nonnegative=o=>e.check(vn(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Do(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});Vd=E("ZodBigIntFormat",(e,t)=>{V$.init(e,t),$s.init(e,t)});Ug=E("ZodSymbol",(e,t)=>{q$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vx(e,n,o,r)});Lg=E("ZodUndefined",(e,t)=>{Z$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bx(e,n,o,r)});Hg=E("ZodNull",(e,t)=>{B$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$x(e,n,o,r)});Vg=E("ZodAny",(e,t)=>{G$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sx(e,n,o,r)});qg=E("ZodUnknown",(e,t)=>{F$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kx(e,n,o,r)});Zg=E("ZodNever",(e,t)=>{K$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_x(e,n,o,r)});Bg=E("ZodVoid",(e,t)=>{J$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xx(e,n,o,r)});Al=E("ZodDate",(e,t)=>{W$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>wx(e,o,r,i),e.min=(o,r)=>e.check(vn(o,r)),e.max=(o,r)=>e.check(Vn(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Gg=E("ZodArray",(e,t)=>{Y$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Dx(e,n,o,r),e.element=t.element,kd(e,"ZodArray",{min(n,o){return this.check(fo(n,o))},nonempty(n){return this.check(fo(1,n))},max(n,o){return this.check(ji(n,o))},length(n,o){return this.check(Ni(n,o))},unwrap(){return this.element}})});jl=E("ZodObject",(e,t)=>{X$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Px(e,n,o,r),P.defineLazy(e,"shape",()=>t.shape),kd(e,"ZodObject",{keyof(){return Ft(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Pe()})},loose(){return this.clone({...this._zod.def,catchall:Pe()})},strict(){return this.clone({...this._zod.def,catchall:qd()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return P.extend(this,n)},safeExtend(n){return P.safeExtend(this,n)},merge(n){return P.merge(this,n)},pick(n){return P.pick(this,n)},omit(n){return P.omit(this,n)},partial(...n){return P.partial(Bd,this,n[0])},required(...n){return P.required(Gd,this,n[0])}})});Nl=E("ZodUnion",(e,t)=>{ed.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xg(e,n,o,r),e.options=t.options});Fg=E("ZodXor",(e,t)=>{Nl.init(e,t),Q$.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xg(e,n,o,r),e.options=t.options});Kg=E("ZodDiscriminatedUnion",(e,t)=>{Nl.init(e,t),eb.init(e,t)});Jg=E("ZodIntersection",(e,t)=>{tb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ux(e,n,o,r)});Wg=E("ZodTuple",(e,t)=>{Zm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lx(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});fs=E("ZodRecord",(e,t)=>{nb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hx(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});Xg=E("ZodMap",(e,t)=>{rb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jx(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Po(...n)),e.size=(...n)=>e.check(Ai(...n))});Qg=E("ZodSet",(e,t)=>{ob.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nx(e,n,o,r),e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Po(...n)),e.size=(...n)=>e.check(Ai(...n))});ms=E("ZodEnum",(e,t)=>{ib.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ex(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ms({...t,checks:[],...P.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ms({...t,checks:[],...P.normalizeParams(r),entries:i})}});eh=E("ZodLiteral",(e,t)=>{ab.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zx(e,n,o,r),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]}})});th=E("ZodFile",(e,t)=>{sb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ix(e,n,o,r),e.min=(n,o)=>e.check(Yr(n,o)),e.max=(n,o)=>e.check(Po(n,o)),e.mime=(n,o)=>e.check(ss(Array.isArray(n)?n:[n],o))});nh=E("ZodTransform",(e,t)=>{lb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ax(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ci(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(P.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(P.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});Bd=E("ZodOptional",(e,t)=>{Bm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_g(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});rh=E("ZodExactOptional",(e,t)=>{cb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_g(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ih=E("ZodNullable",(e,t)=>{ub.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ah=E("ZodDefault",(e,t)=>{db.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});lh=E("ZodPrefault",(e,t)=>{pb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});Gd=E("ZodNonOptional",(e,t)=>{fb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});dh=E("ZodSuccess",(e,t)=>{mb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ph=E("ZodCatch",(e,t)=>{gb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});mh=E("ZodNaN",(e,t)=>{hb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tx(e,n,o,r)});Pl=E("ZodPipe",(e,t)=>{Gm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fx(e,n,o,r),e.in=t.in,e.out=t.out});Ul=E("ZodCodec",(e,t)=>{Pl.init(e,t),td.init(e,t)});gh=E("ZodPreprocess",(e,t)=>{Pl.init(e,t),yb.init(e,t)}),hh=E("ZodReadonly",(e,t)=>{vb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});vh=E("ZodTemplateLiteral",(e,t)=>{$b.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Cx(e,n,o,r)});$h=E("ZodLazy",(e,t)=>{_b.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wx(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});xh=E("ZodPromise",(e,t)=>{xb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});_h=E("ZodFunction",(e,t)=>{bb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mx(e,n,o,r)});Ll=E("ZodCustom",(e,t)=>{Sb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ox(e,n,o,r)});s2=ux,l2=dx;u2=(...e)=>px({Codec:Ul,Boolean:vs,String:gs},...e)});function dC(e){ft({customError:e})}function pC(){return ft().customError}var uC,wh,fC=_(()=>{qn();uC={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"};wh||(wh={})});function wV(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function EV(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function mC(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Z.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 r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return Z.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=EV(r,t),a=$n(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return Z.null();if(r.length===0)return Z.never();if(r.length===1)return Z.literal(r[0]);if(r.every(a=>typeof a=="string"))return Z.enum(r);let i=r.map(a=>Z.literal(a));return i.length<2?i[0]:Z.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Z.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let a={...e,type:i};return mC(a,t)});return r.length===0?Z.never():r.length===1?r[0]:Z.union(r)}if(!n)return Z.any();let o;switch(n){case"string":{let r=Z.string();if(e.format){let i=e.format;i==="email"?r=r.check(Z.email()):i==="uri"||i==="uri-reference"?r=r.check(Z.url()):i==="uuid"||i==="guid"?r=r.check(Z.uuid()):i==="date-time"?r=r.check(Z.iso.datetime()):i==="date"?r=r.check(Z.iso.date()):i==="time"?r=r.check(Z.iso.time()):i==="duration"?r=r.check(Z.iso.duration()):i==="ipv4"?r=r.check(Z.ipv4()):i==="ipv6"?r=r.check(Z.ipv6()):i==="mac"?r=r.check(Z.mac()):i==="cidr"?r=r.check(Z.cidrv4()):i==="cidr-v6"?r=r.check(Z.cidrv6()):i==="base64"?r=r.check(Z.base64()):i==="base64url"?r=r.check(Z.base64url()):i==="e164"?r=r.check(Z.e164()):i==="jwt"?r=r.check(Z.jwt()):i==="emoji"?r=r.check(Z.emoji()):i==="nanoid"?r=r.check(Z.nanoid()):i==="cuid"?r=r.check(Z.cuid()):i==="cuid2"?r=r.check(Z.cuid2()):i==="ulid"?r=r.check(Z.ulid()):i==="xid"?r=r.check(Z.xid()):i==="ksuid"&&(r=r.check(Z.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?Z.number().int():Z.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=Z.boolean();break}case"null":{o=Z.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[l,c]of Object.entries(i)){let u=$n(c,t);r[l]=a.has(l)?u:u.optional()}if(e.propertyNames){let l=$n(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?$n(e.additionalProperties,t):Z.any();if(Object.keys(r).length===0){o=Z.record(l,c);break}let u=Z.object(r).passthrough(),p=Z.looseRecord(l,c);o=Z.intersection(u,p);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let m of c){let f=$n(l[m],t),g=Z.string().regex(new RegExp(m));u.push(Z.looseRecord(g,f))}let p=[];if(Object.keys(r).length>0&&p.push(Z.object(r).passthrough()),p.push(...u),p.length===0)o=Z.object({}).passthrough();else if(p.length===1)o=p[0];else{let m=Z.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)m=Z.intersection(m,p[f]);o=m}break}let s=Z.object(r);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall($n(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let a=r.map(l=>$n(l,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?$n(i,t):void 0;s?o=Z.tuple(a).rest(s):o=Z.tuple(a),typeof e.minItems=="number"&&(o=o.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(Z.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(l=>$n(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?$n(e.additionalItems,t):void 0;s?o=Z.tuple(a).rest(s):o=Z.tuple(a),typeof e.minItems=="number"&&(o=o.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(Z.maxLength(e.maxItems)))}else if(i!==void 0){let a=$n(i,t),s=Z.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=Z.array(Z.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function $n(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let n=mC(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=>$n(c,t)),l=Z.union(s);n=o?Z.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>$n(c,t)),l=Z.xor(s);n=o?Z.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:Z.any();else{let s=o?n:$n(e.allOf[0],t),l=o?0:1;for(let c=l;c<e.allOf.length;c++)s=Z.intersection(s,$n(e.allOf[c],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Z.nullable(n)),e.readOnly===!0&&(n=Z.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))kV.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function p2(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=wV(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Bt};return $n(n,i)}var Z,kV,gC=_(()=>{od();wg();$d();xd();Z={...bd,...kg,iso:Uo},kV=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 Eh={};bt(Eh,{bigint:()=>IV,boolean:()=>CV,date:()=>RV,number:()=>TV,string:()=>zV});function zV(e){return Ib(gs,e)}function TV(e){return Db(ys,e)}function CV(e){return Zb(vs,e)}function IV(e){return Gb($s,e)}function RV(e){return rx(Al,e)}var hC=_(()=>{qn();xd()});var d={};bt(d,{$brand:()=>$m,$input:()=>Xm,$output:()=>Ym,NEVER:()=>vm,TimePrecision:()=>$g,ZodAny:()=>Vg,ZodArray:()=>Gg,ZodBase64:()=>Pd,ZodBase64URL:()=>Ud,ZodBigInt:()=>$s,ZodBigIntFormat:()=>Vd,ZodBoolean:()=>vs,ZodCIDRv4:()=>Nd,ZodCIDRv6:()=>Dd,ZodCUID:()=>Cd,ZodCUID2:()=>Id,ZodCatch:()=>ph,ZodCodec:()=>Ul,ZodCustom:()=>Ll,ZodCustomStringFormat:()=>hs,ZodDate:()=>Al,ZodDefault:()=>ah,ZodDiscriminatedUnion:()=>Kg,ZodE164:()=>Ld,ZodEmail:()=>Ed,ZodEmoji:()=>zd,ZodEnum:()=>ms,ZodError:()=>lC,ZodExactOptional:()=>rh,ZodFile:()=>th,ZodFirstPartyTypeKind:()=>wh,ZodFunction:()=>_h,ZodGUID:()=>Il,ZodIPv4:()=>Ad,ZodIPv6:()=>jd,ZodISODate:()=>hd,ZodISODateTime:()=>gd,ZodISODuration:()=>vd,ZodISOTime:()=>yd,ZodIntersection:()=>Jg,ZodIssueCode:()=>uC,ZodJWT:()=>Hd,ZodKSUID:()=>Md,ZodLazy:()=>$h,ZodLiteral:()=>eh,ZodMAC:()=>Pg,ZodMap:()=>Xg,ZodNaN:()=>mh,ZodNanoID:()=>Td,ZodNever:()=>Zg,ZodNonOptional:()=>Gd,ZodNull:()=>Hg,ZodNullable:()=>ih,ZodNumber:()=>ys,ZodNumberFormat:()=>Li,ZodObject:()=>jl,ZodOptional:()=>Bd,ZodPipe:()=>Pl,ZodPrefault:()=>lh,ZodPreprocess:()=>gh,ZodPromise:()=>xh,ZodReadonly:()=>hh,ZodRealError:()=>Tn,ZodRecord:()=>fs,ZodSet:()=>Qg,ZodString:()=>gs,ZodStringFormat:()=>De,ZodSuccess:()=>dh,ZodSymbol:()=>Ug,ZodTemplateLiteral:()=>vh,ZodTransform:()=>nh,ZodTuple:()=>Wg,ZodType:()=>ie,ZodULID:()=>Rd,ZodURL:()=>Ol,ZodUUID:()=>Xr,ZodUndefined:()=>Lg,ZodUnion:()=>Nl,ZodUnknown:()=>qg,ZodVoid:()=>Bg,ZodXID:()=>Od,ZodXor:()=>Fg,_ZodString:()=>wd,_default:()=>sh,_function:()=>i2,any:()=>L_,array:()=>ce,base64:()=>S_,base64url:()=>k_,bigint:()=>j_,boolean:()=>ht,catch:()=>fh,check:()=>a2,cidrv4:()=>x_,cidrv6:()=>__,clone:()=>yn,codec:()=>t2,coerce:()=>Eh,config:()=>ft,core:()=>mo,cuid:()=>f_,cuid2:()=>m_,custom:()=>Fd,date:()=>V_,decode:()=>Rg,decodeAsync:()=>Mg,describe:()=>s2,discriminatedUnion:()=>Dl,e164:()=>w_,email:()=>r_,emoji:()=>d_,encode:()=>Ig,encodeAsync:()=>Og,endsWith:()=>as,enum:()=>Ft,exactOptional:()=>oh,file:()=>Y_,flattenError:()=>vl,float32:()=>R_,float64:()=>O_,formatError:()=>$l,fromJSONSchema:()=>p2,function:()=>i2,getErrorMap:()=>pC,globalRegistry:()=>Bt,gt:()=>Wr,gte:()=>vn,guid:()=>o_,hash:()=>I_,hex:()=>C_,hostname:()=>T_,httpUrl:()=>u_,includes:()=>os,instanceof:()=>c2,int:()=>_d,int32:()=>M_,int64:()=>N_,intersection:()=>bs,invertCodec:()=>n2,ipv4:()=>v_,ipv6:()=>b_,iso:()=>Uo,json:()=>d2,jwt:()=>E_,keyof:()=>q_,ksuid:()=>y_,lazy:()=>bh,length:()=>Ni,literal:()=>K,locales:()=>zl,looseObject:()=>Gt,looseRecord:()=>F_,lowercase:()=>ns,lt:()=>Jr,lte:()=>Vn,mac:()=>$_,map:()=>K_,maxLength:()=>ji,maxSize:()=>Po,meta:()=>l2,mime:()=>ss,minLength:()=>fo,minSize:()=>Yr,multipleOf:()=>Do,nan:()=>e2,nanoid:()=>p_,nativeEnum:()=>W_,negative:()=>ld,never:()=>qd,nonnegative:()=>ud,nonoptional:()=>uh,nonpositive:()=>cd,normalize:()=>ls,null:()=>Ml,nullable:()=>Rl,nullish:()=>X_,number:()=>ke,object:()=>B,optional:()=>Ze,overwrite:()=>vr,parse:()=>Eg,parseAsync:()=>zg,partialRecord:()=>G_,pipe:()=>Sd,positive:()=>sd,prefault:()=>ch,preprocess:()=>Hl,prettifyError:()=>Sm,promise:()=>o2,property:()=>dd,readonly:()=>yh,record:()=>je,refine:()=>Sh,regex:()=>ts,regexes:()=>Hn,registry:()=>rd,safeDecode:()=>jg,safeDecodeAsync:()=>Dg,safeEncode:()=>Ag,safeEncodeAsync:()=>Ng,safeParse:()=>Tg,safeParseAsync:()=>Cg,set:()=>J_,setErrorMap:()=>dC,size:()=>Ai,slugify:()=>ps,startsWith:()=>is,strictObject:()=>Z_,string:()=>R,stringFormat:()=>z_,stringbool:()=>u2,success:()=>Q_,superRefine:()=>kh,symbol:()=>P_,templateLiteral:()=>r2,toJSONSchema:()=>fd,toLowerCase:()=>us,toUpperCase:()=>ds,transform:()=>Zd,treeifyError:()=>_m,trim:()=>cs,tuple:()=>Yg,uint32:()=>A_,uint64:()=>D_,ulid:()=>g_,undefined:()=>U_,union:()=>Ue,unknown:()=>Pe,uppercase:()=>rs,url:()=>c_,util:()=>P,uuid:()=>i_,uuidv4:()=>a_,uuidv6:()=>s_,uuidv7:()=>l_,void:()=>H_,xid:()=>h_,xor:()=>B_});var Kd=_(()=>{qn();xd();wg();t_();n_();fC();qn();wb();qn();md();gC();Tb();$d();$d();hC();ft(Fm())});var go=_(()=>{Kd();Kd()});var OV,MV,AV,yC,f2=_(()=>{"use strict";go();OV=/^--ggui-[a-zA-Z0-9-]+$/,MV=/^[^;{}<>@]*$/,AV=d.string().min(1).max(256).regex(MV,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment"),yC=d.object({mode:d.enum(["light","dark"]),cssVariables:d.record(d.string().regex(OV,"css var key must be --ggui-*"),AV).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:d.string().min(1).max(64).optional()}).strict()});function Cn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var $r=_(()=>{"use strict"});var NV,h2,Th,Jd,Wd=_(()=>{"use strict";NV="draft-2026-06-12",h2=NV,Th="UPGRADE_REQUIRED",Jd=Object.freeze([h2])});var bC=_(()=>{"use strict"});var xC=_(()=>{"use strict"});var _C=_(()=>{"use strict"});var SC=_(()=>{"use strict"});var kC=_(()=>{"use strict";$r()});var wC=_(()=>{"use strict"});var EC=_(()=>{"use strict"});var zC=_(()=>{"use strict"});var Yd,TC,y2,CC,Xd=_(()=>{"use strict";Yd="@ggui-ai/gadgets",TC="0.6.2",y2=[{package:Yd,version:TC,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"}}}}]}],CC=Object.freeze(new Set(y2.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)))});var v2=_(()=>{"use strict"});var Vl,Qd,Ch=_(()=>{"use strict";Vl=/^use[A-Z][A-Za-z0-9]*$/,Qd=/^[A-Z][A-Za-z0-9]*$/});var Ih,Hle,ep=_(()=>{"use strict";Xd();v2();Ch();Ih=["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"],Hle=new Set(Ih)});var rt,Lo,UV,LV,HV,VV,qV,ZV,BV,GV,FV,KV,Rh,JV,IC,MC,WV,YV,AC,RC,OC,jC,XV,QV,Fle,tp,Kle,eq,tq,nq,Jle,ho,xs=_(()=>{"use strict";go();ep();Xd();Ch();Ch();rt=d.lazy(()=>d.union([d.string(),d.number(),d.boolean(),d.null(),d.array(rt),d.record(d.string(),rt)])),Lo=d.lazy(()=>d.object({type:d.enum(["string","number","integer","boolean","array","object","null"]).optional(),description:d.string().optional(),enum:d.array(rt).optional(),default:rt.optional(),example:rt.optional(),items:Lo.optional(),properties:d.record(d.string(),Lo).optional(),required:d.array(d.string()).optional(),additionalProperties:d.union([Lo,d.boolean()]).optional(),format:d.string().optional()}).passthrough()),UV=d.object({description:d.string().optional(),schema:Lo,required:d.boolean().optional(),default:rt.optional(),example:rt.optional(),sourceTool:d.string().optional()}).strict(),LV=d.object({description:d.string().optional(),properties:d.record(d.string(),UV)}).strict(),HV=d.object({description:d.string().optional(),label:d.string(),schema:Lo.optional(),example:rt.optional(),icon:d.string().optional(),confirm:d.boolean().optional(),nextStep:d.string().min(1).optional()}).strict(),VV=d.record(d.string(),HV),qV=d.object({description:d.string().optional(),schema:Lo,example:rt.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(),rt).optional()}).strict().optional()}).strict(),ZV=d.record(d.string(),qV),BV=d.object({description:d.string().optional(),schema:Lo,default:rt.optional(),debounceMs:d.number().int().nonnegative().optional(),example:rt.optional()}).strict(),GV=d.record(d.string(),BV),FV=d.object({serverInfo:d.object({name:d.string(),version:d.string().optional()}).strict().optional(),toolInfo:d.object({inputSchema:Lo,description:d.string().optional(),outputSchema:Lo.optional()}).strict(),usage:d.string().optional(),example:d.object({input:rt,output:rt}).strict().optional()}).strict(),KV=d.object({tools:d.record(d.string(),FV)}).passthrough(),Rh=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,JV=d.array(d.string().regex(Rh)).readonly(),IC=/^sha384-[A-Za-z0-9+/]+=*$/,MC=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,WV=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,YV=/^[a-z0-9.-]+(:\d+)?$/,AC={gotchas:d.string().optional()},RC={...AC,description:d.string().optional(),usage:d.string().optional(),example:rt.optional(),permission:d.string().optional()},OC={...AC,description:d.string().min(1),usage:d.string().min(1),example:rt,permission:d.enum(Ih).optional()},jC={version:d.string().regex(WV),package:d.string().regex(MC),bundleUrl:d.url().optional(),bundleHost:d.string().regex(YV).optional(),bundleSri:d.string().regex(IC).optional(),styleUrl:d.url().optional(),connect:d.array(d.url()).readonly().optional(),requires:JV.optional(),typesUrl:d.url().optional(),typesSri:d.string().regex(IC).optional()},XV=d.union([d.object({hook:d.string().regex(Vl),...RC}).strict(),d.object({component:d.string().regex(Qd),...RC}).strict()]),QV=d.union([d.object({hook:d.string().regex(Vl),...OC}).strict(),d.object({component:d.string().regex(Qd),...OC}).strict()]),Fle=d.object({...jC,exports:d.array(XV).min(1)}).strict(),tp=d.object({...jC,exports:d.array(QV).min(1)}).strict(),Kle=tp.refine(e=>e.package===Yd||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"]}),eq=d.object({description:d.string().optional(),usage:d.string().optional()}).strict(),tq=d.record(d.string().refine(e=>Vl.test(e)||Qd.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),eq).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),nq=d.object({gadgets:d.record(d.string().regex(MC),tq)}).strict(),Jle=d.record(d.string().regex(Rh),d.string()).readonly(),ho=d.object({propsSpec:LV.optional(),actionSpec:VV.optional(),streamSpec:ZV.optional(),contextSpec:GV.optional(),agentCapabilities:KV.optional(),clientCapabilities:nq.optional()}).passthrough()});var $2,b2,rq,x2,_s,NC,oq,ece,np=_(()=>{"use strict";go();xs();$2=d.object({kind:d.literal("llm"),generator:d.string().min(1),model:d.string().min(1)}).strict(),b2=d.object({kind:d.literal("user")}).strict(),rq=d.object({kind:d.literal("curated")}).strict(),x2=d.union([$2,b2,rq]),_s=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(),rt).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(),NC=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:x2,validatorScore:d.number().min(0).max(1).optional(),variance:_s,isOperatorDefault:d.literal(!0).optional(),createdAt:d.string().min(1),createdBy:d.enum(["agent","operator"]),contract:ho,contractEmbedding:d.array(d.number()).optional()}).strict(),oq=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(),ece=d.object({weights:oq.optional(),threshold:d.number().min(0).max(1).optional(),topK:d.number().int().min(1).optional()}).strict()});var iq,aq,sq,lq,DC,cq,uq,dq,PC,_2=_(()=>{"use strict";go();xs();np();iq=d.enum(["cache","agent","synth"]),aq=d.union([d.object({op:d.literal("add"),path:d.string(),value:rt}).strict(),d.object({op:d.literal("remove"),path:d.string()}).strict(),d.object({op:d.literal("replace"),path:d.string(),value:rt}).strict()]),sq=d.array(aq),lq=d.object({contract:ho,variance:d.object({persona:d.string().optional(),aesthetic:d.string().optional(),context:d.record(d.string(),rt).optional(),seedPrompt:d.string().optional()}).strict().optional(),generator:d.string().optional()}).strict(),DC=lq,cq=d.object({blueprintId:d.string().min(1).optional(),contractHash:d.string().min(1),codeHash:d.string().optional(),source:x2.optional(),variance:_s,selectedReason:d.string().optional()}).strict(),uq=d.object({code:d.string().min(1),severity:d.enum(["error","warn"]),path:d.string(),message:d.string()}).strict(),dq=d.object({contractDiff:sq,reasoning:d.string()}).strict(),PC=d.object({origin:iq,rationale:d.string(),blueprintMeta:cq,proposedContractSummary:d.string().optional(),amendments:dq.optional(),validationFindings:d.array(uq).optional()}).strict()});var pq,UC,fq,uce,mq,dce,gq,pce,hq,fce,yq,mce,vq,gce,$q,hce,bq,yce,vce,$ce,xq,bce,_q,Sq,kq,xce,_ce,Sce,kce,wce,S2=_(()=>{"use strict";go();_2();xs();np();pq=d.object({width:d.number(),height:d.number()}),UC=d.object({viewport:pq,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(),fq={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.")},uce=d.object(fq),mq={sessionId:d.string().min(1),channel:d.string().min(1),payload:d.unknown(),complete:d.boolean().optional()},dce=d.object(mq),gq={sessionId:d.string().min(1).describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render.")},pce=d.object(gq),hq={},fce=d.object(hq),yq={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()},mce=d.object(yq),vq={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.")},gce=d.object(vq),$q={},hce=d.object($q),bq={serviceId:d.string().min(1),reason:d.string().optional(),sessionId:d.string().optional()},yce=d.object(bq),vce=d.object({intent:d.string().min(1).describe('Concise purpose \u2014 same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:DC.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(),$ce=d.object({handshakeId:d.string().describe("Stable id \u2014 pass to ggui_render / ggui_update"),action:d.enum(["create","reuse","update","replace","declined"]),suggestion:PC.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.")}),xq={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:ho.optional().describe("STRICT full re-draft of the contract \u2014 must already conform; the server will not repair it."),variance:_s.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).")},bce=d.object(xq),_q=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.")}),Sq=d.enum(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS"]),kq=d.object({code:Sq.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.")}),xce=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:_q.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:kq.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.")}),_ce=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()]),Sce=d.object({sessionId:d.string(),updated:d.boolean(),resourceUri:d.string()}),kce=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(),wce=d.object({saved:d.boolean(),appId:d.string()}).strict()});var wq,Eq,zq,LC,Tq,Cq,Iq,Rq,Oq,Mq,Aq,jq,Nq,Dq,Pq,Uq,Cce,Lq,Ice,HC=_(()=>{"use strict";go();S2();wq=d.object({type:d.literal("text"),text:d.string()}),Eq=d.object({type:d.literal("tool_use"),id:d.string(),name:d.string(),input:d.record(d.string(),d.unknown())}),zq=d.object({type:d.literal("tool_result"),tool_use_id:d.string(),content:d.unknown(),is_error:d.boolean().optional()}),LC=d.discriminatedUnion("type",[wq,Eq,zq]),Tq=d.object({type:d.literal("text_delta"),text:d.string()}),Cq=d.object({type:d.literal("input_json_delta"),partial_json:d.string()}),Iq=d.discriminatedUnion("type",[Tq,Cq]),Rq=d.object({type:d.literal("message_start"),message:d.object({id:d.string(),role:d.literal("assistant"),model:d.string().optional()})}),Oq=d.object({type:d.literal("content_block_start"),index:d.number().int().nonnegative(),content_block:LC}),Mq=d.object({type:d.literal("content_block_delta"),index:d.number().int().nonnegative(),delta:Iq}),Aq=d.object({type:d.literal("content_block_stop"),index:d.number().int().nonnegative()}),jq=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()})}),Nq=d.object({type:d.literal("message_stop")}),Dq=d.object({type:d.literal("ping")}),Pq=d.enum(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),Uq=d.object({type:d.literal("error"),error:d.object({code:Pq,message:d.string(),retryAfterMs:d.number().int().nonnegative().optional()})}),Cce=d.discriminatedUnion("type",[Rq,Oq,Mq,Aq,jq,Nq,Dq,Uq]),Lq=d.object({role:d.enum(["user","assistant"]),content:d.union([d.string(),d.array(LC)])}),Ice=d.object({message:d.string(),history:d.array(Lq).optional(),interfaceContext:UC.optional(),requestId:d.string().optional()})});var qC=V((Oce,VC)=>{"use strict";VC.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((r,i,a)=>`${r}${a===0?"":","}${e(i===void 0||typeof i=="symbol"?null:i)}`,"")}]`:`{${Object.keys(t).sort().reduce((o,r)=>{if(t[r]===void 0||typeof t[r]=="symbol")return o;let i=o.length===0?"":",";return`${o}${i}${e(r)}:${e(t[r])}`},"")}}`}});var Hq,ZC=_(()=>{"use strict";Hq=O(qC(),1);$r()});var BC=_(()=>{"use strict";$r()});var GC=_(()=>{"use strict"});var FC=_(()=>{"use strict"});var KC=_(()=>{"use strict"});function k2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function JC(e){return e==="inline"||e==="fullscreen"||e==="pip"}function Oh(e){if(!k2(e))return;let t={};if(JC(e.displayMode)&&(t.currentDisplayMode=e.displayMode),Array.isArray(e.availableDisplayModes)){let n=e.availableDisplayModes.filter(JC);n.length>0&&(t.availableDisplayModes=n)}if(k2(e.containerDimensions)){let n={},o=e.containerDimensions;typeof o.width=="number"&&(n.width=o.width),typeof o.maxWidth=="number"&&(n.maxWidth=o.maxWidth),typeof o.height=="number"&&(n.height=o.height),typeof o.maxHeight=="number"&&(n.maxHeight=o.maxHeight),Object.keys(n).length>0&&(t.containerDimensions=n)}if((e.platform==="web"||e.platform==="desktop"||e.platform==="mobile")&&(t.platform=e.platform),k2(e.deviceCapabilities)){let n={},o=e.deviceCapabilities;typeof o.touch=="boolean"&&(n.touch=o.touch),typeof o.hover=="boolean"&&(n.hover=o.hover),Object.keys(n).length>0&&(t.deviceCapabilities=n)}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 w2(e,t){return e===t?!0:e===void 0||t===void 0?!1:JSON.stringify(e)===JSON.stringify(t)}var WC=_(()=>{"use strict"});var YC=_(()=>{"use strict"});var Hce,Vce,Mh=_(()=>{"use strict";Hce=16*1024,Vce=64*1024});var XC=_(()=>{"use strict"});var QC=_(()=>{"use strict";$r()});var eI=_(()=>{"use strict"});var tI=_(()=>{"use strict"});var Yce,Xce,Qce,eue,tue,nue,rue,oue,iue,aue,nI=_(()=>{"use strict";go();xs();np();Yce=d.object({contract:ho,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(),rt).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(),Xce=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:$2.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(),Qce=d.object({contract:ho,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(),rt).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(),eue=d.object({blueprintId:d.string().min(1),codeHash:d.string().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:b2.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(),tue=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(),nue=d.object({blueprints:d.array(NC)}).strict(),rue=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:_s.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(),oue=d.object({blueprintId:d.string().min(1),updatedAt:d.string().min(1)}).strict(),iue=d.object({blueprintId:d.string().min(1)}).strict(),aue=d.object({deleted:d.literal(!0)}).strict()});var rI=_(()=>{"use strict"});var oI=_(()=>{"use strict"});var iI=_(()=>{"use strict"});var aI=_(()=>{"use strict"});var sI=_(()=>{"use strict"});var lI=_(()=>{"use strict"});function Vq(e){return"schemaVersion"in e?e.schemaVersion:h2}function cI(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 n=Vq(e);return n!==void 0&&(t.schemaVersion=n),t}var uI=_(()=>{"use strict";Wd()});var rp,E2=_(()=>{"use strict";Wd();rp=class extends Error{code=Th;observedVersion;acceptedVersions;observedBy;constructor(t){let n=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 '${n}' 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 dI=_(()=>{"use strict";ep()});var ap=V(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.regexpCode=Te.getEsmExportName=Te.getProperty=Te.safeStringify=Te.stringify=Te.strConcat=Te.addCodeArg=Te.str=Te._=Te.nil=Te._Code=Te.Name=Te.IDENTIFIER=Te._CodeOrName=void 0;var op=class{};Te._CodeOrName=op;Te.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ss=class extends op{constructor(t){if(super(),!Te.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}}};Te.Name=Ss;var br=class extends op{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((n,o)=>`${n}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,o)=>(o instanceof Ss&&(n[o.str]=(n[o.str]||0)+1),n),{})}};Te._Code=br;Te.nil=new br("");function pI(e,...t){let n=[e[0]],o=0;for(;o<t.length;)T2(n,t[o]),n.push(e[++o]);return new br(n)}Te._=pI;var z2=new br("+");function fI(e,...t){let n=[ip(e[0])],o=0;for(;o<t.length;)n.push(z2),T2(n,t[o]),n.push(z2,ip(e[++o]));return qq(n),new br(n)}Te.str=fI;function T2(e,t){t instanceof br?e.push(...t._items):t instanceof Ss?e.push(t):e.push(Gq(t))}Te.addCodeArg=T2;function qq(e){let t=1;for(;t<e.length-1;){if(e[t]===z2){let n=Zq(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function Zq(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Ss||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 Ss))return`"${e}${t.slice(1)}`}function Bq(e,t){return t.emptyStr()?e:e.emptyStr()?t:fI`${e}${t}`}Te.strConcat=Bq;function Gq(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ip(Array.isArray(e)?e.join(","):e)}function Fq(e){return new br(ip(e))}Te.stringify=Fq;function ip(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Te.safeStringify=ip;function Kq(e){return typeof e=="string"&&Te.IDENTIFIER.test(e)?new br(`.${e}`):pI`[${e}]`}Te.getProperty=Kq;function Jq(e){if(typeof e=="string"&&Te.IDENTIFIER.test(e))return new br(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Te.getEsmExportName=Jq;function Wq(e){return new br(e.toString())}Te.regexpCode=Wq});var R2=V(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ValueScope=Bn.ValueScopeName=Bn.Scope=Bn.varKinds=Bn.UsedValueState=void 0;var Zn=ap(),C2=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ah;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ah||(Bn.UsedValueState=Ah={}));Bn.varKinds={const:new Zn.Name("const"),let:new Zn.Name("let"),var:new Zn.Name("var")};var jh=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof Zn.Name?t:this.name(t)}name(t){return new Zn.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,o;if(!((o=(n=this._parent)===null||n===void 0?void 0:n._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}}};Bn.Scope=jh;var Nh=class extends Zn.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:o}){this.value=t,this.scopePath=(0,Zn._)`.${new Zn.Name(n)}[${o}]`}};Bn.ValueScopeName=Nh;var Yq=(0,Zn._)`\n`,I2=class extends jh{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Yq:Zn.nil}}get(){return this._scope}name(t){return new Nh(t,this._newName(t))}value(t,n){var o;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,a=(o=n.key)!==null&&o!==void 0?o:n.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,r);let l=this._scope[i]||(this._scope[i]=[]),c=l.length;return l[c]=n.ref,r.setValue(n,{property:i,itemIndex:c}),r}getValue(t,n){let o=this._values[t];if(o)return o.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,Zn._)`${t}${o.scopePath}`})}scopeCode(t=this._values,n,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,o)}_reduceValues(t,n,o={},r){let i=Zn.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,Ah.Started);let u=n(c);if(u){let p=this.opts.es5?Bn.varKinds.var:Bn.varKinds.const;i=(0,Zn._)`${i}${p} ${c} = ${u};${this.opts._n}`}else if(u=r?.(c))i=(0,Zn._)`${i}${u}${this.opts._n}`;else throw new C2(c);l.set(c,Ah.Completed)})}return i}};Bn.ValueScope=I2});var ue=V(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.or=me.and=me.not=me.CodeGen=me.operators=me.varKinds=me.ValueScopeName=me.ValueScope=me.Scope=me.Name=me.regexpCode=me.stringify=me.getProperty=me.nil=me.strConcat=me.str=me._=void 0;var $e=ap(),Qr=R2(),Hi=ap();Object.defineProperty(me,"_",{enumerable:!0,get:function(){return Hi._}});Object.defineProperty(me,"str",{enumerable:!0,get:function(){return Hi.str}});Object.defineProperty(me,"strConcat",{enumerable:!0,get:function(){return Hi.strConcat}});Object.defineProperty(me,"nil",{enumerable:!0,get:function(){return Hi.nil}});Object.defineProperty(me,"getProperty",{enumerable:!0,get:function(){return Hi.getProperty}});Object.defineProperty(me,"stringify",{enumerable:!0,get:function(){return Hi.stringify}});Object.defineProperty(me,"regexpCode",{enumerable:!0,get:function(){return Hi.regexpCode}});Object.defineProperty(me,"Name",{enumerable:!0,get:function(){return Hi.Name}});var Lh=R2();Object.defineProperty(me,"Scope",{enumerable:!0,get:function(){return Lh.Scope}});Object.defineProperty(me,"ValueScope",{enumerable:!0,get:function(){return Lh.ValueScope}});Object.defineProperty(me,"ValueScopeName",{enumerable:!0,get:function(){return Lh.ValueScopeName}});Object.defineProperty(me,"varKinds",{enumerable:!0,get:function(){return Lh.varKinds}});me.operators={GT:new $e._Code(">"),GTE:new $e._Code(">="),LT:new $e._Code("<"),LTE:new $e._Code("<="),EQ:new $e._Code("==="),NEQ:new $e._Code("!=="),NOT:new $e._Code("!"),OR:new $e._Code("||"),AND:new $e._Code("&&"),ADD:new $e._Code("+")};var Ho=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},O2=class extends Ho{constructor(t,n,o){super(),this.varKind=t,this.name=n,this.rhs=o}render({es5:t,_n:n}){let o=t?Qr.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=Zl(this.rhs,t,n)),this}get names(){return this.rhs instanceof $e._CodeOrName?this.rhs.names:{}}},Dh=class extends Ho{constructor(t,n,o){super(),this.lhs=t,this.rhs=n,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof $e.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Zl(this.rhs,t,n),this}get names(){let t=this.lhs instanceof $e.Name?{}:{...this.lhs.names};return Uh(t,this.rhs)}},M2=class extends Dh{constructor(t,n,o,r){super(t,o,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},A2=class extends Ho{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},j2=class extends Ho{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},N2=class extends Ho{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},D2=class extends Ho{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=Zl(this.code,t,n),this}get names(){return this.code instanceof $e._CodeOrName?this.code.names:{}}},sp=class extends Ho{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,o)=>n+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let o=t[n].optimizeNodes();Array.isArray(o)?t.splice(n,1,...o):o?t[n]=o:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,n)||(Xq(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>Es(t,n.names),{})}},Vo=class extends sp{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},P2=class extends sp{},ql=class extends Vo{};ql.kind="else";var ks=class e extends Vo{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let o=n.optimizeNodes();n=this.else=Array.isArray(o)?new ql(o):o}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(mI(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=Zl(this.condition,t,n),this}get names(){let t=super.names;return Uh(t,this.condition),this.else&&Es(t,this.else.names),t}};ks.kind="if";var ws=class extends Vo{};ws.kind="for";var U2=class extends ws{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=Zl(this.iteration,t,n),this}get names(){return Es(super.names,this.iteration.names)}},L2=class extends ws{constructor(t,n,o,r){super(),this.varKind=t,this.name=n,this.from=o,this.to=r}render(t){let n=t.es5?Qr.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${n} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=Uh(super.names,this.from);return Uh(t,this.to)}},Ph=class extends ws{constructor(t,n,o,r){super(),this.loop=t,this.varKind=n,this.name=o,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=Zl(this.iterable,t,n),this}get names(){return Es(super.names,this.iterable.names)}},lp=class extends Vo{constructor(t,n,o){super(),this.name=t,this.args=n,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};lp.kind="func";var cp=class extends sp{render(t){return"return "+super.render(t)}};cp.kind="return";var H2=class extends Vo{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var o,r;return super.optimizeNames(t,n),(o=this.catch)===null||o===void 0||o.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&Es(t,this.catch.names),this.finally&&Es(t,this.finally.names),t}},up=class extends Vo{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};up.kind="catch";var dp=class extends Vo{render(t){return"finally"+super.render(t)}};dp.kind="finally";var V2=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
65
|
+
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 Ui(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},p=l.ref;if(l.ref=null,p){o(p);let f=e.seen.get(p),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(g)):Object.assign(c,g),Object.assign(c,u),s._zod.parent===p)for(let b in c)b==="$ref"||b==="allOf"||b in u||delete c[b];if(g.$ref&&f.def)for(let b in c)b==="$ref"||b==="allOf"||b in f.def&&JSON.stringify(c[b])===JSON.stringify(f.def[b])&&delete c[b]}let m=s._zod.parent;if(m&&m!==p){o(m);let f=e.seen.get(m);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let g in c)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g])&&delete c[g]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Cl(t,"input",e.processors),output:Cl(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function zn(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return zn(o.element,n);if(o.type==="set")return zn(o.valueType,n);if(o.type==="lazy")return zn(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return zn(o.innerType,n);if(o.type==="intersection")return zn(o.left,n)||zn(o.right,n);if(o.type==="record"||o.type==="map")return zn(o.keyType,n)||zn(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:zn(o.in,n)||zn(o.out,n);if(o.type==="object"){for(let r in o.shape)if(zn(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(zn(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(zn(r,n))return!0;return!!(o.rest&&zn(o.rest,n))}return!1}var fx,Cl,pd=_(()=>{od();fx=(e,t={})=>n=>{let o=Di({...n,processors:t});return Ae(e,o),Pi(o,e),Ui(o,e)},Cl=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},a=Di({...r??{},target:i,io:t,processors:n});return Ae(e,a),Pi(a,e),Ui(a,e)}});function fd(e,t){if("_idmap"in e){let o=e,r=Di({...t,processors:bg}),i={};for(let l of o._idmap.entries()){let[c,u]=l;Ae(u,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let l of o._idmap.entries()){let[c,u]=l;Pi(r,u),a[c]=Ui(r,u)}if(Object.keys(i).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let n=Di({...t,processors:bg});return Ae(e,n),Pi(n,e),Ui(n,e)}var xV,mx,gx,hx,yx,vx,$x,bx,xx,_x,Sx,kx,wx,Ex,zx,Tx,Cx,Ix,Rx,Ox,Mx,Ax,jx,Nx,Dx,Px,xg,Ux,Lx,Hx,Vx,qx,Zx,Bx,Gx,Fx,Kx,Jx,_g,Wx,bg,md=_(()=>{pd();F();xV={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mx=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof a=="number"&&(r.maxLength=a),s&&(r.format=xV[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},gx=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let p=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),m=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";p?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof i=="number"&&(r.minimum=i),m?f?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),typeof l=="number"&&(r.multipleOf=l)},hx=(e,t,n,o)=>{n.type="boolean"},yx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},vx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},$x=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},bx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},xx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},_x=(e,t,n,o)=>{n.not={}},Sx=(e,t,n,o)=>{},kx=(e,t,n,o)=>{},wx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Ex=(e,t,n,o)=>{let r=e._zod.def,i=Hu(r.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},zx=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.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];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Tx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Cx=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},Ix=(e,t,n,o)=>{let r=n,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(r,i)):(Object.assign(r,i),r.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(r,i)},Rx=(e,t,n,o)=>{n.type="boolean"},Ox=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Mx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Ax=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},jx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Nx=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Dx=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Ae(i.element,t,{...o,path:[...o.path,"items"]})},Px=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let c in a)r.properties[c]=Ae(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&&(r.required=Array.from(l)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Ae(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},xg=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,l)=>Ae(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=a:n.anyOf=a},Ux=(e,t,n,o)=>{let r=e._zod.def,i=Ae(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=Ae(r.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]];n.allOf=l},Lx=(e,t,n,o)=>{let r=n,i=e._zod.def;r.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((m,f)=>Ae(m,t,{...o,path:[...o.path,a,f]})),c=i.rest?Ae(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,c&&(r.items=c)):t.target==="openapi-3.0"?(r.items={anyOf:l},c&&r.items.anyOf.push(c),r.minItems=l.length,c||(r.maxItems=l.length)):(r.items=l,c&&(r.additionalItems=c));let{minimum:u,maximum:p}=e._zod.bag;typeof u=="number"&&(r.minItems=u),typeof p=="number"&&(r.maxItems=p)},Hx=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,l=a._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let u=Ae(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let p of l)r.patternProperties[p.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ae(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Ae(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&&(r.required=u)}},Vx=(e,t,n,o)=>{let r=e._zod.def,i=Ae(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},qx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Zx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Bx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Gx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Fx=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;Ae(a,t,o);let s=t.seen.get(e);s.ref=a},Kx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},Jx=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},_g=(e,t,n,o)=>{let r=e._zod.def;Ae(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Wx=(e,t,n,o)=>{let r=e._zod.innerType;Ae(r,t,o);let i=t.seen.get(e);i.ref=r},bg={string:mx,number:gx,boolean:hx,bigint:yx,symbol:vx,null:$x,undefined:bx,void:xx,never:_x,any:Sx,unknown:kx,date:wx,enum:Ex,literal:zx,nan:Tx,template_literal:Cx,file:Ix,success:Rx,custom:Ox,function:Mx,transform:Ax,map:jx,set:Nx,array:Dx,object:Px,union:xg,intersection:Ux,tuple:Lx,record:Hx,nullable:Vx,nonoptional:qx,default:Zx,prefault:Bx,catch:Gx,pipe:Fx,readonly:Kx,promise:Jx,optional:_g,lazy:Wx}});var Sg,oC=_(()=>{md();pd();Sg=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 n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Di({processors:bg,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Ae(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Pi(this.ctx,t);let o=Ui(this.ctx,t),{"~standard":r,...i}=o;return i}}});var iC={};var aC=_(()=>{});var mo={};bt(mo,{$ZodAny:()=>G$,$ZodArray:()=>Y$,$ZodAsyncError:()=>Kr,$ZodBase64:()=>N$,$ZodBase64URL:()=>D$,$ZodBigInt:()=>qm,$ZodBigIntFormat:()=>V$,$ZodBoolean:()=>Qu,$ZodCIDRv4:()=>M$,$ZodCIDRv6:()=>A$,$ZodCUID:()=>x$,$ZodCUID2:()=>_$,$ZodCatch:()=>gb,$ZodCheck:()=>Xe,$ZodCheckBigIntFormat:()=>J1,$ZodCheckEndsWith:()=>s$,$ZodCheckGreaterThan:()=>Nm,$ZodCheckIncludes:()=>i$,$ZodCheckLengthEquals:()=>t$,$ZodCheckLessThan:()=>jm,$ZodCheckLowerCase:()=>r$,$ZodCheckMaxLength:()=>Q1,$ZodCheckMaxSize:()=>W1,$ZodCheckMimeType:()=>c$,$ZodCheckMinLength:()=>e$,$ZodCheckMinSize:()=>Y1,$ZodCheckMultipleOf:()=>F1,$ZodCheckNumberFormat:()=>K1,$ZodCheckOverwrite:()=>u$,$ZodCheckProperty:()=>l$,$ZodCheckRegex:()=>n$,$ZodCheckSizeEquals:()=>X1,$ZodCheckStartsWith:()=>a$,$ZodCheckStringFormat:()=>wl,$ZodCheckUpperCase:()=>o$,$ZodCodec:()=>td,$ZodCustom:()=>Sb,$ZodCustomStringFormat:()=>L$,$ZodDate:()=>W$,$ZodDefault:()=>db,$ZodDiscriminatedUnion:()=>eb,$ZodE164:()=>P$,$ZodEmail:()=>y$,$ZodEmoji:()=>$$,$ZodEncodeError:()=>Ci,$ZodEnum:()=>ib,$ZodError:()=>Gu,$ZodExactOptional:()=>cb,$ZodFile:()=>sb,$ZodFunction:()=>bb,$ZodGUID:()=>g$,$ZodIPv4:()=>I$,$ZodIPv6:()=>R$,$ZodISODate:()=>z$,$ZodISODateTime:()=>E$,$ZodISODuration:()=>C$,$ZodISOTime:()=>T$,$ZodIntersection:()=>tb,$ZodJWT:()=>U$,$ZodKSUID:()=>w$,$ZodLazy:()=>_b,$ZodLiteral:()=>ab,$ZodMAC:()=>O$,$ZodMap:()=>rb,$ZodNaN:()=>hb,$ZodNanoID:()=>b$,$ZodNever:()=>K$,$ZodNonOptional:()=>fb,$ZodNull:()=>B$,$ZodNullable:()=>ub,$ZodNumber:()=>Vm,$ZodNumberFormat:()=>H$,$ZodObject:()=>az,$ZodObjectJIT:()=>X$,$ZodOptional:()=>Bm,$ZodPipe:()=>Gm,$ZodPrefault:()=>pb,$ZodPreprocess:()=>yb,$ZodPromise:()=>xb,$ZodReadonly:()=>vb,$ZodRealError:()=>Ln,$ZodRecord:()=>nb,$ZodRegistry:()=>Wm,$ZodSet:()=>ob,$ZodString:()=>es,$ZodStringFormat:()=>qe,$ZodSuccess:()=>mb,$ZodSymbol:()=>q$,$ZodTemplateLiteral:()=>$b,$ZodTransform:()=>lb,$ZodTuple:()=>Zm,$ZodType:()=>ne,$ZodULID:()=>S$,$ZodURL:()=>v$,$ZodUUID:()=>h$,$ZodUndefined:()=>Z$,$ZodUnion:()=>ed,$ZodUnknown:()=>F$,$ZodVoid:()=>J$,$ZodXID:()=>k$,$ZodXor:()=>Q$,$brand:()=>$m,$constructor:()=>E,$input:()=>Xm,$output:()=>Ym,Doc:()=>Xu,JSONSchema:()=>iC,JSONSchemaGenerator:()=>Sg,NEVER:()=>vm,TimePrecision:()=>$g,_any:()=>Xb,_array:()=>ix,_base64:()=>gg,_base64url:()=>hg,_bigint:()=>Bb,_boolean:()=>qb,_catch:()=>gV,_check:()=>nC,_cidrv4:()=>fg,_cidrv6:()=>mg,_coercedBigint:()=>Gb,_coercedBoolean:()=>Zb,_coercedDate:()=>rx,_coercedNumber:()=>Db,_coercedString:()=>Ib,_cuid:()=>ag,_cuid2:()=>sg,_custom:()=>sx,_date:()=>nx,_decode:()=>wm,_decodeAsync:()=>zm,_default:()=>pV,_discriminatedUnion:()=>eV,_e164:()=>yg,_email:()=>Qm,_emoji:()=>og,_encode:()=>km,_encodeAsync:()=>Em,_endsWith:()=>as,_enum:()=>aV,_file:()=>ax,_float32:()=>Ub,_float64:()=>Lb,_gt:()=>Wr,_gte:()=>vn,_guid:()=>id,_includes:()=>os,_int:()=>Pb,_int32:()=>Hb,_int64:()=>Fb,_intersection:()=>tV,_ipv4:()=>dg,_ipv6:()=>pg,_isoDate:()=>Mb,_isoDateTime:()=>Ob,_isoDuration:()=>jb,_isoTime:()=>Ab,_jwt:()=>vg,_ksuid:()=>ug,_lazy:()=>$V,_length:()=>Ni,_literal:()=>lV,_lowercase:()=>ns,_lt:()=>Jr,_lte:()=>Vn,_mac:()=>Rb,_map:()=>oV,_max:()=>Vn,_maxLength:()=>ji,_maxSize:()=>Po,_mime:()=>ss,_min:()=>vn,_minLength:()=>fo,_minSize:()=>Yr,_multipleOf:()=>Do,_nan:()=>ox,_nanoid:()=>ig,_nativeEnum:()=>sV,_negative:()=>ld,_never:()=>ex,_nonnegative:()=>ud,_nonoptional:()=>fV,_nonpositive:()=>cd,_normalize:()=>ls,_null:()=>Yb,_nullable:()=>dV,_number:()=>Nb,_optional:()=>uV,_overwrite:()=>vr,_parse:()=>bl,_parseAsync:()=>xl,_pipe:()=>hV,_positive:()=>sd,_promise:()=>bV,_property:()=>dd,_readonly:()=>yV,_record:()=>rV,_refine:()=>lx,_regex:()=>ts,_safeDecode:()=>Cm,_safeDecodeAsync:()=>Rm,_safeEncode:()=>Tm,_safeEncodeAsync:()=>Im,_safeParse:()=>_l,_safeParseAsync:()=>kl,_set:()=>iV,_size:()=>Ai,_slugify:()=>ps,_startsWith:()=>is,_string:()=>Cb,_stringFormat:()=>Tl,_stringbool:()=>px,_success:()=>mV,_superRefine:()=>cx,_symbol:()=>Jb,_templateLiteral:()=>vV,_toLowerCase:()=>us,_toUpperCase:()=>ds,_transform:()=>cV,_trim:()=>cs,_tuple:()=>nV,_uint32:()=>Vb,_uint64:()=>Kb,_ulid:()=>lg,_undefined:()=>Wb,_union:()=>XH,_unknown:()=>Qb,_uppercase:()=>rs,_url:()=>ad,_uuid:()=>eg,_uuidv4:()=>tg,_uuidv6:()=>ng,_uuidv7:()=>rg,_void:()=>tx,_xid:()=>cg,_xor:()=>QH,clone:()=>yn,config:()=>ft,createStandardJSONSchemaMethod:()=>Cl,createToJSONSchemaMethod:()=>fx,decode:()=>C6,decodeAsync:()=>R6,describe:()=>ux,encode:()=>T6,encodeAsync:()=>I6,extractDefs:()=>Pi,finalize:()=>Ui,flattenError:()=>vl,formatError:()=>$l,globalConfig:()=>Wa,globalRegistry:()=>Bt,initializeContext:()=>Di,isValidBase64:()=>j$,isValidBase64URL:()=>nz,isValidJWT:()=>rz,locales:()=>zl,meta:()=>dx,parse:()=>Fu,parseAsync:()=>Ku,prettifyError:()=>Sm,process:()=>Ae,regexes:()=>Hn,registry:()=>rd,safeDecode:()=>M6,safeDecodeAsync:()=>j6,safeEncode:()=>O6,safeEncodeAsync:()=>A6,safeParse:()=>Sl,safeParseAsync:()=>Ju,toDotPath:()=>z6,toJSONSchema:()=>fd,treeifyError:()=>_m,util:()=>P,version:()=>p$});var qn=_(()=>{Ya();y1();h1();kb();Dm();f$();F();Am();Tb();od();d$();rC();pd();md();oC();aC()});var kg={};bt(kg,{endsWith:()=>as,gt:()=>Wr,gte:()=>vn,includes:()=>os,length:()=>Ni,lowercase:()=>ns,lt:()=>Jr,lte:()=>Vn,maxLength:()=>ji,maxSize:()=>Po,mime:()=>ss,minLength:()=>fo,minSize:()=>Yr,multipleOf:()=>Do,negative:()=>ld,nonnegative:()=>ud,nonpositive:()=>cd,normalize:()=>ls,overwrite:()=>vr,positive:()=>sd,property:()=>dd,regex:()=>ts,size:()=>Ai,slugify:()=>ps,startsWith:()=>is,toLowerCase:()=>us,toUpperCase:()=>ds,trim:()=>cs,uppercase:()=>rs});var wg=_(()=>{qn()});var Uo={};bt(Uo,{ZodISODate:()=>hd,ZodISODateTime:()=>gd,ZodISODuration:()=>vd,ZodISOTime:()=>yd,date:()=>Xx,datetime:()=>Yx,duration:()=>e_,time:()=>Qx});function Yx(e){return Ob(gd,e)}function Xx(e){return Mb(hd,e)}function Qx(e){return Ab(yd,e)}function e_(e){return jb(vd,e)}var gd,hd,yd,vd,$d=_(()=>{qn();xd();gd=E("ZodISODateTime",(e,t)=>{E$.init(e,t),De.init(e,t)});hd=E("ZodISODate",(e,t)=>{z$.init(e,t),De.init(e,t)});yd=E("ZodISOTime",(e,t)=>{T$.init(e,t),De.init(e,t)});vd=E("ZodISODuration",(e,t)=>{C$.init(e,t),De.init(e,t)})});var sC,lC,Tn,t_=_(()=>{qn();qn();F();sC=(e,t)=>{Gu.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>$l(e,n)},flatten:{value:n=>vl(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,gl,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,gl,2)}},isEmpty:{get(){return e.issues.length===0}}})},lC=E("ZodError",sC),Tn=E("ZodError",sC,{Parent:Error})});var Eg,zg,Tg,Cg,Ig,Rg,Og,Mg,Ag,jg,Ng,Dg,n_=_(()=>{qn();t_();Eg=bl(Tn),zg=xl(Tn),Tg=_l(Tn),Cg=kl(Tn),Ig=km(Tn),Rg=wm(Tn),Og=Em(Tn),Mg=zm(Tn),Ag=Tm(Tn),jg=Cm(Tn),Ng=Im(Tn),Dg=Rm(Tn)});var bd={};bt(bd,{ZodAny:()=>Vg,ZodArray:()=>Gg,ZodBase64:()=>Pd,ZodBase64URL:()=>Ud,ZodBigInt:()=>$s,ZodBigIntFormat:()=>Vd,ZodBoolean:()=>vs,ZodCIDRv4:()=>Nd,ZodCIDRv6:()=>Dd,ZodCUID:()=>Cd,ZodCUID2:()=>Id,ZodCatch:()=>ph,ZodCodec:()=>Ul,ZodCustom:()=>Ll,ZodCustomStringFormat:()=>hs,ZodDate:()=>Al,ZodDefault:()=>ah,ZodDiscriminatedUnion:()=>Kg,ZodE164:()=>Ld,ZodEmail:()=>Ed,ZodEmoji:()=>zd,ZodEnum:()=>ms,ZodExactOptional:()=>rh,ZodFile:()=>th,ZodFunction:()=>_h,ZodGUID:()=>Il,ZodIPv4:()=>Ad,ZodIPv6:()=>jd,ZodIntersection:()=>Jg,ZodJWT:()=>Hd,ZodKSUID:()=>Md,ZodLazy:()=>$h,ZodLiteral:()=>eh,ZodMAC:()=>Pg,ZodMap:()=>Xg,ZodNaN:()=>mh,ZodNanoID:()=>Td,ZodNever:()=>Zg,ZodNonOptional:()=>Gd,ZodNull:()=>Hg,ZodNullable:()=>ih,ZodNumber:()=>ys,ZodNumberFormat:()=>Li,ZodObject:()=>jl,ZodOptional:()=>Bd,ZodPipe:()=>Pl,ZodPrefault:()=>lh,ZodPreprocess:()=>gh,ZodPromise:()=>xh,ZodReadonly:()=>hh,ZodRecord:()=>fs,ZodSet:()=>Qg,ZodString:()=>gs,ZodStringFormat:()=>De,ZodSuccess:()=>dh,ZodSymbol:()=>Ug,ZodTemplateLiteral:()=>vh,ZodTransform:()=>nh,ZodTuple:()=>Wg,ZodType:()=>ie,ZodULID:()=>Rd,ZodURL:()=>Ol,ZodUUID:()=>Xr,ZodUndefined:()=>Lg,ZodUnion:()=>Nl,ZodUnknown:()=>qg,ZodVoid:()=>Bg,ZodXID:()=>Od,ZodXor:()=>Fg,_ZodString:()=>wd,_default:()=>sh,_function:()=>i2,any:()=>L_,array:()=>ce,base64:()=>S_,base64url:()=>k_,bigint:()=>j_,boolean:()=>ht,catch:()=>fh,check:()=>a2,cidrv4:()=>x_,cidrv6:()=>__,codec:()=>t2,cuid:()=>f_,cuid2:()=>m_,custom:()=>Fd,date:()=>V_,describe:()=>s2,discriminatedUnion:()=>Dl,e164:()=>w_,email:()=>r_,emoji:()=>d_,enum:()=>Ft,exactOptional:()=>oh,file:()=>Y_,float32:()=>R_,float64:()=>O_,function:()=>i2,guid:()=>o_,hash:()=>I_,hex:()=>C_,hostname:()=>T_,httpUrl:()=>u_,instanceof:()=>c2,int:()=>_d,int32:()=>M_,int64:()=>N_,intersection:()=>bs,invertCodec:()=>n2,ipv4:()=>v_,ipv6:()=>b_,json:()=>d2,jwt:()=>E_,keyof:()=>q_,ksuid:()=>y_,lazy:()=>bh,literal:()=>K,looseObject:()=>Gt,looseRecord:()=>F_,mac:()=>$_,map:()=>K_,meta:()=>l2,nan:()=>e2,nanoid:()=>p_,nativeEnum:()=>W_,never:()=>qd,nonoptional:()=>uh,null:()=>Ml,nullable:()=>Rl,nullish:()=>X_,number:()=>ke,object:()=>B,optional:()=>Ze,partialRecord:()=>G_,pipe:()=>Sd,prefault:()=>ch,preprocess:()=>Hl,promise:()=>o2,readonly:()=>yh,record:()=>je,refine:()=>Sh,set:()=>J_,strictObject:()=>Z_,string:()=>R,stringFormat:()=>z_,stringbool:()=>u2,success:()=>Q_,superRefine:()=>kh,symbol:()=>P_,templateLiteral:()=>r2,transform:()=>Zd,tuple:()=>Yg,uint32:()=>A_,uint64:()=>D_,ulid:()=>g_,undefined:()=>U_,union:()=>Ue,unknown:()=>Pe,url:()=>c_,uuid:()=>i_,uuidv4:()=>a_,uuidv6:()=>s_,uuidv7:()=>l_,void:()=>H_,xid:()=>h_,xor:()=>B_});function kd(e,t,n){let o=Object.getPrototypeOf(e),r=cC.get(o);if(r||(r=new Set,cC.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function R(e){return Cb(gs,e)}function r_(e){return Qm(Ed,e)}function o_(e){return id(Il,e)}function i_(e){return eg(Xr,e)}function a_(e){return tg(Xr,e)}function s_(e){return ng(Xr,e)}function l_(e){return rg(Xr,e)}function c_(e){return ad(Ol,e)}function u_(e){return ad(Ol,{protocol:Hn.httpProtocol,hostname:Hn.domain,...P.normalizeParams(e)})}function d_(e){return og(zd,e)}function p_(e){return ig(Td,e)}function f_(e){return ag(Cd,e)}function m_(e){return sg(Id,e)}function g_(e){return lg(Rd,e)}function h_(e){return cg(Od,e)}function y_(e){return ug(Md,e)}function v_(e){return dg(Ad,e)}function $_(e){return Rb(Pg,e)}function b_(e){return pg(jd,e)}function x_(e){return fg(Nd,e)}function __(e){return mg(Dd,e)}function S_(e){return gg(Pd,e)}function k_(e){return hg(Ud,e)}function w_(e){return yg(Ld,e)}function E_(e){return vg(Hd,e)}function z_(e,t,n={}){return Tl(hs,e,t,n)}function T_(e){return Tl(hs,"hostname",Hn.hostname,e)}function C_(e){return Tl(hs,"hex",Hn.hex,e)}function I_(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=Hn[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return Tl(hs,o,r,t)}function ke(e){return Nb(ys,e)}function _d(e){return Pb(Li,e)}function R_(e){return Ub(Li,e)}function O_(e){return Lb(Li,e)}function M_(e){return Hb(Li,e)}function A_(e){return Vb(Li,e)}function ht(e){return qb(vs,e)}function j_(e){return Bb($s,e)}function N_(e){return Fb(Vd,e)}function D_(e){return Kb(Vd,e)}function P_(e){return Jb(Ug,e)}function U_(e){return Wb(Lg,e)}function Ml(e){return Yb(Hg,e)}function L_(){return Xb(Vg)}function Pe(){return Qb(qg)}function qd(e){return ex(Zg,e)}function H_(e){return tx(Bg,e)}function V_(e){return nx(Al,e)}function ce(e,t){return ix(Gg,e,t)}function q_(e){let t=e._zod.def.shape;return Ft(Object.keys(t))}function B(e,t){let n={type:"object",shape:e??{},...P.normalizeParams(t)};return new jl(n)}function Z_(e,t){return new jl({type:"object",shape:e,catchall:qd(),...P.normalizeParams(t)})}function Gt(e,t){return new jl({type:"object",shape:e,catchall:Pe(),...P.normalizeParams(t)})}function Ue(e,t){return new Nl({type:"union",options:e,...P.normalizeParams(t)})}function B_(e,t){return new Fg({type:"union",options:e,inclusive:!1,...P.normalizeParams(t)})}function Dl(e,t,n){return new Kg({type:"union",options:t,discriminator:e,...P.normalizeParams(n)})}function bs(e,t){return new Jg({type:"intersection",left:e,right:t})}function Yg(e,t,n){let o=t instanceof ne,r=o?n:t,i=o?t:null;return new Wg({type:"tuple",items:e,rest:i,...P.normalizeParams(r)})}function je(e,t,n){return!t||!t._zod?new fs({type:"record",keyType:R(),valueType:e,...P.normalizeParams(t)}):new fs({type:"record",keyType:e,valueType:t,...P.normalizeParams(n)})}function G_(e,t,n){let o=yn(e);return o._zod.values=void 0,new fs({type:"record",keyType:o,valueType:t,...P.normalizeParams(n)})}function F_(e,t,n){return new fs({type:"record",keyType:e,valueType:t,mode:"loose",...P.normalizeParams(n)})}function K_(e,t,n){return new Xg({type:"map",keyType:e,valueType:t,...P.normalizeParams(n)})}function J_(e,t){return new Qg({type:"set",valueType:e,...P.normalizeParams(t)})}function Ft(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ms({type:"enum",entries:n,...P.normalizeParams(t)})}function W_(e,t){return new ms({type:"enum",entries:e,...P.normalizeParams(t)})}function K(e,t){return new eh({type:"literal",values:Array.isArray(e)?e:[e],...P.normalizeParams(t)})}function Y_(e){return ax(th,e)}function Zd(e){return new nh({type:"transform",transform:e})}function Ze(e){return new Bd({type:"optional",innerType:e})}function oh(e){return new rh({type:"optional",innerType:e})}function Rl(e){return new ih({type:"nullable",innerType:e})}function X_(e){return Ze(Rl(e))}function sh(e,t){return new ah({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function ch(e,t){return new lh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}function uh(e,t){return new Gd({type:"nonoptional",innerType:e,...P.normalizeParams(t)})}function Q_(e){return new dh({type:"success",innerType:e})}function fh(e,t){return new ph({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function e2(e){return ox(mh,e)}function Sd(e,t){return new Pl({type:"pipe",in:e,out:t})}function t2(e,t,n){return new Ul({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function n2(e){let t=e._zod.def;return new Ul({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function yh(e){return new hh({type:"readonly",innerType:e})}function r2(e,t){return new vh({type:"template_literal",parts:e,...P.normalizeParams(t)})}function bh(e){return new $h({type:"lazy",getter:e})}function o2(e){return new xh({type:"promise",innerType:e})}function i2(e){return new _h({type:"function",input:Array.isArray(e?.input)?Yg(e?.input):e?.input??ce(Pe()),output:e?.output??Pe()})}function a2(e){let t=new Xe({check:"custom"});return t._zod.check=e,t}function Fd(e,t){return sx(Ll,e??(()=>!0),t)}function Sh(e,t={}){return lx(Ll,e,t)}function kh(e,t){return cx(e,t)}function c2(e,t={}){let n=new Ll({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...P.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function d2(e){let t=bh(()=>Ue([R(e),ke(),ht(),Ml(),ce(t),je(R(),t)]));return t}function Hl(e,t){return new gh({type:"pipe",in:Zd(e),out:t})}var cC,ie,wd,gs,De,Ed,Il,Xr,Ol,zd,Td,Cd,Id,Rd,Od,Md,Ad,Pg,jd,Nd,Dd,Pd,Ud,Ld,Hd,hs,ys,Li,vs,$s,Vd,Ug,Lg,Hg,Vg,qg,Zg,Bg,Al,Gg,jl,Nl,Fg,Kg,Jg,Wg,fs,Xg,Qg,ms,eh,th,nh,Bd,rh,ih,ah,lh,Gd,dh,ph,mh,Pl,Ul,gh,hh,vh,$h,xh,_h,Ll,s2,l2,u2,xd=_(()=>{qn();qn();md();pd();wg();$d();n_();cC=new WeakMap;ie=E("ZodType",(e,t)=>(ne.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Cl(e,"input"),output:Cl(e,"output")}}),e.toJSONSchema=fx(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>Eg(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Tg(e,n,o),e.parseAsync=async(n,o)=>zg(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Cg(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Ig(e,n,o),e.decode=(n,o)=>Rg(e,n,o),e.encodeAsync=async(n,o)=>Og(e,n,o),e.decodeAsync=async(n,o)=>Mg(e,n,o),e.safeEncode=(n,o)=>Ag(e,n,o),e.safeDecode=(n,o)=>jg(e,n,o),e.safeEncodeAsync=async(n,o)=>Ng(e,n,o),e.safeDecodeAsync=async(n,o)=>Dg(e,n,o),kd(e,"ZodType",{check(...n){let o=this.def;return this.clone(P.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return yn(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Sh(n,o))},superRefine(n,o){return this.check(kh(n,o))},overwrite(n){return this.check(vr(n))},optional(){return Ze(this)},exactOptional(){return oh(this)},nullable(){return Rl(this)},nullish(){return Ze(Rl(this))},nonoptional(n){return uh(this,n)},array(){return ce(this)},or(n){return Ue([this,n])},and(n){return bs(this,n)},transform(n){return Sd(this,Zd(n))},default(n){return sh(this,n)},prefault(n){return ch(this,n)},catch(n){return fh(this,n)},pipe(n){return Sd(this,n)},readonly(){return yh(this)},describe(n){let o=this.clone();return Bt.add(o,{description:n}),o},meta(...n){if(n.length===0)return Bt.get(this);let o=this.clone();return Bt.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Bt.get(e)?.description},configurable:!0}),e)),wd=E("_ZodString",(e,t)=>{es.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>mx(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,kd(e,"_ZodString",{regex(...o){return this.check(ts(...o))},includes(...o){return this.check(os(...o))},startsWith(...o){return this.check(is(...o))},endsWith(...o){return this.check(as(...o))},min(...o){return this.check(fo(...o))},max(...o){return this.check(ji(...o))},length(...o){return this.check(Ni(...o))},nonempty(...o){return this.check(fo(1,...o))},lowercase(o){return this.check(ns(o))},uppercase(o){return this.check(rs(o))},trim(){return this.check(cs())},normalize(...o){return this.check(ls(...o))},toLowerCase(){return this.check(us())},toUpperCase(){return this.check(ds())},slugify(){return this.check(ps())}})}),gs=E("ZodString",(e,t)=>{es.init(e,t),wd.init(e,t),e.email=n=>e.check(Qm(Ed,n)),e.url=n=>e.check(ad(Ol,n)),e.jwt=n=>e.check(vg(Hd,n)),e.emoji=n=>e.check(og(zd,n)),e.guid=n=>e.check(id(Il,n)),e.uuid=n=>e.check(eg(Xr,n)),e.uuidv4=n=>e.check(tg(Xr,n)),e.uuidv6=n=>e.check(ng(Xr,n)),e.uuidv7=n=>e.check(rg(Xr,n)),e.nanoid=n=>e.check(ig(Td,n)),e.guid=n=>e.check(id(Il,n)),e.cuid=n=>e.check(ag(Cd,n)),e.cuid2=n=>e.check(sg(Id,n)),e.ulid=n=>e.check(lg(Rd,n)),e.base64=n=>e.check(gg(Pd,n)),e.base64url=n=>e.check(hg(Ud,n)),e.xid=n=>e.check(cg(Od,n)),e.ksuid=n=>e.check(ug(Md,n)),e.ipv4=n=>e.check(dg(Ad,n)),e.ipv6=n=>e.check(pg(jd,n)),e.cidrv4=n=>e.check(fg(Nd,n)),e.cidrv6=n=>e.check(mg(Dd,n)),e.e164=n=>e.check(yg(Ld,n)),e.datetime=n=>e.check(Yx(n)),e.date=n=>e.check(Xx(n)),e.time=n=>e.check(Qx(n)),e.duration=n=>e.check(e_(n))});De=E("ZodStringFormat",(e,t)=>{qe.init(e,t),wd.init(e,t)}),Ed=E("ZodEmail",(e,t)=>{y$.init(e,t),De.init(e,t)});Il=E("ZodGUID",(e,t)=>{g$.init(e,t),De.init(e,t)});Xr=E("ZodUUID",(e,t)=>{h$.init(e,t),De.init(e,t)});Ol=E("ZodURL",(e,t)=>{v$.init(e,t),De.init(e,t)});zd=E("ZodEmoji",(e,t)=>{$$.init(e,t),De.init(e,t)});Td=E("ZodNanoID",(e,t)=>{b$.init(e,t),De.init(e,t)});Cd=E("ZodCUID",(e,t)=>{x$.init(e,t),De.init(e,t)});Id=E("ZodCUID2",(e,t)=>{_$.init(e,t),De.init(e,t)});Rd=E("ZodULID",(e,t)=>{S$.init(e,t),De.init(e,t)});Od=E("ZodXID",(e,t)=>{k$.init(e,t),De.init(e,t)});Md=E("ZodKSUID",(e,t)=>{w$.init(e,t),De.init(e,t)});Ad=E("ZodIPv4",(e,t)=>{I$.init(e,t),De.init(e,t)});Pg=E("ZodMAC",(e,t)=>{O$.init(e,t),De.init(e,t)});jd=E("ZodIPv6",(e,t)=>{R$.init(e,t),De.init(e,t)});Nd=E("ZodCIDRv4",(e,t)=>{M$.init(e,t),De.init(e,t)});Dd=E("ZodCIDRv6",(e,t)=>{A$.init(e,t),De.init(e,t)});Pd=E("ZodBase64",(e,t)=>{N$.init(e,t),De.init(e,t)});Ud=E("ZodBase64URL",(e,t)=>{D$.init(e,t),De.init(e,t)});Ld=E("ZodE164",(e,t)=>{P$.init(e,t),De.init(e,t)});Hd=E("ZodJWT",(e,t)=>{U$.init(e,t),De.init(e,t)});hs=E("ZodCustomStringFormat",(e,t)=>{L$.init(e,t),De.init(e,t)});ys=E("ZodNumber",(e,t)=>{Vm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>gx(e,o,r,i),kd(e,"ZodNumber",{gt(o,r){return this.check(Wr(o,r))},gte(o,r){return this.check(vn(o,r))},min(o,r){return this.check(vn(o,r))},lt(o,r){return this.check(Jr(o,r))},lte(o,r){return this.check(Vn(o,r))},max(o,r){return this.check(Vn(o,r))},int(o){return this.check(_d(o))},safe(o){return this.check(_d(o))},positive(o){return this.check(Wr(0,o))},nonnegative(o){return this.check(vn(0,o))},negative(o){return this.check(Jr(0,o))},nonpositive(o){return this.check(Vn(0,o))},multipleOf(o,r){return this.check(Do(o,r))},step(o,r){return this.check(Do(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});Li=E("ZodNumberFormat",(e,t)=>{H$.init(e,t),ys.init(e,t)});vs=E("ZodBoolean",(e,t)=>{Qu.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hx(e,n,o,r)});$s=E("ZodBigInt",(e,t)=>{qm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>yx(e,o,r,i),e.gte=(o,r)=>e.check(vn(o,r)),e.min=(o,r)=>e.check(vn(o,r)),e.gt=(o,r)=>e.check(Wr(o,r)),e.gte=(o,r)=>e.check(vn(o,r)),e.min=(o,r)=>e.check(vn(o,r)),e.lt=(o,r)=>e.check(Jr(o,r)),e.lte=(o,r)=>e.check(Vn(o,r)),e.max=(o,r)=>e.check(Vn(o,r)),e.positive=o=>e.check(Wr(BigInt(0),o)),e.negative=o=>e.check(Jr(BigInt(0),o)),e.nonpositive=o=>e.check(Vn(BigInt(0),o)),e.nonnegative=o=>e.check(vn(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Do(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});Vd=E("ZodBigIntFormat",(e,t)=>{V$.init(e,t),$s.init(e,t)});Ug=E("ZodSymbol",(e,t)=>{q$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vx(e,n,o,r)});Lg=E("ZodUndefined",(e,t)=>{Z$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>bx(e,n,o,r)});Hg=E("ZodNull",(e,t)=>{B$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$x(e,n,o,r)});Vg=E("ZodAny",(e,t)=>{G$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sx(e,n,o,r)});qg=E("ZodUnknown",(e,t)=>{F$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>kx(e,n,o,r)});Zg=E("ZodNever",(e,t)=>{K$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_x(e,n,o,r)});Bg=E("ZodVoid",(e,t)=>{J$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xx(e,n,o,r)});Al=E("ZodDate",(e,t)=>{W$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>wx(e,o,r,i),e.min=(o,r)=>e.check(vn(o,r)),e.max=(o,r)=>e.check(Vn(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Gg=E("ZodArray",(e,t)=>{Y$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Dx(e,n,o,r),e.element=t.element,kd(e,"ZodArray",{min(n,o){return this.check(fo(n,o))},nonempty(n){return this.check(fo(1,n))},max(n,o){return this.check(ji(n,o))},length(n,o){return this.check(Ni(n,o))},unwrap(){return this.element}})});jl=E("ZodObject",(e,t)=>{X$.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Px(e,n,o,r),P.defineLazy(e,"shape",()=>t.shape),kd(e,"ZodObject",{keyof(){return Ft(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Pe()})},loose(){return this.clone({...this._zod.def,catchall:Pe()})},strict(){return this.clone({...this._zod.def,catchall:qd()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return P.extend(this,n)},safeExtend(n){return P.safeExtend(this,n)},merge(n){return P.merge(this,n)},pick(n){return P.pick(this,n)},omit(n){return P.omit(this,n)},partial(...n){return P.partial(Bd,this,n[0])},required(...n){return P.required(Gd,this,n[0])}})});Nl=E("ZodUnion",(e,t)=>{ed.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xg(e,n,o,r),e.options=t.options});Fg=E("ZodXor",(e,t)=>{Nl.init(e,t),Q$.init(e,t),e._zod.processJSONSchema=(n,o,r)=>xg(e,n,o,r),e.options=t.options});Kg=E("ZodDiscriminatedUnion",(e,t)=>{Nl.init(e,t),eb.init(e,t)});Jg=E("ZodIntersection",(e,t)=>{tb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ux(e,n,o,r)});Wg=E("ZodTuple",(e,t)=>{Zm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lx(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});fs=E("ZodRecord",(e,t)=>{nb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hx(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});Xg=E("ZodMap",(e,t)=>{rb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jx(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Po(...n)),e.size=(...n)=>e.check(Ai(...n))});Qg=E("ZodSet",(e,t)=>{ob.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Nx(e,n,o,r),e.min=(...n)=>e.check(Yr(...n)),e.nonempty=n=>e.check(Yr(1,n)),e.max=(...n)=>e.check(Po(...n)),e.size=(...n)=>e.check(Ai(...n))});ms=E("ZodEnum",(e,t)=>{ib.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ex(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ms({...t,checks:[],...P.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new ms({...t,checks:[],...P.normalizeParams(r),entries:i})}});eh=E("ZodLiteral",(e,t)=>{ab.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zx(e,n,o,r),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]}})});th=E("ZodFile",(e,t)=>{sb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ix(e,n,o,r),e.min=(n,o)=>e.check(Yr(n,o)),e.max=(n,o)=>e.check(Po(n,o)),e.mime=(n,o)=>e.check(ss(Array.isArray(n)?n:[n],o))});nh=E("ZodTransform",(e,t)=>{lb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ax(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ci(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(P.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(P.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});Bd=E("ZodOptional",(e,t)=>{Bm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_g(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});rh=E("ZodExactOptional",(e,t)=>{cb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_g(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ih=E("ZodNullable",(e,t)=>{ub.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ah=E("ZodDefault",(e,t)=>{db.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});lh=E("ZodPrefault",(e,t)=>{pb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});Gd=E("ZodNonOptional",(e,t)=>{fb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});dh=E("ZodSuccess",(e,t)=>{mb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Rx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ph=E("ZodCatch",(e,t)=>{gb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});mh=E("ZodNaN",(e,t)=>{hb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Tx(e,n,o,r)});Pl=E("ZodPipe",(e,t)=>{Gm.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fx(e,n,o,r),e.in=t.in,e.out=t.out});Ul=E("ZodCodec",(e,t)=>{Pl.init(e,t),td.init(e,t)});gh=E("ZodPreprocess",(e,t)=>{Pl.init(e,t),yb.init(e,t)}),hh=E("ZodReadonly",(e,t)=>{vb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});vh=E("ZodTemplateLiteral",(e,t)=>{$b.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Cx(e,n,o,r)});$h=E("ZodLazy",(e,t)=>{_b.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wx(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});xh=E("ZodPromise",(e,t)=>{xb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jx(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});_h=E("ZodFunction",(e,t)=>{bb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mx(e,n,o,r)});Ll=E("ZodCustom",(e,t)=>{Sb.init(e,t),ie.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ox(e,n,o,r)});s2=ux,l2=dx;u2=(...e)=>px({Codec:Ul,Boolean:vs,String:gs},...e)});function dC(e){ft({customError:e})}function pC(){return ft().customError}var uC,wh,fC=_(()=>{qn();uC={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"};wh||(wh={})});function wV(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function EV(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function mC(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Z.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 r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return Z.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=EV(r,t),a=$n(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return Z.null();if(r.length===0)return Z.never();if(r.length===1)return Z.literal(r[0]);if(r.every(a=>typeof a=="string"))return Z.enum(r);let i=r.map(a=>Z.literal(a));return i.length<2?i[0]:Z.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Z.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let a={...e,type:i};return mC(a,t)});return r.length===0?Z.never():r.length===1?r[0]:Z.union(r)}if(!n)return Z.any();let o;switch(n){case"string":{let r=Z.string();if(e.format){let i=e.format;i==="email"?r=r.check(Z.email()):i==="uri"||i==="uri-reference"?r=r.check(Z.url()):i==="uuid"||i==="guid"?r=r.check(Z.uuid()):i==="date-time"?r=r.check(Z.iso.datetime()):i==="date"?r=r.check(Z.iso.date()):i==="time"?r=r.check(Z.iso.time()):i==="duration"?r=r.check(Z.iso.duration()):i==="ipv4"?r=r.check(Z.ipv4()):i==="ipv6"?r=r.check(Z.ipv6()):i==="mac"?r=r.check(Z.mac()):i==="cidr"?r=r.check(Z.cidrv4()):i==="cidr-v6"?r=r.check(Z.cidrv6()):i==="base64"?r=r.check(Z.base64()):i==="base64url"?r=r.check(Z.base64url()):i==="e164"?r=r.check(Z.e164()):i==="jwt"?r=r.check(Z.jwt()):i==="emoji"?r=r.check(Z.emoji()):i==="nanoid"?r=r.check(Z.nanoid()):i==="cuid"?r=r.check(Z.cuid()):i==="cuid2"?r=r.check(Z.cuid2()):i==="ulid"?r=r.check(Z.ulid()):i==="xid"?r=r.check(Z.xid()):i==="ksuid"&&(r=r.check(Z.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?Z.number().int():Z.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=Z.boolean();break}case"null":{o=Z.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[l,c]of Object.entries(i)){let u=$n(c,t);r[l]=a.has(l)?u:u.optional()}if(e.propertyNames){let l=$n(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?$n(e.additionalProperties,t):Z.any();if(Object.keys(r).length===0){o=Z.record(l,c);break}let u=Z.object(r).passthrough(),p=Z.looseRecord(l,c);o=Z.intersection(u,p);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let m of c){let f=$n(l[m],t),g=Z.string().regex(new RegExp(m));u.push(Z.looseRecord(g,f))}let p=[];if(Object.keys(r).length>0&&p.push(Z.object(r).passthrough()),p.push(...u),p.length===0)o=Z.object({}).passthrough();else if(p.length===1)o=p[0];else{let m=Z.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)m=Z.intersection(m,p[f]);o=m}break}let s=Z.object(r);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall($n(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let a=r.map(l=>$n(l,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?$n(i,t):void 0;s?o=Z.tuple(a).rest(s):o=Z.tuple(a),typeof e.minItems=="number"&&(o=o.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(Z.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(l=>$n(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?$n(e.additionalItems,t):void 0;s?o=Z.tuple(a).rest(s):o=Z.tuple(a),typeof e.minItems=="number"&&(o=o.check(Z.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(Z.maxLength(e.maxItems)))}else if(i!==void 0){let a=$n(i,t),s=Z.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=Z.array(Z.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function $n(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let n=mC(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=>$n(c,t)),l=Z.union(s);n=o?Z.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>$n(c,t)),l=Z.xor(s);n=o?Z.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:Z.any();else{let s=o?n:$n(e.allOf[0],t),l=o?0:1;for(let c=l;c<e.allOf.length;c++)s=Z.intersection(s,$n(e.allOf[c],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Z.nullable(n)),e.readOnly===!0&&(n=Z.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))kV.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function p2(e,t){if(typeof e=="boolean")return e?Z.any():Z.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=wV(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Bt};return $n(n,i)}var Z,kV,gC=_(()=>{od();wg();$d();xd();Z={...bd,...kg,iso:Uo},kV=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 Eh={};bt(Eh,{bigint:()=>IV,boolean:()=>CV,date:()=>RV,number:()=>TV,string:()=>zV});function zV(e){return Ib(gs,e)}function TV(e){return Db(ys,e)}function CV(e){return Zb(vs,e)}function IV(e){return Gb($s,e)}function RV(e){return rx(Al,e)}var hC=_(()=>{qn();xd()});var d={};bt(d,{$brand:()=>$m,$input:()=>Xm,$output:()=>Ym,NEVER:()=>vm,TimePrecision:()=>$g,ZodAny:()=>Vg,ZodArray:()=>Gg,ZodBase64:()=>Pd,ZodBase64URL:()=>Ud,ZodBigInt:()=>$s,ZodBigIntFormat:()=>Vd,ZodBoolean:()=>vs,ZodCIDRv4:()=>Nd,ZodCIDRv6:()=>Dd,ZodCUID:()=>Cd,ZodCUID2:()=>Id,ZodCatch:()=>ph,ZodCodec:()=>Ul,ZodCustom:()=>Ll,ZodCustomStringFormat:()=>hs,ZodDate:()=>Al,ZodDefault:()=>ah,ZodDiscriminatedUnion:()=>Kg,ZodE164:()=>Ld,ZodEmail:()=>Ed,ZodEmoji:()=>zd,ZodEnum:()=>ms,ZodError:()=>lC,ZodExactOptional:()=>rh,ZodFile:()=>th,ZodFirstPartyTypeKind:()=>wh,ZodFunction:()=>_h,ZodGUID:()=>Il,ZodIPv4:()=>Ad,ZodIPv6:()=>jd,ZodISODate:()=>hd,ZodISODateTime:()=>gd,ZodISODuration:()=>vd,ZodISOTime:()=>yd,ZodIntersection:()=>Jg,ZodIssueCode:()=>uC,ZodJWT:()=>Hd,ZodKSUID:()=>Md,ZodLazy:()=>$h,ZodLiteral:()=>eh,ZodMAC:()=>Pg,ZodMap:()=>Xg,ZodNaN:()=>mh,ZodNanoID:()=>Td,ZodNever:()=>Zg,ZodNonOptional:()=>Gd,ZodNull:()=>Hg,ZodNullable:()=>ih,ZodNumber:()=>ys,ZodNumberFormat:()=>Li,ZodObject:()=>jl,ZodOptional:()=>Bd,ZodPipe:()=>Pl,ZodPrefault:()=>lh,ZodPreprocess:()=>gh,ZodPromise:()=>xh,ZodReadonly:()=>hh,ZodRealError:()=>Tn,ZodRecord:()=>fs,ZodSet:()=>Qg,ZodString:()=>gs,ZodStringFormat:()=>De,ZodSuccess:()=>dh,ZodSymbol:()=>Ug,ZodTemplateLiteral:()=>vh,ZodTransform:()=>nh,ZodTuple:()=>Wg,ZodType:()=>ie,ZodULID:()=>Rd,ZodURL:()=>Ol,ZodUUID:()=>Xr,ZodUndefined:()=>Lg,ZodUnion:()=>Nl,ZodUnknown:()=>qg,ZodVoid:()=>Bg,ZodXID:()=>Od,ZodXor:()=>Fg,_ZodString:()=>wd,_default:()=>sh,_function:()=>i2,any:()=>L_,array:()=>ce,base64:()=>S_,base64url:()=>k_,bigint:()=>j_,boolean:()=>ht,catch:()=>fh,check:()=>a2,cidrv4:()=>x_,cidrv6:()=>__,clone:()=>yn,codec:()=>t2,coerce:()=>Eh,config:()=>ft,core:()=>mo,cuid:()=>f_,cuid2:()=>m_,custom:()=>Fd,date:()=>V_,decode:()=>Rg,decodeAsync:()=>Mg,describe:()=>s2,discriminatedUnion:()=>Dl,e164:()=>w_,email:()=>r_,emoji:()=>d_,encode:()=>Ig,encodeAsync:()=>Og,endsWith:()=>as,enum:()=>Ft,exactOptional:()=>oh,file:()=>Y_,flattenError:()=>vl,float32:()=>R_,float64:()=>O_,formatError:()=>$l,fromJSONSchema:()=>p2,function:()=>i2,getErrorMap:()=>pC,globalRegistry:()=>Bt,gt:()=>Wr,gte:()=>vn,guid:()=>o_,hash:()=>I_,hex:()=>C_,hostname:()=>T_,httpUrl:()=>u_,includes:()=>os,instanceof:()=>c2,int:()=>_d,int32:()=>M_,int64:()=>N_,intersection:()=>bs,invertCodec:()=>n2,ipv4:()=>v_,ipv6:()=>b_,iso:()=>Uo,json:()=>d2,jwt:()=>E_,keyof:()=>q_,ksuid:()=>y_,lazy:()=>bh,length:()=>Ni,literal:()=>K,locales:()=>zl,looseObject:()=>Gt,looseRecord:()=>F_,lowercase:()=>ns,lt:()=>Jr,lte:()=>Vn,mac:()=>$_,map:()=>K_,maxLength:()=>ji,maxSize:()=>Po,meta:()=>l2,mime:()=>ss,minLength:()=>fo,minSize:()=>Yr,multipleOf:()=>Do,nan:()=>e2,nanoid:()=>p_,nativeEnum:()=>W_,negative:()=>ld,never:()=>qd,nonnegative:()=>ud,nonoptional:()=>uh,nonpositive:()=>cd,normalize:()=>ls,null:()=>Ml,nullable:()=>Rl,nullish:()=>X_,number:()=>ke,object:()=>B,optional:()=>Ze,overwrite:()=>vr,parse:()=>Eg,parseAsync:()=>zg,partialRecord:()=>G_,pipe:()=>Sd,positive:()=>sd,prefault:()=>ch,preprocess:()=>Hl,prettifyError:()=>Sm,promise:()=>o2,property:()=>dd,readonly:()=>yh,record:()=>je,refine:()=>Sh,regex:()=>ts,regexes:()=>Hn,registry:()=>rd,safeDecode:()=>jg,safeDecodeAsync:()=>Dg,safeEncode:()=>Ag,safeEncodeAsync:()=>Ng,safeParse:()=>Tg,safeParseAsync:()=>Cg,set:()=>J_,setErrorMap:()=>dC,size:()=>Ai,slugify:()=>ps,startsWith:()=>is,strictObject:()=>Z_,string:()=>R,stringFormat:()=>z_,stringbool:()=>u2,success:()=>Q_,superRefine:()=>kh,symbol:()=>P_,templateLiteral:()=>r2,toJSONSchema:()=>fd,toLowerCase:()=>us,toUpperCase:()=>ds,transform:()=>Zd,treeifyError:()=>_m,trim:()=>cs,tuple:()=>Yg,uint32:()=>A_,uint64:()=>D_,ulid:()=>g_,undefined:()=>U_,union:()=>Ue,unknown:()=>Pe,uppercase:()=>rs,url:()=>c_,util:()=>P,uuid:()=>i_,uuidv4:()=>a_,uuidv6:()=>s_,uuidv7:()=>l_,void:()=>H_,xid:()=>h_,xor:()=>B_});var Kd=_(()=>{qn();xd();wg();t_();n_();fC();qn();wb();qn();md();gC();Tb();$d();$d();hC();ft(Fm())});var go=_(()=>{Kd();Kd()});var OV,MV,AV,yC,f2=_(()=>{"use strict";go();OV=/^--ggui-[a-zA-Z0-9-]+$/,MV=/^[^;{}<>@]*$/,AV=d.string().min(1).max(256).regex(MV,"css value contains a disallowed character").refine(e=>!e.includes("/*"),"css value may not contain a comment"),yC=d.object({mode:d.enum(["light","dark"]),cssVariables:d.record(d.string().regex(OV,"css var key must be --ggui-*"),AV).refine(e=>Object.keys(e).length<=200,"too many css variables (max 200)"),name:d.string().min(1).max(64).optional()}).strict()});function Cn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var $r=_(()=>{"use strict"});var NV,h2,Th,Jd,Wd=_(()=>{"use strict";NV="draft-2026-06-12",h2=NV,Th="UPGRADE_REQUIRED",Jd=Object.freeze([h2])});var bC=_(()=>{"use strict"});var xC=_(()=>{"use strict"});var _C=_(()=>{"use strict"});var SC=_(()=>{"use strict"});var kC=_(()=>{"use strict";$r()});var wC=_(()=>{"use strict"});var EC=_(()=>{"use strict"});var zC=_(()=>{"use strict"});var Yd,TC,y2,CC,Xd=_(()=>{"use strict";Yd="@ggui-ai/gadgets",TC="0.6.3",y2=[{package:Yd,version:TC,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"}}}}]}],CC=Object.freeze(new Set(y2.flatMap(e=>e.exports).map(e=>e.hook).filter(e=>e!==void 0)))});var v2=_(()=>{"use strict"});var Vl,Qd,Ch=_(()=>{"use strict";Vl=/^use[A-Z][A-Za-z0-9]*$/,Qd=/^[A-Z][A-Za-z0-9]*$/});var Ih,Hle,ep=_(()=>{"use strict";Xd();v2();Ch();Ih=["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"],Hle=new Set(Ih)});var rt,Lo,UV,LV,HV,VV,qV,ZV,BV,GV,FV,KV,Rh,JV,IC,MC,WV,YV,AC,RC,OC,jC,XV,QV,Fle,tp,Kle,eq,tq,nq,Jle,ho,xs=_(()=>{"use strict";go();ep();Xd();Ch();Ch();rt=d.lazy(()=>d.union([d.string(),d.number(),d.boolean(),d.null(),d.array(rt),d.record(d.string(),rt)])),Lo=d.lazy(()=>d.object({type:d.enum(["string","number","integer","boolean","array","object","null"]).optional(),description:d.string().optional(),enum:d.array(rt).optional(),default:rt.optional(),example:rt.optional(),items:Lo.optional(),properties:d.record(d.string(),Lo).optional(),required:d.array(d.string()).optional(),additionalProperties:d.union([Lo,d.boolean()]).optional(),format:d.string().optional()}).passthrough()),UV=d.object({description:d.string().optional(),schema:Lo,required:d.boolean().optional(),default:rt.optional(),example:rt.optional(),sourceTool:d.string().optional()}).strict(),LV=d.object({description:d.string().optional(),properties:d.record(d.string(),UV)}).strict(),HV=d.object({description:d.string().optional(),label:d.string(),schema:Lo.optional(),example:rt.optional(),icon:d.string().optional(),confirm:d.boolean().optional(),nextStep:d.string().min(1).optional()}).strict(),VV=d.record(d.string(),HV),qV=d.object({description:d.string().optional(),schema:Lo,example:rt.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(),rt).optional()}).strict().optional()}).strict(),ZV=d.record(d.string(),qV),BV=d.object({description:d.string().optional(),schema:Lo,default:rt.optional(),debounceMs:d.number().int().nonnegative().optional(),example:rt.optional()}).strict(),GV=d.record(d.string(),BV),FV=d.object({serverInfo:d.object({name:d.string(),version:d.string().optional()}).strict().optional(),toolInfo:d.object({inputSchema:Lo,description:d.string().optional(),outputSchema:Lo.optional()}).strict(),usage:d.string().optional(),example:d.object({input:rt,output:rt}).strict().optional()}).strict(),KV=d.object({tools:d.record(d.string(),FV)}).passthrough(),Rh=/^GGUI_PUBLIC_APP_[A-Z0-9_]+$/,JV=d.array(d.string().regex(Rh)).readonly(),IC=/^sha384-[A-Za-z0-9+/]+=*$/,MC=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/,WV=/^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/,YV=/^[a-z0-9.-]+(:\d+)?$/,AC={gotchas:d.string().optional()},RC={...AC,description:d.string().optional(),usage:d.string().optional(),example:rt.optional(),permission:d.string().optional()},OC={...AC,description:d.string().min(1),usage:d.string().min(1),example:rt,permission:d.enum(Ih).optional()},jC={version:d.string().regex(WV),package:d.string().regex(MC),bundleUrl:d.url().optional(),bundleHost:d.string().regex(YV).optional(),bundleSri:d.string().regex(IC).optional(),styleUrl:d.url().optional(),connect:d.array(d.url()).readonly().optional(),requires:JV.optional(),typesUrl:d.url().optional(),typesSri:d.string().regex(IC).optional()},XV=d.union([d.object({hook:d.string().regex(Vl),...RC}).strict(),d.object({component:d.string().regex(Qd),...RC}).strict()]),QV=d.union([d.object({hook:d.string().regex(Vl),...OC}).strict(),d.object({component:d.string().regex(Qd),...OC}).strict()]),Fle=d.object({...jC,exports:d.array(XV).min(1)}).strict(),tp=d.object({...jC,exports:d.array(QV).min(1)}).strict(),Kle=tp.refine(e=>e.package===Yd||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"]}),eq=d.object({description:d.string().optional(),usage:d.string().optional()}).strict(),tq=d.record(d.string().refine(e=>Vl.test(e)||Qd.test(e),{message:"gadget export name must be a `use`-prefixed hook or a PascalCase component identifier"}),eq).refine(e=>Object.keys(e).length>0,{message:"a `clientCapabilities.gadgets` package entry must declare at least one export"}),nq=d.object({gadgets:d.record(d.string().regex(MC),tq)}).strict(),Jle=d.record(d.string().regex(Rh),d.string()).readonly(),ho=d.object({propsSpec:LV.optional(),actionSpec:VV.optional(),streamSpec:ZV.optional(),contextSpec:GV.optional(),agentCapabilities:KV.optional(),clientCapabilities:nq.optional()}).passthrough()});var $2,b2,rq,x2,_s,NC,oq,ece,np=_(()=>{"use strict";go();xs();$2=d.object({kind:d.literal("llm"),generator:d.string().min(1),model:d.string().min(1)}).strict(),b2=d.object({kind:d.literal("user")}).strict(),rq=d.object({kind:d.literal("curated")}).strict(),x2=d.union([$2,b2,rq]),_s=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(),rt).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(),NC=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:x2,validatorScore:d.number().min(0).max(1).optional(),variance:_s,isOperatorDefault:d.literal(!0).optional(),createdAt:d.string().min(1),createdBy:d.enum(["agent","operator"]),contract:ho,contractEmbedding:d.array(d.number()).optional()}).strict(),oq=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(),ece=d.object({weights:oq.optional(),threshold:d.number().min(0).max(1).optional(),topK:d.number().int().min(1).optional()}).strict()});var iq,aq,sq,lq,DC,cq,uq,dq,PC,_2=_(()=>{"use strict";go();xs();np();iq=d.enum(["cache","agent","synth"]),aq=d.union([d.object({op:d.literal("add"),path:d.string(),value:rt}).strict(),d.object({op:d.literal("remove"),path:d.string()}).strict(),d.object({op:d.literal("replace"),path:d.string(),value:rt}).strict()]),sq=d.array(aq),lq=d.object({contract:ho,variance:d.object({persona:d.string().optional(),aesthetic:d.string().optional(),context:d.record(d.string(),rt).optional(),seedPrompt:d.string().optional()}).strict().optional(),generator:d.string().optional()}).strict(),DC=lq,cq=d.object({blueprintId:d.string().min(1).optional(),contractHash:d.string().min(1),codeHash:d.string().optional(),source:x2.optional(),variance:_s,selectedReason:d.string().optional()}).strict(),uq=d.object({code:d.string().min(1),severity:d.enum(["error","warn"]),path:d.string(),message:d.string()}).strict(),dq=d.object({contractDiff:sq,reasoning:d.string()}).strict(),PC=d.object({origin:iq,rationale:d.string(),blueprintMeta:cq,proposedContractSummary:d.string().optional(),amendments:dq.optional(),validationFindings:d.array(uq).optional()}).strict()});var pq,UC,fq,uce,mq,dce,gq,pce,hq,fce,yq,mce,vq,gce,$q,hce,bq,yce,vce,$ce,xq,bce,_q,Sq,kq,xce,_ce,Sce,kce,wce,S2=_(()=>{"use strict";go();_2();xs();np();pq=d.object({width:d.number(),height:d.number()}),UC=d.object({viewport:pq,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(),fq={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.")},uce=d.object(fq),mq={sessionId:d.string().min(1),channel:d.string().min(1),payload:d.unknown(),complete:d.boolean().optional()},dce=d.object(mq),gq={sessionId:d.string().min(1).describe("GguiSession opaque id (UUID) \u2014 returned by ggui_render.")},pce=d.object(gq),hq={},fce=d.object(hq),yq={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()},mce=d.object(yq),vq={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.")},gce=d.object(vq),$q={},hce=d.object($q),bq={serviceId:d.string().min(1),reason:d.string().optional(),sessionId:d.string().optional()},yce=d.object(bq),vce=d.object({intent:d.string().min(1).describe('Concise purpose \u2014 same intent = same component reused. e.g. "Gmail inbox for email triage"'),blueprintDraft:DC.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(),$ce=d.object({handshakeId:d.string().describe("Stable id \u2014 pass to ggui_render / ggui_update"),action:d.enum(["create","reuse","update","replace","declined"]),suggestion:PC.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.")}),xq={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:ho.optional().describe("STRICT full re-draft of the contract \u2014 must already conform; the server will not repair it."),variance:_s.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).")},bce=d.object(xq),_q=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.")}),Sq=d.enum(["PRODUCTION_FAILED","VALIDATION_ERROR","NO_PLATFORM_KEY","NO_CREDENTIALS"]),kq=d.object({code:Sq.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.")}),xce=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:_q.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:kq.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.")}),_ce=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()]),Sce=d.object({sessionId:d.string(),updated:d.boolean(),resourceUri:d.string()}),kce=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(),wce=d.object({saved:d.boolean(),appId:d.string()}).strict()});var wq,Eq,zq,LC,Tq,Cq,Iq,Rq,Oq,Mq,Aq,jq,Nq,Dq,Pq,Uq,Cce,Lq,Ice,HC=_(()=>{"use strict";go();S2();wq=d.object({type:d.literal("text"),text:d.string()}),Eq=d.object({type:d.literal("tool_use"),id:d.string(),name:d.string(),input:d.record(d.string(),d.unknown())}),zq=d.object({type:d.literal("tool_result"),tool_use_id:d.string(),content:d.unknown(),is_error:d.boolean().optional()}),LC=d.discriminatedUnion("type",[wq,Eq,zq]),Tq=d.object({type:d.literal("text_delta"),text:d.string()}),Cq=d.object({type:d.literal("input_json_delta"),partial_json:d.string()}),Iq=d.discriminatedUnion("type",[Tq,Cq]),Rq=d.object({type:d.literal("message_start"),message:d.object({id:d.string(),role:d.literal("assistant"),model:d.string().optional()})}),Oq=d.object({type:d.literal("content_block_start"),index:d.number().int().nonnegative(),content_block:LC}),Mq=d.object({type:d.literal("content_block_delta"),index:d.number().int().nonnegative(),delta:Iq}),Aq=d.object({type:d.literal("content_block_stop"),index:d.number().int().nonnegative()}),jq=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()})}),Nq=d.object({type:d.literal("message_stop")}),Dq=d.object({type:d.literal("ping")}),Pq=d.enum(["invalid_request","unauthorized","rate_limited","invoke_in_progress","upstream_error","tool_error","internal"]),Uq=d.object({type:d.literal("error"),error:d.object({code:Pq,message:d.string(),retryAfterMs:d.number().int().nonnegative().optional()})}),Cce=d.discriminatedUnion("type",[Rq,Oq,Mq,Aq,jq,Nq,Dq,Uq]),Lq=d.object({role:d.enum(["user","assistant"]),content:d.union([d.string(),d.array(LC)])}),Ice=d.object({message:d.string(),history:d.array(Lq).optional(),interfaceContext:UC.optional(),requestId:d.string().optional()})});var qC=V((Oce,VC)=>{"use strict";VC.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((r,i,a)=>`${r}${a===0?"":","}${e(i===void 0||typeof i=="symbol"?null:i)}`,"")}]`:`{${Object.keys(t).sort().reduce((o,r)=>{if(t[r]===void 0||typeof t[r]=="symbol")return o;let i=o.length===0?"":",";return`${o}${i}${e(r)}:${e(t[r])}`},"")}}`}});var Hq,ZC=_(()=>{"use strict";Hq=O(qC(),1);$r()});var BC=_(()=>{"use strict";$r()});var GC=_(()=>{"use strict"});var FC=_(()=>{"use strict"});var KC=_(()=>{"use strict"});function k2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function JC(e){return e==="inline"||e==="fullscreen"||e==="pip"}function Oh(e){if(!k2(e))return;let t={};if(JC(e.displayMode)&&(t.currentDisplayMode=e.displayMode),Array.isArray(e.availableDisplayModes)){let n=e.availableDisplayModes.filter(JC);n.length>0&&(t.availableDisplayModes=n)}if(k2(e.containerDimensions)){let n={},o=e.containerDimensions;typeof o.width=="number"&&(n.width=o.width),typeof o.maxWidth=="number"&&(n.maxWidth=o.maxWidth),typeof o.height=="number"&&(n.height=o.height),typeof o.maxHeight=="number"&&(n.maxHeight=o.maxHeight),Object.keys(n).length>0&&(t.containerDimensions=n)}if((e.platform==="web"||e.platform==="desktop"||e.platform==="mobile")&&(t.platform=e.platform),k2(e.deviceCapabilities)){let n={},o=e.deviceCapabilities;typeof o.touch=="boolean"&&(n.touch=o.touch),typeof o.hover=="boolean"&&(n.hover=o.hover),Object.keys(n).length>0&&(t.deviceCapabilities=n)}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 w2(e,t){return e===t?!0:e===void 0||t===void 0?!1:JSON.stringify(e)===JSON.stringify(t)}var WC=_(()=>{"use strict"});var YC=_(()=>{"use strict"});var Hce,Vce,Mh=_(()=>{"use strict";Hce=16*1024,Vce=64*1024});var XC=_(()=>{"use strict"});var QC=_(()=>{"use strict";$r()});var eI=_(()=>{"use strict"});var tI=_(()=>{"use strict"});var Yce,Xce,Qce,eue,tue,nue,rue,oue,iue,aue,nI=_(()=>{"use strict";go();xs();np();Yce=d.object({contract:ho,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(),rt).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(),Xce=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:$2.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(),Qce=d.object({contract:ho,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(),rt).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(),eue=d.object({blueprintId:d.string().min(1),codeHash:d.string().min(1).describe("Content hash of the persisted code body (full sha256 hex)."),source:b2.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(),tue=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(),nue=d.object({blueprints:d.array(NC)}).strict(),rue=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:_s.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(),oue=d.object({blueprintId:d.string().min(1),updatedAt:d.string().min(1)}).strict(),iue=d.object({blueprintId:d.string().min(1)}).strict(),aue=d.object({deleted:d.literal(!0)}).strict()});var rI=_(()=>{"use strict"});var oI=_(()=>{"use strict"});var iI=_(()=>{"use strict"});var aI=_(()=>{"use strict"});var sI=_(()=>{"use strict"});var lI=_(()=>{"use strict"});function Vq(e){return"schemaVersion"in e?e.schemaVersion:h2}function cI(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 n=Vq(e);return n!==void 0&&(t.schemaVersion=n),t}var uI=_(()=>{"use strict";Wd()});var rp,E2=_(()=>{"use strict";Wd();rp=class extends Error{code=Th;observedVersion;acceptedVersions;observedBy;constructor(t){let n=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 '${n}' 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 dI=_(()=>{"use strict";ep()});var ap=V(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.regexpCode=Te.getEsmExportName=Te.getProperty=Te.safeStringify=Te.stringify=Te.strConcat=Te.addCodeArg=Te.str=Te._=Te.nil=Te._Code=Te.Name=Te.IDENTIFIER=Te._CodeOrName=void 0;var op=class{};Te._CodeOrName=op;Te.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ss=class extends op{constructor(t){if(super(),!Te.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}}};Te.Name=Ss;var br=class extends op{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((n,o)=>`${n}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,o)=>(o instanceof Ss&&(n[o.str]=(n[o.str]||0)+1),n),{})}};Te._Code=br;Te.nil=new br("");function pI(e,...t){let n=[e[0]],o=0;for(;o<t.length;)T2(n,t[o]),n.push(e[++o]);return new br(n)}Te._=pI;var z2=new br("+");function fI(e,...t){let n=[ip(e[0])],o=0;for(;o<t.length;)n.push(z2),T2(n,t[o]),n.push(z2,ip(e[++o]));return qq(n),new br(n)}Te.str=fI;function T2(e,t){t instanceof br?e.push(...t._items):t instanceof Ss?e.push(t):e.push(Gq(t))}Te.addCodeArg=T2;function qq(e){let t=1;for(;t<e.length-1;){if(e[t]===z2){let n=Zq(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function Zq(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof Ss||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 Ss))return`"${e}${t.slice(1)}`}function Bq(e,t){return t.emptyStr()?e:e.emptyStr()?t:fI`${e}${t}`}Te.strConcat=Bq;function Gq(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ip(Array.isArray(e)?e.join(","):e)}function Fq(e){return new br(ip(e))}Te.stringify=Fq;function ip(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Te.safeStringify=ip;function Kq(e){return typeof e=="string"&&Te.IDENTIFIER.test(e)?new br(`.${e}`):pI`[${e}]`}Te.getProperty=Kq;function Jq(e){if(typeof e=="string"&&Te.IDENTIFIER.test(e))return new br(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Te.getEsmExportName=Jq;function Wq(e){return new br(e.toString())}Te.regexpCode=Wq});var R2=V(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.ValueScope=Bn.ValueScopeName=Bn.Scope=Bn.varKinds=Bn.UsedValueState=void 0;var Zn=ap(),C2=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ah;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ah||(Bn.UsedValueState=Ah={}));Bn.varKinds={const:new Zn.Name("const"),let:new Zn.Name("let"),var:new Zn.Name("var")};var jh=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof Zn.Name?t:this.name(t)}name(t){return new Zn.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,o;if(!((o=(n=this._parent)===null||n===void 0?void 0:n._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}}};Bn.Scope=jh;var Nh=class extends Zn.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:o}){this.value=t,this.scopePath=(0,Zn._)`.${new Zn.Name(n)}[${o}]`}};Bn.ValueScopeName=Nh;var Yq=(0,Zn._)`\n`,I2=class extends jh{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?Yq:Zn.nil}}get(){return this._scope}name(t){return new Nh(t,this._newName(t))}value(t,n){var o;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,a=(o=n.key)!==null&&o!==void 0?o:n.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,r);let l=this._scope[i]||(this._scope[i]=[]),c=l.length;return l[c]=n.ref,r.setValue(n,{property:i,itemIndex:c}),r}getValue(t,n){let o=this._values[t];if(o)return o.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,Zn._)`${t}${o.scopePath}`})}scopeCode(t=this._values,n,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,o)}_reduceValues(t,n,o={},r){let i=Zn.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,Ah.Started);let u=n(c);if(u){let p=this.opts.es5?Bn.varKinds.var:Bn.varKinds.const;i=(0,Zn._)`${i}${p} ${c} = ${u};${this.opts._n}`}else if(u=r?.(c))i=(0,Zn._)`${i}${u}${this.opts._n}`;else throw new C2(c);l.set(c,Ah.Completed)})}return i}};Bn.ValueScope=I2});var ue=V(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.or=me.and=me.not=me.CodeGen=me.operators=me.varKinds=me.ValueScopeName=me.ValueScope=me.Scope=me.Name=me.regexpCode=me.stringify=me.getProperty=me.nil=me.strConcat=me.str=me._=void 0;var $e=ap(),Qr=R2(),Hi=ap();Object.defineProperty(me,"_",{enumerable:!0,get:function(){return Hi._}});Object.defineProperty(me,"str",{enumerable:!0,get:function(){return Hi.str}});Object.defineProperty(me,"strConcat",{enumerable:!0,get:function(){return Hi.strConcat}});Object.defineProperty(me,"nil",{enumerable:!0,get:function(){return Hi.nil}});Object.defineProperty(me,"getProperty",{enumerable:!0,get:function(){return Hi.getProperty}});Object.defineProperty(me,"stringify",{enumerable:!0,get:function(){return Hi.stringify}});Object.defineProperty(me,"regexpCode",{enumerable:!0,get:function(){return Hi.regexpCode}});Object.defineProperty(me,"Name",{enumerable:!0,get:function(){return Hi.Name}});var Lh=R2();Object.defineProperty(me,"Scope",{enumerable:!0,get:function(){return Lh.Scope}});Object.defineProperty(me,"ValueScope",{enumerable:!0,get:function(){return Lh.ValueScope}});Object.defineProperty(me,"ValueScopeName",{enumerable:!0,get:function(){return Lh.ValueScopeName}});Object.defineProperty(me,"varKinds",{enumerable:!0,get:function(){return Lh.varKinds}});me.operators={GT:new $e._Code(">"),GTE:new $e._Code(">="),LT:new $e._Code("<"),LTE:new $e._Code("<="),EQ:new $e._Code("==="),NEQ:new $e._Code("!=="),NOT:new $e._Code("!"),OR:new $e._Code("||"),AND:new $e._Code("&&"),ADD:new $e._Code("+")};var Ho=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},O2=class extends Ho{constructor(t,n,o){super(),this.varKind=t,this.name=n,this.rhs=o}render({es5:t,_n:n}){let o=t?Qr.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=Zl(this.rhs,t,n)),this}get names(){return this.rhs instanceof $e._CodeOrName?this.rhs.names:{}}},Dh=class extends Ho{constructor(t,n,o){super(),this.lhs=t,this.rhs=n,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof $e.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=Zl(this.rhs,t,n),this}get names(){let t=this.lhs instanceof $e.Name?{}:{...this.lhs.names};return Uh(t,this.rhs)}},M2=class extends Dh{constructor(t,n,o,r){super(t,o,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},A2=class extends Ho{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},j2=class extends Ho{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},N2=class extends Ho{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},D2=class extends Ho{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=Zl(this.code,t,n),this}get names(){return this.code instanceof $e._CodeOrName?this.code.names:{}}},sp=class extends Ho{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,o)=>n+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let o=t[n].optimizeNodes();Array.isArray(o)?t.splice(n,1,...o):o?t[n]=o:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,n)||(Xq(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>Es(t,n.names),{})}},Vo=class extends sp{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},P2=class extends sp{},ql=class extends Vo{};ql.kind="else";var ks=class e extends Vo{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let o=n.optimizeNodes();n=this.else=Array.isArray(o)?new ql(o):o}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(mI(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=Zl(this.condition,t,n),this}get names(){let t=super.names;return Uh(t,this.condition),this.else&&Es(t,this.else.names),t}};ks.kind="if";var ws=class extends Vo{};ws.kind="for";var U2=class extends ws{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=Zl(this.iteration,t,n),this}get names(){return Es(super.names,this.iteration.names)}},L2=class extends ws{constructor(t,n,o,r){super(),this.varKind=t,this.name=n,this.from=o,this.to=r}render(t){let n=t.es5?Qr.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${n} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=Uh(super.names,this.from);return Uh(t,this.to)}},Ph=class extends ws{constructor(t,n,o,r){super(),this.loop=t,this.varKind=n,this.name=o,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=Zl(this.iterable,t,n),this}get names(){return Es(super.names,this.iterable.names)}},lp=class extends Vo{constructor(t,n,o){super(),this.name=t,this.args=n,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};lp.kind="func";var cp=class extends sp{render(t){return"return "+super.render(t)}};cp.kind="return";var H2=class extends Vo{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var o,r;return super.optimizeNames(t,n),(o=this.catch)===null||o===void 0||o.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&Es(t,this.catch.names),this.finally&&Es(t,this.finally.names),t}},up=class extends Vo{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};up.kind="catch";var dp=class extends Vo{render(t){return"finally"+super.render(t)}};dp.kind="finally";var V2=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
66
66
|
`:""},this._extScope=t,this._scope=new Qr.Scope({parent:t}),this._nodes=[new P2]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,n){let o=this._extScope.value(t,n);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,n){return this._extScope.getValue(t,n)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,n,o,r){let i=this._scope.toName(n);return o!==void 0&&r&&(this._constants[i.str]=o),this._leafNode(new O2(t,i,o)),i}const(t,n,o){return this._def(Qr.varKinds.const,t,n,o)}let(t,n,o){return this._def(Qr.varKinds.let,t,n,o)}var(t,n,o){return this._def(Qr.varKinds.var,t,n,o)}assign(t,n,o){return this._leafNode(new Dh(t,n,o))}add(t,n){return this._leafNode(new M2(t,me.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==$e.nil&&this._leafNode(new D2(t)),this}object(...t){let n=["{"];for(let[o,r]of t)n.length>1&&n.push(","),n.push(o),(o!==r||this.opts.es5)&&(n.push(":"),(0,$e.addCodeArg)(n,r));return n.push("}"),new $e._Code(n)}if(t,n,o){if(this._blockNode(new ks(t)),n&&o)this.code(n).else().code(o).endIf();else if(n)this.code(n).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new ks(t))}else(){return this._elseNode(new ql)}endIf(){return this._endBlockNode(ks,ql)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new U2(t),n)}forRange(t,n,o,r,i=this.opts.es5?Qr.varKinds.var:Qr.varKinds.let){let a=this._scope.toName(t);return this._for(new L2(i,a,n,o),()=>r(a))}forOf(t,n,o,r=Qr.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=n instanceof $e.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,$e._)`${a}.length`,s=>{this.var(i,(0,$e._)`${a}[${s}]`),o(i)})}return this._for(new Ph("of",r,i,n),()=>o(i))}forIn(t,n,o,r=this.opts.es5?Qr.varKinds.var:Qr.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,$e._)`Object.keys(${n})`,o);let i=this._scope.toName(t);return this._for(new Ph("in",r,i,n),()=>o(i))}endFor(){return this._endBlockNode(ws)}label(t){return this._leafNode(new A2(t))}break(t){return this._leafNode(new j2(t))}return(t){let n=new cp;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(cp)}try(t,n,o){if(!n&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new H2;if(this._blockNode(r),this.code(t),n){let i=this.name("e");this._currNode=r.catch=new up(i),n(i)}return o&&(this._currNode=r.finally=new dp,this.code(o)),this._endBlockNode(up,dp)}throw(t){return this._leafNode(new N2(t))}block(t,n){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(n),this}endBlock(t){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-n;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=$e.nil,o,r){return this._blockNode(new lp(t,n,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(lp)}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,n){let o=this._currNode;if(o instanceof t||n&&o instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${t.kind}/${n.kind}`:t.kind}"`)}_elseNode(t){let n=this._currNode;if(!(n instanceof ks))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let n=this._nodes;n[n.length-1]=t}};me.CodeGen=V2;function Es(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function Uh(e,t){return t instanceof $e._CodeOrName?Es(e,t.names):e}function Zl(e,t,n){if(e instanceof $e.Name)return o(e);if(!r(e))return e;return new $e._Code(e._items.reduce((i,a)=>(a instanceof $e.Name&&(a=o(a)),a instanceof $e._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=n[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function r(i){return i instanceof $e._Code&&i._items.some(a=>a instanceof $e.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function Xq(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function mI(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,$e._)`!${q2(e)}`}me.not=mI;var Qq=gI(me.operators.AND);function eZ(...e){return e.reduce(Qq)}me.and=eZ;var tZ=gI(me.operators.OR);function nZ(...e){return e.reduce(tZ)}me.or=nZ;function gI(e){return(t,n)=>t===$e.nil?n:n===$e.nil?t:(0,$e._)`${q2(t)} ${e} ${q2(n)}`}function q2(e){return e instanceof $e.Name?e:(0,$e._)`(${e})`}});var we=V(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.checkStrictMode=ge.getErrorPath=ge.Type=ge.useFunc=ge.setEvaluated=ge.evaluatedPropsToName=ge.mergeEvaluated=ge.eachItem=ge.unescapeJsonPointer=ge.escapeJsonPointer=ge.escapeFragment=ge.unescapeFragment=ge.schemaRefOrVal=ge.schemaHasRulesButRef=ge.schemaHasRules=ge.checkUnknownRules=ge.alwaysValidSchema=ge.toHash=void 0;var Qe=ue(),rZ=ap();function oZ(e){let t={};for(let n of e)t[n]=!0;return t}ge.toHash=oZ;function iZ(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(vI(e,t),!$I(t,e.self.RULES.all))}ge.alwaysValidSchema=iZ;function vI(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=o.RULES.keywords;for(let i in t)r[i]||_I(e,`unknown keyword: "${i}"`)}ge.checkUnknownRules=vI;function $I(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ge.schemaHasRules=$I;function aZ(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ge.schemaHasRulesButRef=aZ;function sZ({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Qe._)`${n}`}return(0,Qe._)`${e}${t}${(0,Qe.getProperty)(o)}`}ge.schemaRefOrVal=sZ;function lZ(e){return bI(decodeURIComponent(e))}ge.unescapeFragment=lZ;function cZ(e){return encodeURIComponent(B2(e))}ge.escapeFragment=cZ;function B2(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ge.escapeJsonPointer=B2;function bI(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ge.unescapeJsonPointer=bI;function uZ(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ge.eachItem=uZ;function hI({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let l=a===void 0?i:a instanceof Qe.Name?(i instanceof Qe.Name?e(r,i,a):t(r,i,a),a):i instanceof Qe.Name?(t(r,a,i),i):n(i,a);return s===Qe.Name&&!(l instanceof Qe.Name)?o(r,l):l}}ge.mergeEvaluated={props:hI({mergeNames:(e,t,n)=>e.if((0,Qe._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Qe._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Qe._)`${n} || {}`).code((0,Qe._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Qe._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Qe._)`${n} || {}`),G2(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:xI}),items:hI({mergeNames:(e,t,n)=>e.if((0,Qe._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Qe._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Qe._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Qe._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function xI(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,Qe._)`{}`);return t!==void 0&&G2(e,n,t),n}ge.evaluatedPropsToName=xI;function G2(e,t,n){Object.keys(n).forEach(o=>e.assign((0,Qe._)`${t}${(0,Qe.getProperty)(o)}`,!0))}ge.setEvaluated=G2;var yI={};function dZ(e,t){return e.scopeValue("func",{ref:t,code:yI[t.code]||(yI[t.code]=new rZ._Code(t.code))})}ge.useFunc=dZ;var Z2;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Z2||(ge.Type=Z2={}));function pZ(e,t,n){if(e instanceof Qe.Name){let o=t===Z2.Num;return n?o?(0,Qe._)`"[" + ${e} + "]"`:(0,Qe._)`"['" + ${e} + "']"`:o?(0,Qe._)`"/" + ${e}`:(0,Qe._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Qe.getProperty)(e).toString():"/"+B2(e)}ge.getErrorPath=pZ;function _I(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ge.checkStrictMode=_I});var qo=V(F2=>{"use strict";Object.defineProperty(F2,"__esModule",{value:!0});var bn=ue(),fZ={data:new bn.Name("data"),valCxt:new bn.Name("valCxt"),instancePath:new bn.Name("instancePath"),parentData:new bn.Name("parentData"),parentDataProperty:new bn.Name("parentDataProperty"),rootData:new bn.Name("rootData"),dynamicAnchors:new bn.Name("dynamicAnchors"),vErrors:new bn.Name("vErrors"),errors:new bn.Name("errors"),this:new bn.Name("this"),self:new bn.Name("self"),scope:new bn.Name("scope"),json:new bn.Name("json"),jsonPos:new bn.Name("jsonPos"),jsonLen:new bn.Name("jsonLen"),jsonPart:new bn.Name("jsonPart")};F2.default=fZ});var pp=V(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.extendErrors=xn.resetErrorsCount=xn.reportExtraError=xn.reportError=xn.keyword$DataError=xn.keywordError=void 0;var Ee=ue(),Hh=we(),In=qo();xn.keywordError={message:({keyword:e})=>(0,Ee.str)`must pass "${e}" keyword validation`};xn.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,Ee.str)`"${e}" keyword must be ${t} ($data)`:(0,Ee.str)`"${e}" keyword is invalid ($data)`};function mZ(e,t=xn.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,l=wI(e,t,n);o??(a||s)?SI(i,l):kI(r,(0,Ee._)`[${l}]`)}xn.reportError=mZ;function gZ(e,t=xn.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=wI(e,t,n);SI(r,s),i||a||kI(o,In.default.vErrors)}xn.reportExtraError=gZ;function hZ(e,t){e.assign(In.default.errors,t),e.if((0,Ee._)`${In.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,Ee._)`${In.default.vErrors}.length`,t),()=>e.assign(In.default.vErrors,null)))}xn.resetErrorsCount=hZ;function yZ({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,In.default.errors,s=>{e.const(a,(0,Ee._)`${In.default.vErrors}[${s}]`),e.if((0,Ee._)`${a}.instancePath === undefined`,()=>e.assign((0,Ee._)`${a}.instancePath`,(0,Ee.strConcat)(In.default.instancePath,i.errorPath))),e.assign((0,Ee._)`${a}.schemaPath`,(0,Ee.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,Ee._)`${a}.schema`,n),e.assign((0,Ee._)`${a}.data`,o))})}xn.extendErrors=yZ;function SI(e,t){let n=e.const("err",t);e.if((0,Ee._)`${In.default.vErrors} === null`,()=>e.assign(In.default.vErrors,(0,Ee._)`[${n}]`),(0,Ee._)`${In.default.vErrors}.push(${n})`),e.code((0,Ee._)`${In.default.errors}++`)}function kI(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;r.$async?n.throw((0,Ee._)`new ${e.ValidationError}(${t})`):(n.assign((0,Ee._)`${o}.errors`,t),n.return(!1))}var zs={keyword:new Ee.Name("keyword"),schemaPath:new Ee.Name("schemaPath"),params:new Ee.Name("params"),propertyName:new Ee.Name("propertyName"),message:new Ee.Name("message"),schema:new Ee.Name("schema"),parentSchema:new Ee.Name("parentSchema")};function wI(e,t,n){let{createErrors:o}=e.it;return o===!1?(0,Ee._)`{}`:vZ(e,t,n)}function vZ(e,t,n={}){let{gen:o,it:r}=e,i=[$Z(r,n),bZ(e,n)];return xZ(e,t,i),o.object(...i)}function $Z({errorPath:e},{instancePath:t}){let n=t?(0,Ee.str)`${e}${(0,Hh.getErrorPath)(t,Hh.Type.Str)}`:e;return[In.default.instancePath,(0,Ee.strConcat)(In.default.instancePath,n)]}function bZ({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:(0,Ee.str)`${t}/${e}`;return n&&(r=(0,Ee.str)`${r}${(0,Hh.getErrorPath)(n,Hh.Type.Str)}`),[zs.schemaPath,r]}function xZ(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:p}=s;o.push([zs.keyword,r],[zs.params,typeof t=="function"?t(e):t||(0,Ee._)`{}`]),l.messages&&o.push([zs.message,typeof n=="function"?n(e):n]),l.verbose&&o.push([zs.schema,a],[zs.parentSchema,(0,Ee._)`${u}${p}`],[In.default.data,i]),c&&o.push([zs.propertyName,c])}});var zI=V(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.boolOrEmptySchema=Bl.topBoolOrEmptySchema=void 0;var _Z=pp(),SZ=ue(),kZ=qo(),wZ={message:"boolean schema is false"};function EZ(e){let{gen:t,schema:n,validateName:o}=e;n===!1?EI(e,!1):typeof n=="object"&&n.$async===!0?t.return(kZ.default.data):(t.assign((0,SZ._)`${o}.errors`,null),t.return(!0))}Bl.topBoolOrEmptySchema=EZ;function zZ(e,t){let{gen:n,schema:o}=e;o===!1?(n.var(t,!1),EI(e)):n.var(t,!0)}Bl.boolOrEmptySchema=zZ;function EI(e,t){let{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,_Z.reportError)(r,wZ,void 0,t)}});var K2=V(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.getRules=Gl.isJSONType=void 0;var TZ=["string","number","integer","boolean","null","object","array"],CZ=new Set(TZ);function IZ(e){return typeof e=="string"&&CZ.has(e)}Gl.isJSONType=IZ;function RZ(){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:{}}}Gl.getRules=RZ});var J2=V(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.shouldUseRule=Vi.shouldUseGroup=Vi.schemaHasRulesForType=void 0;function OZ({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&TI(e,o)}Vi.schemaHasRulesForType=OZ;function TI(e,t){return t.rules.some(n=>CI(e,n))}Vi.shouldUseGroup=TI;function CI(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(o=>e[o]!==void 0))}Vi.shouldUseRule=CI});var fp=V(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.reportTypeError=_n.checkDataTypes=_n.checkDataType=_n.coerceAndCheckDataType=_n.getJSONTypes=_n.getSchemaTypes=_n.DataType=void 0;var MZ=K2(),AZ=J2(),jZ=pp(),le=ue(),II=we(),Fl;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Fl||(_n.DataType=Fl={}));function NZ(e){let t=RI(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}_n.getSchemaTypes=NZ;function RI(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(MZ.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}_n.getJSONTypes=RI;function DZ(e,t){let{gen:n,data:o,opts:r}=e,i=PZ(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,AZ.schemaHasRulesForType)(e,t[0]));if(a){let s=Y2(t,o,r.strictNumbers,Fl.Wrong);n.if(s,()=>{i.length?UZ(e,t,i):X2(e)})}return a}_n.coerceAndCheckDataType=DZ;var OI=new Set(["string","number","integer","boolean","null"]);function PZ(e,t){return t?e.filter(n=>OI.has(n)||t==="array"&&n==="array"):[]}function UZ(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",(0,le._)`typeof ${r}`),s=o.let("coerced",(0,le._)`undefined`);i.coerceTypes==="array"&&o.if((0,le._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,le._)`${r}[0]`).assign(a,(0,le._)`typeof ${r}`).if(Y2(t,r,i.strictNumbers),()=>o.assign(s,r))),o.if((0,le._)`${s} !== undefined`);for(let c of n)(OI.has(c)||c==="array"&&i.coerceTypes==="array")&&l(c);o.else(),X2(e),o.endIf(),o.if((0,le._)`${s} !== undefined`,()=>{o.assign(r,s),LZ(e,s)});function l(c){switch(c){case"string":o.elseIf((0,le._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,le._)`"" + ${r}`).elseIf((0,le._)`${r} === null`).assign(s,(0,le._)`""`);return;case"number":o.elseIf((0,le._)`${a} == "boolean" || ${r} === null
|
|
67
67
|
|| (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,le._)`+${r}`);return;case"integer":o.elseIf((0,le._)`${a} === "boolean" || ${r} === null
|
|
68
68
|
|| (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,le._)`+${r}`);return;case"boolean":o.elseIf((0,le._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,le._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":o.elseIf((0,le._)`${r} === "" || ${r} === 0 || ${r} === false`),o.assign(s,null);return;case"array":o.elseIf((0,le._)`${a} === "string" || ${a} === "number"
|
|
@@ -180,7 +180,7 @@ ${c}`,()=>{s?.remove()}},[i,t,n]),(0,KD.jsx)(Kte.Provider,{value:r,children:o})}
|
|
|
180
180
|
`),0,[]).children}),o=[])},a=()=>{r!==void 0&&(t.push({type:"list",ordered:r.ordered,start:r.start,items:r.items}),r=void 0)};for(let s=0;s<n.length;s++){let l=n[s];if(l===void 0)continue;let c=l.match(wre);if(c!==null){i(),a();let f=c[1]!==void 0&&c[1].length>0?c[1]:void 0,g=[],v=!1,b=s+1;for(;b<n.length;b++){let y=n[b];if(y!==void 0&&Ere.test(y)){v=!0;break}g.push(y??"")}t.push({type:"code-fence",code:g.join(`
|
|
181
181
|
`),lang:f,closed:v}),s=b;continue}if(l.trim().length===0){i(),a();continue}let u=l.match(zre);if(u!==null&&u[1]!==void 0){i(),a();let f=u[1].length;t.push({type:"heading",level:f,children:Tu(u[2]??"",0,[]).children});continue}let p=l.match(Cre),m=p===null?l.match(Tre):null;if(p!==null||m!==null){i();let f=p!==null,g=(f?p[2]:m?.[1])??"";r!==void 0&&r.ordered!==f&&a(),r===void 0&&(r={ordered:f,start:f&&p[1]!==void 0?parseInt(p[1],10):void 0,items:[]}),r.items.push({children:Tu(g,0,[]).children});continue}a(),o.push(l)}return i(),a(),t}var $re,kre,wre,Ere,zre,Tre,Cre,G9=_(()=>{"use strict";$re=/^(?:https?:\/\/|mailto:)[^\s\x00-\x1f]+$/i;kre=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");wre=/^```+\s*(\S*)\s*$/,Ere=/^```+\s*$/,zre=/^(#{1,6})\s+(.*)$/,Tre=/^\s*[-*+]\s+(.*)$/,Cre=/^\s*(\d{1,9})[.)]\s+(.*)$/});var F9=_(()=>{"use strict";G9()});function Ei(e){return e.map((t,n)=>{switch(t.type){case"text":return t.text;case"break":return(0,tn.jsx)("br",{},n);case"strong":return(0,tn.jsx)("strong",{children:Ei(t.children)},n);case"em":return(0,tn.jsx)("em",{children:Ei(t.children)},n);case"code":return(0,tn.jsx)("code",{style:Ire,children:t.code},n);case"link":{let o=Ei(t.children);return t.href!==void 0?(0,tn.jsx)(_u,{href:t.href,external:!0,children:o},n):(0,tn.jsx)("span",{style:Ore,children:o},n)}}})}function Mre(e,t){switch(e.type){case"paragraph":return(0,tn.jsx)(Je,{children:Ei(e.children)},t);case"heading":return(0,tn.jsx)(Nn,{level:e.level,children:Ei(e.children)},t);case"code-fence":return(0,tn.jsx)("pre",{style:Rre,"data-lang":e.lang,children:(0,tn.jsx)("code",{children:e.code})},t);case"list":{let n=e.items.map((o,r)=>(0,tn.jsx)("li",{children:Ei(o.children)},r));return e.ordered?(0,tn.jsx)("ol",{start:e.start,style:K9,children:n},t):(0,tn.jsx)("ul",{style:K9,children:n},t)}}}function J9({markdown:e,className:t,style:n}){let o=JE(e);return(0,tn.jsx)("div",{className:t,"data-ggui-markdown":"",style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-sm, 12px)",...n},children:o.map(Mre)})}function dm({markdown:e}){return(0,tn.jsx)(tn.Fragment,{children:Ei(KE(e))})}var tn,Ire,Rre,Ore,K9,WE=_(()=>{"use strict";tn=O(G(),1);F9();am();yu();Hv();Ire={fontFamily:"var(--ggui-font-family-mono, ui-monospace, monospace)",fontSize:"0.9em",background:"var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))",borderRadius:"var(--ggui-radius-sm, 4px)",padding:"0.1em 0.35em"},Rre={fontFamily:"var(--ggui-font-family-mono, ui-monospace, monospace)",fontSize:"var(--ggui-font-size-sm, 14px)",background:"var(--ggui-color-surface-sunken, rgba(0,0,0,0.06))",borderRadius:"var(--ggui-radius-md, 8px)",padding:"var(--ggui-spacing-sm, 12px)",overflowX:"auto",whiteSpace:"pre",margin:0},Ore={color:"var(--ggui-color-primary, #4f46e5)",textDecoration:"none"},K9={margin:0,paddingInlineStart:"var(--ggui-spacing-lg, 24px)"}});var W9={};bt(W9,{Autocomplete:()=>R9,Breadcrumb:()=>A9,Dropdown:()=>C9,EmptyState:()=>P9,FormField:()=>w9,Markdown:()=>J9,MarkdownInline:()=>dm,MenuItem:()=>Fv,Pagination:()=>N9,SearchField:()=>S9,Stat:()=>L9,Stepper:()=>V9,Tag:()=>z9,renderRichTextInlines:()=>Ei});var YE=_(()=>{"use strict";k9();E9();GE();T9();I9();O9();j9();D9();U9();H9();q9();WE();WE()});function Y9({logo:e,navigation:t,actions:n,sticky:o=!1,background:r,bordered:i=!0,style:a,className:s}){return(0,Cu.jsxs)("header",{className:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:r||z.white,borderBottom:i?`1px solid ${z.gray[200]}`:void 0,...o&&{position:"sticky",top:0,zIndex:Ot.sticky,boxShadow:Vt.sm},...a},children:[e&&(0,Cu.jsx)("div",{style:{flexShrink:0},children:e}),t&&(0,Cu.jsx)("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:t}),n&&(0,Cu.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:n})]})}var Cu,X9=_(()=>{"use strict";Cu=O(G(),1);mt();Xt()});function e7({item:e,activeId:t,onItemClick:n,collapsed:o,depth:r=0}){let[i,a]=(0,Q9.useState)(!1),s=e.children&&e.children.length>0,l=t===e.id;return(0,Zt.jsxs)("div",{children:[(0,Zt.jsxs)("button",{onClick:()=>{s&&!o&&a(!i),n?.(e)},disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:o?"10px":"10px 12px",paddingLeft:o?"10px":`${12+r*16}px`,border:"none",borderRadius:Ke.md,backgroundColor:l?z.primary[50]:"transparent",color:e.disabled?z.gray[400]:l?z.primary[700]:z.gray[700],fontSize:q.sm,fontWeight:l?oe.medium:oe.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:o?"center":"flex-start"},children:[e.icon&&(0,Zt.jsx)("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!o&&(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)("span",{style:{flex:1},children:e.label}),e.badge&&(0,Zt.jsx)("span",{children:e.badge}),s&&(0,Zt.jsx)(_e,{name:i?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),s&&i&&!o&&(0,Zt.jsx)("div",{style:{marginTop:"4px"},children:e.children.map(u=>(0,Zt.jsx)(e7,{item:u,activeId:t,onItemClick:n,collapsed:o,depth:r+1},u.id))})]})}function t7({items:e,activeId:t,onItemClick:n,collapsed:o=!1,header:r,footer:i,width:a=256,collapsedWidth:s=64,style:l,className:c}){let u=o?s:a;return(0,Zt.jsxs)("aside",{className:c,style:{width:u,minWidth:u,height:"100%",display:"flex",flexDirection:"column",backgroundColor:z.white,borderRight:`1px solid ${z.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...l},children:[r&&(0,Zt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderBottom:`1px solid ${z.gray[200]}`},children:r}),(0,Zt.jsx)("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:(0,Zt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(p=>(0,Zt.jsx)(e7,{item:p,activeId:t,onItemClick:n,collapsed:o},p.id))})}),i&&(0,Zt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderTop:`1px solid ${z.gray[200]}`},children:i})]})}var Zt,Q9,n7=_(()=>{"use strict";Zt=O(G(),1),Q9=O(J(),1);mt();Xt();Mt();nr()});function o7({children:e,columns:t=3,gap:n=16,style:o,className:r}){return(0,r7.jsx)("div",{className:r,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))",gap:`${n}px`,...o},children:e})}var r7,i7=_(()=>{"use strict";r7=O(G(),1)});function a7({comment:e,onReply:t,onReaction:n,depth:o=0}){let[r,i]=(0,Kv.useState)(!1),[a,s]=(0,Kv.useState)(""),l=()=>{a.trim()&&(t?.(e.id,a),s(""),i(!1))},c=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,Me.jsxs)("div",{style:{marginLeft:o>0?"40px":0},children:[(0,Me.jsxs)("div",{style:{display:"flex",gap:"12px"},children:[(0,Me.jsx)(sl,{name:e.author.name,src:e.author.avatar,size:"sm"}),(0,Me.jsxs)("div",{style:{flex:1},children:[(0,Me.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Me.jsx)("span",{style:{fontWeight:500,fontSize:q.sm},children:e.author.name}),(0,Me.jsx)("span",{style:{color:z.gray[500],fontSize:q.xs},children:c})]}),(0,Me.jsx)("p",{style:{margin:"4px 0 8px",fontSize:q.sm,color:z.gray[700]},children:e.content}),(0,Me.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.reactions?.map(u=>(0,Me.jsxs)("button",{onClick:()=>n?.(e.id,u.emoji),style:{padding:"2px 8px",border:`1px solid ${z.gray[200]}`,borderRadius:"12px",backgroundColor:z.gray[50],fontSize:q.xs,cursor:"pointer"},children:[u.emoji," ",u.count]},u.emoji)),(0,Me.jsx)("button",{onClick:()=>i(!r),style:{background:"none",border:"none",color:z.gray[500],fontSize:q.xs,cursor:"pointer"},children:"Reply"})]}),r&&(0,Me.jsxs)("div",{style:{marginTop:"12px"},children:[(0,Me.jsx)(sm,{value:a,onChange:s,placeholder:"Write a reply...",rows:2}),(0,Me.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[(0,Me.jsx)(We,{size:"sm",onClick:l,children:"Reply"}),(0,Me.jsx)(We,{size:"sm",variant:"ghost",onClick:()=>i(!1),children:"Cancel"})]})]})]})]}),e.replies?.map(u=>(0,Me.jsx)("div",{style:{marginTop:"16px"},children:(0,Me.jsx)(a7,{comment:u,onReply:t,onReaction:n,depth:o+1})},u.id))]})}function s7({comments:e,currentUser:t,onAddComment:n,onReply:o,onReaction:r,loading:i,style:a,className:s}){let[l,c]=(0,Kv.useState)(""),u=()=>{l.trim()&&(n?.(l),c(""))};return(0,Me.jsxs)("div",{className:s,style:{...a},children:[t&&(0,Me.jsxs)("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[(0,Me.jsx)(sl,{name:t.name,src:t.avatar,size:"sm"}),(0,Me.jsxs)("div",{style:{flex:1},children:[(0,Me.jsx)(sm,{value:l,onChange:c,placeholder:"Write a comment...",rows:3}),(0,Me.jsx)("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:(0,Me.jsx)(We,{onClick:u,disabled:!l.trim(),children:"Comment"})})]})]}),i?(0,Me.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Me.jsx)(At,{size:24})}):(0,Me.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(p=>(0,Me.jsx)(a7,{comment:p,onReply:o,onReaction:r},p.id))})]})}var Me,Kv,l7=_(()=>{"use strict";Me=O(G(),1),Kv=O(J(),1);Dv();gi();OE();Mo();mt();Mt()});function c7({columns:e,data:t,rowKey:n="id",loading:o,emptyText:r="No data",onSort:i,sortKey:a,sortDirection:s,onRowClick:l,selectable:c,selectedKeys:u=[],onSelectionChange:p,style:m,className:f}){let g=($,x)=>typeof n=="function"?n($):String($[n]??x),v=$=>{p?.($?t.map((x,k)=>g(x,k)):[])},b=($,x)=>{p?.(x?[...u,$]:u.filter(k=>k!==$))},y=t.length>0&&u.length===t.length,h=u.length>0&&u.length<t.length;return(0,wt.jsx)("div",{className:f,style:{border:`1px solid ${z.gray[200]}`,borderRadius:"8px",overflow:"hidden",...m},children:(0,wt.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:q.sm},children:[(0,wt.jsx)("thead",{children:(0,wt.jsxs)("tr",{style:{backgroundColor:z.gray[50]},children:[c&&(0,wt.jsx)("th",{style:{width:"40px",padding:"12px"},children:(0,wt.jsx)(al,{checked:y,indeterminate:h,onChange:v})}),e.map($=>(0,wt.jsx)("th",{style:{padding:"12px 16px",textAlign:$.align||"left",fontWeight:oe.semibold,color:z.gray[700],borderBottom:`1px solid ${z.gray[200]}`,cursor:$.sortable?"pointer":void 0,width:$.width},onClick:()=>$.sortable&&i?.($.key,a===$.key&&s==="asc"?"desc":"asc"),children:(0,wt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[$.header,$.sortable&&a===$.key&&(0,wt.jsx)(_e,{name:s==="asc"?"chevron-up":"chevron-down",size:14})]})},$.key))]})}),(0,wt.jsx)("tbody",{children:o?(0,wt.jsx)("tr",{children:(0,wt.jsx)("td",{colSpan:e.length+(c?1:0),style:{padding:"48px",textAlign:"center"},children:(0,wt.jsx)(At,{size:24})})}):t.length===0?(0,wt.jsx)("tr",{children:(0,wt.jsx)("td",{colSpan:e.length+(c?1:0),style:{padding:"48px",textAlign:"center",color:z.gray[500]},children:r})}):t.map(($,x)=>{let k=g($,x),U=u.includes(k);return(0,wt.jsxs)("tr",{onClick:()=>l?.($,x),style:{backgroundColor:U?z.primary[50]:void 0,cursor:l?"pointer":void 0,transition:"background-color 0.15s"},children:[c&&(0,wt.jsx)("td",{style:{padding:"12px"},children:(0,wt.jsx)(al,{checked:U,onChange:S=>b(k,S)})}),e.map(S=>(0,wt.jsx)("td",{style:{padding:"12px 16px",textAlign:S.align||"left",color:z.gray[900],borderBottom:`1px solid ${z.gray[100]}`},children:S.render?S.render($[S.key],$,x):String($[S.key]??"")},S.key))]},k)})})]})})}var wt,u7=_(()=>{"use strict";wt=O(G(),1);ME();Mo();nr();mt();Mt()});function d7({messages:e,currentUserId:t,onSendMessage:n,loading:o,typing:r,placeholder:i="Type a message...",header:a,style:s,className:l}){let[c,u]=(0,Iu.useState)(""),p=(0,Iu.useRef)(null);(0,Iu.useEffect)(()=>{p.current?.scrollIntoView({behavior:"smooth"})},[e]);let m=()=>{c.trim()&&(n?.(c),u(""))},f=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),m())};return(0,Et.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${z.gray[200]}`,borderRadius:Ke.lg,backgroundColor:z.white,overflow:"hidden",...s},children:[a&&(0,Et.jsx)("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${z.gray[200]}`},children:a}),(0,Et.jsxs)("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[o?(0,Et.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Et.jsx)(At,{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,Et.jsxs)("div",{style:{display:"flex",flexDirection:v?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!v&&(0,Et.jsx)(sl,{name:g.sender.name,src:g.sender.avatar,size:"xs"}),(0,Et.jsxs)("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:Ke.lg,backgroundColor:v?z.primary[600]:z.gray[100],color:v?z.white:z.gray[900]},children:[(0,Et.jsx)("p",{style:{margin:0,fontSize:q.sm},children:g.content}),(0,Et.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:q.xs,opacity:.7},children:[(0,Et.jsx)("span",{children:b}),v&&g.status&&(0,Et.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)}),r&&(0,Et.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,Et.jsxs)("span",{style:{fontSize:q.xs,color:z.gray[500]},children:[r.name," is typing..."]})}),(0,Et.jsx)("div",{ref:p})]}),(0,Et.jsxs)("div",{style:{padding:"12px 16px",borderTop:`1px solid ${z.gray[200]}`,display:"flex",gap:"8px"},children:[(0,Et.jsx)("input",{type:"text",value:c,onChange:g=>u(g.target.value),onKeyDown:f,placeholder:i,style:{flex:1,padding:"10px 14px",border:`1px solid ${z.gray[300]}`,borderRadius:Ke.full,fontSize:q.sm,outline:"none"}}),(0,Et.jsx)(We,{onClick:m,disabled:!c.trim(),children:(0,Et.jsx)(_e,{name:"chevron-right",size:18})})]})]})}var Et,Iu,p7=_(()=>{"use strict";Et=O(G(),1),Iu=O(J(),1);Dv();gi();Mo();nr();mt();Xt();Mt()});function f7({items:e,activeId:t,onItemClick:n,orientation:o="horizontal",variant:r="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?oe.medium:oe.normal,color:c?z.primary[600]:z.gray[600]},pills:{borderRadius:Ke.full,backgroundColor:c?z.primary[100]:"transparent",color:c?z.primary[700]:z.gray[600],fontWeight:c?oe.medium:oe.normal},underline:{borderBottom:c?`2px solid ${z.primary[600]}`:"2px solid transparent",color:c?z.primary[600]:z.gray[600],fontWeight:c?oe.medium:oe.normal,borderRadius:0}},m=()=>{l.disabled||n?.(l)},f=(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(),m()},style:{...u,...p[r]},children:f},l.id):(0,jo.jsx)("button",{onClick:m,disabled:l.disabled,style:{...u,...p[r]},children:f},l.id)};return(0,jo.jsx)("nav",{className:a,style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",gap:o==="horizontal"?"4px":"2px",...r==="underline"&&o==="horizontal"&&{borderBottom:`1px solid ${z.gray[200]}`},...i},children:e.map(s)})}var jo,m7=_(()=>{"use strict";jo=O(G(),1);mt();Xt();Mt()});function g7(e){if(e===0)return"0 B";let t=1024,n=["B","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,o)).toFixed(1))} ${n[o]}`}function h7({files:e=[],onFilesSelected:t,onFileRemove:n,accept:o,multiple:r=!0,maxSize:i,maxFiles:a,disabled:s,dragDrop:l=!0,style:c,className:u}){let[p,m]=(0,Jv.useState)(!1),f=(0,Jv.useRef)(null),g=h=>{if(!h)return;let $=Array.from(h);a&&($=$.slice(0,a-e.length)),i&&($=$.filter(x=>x.size<=i)),t?.($)},v=h=>{h.preventDefault(),m(!1),!s&&l&&g(h.dataTransfer.files)},b=h=>{h.preventDefault(),!s&&l&&m(!0)},y=()=>{m(!1)};return(0,nn.jsxs)("div",{className:u,style:{...c},children:[(0,nn.jsxs)("div",{onClick:()=>!s&&f.current?.click(),onDrop:v,onDragOver:b,onDragLeave:y,style:{border:`2px dashed ${p?z.primary[400]:z.gray[300]}`,borderRadius:Ke.lg,padding:"32px",textAlign:"center",backgroundColor:p?z.primary[50]:z.gray[50],cursor:s?"not-allowed":"pointer",transition:"all 0.2s",opacity:s?.5:1},children:[(0,nn.jsx)("input",{ref:f,type:"file",accept:o,multiple:r,onChange:h=>g(h.target.files),disabled:s,style:{display:"none"}}),(0,nn.jsx)(_e,{name:"plus",size:32,tone:"subtle"}),(0,nn.jsx)("p",{style:{margin:"12px 0 4px",color:z.gray[700],fontSize:q.sm},children:l?"Drag and drop files here, or click to browse":"Click to browse files"}),(0,nn.jsxs)("p",{style:{margin:0,color:z.gray[500],fontSize:q.xs},children:[o&&`Accepted: ${o}`,i&&` \u2022 Max size: ${g7(i)}`,a&&` \u2022 Max files: ${a}`]})]}),e.length>0&&(0,nn.jsx)("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map(h=>(0,nn.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${z.gray[200]}`,borderRadius:Ke.md,backgroundColor:z.white},children:[(0,nn.jsx)(_e,{name:"menu",size:20,tone:"subtle"}),(0,nn.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,nn.jsx)("p",{style:{margin:0,fontSize:q.sm,color:z.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h.name}),(0,nn.jsxs)("p",{style:{margin:"2px 0 0",fontSize:q.xs,color:z.gray[500]},children:[g7(h.size),h.error&&(0,nn.jsx)("span",{style:{color:z.error[500],marginLeft:"8px"},children:h.error})]}),h.status==="uploading"&&h.progress!==void 0&&(0,nn.jsx)(Pv,{value:h.progress,size:"sm",style:{marginTop:"8px"}})]}),(0,nn.jsx)(We,{variant:"ghost",size:"sm",onClick:()=>n?.(h.id),children:(0,nn.jsx)(_e,{name:"x",size:16})})]},h.id))})]})}var nn,Jv,y7=_(()=>{"use strict";nn=O(G(),1),Jv=O(J(),1);gi();NE();nr();mt();Xt();Mt()});function jre({notification:e,onMarkAsRead:t,onDismiss:n}){let o=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,r=Are[e.type||"info"];return(0,Ye.jsxs)("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":z.primary[50],borderRadius:Ke.md,transition:"background-color 0.15s"},children:[(0,Ye.jsx)("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":r,flexShrink:0,marginTop:"6px"}}),(0,Ye.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,Ye.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[(0,Ye.jsx)("p",{style:{margin:0,fontWeight:oe.medium,color:z.gray[900],fontSize:q.sm},children:e.title}),(0,Ye.jsx)("button",{onClick:()=>n?.(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:z.gray[400],flexShrink:0},children:(0,Ye.jsx)(_e,{name:"x",size:14})})]}),e.message&&(0,Ye.jsx)("p",{style:{margin:"4px 0 0",color:z.gray[600],fontSize:q.xs},children:e.message}),(0,Ye.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[(0,Ye.jsx)("span",{style:{color:z.gray[400],fontSize:q.xs},children:o}),!e.read&&(0,Ye.jsx)("button",{onClick:()=>t?.(e.id),style:{background:"none",border:"none",padding:0,color:z.primary[600],fontSize:q.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&(0,Ye.jsx)("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:z.primary[600],fontSize:q.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function v7({notifications:e,onMarkAsRead:t,onMarkAllAsRead:n,onDismiss:o,onClearAll:r,emptyText:i="No notifications",loading:a,style:s,className:l}){let c=e.filter(u=>!u.read).length;return(0,Ye.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",...s},children:[(0,Ye.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${z.gray[200]}`},children:[(0,Ye.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,Ye.jsx)("span",{style:{fontWeight:oe.semibold,color:z.gray[900]},children:"Notifications"}),c>0&&(0,Ye.jsx)("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:z.primary[100],color:z.primary[700],fontSize:q.xs,fontWeight:oe.medium},children:c})]}),(0,Ye.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[c>0&&(0,Ye.jsx)(We,{variant:"ghost",size:"sm",onClick:n,children:"Mark all read"}),e.length>0&&(0,Ye.jsx)(We,{variant:"ghost",size:"sm",onClick:r,children:"Clear all"})]})]}),(0,Ye.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,Ye.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,Ye.jsx)(At,{size:24})}):e.length===0?(0,Ye.jsx)("div",{style:{textAlign:"center",padding:"32px",color:z.gray[500]},children:i}):(0,Ye.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(u=>(0,Ye.jsx)(jre,{notification:u,onMarkAsRead:t,onDismiss:o},u.id))})})]})}var Ye,Are,$7=_(()=>{"use strict";Ye=O(G(),1);gi();Mo();nr();mt();Xt();Mt();Are={info:z.info[500],success:z.success[500],warning:z.warning[500],error:z.error[500]}});function b7({open:e,onClose:t,title:n,children:o,footer:r,size:i="md",closeOnOverlayClick:a=!0,closeOnEscape:s=!0,showCloseButton:l=!0,style:c,className:u}){let p=(0,Wv.useCallback)(g=>{g.key==="Escape"&&s&&t()},[s,t]);if((0,Wv.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 m=g=>{g.target===g.currentTarget&&a&&t()},f=i==="full";return(0,po.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:Ot.modal,display:"flex",alignItems:f?"stretch":"center",justifyContent:"center",padding:f?0:"24px"},children:[(0,po.jsx)("div",{onClick:m,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:Ha.fadeIn}}),(0,po.jsxs)("div",{role:"dialog","aria-modal":"true",className:u,style:{position:"relative",width:Nre[i],maxWidth:f?"100%":"calc(100vw - 48px)",maxHeight:f?"100%":"calc(100vh - 48px)",backgroundColor:z.white,borderRadius:f?0:Ke.xl,boxShadow:Vt["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:Ha.scaleIn,...c},children:[(n||l)&&(0,po.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${z.gray[200]}`},children:[n&&(0,po.jsx)(Nn,{level:4,children:n}),l&&(0,po.jsx)(We,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close modal",style:{marginLeft:"auto"},children:(0,po.jsx)(_e,{name:"x",size:20})})]}),(0,po.jsx)("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:o}),r&&(0,po.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${z.gray[200]}`},children:r})]})]})}var po,Wv,Nre,x7=_(()=>{"use strict";po=O(G(),1),Wv=O(J(),1);gi();nr();am();mt();Xt();ku();Nre={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"}});function _7({open:e,onClose:t,commands:n,onSelect:o,placeholder:r="Search commands...",recentIds:i=[],loading:a,style:s,className:l}){let[c,u]=(0,Zr.useState)(""),[p,m]=(0,Zr.useState)(0),f=(0,Zr.useMemo)(()=>{let y=c?n.filter($=>$.label.toLowerCase().includes(c.toLowerCase())||$.description?.toLowerCase().includes(c.toLowerCase())):n,h=new Map;if(!c&&i.length>0){let $=i.map(x=>n.find(k=>k.id===x)).filter(Boolean);$.length>0&&h.set("Recent",$)}return y.forEach($=>{let x=$.group||"Commands";h.has(x)||h.set(x,[]),!(!c&&i.includes($.id)&&h.has("Recent"))&&h.get(x).push($)}),h},[n,c,i]),g=(0,Zr.useMemo)(()=>{let y=[];return f.forEach(h=>y.push(...h)),y},[f]);(0,Zr.useEffect)(()=>{m(0)},[c]),(0,Zr.useEffect)(()=>{e&&(u(""),m(0))},[e]);let v=(0,Zr.useCallback)(y=>{if(y.key==="Escape"){t();return}if(y.key==="ArrowDown")y.preventDefault(),m(h=>Math.min(h+1,g.length-1));else if(y.key==="ArrowUp")y.preventDefault(),m(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,Zr.useEffect)(()=>{if(e)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[e,v]),!e)return null;let b=0;return(0,ut.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:Ot.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[(0,ut.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,ut.jsxs)("div",{role:"dialog",className:l,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:z.white,borderRadius:Ke.xl,boxShadow:Vt["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...s},children:[(0,ut.jsx)("div",{style:{padding:"12px",borderBottom:`1px solid ${z.gray[200]}`},children:(0,ut.jsxs)("div",{style:{position:"relative"},children:[(0,ut.jsx)(_e,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),(0,ut.jsx)("input",{type:"text",value:c,onChange:y=>u(y.target.value),placeholder:r,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:q.base,outline:"none",backgroundColor:"transparent"}})]})}),(0,ut.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,ut.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,ut.jsx)(At,{size:24})}):g.length===0?(0,ut.jsx)("div",{style:{textAlign:"center",padding:"32px",color:z.gray[500]},children:"No commands found"}):Array.from(f.entries()).map(([y,h])=>(0,ut.jsxs)("div",{style:{marginBottom:"8px"},children:[(0,ut.jsx)("div",{style:{padding:"8px 12px",fontSize:q.xs,fontWeight:oe.semibold,color:z.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:y}),h.map($=>{let k=b++===p;return(0,ut.jsxs)("button",{onClick:()=>{$.disabled||(o($),t())},disabled:$.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:Ke.md,backgroundColor:k?z.gray[100]:"transparent",color:$.disabled?z.gray[400]:z.gray[900],textAlign:"left",cursor:$.disabled?"not-allowed":"pointer"},children:[$.icon&&(0,ut.jsx)("span",{style:{display:"flex",color:z.gray[500]},children:$.icon}),(0,ut.jsxs)("div",{style:{flex:1},children:[(0,ut.jsx)("div",{style:{fontSize:q.sm},children:$.label}),$.description&&(0,ut.jsx)("div",{style:{fontSize:q.xs,color:z.gray[500]},children:$.description})]}),$.shortcut&&(0,ut.jsx)("kbd",{style:{padding:"2px 6px",backgroundColor:z.gray[100],borderRadius:Ke.sm,fontSize:q.xs,color:z.gray[500],fontFamily:"inherit"},children:$.shortcut})]},$.id)})]},y))}),(0,ut.jsxs)("div",{style:{padding:"8px 12px",borderTop:`1px solid ${z.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:q.xs,color:z.gray[500]},children:[(0,ut.jsx)("span",{children:"\u2191\u2193 Navigate"}),(0,ut.jsx)("span",{children:"\u21B5 Select"}),(0,ut.jsx)("span",{children:"Esc Close"})]})]})]})}var ut,Zr,S7=_(()=>{"use strict";ut=O(G(),1),Zr=O(J(),1);Mo();nr();mt();Xt();Mt()});function k7({brand:e,columns:t,socialLinks:n,bottomText:o,bottomLinks:r,background:i,bordered:a=!0,style:s,className:l}){return(0,Pn.jsxs)("footer",{className:l,role:"contentinfo",style:{backgroundColor:i||z.gray[50],borderTop:a?`1px solid ${z.gray[200]}`:void 0,...s},children:[(0,Pn.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&(0,Pn.jsx)("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),t?.map((c,u)=>(0,Pn.jsxs)("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[c.title&&(0,Pn.jsx)("h4",{style:{fontSize:q.sm,fontWeight:oe.semibold,color:z.gray[900],lineHeight:qt.normal,margin:"0 0 16px 0",padding:0},children:c.title}),(0,Pn.jsx)("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:c.links.map((p,m)=>(0,Pn.jsx)("li",{children:(0,Pn.jsx)("a",{href:p.href,onClick:p.onClick?f=>{f.preventDefault(),p.onClick?.()}:void 0,style:{fontSize:q.sm,color:z.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:qt.normal},"aria-label":p.label,children:p.label})},m))})]},u))]}),(o||r||n)&&(0,Pn.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 ${z.gray[200]}`},children:[o&&(0,Pn.jsx)("span",{style:{fontSize:q.sm,color:z.gray[500],lineHeight:qt.normal},children:o}),(0,Pn.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[n?.map((c,u)=>(0,Pn.jsx)("a",{href:c.href,"aria-label":c.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:z.gray[500],transition:"color 0.15s"},children:c.icon},u)),r?.map((c,u)=>(0,Pn.jsx)("a",{href:c.href,onClick:c.onClick?p=>{p.preventDefault(),c.onClick?.()}:void 0,style:{fontSize:q.sm,color:z.gray[500],textDecoration:"none",transition:"color 0.15s"},children:c.label},u))]})]})]})}var Pn,w7=_(()=>{"use strict";Pn=O(G(),1);mt();Mt()});function E7({heading:e,description:t,primaryAction:n,secondaryAction:o,media:r,align:i="center",size:a="md",background:s,backgroundImage:l,overlay:c=!1,style:u,className:p}){let m={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}},f=m[a]||m.md,g=!!l,v=g&&c;return(0,Br.jsxs)("section",{className:p,style:{position:"relative",backgroundColor:s||(g?void 0:z.white),...g&&{backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...u},children:[v&&(0,Br.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,Br.jsxs)("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:f.padding,display:"flex",flexDirection:i==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:i==="center"?"center":"left"},children:[(0,Br.jsxs)("div",{style:{flex:i==="left"&&r?"1 1 50%":void 0,maxWidth:i==="center"?"800px":void 0},children:[e&&(0,Br.jsx)("h1",{style:{fontSize:f.headingSize,fontWeight:oe.bold,lineHeight:qt.tight,letterSpacing:Oo.tight,color:v?z.white:z.gray[900],margin:"0 0 16px 0",padding:0},children:e}),t&&(0,Br.jsx)("p",{style:{fontSize:f.descSize,lineHeight:qt.relaxed,color:v?"rgba(255,255,255,0.9)":z.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:i==="center"?"640px":void 0,...i==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:t}),(n||o)&&(0,Br.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:i==="center"?"center":"flex-start"},children:[n&&(0,Br.jsx)("button",{onClick:n.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:oe.semibold,color:z.white,backgroundColor:z.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:qt.normal},children:n.label}),o&&(0,Br.jsx)("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:oe.semibold,color:v?z.white:z.gray[700],backgroundColor:"transparent",border:`1px solid ${v?"rgba(255,255,255,0.3)":z.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:qt.normal},children:o.label})]})]}),r&&(0,Br.jsx)("div",{style:{flex:i==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...i==="center"&&{marginTop:"16px"}},children:r})]})]})}var Br,z7=_(()=>{"use strict";Br=O(G(),1);mt();Mt()});var T7={};bt(T7,{CardGrid:()=>o7,ChatWindow:()=>d7,CommandPalette:()=>_7,CommentThread:()=>s7,DataTable:()=>c7,FileUploader:()=>h7,Footer:()=>k7,Header:()=>Y9,Hero:()=>E7,Modal:()=>b7,NavigationBar:()=>f7,NotificationCenter:()=>v7,Sidebar:()=>t7});var XE=_(()=>{"use strict";X9();n7();i7();l7();u7();p7();m7();y7();$7();x7();S7();w7();z7()});var C7,pm,I7,R7=_(()=>{"use strict";C7=O(G(),1),pm=O(J(),1),I7=(0,pm.forwardRef)(function({children:t,onClick:n,onDoubleClick:o,hoverStyle:r,activeStyle:i,cursor:a,transition:s="all 200ms ease",disabled:l=!1,role:c,"aria-label":u,tabIndex:p,style:m,className:f,...g},v){let[b,y]=(0,pm.useState)(!1),[h,$]=(0,pm.useState)(!1),x=!!n,k=l?"not-allowed":a??(x?"pointer":void 0),U=c??(x?"button":void 0),S=p??(x?0:void 0),T=C=>{l||!n||(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),n(C))},w={...m,cursor:k,transition:s,opacity:l?.5:void 0,...b&&!l?r:{},...h&&!l?i:{}};return(0,C7.jsx)("div",{ref:v,className:f,style:w,onClick:l?void 0:n,onDoubleClick:l?void 0:o,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),$(!1)},onMouseDown:()=>$(!0),onMouseUp:()=>$(!1),onKeyDown:T,role:U,"aria-label":u,"aria-disabled":l||void 0,tabIndex:S,...g,children:t})})});var O7,Yv,M7,A7=_(()=>{"use strict";O7=O(G(),1),Yv=O(J(),1),M7=(0,Yv.forwardRef)(function({children:t,hoverStyle:n,onHoverChange:o,transition:r="all 200ms ease",style:i,className:a,...s},l){let[c,u]=(0,Yv.useState)(!1),p={...i,transition:r,...c?n:{}};return(0,O7.jsx)("div",{ref:l,className:a,style:p,onMouseEnter:()=>{u(!0),o?.(!0)},onMouseLeave:()=>{u(!1),o?.(!1)},...s,children:t})})});var j7,Ru,N7,D7=_(()=>{"use strict";j7=O(G(),1),Ru=O(J(),1),N7=(0,Ru.forwardRef)(function({children:t,onPress:n,onLongPress:o,longPressDelay:r=500,hoverStyle:i,pressStyle:a,disabled:s=!1,transition:l="all 150ms ease",role:c,"aria-label":u,tabIndex:p,style:m,className:f,...g},v){let[b,y]=(0,Ru.useState)(!1),[h,$]=(0,Ru.useState)(!1),[x,k]=(0,Ru.useState)(null),U=!!n||!!o,S=L=>{if(!s&&($(!0),o)){let D=setTimeout(()=>{o(L)},r);k(D)}},T=L=>{s||($(!1),x?(clearTimeout(x),k(null),n?.(L)):o||n?.(L))},w=L=>{s||!n||(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),n(L))},C={...m,cursor:s?"not-allowed":U?"pointer":void 0,transition:l,opacity:s?.5:void 0,userSelect:U?"none":void 0,...b&&!s?i:{},...h&&!s?a:{}},M=typeof t=="function"?t({pressed:h,hovered:b}):t;return(0,j7.jsx)("div",{ref:v,className:f,style:C,onMouseDown:S,onMouseUp:T,onMouseEnter:()=>y(!0),onMouseLeave:()=>{y(!1),$(!1),x&&clearTimeout(x)},onKeyDown:w,role:c??(U?"button":void 0),"aria-label":u,"aria-disabled":s||void 0,tabIndex:p??(U?0:void 0),...g,children:M})})});var P7={};bt(P7,{Clickable:()=>I7,Hoverable:()=>M7,Pressable:()=>N7});var QE=_(()=>{"use strict";R7();A7();D7()});var Dre,Pre,U7,L7,Ou,Ure,H7,V7,q7,Lre,Z7=_(()=>{"use strict";Dre={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"},Pre={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"},U7={xs:4,sm:8,md:16,lg:24,xl:32,"2xl":48,"3xl":64},L7={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}},Ou={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}},Ure={sm:{...Ou.sm,shadowOpacity:.3},md:{...Ou.md,shadowOpacity:.4},lg:{...Ou.lg,shadowOpacity:.4},xl:{...Ou.xl,shadowOpacity:.5},"2xl":{...Ou["2xl"],shadowOpacity:.6}},H7={instant:0,fast:100,normal:200,slow:300,slower:500},V7={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]},q7={none:0,sm:4,md:8,lg:12,xl:16,"2xl":24,full:9999},Lre={light:{colors:Dre,spacing:U7,typography:L7,shadows:Ou,radius:q7,duration:H7,easing:V7},dark:{colors:Pre,spacing:U7,typography:L7,shadows:Ure,radius:q7,duration:H7,easing:V7}}});var B7,G7,F7,e6,t6=_(()=>{"use strict";B7={color:"#0284c7",width:"2px",offset:"2px",style:"solid"},G7={duration:"0ms",transition:"none"},F7={borderWidth:"2px",textColor:"#000000",backgroundColor:"#ffffff",linkColor:"#0369a1"},e6={focusRing:B7,reducedMotion:G7,highContrast:F7}});var n6,r6=_(()=>{"use strict";Xt();Xt();n6={level0:{shadow:"none",zIndex:0},level1:{shadow:Vt.sm,zIndex:"auto"},level2:{shadow:Vt.md,zIndex:Ot.dropdown},level3:{shadow:Vt.lg,zIndex:Ot.banner},level4:{shadow:Vt.xl,zIndex:Ot.modal},level5:{shadow:Vt["2xl"],zIndex:Ot.tooltip}}});var o6,i6=_(()=>{"use strict";o6={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 K7={};bt(K7,{THINKING_DEFAULT_STYLE:()=>PE,accessibility:()=>e6,animation:()=>Ha,chartColors:()=>o6,colors:()=>z,duration:()=>te,easing:()=>X,elevation:()=>n6,error:()=>ZE,focusRing:()=>B7,fontFamily:()=>jv,fontSize:()=>q,fontSizeValues:()=>xP,fontWeight:()=>oe,gray:()=>qr,headingStyles:()=>im,highContrast:()=>F7,info:()=>BE,keyframes:()=>ul,letterSpacing:()=>Oo,lineHeight:()=>qt,maxWidth:()=>Lr,motionSafe:()=>lre,nativeTokens:()=>Lre,primary:()=>um,radius:()=>Ke,reducedMotion:()=>G7,reducedMotionCSS:()=>lm,semantic:()=>Gv,shadow:()=>Vt,spacing:()=>SE,spacingValues:()=>Mne,success:()=>VE,thinkingAnimation:()=>Nt,thinkingKeyframes:()=>jt,thinkingPresets:()=>DE,tokens:()=>Hre,transition:()=>IE,typography:()=>CE,warning:()=>qE,zIndex:()=>Ot});var Hre,a6=_(()=>{"use strict";mt();Xt();Mt();lo();Z7();t6();r6();i6();ku();mt();Xt();Mt();lo();t6();r6();i6();ku();Hre={colors:z,semantic:Gv,spacing:SE,radius:Ke,shadow:Vt,maxWidth:Lr,zIndex:Ot,typography:CE,fontFamily:jv,fontSize:q,fontWeight:oe,lineHeight:qt,duration:te,easing:X,transition:IE,accessibility:e6,elevation:n6,chartColors:o6,keyframes:ul,animation:Ha,reducedMotionCSS:lm,thinkingKeyframes:jt,thinkingAnimation:Nt,thinkingPresets:DE,THINKING_DEFAULT_STYLE:PE}});async function eU(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 n=!1;if(typeof navigator<"u"&&navigator.clipboard)try{await Promise.race([navigator.clipboard.writeText(e).then(()=>{n=!0},()=>{n=!1}),new Promise(r=>setTimeout(r,1500))])}catch{n=!1}return t!==null?{outcome:"opened",mechanism:"window.open"}:n?{outcome:"copied",mechanism:"clipboard"}:{outcome:"unsupported",mechanism:null}}var tU=_(()=>{"use strict"});var Mu,wn,fm,Va,qa,Za,mm,nU,rU,toe,noe,roe,ooe,oU,ioe,aoe,soe,loe,iU,p4e,aU=_(()=>{Mu=function(e,t){let r=e,i=fm[t],a=null,s=0,l=null,c=[],u={},p=function(S,T){s=r*4+17,a=(function(w){let C=new Array(w);for(let M=0;M<w;M+=1){C[M]=new Array(w);for(let L=0;L<w;L+=1)C[M][L]=null}return C})(s),m(0,0),m(s-7,0),m(0,s-7),v(),g(),y(S,T),r>=7&&b(S),l==null&&(l=x(r,i,c)),h(l,T)},m=function(S,T){for(let w=-1;w<=7;w+=1)if(!(S+w<=-1||s<=S+w))for(let C=-1;C<=7;C+=1)T+C<=-1||s<=T+C||(0<=w&&w<=6&&(C==0||C==6)||0<=C&&C<=6&&(w==0||w==6)||2<=w&&w<=4&&2<=C&&C<=4?a[S+w][T+C]=!0:a[S+w][T+C]=!1)},f=function(){let S=0,T=0;for(let w=0;w<8;w+=1){p(!0,w);let C=qa.getLostPoint(u);(w==0||S>C)&&(S=C,T=w)}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=qa.getPatternPosition(r);for(let T=0;T<S.length;T+=1)for(let w=0;w<S.length;w+=1){let C=S[T],M=S[w];if(a[C][M]==null)for(let L=-2;L<=2;L+=1)for(let D=-2;D<=2;D+=1)L==-2||L==2||D==-2||D==2||L==0&&D==0?a[C+L][M+D]=!0:a[C+L][M+D]=!1}},b=function(S){let T=qa.getBCHTypeNumber(r);for(let w=0;w<18;w+=1){let C=!S&&(T>>w&1)==1;a[Math.floor(w/3)][w%3+s-8-3]=C}for(let w=0;w<18;w+=1){let C=!S&&(T>>w&1)==1;a[w%3+s-8-3][Math.floor(w/3)]=C}},y=function(S,T){let w=i<<3|T,C=qa.getBCHTypeInfo(w);for(let M=0;M<15;M+=1){let L=!S&&(C>>M&1)==1;M<6?a[M][8]=L:M<8?a[M+1][8]=L:a[s-15+M][8]=L}for(let M=0;M<15;M+=1){let L=!S&&(C>>M&1)==1;M<8?a[8][s-M-1]=L:M<9?a[8][15-M-1+1]=L:a[8][15-M-1]=L}a[s-8][8]=!S},h=function(S,T){let w=-1,C=s-1,M=7,L=0,D=qa.getMaskFunction(T);for(let W=s-1;W>0;W-=2)for(W==6&&(W-=1);;){for(let Se=0;Se<2;Se+=1)if(a[C][W-Se]==null){let tt=!1;L<S.length&&(tt=(S[L]>>>M&1)==1),D(C,W-Se)&&(tt=!tt),a[C][W-Se]=tt,M-=1,M==-1&&(L+=1,M=7)}if(C+=w,C<0||s<=C){C-=w,w=-w;break}}},$=function(S,T){let w=0,C=0,M=0,L=new Array(T.length),D=new Array(T.length);for(let Q=0;Q<T.length;Q+=1){let Ve=T[Q].dataCount,gt=T[Q].totalCount-Ve;C=Math.max(C,Ve),M=Math.max(M,gt),L[Q]=new Array(Ve);for(let rn=0;rn<L[Q].length;rn+=1)L[Q][rn]=255&S.getBuffer()[rn+w];w+=Ve;let Ce=qa.getErrorCorrectPolynomial(gt),Fr=mm(L[Q],Ce.getLength()-1).mod(Ce);D[Q]=new Array(Ce.getLength()-1);for(let rn=0;rn<D[Q].length;rn+=1){let Ka=rn+Fr.getLength()-D[Q].length;D[Q][rn]=Ka>=0?Fr.getAt(Ka):0}}let W=0;for(let Q=0;Q<T.length;Q+=1)W+=T[Q].totalCount;let Se=new Array(W),tt=0;for(let Q=0;Q<C;Q+=1)for(let Ve=0;Ve<T.length;Ve+=1)Q<L[Ve].length&&(Se[tt]=L[Ve][Q],tt+=1);for(let Q=0;Q<M;Q+=1)for(let Ve=0;Ve<T.length;Ve+=1)Q<D[Ve].length&&(Se[tt]=D[Ve][Q],tt+=1);return Se},x=function(S,T,w){let C=nU.getRSBlocks(S,T),M=rU();for(let D=0;D<w.length;D+=1){let W=w[D];M.put(W.getMode(),4),M.put(W.getLength(),qa.getLengthInBits(W.getMode(),S)),W.write(M)}let L=0;for(let D=0;D<C.length;D+=1)L+=C[D].dataCount;if(M.getLengthInBits()>L*8)throw"code length overflow. ("+M.getLengthInBits()+">"+L*8+")";for(M.getLengthInBits()+4<=L*8&&M.put(0,4);M.getLengthInBits()%8!=0;)M.putBit(!1);for(;!(M.getLengthInBits()>=L*8||(M.put(236,8),M.getLengthInBits()>=L*8));)M.put(17,8);return $(M,C)};u.addData=function(S,T){T=T||"Byte";let w=null;switch(T){case"Numeric":w=toe(S);break;case"Alphanumeric":w=noe(S);break;case"Byte":w=roe(S);break;case"Kanji":w=ooe(S);break;default:throw"mode:"+T}c.push(w),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(r<1){let S=1;for(;S<40;S++){let T=nU.getRSBlocks(S,i),w=rU();for(let M=0;M<c.length;M++){let L=c[M];w.put(L.getMode(),4),w.put(L.getLength(),qa.getLengthInBits(L.getMode(),S)),L.write(w)}let C=0;for(let M=0;M<T.length;M++)C+=T[M].dataCount;if(w.getLengthInBits()<=C*8)break}r=S}p(!1,f())},u.createTableTag=function(S,T){S=S||2,T=typeof T>"u"?S*4:T;let w="";w+='<table style="',w+=" border-width: 0px; border-style: none;",w+=" border-collapse: collapse;",w+=" padding: 0px; margin: "+T+"px;",w+='">',w+="<tbody>";for(let C=0;C<u.getModuleCount();C+=1){w+="<tr>";for(let M=0;M<u.getModuleCount();M+=1)w+='<td style="',w+=" border-width: 0px; border-style: none;",w+=" border-collapse: collapse;",w+=" padding: 0px; margin: 0px;",w+=" width: "+S+"px;",w+=" height: "+S+"px;",w+=" background-color: ",w+=u.isDark(C,M)?"#000000":"#ffffff",w+=";",w+='"/>';w+="</tr>"}return w+="</tbody>",w+="</table>",w},u.createSvgTag=function(S,T,w,C){let M={};typeof arguments[0]=="object"&&(M=arguments[0],S=M.cellSize,T=M.margin,w=M.alt,C=M.title),S=S||2,T=typeof T>"u"?S*4:T,w=typeof w=="string"?{text:w}:w||{},w.text=w.text||null,w.id=w.text?w.id||"qrcode-description":null,C=typeof C=="string"?{text:C}:C||{},C.text=C.text||null,C.id=C.text?C.id||"qrcode-title":null;let L=u.getModuleCount()*S+T*2,D,W,Se,tt,Q="",Ve;for(Ve="l"+S+",0 0,"+S+" -"+S+",0 0,-"+S+"z ",Q+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Q+=M.scalable?"":' width="'+L+'px" height="'+L+'px"',Q+=' viewBox="0 0 '+L+" "+L+'" ',Q+=' preserveAspectRatio="xMinYMin meet"',Q+=C.text||w.text?' role="img" aria-labelledby="'+k([C.id,w.id].join(" ").trim())+'"':"",Q+=">",Q+=C.text?'<title id="'+k(C.id)+'">'+k(C.text)+"</title>":"",Q+=w.text?'<description id="'+k(w.id)+'">'+k(w.text)+"</description>":"",Q+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Q+='<path d="',Se=0;Se<u.getModuleCount();Se+=1)for(tt=Se*S+T,D=0;D<u.getModuleCount();D+=1)u.isDark(Se,D)&&(W=D*S+T,Q+="M"+W+","+tt+Ve);return Q+='" stroke="transparent" fill="black"/>',Q+="</svg>",Q},u.createDataURL=function(S,T){S=S||2,T=typeof T>"u"?S*4:T;let w=u.getModuleCount()*S+T*2,C=T,M=w-T;return loe(w,w,function(L,D){if(C<=L&&L<M&&C<=D&&D<M){let W=Math.floor((L-C)/S),Se=Math.floor((D-C)/S);return u.isDark(Se,W)?0:1}else return 1})},u.createImgTag=function(S,T,w){S=S||2,T=typeof T>"u"?S*4:T;let C=u.getModuleCount()*S+T*2,M="";return M+="<img",M+=' src="',M+=u.createDataURL(S,T),M+='"',M+=' width="',M+=C,M+='"',M+=' height="',M+=C,M+='"',w&&(M+=' alt="',M+=k(w),M+='"'),M+="/>",M};let k=function(S){let T="";for(let w=0;w<S.length;w+=1){let C=S.charAt(w);switch(C){case"<":T+="<";break;case">":T+=">";break;case"&":T+="&";break;case'"':T+=""";break;default:T+=C;break}}return T},U=function(S){S=typeof S>"u"?2:S;let w=u.getModuleCount()*1+S*2,C=S,M=w-S,L,D,W,Se,tt,Q={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},Ve={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},gt="";for(L=0;L<w;L+=2){for(W=Math.floor((L-C)/1),Se=Math.floor((L+1-C)/1),D=0;D<w;D+=1)tt="\u2588",C<=D&&D<M&&C<=L&&L<M&&u.isDark(W,Math.floor((D-C)/1))&&(tt=" "),C<=D&&D<M&&C<=L+1&&L+1<M&&u.isDark(Se,Math.floor((D-C)/1))?tt+=" ":tt+="\u2588",gt+=S<1&&L+1>=M?Ve[tt]:Q[tt];gt+=`
|
|
182
182
|
`}return w%2&&S>0?gt.substring(0,gt.length-w-1)+Array(w+1).join("\u2580"):gt.substring(0,gt.length-1)};return u.createASCII=function(S,T){if(S=S||1,S<2)return U(T);S-=1,T=typeof T>"u"?S*2:T;let w=u.getModuleCount()*S+T*2,C=T,M=w-T,L,D,W,Se,tt=Array(S+1).join("\u2588\u2588"),Q=Array(S+1).join(" "),Ve="",gt="";for(L=0;L<w;L+=1){for(W=Math.floor((L-C)/S),gt="",D=0;D<w;D+=1)Se=1,C<=D&&D<M&&C<=L&&L<M&&u.isDark(W,Math.floor((D-C)/S))&&(Se=0),gt+=Se?tt:Q;for(W=0;W<S;W+=1)Ve+=gt+`
|
|
183
|
-
`}return Ve.substring(0,Ve.length-1)},u.renderTo2dContext=function(S,T){T=T||2;let w=u.getModuleCount();for(let C=0;C<w;C++)for(let M=0;M<w;M++)S.fillStyle=u.isDark(C,M)?"black":"white",S.fillRect(M*T,C*T,T,T)},u};Mu.stringToBytes=function(e){let t=[];for(let n=0;n<e.length;n+=1){let o=e.charCodeAt(n);t.push(o&255)}return t};Mu.createStringToBytes=function(e,t){let n=(function(){let r=aoe(e),i=function(){let l=r.read();if(l==-1)throw"eof";return l},a=0,s={};for(;;){let l=r.read();if(l==-1)break;let c=i(),u=i(),p=i(),m=String.fromCharCode(l<<8|c),f=u<<8|p;s[m]=f,a+=1}if(a!=t)throw a+" != "+t;return s})(),o=63;return function(r){let i=[];for(let a=0;a<r.length;a+=1){let s=r.charCodeAt(a);if(s<128)i.push(s);else{let l=n[r.charAt(a)];typeof l=="number"?(l&255)==l?i.push(l):(i.push(l>>>8),i.push(l&255)):i.push(o)}}return i}};wn={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},fm={L:1,M:0,Q:3,H:2},Va={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},qa=(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,n=7973,o=21522,r={},i=function(a){let s=0;for(;a!=0;)s+=1,a>>>=1;return s};return r.getBCHTypeInfo=function(a){let s=a<<10;for(;i(s)-i(t)>=0;)s^=t<<i(s)-i(t);return(a<<10|s)^o},r.getBCHTypeNumber=function(a){let s=a<<12;for(;i(s)-i(n)>=0;)s^=n<<i(s)-i(n);return a<<12|s},r.getPatternPosition=function(a){return e[a-1]},r.getMaskFunction=function(a){switch(a){case Va.PATTERN000:return function(s,l){return(s+l)%2==0};case Va.PATTERN001:return function(s,l){return s%2==0};case Va.PATTERN010:return function(s,l){return l%3==0};case Va.PATTERN011:return function(s,l){return(s+l)%3==0};case Va.PATTERN100:return function(s,l){return(Math.floor(s/2)+Math.floor(l/3))%2==0};case Va.PATTERN101:return function(s,l){return s*l%2+s*l%3==0};case Va.PATTERN110:return function(s,l){return(s*l%2+s*l%3)%2==0};case Va.PATTERN111:return function(s,l){return(s*l%3+(s+l)%2)%2==0};default:throw"bad maskPattern:"+a}},r.getErrorCorrectPolynomial=function(a){let s=mm([1],0);for(let l=0;l<a;l+=1)s=s.multiply(mm([1,Za.gexp(l)],0));return s},r.getLengthInBits=function(a,s){if(1<=s&&s<10)switch(a){case wn.MODE_NUMBER:return 10;case wn.MODE_ALPHA_NUM:return 9;case wn.MODE_8BIT_BYTE:return 8;case wn.MODE_KANJI:return 8;default:throw"mode:"+a}else if(s<27)switch(a){case wn.MODE_NUMBER:return 12;case wn.MODE_ALPHA_NUM:return 11;case wn.MODE_8BIT_BYTE:return 16;case wn.MODE_KANJI:return 10;default:throw"mode:"+a}else if(s<41)switch(a){case wn.MODE_NUMBER:return 14;case wn.MODE_ALPHA_NUM:return 13;case wn.MODE_8BIT_BYTE:return 16;case wn.MODE_KANJI:return 12;default:throw"mode:"+a}else throw"type:"+s},r.getLostPoint=function(a){let s=a.getModuleCount(),l=0;for(let p=0;p<s;p+=1)for(let m=0;m<s;m+=1){let f=0,g=a.isDark(p,m);for(let v=-1;v<=1;v+=1)if(!(p+v<0||s<=p+v))for(let b=-1;b<=1;b+=1)m+b<0||s<=m+b||v==0&&b==0||g==a.isDark(p+v,m+b)&&(f+=1);f>5&&(l+=3+f-5)}for(let p=0;p<s-1;p+=1)for(let m=0;m<s-1;m+=1){let f=0;a.isDark(p,m)&&(f+=1),a.isDark(p+1,m)&&(f+=1),a.isDark(p,m+1)&&(f+=1),a.isDark(p+1,m+1)&&(f+=1),(f==0||f==4)&&(l+=3)}for(let p=0;p<s;p+=1)for(let m=0;m<s-6;m+=1)a.isDark(p,m)&&!a.isDark(p,m+1)&&a.isDark(p,m+2)&&a.isDark(p,m+3)&&a.isDark(p,m+4)&&!a.isDark(p,m+5)&&a.isDark(p,m+6)&&(l+=40);for(let p=0;p<s;p+=1)for(let m=0;m<s-6;m+=1)a.isDark(m,p)&&!a.isDark(m+1,p)&&a.isDark(m+2,p)&&a.isDark(m+3,p)&&a.isDark(m+4,p)&&!a.isDark(m+5,p)&&a.isDark(m+6,p)&&(l+=40);let c=0;for(let p=0;p<s;p+=1)for(let m=0;m<s;m+=1)a.isDark(m,p)&&(c+=1);let u=Math.abs(100*c/s/s-50)/5;return l+=u*10,l},r})(),Za=(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 n={};return n.glog=function(o){if(o<1)throw"glog("+o+")";return t[o]},n.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return e[o]},n})(),mm=function(e,t){if(typeof e.length>"u")throw e.length+"/"+t;let n=(function(){let r=0;for(;r<e.length&&e[r]==0;)r+=1;let i=new Array(e.length-r+t);for(let a=0;a<e.length-r;a+=1)i[a]=e[a+r];return i})(),o={};return o.getAt=function(r){return n[r]},o.getLength=function(){return n.length},o.multiply=function(r){let i=new Array(o.getLength()+r.getLength()-1);for(let a=0;a<o.getLength();a+=1)for(let s=0;s<r.getLength();s+=1)i[a+s]^=Za.gexp(Za.glog(o.getAt(a))+Za.glog(r.getAt(s)));return mm(i,0)},o.mod=function(r){if(o.getLength()-r.getLength()<0)return o;let i=Za.glog(o.getAt(0))-Za.glog(r.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<r.getLength();s+=1)a[s]^=Za.gexp(Za.glog(r.getAt(s))+i);return mm(a,0).mod(r)},o},nU=(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(r,i){let a={};return a.totalCount=r,a.dataCount=i,a},n={},o=function(r,i){switch(i){case fm.L:return e[(r-1)*4+0];case fm.M:return e[(r-1)*4+1];case fm.Q:return e[(r-1)*4+2];case fm.H:return e[(r-1)*4+3];default:return}};return n.getRSBlocks=function(r,i){let a=o(r,i);if(typeof a>"u")throw"bad rs block @ typeNumber:"+r+"/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],m=a[c*3+2];for(let f=0;f<u;f+=1)l.push(t(p,m))}return l},n})(),rU=function(){let e=[],t=0,n={};return n.getBuffer=function(){return e},n.getAt=function(o){let r=Math.floor(o/8);return(e[r]>>>7-o%8&1)==1},n.put=function(o,r){for(let i=0;i<r;i+=1)n.putBit((o>>>r-i-1&1)==1)},n.getLengthInBits=function(){return t},n.putBit=function(o){let r=Math.floor(t/8);e.length<=r&&e.push(0),o&&(e[r]|=128>>>t%8),t+=1},n},toe=function(e){let t=wn.MODE_NUMBER,n=e,o={};o.getMode=function(){return t},o.getLength=function(a){return n.length},o.write=function(a){let s=n,l=0;for(;l+2<s.length;)a.put(r(s.substring(l,l+3)),10),l+=3;l<s.length&&(s.length-l==1?a.put(r(s.substring(l,l+1)),4):s.length-l==2&&a.put(r(s.substring(l,l+2)),7))};let r=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},noe=function(e){let t=wn.MODE_ALPHA_NUM,n=e,o={};o.getMode=function(){return t},o.getLength=function(i){return n.length},o.write=function(i){let a=n,s=0;for(;s+1<a.length;)i.put(r(a.charAt(s))*45+r(a.charAt(s+1)),11),s+=2;s<a.length&&i.put(r(a.charAt(s)),6)};let r=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=wn.MODE_8BIT_BYTE,n=e,o=Mu.stringToBytes(e),r={};return r.getMode=function(){return t},r.getLength=function(i){return o.length},r.write=function(i){for(let a=0;a<o.length;a+=1)i.put(o[a],8)},r},ooe=function(e){let t=wn.MODE_KANJI,n=e,o=Mu.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 r=o(e),i={};return i.getMode=function(){return t},i.getLength=function(a){return~~(r.length/2)},i.write=function(a){let s=r,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},oU=function(){let e=[],t={};return t.writeByte=function(n){e.push(n&255)},t.writeShort=function(n){t.writeByte(n),t.writeByte(n>>>8)},t.writeBytes=function(n,o,r){o=o||0,r=r||n.length;for(let i=0;i<r;i+=1)t.writeByte(n[i+o])},t.writeString=function(n){for(let o=0;o<n.length;o+=1)t.writeByte(n.charCodeAt(o))},t.toByteArray=function(){return e},t.toString=function(){let n="";n+="[";for(let o=0;o<e.length;o+=1)o>0&&(n+=","),n+=e[o];return n+="]",n},t},ioe=function(){let e=0,t=0,n=0,o="",r={},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 r.writeByte=function(s){for(e=e<<8|s&255,t+=8,n+=1;t>=6;)i(e>>>t-6),t-=6},r.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),n%3!=0){let s=3-n%3;for(let l=0;l<s;l+=1)o+="="}},r.toString=function(){return o},r},aoe=function(e){let t=e,n=0,o=0,r=0,i={};i.read=function(){for(;r<8;){if(n>=t.length){if(r==0)return-1;throw"unexpected end of file./"+r}let l=t.charAt(n);if(n+=1,l=="=")return r=0,-1;if(l.match(/^\s$/))continue;o=o<<6|a(l.charCodeAt(0)),r+=6}let s=o>>>r-8&255;return r-=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},soe=function(e,t){let n=e,o=t,r=new Array(e*t),i={};i.setPixel=function(c,u,p){r[u*n+c]=p},i.write=function(c){c.writeString("GIF87a"),c.writeShort(n),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(n),c.writeShort(o),c.writeByte(0);let u=2,p=s(u);c.writeByte(u);let m=0;for(;p.length-m>255;)c.writeByte(255),c.writeBytes(p,m,255),m+=255;c.writeByte(p.length-m),c.writeBytes(p,m,p.length-m),c.writeByte(0),c.writeString(";")};let a=function(c){let u=c,p=0,m=0,f={};return f.write=function(g,v){if(g>>>v)throw"length over";for(;p+v>=8;)u.writeByte(255&(g<<p|m)),v-=8-p,g>>>=8-p,m=0,p=0;m=g<<p|m,p=p+v},f.flush=function(){p>0&&u.writeByte(m)},f},s=function(c){let u=1<<c,p=(1<<c)+1,m=c+1,f=l();for(let h=0;h<u;h+=1)f.add(String.fromCharCode(h));f.add(String.fromCharCode(u)),f.add(String.fromCharCode(p));let g=oU(),v=a(g);v.write(u,m);let b=0,y=String.fromCharCode(r[b]);for(b+=1;b<r.length;){let h=String.fromCharCode(r[b]);b+=1,f.contains(y+h)?y=y+h:(v.write(f.indexOf(y),m),f.size()<4095&&(f.size()==1<<m&&(m+=1),f.add(y+h)),y=h)}return v.write(f.indexOf(y),m),v.write(p,m),v.flush(),g.toByteArray()},l=function(){let c={},u=0,p={};return p.add=function(m){if(p.contains(m))throw"dup key:"+m;c[m]=u,u+=1},p.size=function(){return u},p.indexOf=function(m){return c[m]},p.contains=function(m){return typeof c[m]<"u"},p};return i},loe=function(e,t,n){let o=soe(e,t);for(let s=0;s<t;s+=1)for(let l=0;l<e;l+=1)o.setPixel(l,s,n(l,s));let r=oU();o.write(r);let i=ioe(),a=r.toByteArray();for(let s=0;s<a.length;s+=1)i.writeByte(a[s]);return i.flush(),"data:image/gif;base64,"+i},iU=Mu,p4e=Mu.stringToBytes});function lU({value:e,size:t=128,errorCorrection:n="M",foreground:o="var(--ggui-color-onSurface, #18181b)",background:r="var(--ggui-color-surface, #ffffff)",ariaLabel:i}){let a=sU.useMemo(()=>{try{let l=iU(0,n);l.addData(e),l.make();let c=l.getModuleCount(),u=[];for(let p=0;p<c;p+=1){let m=[];for(let f=0;f<c;f+=1)m.push(l.isDark(p,f));u.push(m)}return u}catch{return null}},[e,n]);if(a===null)return null;let s=a.length;return(0,gm.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,gm.jsx)("rect",{width:s,height:s,fill:r}),a.flatMap((l,c)=>l.map((u,p)=>u?(0,gm.jsx)("rect",{x:p,y:c,width:1,height:1,fill:o},`${p}-${c}`):null))]})}var sU,gm,cU=_(()=>{"use strict";sU=O(J(),1);aU();gm=O(G(),1)});function uoe(){let e="var(--ggui-color-onSurface, #292929)",t="var(--ggui-color-neutral-300, #d1d5db)";return(0,Ie.jsxs)("svg",{viewBox:"0 0 224 50",width:"72",height:"16",role:"img","aria-label":"ggui",style:{display:"block",flexShrink:0},children:[(0,Ie.jsx)("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:t}),(0,Ie.jsx)("rect",{x:"33",y:"33",width:"17",height:"17",fill:e}),(0,Ie.jsx)("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:e}),(0,Ie.jsx)("rect",{x:"91",y:"33",width:"17",height:"17",fill:t}),(0,Ie.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,Ie.jsx)("rect",{x:"174",y:"0",width:"50",height:"50",fill:t})]})}function c6({settingsUrl:e,intent:t}){let[n,o]=Xv.useState("idle"),r=Xv.useCallback(()=>{typeof console<"u"&&console.log("[ggui:no-creds-card] click \u2192 settingsUrl =",e),o("working"),eU(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"),doe)})},[e]);return(0,Ie.jsx)(mi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,Ie.jsxs)($t,{gap:"lg",children:[(0,Ie.jsxs)($t,{gap:"md",children:[(0,Ie.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,Ie.jsx)(uoe,{}),(0,Ie.jsx)(Ao,{variant:"info",children:"Setup needed"})]}),(0,Ie.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ie.jsx)(Nn,{level:3,children:"Connect an LLM provider"}),(0,Ie.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:coe})]}),(0,Ie.jsx)(Je,{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,Ie.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,Ie.jsxs)("div",{style:{display:"flex",gap:"var(--ggui-spacing-4, 16px)",alignItems:"flex-start",flexWrap:"wrap"},children:[(0,Ie.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)"},children:[(0,Ie.jsx)("div",{style:{padding:"var(--ggui-spacing-2, 8px)",background:"#ffffff",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:0},children:(0,Ie.jsx)(lU,{value:e,size:120,foreground:"#000000",background:"#ffffff"})}),(0,Ie.jsx)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)",textAlign:"center"},children:"Scan with your phone"})]}),(0,Ie.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",flex:"1 1 240px",minWidth:"200px"},children:[(0,Ie.jsx)(Je,{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,Ie.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,Ie.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ie.jsx)(We,{variant:"primary",size:"md",onClick:r,disabled:n==="working",children:n==="working"?"Opening\u2026":n==="opened"?"Opened in browser \u2713":n==="copied"?"URL copied \u2014 paste in your browser":n==="manual"?"Tap the URL above to copy":"Open settings"}),n==="idle"||n==="working"?(0,Ie.jsx)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.85},children:"or tap-and-hold the URL above to copy"}):null]})]})]})}),t?(0,Ie.jsxs)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Pending prompt: ",t]}):null]})})}var Xv,Ie,coe,doe,uU=_(()=>{"use strict";Xv=O(J(),1);wu();tU();cU();Ie=O(G(),1),coe="0.6.2+27225744";doe=4e3});function foe(){let e=hr.useRef(1e4),t=hr.useRef(new Map);return hr.useEffect(()=>{let n=o=>{let r=o.data;if(r===null||typeof r!="object")return;let i=r.id;if(typeof i!="number")return;let a=t.current.get(i);a!==void 0&&(t.current.delete(i),a(r))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[]),hr.useCallback((n,o)=>new Promise(r=>{let i=e.current;e.current+=1,t.current.set(i,r);try{window.parent.postMessage({jsonrpc:"2.0",id:i,method:n,params:o??{}},"*")}catch(a){t.current.delete(i),r({error:{code:-32099,message:a instanceof Error?a.message:String(a)}})}window.setTimeout(()=>{t.current.delete(i)&&r({error:{code:-32001,message:"TIMEOUT"}})},poe)}),[])}function moe(){let[e,t]=hr.useState([]),n=hr.useRef(0);return hr.useEffect(()=>{let o=r=>{let i=r.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;n.current+=1;let l={id:n.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 goe(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 hoe(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function yoe(e){if(e==null||typeof e!="object"||Array.isArray(e))return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,r])=>{if(r===null)return`${o}: null`;if(typeof r=="string")return`${o}: ${r}`;if(typeof r=="number"||typeof r=="boolean")return`${o}: ${r}`;let i=JSON.stringify(r);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function hm({method:e,description:t,call:n}){let[o,r]=hr.useState({state:"idle"}),i=hr.useCallback(()=>{let l=Date.now();r({state:"pending",startedAtMs:l});let c=goe(e);n(e,c).then(u=>{if(u.error){r({state:"error",code:u.error.code??"?",message:u.error.message??"(no message)"});return}if(r({state:"success",result:u.result??{}}),e==="tools/call"){let m=(c.arguments??{}).payload??{},f=String(m.intent??"?"),g=m.data,v=yoe(g),b=v===""?"":` (${v})`,y=new Date().toISOString(),h=hoe(`${f}|${JSON.stringify(g??null)}|${y}`);n("ui/update-model-context",{content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:h,intent:f,data:g??null,firedAt:y})}`}]}),n("ui/message",{role:"user",content:[{type:"text",text:`Please proceed with **${f}**${b}. [id: \`${h}\`]`}]})}})},[n,e]),a=o.state==="pending"?"Sending\u2026":o.state==="success"?"Send again \u2713":o.state==="error"?"Retry":"Send",s=o.state==="idle"?(0,pe.jsx)(Ao,{variant:"default",children:"idle"}):o.state==="pending"?(0,pe.jsx)(Ao,{variant:"info",children:"pending"}):o.state==="success"?(0,pe.jsx)(Ao,{variant:"success",children:"success"}):(0,pe.jsx)(Ao,{variant:"warning",children:"error"});return(0,pe.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,pe.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,pe.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,pe.jsx)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:t}),(0,pe.jsx)("div",{style:{display:"flex",gap:"var(--ggui-spacing-2, 8px)"},children:(0,pe.jsx)(We,{variant:"primary",size:"sm",onClick:i,disabled:o.state==="pending",children:a})}),o.state==="success"||o.state==="error"?(0,pe.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 u6({intent:e}){let t=foe(),n=moe();return(0,pe.jsx)(mi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,pe.jsxs)($t,{gap:"lg",children:[(0,pe.jsxs)($t,{gap:"sm",children:[(0,pe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,pe.jsx)(Nn,{level:3,children:"MCP Apps protocol probe"}),(0,pe.jsx)(Ao,{variant:"info",children:"diagnostic"})]}),(0,pe.jsxs)(Je,{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,pe.jsx)("code",{children:"tools/call"})," row chains the full submit-action bridge (audit + context + consent), reproducing the production ",(0,pe.jsx)("code",{children:"dispatchSubmitAction"})," envelope shape verbatim. The receive log below captures every notification the host emits while this card is mounted."]})]}),(0,pe.jsxs)($t,{gap:"md",children:[(0,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsxs)($t,{gap:"sm",children:[(0,pe.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,pe.jsx)(Nn,{level:4,children:"Receive log"}),(0,pe.jsxs)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[n.length," ",n.length===1?"event":"events"]})]}),n.length===0?(0,pe.jsx)(Je,{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,pe.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:n.map(o=>(0,pe.jsxs)("details",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[(0,pe.jsxs)("summary",{style:{cursor:"pointer",padding:"var(--ggui-spacing-1, 4px) 0",color:"var(--ggui-color-onSurface, #111)"},children:[(0,pe.jsx)("span",{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginRight:"8px"},children:o.tsIso.slice(11,19)}),(0,pe.jsx)("span",{style:{fontWeight:600},children:o.method})]}),(0,pe.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,pe.jsxs)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Triggered by: ",e]}):null]})})}var hr,pe,poe,dU=_(()=>{"use strict";hr=O(J(),1);wu();pe=O(G(),1),poe=5e3});function pU(){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 n=typeof navigator<"u"?navigator.userAgent:"";if(/Claude/.test(n))return!0}catch{}return!1}function Qv(){let e=Au.useCallback(()=>typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),[t,n]=Au.useState(e);return Au.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),r=a=>{n(a.matches?"dark":"light")};if(typeof o.addEventListener=="function")return o.addEventListener("change",r),()=>{o.removeEventListener("change",r)};let i=o;return i.addListener(r),()=>{i.removeListener(r)}},[]),t}var Au,d6=_(()=>{"use strict";Au=O(J(),1)});var hU={};bt(hU,{NoCredentialsCard:()=>c6,ProtocolProbeCard:()=>u6,SYSTEM_CARD_REGISTRY:()=>mU,SystemCardHost:()=>$oe,renderSystemCard:()=>gU});function fU(e,t){return function(o){let r=e,i=t(o);return Ba.createElement(r,i)}}function voe({kind:e,props:t}){return Ba.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)"}},Ba.createElement("div",{style:{fontWeight:600,marginBottom:8}},`Unknown system card: ${e}`),Ba.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 gU(e,t){let n=mU[e];return n?Ba.createElement(n,t):Ba.createElement(voe,{kind:e,props:t})}function $oe({kind:e,props:t,themeId:n}){let o=pU(),r=Qv();return Ba.createElement(mE,{theme:r==="dark"?fE:em,mode:r,transparent:o,children:gU(e,t)})}var Ba,mU,yU=_(()=>{"use strict";Ba=O(J(),1);Rv();uU();dU();d6();mU={"no-credentials":fU(c6,e=>{let t=typeof e.settingsUrl=="string"?e.settingsUrl:"",n=typeof e.intent=="string"?e.intent:void 0;return{settingsUrl:t,...n!==void 0?{intent:n}:{}}}),"mcp-apps-probe":fU(u6,e=>{let t=typeof e.intent=="string"?e.intent:void 0;return{...t!==void 0?{intent:t}:{}}})}});var bU={};bt(bU,{UiFeedbackCard:()=>_oe});function xoe(e){let t=e==="dark";return{root:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:boe,fontSize:12,lineHeight:1.2,color:t?"var(--ggui-color-neutral-500, #9ca3af)":"var(--ggui-color-neutral-500, #6b7280)"},verdictButton:{appearance:"none",background:t?"var(--ggui-color-neutral-50, #1f2937)":"var(--ggui-color-neutral-50, #f9fafb)",border:t?"1px solid var(--ggui-color-neutral-200, #374151)":"1px solid var(--ggui-color-neutral-200, #e5e7eb)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",padding:"2px 8px",fontFamily:"inherit",fontSize:"inherit",color:t?"var(--ggui-color-neutral-600, #d1d5db)":"var(--ggui-color-neutral-600, #4b5563)",cursor:"pointer"},dismissButton:{appearance:"none",background:"transparent",border:"none",padding:"2px 4px",fontFamily:"inherit",fontSize:"inherit",color:t?"var(--ggui-color-neutral-400, #6b7280)":"var(--ggui-color-neutral-400, #9ca3af)",cursor:"pointer"},commentForm:{display:"inline-flex",alignItems:"center",gap:4,margin:0},commentInput:{fontFamily:"inherit",fontSize:"inherit",padding:"2px 6px",minWidth:140,border:t?"1px solid var(--ggui-color-neutral-200, #374151)":"1px solid var(--ggui-color-neutral-200, #e5e7eb)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",background:t?"var(--ggui-color-neutral-50, #111827)":"var(--ggui-color-neutral-50, #ffffff)",color:t?"var(--ggui-color-neutral-800, #e5e7eb)":"var(--ggui-color-neutral-800, #1f2937)"}}}function _oe({emit:e,sessionId:t,toolName:n}){let[o,r]=ju.useState("idle"),[i,a]=ju.useState(""),s=Qv(),l=xoe(s),c=ju.useCallback((p,m)=>{let f=m?.trim();e({kind:"ui-feedback",verdict:p,...f!==void 0&&f.length>0?{comment:f}:{},...t!==void 0?{sessionId:t}:{},...n!==void 0?{toolName:n}:{}}),r("sent")},[e,t,n]),u=ju.useCallback(p=>{p.preventDefault(),c("other",i)},[c,i]);return o==="dismissed"?null:(0,or.jsxs)("div",{"data-ggui-ui-feedback":!0,role:"group","aria-label":"Share feedback on this UI",style:l.root,children:[o==="sent"?(0,or.jsx)("span",{"data-ggui-ui-feedback-thanks":!0,children:"Thanks for the feedback"}):o==="comment"?(0,or.jsxs)("form",{onSubmit:u,style:l.commentForm,"data-ggui-ui-feedback-comment-form":!0,children:[(0,or.jsx)("input",{type:"text",value:i,onChange:p=>a(p.target.value),placeholder:"What happened?","aria-label":"Feedback comment","data-ggui-ui-feedback-comment":!0,style:l.commentInput,autoFocus:!0}),(0,or.jsx)("button",{type:"submit",style:l.verdictButton,"data-ggui-ui-feedback-send":!0,children:"Send"})]}):(0,or.jsxs)(or.Fragment,{children:[(0,or.jsx)("button",{type:"button",style:l.verdictButton,"data-ggui-ui-feedback-verdict":"love",onClick:()=>c("love"),children:"Love"}),(0,or.jsx)("button",{type:"button",style:l.verdictButton,"data-ggui-ui-feedback-verdict":"dislike",onClick:()=>c("dislike"),children:"Dislike"}),(0,or.jsx)("button",{type:"button",style:l.verdictButton,"data-ggui-ui-feedback-verdict":"other",onClick:()=>r("comment"),children:"Other\u2026"})]}),(0,or.jsx)("button",{type:"button",style:l.dismissButton,"aria-label":"Dismiss feedback","data-ggui-ui-feedback-dismiss":!0,onClick:()=>r("dismissed"),children:"\xD7"})]})}var ju,or,boe,xU=_(()=>{"use strict";ju=O(J(),1);d6();or=O(G(),1),boe="var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)"});var AU={};bt(AU,{CachingGadgetCatalog:()=>Ioe,InMemoryGadgetCatalog:()=>MU,WrapperConformanceError:()=>m6,createGguiGadget:()=>zoe,defineGadgetPackage:()=>Toe,getPublicEnv:()=>Roe,useCamera:()=>Voe,useClipboardPaste:()=>Noe,useClipboardWrite:()=>Aoe,useFilePicker:()=>Uoe,useGeolocation:()=>Ooe,useMicrophone:()=>Hoe,useNotifications:()=>Doe});function zoe(e){let{hookImpl:t,hook:n,description:o,usage:r,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:n,description:o,usage:r,example:i,...a!==void 0?{gotchas:a}:{},...s!==void 0?{permission:s}:{}},p={...l,exports:[u]},m=tp.safeParse(p);if(!m.success)for(let v of m.error.issues)c.push({path:v.path.map(b=>typeof b=="symbol"?b.toString():b),message:v.message});if(!m.success||c.length>0)throw new m6(typeof e.hook=="string"?e.hook:void 0,c);let f=m.data;return Object.assign((v=>t(v)),{descriptor:Object.freeze(f)})}function Toe(e){let{exports:t,...n}=e,o=[];t.length===0&&o.push({path:["exports"],message:"a gadget package MUST declare at least one export"});let r=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=tp.safeParse({...n,exports:r});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 m6(e.package,o);return i.data}function Roe(e,t,n=globalThis){let o=n.__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 r=o.publicEnv??{};if(Object.prototype.hasOwnProperty.call(r,e))return r[e];if(t?.optional)return;let i=Object.keys(r);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 IU(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 RU(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 Moe(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 joe(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 Poe(e){return{name:e.name,size:e.size,type:e.type,_file:e}}function Loe(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 OU(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 zi,Nu,Du,Pu,Uu,Gr,Ti,m6,MU,Coe,Ioe,Ooe,Aoe,Noe,Doe,Uoe,Hoe,Voe,jU=_(()=>{"use strict";_o();_o();zi=O(J(),1),Nu=O(J(),1),Du=O(J(),1),Pu=O(J(),1),Uu=O(J(),1),Gr=O(J(),1),Ti=O(J(),1),m6=class extends Error{code="wrapper_conformance";violations;constructor(e,t){let n=e?` (${e})`:"",o=t.map(r=>` - ${r.path.join(".")||"<root>"}: ${r.message}`).join(`
|
|
183
|
+
`}return Ve.substring(0,Ve.length-1)},u.renderTo2dContext=function(S,T){T=T||2;let w=u.getModuleCount();for(let C=0;C<w;C++)for(let M=0;M<w;M++)S.fillStyle=u.isDark(C,M)?"black":"white",S.fillRect(M*T,C*T,T,T)},u};Mu.stringToBytes=function(e){let t=[];for(let n=0;n<e.length;n+=1){let o=e.charCodeAt(n);t.push(o&255)}return t};Mu.createStringToBytes=function(e,t){let n=(function(){let r=aoe(e),i=function(){let l=r.read();if(l==-1)throw"eof";return l},a=0,s={};for(;;){let l=r.read();if(l==-1)break;let c=i(),u=i(),p=i(),m=String.fromCharCode(l<<8|c),f=u<<8|p;s[m]=f,a+=1}if(a!=t)throw a+" != "+t;return s})(),o=63;return function(r){let i=[];for(let a=0;a<r.length;a+=1){let s=r.charCodeAt(a);if(s<128)i.push(s);else{let l=n[r.charAt(a)];typeof l=="number"?(l&255)==l?i.push(l):(i.push(l>>>8),i.push(l&255)):i.push(o)}}return i}};wn={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},fm={L:1,M:0,Q:3,H:2},Va={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},qa=(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,n=7973,o=21522,r={},i=function(a){let s=0;for(;a!=0;)s+=1,a>>>=1;return s};return r.getBCHTypeInfo=function(a){let s=a<<10;for(;i(s)-i(t)>=0;)s^=t<<i(s)-i(t);return(a<<10|s)^o},r.getBCHTypeNumber=function(a){let s=a<<12;for(;i(s)-i(n)>=0;)s^=n<<i(s)-i(n);return a<<12|s},r.getPatternPosition=function(a){return e[a-1]},r.getMaskFunction=function(a){switch(a){case Va.PATTERN000:return function(s,l){return(s+l)%2==0};case Va.PATTERN001:return function(s,l){return s%2==0};case Va.PATTERN010:return function(s,l){return l%3==0};case Va.PATTERN011:return function(s,l){return(s+l)%3==0};case Va.PATTERN100:return function(s,l){return(Math.floor(s/2)+Math.floor(l/3))%2==0};case Va.PATTERN101:return function(s,l){return s*l%2+s*l%3==0};case Va.PATTERN110:return function(s,l){return(s*l%2+s*l%3)%2==0};case Va.PATTERN111:return function(s,l){return(s*l%3+(s+l)%2)%2==0};default:throw"bad maskPattern:"+a}},r.getErrorCorrectPolynomial=function(a){let s=mm([1],0);for(let l=0;l<a;l+=1)s=s.multiply(mm([1,Za.gexp(l)],0));return s},r.getLengthInBits=function(a,s){if(1<=s&&s<10)switch(a){case wn.MODE_NUMBER:return 10;case wn.MODE_ALPHA_NUM:return 9;case wn.MODE_8BIT_BYTE:return 8;case wn.MODE_KANJI:return 8;default:throw"mode:"+a}else if(s<27)switch(a){case wn.MODE_NUMBER:return 12;case wn.MODE_ALPHA_NUM:return 11;case wn.MODE_8BIT_BYTE:return 16;case wn.MODE_KANJI:return 10;default:throw"mode:"+a}else if(s<41)switch(a){case wn.MODE_NUMBER:return 14;case wn.MODE_ALPHA_NUM:return 13;case wn.MODE_8BIT_BYTE:return 16;case wn.MODE_KANJI:return 12;default:throw"mode:"+a}else throw"type:"+s},r.getLostPoint=function(a){let s=a.getModuleCount(),l=0;for(let p=0;p<s;p+=1)for(let m=0;m<s;m+=1){let f=0,g=a.isDark(p,m);for(let v=-1;v<=1;v+=1)if(!(p+v<0||s<=p+v))for(let b=-1;b<=1;b+=1)m+b<0||s<=m+b||v==0&&b==0||g==a.isDark(p+v,m+b)&&(f+=1);f>5&&(l+=3+f-5)}for(let p=0;p<s-1;p+=1)for(let m=0;m<s-1;m+=1){let f=0;a.isDark(p,m)&&(f+=1),a.isDark(p+1,m)&&(f+=1),a.isDark(p,m+1)&&(f+=1),a.isDark(p+1,m+1)&&(f+=1),(f==0||f==4)&&(l+=3)}for(let p=0;p<s;p+=1)for(let m=0;m<s-6;m+=1)a.isDark(p,m)&&!a.isDark(p,m+1)&&a.isDark(p,m+2)&&a.isDark(p,m+3)&&a.isDark(p,m+4)&&!a.isDark(p,m+5)&&a.isDark(p,m+6)&&(l+=40);for(let p=0;p<s;p+=1)for(let m=0;m<s-6;m+=1)a.isDark(m,p)&&!a.isDark(m+1,p)&&a.isDark(m+2,p)&&a.isDark(m+3,p)&&a.isDark(m+4,p)&&!a.isDark(m+5,p)&&a.isDark(m+6,p)&&(l+=40);let c=0;for(let p=0;p<s;p+=1)for(let m=0;m<s;m+=1)a.isDark(m,p)&&(c+=1);let u=Math.abs(100*c/s/s-50)/5;return l+=u*10,l},r})(),Za=(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 n={};return n.glog=function(o){if(o<1)throw"glog("+o+")";return t[o]},n.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return e[o]},n})(),mm=function(e,t){if(typeof e.length>"u")throw e.length+"/"+t;let n=(function(){let r=0;for(;r<e.length&&e[r]==0;)r+=1;let i=new Array(e.length-r+t);for(let a=0;a<e.length-r;a+=1)i[a]=e[a+r];return i})(),o={};return o.getAt=function(r){return n[r]},o.getLength=function(){return n.length},o.multiply=function(r){let i=new Array(o.getLength()+r.getLength()-1);for(let a=0;a<o.getLength();a+=1)for(let s=0;s<r.getLength();s+=1)i[a+s]^=Za.gexp(Za.glog(o.getAt(a))+Za.glog(r.getAt(s)));return mm(i,0)},o.mod=function(r){if(o.getLength()-r.getLength()<0)return o;let i=Za.glog(o.getAt(0))-Za.glog(r.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<r.getLength();s+=1)a[s]^=Za.gexp(Za.glog(r.getAt(s))+i);return mm(a,0).mod(r)},o},nU=(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(r,i){let a={};return a.totalCount=r,a.dataCount=i,a},n={},o=function(r,i){switch(i){case fm.L:return e[(r-1)*4+0];case fm.M:return e[(r-1)*4+1];case fm.Q:return e[(r-1)*4+2];case fm.H:return e[(r-1)*4+3];default:return}};return n.getRSBlocks=function(r,i){let a=o(r,i);if(typeof a>"u")throw"bad rs block @ typeNumber:"+r+"/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],m=a[c*3+2];for(let f=0;f<u;f+=1)l.push(t(p,m))}return l},n})(),rU=function(){let e=[],t=0,n={};return n.getBuffer=function(){return e},n.getAt=function(o){let r=Math.floor(o/8);return(e[r]>>>7-o%8&1)==1},n.put=function(o,r){for(let i=0;i<r;i+=1)n.putBit((o>>>r-i-1&1)==1)},n.getLengthInBits=function(){return t},n.putBit=function(o){let r=Math.floor(t/8);e.length<=r&&e.push(0),o&&(e[r]|=128>>>t%8),t+=1},n},toe=function(e){let t=wn.MODE_NUMBER,n=e,o={};o.getMode=function(){return t},o.getLength=function(a){return n.length},o.write=function(a){let s=n,l=0;for(;l+2<s.length;)a.put(r(s.substring(l,l+3)),10),l+=3;l<s.length&&(s.length-l==1?a.put(r(s.substring(l,l+1)),4):s.length-l==2&&a.put(r(s.substring(l,l+2)),7))};let r=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},noe=function(e){let t=wn.MODE_ALPHA_NUM,n=e,o={};o.getMode=function(){return t},o.getLength=function(i){return n.length},o.write=function(i){let a=n,s=0;for(;s+1<a.length;)i.put(r(a.charAt(s))*45+r(a.charAt(s+1)),11),s+=2;s<a.length&&i.put(r(a.charAt(s)),6)};let r=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=wn.MODE_8BIT_BYTE,n=e,o=Mu.stringToBytes(e),r={};return r.getMode=function(){return t},r.getLength=function(i){return o.length},r.write=function(i){for(let a=0;a<o.length;a+=1)i.put(o[a],8)},r},ooe=function(e){let t=wn.MODE_KANJI,n=e,o=Mu.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 r=o(e),i={};return i.getMode=function(){return t},i.getLength=function(a){return~~(r.length/2)},i.write=function(a){let s=r,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},oU=function(){let e=[],t={};return t.writeByte=function(n){e.push(n&255)},t.writeShort=function(n){t.writeByte(n),t.writeByte(n>>>8)},t.writeBytes=function(n,o,r){o=o||0,r=r||n.length;for(let i=0;i<r;i+=1)t.writeByte(n[i+o])},t.writeString=function(n){for(let o=0;o<n.length;o+=1)t.writeByte(n.charCodeAt(o))},t.toByteArray=function(){return e},t.toString=function(){let n="";n+="[";for(let o=0;o<e.length;o+=1)o>0&&(n+=","),n+=e[o];return n+="]",n},t},ioe=function(){let e=0,t=0,n=0,o="",r={},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 r.writeByte=function(s){for(e=e<<8|s&255,t+=8,n+=1;t>=6;)i(e>>>t-6),t-=6},r.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),n%3!=0){let s=3-n%3;for(let l=0;l<s;l+=1)o+="="}},r.toString=function(){return o},r},aoe=function(e){let t=e,n=0,o=0,r=0,i={};i.read=function(){for(;r<8;){if(n>=t.length){if(r==0)return-1;throw"unexpected end of file./"+r}let l=t.charAt(n);if(n+=1,l=="=")return r=0,-1;if(l.match(/^\s$/))continue;o=o<<6|a(l.charCodeAt(0)),r+=6}let s=o>>>r-8&255;return r-=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},soe=function(e,t){let n=e,o=t,r=new Array(e*t),i={};i.setPixel=function(c,u,p){r[u*n+c]=p},i.write=function(c){c.writeString("GIF87a"),c.writeShort(n),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(n),c.writeShort(o),c.writeByte(0);let u=2,p=s(u);c.writeByte(u);let m=0;for(;p.length-m>255;)c.writeByte(255),c.writeBytes(p,m,255),m+=255;c.writeByte(p.length-m),c.writeBytes(p,m,p.length-m),c.writeByte(0),c.writeString(";")};let a=function(c){let u=c,p=0,m=0,f={};return f.write=function(g,v){if(g>>>v)throw"length over";for(;p+v>=8;)u.writeByte(255&(g<<p|m)),v-=8-p,g>>>=8-p,m=0,p=0;m=g<<p|m,p=p+v},f.flush=function(){p>0&&u.writeByte(m)},f},s=function(c){let u=1<<c,p=(1<<c)+1,m=c+1,f=l();for(let h=0;h<u;h+=1)f.add(String.fromCharCode(h));f.add(String.fromCharCode(u)),f.add(String.fromCharCode(p));let g=oU(),v=a(g);v.write(u,m);let b=0,y=String.fromCharCode(r[b]);for(b+=1;b<r.length;){let h=String.fromCharCode(r[b]);b+=1,f.contains(y+h)?y=y+h:(v.write(f.indexOf(y),m),f.size()<4095&&(f.size()==1<<m&&(m+=1),f.add(y+h)),y=h)}return v.write(f.indexOf(y),m),v.write(p,m),v.flush(),g.toByteArray()},l=function(){let c={},u=0,p={};return p.add=function(m){if(p.contains(m))throw"dup key:"+m;c[m]=u,u+=1},p.size=function(){return u},p.indexOf=function(m){return c[m]},p.contains=function(m){return typeof c[m]<"u"},p};return i},loe=function(e,t,n){let o=soe(e,t);for(let s=0;s<t;s+=1)for(let l=0;l<e;l+=1)o.setPixel(l,s,n(l,s));let r=oU();o.write(r);let i=ioe(),a=r.toByteArray();for(let s=0;s<a.length;s+=1)i.writeByte(a[s]);return i.flush(),"data:image/gif;base64,"+i},iU=Mu,p4e=Mu.stringToBytes});function lU({value:e,size:t=128,errorCorrection:n="M",foreground:o="var(--ggui-color-onSurface, #18181b)",background:r="var(--ggui-color-surface, #ffffff)",ariaLabel:i}){let a=sU.useMemo(()=>{try{let l=iU(0,n);l.addData(e),l.make();let c=l.getModuleCount(),u=[];for(let p=0;p<c;p+=1){let m=[];for(let f=0;f<c;f+=1)m.push(l.isDark(p,f));u.push(m)}return u}catch{return null}},[e,n]);if(a===null)return null;let s=a.length;return(0,gm.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,gm.jsx)("rect",{width:s,height:s,fill:r}),a.flatMap((l,c)=>l.map((u,p)=>u?(0,gm.jsx)("rect",{x:p,y:c,width:1,height:1,fill:o},`${p}-${c}`):null))]})}var sU,gm,cU=_(()=>{"use strict";sU=O(J(),1);aU();gm=O(G(),1)});function uoe(){let e="var(--ggui-color-onSurface, #292929)",t="var(--ggui-color-neutral-300, #d1d5db)";return(0,Ie.jsxs)("svg",{viewBox:"0 0 224 50",width:"72",height:"16",role:"img","aria-label":"ggui",style:{display:"block",flexShrink:0},children:[(0,Ie.jsx)("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:t}),(0,Ie.jsx)("rect",{x:"33",y:"33",width:"17",height:"17",fill:e}),(0,Ie.jsx)("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:e}),(0,Ie.jsx)("rect",{x:"91",y:"33",width:"17",height:"17",fill:t}),(0,Ie.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,Ie.jsx)("rect",{x:"174",y:"0",width:"50",height:"50",fill:t})]})}function c6({settingsUrl:e,intent:t}){let[n,o]=Xv.useState("idle"),r=Xv.useCallback(()=>{typeof console<"u"&&console.log("[ggui:no-creds-card] click \u2192 settingsUrl =",e),o("working"),eU(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"),doe)})},[e]);return(0,Ie.jsx)(mi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,Ie.jsxs)($t,{gap:"lg",children:[(0,Ie.jsxs)($t,{gap:"md",children:[(0,Ie.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,Ie.jsx)(uoe,{}),(0,Ie.jsx)(Ao,{variant:"info",children:"Setup needed"})]}),(0,Ie.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ie.jsx)(Nn,{level:3,children:"Connect an LLM provider"}),(0,Ie.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:coe})]}),(0,Ie.jsx)(Je,{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,Ie.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,Ie.jsxs)("div",{style:{display:"flex",gap:"var(--ggui-spacing-4, 16px)",alignItems:"flex-start",flexWrap:"wrap"},children:[(0,Ie.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)"},children:[(0,Ie.jsx)("div",{style:{padding:"var(--ggui-spacing-2, 8px)",background:"#ffffff",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:0},children:(0,Ie.jsx)(lU,{value:e,size:120,foreground:"#000000",background:"#ffffff"})}),(0,Ie.jsx)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)",textAlign:"center"},children:"Scan with your phone"})]}),(0,Ie.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",flex:"1 1 240px",minWidth:"200px"},children:[(0,Ie.jsx)(Je,{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,Ie.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,Ie.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Ie.jsx)(We,{variant:"primary",size:"md",onClick:r,disabled:n==="working",children:n==="working"?"Opening\u2026":n==="opened"?"Opened in browser \u2713":n==="copied"?"URL copied \u2014 paste in your browser":n==="manual"?"Tap the URL above to copy":"Open settings"}),n==="idle"||n==="working"?(0,Ie.jsx)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.85},children:"or tap-and-hold the URL above to copy"}):null]})]})]})}),t?(0,Ie.jsxs)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Pending prompt: ",t]}):null]})})}var Xv,Ie,coe,doe,uU=_(()=>{"use strict";Xv=O(J(),1);wu();tU();cU();Ie=O(G(),1),coe="0.6.3+e2a3471c";doe=4e3});function foe(){let e=hr.useRef(1e4),t=hr.useRef(new Map);return hr.useEffect(()=>{let n=o=>{let r=o.data;if(r===null||typeof r!="object")return;let i=r.id;if(typeof i!="number")return;let a=t.current.get(i);a!==void 0&&(t.current.delete(i),a(r))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[]),hr.useCallback((n,o)=>new Promise(r=>{let i=e.current;e.current+=1,t.current.set(i,r);try{window.parent.postMessage({jsonrpc:"2.0",id:i,method:n,params:o??{}},"*")}catch(a){t.current.delete(i),r({error:{code:-32099,message:a instanceof Error?a.message:String(a)}})}window.setTimeout(()=>{t.current.delete(i)&&r({error:{code:-32001,message:"TIMEOUT"}})},poe)}),[])}function moe(){let[e,t]=hr.useState([]),n=hr.useRef(0);return hr.useEffect(()=>{let o=r=>{let i=r.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;n.current+=1;let l={id:n.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 goe(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 hoe(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function yoe(e){if(e==null||typeof e!="object"||Array.isArray(e))return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,r])=>{if(r===null)return`${o}: null`;if(typeof r=="string")return`${o}: ${r}`;if(typeof r=="number"||typeof r=="boolean")return`${o}: ${r}`;let i=JSON.stringify(r);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function hm({method:e,description:t,call:n}){let[o,r]=hr.useState({state:"idle"}),i=hr.useCallback(()=>{let l=Date.now();r({state:"pending",startedAtMs:l});let c=goe(e);n(e,c).then(u=>{if(u.error){r({state:"error",code:u.error.code??"?",message:u.error.message??"(no message)"});return}if(r({state:"success",result:u.result??{}}),e==="tools/call"){let m=(c.arguments??{}).payload??{},f=String(m.intent??"?"),g=m.data,v=yoe(g),b=v===""?"":` (${v})`,y=new Date().toISOString(),h=hoe(`${f}|${JSON.stringify(g??null)}|${y}`);n("ui/update-model-context",{content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:h,intent:f,data:g??null,firedAt:y})}`}]}),n("ui/message",{role:"user",content:[{type:"text",text:`Please proceed with **${f}**${b}. [id: \`${h}\`]`}]})}})},[n,e]),a=o.state==="pending"?"Sending\u2026":o.state==="success"?"Send again \u2713":o.state==="error"?"Retry":"Send",s=o.state==="idle"?(0,pe.jsx)(Ao,{variant:"default",children:"idle"}):o.state==="pending"?(0,pe.jsx)(Ao,{variant:"info",children:"pending"}):o.state==="success"?(0,pe.jsx)(Ao,{variant:"success",children:"success"}):(0,pe.jsx)(Ao,{variant:"warning",children:"error"});return(0,pe.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,pe.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,pe.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,pe.jsx)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:t}),(0,pe.jsx)("div",{style:{display:"flex",gap:"var(--ggui-spacing-2, 8px)"},children:(0,pe.jsx)(We,{variant:"primary",size:"sm",onClick:i,disabled:o.state==="pending",children:a})}),o.state==="success"||o.state==="error"?(0,pe.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 u6({intent:e}){let t=foe(),n=moe();return(0,pe.jsx)(mi,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,pe.jsxs)($t,{gap:"lg",children:[(0,pe.jsxs)($t,{gap:"sm",children:[(0,pe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,pe.jsx)(Nn,{level:3,children:"MCP Apps protocol probe"}),(0,pe.jsx)(Ao,{variant:"info",children:"diagnostic"})]}),(0,pe.jsxs)(Je,{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,pe.jsx)("code",{children:"tools/call"})," row chains the full submit-action bridge (audit + context + consent), reproducing the production ",(0,pe.jsx)("code",{children:"dispatchSubmitAction"})," envelope shape verbatim. The receive log below captures every notification the host emits while this card is mounted."]})]}),(0,pe.jsxs)($t,{gap:"md",children:[(0,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsx)(hm,{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,pe.jsxs)($t,{gap:"sm",children:[(0,pe.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,pe.jsx)(Nn,{level:4,children:"Receive log"}),(0,pe.jsxs)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[n.length," ",n.length===1?"event":"events"]})]}),n.length===0?(0,pe.jsx)(Je,{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,pe.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:n.map(o=>(0,pe.jsxs)("details",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[(0,pe.jsxs)("summary",{style:{cursor:"pointer",padding:"var(--ggui-spacing-1, 4px) 0",color:"var(--ggui-color-onSurface, #111)"},children:[(0,pe.jsx)("span",{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginRight:"8px"},children:o.tsIso.slice(11,19)}),(0,pe.jsx)("span",{style:{fontWeight:600},children:o.method})]}),(0,pe.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,pe.jsxs)(Je,{size:"xs",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Triggered by: ",e]}):null]})})}var hr,pe,poe,dU=_(()=>{"use strict";hr=O(J(),1);wu();pe=O(G(),1),poe=5e3});function pU(){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 n=typeof navigator<"u"?navigator.userAgent:"";if(/Claude/.test(n))return!0}catch{}return!1}function Qv(){let e=Au.useCallback(()=>typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),[t,n]=Au.useState(e);return Au.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),r=a=>{n(a.matches?"dark":"light")};if(typeof o.addEventListener=="function")return o.addEventListener("change",r),()=>{o.removeEventListener("change",r)};let i=o;return i.addListener(r),()=>{i.removeListener(r)}},[]),t}var Au,d6=_(()=>{"use strict";Au=O(J(),1)});var hU={};bt(hU,{NoCredentialsCard:()=>c6,ProtocolProbeCard:()=>u6,SYSTEM_CARD_REGISTRY:()=>mU,SystemCardHost:()=>$oe,renderSystemCard:()=>gU});function fU(e,t){return function(o){let r=e,i=t(o);return Ba.createElement(r,i)}}function voe({kind:e,props:t}){return Ba.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)"}},Ba.createElement("div",{style:{fontWeight:600,marginBottom:8}},`Unknown system card: ${e}`),Ba.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 gU(e,t){let n=mU[e];return n?Ba.createElement(n,t):Ba.createElement(voe,{kind:e,props:t})}function $oe({kind:e,props:t,themeId:n}){let o=pU(),r=Qv();return Ba.createElement(mE,{theme:r==="dark"?fE:em,mode:r,transparent:o,children:gU(e,t)})}var Ba,mU,yU=_(()=>{"use strict";Ba=O(J(),1);Rv();uU();dU();d6();mU={"no-credentials":fU(c6,e=>{let t=typeof e.settingsUrl=="string"?e.settingsUrl:"",n=typeof e.intent=="string"?e.intent:void 0;return{settingsUrl:t,...n!==void 0?{intent:n}:{}}}),"mcp-apps-probe":fU(u6,e=>{let t=typeof e.intent=="string"?e.intent:void 0;return{...t!==void 0?{intent:t}:{}}})}});var bU={};bt(bU,{UiFeedbackCard:()=>_oe});function xoe(e){let t=e==="dark";return{root:{display:"inline-flex",alignItems:"center",gap:4,fontFamily:boe,fontSize:12,lineHeight:1.2,color:t?"var(--ggui-color-neutral-500, #9ca3af)":"var(--ggui-color-neutral-500, #6b7280)"},verdictButton:{appearance:"none",background:t?"var(--ggui-color-neutral-50, #1f2937)":"var(--ggui-color-neutral-50, #f9fafb)",border:t?"1px solid var(--ggui-color-neutral-200, #374151)":"1px solid var(--ggui-color-neutral-200, #e5e7eb)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",padding:"2px 8px",fontFamily:"inherit",fontSize:"inherit",color:t?"var(--ggui-color-neutral-600, #d1d5db)":"var(--ggui-color-neutral-600, #4b5563)",cursor:"pointer"},dismissButton:{appearance:"none",background:"transparent",border:"none",padding:"2px 4px",fontFamily:"inherit",fontSize:"inherit",color:t?"var(--ggui-color-neutral-400, #6b7280)":"var(--ggui-color-neutral-400, #9ca3af)",cursor:"pointer"},commentForm:{display:"inline-flex",alignItems:"center",gap:4,margin:0},commentInput:{fontFamily:"inherit",fontSize:"inherit",padding:"2px 6px",minWidth:140,border:t?"1px solid var(--ggui-color-neutral-200, #374151)":"1px solid var(--ggui-color-neutral-200, #e5e7eb)",borderRadius:"var(--ggui-shape-radius-sm, 4px)",background:t?"var(--ggui-color-neutral-50, #111827)":"var(--ggui-color-neutral-50, #ffffff)",color:t?"var(--ggui-color-neutral-800, #e5e7eb)":"var(--ggui-color-neutral-800, #1f2937)"}}}function _oe({emit:e,sessionId:t,toolName:n}){let[o,r]=ju.useState("idle"),[i,a]=ju.useState(""),s=Qv(),l=xoe(s),c=ju.useCallback((p,m)=>{let f=m?.trim();e({kind:"ui-feedback",verdict:p,...f!==void 0&&f.length>0?{comment:f}:{},...t!==void 0?{sessionId:t}:{},...n!==void 0?{toolName:n}:{}}),r("sent")},[e,t,n]),u=ju.useCallback(p=>{p.preventDefault(),c("other",i)},[c,i]);return o==="dismissed"?null:(0,or.jsxs)("div",{"data-ggui-ui-feedback":!0,role:"group","aria-label":"Share feedback on this UI",style:l.root,children:[o==="sent"?(0,or.jsx)("span",{"data-ggui-ui-feedback-thanks":!0,children:"Thanks for the feedback"}):o==="comment"?(0,or.jsxs)("form",{onSubmit:u,style:l.commentForm,"data-ggui-ui-feedback-comment-form":!0,children:[(0,or.jsx)("input",{type:"text",value:i,onChange:p=>a(p.target.value),placeholder:"What happened?","aria-label":"Feedback comment","data-ggui-ui-feedback-comment":!0,style:l.commentInput,autoFocus:!0}),(0,or.jsx)("button",{type:"submit",style:l.verdictButton,"data-ggui-ui-feedback-send":!0,children:"Send"})]}):(0,or.jsxs)(or.Fragment,{children:[(0,or.jsx)("button",{type:"button",style:l.verdictButton,"data-ggui-ui-feedback-verdict":"love",onClick:()=>c("love"),children:"Love"}),(0,or.jsx)("button",{type:"button",style:l.verdictButton,"data-ggui-ui-feedback-verdict":"dislike",onClick:()=>c("dislike"),children:"Dislike"}),(0,or.jsx)("button",{type:"button",style:l.verdictButton,"data-ggui-ui-feedback-verdict":"other",onClick:()=>r("comment"),children:"Other\u2026"})]}),(0,or.jsx)("button",{type:"button",style:l.dismissButton,"aria-label":"Dismiss feedback","data-ggui-ui-feedback-dismiss":!0,onClick:()=>r("dismissed"),children:"\xD7"})]})}var ju,or,boe,xU=_(()=>{"use strict";ju=O(J(),1);d6();or=O(G(),1),boe="var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)"});var AU={};bt(AU,{CachingGadgetCatalog:()=>Ioe,InMemoryGadgetCatalog:()=>MU,WrapperConformanceError:()=>m6,createGguiGadget:()=>zoe,defineGadgetPackage:()=>Toe,getPublicEnv:()=>Roe,useCamera:()=>Voe,useClipboardPaste:()=>Noe,useClipboardWrite:()=>Aoe,useFilePicker:()=>Uoe,useGeolocation:()=>Ooe,useMicrophone:()=>Hoe,useNotifications:()=>Doe});function zoe(e){let{hookImpl:t,hook:n,description:o,usage:r,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:n,description:o,usage:r,example:i,...a!==void 0?{gotchas:a}:{},...s!==void 0?{permission:s}:{}},p={...l,exports:[u]},m=tp.safeParse(p);if(!m.success)for(let v of m.error.issues)c.push({path:v.path.map(b=>typeof b=="symbol"?b.toString():b),message:v.message});if(!m.success||c.length>0)throw new m6(typeof e.hook=="string"?e.hook:void 0,c);let f=m.data;return Object.assign((v=>t(v)),{descriptor:Object.freeze(f)})}function Toe(e){let{exports:t,...n}=e,o=[];t.length===0&&o.push({path:["exports"],message:"a gadget package MUST declare at least one export"});let r=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=tp.safeParse({...n,exports:r});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 m6(e.package,o);return i.data}function Roe(e,t,n=globalThis){let o=n.__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 r=o.publicEnv??{};if(Object.prototype.hasOwnProperty.call(r,e))return r[e];if(t?.optional)return;let i=Object.keys(r);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 IU(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 RU(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 Moe(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 joe(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 Poe(e){return{name:e.name,size:e.size,type:e.type,_file:e}}function Loe(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 OU(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 zi,Nu,Du,Pu,Uu,Gr,Ti,m6,MU,Coe,Ioe,Ooe,Aoe,Noe,Doe,Uoe,Hoe,Voe,jU=_(()=>{"use strict";_o();_o();zi=O(J(),1),Nu=O(J(),1),Du=O(J(),1),Pu=O(J(),1),Uu=O(J(),1),Gr=O(J(),1),Ti=O(J(),1),m6=class extends Error{code="wrapper_conformance";violations;constructor(e,t){let n=e?` (${e})`:"",o=t.map(r=>` - ${r.path.join(".")||"<root>"}: ${r.message}`).join(`
|
|
184
184
|
`);super(`gadget spec conformance failed${n}
|
|
185
185
|
${o}`),this.name="WrapperConformanceError",this.violations=t}};MU=class{#e;constructor(e){this.#e=e}static withDefault(e,t){let n=new Map;if(t)for(let[o,r]of t)n.set(o,r);return new Coe(n,e)}async list(e){return this.#e.get(e)??[]}},Coe=class extends MU{#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}},Ioe=class{#e;#n;#r;#t=new Map;#o=new Map;constructor(e,t={}){this.#e=e,this.#n=t.ttlMs??3e4,this.#r=t.now??Date.now}async list(e){let t=this.#r(),n=this.#t.get(e);if(n!==void 0&&n.expiresAt>t)return n.entries;let o=this.#o.get(e);if(o!==void 0)return o;let r=(async()=>{try{let i=await this.#e.list(e);return this.#n>0&&this.#t.set(e,{entries:i,expiresAt:this.#r()+this.#n}),i}finally{this.#o.delete(e)}})();return this.#o.set(e,r),r}invalidate(e){if(e===void 0){this.#t.clear();return}this.#t.delete(e)}};Ooe=e=>{let[t,n]=(0,zi.useState)(void 0),[o,r]=(0,zi.useState)("idle"),[i,a]=(0,zi.useState)(void 0),s=(0,zi.useRef)(null),l=(0,zi.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.geolocation){a({code:"not_supported",message:"Geolocation API unavailable in this environment."}),r("error");return}r("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 m=!1;s.current=navigator.geolocation.watchPosition(f=>{let g=IU(f);n(g),r("active"),m||(m=!0,p(g))},f=>{let g=RU(f);a(g),r(g.code==="permission_denied"?"denied":"error"),m||(m=!0,p(void 0))},u)}):new Promise(p=>{navigator.geolocation.getCurrentPosition(m=>{let f=IU(m);n(f),r("completed"),p(f)},m=>{let f=RU(m);a(f),r(f.code==="permission_denied"?"denied":"error"),p(void 0)},u)})},[e?.enableHighAccuracy,e?.maximumAge,e?.timeout,e?.watch]),c=(0,zi.useCallback)(()=>{s.current!==null&&typeof navigator<"u"&&(navigator.geolocation.clearWatch(s.current),s.current=null),r("completed")},[]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:l,stop:c}};Aoe=e=>{let[t,n]=(0,Nu.useState)(void 0),[o,r]=(0,Nu.useState)("idle"),[i,a]=(0,Nu.useState)(void 0),s=(0,Nu.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."}),r("error");return}let l=e?.text;if(typeof l!="string"){a({code:"unknown",message:"useClipboardWrite: `text` option is required at start() time."}),r("error");return}r("prompting"),a(void 0);try{return await navigator.clipboard.writeText(l),n(l),r("completed"),l}catch(c){let u=Moe(c);a(u),r(u.code==="permission_denied"?"denied":"error");return}},[e?.text]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:s}};Noe=()=>{let[e,t]=(0,Du.useState)(void 0),[n,o]=(0,Du.useState)("idle"),[r,i]=(0,Du.useState)(void 0),a=(0,Du.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=joe(s);i(l),o(l.code==="permission_denied"?"denied":"error");return}},[]);return{value:e,status:n,...r!==void 0?{error:r}:{},start:a}},Doe=e=>{let[t,n]=(0,Pu.useState)(void 0),[o,r]=(0,Pu.useState)("idle"),[i,a]=(0,Pu.useState)(void 0),s=(0,Pu.useCallback)(async()=>{if(typeof Notification>"u"){a({code:"not_supported",message:"Notification API unavailable in this environment."}),r("error");return}if(!e?.title){a({code:"unknown",message:"useNotifications: `title` option required at start()."}),r("error");return}r("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),r("error");return}if(l!=="granted"){a({code:"permission_denied",message:"Notification permission not granted."}),r("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=m=>{let f={outcome:m,...e.tag!==void 0?{tag:e.tag}:{}};n(f),r("completed"),c(f)};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}};Uoe=e=>{let[t,n]=(0,Uu.useState)(void 0),[o,r]=(0,Uu.useState)("idle"),[i,a]=(0,Uu.useState)(void 0),s=(0,Uu.useCallback)(async()=>{if(typeof document>"u"){a({code:"not_supported",message:"File picker requires a DOM environment."}),r("error");return}return r("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."}),r("denied"),l(void 0);return}let p={files:u.map(Poe)};n(p),r("completed"),l(p)},c.click()})},[e?.multiple,e?.accept]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:s}};Hoe=e=>{let[t,n]=(0,Gr.useState)(void 0),[o,r]=(0,Gr.useState)("idle"),[i,a]=(0,Gr.useState)(void 0),s=(0,Gr.useRef)(null),l=(0,Gr.useRef)(null),c=(0,Gr.useRef)(0),u=(0,Gr.useRef)(null),p=(0,Gr.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.mediaDevices||typeof navigator.mediaDevices.getUserMedia!="function"||typeof MediaRecorder>"u"){a({code:"not_supported",message:"MediaRecorder / getUserMedia unavailable."}),r("error");return}r("prompting"),a(void 0);let f;try{f=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(y){let h=Loe(y);a(h),r(h.code==="permission_denied"?"denied":"error");return}l.current=f;let g=e?.mimeType??"audio/webm",v;try{v=new MediaRecorder(f,{mimeType:g})}catch{v=new MediaRecorder(f)}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,x={blob:h,durationMs:$,mimeType:v.mimeType};n(x),r("completed"),l.current?.getTracks().forEach(k=>k.stop()),l.current=null,s.current=null,u.current=null,y(x)},c.current=Date.now(),v.start(),r("active")})},[e?.mimeType]),m=(0,Gr.useCallback)(()=>{s.current&&s.current.state==="recording"?s.current.stop():r("completed")},[]);return{value:t,status:o,...i!==void 0?{error:i}:{},start:p,stop:m}};Voe=e=>{let[t,n]=(0,Ti.useState)(void 0),[o,r]=(0,Ti.useState)("idle"),[i,a]=(0,Ti.useState)(void 0),s=(0,Ti.useRef)(null),l=(0,Ti.useCallback)(()=>{s.current&&(s.current.getTracks().forEach(u=>u.stop()),s.current=null),r("completed")},[]),c=(0,Ti.useCallback)(async()=>{if(typeof navigator>"u"||!navigator.mediaDevices||typeof navigator.mediaDevices.getUserMedia!="function"||typeof document>"u"){a({code:"not_supported",message:"getUserMedia / DOM unavailable."}),r("error");return}r("prompting"),a(void 0);let u;try{u=await navigator.mediaDevices.getUserMedia({video:e?.facingMode?{facingMode:e.facingMode}:!0})}catch(p){let m=OU(p);a(m),r(m.code==="permission_denied"?"denied":"error");return}s.current=u,r("active");try{let p=document.createElement("video");p.srcObject=u,p.muted=!0,await p.play(),await new Promise($=>requestAnimationFrame(()=>$()));let m=document.createElement("canvas"),f=p.videoWidth||640,g=p.videoHeight||480;m.width=f,m.height=g;let v=m.getContext("2d");if(!v){a({code:"unknown",message:"2D canvas context unavailable."}),r("error"),l();return}v.drawImage(p,0,0,f,g);let b=e?.mimeType??"image/png",h={dataUrl:e?.quality!==void 0?m.toDataURL(b,e.quality):m.toDataURL(b),width:f,height:g,mimeType:b};return n(h),r("completed"),l(),h}catch(p){let m=OU(p);a(m),r("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 NU={};bt(NU,{getGlobalRegistry:()=>Zoe,installGlobalRegistry:()=>qoe});function qoe(e,t=globalThis){let o=t.__ggui__?.contexts??{},r={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__=r;let i=t;return i[Fa.react]=e.react,i[Fa.primitives]=e.primitives,i[Fa.components]=e.components,i[Fa.compositions]=e.compositions,i[Fa.interact]=e.interact,i[Fa.tokens]=e.tokens,i[Fa.gadgets]=r.gadgets,i[Fa.publicEnv]=r.publicEnv,r}function Zoe(e=globalThis){return e.__ggui__}var Fa,DU=_(()=>{"use strict";Fa={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 PU={};bt(PU,{loadGadgetRegistry:()=>Foe});async function Foe(e,t,n={}){let o=n.importer??Boe,r=n.integrityLoader??Goe,i=n.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 r({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 Boe,Goe,UU=_(()=>{"use strict";Boe=e=>import(e),Goe=({url:e,integrity:t,name:n})=>new Promise((o,r)=>{if(typeof document>"u"){r(new Error(`[gadgets] SRI loader requires a document; cannot load '${n}' 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=>r(a instanceof Error?a:new Error(`[gadgets] post-preload import failed for '${n}' from '${e}'`)))},{once:!0}),i.addEventListener("error",()=>{r(new Error(`[gadgets] integrity-load failed for '${n}' from '${e}' (likely SRI mismatch or network failure)`))},{once:!0}),document.head.appendChild(i)})});f2();$r();var jV="ai.ggui/render";function m2(e){if(!Cn(e))return{ok:!0};let t=e[jV];if(t===void 0)return{ok:!0};if(!Cn(t))return{ok:!1,reason:"MALFORMED_RENDER"};let n=t;if(typeof n.sessionId!="string"||n.sessionId.length===0||typeof n.appId!="string"||n.appId.length===0||typeof n.runtimeUrl!="string"||n.runtimeUrl.length===0)return{ok:!1,reason:"MALFORMED_RENDER"};let o=n.wsUrl,r=n.wsToken,i=n.expiresAt,a=typeof o=="string"&&o.length>0,s=typeof r=="string"&&r.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=n.lastSequence;if(l!==void 0&&(typeof l!="number"||!Number.isInteger(l)||l<0))return{ok:!1,reason:"MALFORMED_RENDER"};let c=n.codeUrl,u=n.kind,p=n.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 m=n.contractHash,f=n.validatorsUrl,g=typeof m=="string"&&m.length>0&&typeof f=="string"&&f.length>0,v=n.theme!==void 0?yC.safeParse(n.theme):void 0,b=v?.success===!0?v.data:void 0;return{ok:!0,meta:{sessionId:n.sessionId,appId:n.appId,runtimeUrl:n.runtimeUrl,...a&&s?{wsUrl:o,wsToken:r}:{},...i!==void 0?{expiresAt:i}:{},...n.pollingUrl!==void 0?{pollingUrl:n.pollingUrl}:{},...n.themeId!==void 0?{themeId:n.themeId}:{},...n.themeMode!==void 0?{themeMode:n.themeMode}:{},...b!==void 0?{theme:b}:{},...n.gadgets!==void 0?{gadgets:n.gadgets}:{},...n.publicEnv!==void 0?{publicEnv:n.publicEnv}:{},...n.streamWebSocketLocalTools!==void 0?{streamWebSocketLocalTools:n.streamWebSocketLocalTools}:{},...n.permissionsPolicy!==void 0?{permissionsPolicy:n.permissionsPolicy}:{},...l!==void 0?{lastSequence:l}:{},...n.propsJson!==void 0?{propsJson:n.propsJson}:{},...n.contextSlots!==void 0?{contextSlots:n.contextSlots}:{},...g?{contractHash:m,validatorsUrl:f}:{},...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 zh="ggui:renderer-ready",g2="ggui:bootstrap-failed",vC="ggui:observe",$C="ggui:lifecycle";_o();function As(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function So(e){return typeof e=="string"&&e.length>0}function rW(e){if(e===void 0)return;if(!Array.isArray(e))return[];let t=[];for(let n of e){if(!As(n))return[];let o=n.name,r=n.contextName,i=n.schema;if(!So(o))return[];if(!So(r))return[];if(!As(i))return[];let a=n.debounceMs;if(a!==void 0&&typeof a!="number")return[];if(!("default"in n))return[];let s={name:o,contextName:r,schema:i,default:n.default,...a!==void 0?{debounceMs:a}:{}};t.push(s)}return t}function oW(e){if(e===void 0||!Array.isArray(e))return;let t=[];for(let n of e){if(!As(n))return;let o=n.package;if(!So(o))return;let r=n.bundleUrl,i=n.bundleSri,a=So(r)?r:void 0,s=So(i)&&a!==void 0?i:void 0;t.push({package:o,...a!==void 0?{bundleUrl:a}:{},...s!==void 0?{bundleSri:s}:{}})}return t}function iW(e){if(e===void 0||!As(e))return;let t={};for(let[n,o]of Object.entries(e)){if(!Rh.test(n)||typeof o!="string")return;t[n]=o}if(Object.keys(t).length!==0)return t}function aW(e,t){let n=e.expiresAt,o=!1;if(n!==void 0){let g=Date.parse(n);if(Number.isNaN(g))return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};if(g<=Date.now()){if(!t)return{ok:!1,reason:"EXPIRED_BOOTSTRAP"};o=!0,n=void 0}}let r=oW(e.gadgets),i=iW(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,m=rW(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}:{}},...n!==void 0?{expiresAt:n}:{},...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}:{},...r!==void 0?{gadgets:r}:{},...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}:{},...m!==void 0?{contextSlots:m}:{},...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 _O(e){if(!So(e.runtimeUrl))return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let t=So(e.wsUrl)&&So(e.wsToken),n=So(e.codeUrl),o=So(e.kind),r=n||o;if(!t&&!r)return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let i=aW(e,r);return i.ok?{ok:!0,meta:i.meta}:i}function T4(){if(typeof globalThis>"u")return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let e=globalThis.__GGUI_META__;if(!As(e))return{ok:!1,reason:"MALFORMED_BOOTSTRAP"};let t=m2(e);return t.ok?t.meta===void 0?{ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}:_O(t.meta):{ok:!1,reason:"MALFORMED_BOOTSTRAP"}}function SO(e){if(!As(e))return{ok:!1,reason:"MISSING_TOOL_OUTPUT"};let t=e._meta;if(!As(t))return{ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"};let o=m2(t);return o.ok?o.meta===void 0?{ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}:_O(o.meta):{ok:!1,reason:"MALFORMED_BOOTSTRAP"}}_o();qn();function _0(e){return!!e._zod}function S0(e,t){return _0(e)?Sl(e,t):e.safeParse(t)}function kO(e){if(!e)return;let t;if(_0(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function wO(e){if(_0(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 n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let o=e.value;if(o!==void 0)return o}Pp();var Wi="io.modelcontextprotocol/related-task",w0="2.0",Ut=Fd(e=>e!==null&&(typeof e=="object"||typeof e=="function")),zO=Ue([R(),ke().int()]),TO=R(),ame=Gt({ttl:ke().optional(),pollInterval:ke().optional()}),lW=B({ttl:ke().optional()}),cW=B({taskId:R()}),O4=Gt({progressToken:zO.optional(),[Wi]:cW.optional()}),ir=B({_meta:O4.optional()}),Up=ir.extend({task:lW.optional()}),CO=e=>Up.safeParse(e).success,sn=B({method:R(),params:ir.loose().optional()}),kr=B({_meta:O4.optional()}),wr=B({method:R(),params:kr.loose().optional()}),ln=Gt({_meta:O4.optional()}),dc=Ue([R(),ke().int()]),IO=B({jsonrpc:K(w0),id:dc,...sn.shape}).strict(),M4=e=>IO.safeParse(e).success,RO=B({jsonrpc:K(w0),...wr.shape}).strict(),OO=e=>RO.safeParse(e).success,A4=B({jsonrpc:K(w0),id:dc,result:ln}).strict(),Lp=e=>A4.safeParse(e).success;var Ne;(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"})(Ne||(Ne={}));var j4=B({jsonrpc:K(w0),id:dc.optional(),error:B({code:ke().int(),message:R(),data:Pe().optional()})}).strict();var MO=e=>j4.safeParse(e).success;var AO=Ue([IO,RO,A4,j4]),sme=Ue([A4,j4]),E0=ln.strict(),uW=kr.extend({requestId:dc.optional(),reason:R().optional()}),z0=wr.extend({method:K("notifications/cancelled"),params:uW}),dW=B({src:R(),mimeType:R().optional(),sizes:ce(R()).optional(),theme:Ft(["light","dark"]).optional()}),Hp=B({icons:ce(dW).optional()}),uc=B({name:R(),title:R().optional()}),Vp=uc.extend({...uc.shape,...Hp.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),pW=bs(B({applyDefaults:ht().optional()}),je(R(),Pe())),fW=Hl(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,bs(B({form:pW.optional(),url:Ut.optional()}),je(R(),Pe()).optional())),mW=Gt({list:Ut.optional(),cancel:Ut.optional(),requests:Gt({sampling:Gt({createMessage:Ut.optional()}).optional(),elicitation:Gt({create:Ut.optional()}).optional()}).optional()}),gW=Gt({list:Ut.optional(),cancel:Ut.optional(),requests:Gt({tools:Gt({call:Ut.optional()}).optional()}).optional()}),hW=B({experimental:je(R(),Ut).optional(),sampling:B({context:Ut.optional(),tools:Ut.optional()}).optional(),elicitation:fW.optional(),roots:B({listChanged:ht().optional()}).optional(),tasks:mW.optional(),extensions:je(R(),Ut).optional()}),yW=ir.extend({protocolVersion:R(),capabilities:hW,clientInfo:Vp}),vW=sn.extend({method:K("initialize"),params:yW});var $W=B({experimental:je(R(),Ut).optional(),logging:Ut.optional(),completions:Ut.optional(),prompts:B({listChanged:ht().optional()}).optional(),resources:B({subscribe:ht().optional(),listChanged:ht().optional()}).optional(),tools:B({listChanged:ht().optional()}).optional(),tasks:gW.optional(),extensions:je(R(),Ut).optional()}),bW=ln.extend({protocolVersion:R(),capabilities:$W,serverInfo:Vp,instructions:R().optional()}),xW=wr.extend({method:K("notifications/initialized"),params:kr.optional()});var pc=sn.extend({method:K("ping"),params:ir.optional()}),_W=B({progress:ke(),total:Ze(ke()),message:Ze(R())}),SW=B({...kr.shape,..._W.shape,progressToken:zO}),T0=wr.extend({method:K("notifications/progress"),params:SW}),kW=ir.extend({cursor:TO.optional()}),qp=sn.extend({params:kW.optional()}),Zp=ln.extend({nextCursor:TO.optional()}),wW=Ft(["working","input_required","completed","failed","cancelled"]),Bp=B({taskId:R(),status:wW,ttl:Ue([ke(),Ml()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:Ze(ke()),statusMessage:Ze(R())}),C0=ln.extend({task:Bp}),EW=kr.merge(Bp),Gp=wr.extend({method:K("notifications/tasks/status"),params:EW}),I0=sn.extend({method:K("tasks/get"),params:ir.extend({taskId:R()})}),R0=ln.merge(Bp),O0=sn.extend({method:K("tasks/result"),params:ir.extend({taskId:R()})}),lme=ln.loose(),M0=qp.extend({method:K("tasks/list")}),A0=Zp.extend({tasks:ce(Bp)}),j0=sn.extend({method:K("tasks/cancel"),params:ir.extend({taskId:R()})}),jO=ln.merge(Bp),NO=B({uri:R(),mimeType:Ze(R()),_meta:je(R(),Pe()).optional()}),DO=NO.extend({text:R()}),N4=R().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),PO=NO.extend({blob:N4}),Fp=Ft(["user","assistant"]),fc=B({audience:ce(Fp).optional(),priority:ke().min(0).max(1).optional(),lastModified:Uo.datetime({offset:!0}).optional()}),UO=B({...uc.shape,...Hp.shape,uri:R(),description:Ze(R()),mimeType:Ze(R()),size:Ze(ke()),annotations:fc.optional(),_meta:Ze(Gt({}))}),zW=B({...uc.shape,...Hp.shape,uriTemplate:R(),description:Ze(R()),mimeType:Ze(R()),annotations:fc.optional(),_meta:Ze(Gt({}))}),TW=qp.extend({method:K("resources/list")}),D4=Zp.extend({resources:ce(UO)}),CW=qp.extend({method:K("resources/templates/list")}),IW=Zp.extend({resourceTemplates:ce(zW)}),P4=ir.extend({uri:R()}),RW=P4,OW=sn.extend({method:K("resources/read"),params:RW}),U4=ln.extend({contents:ce(Ue([DO,PO]))}),MW=wr.extend({method:K("notifications/resources/list_changed"),params:kr.optional()}),AW=P4,jW=sn.extend({method:K("resources/subscribe"),params:AW}),NW=P4,DW=sn.extend({method:K("resources/unsubscribe"),params:NW}),PW=kr.extend({uri:R()}),UW=wr.extend({method:K("notifications/resources/updated"),params:PW}),LW=B({name:R(),description:Ze(R()),required:Ze(ht())}),HW=B({...uc.shape,...Hp.shape,description:Ze(R()),arguments:Ze(ce(LW)),_meta:Ze(Gt({}))}),VW=qp.extend({method:K("prompts/list")}),qW=Zp.extend({prompts:ce(HW)}),ZW=ir.extend({name:R(),arguments:je(R(),R()).optional()}),BW=sn.extend({method:K("prompts/get"),params:ZW}),L4=B({type:K("text"),text:R(),annotations:fc.optional(),_meta:je(R(),Pe()).optional()}),H4=B({type:K("image"),data:N4,mimeType:R(),annotations:fc.optional(),_meta:je(R(),Pe()).optional()}),V4=B({type:K("audio"),data:N4,mimeType:R(),annotations:fc.optional(),_meta:je(R(),Pe()).optional()}),GW=B({type:K("tool_use"),name:R(),id:R(),input:je(R(),Pe()),_meta:je(R(),Pe()).optional()}),q4=B({type:K("resource"),resource:Ue([DO,PO]),annotations:fc.optional(),_meta:je(R(),Pe()).optional()}),Z4=UO.extend({type:K("resource_link")}),mc=Ue([L4,H4,V4,Z4,q4]),FW=B({role:Fp,content:mc}),KW=ln.extend({description:R().optional(),messages:ce(FW)}),JW=wr.extend({method:K("notifications/prompts/list_changed"),params:kr.optional()}),WW=B({title:R().optional(),readOnlyHint:ht().optional(),destructiveHint:ht().optional(),idempotentHint:ht().optional(),openWorldHint:ht().optional()}),YW=B({taskSupport:Ft(["required","optional","forbidden"]).optional()}),N0=B({...uc.shape,...Hp.shape,description:R().optional(),inputSchema:B({type:K("object"),properties:je(R(),Ut).optional(),required:ce(R()).optional()}).catchall(Pe()),outputSchema:B({type:K("object"),properties:je(R(),Ut).optional(),required:ce(R()).optional()}).catchall(Pe()).optional(),annotations:WW.optional(),execution:YW.optional(),_meta:je(R(),Pe()).optional()}),B4=qp.extend({method:K("tools/list")}),XW=Zp.extend({tools:ce(N0)}),gc=ln.extend({content:ce(mc).default([]),structuredContent:je(R(),Pe()).optional(),isError:ht().optional()}),cme=gc.or(ln.extend({toolResult:Pe()})),QW=Up.extend({name:R(),arguments:je(R(),Pe()).optional()}),G4=sn.extend({method:K("tools/call"),params:QW}),eY=wr.extend({method:K("notifications/tools/list_changed"),params:kr.optional()}),ume=B({autoRefresh:ht().default(!0),debounceMs:ke().int().nonnegative().default(300)}),LO=Ft(["debug","info","notice","warning","error","critical","alert","emergency"]),tY=ir.extend({level:LO}),nY=sn.extend({method:K("logging/setLevel"),params:tY}),rY=kr.extend({level:LO,logger:R().optional(),data:Pe()}),oY=wr.extend({method:K("notifications/message"),params:rY}),iY=B({name:R().optional()}),aY=B({hints:ce(iY).optional(),costPriority:ke().min(0).max(1).optional(),speedPriority:ke().min(0).max(1).optional(),intelligencePriority:ke().min(0).max(1).optional()}),sY=B({mode:Ft(["auto","required","none"]).optional()}),lY=B({type:K("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:ce(mc).default([]),structuredContent:B({}).loose().optional(),isError:ht().optional(),_meta:je(R(),Pe()).optional()}),cY=Dl("type",[L4,H4,V4]),k0=Dl("type",[L4,H4,V4,GW,lY]),uY=B({role:Fp,content:Ue([k0,ce(k0)]),_meta:je(R(),Pe()).optional()}),dY=Up.extend({messages:ce(uY),modelPreferences:aY.optional(),systemPrompt:R().optional(),includeContext:Ft(["none","thisServer","allServers"]).optional(),temperature:ke().optional(),maxTokens:ke().int(),stopSequences:ce(R()).optional(),metadata:Ut.optional(),tools:ce(N0).optional(),toolChoice:sY.optional()}),pY=sn.extend({method:K("sampling/createMessage"),params:dY}),F4=ln.extend({model:R(),stopReason:Ze(Ft(["endTurn","stopSequence","maxTokens"]).or(R())),role:Fp,content:cY}),K4=ln.extend({model:R(),stopReason:Ze(Ft(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:Fp,content:Ue([k0,ce(k0)])}),fY=B({type:K("boolean"),title:R().optional(),description:R().optional(),default:ht().optional()}),mY=B({type:K("string"),title:R().optional(),description:R().optional(),minLength:ke().optional(),maxLength:ke().optional(),format:Ft(["email","uri","date","date-time"]).optional(),default:R().optional()}),gY=B({type:Ft(["number","integer"]),title:R().optional(),description:R().optional(),minimum:ke().optional(),maximum:ke().optional(),default:ke().optional()}),hY=B({type:K("string"),title:R().optional(),description:R().optional(),enum:ce(R()),default:R().optional()}),yY=B({type:K("string"),title:R().optional(),description:R().optional(),oneOf:ce(B({const:R(),title:R()})),default:R().optional()}),vY=B({type:K("string"),title:R().optional(),description:R().optional(),enum:ce(R()),enumNames:ce(R()).optional(),default:R().optional()}),$Y=Ue([hY,yY]),bY=B({type:K("array"),title:R().optional(),description:R().optional(),minItems:ke().optional(),maxItems:ke().optional(),items:B({type:K("string"),enum:ce(R())}),default:ce(R()).optional()}),xY=B({type:K("array"),title:R().optional(),description:R().optional(),minItems:ke().optional(),maxItems:ke().optional(),items:B({anyOf:ce(B({const:R(),title:R()}))}),default:ce(R()).optional()}),_Y=Ue([bY,xY]),SY=Ue([vY,$Y,_Y]),kY=Ue([SY,fY,mY,gY]),wY=Up.extend({mode:K("form").optional(),message:R(),requestedSchema:B({type:K("object"),properties:je(R(),kY),required:ce(R()).optional()})}),EY=Up.extend({mode:K("url"),message:R(),elicitationId:R(),url:R().url()}),zY=Ue([wY,EY]),TY=sn.extend({method:K("elicitation/create"),params:zY}),CY=kr.extend({elicitationId:R()}),IY=wr.extend({method:K("notifications/elicitation/complete"),params:CY}),RY=ln.extend({action:Ft(["accept","decline","cancel"]),content:Hl(e=>e===null?void 0:e,je(R(),Ue([R(),ke(),ht(),ce(R())])).optional())}),OY=B({type:K("ref/resource"),uri:R()});var MY=B({type:K("ref/prompt"),name:R()}),AY=ir.extend({ref:Ue([MY,OY]),argument:B({name:R(),value:R()}),context:B({arguments:je(R(),R()).optional()}).optional()}),jY=sn.extend({method:K("completion/complete"),params:AY});var NY=ln.extend({completion:Gt({values:ce(R()).max(100),total:Ze(ke().int()),hasMore:Ze(ht())})}),DY=B({uri:R().startsWith("file://"),name:R().optional(),_meta:je(R(),Pe()).optional()}),PY=sn.extend({method:K("roots/list"),params:ir.optional()}),UY=ln.extend({roots:ce(DY)}),LY=wr.extend({method:K("notifications/roots/list_changed"),params:kr.optional()}),dme=Ue([pc,vW,jY,nY,BW,VW,TW,CW,OW,jW,DW,G4,B4,I0,O0,M0,j0]),pme=Ue([z0,T0,xW,LY,Gp]),fme=Ue([E0,F4,K4,RY,UY,R0,A0,C0]),mme=Ue([pc,pY,TY,PY,I0,O0,M0,j0]),gme=Ue([z0,T0,oY,UW,MW,eY,JW,Gp,IY]),hme=Ue([E0,bW,NY,KW,qW,D4,IW,U4,gc,XW,R0,A0,C0]),ze=class e extends Error{constructor(t,n,o){super(`MCP error ${t}: ${n}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,n,o){if(t===Ne.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new R4(r.elicitations,n)}return new e(t,n,o)}},R4=class extends ze{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(Ne.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Yi(e){return e==="completed"||e==="failed"||e==="cancelled"}var HY=Symbol("Let zodToJsonSchema decide on which parser to use");var Jme=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function J4(e){let n=kO(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=wO(n);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function W4(e,t){let n=S0(e,t);if(!n.success)throw n.error;return n.data}var FY=6e4,D0=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(z0,n=>{this._oncancel(n)}),this.setNotificationHandler(T0,n=>{this._onprogress(n)}),this.setRequestHandler(pc,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(I0,async(n,o)=>{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new ze(Ne.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(O0,async(n,o)=>{let r=async()=>{let i=n.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,m=new ze(p.error.code,p.error.message,p.error.data);u(m)}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 ze(Ne.InvalidParams,`Task not found: ${i}`);if(!Yi(a.status))return await this._waitForTaskUpdate(i,o.signal),await r();if(Yi(a.status)){let s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[Wi]:{taskId:i}}}}return await r()};return await r()}),this.setRequestHandler(M0,async(n,o)=>{try{let{tasks:r,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,o.sessionId);return{tasks:r,nextCursor:i,_meta:{}}}catch(r){throw new ze(Ne.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(j0,async(n,o)=>{try{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new ze(Ne.InvalidParams,`Task not found: ${n.params.taskId}`);if(Yi(r.status))throw new ze(Ne.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!i)throw new ze(Ne.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(r){throw r instanceof ze?r:new ze(Ne.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,o,r,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let o=Date.now()-n.startTime;if(n.maxTotalTimeout&&o>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),ze.fromError(Ne.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:o});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.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 n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let r=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{r?.(i,a),Lp(i)||MO(i)?this._onresponse(i):M4(i)?this._onrequest(i,a):OO(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._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let n=ze.fromError(Ne.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,n){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,i=t.params?._meta?.[Wi]?.taskId;if(o===void 0){let u={jsonrpc:"2.0",id:t.id,error:{code:Ne.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:u,timestamp:Date.now()},r?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):r?.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=CO(t.params)?t.params.task:void 0,l=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.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,m)=>{if(a.signal.aborted)throw new ze(Ne.ConnectionClosed,"Request was cancelled");let f={...m,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let g=f.relatedTask?.taskId??i;return g&&l&&await l.updateTaskStatus(g,"input_required"),await this.request(u,p,f)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:l,taskRequestedTtl:s?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.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()},r?.sessionId):await r?.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:Ne.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()},r?.sessionId):await r?.send(p)}).catch(u=>this._onerror(new Error(`Failed to send response: ${u}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===a&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...o}=t.params,r=Number(n),i=this._progressHandlers.get(r);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(l){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(l);return}i(o)}_onresponse(t){let n=Number(t.id),o=this._requestResolvers.get(n);if(o){if(this._requestResolvers.delete(n),Lp(t))o(t);else{let a=new ze(t.error.code,t.error.message,t.error.data);o(a)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(Lp(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,n))}}if(i||this._progressHandlers.delete(n),Lp(t))r(t);else{let a=ze.fromError(t.error.code,t.error.message,t.error.data);r(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,o){let{task:r}=o??{};if(!r){try{yield{type:"result",result:await this.request(t,n,o)}}catch(a){yield{type:"error",error:a instanceof ze?a:new ze(Ne.InternalError,String(a))}}return}let i;try{let a=await this.request(t,C0,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new ze(Ne.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Yi(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)}:s.status==="failed"?yield{type:"error",error:new ze(Ne.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new ze(Ne.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,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 ze?a:new ze(Ne.InternalError,String(a))}}}request(t,n,o){let{relatedRequestId:r,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 m=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:m};o?.onprogress&&(this._progressHandlers.set(m,o.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:m}}),s&&(f.params={...f.params,task:s}),l&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Wi]:l}});let g=h=>{this._responseHandlers.delete(m),this._progressHandlers.delete(m),this._cleanupTimeout(m),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:m,reason:String(h)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(x=>this._onerror(new Error(`Failed to send cancellation: ${x}`)));let $=h instanceof ze?h:new ze(Ne.RequestTimeout,String(h));u($)};this._responseHandlers.set(m,h=>{if(!o?.signal?.aborted){if(h instanceof Error)return u(h);try{let $=S0(n,h.result);$.success?c($.data):u($.error)}catch($){u($)}}}),o?.signal?.addEventListener("abort",()=>{g(o?.signal?.reason)});let v=o?.timeout??FY,b=()=>g(ze.fromError(Ne.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(m,v,o?.maxTotalTimeout,b,o?.resetTimeoutOnProgress??!1);let y=l?.taskId;if(y){let h=$=>{let x=this._responseHandlers.get(m);x?x($):this._onerror(new Error(`Response handler missing for side-channeled request ${m}`))};this._requestResolvers.set(m,h),this._enqueueTaskMessage(y,{type:"request",message:f,timestamp:Date.now()}).catch($=>{this._cleanupTimeout(m),u($)})}else this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(h=>{this._cleanupTimeout(m),u(h)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},R0,n)}async getTaskResult(t,n,o){return this.request({method:"tasks/result",params:t},n,o)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},A0,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},jO,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=n?.relatedTask?.taskId;if(o){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Wi]:n.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.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"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Wi]:n.relatedTask}}}),this._transport?.send(s,n).catch(l=>this._onerror(l))});return}let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Wi]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){let o=J4(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(r,i)=>{let a=W4(t,r);return Promise.resolve(n(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,n){let o=J4(t);this._notificationHandlers.set(o,r=>{let i=W4(t,r);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,o,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,n);for(let r of o)if(r.type==="request"&&M4(r.message)){let i=r.message.id,a=this._requestResolvers.get(i);a?(a(new ze(Ne.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,n){let o=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(t);r?.pollInterval&&(o=r.pollInterval)}catch{}return new Promise((r,i)=>{if(n.aborted){i(new ze(Ne.InvalidRequest,"Request cancelled"));return}let a=setTimeout(r,o);n.addEventListener("abort",()=>{clearTimeout(a),i(new ze(Ne.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await o.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let i=await o.getTask(r,n);if(!i)throw new ze(Ne.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(r,i,a)=>{await o.storeTaskResult(r,i,a,n);let s=await o.getTask(r,n);if(s){let l=Gp.parse({method:"notifications/tasks/status",params:s});await this.notification(l),Yi(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>o.getTaskResult(r,n),updateTaskStatus:async(r,i,a)=>{let s=await o.getTask(r,n);if(!s)throw new ze(Ne.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Yi(s.status))throw new ze(Ne.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(r,i,a,n);let l=await o.getTask(r,n);if(l){let c=Gp.parse({method:"notifications/tasks/status",params:l});await this.notification(c),Yi(l.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>o.listTasks(r,n)}}};function HO(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function VO(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];HO(a)&&HO(i)?n[r]={...a,...i}:n[r]=i}return n}Pp();Pp();var F0e=(e=>typeof Ja<"u"?Ja:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof Ja<"u"?Ja:t)[n]}):e)(function(e){if(typeof Ja<"u")return Ja.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Y4=class extends D0{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(t,n){}_ensureEventSlot(t){let n=this._eventSlots.get(t);if(!n){let o=this.eventSchemas[t];if(!o)throw Error(`Unknown event: ${String(t)}`);n={listeners:[]},this._eventSlots.set(t,n);let r=o.shape.method.value;this._registeredMethods.add(r);let i=n;super.setNotificationHandler(o,a=>{let s=a.params;this.onEventDispatch(t,s),i.onHandler?.(s);for(let l of[...i.listeners])l(s)})}return n}setEventHandler(t,n){let o=this._ensureEventSlot(t);o.onHandler&&n&&console.warn(`[MCP Apps] on${String(t)} handler replaced. Use addEventListener("${String(t)}", \u2026) to add multiple listeners without replacing.`),o.onHandler=n}getEventHandler(t){return this._eventSlots.get(t)?.onHandler}addEventListener(t,n){this._ensureEventSlot(t).listeners.push(n)}removeEventListener(t,n){let o=this._eventSlots.get(t);if(!o)return;let r=o.listeners.indexOf(n);r!==-1&&o.listeners.splice(r,1)}setRequestHandler=(t,n)=>{this._assertMethodNotRegistered(t,"setRequestHandler"),super.setRequestHandler(t,n)};setNotificationHandler=(t,n)=>{this._assertMethodNotRegistered(t,"setNotificationHandler"),super.setNotificationHandler(t,n)};warnIfRequestHandlerReplaced(t,n,o){n&&o&&console.warn(`[MCP Apps] ${t} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(t,n)=>{let o=t.shape.method.value;this._registeredMethods.add(o),super.setRequestHandler(t,n)};_assertMethodNotRegistered(t,n){let o=t.shape.method.value;if(this._registeredMethods.has(o))throw Error(`Handler for "${o}" already registered (via ${n}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(o)}},X4="2026-01-26";var KY="ui/notifications/tool-input-partial";var Jp=class{eventTarget;eventSource;messageListener;constructor(t=window.parent,n){this.eventTarget=t,this.eventSource=n,this.messageListener=o=>{if(n&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let r=AO.safeParse(o.data);r.success?(console.debug("Parsed message",r.data),this.onmessage?.(r.data)):o.data?.jsonrpc!=="2.0"?console.debug("Ignoring non-JSON-RPC message",r.error.message,o):(console.error("Failed to parse message",r.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+r.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(t,n){t.method!==KY&&console.debug("Sending message",t),this.eventTarget.postMessage(t,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},JY=d.union([d.literal("light"),d.literal("dark")]).describe("Color theme preference for the host environment."),Wp=d.union([d.literal("inline"),d.literal("fullscreen"),d.literal("pip")]).describe("Display mode for UI presentation."),WY=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."),YY=d.record(WY.describe(`Style variables for theming MCP apps.
|
|
186
186
|
|
|
@@ -281,7 +281,7 @@ ${p}`}var Xte=["useAction","useStream","useAuth","useApp","useRender","useGguiCo
|
|
|
281
281
|
}
|
|
282
282
|
}`,UE=[m9,g9,h9,y9].join(`
|
|
283
283
|
|
|
284
|
-
`);var cm=O(G(),1),v9=O(J(),1);function pre(){if(typeof document>"u"||document.getElementById(qv))return;let e=document.createElement("style");e.id=qv,e.textContent=UE,document.head.appendChild(e)}function LE({children:e,frozen:t=!1,className:n,style:o}){(0,v9.useEffect)(()=>{pre()},[]);let r={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,cm.jsxs)("div",{"data-ggui-preview":"","data-ggui-preview-frozen":t?"":void 0,className:n,style:r,"aria-busy":"true",children:[(0,cm.jsx)("div",{style:{position:"relative",pointerEvents:"none"},children:e}),(0,cm.jsx)("div",{"aria-hidden":"true",style:i})]})}var $9=O(G(),1);function HE({children:e,delayMs:t=0,className:n,style:o}){let r={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,t)}ms`,...o};return(0,$9.jsx)("div",{className:n,style:r,children:e})}var Zv=O(G(),1);function Bv({children:e,streaming:t=!1,className:n,style:o}){let r={display:"inline",...o};return(0,Zv.jsxs)("span",{className:n,"data-ggui-preview-streaming":t?"":void 0,style:r,children:[e,t?(0,Zv.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 b9=O(G(),1),x9=O(J(),1);wu();YE();XE();QE();a6();Rv();var Vre="_ggui:preview",qre="root",Y7={surfaceId:null,fragments:new Map};function Zre(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 n=new Map(e.fragments);for(let o of t.updateComponents.components)n.set(o.id,o);return{...e,fragments:n}}return"deleteSurface"in t?e.surfaceId!==t.deleteSurface.surfaceId?e:Y7:e}function Bre(e){let t=Y7;for(let n of e){let o=aP(n.payload);o.ok&&(t=Zre(t,o.value))}return t}function J7(){return(0,de.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 Gre({name:e}){return(0,de.createElement)(mi,{padding:12,shadow:"none",border:!0},(0,de.createElement)(Je,{size:"xs",tone:"muted"},`[${e}]`))}function s6(){}function l6(e,t){let n=i=>i?i.map(a=>{let s=t.get(a);return s?l6(s,t):(0,de.createElement)(J7,{key:a})}):[],{id:o}=e,r=i=>(0,de.createElement)(HE,{key:o,children:i});switch(e.component){case"Row":return r((0,de.createElement)(so,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...n(e.children)));case"Column":return r((0,de.createElement)($t,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...n(e.children)));case"List":return r((0,de.createElement)($t,{direction:"vertical",gap:8},...n(e.children)));case"Card":{let i=e.child?t.get(e.child):void 0,a=e.child&&!i?(0,de.createElement)(J7):i?l6(i,t):null;return r((0,de.createElement)(mi,{padding:16,shadow:"sm"},a))}case"Divider":return r((0,de.createElement)(rl,{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 r((0,de.createElement)(Nn,{level:l},(0,de.createElement)(Bv,null,(0,de.createElement)(dm,{markdown:e.text}))))}return r((0,de.createElement)(Je,i==="caption"?{size:"xs",tone:"muted"}:i==="label"?{size:"sm",weight:"medium"}:{},(0,de.createElement)(Bv,null,(0,de.createElement)(dm,{markdown:e.text}))))}case"Image":return r((0,de.createElement)(Uv,{src:e.src,alt:e.alt??""}));case"Icon":return r((0,de.createElement)(_e,{name:e.name}));case"Button":return r((0,de.createElement)(We,{disabled:!0},e.label));case"TextField":return r((0,de.createElement)($u,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:s6}));case"CheckBox":return r((0,de.createElement)(al,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:s6}));case"ChoicePicker":{let i=e.options??[];return r((0,de.createElement)(Nv,{disabled:!0,label:e.label,value:e.value??"",options:i,onChange:s6}))}default:return r((0,de.createElement)(Gre,{name:e.component}))}}function Fre({envelopes:e,suspended:t,fallback:n}){let o=Bre(e);if(t)return null;let r=o.fragments.get(qre);return r?(0,de.createElement)(LE,null,l6(r,o.fragments)):(0,de.createElement)(de.Fragment,null,n??(0,de.createElement)(Kre))}function Kre(){return(0,de.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80}},(0,de.createElement)(At))}function Jre({controlRef:e,onAttach:t,fallback:n}){let[o,r]=(0,de.useState)([]),[i,a]=(0,de.useState)(!1);return(0,de.useEffect)(()=>(e.current={pushEnvelope:s=>{s.channel===Vre&&r(l=>[...l,s])},suspend:()=>a(!0),resume:()=>a(!1)},t?.(),()=>{e.current=null}),[e,t]),(0,de.createElement)(Fre,{envelopes:o,suspended:i,...n!==void 0?{fallback:n}:{}})}function X7(e,t={}){e.replaceChildren();let n=(0,W7.createRoot)(e),o={current:null},r=[],i=null;function a(){let s=o.current;if(s!==null){for(let l of r)s.pushEnvelope(l);r.length=0,i===!0&&s.suspend(),i===!1&&s.resume(),i=null}}return n.render((0,de.createElement)(Jre,{controlRef:o,onAttach:a,...t.fallback!==void 0?{fallback:t.fallback}:{}})),{pushEnvelope(s){if(o.current===null){r.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(){n.unmount(),e.replaceChildren()}}}var Wre="0.6.2";function Yre(e){let t=e.serverBaseUrl.replace(/\/$/,""),n=new URLSearchParams({session:e.sessionId,item:e.itemId});return`${t}/mcp-apps/resource?${n.toString()}`}function Xre(e){return`${e.replace(/\/$/,"")}/mcp-apps/tools-call`}function Qre(){return"allow-scripts allow-forms"}function eoe(e){let t=e.permissions;if(!t)return;let n=[];return t.camera&&n.push("camera 'self'"),t.microphone&&n.push("microphone 'self'"),t.geolocation&&n.push("geolocation 'self'"),t.clipboardWrite&&n.push("clipboard-write 'self'"),n.length>0?n.join("; "):void 0}function Q7(e,t){e.replaceChildren();let n=t.serverBaseUrl??"",o=Yre({serverBaseUrl:n,sessionId:t.sessionId,itemId:t.render.id}),r=Xre(n),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",Qre());let s=eoe(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 m=p.data;if(m===null||typeof m!="object"||m.jsonrpc!=="2.0"||typeof m.method!="string")return;let f=m.id??0,g;switch(m.method){case"ui/initialize":{let v=m.params?.protocolVersion,y={protocolVersion:typeof v=="string"&&v.length>0?v:X4,hostInfo:{name:"ggui-iframe-runtime-embed-host",version:Wre},hostCapabilities:{},hostContext:{locale:t.locale??(typeof navigator<"u"?navigator.language:"en-US"),containerDimensions:i}};g={jsonrpc:"2.0",id:f,result:y};break}case"tools/call":{let v=typeof m.params?.name=="string"?m.params.name:"",b=m.params?.arguments,y=b!==null&&typeof b=="object"&&!Array.isArray(b)?b:{};if(v.length===0){g={jsonrpc:"2.0",id:f,error:{code:-32602,message:"tools/call requires params.name"}};break}try{let h=await fetch(r,{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:f,result:$}}else{let $=await h.json().catch(()=>({}));g={jsonrpc:"2.0",id:f,error:{code:h.status===403?-32003:-32e3,message:$.error??`proxy_error_${h.status}`}}}}catch(h){g={jsonrpc:"2.0",id:f,error:{code:-32e3,message:`proxy_fetch_failed: ${String(h)}`}}}break}default:g={jsonrpc:"2.0",id:f,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 vU(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 $U(e,t){let n=t,o="none",r=null,i=null,a=null,s=null,l=null,c=null;function u(){r!==null&&(r.unmount(),r=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=n.render;a=Q7(e,{render:y,sessionId:n.sessionId}),o="mcpApps";return}if(g==="system"){let y=n.render;if(y.type!=="system")return;let[h,$]=await Promise.all([Promise.resolve().then(()=>O(pu(),1)),Promise.resolve().then(()=>(yU(),hU))]),x=h.createRoot(e),k=U=>{U.type==="system"&&x.render((0,p6.createElement)($.SystemCardHost,{kind:U.kind,props:U.props??{},...n.themeId!==void 0?{themeId:n.themeId}:{}}))};k(y),l=x,c=k,o="system";return}if(g==="provisional"){i=X7(e),s=n.streamBus.subscribe("_ggui:preview",y=>{i?.pushEnvelope(y)}),o="provisional";return}let v=n.render;if(v.type==="mcpApps"||v.type==="system")return;let b="gadgetDescriptors"in v&&v.gadgetDescriptors!==void 0?v.gadgetDescriptors.map(y=>y.package):n.gadgetPackages;r=await nP(e,{render:{...v.id!==void 0?{id:v.id}:{},componentCode:v.componentCode??"",...v.props!==void 0?{props:v.props}:{}},...b!==void 0?{gadgetPackages:b}:{},...n.themeId!==void 0?{themeId:n.themeId}:{},...n.themeMode!==void 0?{themeMode:n.themeMode}:{},...n.appTheme!==void 0?{appTheme:n.appTheme}:{},...n.cssOverrides!==void 0?{cssOverrides:n.cssOverrides}:{},...n.onError!==void 0?{onError:n.onError}:{},renderWrapper:m}),o="react"}function m(g){let v=n.scopedWireConfig===null?g:(0,p6.createElement)(V0,{config:n.scopedWireConfig,children:g});return n.wrapOuter!==void 0?n.wrapOuter(v):v}let f=vU(t.render);return await p(f),{get kind(){return o},async update(g){let v=o;n=g;let b=vU(g.render);if(b!==v){u(),await p(b);return}if(b==="react"&&r!==null){let y=g.render;if(y.type==="mcpApps"||y.type==="system")return;await r.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:m});return}if(b==="system"&&c!==null){let y=g.render;if(y.type!=="system")return;c(y);return}},unmount:u}}function f6(e){if(typeof window>"u"||window.parent===null)return;let t={type:vC,event:e};try{window.parent.postMessage(t,"*")}catch{}}var _U=O(J(),1);async function SU(e,t){let n=t.win??(typeof window<"u"?window:void 0);if(n===void 0||n.parent===null||n.parent===n)return null;let[o,r]=await Promise.all([Promise.resolve().then(()=>O(pu(),1)),Promise.resolve().then(()=>(xU(),bU))]);e.querySelector("[data-ggui-ui-feedback-chrome]")?.remove();let i=e.createElement("div");i.setAttribute("data-ggui-ui-feedback-chrome",""),e.body.appendChild(i);let a=o.createRoot(i);return a.render((0,_U.createElement)(r.UiFeedbackCard,{emit:t.emit,...t.sessionId!==void 0?{sessionId:t.sessionId}:{},...t.toolName!==void 0?{toolName:t.toolName}:{}})),{container:i,unmount(){a.unmount(),i.remove()}}}function kU(e){if(typeof window>"u"||window.parent===null)return;let t={type:$C,event:e};try{window.parent.postMessage(t,"*")}catch{}}function e1(e,t){if(t===void 0)return{state:e};let{sessionId:n,error:o}=t;return{state:e,...typeof n=="string"&&n.length>0?{sessionId:n}:{},...o!==void 0?{error:o}:{}}}_o();var Ga=new Map;function koe(e,t,n){let o=e[n.contextName],r;return o!==void 0?r=o:(r=t.createContext([n.default,()=>{}]),r.displayName=n.contextName,e[n.contextName]=r),{name:n.name,contextName:n.contextName,schema:n.schema,debounceMs:n.debounceMs??300,default:n.default,contextRef:r}}function wU(e,t,n){let o=[];for(let r of n)o.push(koe(e,t,r)),Ga.set(r.name,r.default);return o}function woe(e){return{[e.name]:{schema:e.schema}}}function EU(e,t,n){let o=`[ggui:context] ${JSON.stringify(t)}`;e.postUpdateModelContext({content:[{type:"text",text:o}]}),n&&e.postContextMirror({sessionId:n.sessionId,appId:n.appId,snapshot:t})}function zU(){let e={};for(let[t,n]of Ga)e[t]=n;return e}function Eoe(e){let{react:t,poster:n,consoleWarn:o,identity:r}=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 m=()=>{let f=PM(woe(s),s.name,c);if(!f.valid){o!==void 0&&o(`[ggui:context] slot '${s.name}' value rejected:`,f.violations);return}Ga.set(s.name,c),EU(n,zU(),r)};return s.debounceMs<=0?m():p.current=setTimeout(m,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 TU(e){let t=Eoe(e);return o=>{let{slots:r,children:i}=o;return r.length===0?e.react.createElement(e.react.Fragment,null,i):r.reduceRight((a,s)=>e.react.createElement(t,{key:s.contextName,slot:s},a),e.react.createElement(e.react.Fragment,null,i))}}function CU(e,t,n){if(t!==void 0)for(let o of Array.from(Ga.keys()))t.has(o)||Ga.delete(o);Ga.size>0&&EU(e,zU(),n)}var v6="0.6.2",VU=3e4,g6=new Set;function Koe(e){return g6.add(e),()=>{g6.delete(e)}}function Joe(e){for(let t of g6)try{if(t(e)===!0)return}catch{}}var Woe={name:"ggui-iframe-runtime",version:v6},Yoe={availableDisplayModes:["inline","fullscreen","pip"]};function Xoe(){let e=new P0(Woe,Yoe,{autoResize:!0}),t=new Jp(window.parent,window.parent);return{app:e,transport:t}}var $6=null;function Qoe(e){$6=e}function ym(){return $6}function fke(){$6=null}async function eie(e,t){try{return await e.connect(t),{ok:!0}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}function tie(){try{let e={type:zh,version:v6};window.parent.postMessage(e,"*")}catch{}}function nie(e,t){try{let n={type:g2,reason:e,message:t};window.parent.postMessage(n,"*")}catch{}}async function rie(e){let{doc:t,app:n,transport:o,notifyParent:r,renderer:i,onProtocolError:a,onObserve:s,onLifecycle:l}=e,c=e.connectFn??GM,u=e.toolResultTimeoutMs??VU,p=(D,W)=>{r({type:g2,reason:D,message:W}),a?.(HM(D,W)),l?.(e1("error",{error:{code:D,message:W}}))},m=BM(t),f=null;zr(m,"Negotiating with host\u2026","connecting"),r({type:zh,version:v6}),l?.(e1("mounting"));let g=e.preResolvedMeta!==void 0?Promise.resolve(null):uie(n,u),v=await eie(n,o);if(!v.ok)return zr(m,`ui/initialize failed: ${v.message}`,"error"),p("UI_INITIALIZE_FAILED",v.message),{ok:!1,mountedRender:f};Qoe(n);let b;if(e.preResolvedMeta!==void 0)b={ok:!0,meta:e.preResolvedMeta};else{let D=T4();if(D.ok)b=D;else{let W=await g;W!==null?b={ok:!0,meta:W}:b={ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}}}let y=n.getHostContext();if(y!==void 0&&ik(y),b.ok&&b.hostContext===void 0){let D=Oh(y);D!==void 0&&(b={...b,hostContext:D})}if(!b.ok){let D=`slice-meta parse failed: ${b.reason}`;return zr(m,D,"error"),p(b.reason,D),{ok:!1,mountedRender:f}}let h=b.meta;MM(await WM(h.validatorsUrl));let $=h.sessionId,x=i!==void 0?i.setup({meta:h,renderInto:m.renderRoot,statusRefs:m,...s!==void 0?{onObserve:s}:{}}):null;SU(t,{emit:s??f6,sessionId:h.sessionId}),zr(m,`Connecting to ${h.sessionId}\u2026`,"connecting");let k=x===null?oie({meta:h,statusRefs:m,pinnedSessionId:$}):null,U=x?.channelRegistry??k,S=async D=>{let W=D.session;W!==void 0&&W.id===$&&(f=W,x!==null&&(await x.applyRender(W),W.type!=="mcpApps"&&W.type!=="system"&&x.channelTransport.applyRender({sessionId:W.id,...W.streamSpec!==void 0?{streamSpec:W.streamSpec}:{}})))},T=!1,w=()=>{T||(T=!0,l?.(e1("code-ready",{sessionId:h.sessionId})))},C=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(x!==null&&C){h.gadgets!==void 0&&h.gadgets.length>0&&await x.composedGadgets;let D=null;try{D=await qU(h)}catch(W){let Se=W instanceof Error?W.message:String(W);if(!M)return zr(m,`static mount failed: ${Se}`,"error"),p("UI_INITIALIZE_FAILED",Se),{ok:!1,mountedRender:f};console.warn(`[ggui] static seed fetch failed (${Se}); falling back to the live channel for render delivery`),D=null}D!==null&&(await x.applyRender(D),f=D,w())}if(!M){if(f===null){let D="bootstrap carries neither static content (codeUrl/kind) nor a live trio (wsUrl/wsToken)";return zr(m,D,"error"),p("MISSING_META_GGUI_BOOTSTRAP",D),{ok:!1,mountedRender:f}}return b.hostContext!==void 0&&(rk({sessionId:h.sessionId,send:()=>{},initial:b.hostContext}),ok({app:n})),Yp(m),{ok:!0,mountedRender:f}}let L;try{L=await c({meta:h,registry:U,onStatusChange:D=>{zr(m,D==="connected"?"Connected.":`Connection ${D}\u2026`,D),x!==null&&x.channelTransport.onWsStatusChange(D)},...a!==void 0?{onProtocolError:a}:{},...s!==void 0?{onObserve:s}:{},onResubscribeAck:D=>{S(D)},...typeof h.pollingUrl=="string"&&h.pollingUrl.length>0?{polling:FM({baseUrl:h.pollingUrl,...h.lastSequence!==void 0?{initialSinceSequence:h.lastSequence}:{}})}:{}})}catch(D){if(iie(D)){x!==null&&i?.teardown?.(x);let Se=D.message;return zr(m,Se,"upgrade-required"),p("UPGRADE_REQUIRED",Se),{ok:!1,mountedRender:f}}let W=D instanceof Error?D.message:String(D);return f!==null?(zr(m,`live updates unavailable: ${W}`,"connecting"),w(),{ok:!0,mountedRender:f}):(x!==null&&i?.teardown?.(x),zr(m,`WS handshake failed: ${W}`,"error"),p("WS_HANDSHAKE_FAILED",W),{ok:!1,mountedRender:f})}return x!==null&&i?.attachManager!==void 0&&i.attachManager(x,{send:D=>L.handle.send(D)}),b.hostContext!==void 0&&(rk({sessionId:h.sessionId,send:D=>L.handle.send(D),initial:b.hostContext}),ok({app:n})),await S(L.ack),Yp(m),w(),{ok:!0,mountedRender:f}}function oie(e){let t=new xc({subscribeFrameBuilder:()=>({type:"subscribe",payload:{sessionId:e.meta.sessionId,appId:e.meta.appId,...e.meta.wsToken!==void 0?{wsToken:e.meta.wsToken}:{}}})});return t.register(Y0({statusRefs:e.statusRefs,pinnedSessionId:e.pinnedSessionId})),t}function iie(e){return e!==null&&typeof e=="object"&&e.name==="UpgradeRequiredError"&&e.code==="UPGRADE_REQUIRED"&&typeof e.message=="string"}function aie(){return typeof process>"u"?!0:process.env?.GGUI_RENDERER_AUTOSTART!=="false"}function sie(){let e=T4();return e.ok?e.meta:null}function lie(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 qU(e){let t=lie(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 n=await fetch(e.codeUrl);if(!n.ok)throw new Error(`buildGguiSessionSeedInput: codeUrl fetch failed (${n.status}): ${e.codeUrl}`);let o=await n.text();return{id:e.sessionId,appId:e.appId,componentCode:o,...t!==void 0?{props:t}:{}}}function r1(e){let t=SO(e);return t.ok?t.meta:null}function cie(){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 n=r1(t);if(n!==null)return n}return null}function uie(e,t){return new Promise(n=>{let o=!1,r=a=>{if(o)return;let s=r1(a);s!==null&&(o=!0,e.removeEventListener("toolresult",r),clearTimeout(i),n(s))};e.addEventListener("toolresult",r);let i=setTimeout(()=>{o||(o=!0,e.removeEventListener("toolresult",r),n(null))},t)})}function die(e){return typeof window>"u"?Promise.resolve(null):new Promise(t=>{let n=!1,o=a=>{n||(n=!0,window.removeEventListener("message",r),clearTimeout(i),t(a))},r=a=>{let s=a.data;if(s==null||s.jsonrpc!=="2.0"||s.method!=="ui/notifications/tool-result")return;let l=r1(s.params);l!==null&&o(l)};window.addEventListener("message",r);let i=setTimeout(()=>o(null),e)})}var LU=!1,ZU=null,h6=!1,y6=!1;function b6(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function pie(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,r])=>{if(r===null)return`${o}: null`;if(r===void 0)return`${o}: undefined`;if(typeof r=="string")return`${o}: ${r}`;if(typeof r=="number"||typeof r=="boolean")return`${o}: ${r}`;let i=JSON.stringify(r)??String(r);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function x6(e){if(!(typeof window>"u"))try{window.parent.postMessage(e,"*")}catch{}}function BU(e){let t=ym();t!==null&&t.updateModelContext(e).catch(()=>{})}function fie(e){let t=ym();t!==null&&t.openLink(e).catch(()=>{})}function mie(e){let t=ym();t!==null&&t.requestDisplayMode(e).catch(()=>{})}var GU={postUpdateModelContext:e=>{BU(e)},postContextMirror:e=>{x6({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 FU(e,t){let n=ym();if(n===null)return{error:{message:"callServerToolSpec: no App bound \u2014 call setCurrentApp() first"}};try{return{jsonrpc:"2.0",result:await n.callServerTool({name:e,arguments:t})}}catch(o){return{error:{message:o instanceof Error?o.message:String(o)}}}}function KU(e){x6({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 gie(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 n=t;return(n.structuredContent&&typeof n.structuredContent=="object"?n.structuredContent:n).ok===!0?"success":"fallback"}function hie(e){if(e===null||typeof e!="object")return;let t=e.result;if(t===null||typeof t!="object")return;let n=t,r=(n.structuredContent&&typeof n.structuredContent=="object"?n.structuredContent:n).consumerPresent;return typeof r=="boolean"?r:void 0}function t1(e,t){if(typeof document>"u"||window.__GGUI_TOAST_DISABLED__)return;let o="__ggui-action-toast__",r=document.getElementById(o);r||(r=document.createElement("div"),r.id=o,r.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(r));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)";r.style.background=i,r.textContent=e,r.style.opacity="1",r.style.transform="translateX(-50%) translateY(0)";let a=r;a.__toastTimer&&clearTimeout(a.__toastTimer),t==="action_required"?r.onclick=()=>{r&&(r.style.opacity="0",r.style.transform="translateX(-50%) translateY(8px)",r.onclick=null)}:(r.onclick=null,(t==="success"||t==="fallback"||t==="error")&&(a.__toastTimer=window.setTimeout(()=>{r&&(r.style.opacity="0",r.style.transform="translateX(-50%) translateY(8px)")},2500)))}function yie(){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)}Koe(e=>typeof e.eventId!="string"||e.eventId.length===0?!1:(yie(),!0));function vie(){let e={};for(let[t,n]of Ga)e[t]=n;return e}function $ie(e){let t=JSON.stringify({sessionId:e.sessionId}),n=[`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(`
|
|
284
|
+
`);var cm=O(G(),1),v9=O(J(),1);function pre(){if(typeof document>"u"||document.getElementById(qv))return;let e=document.createElement("style");e.id=qv,e.textContent=UE,document.head.appendChild(e)}function LE({children:e,frozen:t=!1,className:n,style:o}){(0,v9.useEffect)(()=>{pre()},[]);let r={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,cm.jsxs)("div",{"data-ggui-preview":"","data-ggui-preview-frozen":t?"":void 0,className:n,style:r,"aria-busy":"true",children:[(0,cm.jsx)("div",{style:{position:"relative",pointerEvents:"none"},children:e}),(0,cm.jsx)("div",{"aria-hidden":"true",style:i})]})}var $9=O(G(),1);function HE({children:e,delayMs:t=0,className:n,style:o}){let r={animation:"ggui-preview-fragment-enter 220ms cubic-bezier(0, 0, 0.2, 1) both",animationDelay:`${Math.max(0,t)}ms`,...o};return(0,$9.jsx)("div",{className:n,style:r,children:e})}var Zv=O(G(),1);function Bv({children:e,streaming:t=!1,className:n,style:o}){let r={display:"inline",...o};return(0,Zv.jsxs)("span",{className:n,"data-ggui-preview-streaming":t?"":void 0,style:r,children:[e,t?(0,Zv.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 b9=O(G(),1),x9=O(J(),1);wu();YE();XE();QE();a6();Rv();var Vre="_ggui:preview",qre="root",Y7={surfaceId:null,fragments:new Map};function Zre(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 n=new Map(e.fragments);for(let o of t.updateComponents.components)n.set(o.id,o);return{...e,fragments:n}}return"deleteSurface"in t?e.surfaceId!==t.deleteSurface.surfaceId?e:Y7:e}function Bre(e){let t=Y7;for(let n of e){let o=aP(n.payload);o.ok&&(t=Zre(t,o.value))}return t}function J7(){return(0,de.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 Gre({name:e}){return(0,de.createElement)(mi,{padding:12,shadow:"none",border:!0},(0,de.createElement)(Je,{size:"xs",tone:"muted"},`[${e}]`))}function s6(){}function l6(e,t){let n=i=>i?i.map(a=>{let s=t.get(a);return s?l6(s,t):(0,de.createElement)(J7,{key:a})}):[],{id:o}=e,r=i=>(0,de.createElement)(HE,{key:o,children:i});switch(e.component){case"Row":return r((0,de.createElement)(so,{gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...n(e.children)));case"Column":return r((0,de.createElement)($t,{direction:"vertical",gap:e.gap,align:e.align??"stretch",justify:e.justify??"start"},...n(e.children)));case"List":return r((0,de.createElement)($t,{direction:"vertical",gap:8},...n(e.children)));case"Card":{let i=e.child?t.get(e.child):void 0,a=e.child&&!i?(0,de.createElement)(J7):i?l6(i,t):null;return r((0,de.createElement)(mi,{padding:16,shadow:"sm"},a))}case"Divider":return r((0,de.createElement)(rl,{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 r((0,de.createElement)(Nn,{level:l},(0,de.createElement)(Bv,null,(0,de.createElement)(dm,{markdown:e.text}))))}return r((0,de.createElement)(Je,i==="caption"?{size:"xs",tone:"muted"}:i==="label"?{size:"sm",weight:"medium"}:{},(0,de.createElement)(Bv,null,(0,de.createElement)(dm,{markdown:e.text}))))}case"Image":return r((0,de.createElement)(Uv,{src:e.src,alt:e.alt??""}));case"Icon":return r((0,de.createElement)(_e,{name:e.name}));case"Button":return r((0,de.createElement)(We,{disabled:!0},e.label));case"TextField":return r((0,de.createElement)($u,{disabled:!0,label:e.label,placeholder:e.placeholder,value:e.value??"",onChange:s6}));case"CheckBox":return r((0,de.createElement)(al,{disabled:!0,label:e.label??"",checked:e.checked??!1,onChange:s6}));case"ChoicePicker":{let i=e.options??[];return r((0,de.createElement)(Nv,{disabled:!0,label:e.label,value:e.value??"",options:i,onChange:s6}))}default:return r((0,de.createElement)(Gre,{name:e.component}))}}function Fre({envelopes:e,suspended:t,fallback:n}){let o=Bre(e);if(t)return null;let r=o.fragments.get(qre);return r?(0,de.createElement)(LE,null,l6(r,o.fragments)):(0,de.createElement)(de.Fragment,null,n??(0,de.createElement)(Kre))}function Kre(){return(0,de.createElement)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:80}},(0,de.createElement)(At))}function Jre({controlRef:e,onAttach:t,fallback:n}){let[o,r]=(0,de.useState)([]),[i,a]=(0,de.useState)(!1);return(0,de.useEffect)(()=>(e.current={pushEnvelope:s=>{s.channel===Vre&&r(l=>[...l,s])},suspend:()=>a(!0),resume:()=>a(!1)},t?.(),()=>{e.current=null}),[e,t]),(0,de.createElement)(Fre,{envelopes:o,suspended:i,...n!==void 0?{fallback:n}:{}})}function X7(e,t={}){e.replaceChildren();let n=(0,W7.createRoot)(e),o={current:null},r=[],i=null;function a(){let s=o.current;if(s!==null){for(let l of r)s.pushEnvelope(l);r.length=0,i===!0&&s.suspend(),i===!1&&s.resume(),i=null}}return n.render((0,de.createElement)(Jre,{controlRef:o,onAttach:a,...t.fallback!==void 0?{fallback:t.fallback}:{}})),{pushEnvelope(s){if(o.current===null){r.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(){n.unmount(),e.replaceChildren()}}}var Wre="0.6.3";function Yre(e){let t=e.serverBaseUrl.replace(/\/$/,""),n=new URLSearchParams({session:e.sessionId,item:e.itemId});return`${t}/mcp-apps/resource?${n.toString()}`}function Xre(e){return`${e.replace(/\/$/,"")}/mcp-apps/tools-call`}function Qre(){return"allow-scripts allow-forms"}function eoe(e){let t=e.permissions;if(!t)return;let n=[];return t.camera&&n.push("camera 'self'"),t.microphone&&n.push("microphone 'self'"),t.geolocation&&n.push("geolocation 'self'"),t.clipboardWrite&&n.push("clipboard-write 'self'"),n.length>0?n.join("; "):void 0}function Q7(e,t){e.replaceChildren();let n=t.serverBaseUrl??"",o=Yre({serverBaseUrl:n,sessionId:t.sessionId,itemId:t.render.id}),r=Xre(n),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",Qre());let s=eoe(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 m=p.data;if(m===null||typeof m!="object"||m.jsonrpc!=="2.0"||typeof m.method!="string")return;let f=m.id??0,g;switch(m.method){case"ui/initialize":{let v=m.params?.protocolVersion,y={protocolVersion:typeof v=="string"&&v.length>0?v:X4,hostInfo:{name:"ggui-iframe-runtime-embed-host",version:Wre},hostCapabilities:{},hostContext:{locale:t.locale??(typeof navigator<"u"?navigator.language:"en-US"),containerDimensions:i}};g={jsonrpc:"2.0",id:f,result:y};break}case"tools/call":{let v=typeof m.params?.name=="string"?m.params.name:"",b=m.params?.arguments,y=b!==null&&typeof b=="object"&&!Array.isArray(b)?b:{};if(v.length===0){g={jsonrpc:"2.0",id:f,error:{code:-32602,message:"tools/call requires params.name"}};break}try{let h=await fetch(r,{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:f,result:$}}else{let $=await h.json().catch(()=>({}));g={jsonrpc:"2.0",id:f,error:{code:h.status===403?-32003:-32e3,message:$.error??`proxy_error_${h.status}`}}}}catch(h){g={jsonrpc:"2.0",id:f,error:{code:-32e3,message:`proxy_fetch_failed: ${String(h)}`}}}break}default:g={jsonrpc:"2.0",id:f,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 vU(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 $U(e,t){let n=t,o="none",r=null,i=null,a=null,s=null,l=null,c=null;function u(){r!==null&&(r.unmount(),r=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=n.render;a=Q7(e,{render:y,sessionId:n.sessionId}),o="mcpApps";return}if(g==="system"){let y=n.render;if(y.type!=="system")return;let[h,$]=await Promise.all([Promise.resolve().then(()=>O(pu(),1)),Promise.resolve().then(()=>(yU(),hU))]),x=h.createRoot(e),k=U=>{U.type==="system"&&x.render((0,p6.createElement)($.SystemCardHost,{kind:U.kind,props:U.props??{},...n.themeId!==void 0?{themeId:n.themeId}:{}}))};k(y),l=x,c=k,o="system";return}if(g==="provisional"){i=X7(e),s=n.streamBus.subscribe("_ggui:preview",y=>{i?.pushEnvelope(y)}),o="provisional";return}let v=n.render;if(v.type==="mcpApps"||v.type==="system")return;let b="gadgetDescriptors"in v&&v.gadgetDescriptors!==void 0?v.gadgetDescriptors.map(y=>y.package):n.gadgetPackages;r=await nP(e,{render:{...v.id!==void 0?{id:v.id}:{},componentCode:v.componentCode??"",...v.props!==void 0?{props:v.props}:{}},...b!==void 0?{gadgetPackages:b}:{},...n.themeId!==void 0?{themeId:n.themeId}:{},...n.themeMode!==void 0?{themeMode:n.themeMode}:{},...n.appTheme!==void 0?{appTheme:n.appTheme}:{},...n.cssOverrides!==void 0?{cssOverrides:n.cssOverrides}:{},...n.onError!==void 0?{onError:n.onError}:{},renderWrapper:m}),o="react"}function m(g){let v=n.scopedWireConfig===null?g:(0,p6.createElement)(V0,{config:n.scopedWireConfig,children:g});return n.wrapOuter!==void 0?n.wrapOuter(v):v}let f=vU(t.render);return await p(f),{get kind(){return o},async update(g){let v=o;n=g;let b=vU(g.render);if(b!==v){u(),await p(b);return}if(b==="react"&&r!==null){let y=g.render;if(y.type==="mcpApps"||y.type==="system")return;await r.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:m});return}if(b==="system"&&c!==null){let y=g.render;if(y.type!=="system")return;c(y);return}},unmount:u}}function f6(e){if(typeof window>"u"||window.parent===null)return;let t={type:vC,event:e};try{window.parent.postMessage(t,"*")}catch{}}var _U=O(J(),1);async function SU(e,t){let n=t.win??(typeof window<"u"?window:void 0);if(n===void 0||n.parent===null||n.parent===n)return null;let[o,r]=await Promise.all([Promise.resolve().then(()=>O(pu(),1)),Promise.resolve().then(()=>(xU(),bU))]);e.querySelector("[data-ggui-ui-feedback-chrome]")?.remove();let i=e.createElement("div");i.setAttribute("data-ggui-ui-feedback-chrome",""),e.body.appendChild(i);let a=o.createRoot(i);return a.render((0,_U.createElement)(r.UiFeedbackCard,{emit:t.emit,...t.sessionId!==void 0?{sessionId:t.sessionId}:{},...t.toolName!==void 0?{toolName:t.toolName}:{}})),{container:i,unmount(){a.unmount(),i.remove()}}}function kU(e){if(typeof window>"u"||window.parent===null)return;let t={type:$C,event:e};try{window.parent.postMessage(t,"*")}catch{}}function e1(e,t){if(t===void 0)return{state:e};let{sessionId:n,error:o}=t;return{state:e,...typeof n=="string"&&n.length>0?{sessionId:n}:{},...o!==void 0?{error:o}:{}}}_o();var Ga=new Map;function koe(e,t,n){let o=e[n.contextName],r;return o!==void 0?r=o:(r=t.createContext([n.default,()=>{}]),r.displayName=n.contextName,e[n.contextName]=r),{name:n.name,contextName:n.contextName,schema:n.schema,debounceMs:n.debounceMs??300,default:n.default,contextRef:r}}function wU(e,t,n){let o=[];for(let r of n)o.push(koe(e,t,r)),Ga.set(r.name,r.default);return o}function woe(e){return{[e.name]:{schema:e.schema}}}function EU(e,t,n){let o=`[ggui:context] ${JSON.stringify(t)}`;e.postUpdateModelContext({content:[{type:"text",text:o}]}),n&&e.postContextMirror({sessionId:n.sessionId,appId:n.appId,snapshot:t})}function zU(){let e={};for(let[t,n]of Ga)e[t]=n;return e}function Eoe(e){let{react:t,poster:n,consoleWarn:o,identity:r}=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 m=()=>{let f=PM(woe(s),s.name,c);if(!f.valid){o!==void 0&&o(`[ggui:context] slot '${s.name}' value rejected:`,f.violations);return}Ga.set(s.name,c),EU(n,zU(),r)};return s.debounceMs<=0?m():p.current=setTimeout(m,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 TU(e){let t=Eoe(e);return o=>{let{slots:r,children:i}=o;return r.length===0?e.react.createElement(e.react.Fragment,null,i):r.reduceRight((a,s)=>e.react.createElement(t,{key:s.contextName,slot:s},a),e.react.createElement(e.react.Fragment,null,i))}}function CU(e,t,n){if(t!==void 0)for(let o of Array.from(Ga.keys()))t.has(o)||Ga.delete(o);Ga.size>0&&EU(e,zU(),n)}var v6="0.6.3",VU=3e4,g6=new Set;function Koe(e){return g6.add(e),()=>{g6.delete(e)}}function Joe(e){for(let t of g6)try{if(t(e)===!0)return}catch{}}var Woe={name:"ggui-iframe-runtime",version:v6},Yoe={availableDisplayModes:["inline","fullscreen","pip"]};function Xoe(){let e=new P0(Woe,Yoe,{autoResize:!0}),t=new Jp(window.parent,window.parent);return{app:e,transport:t}}var $6=null;function Qoe(e){$6=e}function ym(){return $6}function fke(){$6=null}async function eie(e,t){try{return await e.connect(t),{ok:!0}}catch(n){return{ok:!1,message:n instanceof Error?n.message:String(n)}}}function tie(){try{let e={type:zh,version:v6};window.parent.postMessage(e,"*")}catch{}}function nie(e,t){try{let n={type:g2,reason:e,message:t};window.parent.postMessage(n,"*")}catch{}}async function rie(e){let{doc:t,app:n,transport:o,notifyParent:r,renderer:i,onProtocolError:a,onObserve:s,onLifecycle:l}=e,c=e.connectFn??GM,u=e.toolResultTimeoutMs??VU,p=(D,W)=>{r({type:g2,reason:D,message:W}),a?.(HM(D,W)),l?.(e1("error",{error:{code:D,message:W}}))},m=BM(t),f=null;zr(m,"Negotiating with host\u2026","connecting"),r({type:zh,version:v6}),l?.(e1("mounting"));let g=e.preResolvedMeta!==void 0?Promise.resolve(null):uie(n,u),v=await eie(n,o);if(!v.ok)return zr(m,`ui/initialize failed: ${v.message}`,"error"),p("UI_INITIALIZE_FAILED",v.message),{ok:!1,mountedRender:f};Qoe(n);let b;if(e.preResolvedMeta!==void 0)b={ok:!0,meta:e.preResolvedMeta};else{let D=T4();if(D.ok)b=D;else{let W=await g;W!==null?b={ok:!0,meta:W}:b={ok:!1,reason:"MISSING_META_GGUI_BOOTSTRAP"}}}let y=n.getHostContext();if(y!==void 0&&ik(y),b.ok&&b.hostContext===void 0){let D=Oh(y);D!==void 0&&(b={...b,hostContext:D})}if(!b.ok){let D=`slice-meta parse failed: ${b.reason}`;return zr(m,D,"error"),p(b.reason,D),{ok:!1,mountedRender:f}}let h=b.meta;MM(await WM(h.validatorsUrl));let $=h.sessionId,x=i!==void 0?i.setup({meta:h,renderInto:m.renderRoot,statusRefs:m,...s!==void 0?{onObserve:s}:{}}):null;SU(t,{emit:s??f6,sessionId:h.sessionId}),zr(m,`Connecting to ${h.sessionId}\u2026`,"connecting");let k=x===null?oie({meta:h,statusRefs:m,pinnedSessionId:$}):null,U=x?.channelRegistry??k,S=async D=>{let W=D.session;W!==void 0&&W.id===$&&(f=W,x!==null&&(await x.applyRender(W),W.type!=="mcpApps"&&W.type!=="system"&&x.channelTransport.applyRender({sessionId:W.id,...W.streamSpec!==void 0?{streamSpec:W.streamSpec}:{}})))},T=!1,w=()=>{T||(T=!0,l?.(e1("code-ready",{sessionId:h.sessionId})))},C=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(x!==null&&C){h.gadgets!==void 0&&h.gadgets.length>0&&await x.composedGadgets;let D=null;try{D=await qU(h)}catch(W){let Se=W instanceof Error?W.message:String(W);if(!M)return zr(m,`static mount failed: ${Se}`,"error"),p("UI_INITIALIZE_FAILED",Se),{ok:!1,mountedRender:f};console.warn(`[ggui] static seed fetch failed (${Se}); falling back to the live channel for render delivery`),D=null}D!==null&&(await x.applyRender(D),f=D,w())}if(!M){if(f===null){let D="bootstrap carries neither static content (codeUrl/kind) nor a live trio (wsUrl/wsToken)";return zr(m,D,"error"),p("MISSING_META_GGUI_BOOTSTRAP",D),{ok:!1,mountedRender:f}}return b.hostContext!==void 0&&(rk({sessionId:h.sessionId,send:()=>{},initial:b.hostContext}),ok({app:n})),Yp(m),{ok:!0,mountedRender:f}}let L;try{L=await c({meta:h,registry:U,onStatusChange:D=>{zr(m,D==="connected"?"Connected.":`Connection ${D}\u2026`,D),x!==null&&x.channelTransport.onWsStatusChange(D)},...a!==void 0?{onProtocolError:a}:{},...s!==void 0?{onObserve:s}:{},onResubscribeAck:D=>{S(D)},...typeof h.pollingUrl=="string"&&h.pollingUrl.length>0?{polling:FM({baseUrl:h.pollingUrl,...h.lastSequence!==void 0?{initialSinceSequence:h.lastSequence}:{}})}:{}})}catch(D){if(iie(D)){x!==null&&i?.teardown?.(x);let Se=D.message;return zr(m,Se,"upgrade-required"),p("UPGRADE_REQUIRED",Se),{ok:!1,mountedRender:f}}let W=D instanceof Error?D.message:String(D);return f!==null?(zr(m,`live updates unavailable: ${W}`,"connecting"),w(),{ok:!0,mountedRender:f}):(x!==null&&i?.teardown?.(x),zr(m,`WS handshake failed: ${W}`,"error"),p("WS_HANDSHAKE_FAILED",W),{ok:!1,mountedRender:f})}return x!==null&&i?.attachManager!==void 0&&i.attachManager(x,{send:D=>L.handle.send(D)}),b.hostContext!==void 0&&(rk({sessionId:h.sessionId,send:D=>L.handle.send(D),initial:b.hostContext}),ok({app:n})),await S(L.ack),Yp(m),w(),{ok:!0,mountedRender:f}}function oie(e){let t=new xc({subscribeFrameBuilder:()=>({type:"subscribe",payload:{sessionId:e.meta.sessionId,appId:e.meta.appId,...e.meta.wsToken!==void 0?{wsToken:e.meta.wsToken}:{}}})});return t.register(Y0({statusRefs:e.statusRefs,pinnedSessionId:e.pinnedSessionId})),t}function iie(e){return e!==null&&typeof e=="object"&&e.name==="UpgradeRequiredError"&&e.code==="UPGRADE_REQUIRED"&&typeof e.message=="string"}function aie(){return typeof process>"u"?!0:process.env?.GGUI_RENDERER_AUTOSTART!=="false"}function sie(){let e=T4();return e.ok?e.meta:null}function lie(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 qU(e){let t=lie(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 n=await fetch(e.codeUrl);if(!n.ok)throw new Error(`buildGguiSessionSeedInput: codeUrl fetch failed (${n.status}): ${e.codeUrl}`);let o=await n.text();return{id:e.sessionId,appId:e.appId,componentCode:o,...t!==void 0?{props:t}:{}}}function r1(e){let t=SO(e);return t.ok?t.meta:null}function cie(){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 n=r1(t);if(n!==null)return n}return null}function uie(e,t){return new Promise(n=>{let o=!1,r=a=>{if(o)return;let s=r1(a);s!==null&&(o=!0,e.removeEventListener("toolresult",r),clearTimeout(i),n(s))};e.addEventListener("toolresult",r);let i=setTimeout(()=>{o||(o=!0,e.removeEventListener("toolresult",r),n(null))},t)})}function die(e){return typeof window>"u"?Promise.resolve(null):new Promise(t=>{let n=!1,o=a=>{n||(n=!0,window.removeEventListener("message",r),clearTimeout(i),t(a))},r=a=>{let s=a.data;if(s==null||s.jsonrpc!=="2.0"||s.method!=="ui/notifications/tool-result")return;let l=r1(s.params);l!==null&&o(l)};window.addEventListener("message",r);let i=setTimeout(()=>o(null),e)})}var LU=!1,ZU=null,h6=!1,y6=!1;function b6(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function pie(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,r])=>{if(r===null)return`${o}: null`;if(r===void 0)return`${o}: undefined`;if(typeof r=="string")return`${o}: ${r}`;if(typeof r=="number"||typeof r=="boolean")return`${o}: ${r}`;let i=JSON.stringify(r)??String(r);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function x6(e){if(!(typeof window>"u"))try{window.parent.postMessage(e,"*")}catch{}}function BU(e){let t=ym();t!==null&&t.updateModelContext(e).catch(()=>{})}function fie(e){let t=ym();t!==null&&t.openLink(e).catch(()=>{})}function mie(e){let t=ym();t!==null&&t.requestDisplayMode(e).catch(()=>{})}var GU={postUpdateModelContext:e=>{BU(e)},postContextMirror:e=>{x6({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 FU(e,t){let n=ym();if(n===null)return{error:{message:"callServerToolSpec: no App bound \u2014 call setCurrentApp() first"}};try{return{jsonrpc:"2.0",result:await n.callServerTool({name:e,arguments:t})}}catch(o){return{error:{message:o instanceof Error?o.message:String(o)}}}}function KU(e){x6({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 gie(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 n=t;return(n.structuredContent&&typeof n.structuredContent=="object"?n.structuredContent:n).ok===!0?"success":"fallback"}function hie(e){if(e===null||typeof e!="object")return;let t=e.result;if(t===null||typeof t!="object")return;let n=t,r=(n.structuredContent&&typeof n.structuredContent=="object"?n.structuredContent:n).consumerPresent;return typeof r=="boolean"?r:void 0}function t1(e,t){if(typeof document>"u"||window.__GGUI_TOAST_DISABLED__)return;let o="__ggui-action-toast__",r=document.getElementById(o);r||(r=document.createElement("div"),r.id=o,r.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(r));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)";r.style.background=i,r.textContent=e,r.style.opacity="1",r.style.transform="translateX(-50%) translateY(0)";let a=r;a.__toastTimer&&clearTimeout(a.__toastTimer),t==="action_required"?r.onclick=()=>{r&&(r.style.opacity="0",r.style.transform="translateX(-50%) translateY(8px)",r.onclick=null)}:(r.onclick=null,(t==="success"||t==="fallback"||t==="error")&&(a.__toastTimer=window.setTimeout(()=>{r&&(r.style.opacity="0",r.style.transform="translateX(-50%) translateY(8px)")},2500)))}function yie(){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)}Koe(e=>typeof e.eventId!="string"||e.eventId.length===0?!1:(yie(),!0));function vie(){let e={};for(let[t,n]of Ga)e[t]=n;return e}function $ie(e){let t=JSON.stringify({sessionId:e.sessionId}),n=[`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(`
|
|
285
285
|
`),r={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}}};x6({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"ui/message",params:{role:"user",content:[{type:"text",text:n,_meta:{"ai.ggui/userAction":r}}]}})}function bie(e){if(typeof window>"u")return;let{toolName:t,intent:n,data:o,sessionId:r,appId:i}=e,a=new Date().toISOString(),s=b6(`${n}|${JSON.stringify(o??null)}|${a}`),l=pie(o),c=l===""?"":` (${l})`,u=vie();BU({content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:s,intent:n,data:o??null,firedAt:a,sessionId:r,appId:i})}`}]}),t1(`\u2192 ${n}${c}`,"pending"),(async()=>{let p=null;try{p=await FU(t,{kind:"dispatch",payload:{intent:n,actionData:o??null,uiContext:u},sessionId:r,appId:i,actionId:s,firedAt:a})}catch{t1(`\u26A0 ${n} \u2014 transport error`,"error"),p=null}if(p!==null&&gie(p)==="success"){if(hie(p)===!1){t1(`\u{1F4AC} ${n}${c} \u2014 agent not listening, sent to chat`,"action_required"),$ie({intent:n,sessionId:r,actionId:s,submittedAt:a});return}return}t1(`\u26A0 ${n} \u2014 could not reach the agent`,"error")})()}function xie(){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 _ie(e){let{actionName:t,data:n,meta:o,dispatchToolName:r}=e;bie({toolName:r,intent:t,data:n,sessionId:o.sessionId,appId:o.appId})}function Sie(e){if(typeof window>"u")return;let{toolName:t,url:n,sessionId:o,appId:r}=e;if(typeof n!="string"||n.length===0)throw new RangeError("wire.openLink(url): `url` must be a non-empty string.");let i=new Date().toISOString(),a=b6(`openLink|${n}|${i}`);KU({toolName:t,kind:"openLink",payload:{url:n},sessionId:o,appId:r,actionId:a,firedAt:i}),fie({url:n})}function HU(e){if(typeof window>"u")return;let{toolName:t,mode:n,sessionId:o,appId:r}=e,i=new Date().toISOString(),a=b6(`requestDisplayMode|${n}|${i}`);KU({toolName:t,kind:"requestDisplayMode",payload:{mode:n},sessionId:o,appId:r,actionId:a,firedAt:i}),mie({mode:n})}function kie(e){if(h6||typeof window>"u"||typeof document>"u")return;h6=!0;let{dispatchToolName:t,sessionId:n,appId:o}=e,r=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 m=s.getAttribute("target")==="_blank",f=u.origin!==window.location.origin;!m&&!f||(i.preventDefault(),Sie({toolName:t,url:c,sessionId:n,appId:o}))};document.addEventListener("click",r,{capture:!0})}function wie(e){if(y6||typeof window>"u"||typeof Element>"u"||typeof Document>"u")return;y6=!0;let{dispatchToolName:t,sessionId:n,appId:o}=e;Element.prototype.requestFullscreen=function(r){return HU({toolName:t,mode:"fullscreen",sessionId:n,appId:o}),Promise.resolve()},Document.prototype.exitFullscreen=function(){return HU({toolName:t,mode:"inline",sessionId:n,appId:o}),Promise.resolve()}}function mke(){h6=!1,y6=!1}function Eie(){if(LU)return;let e=ym();if(e===null)return;LU=!0;let t=null;e.addEventListener("toolresult",n=>{let o=r1(n);if(o===null)return;let r=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??"-",r].join("|");if(i===t)return;t=i;let a=ZU;a!==null&&qU(o).then(s=>{s!==null&&a(s).then(()=>{let l=new Set((o.contextSlots??[]).map(c=>c.name));CU(GU,l,{sessionId:o.sessionId,appId:o.appId})})})})}function zie(){if(typeof window>"u")return!1;let e=window.__GGUI_META__;if(e===null||typeof e!="object"||Array.isArray(e))return!1;let n=e["ai.ggui/render"];if(n===null||typeof n!="object"||Array.isArray(n))return!1;let o=n;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 n1(e){let{app:t,transport:n}=Xoe();Tie({doc:document,app:t,transport:n,notifyParent:o=>{if(o.type===zh){tie();return}nie(o.reason,o.message)},onObserve:f6,onLifecycle:kU,...e!==void 0?{preResolvedMeta:e}:{}})}if(aie()&&typeof window<"u"){let e=sie();if(e!==null)n1(e);else{let t=cie();t!==null?n1(t):zie()?n1():die(VU).then(n=>{n1(n??void 0)})}}async function Tie(e){let[t,n,o,r,i,a,s,l,c]=await Promise.all([Promise.resolve().then(()=>O(J(),1)),Promise.resolve().then(()=>O(pu(),1)),Promise.resolve().then(()=>(wu(),f9)),Promise.resolve().then(()=>(YE(),W9)),Promise.resolve().then(()=>(XE(),T7)),Promise.resolve().then(()=>(QE(),P7)),Promise.resolve().then(()=>(a6(),K7)),Promise.resolve().then(()=>(K0(),OM)),Promise.resolve().then(()=>(jU(),AU))]),[u,p]=await Promise.all([Promise.resolve().then(()=>(DU(),NU)),Promise.resolve().then(()=>(UU(),PU))]),m={setup:({meta:f,renderInto:g,statusRefs:v,onObserve:b})=>{let y=p.loadGadgetRegistry(c,f.gadgets??[]);u.installGlobalRegistry({react:t,reactDom:n,primitives:o,components:r,compositions:i,interact:a,tokens:s,wire:l,gadgets:{"@ggui-ai/gadgets":c},publicEnv:f.publicEnv??{}}),y.then(Ce=>{let Pt=u.getGlobalRegistry();if(Pt===void 0)return;let Fr=Pt.gadgets;for(let[rn,Ka]of Object.entries(Ce))rn in Fr||(Fr[rn]=Ka)});let h=u.getGlobalRegistry(),$=h!==void 0&&f.contextSlots!==void 0?wU(h.contexts,t,f.contextSlots):[],x=TU({react:t,poster:GU,consoleWarn:typeof console<"u"&&typeof console.warn=="function"?console.warn.bind(console):void 0,identity:{sessionId:f.sessionId,appId:f.appId}}),k=new js,U=[],S=null,T={send:Ce=>{if(S!==null){S.send(Ce);return}U.push(Ce)},__attachReal(Ce){for(S=Ce;U.length>0;){let Pt=U.shift();Pt!==void 0&&Ce.send(Pt)}}},w=null,C=null,M=xie();kie({dispatchToolName:M,sessionId:f.sessionId,appId:f.appId}),wie({dispatchToolName:M,sessionId:f.sessionId,appId:f.appId});let L=qM({sessionId:f.sessionId,appId:f.appId,getCurrentGguiSession:()=>w,manager:T,streamBus:k,onDispatchEnvelope:Ce=>{if(Ce.type!=="data:submit")return;let Pt=Ce.payload;Pt===void 0||typeof Pt.action!="string"||Pt.action.length===0||_ie({actionName:Pt.action,data:Pt.data,meta:{sessionId:f.sessionId,appId:f.appId},dispatchToolName:M})}}),D=Ce=>{if(!(Ce.type==="mcpApps"||Ce.type==="system"))return Pt=>t.createElement(x,{slots:$,children:Pt})},W=Ce=>Ce.type==="mcpApps"||Ce.type==="system"?null:L,Se=Ce=>{let Pt=D(Ce);return{render:Ce,scopedWireConfig:W(Ce),streamBus:k,sessionId:f.sessionId,...f.gadgets!==void 0?{gadgetPackages:f.gadgets.map(Fr=>Fr.package)}:{},...f.themeId!==void 0?{themeId:f.themeId}:{},...f.themeMode!==void 0?{themeMode:f.themeMode}:{},...f.theme!==void 0?{appTheme:f.theme}:{},...Pt!==void 0?{wrapOuter:Pt}:{}}},tt=async Ce=>{if(w=Ce,C===null){C=await $U(g,Se(Ce));return}await C.update(Se(Ce))};ZU=tt,Eie();let Q={reservedValidators:AM(void 0,void 0)},Ve=ZM({sessionId:f.sessionId,appId:f.appId,...f.streamWebSocketLocalTools!==void 0?{streamWebSocketLocalTools:f.streamWebSocketLocalTools}:{},send:Ce=>T.send(Ce),toolsCall:async({toolName:Ce,args:Pt})=>{let Fr=await FU(Ce,Pt);if(Fr.error!==void 0)throw new Error(Fr.error.message??"tools/call failed");let rn=Fr.result;if(rn===null||typeof rn!="object")return null;let Ka=rn.structuredContent;return Ka!==void 0?Ka:rn},streamBus:k,...b!==void 0?{onObserve:b}:{}}),gt=new xc({subscribeFrameBuilder:()=>({type:"subscribe",payload:{sessionId:f.sessionId,appId:f.appId,...f.wsToken!==void 0?{wsToken:f.wsToken}:{}}})});return gt.register(Y0({statusRefs:v,pinnedSessionId:f.sessionId,applyRender:tt,getChannelTransport:()=>Ve})),gt.register(Ek({getCurrentGguiSession:()=>w,streamBus:k,validatorCtx:Q})),gt.register(kk({getCurrentGguiSession:()=>w,applyRender:tt})),gt.register(wk({dispatch:Joe})),gt.register(zk({getChannelTransport:()=>Ve})),gt.register(Tk({getChannelTransport:()=>Ve})),gt.register(Ck({...b!==void 0?{onObserve:b}:{}})),{rootWireConfig:L,streamBus:k,applyRender:tt,getCurrentGguiSession:()=>w,validatorCtx:Q,manager:T,channelTransport:Ve,channelRegistry:gt,composedGadgets:y}},attachManager:(f,g)=>{let v=f.manager;typeof v.__attachReal=="function"&&v.__attachReal(g)},teardown:f=>{f.channelTransport.dispose()}};await rie({doc:e.doc,app:e.app,transport:e.transport,notifyParent:e.notifyParent,renderer:m,...e.onObserve!==void 0?{onObserve:e.onObserve}:{},...e.onLifecycle!==void 0?{onLifecycle:e.onLifecycle}:{},...e.preResolvedMeta!==void 0?{preResolvedMeta:e.preResolvedMeta}:{}})}export{fke as __resetAppForTest,mke as __resetInterceptorsForTest,rie as bootSequence,qU as buildGguiSessionSeedInput,bie as dispatchSubmitAction,KU as emitAudit,r1 as extractMetaFromToolResult,pie as formatSubmitActionDataInline,kie as installAnchorClickInterceptor,wie as installFullscreenInterceptors,Sie as openLinkInParent,sie as readSelfContainedMeta,HU as requestDisplayModeInParent,xie as resolveDispatchToolName,_ie as routeDispatch,Qoe as setCurrentApp,Koe as subscribeDrainAck};
|
|
286
286
|
/*! Bundled license information:
|
|
287
287
|
|