PageSourceSearch

https://my850.ai/_next/static/chunks/39310-97991863bc04081d.js

js my850.ai collected 2026-10-05 14:31:20 UTC 105,113 bytes, 3 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39310],{1522:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("PauseCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]])},11385:(e,t,r)=>{"use strict";let a,n;r.d(t,{Y_:()=>t9});var s,i,o,l,u,d,c,p,h=r(12115),f="vercel.ai.error",m=Symbol.for(f),y=class e extends Error{constructor({name:e,message:t,cause:r}){super(t),this[s]=!0,this.name=e,this.cause=r}static isInstance(t){return e.hasMarker(t,f)}static hasMarker(e,t){let r=Symbol.for(t);return null!=e&&"object"==typeof e&&r in e&&"boolean"==typeof e[r]&&!0===e[r]}};s=m;var g=y;function _(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}Symbol.for("vercel.ai.error.AI_APICallError"),Symbol.for("vercel.ai.error.AI_EmptyResponseBodyError");var v="AI_InvalidArgumentError",k=`vercel.ai.error.${v}`,b=Symbol.for(k),x=class extends g{constructor({message:e,cause:t,argument:r}){super({name:v,message:e,cause:t}),this[i]=!0,this.argument=r}static isInstance(e){return g.hasMarker(e,k)}};i=b,Symbol.for("vercel.ai.error.AI_InvalidPromptError"),Symbol.for("vercel.ai.error.AI_InvalidResponseDataError");var w="AI_JSONParseError",E=`vercel.ai.error.${w}`,A=Symbol.for(E),I=class extends g{constructor({text:e,cause:t}){super({name:w,message:`JSON parsing failed: Text: ${e}.
2Error message: ${_(t)}`,cause:t}),this[o]=!0,this.text=e}static isInstance(e){return g.hasMarker(e,E)}};o=A,Symbol.for("vercel.ai.error.AI_LoadAPIKeyError"),Symbol.for("vercel.ai.error.AI_LoadSettingError"),Symbol.for("vercel.ai.error.AI_NoContentGeneratedError"),Symbol.for("vercel.ai.error.AI_NoSuchModelError"),Symbol.for("vercel.ai.error.AI_TooManyEmbeddingValuesForCallError");var T="AI_TypeValidationError",S=`vercel.ai.error.${T}`,C=Symbol.for(S),O=class e extends g{constructor({value:e,cause:t}){super({name:T,message:`Type validation failed: Value: ${JSON.stringify(e)}.
3Error message: ${_(t)}`,cause:t}),this[l]=!0,this.value=e}static isInstance(e){return g.hasMarker(e,S)}static wrap({value:t,cause:r}){return e.isInstance(r)&&r.value===t?r:new e({value:t,cause:r})}};l=C,Symbol.for("vercel.ai.error.AI_UnsupportedFunctionalityError");var N=r(22079);r(95704);var R=(({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{let n=((e,t=21)=>(r=t)=>{let a="",n=0|r;for(;n-- >0;)a+=e[Math.random()*e.length|0];return a})(r,t);if(null==e)return n;if(r.includes(a))throw new x({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${r}".`});return t=>`${e}${a}${n(t)}`})(),j=Symbol.for("vercel.ai.validator");function M({text:e,schema:t}){try{let r=N.parse(e);if(null==t)return{success:!0,value:r,rawValue:r};let a=function({value:e,schema:t}){var r;let a="object"==typeof t&&null!==t&&j in t&&!0===t[j]&&"validate"in t?t:(r=t,{[j]:!0,validate:e=>{let t=r.safeParse(e);return t.success?{success:!0,value:t.data}:{success:!1,error:t.error}}});try{if(null==a.validate)return{success:!0,value:e};let t=a.validate(e);if(t.success)return t;return{success:!1,error:O.wrap({value:e,cause:t.error})}}catch(t){return{success:!1,error:O.wrap({value:e,cause:t})}}}({value:r,schema:t});return a.success?{...a,rawValue:r}:a}catch(t){return{success:!1,error:I.isInstance(t)?t:new I({text:e,cause:t})}}}var{btoa:Z,atob:D}=globalThis;Symbol("Let zodToJsonSchema decide on which parser to use"),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),a={};for(let e of r)a[e]=t[e];return e.objectValues(a)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(u||(u={})),(d||(d={})).mergeShapes=(e,t)=>({...e,...t});let P=u.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),F=e=>{switch(typeof e){case"undefined":return P.undefined;case"string":return P.string;case"number":return Number.isNaN(e)?P.nan:P.number;case"boolean":return P.boolean;case"function":return P.function;case"bigint":return P.bigint;case"symbol":return P.symbol;case"object":if(Array.isArray(e))return P.array;if(null===e)return P.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return P.promise;if("undefined"!=typeof Map&&e instanceof Map)return P.map;if("undefined"!=typeof Set&&e instanceof Set)return P.set;if("undefined"!=typeof Date&&e instanceof Date)return P.date;return P.object;default:return P.unknown}}
vendor: 36,402 bytes, line 3
3,L=u.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class $ extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},a=e=>{for(let n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(a);else if("invalid_return_type"===n.code)a(n.returnTypeError);else if("invalid_arguments"===n.code)a(n.argumentsError);else if(0===n.path.length)r._errors.push(t(n));else{let e=r,a=0;for(;a<n.path.length;){let r=n.path[a];a===n.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(n))):e[r]=e[r]||{_errors:[]},e=e[r],a++}}};return a(this),r}static assert(e){if(!(e instanceof $))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,u.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t=Object.create(null),r=[];for(let a of this.issues)if(a.path.length>0){let r=a.path[0];t[r]=t[r]||[],t[r].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}$.create=e=>new $(e);let V=(e,t)=>{let r;switch(e.code){case L.invalid_type:r=e.received===P.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case L.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,u.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:r=`Unrecognized key(s) in object: ${u.joinValues(e.keys,", ")}`;break;case L.invalid_union:r="Invalid input";break;case L.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${u.joinValues(e.options)}`;break;case L.invalid_enum_value:r=`Invalid enum value. Expected ${u.joinValues(e.options)}, received '${e.received}'`;break;case L.invalid_arguments:r="Invalid function arguments";break;case L.invalid_return_type:r="Invalid function return type";break;case L.invalid_date:r="Invalid date";break;case L.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:u.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case L.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case L.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case L.custom:r="Invalid input";break;case L.invalid_intersection_types:r="Intersection results could not be merged";break;case L.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case L.not_finite:r="Number must be finite";break;default:r=t.defaultError,u.assertNever(e)}return{message:r}},z=e=>{let{data:t,path:r,errorMaps:a,issueData:n}=e,s=[...r,...n.path||[]],i={...n,path:s};if(void 0!==n.message)return{...n,path:s,message:n.message};let o="";for(let e of a.filter(e=>!!e).slice().reverse())o=e(i,{data:t,defaultError:o}).message;return{...n,path:s,message:o}};function U(e,t){let r=z({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,V,void 0].filter(e=>!!e)});e.common.issues.push(r)}class B{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let a of t){if("aborted"===a.status)return J;"dirty"===a.status&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,a=await e.value;r.push({key:t,value:a})}return B.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let a of t){let{key:t,value:n}=a;if("aborted"===t.status||"aborted"===n.status)return J;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==n.value||a.alwaysSet)&&(r[t.value]=n.value)}return{status:e.value,value:r}}}let J=Object.freeze({status:"aborted"}),W=e=>({status:"dirty",value:e}),K=e=>({status:"valid",value:e}),q=e=>"undefined"!=typeof Promise&&e instanceof Promise;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(c||(c={}));class Y{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let H=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new $(e.common.issues);return this._error=t,this._error}}};function G(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:a,description:n}=e;if(t&&(r||a))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:n}:{errorMap:(t,n)=>{let{message:s}=e;return"invalid_enum_value"===t.code?{message:s??n.defaultError}:void 0===n.data?{message:s??a??n.defaultError}:"invalid_type"!==t.code?{message:n.defaultError}:{message:s??r??n.defaultError}},description:n}}class X{get description(){return this._def.description}_getType(e){return F(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:F(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new B,ctx:{common:e.parent.common,data:e.data,parsedType:F(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(q(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)},a=this._parseSync({data:e,path:r.path,parent:r});return H(r,a)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return"valid"===r.status?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F(e)},a=this._parse({data:e,path:r.path,parent:r});return H(r,await (q(a)?a:Promise.resolve(a)))}refine(e,t){return this._refinement((r,a)=>{let n=e(r),s=()=>a.addIssue({code:L.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(r):t});return"undefined"!=typeof Promise&&n instanceof Promise?n.then(e=>!!e||(s(),!1)):!!n||(s(),!1)})}refinement(e,t){return this._refinement((r,a)=>!!e(r)||(a.addIssue("function"==typeof t?t(r,a):t),!1))}_refinement(e){return new eJ({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eW.create(this,this._def)}nullable(){return eK.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eS.create(this)}promise(){return eB.create(this,this._def)}or(e){return eO.create([this,e],this._def)}and(e){return ej.create(this,e,this._def)}transform(e){return new eJ({...G(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eq({...G(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:p.ZodDefault})}brand(){return new eG({typeName:p.ZodBranded,type:this,...G(this._def)})}catch(e){return new eY({...G(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:p.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eX.create(this,e)}readonly(){return eQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let Q=/^c[^\s-]{8,}$/i,ee=/^[0-9a-z]+$/,et=/^[0-9A-HJKMNP-TV-Z]{26}$/i,er=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ea=/^[a-z0-9_-]{21}$/i,en=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,es=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ei=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,el=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,eu=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ed=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ec=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ep=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,eh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ef=RegExp(`^${eh}$`);function em(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}class ey extends X{_parse(e){var t,r,n,s;let i;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.string,received:t.parsedType}),J}let o=new B;for(let l of this._def.checks)if("min"===l.kind)e.data.length<l.value&&(U(i=this._getOrReturnCtx(e,i),{code:L.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)e.data.length>l.value&&(U(i=this._getOrReturnCtx(e,i),{code:L.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let t=e.data.length>l.value,r=e.data.length<l.value;(t||r)&&(i=this._getOrReturnCtx(e,i),t?U(i,{code:L.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):r&&U(i,{code:L.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)ei.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"email",code:L.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)a||(a=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),a.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"emoji",code:L.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)er.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"uuid",code:L.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)ea.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"nanoid",code:L.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)Q.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"cuid",code:L.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)ee.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"cuid2",code:L.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)et.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"ulid",code:L.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(e.data)}catch{U(i=this._getOrReturnCtx(e,i),{validation:"url",code:L.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"regex",code:L.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?e.data=e.data.trim():"includes"===l.kind?e.data.includes(l.value,l.position)||(U(i=this._getOrReturnCtx(e,i),{code:L.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?e.data=e.data.toLowerCase():"toUpperCase"===l.kind?e.data=e.data.toUpperCase():"startsWith"===l.kind?e.data.startsWith(l.value)||(U(i=this._getOrReturnCtx(e,i),{code:L.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?e.data.endsWith(l.value)||(U(i=this._getOrReturnCtx(e,i),{code:L.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?(function(e){let t=`${eh}T${em(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)})(l).test(e.data)||(U(i=this._getOrReturnCtx(e,i),{code:L.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?ef.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{code:L.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${em(l)}$`).test(e.data)||(U(i=this._getOrReturnCtx(e,i),{code:L.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?es.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"duration",code:L.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(t=e.data,!(("v4"===(r=l.version)||!r)&&eo.test(t)||("v6"===r||!r)&&eu.test(t))&&1&&(U(i=this._getOrReturnCtx(e,i),{validation:"ip",code:L.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!en.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(a));if("object"!=typeof n||null===n||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)return!1;return!0}catch{return!1}}(e.data,l.alg)&&(U(i=this._getOrReturnCtx(e,i),{validation:"jwt",code:L.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(n=e.data,!(("v4"===(s=l.version)||!s)&&el.test(n)||("v6"===s||!s)&&ed.test(n))&&1&&(U(i=this._getOrReturnCtx(e,i),{validation:"cidr",code:L.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?ec.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"base64",code:L.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?ep.test(e.data)||(U(i=this._getOrReturnCtx(e,i),{validation:"base64url",code:L.invalid_string,message:l.message}),o.dirty()):u.assertNever(l);return{status:o.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:L.invalid_string,...c.errToObj(r)})}_addCheck(e){return new ey({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...c.errToObj(e)})}url(e){return this._addCheck({kind:"url",...c.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...c.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...c.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...c.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...c.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...c.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...c.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...c.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...c.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...c.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...c.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...c.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...c.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...c.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...c.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...c.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...c.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...c.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...c.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...c.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...c.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...c.errToObj(t)})}nonempty(e){return this.min(1,c.errToObj(e))}trim(){return new ey({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ey({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ey({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ey.create=e=>new ey({checks:[],typeName:p.ZodString,coerce:e?.coerce??!1,...G(e)});class eg extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.number,received:t.parsedType}),J}let r=new B;for(let a of this._def.checks)"int"===a.kind?u.isInteger(e.data)||(U(t=this._getOrReturnCtx(e,t),{code:L.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(U(t=this._getOrReturnCtx(e,t),{code:L.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(U(t=this._getOrReturnCtx(e,t),{code:L.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):"multipleOf"===a.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,n=r>a?r:a;return Number.parseInt(e.toFixed(n).replace(".",""))%Number.parseInt(t.toFixed(n).replace(".",""))/10**n}(e.data,a.value)&&(U(t=this._getOrReturnCtx(e,t),{code:L.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):"finite"===a.kind?Number.isFinite(e.data)||(U(t=this._getOrReturnCtx(e,t),{code:L.not_finite,message:a.message}),r.dirty()):u.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,c.toString(t))}gt(e,t){return this.setLimit("min",e,!1,c.toString(t))}lte(e,t){return this.setLimit("max",e,!0,c.toString(t))}lt(e,t){return this.setLimit("max",e,!1,c.toString(t))}setLimit(e,t,r,a){return new eg({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:c.toString(a)}]})}_addCheck(e){return new eg({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:c.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:c.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:c.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:c.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:c.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:c.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:c.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:c.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:c.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&u.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}eg.create=e=>new eg({checks:[],typeName:p.ZodNumber,coerce:e?.coerce||!1,...G(e)});class e_ extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P.bigint)return this._getInvalidInput(e);let r=new B;for(let a of this._def.checks)"min"===a.kind?(a.inclusive?e.data<a.value:e.data<=a.value)&&(U(t=this._getOrReturnCtx(e,t),{code:L.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"max"===a.kind?(a.inclusive?e.data>a.value:e.data>=a.value)&&(U(t=this._getOrReturnCtx(e,t),{code:L.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):"multipleOf"===a.kind?e.data%a.value!==BigInt(0)&&(U(t=this._getOrReturnCtx(e,t),{code:L.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):u.assertNever(a);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.bigint,received:t.parsedType}),J}gte(e,t){return this.setLimit("min",e,!0,c.toString(t))}gt(e,t){return this.setLimit("min",e,!1,c.toString(t))}lte(e,t){return this.setLimit("max",e,!0,c.toString(t))}lt(e,t){return this.setLimit("max",e,!1,c.toString(t))}setLimit(e,t,r,a){return new e_({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:c.toString(a)}]})}_addCheck(e){return new e_({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:c.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:c.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:c.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:c.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:c.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}e_.create=e=>new e_({checks:[],typeName:p.ZodBigInt,coerce:e?.coerce??!1,...G(e)});class ev extends X{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.boolean,received:t.parsedType}),J}return K(e.data)}}ev.create=e=>new ev({typeName:p.ZodBoolean,coerce:e?.coerce||!1,...G(e)});class ek extends X{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.date,received:t.parsedType}),J}if(Number.isNaN(e.data.getTime()))return U(this._getOrReturnCtx(e),{code:L.invalid_date}),J;let r=new B;for(let a of this._def.checks)"min"===a.kind?e.data.getTime()<a.value&&(U(t=this._getOrReturnCtx(e,t),{code:L.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):"max"===a.kind?e.data.getTime()>a.value&&(U(t=this._getOrReturnCtx(e,t),{code:L.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):u.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ek({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:c.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:c.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ek.create=e=>new ek({checks:[],coerce:e?.coerce||!1,typeName:p.ZodDate,...G(e)});class eb extends X{_parse(e){if(this._getType(e)!==P.symbol){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.symbol,received:t.parsedType}),J}return K(e.data)}}eb.create=e=>new eb({typeName:p.ZodSymbol,...G(e)});class ex extends X{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.undefined,received:t.parsedType}),J}return K(e.data)}}ex.create=e=>new ex({typeName:p.ZodUndefined,...G(e)});class ew extends X{_parse(e){if(this._getType(e)!==P.null){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.null,received:t.parsedType}),J}return K(e.data)}}ew.create=e=>new ew({typeName:p.ZodNull,...G(e)});class eE extends X{constructor(){super(...arguments),this._any=!0}_parse(e){return K(e.data)}}eE.create=e=>new eE({typeName:p.ZodAny,...G(e)});class eA extends X{constructor(){super(...arguments),this._unknown=!0}_parse(e){return K(e.data)}}eA.create=e=>new eA({typeName:p.ZodUnknown,...G(e)});class eI extends X{_parse(e){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.never,received:t.parsedType}),J}}eI.create=e=>new eI({typeName:p.ZodNever,...G(e)});class eT extends X{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.void,received:t.parsedType}),J}return K(e.data)}}eT.create=e=>new eT({typeName:p.ZodVoid,...G(e)});class eS extends X{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==P.array)return U(t,{code:L.invalid_type,expected:P.array,received:t.parsedType}),J;if(null!==a.exactLength){let e=t.data.length>a.exactLength.value,n=t.data.length<a.exactLength.value;(e||n)&&(U(t,{code:e?L.too_big:L.too_small,minimum:n?a.exactLength.value:void 0,maximum:e?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(null!==a.minLength&&t.data.length<a.minLength.value&&(U(t,{code:L.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),null!==a.maxLength&&t.data.length>a.maxLength.value&&(U(t,{code:L.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>a.type._parseAsync(new Y(t,e,t.path,r)))).then(e=>B.mergeArray(r,e));let n=[...t.data].map((e,r)=>a.type._parseSync(new Y(t,e,t.path,r)));return B.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new eS({...this._def,minLength:{value:e,message:c.toString(t)}})}max(e,t){return new eS({...this._def,maxLength:{value:e,message:c.toString(t)}})}length(e,t){return new eS({...this._def,exactLength:{value:e,message:c.toString(t)}})}nonempty(e){return this.min(1,e)}}eS.create=(e,t)=>new eS({type:e,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,...G(t)});class eC extends X{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=u.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==P.object){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.object,received:t.parsedType}),J}let{status:t,ctx:r}=this._processInputParams(e),{shape:a,keys:n}=this._getCached(),s=[];if(!(this._def.catchall instanceof eI&&"strip"===this._def.unknownKeys))for(let e in r.data)n.includes(e)||s.push(e);let i=[];for(let e of n){let t=a[e],n=r.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new Y(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof eI){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of s)i.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)s.length>0&&(U(r,{code:L.unrecognized_keys,keys:s}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of s){let a=r.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new Y(r,a,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of i){let r=await t.key,a=await t.value;e.push({key:r,value:a,alwaysSet:t.alwaysSet})}return e}).then(e=>B.mergeObjectSync(t,e)):B.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return c.errToObj,new eC({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let a=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:c.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new eC({...this._def,unknownKeys:"strip"})}passthrough(){return new eC({...this._def,unknownKeys:"passthrough"})}extend(e){return new eC({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new eC({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new eC({...this._def,catchall:e})}pick(e){let t={};for(let r of u.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new eC({...this._def,shape:()=>t})}omit(e){let t={};for(let r of u.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new eC({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof eC){let r={};for(let a in t.shape){let n=t.shape[a];r[a]=eW.create(e(n))}return new eC({...t._def,shape:()=>r})}if(t instanceof eS)return new eS({...t._def,type:e(t.element)});if(t instanceof eW)return eW.create(e(t.unwrap()));if(t instanceof eK)return eK.create(e(t.unwrap()));if(t instanceof eM)return eM.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of u.objectKeys(this.shape)){let a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new eC({...this._def,shape:()=>t})}required(e){let t={};for(let r of u.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eW;)e=e._def.innerType;t[r]=e}return new eC({...this._def,shape:()=>t})}keyof(){return eV(u.objectKeys(this.shape))}}eC.create=(e,t)=>
3new eC({shape:()=>e,unknownKeys:"strip",catchall:eI.create(),typeName:p.ZodObject,...G(t)}),eC.strictCreate=(e,t)=>new eC({shape:()=>e,unknownKeys:"strict",catchall:eI.create(),typeName:p.ZodObject,...G(t)}),eC.lazycreate=(e,t)=>new eC({shape:e,unknownKeys:"strip",catchall:eI.create(),typeName:p.ZodObject,...G(t)});class eO extends X{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new $(e.ctx.common.issues));return U(t,{code:L.invalid_union,unionErrors:r}),J});{let e,a=[];for(let n of r){let r={...t,common:{...t.common,issues:[]},parent:null},s=n._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&a.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let n=a.map(e=>new $(e));return U(t,{code:L.invalid_union,unionErrors:n}),J}}get options(){return this._def.options}}eO.create=(e,t)=>new eO({options:e,typeName:p.ZodUnion,...G(t)});let eN=e=>{if(e instanceof eL)return eN(e.schema);if(e instanceof eJ)return eN(e.innerType());if(e instanceof e$)return[e.value];if(e instanceof ez)return e.options;if(e instanceof eU)return u.objectValues(e.enum);else if(e instanceof eq)return eN(e._def.innerType);else if(e instanceof ex)return[void 0];else if(e instanceof ew)return[null];else if(e instanceof eW)return[void 0,...eN(e.unwrap())];else if(e instanceof eK)return[null,...eN(e.unwrap())];else if(e instanceof eG)return eN(e.unwrap());else if(e instanceof eQ)return eN(e.unwrap());else if(e instanceof eY)return eN(e._def.innerType);else return[]};class eR extends X{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.object)return U(t,{code:L.invalid_type,expected:P.object,received:t.parsedType}),J;let r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(U(t,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let a=new Map;
3for(let r of t){let t=eN(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let n of t){if(a.has(n))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);a.set(n,r)}}return new eR({typeName:p.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...G(r)})}}class ej extends X{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=(e,a)=>{if("aborted"===e.status||"aborted"===a.status)return J;let n=function e(t,r){let a=F(t),n=F(r);if(t===r)return{valid:!0,data:t};if(a===P.object&&n===P.object){let a=u.objectKeys(r),n=u.objectKeys(t).filter(e=>-1!==a.indexOf(e)),s={...t,...r};for(let a of n){let n=e(t[a],r[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===P.array&&n===P.array){if(t.length!==r.length)return{valid:!1};let a=[];for(let n=0;n<t.length;n++){let s=e(t[n],r[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}if(a===P.date&&n===P.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,a.value);return n.valid?(("dirty"===e.status||"dirty"===a.status)&&t.dirty(),{status:t.value,value:n.data}):(U(r,{code:L.invalid_intersection_types}),J)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>a(e,t)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ej.create=(e,t,r)=>new ej({left:e,right:t,typeName:p.ZodIntersection,...G(r)});class eM extends X{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==P.array)return U(r,{code:L.invalid_type,expected:P.array,received:r.parsedType}),J;if(r.data.length<this._def.items.length)return U(r,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&r.data.length>this._def.items.length&&(U(r,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let a=[...r.data].map((e,t)=>{let a=this._def.items[t]||this._def.rest;return a?a._parse(new Y(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(a).then(e=>B.mergeArray(t,e)):B.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new eM({...this._def,rest:e})}}eM.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new eM({items:e,typeName:p.ZodTuple,rest:null,...G(t)})};class eZ extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==P.object)return U(r,{code:L.invalid_type,expected:P.object,received:r.parsedType}),J;let a=[],n=this._def.keyType,s=this._def.valueType;for(let e in r.data)a.push({key:n._parse(new Y(r,e,r.path,e)),value:s._parse(new Y(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?B.mergeObjectAsync(t,a):B.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return new eZ(t instanceof X?{keyType:e,valueType:t,typeName:p.ZodRecord,...G(r)}:{keyType:ey.create(),valueType:e,typeName:p.ZodRecord,...G(t)})}}class eD extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==P.map)return U(r,{code:L.invalid_type,expected:P.map,received:r.parsedType}),J;let a=this._def.keyType,n=this._def.valueType,s=[...r.data.entries()].map(([e,t],s)=>({key:a._parse(new Y(r,e,r.path,[s,"key"])),value:n._parse(new Y(r,t,r.path,[s,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of s){let a=await r.key,n=await r.value;if("aborted"===a.status||"aborted"===n.status)return J;("dirty"===a.status||"dirty"===n.status)&&t.dirty(),e.set(a.value,n.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of s){let a=r.key,n=r.value;if("aborted"===a.status||"aborted"===n.status)return J;("dirty"===a.status||"dirty"===n.status)&&t.dirty(),e.set(a.value,n.value)}return{status:t.value,value:e}}}}eD.create=(e,t,r)=>new eD({valueType:t,keyType:e,typeName:p.ZodMap,...G(r)});class eP extends X{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==P.set)return U(r,{code:L.invalid_type,expected:P.set,received:r.parsedType}),J;let a=this._def;null!==a.minSize&&r.data.size<a.minSize.value&&(U(r,{code:L.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),null!==a.maxSize&&r.data.size>a.maxSize.value&&(U(r,{code:L.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());let n=this._def.valueType;function s(e){let r=new Set;for(let a of e){if("aborted"===a.status)return J;"dirty"===a.status&&t.dirty(),r.add(a.value)}return{status:t.value,value:r}}let i=[...r.data.values()].map((e,t)=>n._parse(new Y(r,e,r.path,t)));return r.common.async?Promise.all(i).then(e=>s(e)):s(i)}min(e,t){return new eP({...this._def,minSize:{value:e,message:c.toString(t)}})}max(e,t){return new eP({...this._def,maxSize:{value:e,message:c.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eP.create=(e,t)=>
3new eP({valueType:e,minSize:null,maxSize:null,typeName:p.ZodSet,...G(t)});class eF extends X{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.function)return U(t,{code:L.invalid_type,expected:P.function,received:t.parsedType}),J;function r(e,r){return z({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,V,V].filter(e=>!!e),issueData:{code:L.invalid_arguments,argumentsError:r}})}function a(e,r){return z({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,V,V].filter(e=>!!e),issueData:{code:L.invalid_return_type,returnTypeError:r}})}let n={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof eB){let e=this;return K(async function(...t){let i=new $([]),o=await e._def.args.parseAsync(t,n).catch(e=>{throw i.addIssue(r(t,e)),i}),l=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(l,n).catch(e=>{throw i.addIssue(a(l,e)),i})})}{let e=this;return K(function(...t){let i=e._def.args.safeParse(t,n);if(!i.success)throw new $([r(t,i.error)]);let o=Reflect.apply(s,this,i.data),l=e._def.returns.safeParse(o,n);if(!l.success)throw new $([a(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eF({...this._def,args:eM.create(e).rest(eA.create())})}returns(e){return new eF({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eF({args:e||eM.create([]).rest(eA.create()),returns:t||eA.create(),typeName:p.ZodFunction,...G(r)})}}class eL extends X{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eL.create=(e,t)=>new eL({getter:e,typeName:p.ZodLazy,...G(t)});class e$ extends X{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return U(t,{received:t.data,code:L.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eV(e,t){return new ez({values:e,typeName:p.ZodEnum,...G(t)})}e$.create=(e,t)=>new e$({value:e,typeName:p.ZodLiteral,...G(t)});class ez extends X{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return U(t,{expected:u.joinValues(r),received:t.parsedType,code:L.invalid_type}),J}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return U(t,{received:t.data,code:L.invalid_enum_value,options:r}),J}return K(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ez.create(e,{...this._def,...t})}exclude(e,t=this._def){return ez.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ez.create=eV;class eU extends X{_parse(e){let t=u.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==P.string&&r.parsedType!==P.number){let e=u.objectValues(t);return U(r,{expected:u.joinValues(e),received:r.parsedType,code:L.invalid_type}),J}if(this._cache||(this._cache=new Set(u.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=u.objectValues(t);return U(r,{received:r.data,code:L.invalid_enum_value,options:e}),J}return K(e.data)}get enum(){return this._def.values}}eU.create=(e,t)=>new eU({values:e,typeName:p.ZodNativeEnum,...G(t)});class eB extends X{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==P.promise&&!1===t.common.async?(U(t,{code:L.invalid_type,expected:P.promise,received:t.parsedType}),J):K((t.parsedType===P.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eB.create=(e,t)=>new eB({type:e,typeName:p.ZodPromise,...G(t)});class eJ extends X{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:e=>{U(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===a.type){let e=a.transform(r.data,n);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return J;let a=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===a.status?J:"dirty"===a.status||"dirty"===t.value?W(a.value):a});{if("aborted"===t.value)return J;let a=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===a.status?J:"dirty"===a.status||"dirty"===t.value?W(a.value):a}}if("refinement"===a.type){let e=e=>{let t=a.refinement(e,n);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?J:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===a.status?J:("dirty"===a.status&&t.dirty(),e(a.value),{status:t.value,value:a.value})}}if("transform"===a.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>"valid"!==e.status?J:Promise.resolve(a.transform(e.value,n)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if("valid"!==e.status)return J;let s=a.transform(e.value,n);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}u.assertNever(a)}}eJ.create=(e,t,r)=>new eJ({schema:e,typeName:p.ZodEffects,effect:t,...G(r)}),eJ.createWithPreprocess=(e,t,r)=>new eJ({schema:t,effect:{type:"preprocess",transform:e},typeName:p.ZodEffects,...G(r)});class eW extends X{_parse(e){return this._getType(e)===P.undefined?K(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eW.create=(e,t)=>
3new eW({innerType:e,typeName:p.ZodOptional,...G(t)});class eK extends X{_parse(e){return this._getType(e)===P.null?K(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eK.create=(e,t)=>new eK({innerType:e,typeName:p.ZodNullable,...G(t)});class eq extends X{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===P.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eq.create=(e,t)=>new eq({innerType:e,typeName:p.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...G(t)});class eY extends X{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return q(a)?a.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new $(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new $(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eY.create=(e,t)=>new eY({innerType:e,typeName:p.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...G(t)});class eH extends X{_parse(e){if(this._getType(e)!==P.nan){let t=this._getOrReturnCtx(e);return U(t,{code:L.invalid_type,expected:P.nan,received:t.parsedType}),J}return{status:"valid",value:e.data}}}eH.create=e=>new eH({typeName:p.ZodNaN,...G(e)}),Symbol("zod_brand");class eG extends X{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eX extends X{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?J:"dirty"===e.status?(t.dirty(),W(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?J:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eX({in:e,out:t,typeName:p.ZodPipeline})}}class eQ extends X{_parse(e){let t=this._def.innerType._parse(e),r=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return q(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}eQ.create=(e,t)=>new eQ({innerType:e,typeName:p.ZodReadonly,...G(t)}),eC.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(p||(p={})),ey.create,eg.create,eH.create,e_.create,ev.create,ek.create,eb.create,ex.create,ew.create,eE.create,eA.create,eI.create,eT.create,eS.create,eC.create,eC.strictCreate,eO.create,eR.create,ej.create,eM.create,eZ.create,eD.create,eP.create,eF.create,eL.create,e$.create,ez.create,eU.create,eB.create,eJ.create,eW.create,eK.create,eJ.createWithPreprocess,eX.create;var e0={code:"0",name:"text",parse:e=>{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},e1={code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},e2={code:"4",name:"assistant_message",parse:e=>{if(null==e||"object"!=typeof e||!("id"in e)||!("role"in e)||!("content"in e)||"string"!=typeof e.id||"string"!=typeof e.role||"assistant"!==e.role||!Array.isArray(e.content)||!e.content.every(e=>null!=e&&"object"==typeof e&&"type"in e&&"text"===e.type&&"text"in e&&null!=e.text&&"object"==typeof e.text&&"value"in e.text&&"string"==typeof e.text.value))throw Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:e}}},e4={code:"5",name:"assistant_control_data",parse:e=>{if(null==e||"object"!=typeof e||!("threadId"in e)||!("messageId"in e)||"string"!=typeof e.threadId||"string"!=typeof e.messageId)throw Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:e.threadId,messageId:e.messageId}}}},e5={code:"6",name:"data_message",parse:e=>{if(null==e||"object"!=typeof e||!("role"in e)||!("data"in e)||"string"!=typeof e.role||"data"!==e.role)throw Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:e}}},e9=[e0,e1,e2,e4,e5];e0.code,e1.code,e2.code,e4.code,e5.code,e0.name,e0.code,e1.name,e1.code,e2.name,e2.code,e4.name,e4.code,e5.name,e5.co
3de,e9.map(e=>e.code);var e6=[{code:"0",name:"text",parse:e=>{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},{code:"2",name:"data",parse:e=>{if(!Array.isArray(e))throw Error('"data" parts expect an array value.');return{type:"data",value:e}}},{code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},{code:"8",name:"message_annotations",parse:e=>{if(!Array.isArray(e))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:e}}},{code:"9",name:"tool_call",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName||!("args"in e)||"object"!=typeof e.args)throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:e}}},{code:"a",name:"tool_result",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("result"in e))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:e}}},{code:"b",name:"tool_call_streaming_start",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName)throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:e}}},{code:"c",name:"tool_call_delta",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("argsTextDelta"in e)||"string"!=typeof e.argsTextDelta)throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:e}}},{code:"d",name:"finish_message",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason)throw Error('"finish_message" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason};return"usage"in e&&null!=e.usage&&"object"==typeof e.usage&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:"number"==typeof e.usage.promptTokens?e.usage.promptTokens:NaN,completionTokens:"number"==typeof e.usage.completionTokens?e.usage.completionTokens:NaN}),{type:"finish_message",value:t}}},{code:"e",name:"finish_step",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason)throw Error('"finish_step" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason,isContinued:!1};return"usage"in e&&null!=e.usage&&"object"==typeof e.usage&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:"number"==typeof e.usage.promptTokens?e.usage.promptTokens:NaN,completionTokens:"number"==typeof e.usage.completionTokens?e.usage.completionTokens:NaN}),"isContinued"in e&&"boolean"==typeof e.isContinued&&(t.isContinued=e.isContinued),{type:"finish_step",value:t}}},{code:"f",name:"start_step",parse:e=>{if(null==e||"object"!=typeof e||!("messageId"in e)||"string"!=typeof e.messageId)throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:e.messageId}}}},{code:"g",name:"reasoning",parse:e=>{if("string"!=typeof e)throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:e}}},{code:"h",name:"source",parse:e=>{if(null==e||"object"!=typeof e)throw Error('"source" parts expect a Source object.');return{type:"source",value:e}}},{code:"i",name:"redacted_reasoning",parse:e=>{if(null==e||"object"!=typeof e||!("data"in e)||"string"!=typeof e.data)throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:e.data}}}},{code:"j",name:"reasoning_signature",parse:e=>{if(null==e||"object"!=typeof e||!("signature"in e)||"string"!=typeof e.signature)throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:e.signature}}}},{code:"k",name:"file",parse:e=>{if(null==e||"object"!=typeof e||!("data"in e)||"string"!=typeof e.data||!("mimeType"in e)||"string"!=typeof e.mimeType)throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:e}}}],e3=Object.fromEntries(e6.map(e=>[e.code,e]));Object.fromEntries(e6.map(e=>[e.name,e.code]));var e8=e6.map(e=>e.code),e7=e=>{let t=e.indexOf(":");if(-1===t)throw Error("Failed to parse stream string. No separator found.");let r=e.slice(0,t);if(!e8.includes(r))throw Error(`Failed to parse stream string. Invalid code ${r}.`);let a=JSON.parse(e.slice(t+1));return e3[r].parse(a)};
3async function te({stream:e,onTextPart:t,onReasoningPart:r,onReasoningSignaturePart:a,onRedactedReasoningPart:n,onSourcePart:s,onFilePart:i,onDataPart:o,onErrorPart:l,onToolCallStreamingStartPart:u,onToolCallDeltaPart:d,onToolCallPart:c,onToolResultPart:p,onMessageAnnotationsPart:h,onFinishMessagePart:f,onFinishStepPart:m,onStartStepPart:y}){let g=e.getReader(),_=new TextDecoder,v=[],k=0;for(;;){let{value:e}=await g.read();if(e&&(v.push(e),k+=e.length,10!==e[e.length-1]))continue;if(0===v.length)break;let b=function(e,t){let r=new Uint8Array(t),a=0;for(let t of e)r.set(t,a),a+=t.length;return e.length=0,r}(v,k);for(let{type:e,value:g}of(k=0,_.decode(b,{stream:!0}).split("\n").filter(e=>""!==e).map(e7)))switch(e){case"text":await (null==t?void 0:t(g));break;case"reasoning":await (null==r?void 0:r(g));break;case"reasoning_signature":await (null==a?void 0:a(g));break;case"redacted_reasoning":await (null==n?void 0:n(g));break;case"file":await (null==i?void 0:i(g));break;case"source":await (null==s?void 0:s(g));break;case"data":await (null==o?void 0:o(g));break;case"error":await (null==l?void 0:l(g));break;case"message_annotations":await (null==h?void 0:h(g));break;case"tool_call_streaming_start":await (null==u?void 0:u(g));break;case"tool_call_delta":await (null==d?void 0:d(g));break;case"tool_call":await (null==c?void 0:c(g));break;case"tool_result":await (null==p?void 0:p(g));break;case"finish_message":await (null==f?void 0:f(g));break;case"finish_step":await (null==m?void 0:m(g));break;case"start_step":await (null==y?void 0:y(g));break;default:throw Error(`Unknown stream part type: ${e}`)}}}async function tt({stream:e,update:t,onToolCall:r,onFinish:a,generateId:n=R,getCurrentDate:s=()=>new Date,lastMessage:i}){var o,l;let u,d,c,p=(null==i?void 0:i.role)==="assistant",h=p?1+(null!=(l=null==(o=i.toolInvocations)?void 0:o.reduce((e,t)=>{var r;return Math.max(e,null!=(r=t.step)?r:0)},0))?l:0):0,f=p?structuredClone(i):{id:n(),createdAt:s(),role:"assistant",content:"",parts:[]};function m(e,t){let r=f.parts.find(t=>"tool-invocation"===t.type&&t.toolInvocation.toolCallId===e);null!=r?r.toolInvocation=t:f.parts.push({type:"tool-invocation",toolInvocation:t})}let y=[],g=p?null==i?void 0:i.annotations:void 0,_={},v={completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},k="unknown";function b(){let e=[...y];(null==g?void 0:g.length)&&(f.annotations=g),t({message:{...structuredClone(f),revisionId:n()},data:e,replaceLastMessage:p})}await te({stream:e,onTextPart(e){null==u?(u={type:"text",text:e},f.parts.push(u)):u.text+=e,f.content+=e,b()},onReasoningPart(e){var t;null==c?(c={type:"text",text:e},null!=d&&d.details.push(c)):c.text+=e,null==d?(d={type:"reasoning",reasoning:e,details:[c]},f.parts.push(d)):d.reasoning+=e,f.reasoning=(null!=(t=f.reasoning)?t:"")+e,b()},onReasoningSignaturePart(e){null!=c&&(c.signature=e.signature)},onRedactedReasoningPart(e){null==d&&(d={type:"reasoning",reasoning:"",details:[]},f.parts.push(d)),d.details.push({type:"redacted",data:e.data}),c=void 0,b()},onFilePart(e){f.parts.push({type:"file",mimeType:e.mimeType,data:e.data}),b()},onSourcePart(e){f.parts.push({type:"source",source:e}),b()},onToolCallStreamingStartPart(e){null==f.toolInvocations&&(f.toolInvocations=[]),_[e.toolCallId]={text:"",step:h,toolName:e.toolName,index:f.toolInvocations.length};let t={state:"partial-call",step:h,toolCallId:e.toolCallId,toolName:e.toolName,args:void 0};f.toolInvocations.push(t),m(e.toolCallId,t),b()},onToolCallDeltaPart(e){let t=_[e.toolCallId];t.text+=e.argsTextDelta;let{value:r}=function(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=M({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=M({text:function(e){let t=["ROOT"],r=-1,a=null;function n(e,n,s){switch(e){case'"':r=n,t.pop(),t.push(s),t.push("INSIDE_STRING");break;case"f":case"t":case"n":r=n,a=n,t.pop(),t.push(s),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(s),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=n,t.pop(),t.push(s),t.push("INSIDE_NUMBER");break;case"{":r=n,t.pop(),t.push(s),t.push("INSIDE_OBJECT_START");break;case"[":r=n,t.pop(),t.push(s),t.push("INSIDE_ARRAY_START")}}function s(e,a){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":r=a,t.pop()}}function i(e,a){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=a,t.pop()}}for(let o=0;o<e.length;o++){let l=e[o];switch(t[t.length-1]){case"ROOT":n(l,o,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":r=o,t.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break;case"INSIDE_OBJECT_KEY":'"'===l&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break;case"INSIDE_OBJECT_AFTER_KEY":":"===l&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break;case"INSIDE_OBJECT_BEFORE_VALUE":n(l,o,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":s(l,o);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),r=o;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:r=o}break;case"INSIDE_ARRAY_START":"]"===l?(r=o,t.pop()):(r=o,n(l,o,"INSIDE_ARRAY_AFTER_VALUE"));break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=o,t.pop();break;default:r=o}break;case"INSIDE_ARRAY_AFTER_COMMA":n(l,o,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),r=o;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=o;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,o),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&s(l,o);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&s(l,o);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,o);break;default:t.pop()}break;case"INSIDE_LITERAL":{let n=e.substring(a,o+1);"false".startsWith(n)||"true".startsWith(n)||"null".startsWith(n)?r=o:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?s(l,o):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,o))}}}let o=e.slice(0,r+1);for(let r=t.length-1;r>=0;r--)switch(t[r]){case"INSIDE_STRING":o+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":o+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":o+="]";break;case"INSIDE_LITERAL":{let t=e.substring(a,e.length);"true".startsWith(t)?o+="true".slice(t.length):"false".startsWith(t)?o+="false".slice(t.length):"null".startsWith(t)&&(o+="null".slice(t.length))}}return o}(e)})).success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"}}(t.text),a={state:"partial-call",step:t.step,toolCallId:e.toolCallId,toolName:t.toolName,args:r};f.toolInvocations[t.index]=a,m(e.toolCallId,a),b()},async onToolCallPart(e){let t={state:"call",step:h,...e};if(null!=_[e.toolCallId]?f.toolInvocations[_[e.toolCallId].index]=t:(null==f.toolInvocations&&(f.toolInvocations=[]),f.toolInvocations.push(t)),m(e.toolCallId,t),b(),r){let t=await r({toolCall:e});if(null!=t){let r={state:"result",step:h,...e,result:t};f.toolInvocations[f.toolInvocations.length-1]=r,m(e.toolCallId,r),b()}}},onToolResultPart(e){let t=f.toolInvocations;if(null==t)throw Error("tool_result must be preceded by a tool_call");let r=t.findIndex(t=>t.toolCallId===e.toolCallId);if(-1===r)throw Error("tool_result must be preceded by a tool_call with the same toolCallId");let a={...t[r],state:"result",...e};t[r]=a,m(e.toolCallId,a),b()},onDataPart(e){y.push(...e),b()},onMessageAnnotationsPart(e){null==g?g=[...e]:g.push(...e),b()},onFinishStepPart(e){h+=1,u=e.isContinued?u:void 0,d=void 0,c=void 0},onStartStepPart(e){p||(f.id=e.messageId),f.parts.push({type:"step-start"}),b()},onFinishMessagePart(e){k=e.finishReason,null!=e.usage&&(v=function({promptTokens:e,completionTokens:t}){return{promptTokens:e,completionTokens:t,totalTokens:e+t}}(e.usage))},onErrorPart(e){throw Error(e)}}),null==a||a({message:f,finishReason:k,usage:v})}
3async function tr({stream:e,onTextPart:t}){let r=e.pipeThrough(new TextDecoderStream).getReader();for(;;){let{done:e,value:a}=await r.read();if(e)break;await t(a)}}async function ta({stream:e,update:t,onFinish:r,getCurrentDate:a=()=>new Date,generateId:n=R}){let s={type:"text",text:""},i={id:n(),createdAt:a(),role:"assistant",content:"",parts:[s]};await tr({stream:e,onTextPart:e=>{i.content+=e,s.text+=e,t({message:{...i},data:[],replaceLastMessage:!1})}}),null==r||r(i,{usage:{completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},finishReason:"unknown"})}async function tn({api:e,body:t,streamProtocol:r="data",credentials:a,headers:n,abortController:s,restoreMessagesOnFailure:i,onResponse:o,onUpdate:l,onFinish:u,onToolCall:d,generateId:c,fetch:p=fetch,lastMessage:h,requestType:f="generate"}){var m,y,g;let _="resume"===f?p(`${e}?chatId=${t.id}`,{method:"GET",headers:{"Content-Type":"application/json",...n},signal:null==(m=null==s?void 0:s())?void 0:m.signal,credentials:a}):p(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",...n},signal:null==(y=null==s?void 0:s())?void 0:y.signal,credentials:a}),v=await _.catch(e=>{throw i(),e});if(o)try{await o(v)}catch(e){throw e}if(!v.ok)throw i(),Error(null!=(g=await v.text())?g:"Failed to fetch the chat response.");if(!v.body)throw Error("The response body is empty.");switch(r){case"text":return void await ta({stream:v.body,update:l,onFinish:u,generateId:c});case"data":return void await tt({stream:v.body,update:l,lastMessage:h,onToolCall:d,onFinish({message:e,finishReason:t,usage:r}){u&&null!=e&&u(e,{usage:r,finishReason:t})},generateId:c});default:throw Error(`Unknown stream protocol: ${r}`)}}function ts(e){return null==e?void 0:e.reduce((e,t)=>{var r;return Math.max(e,null!=(r=t.step)?r:0)},0)}function ti(e){var t;return null!=(t=e.parts)?t:[...e.toolInvocations?e.toolInvocations.map(e=>({type:"tool-invocation",toolInvocation:e})):[],...e.reasoning?[{type:"reasoning",reasoning:e.reasoning,details:[{type:"text",text:e.reasoning}]}]:[],...e.content?[{type:"text",text:e.content}]:[]]}function to(e){return e.map(e=>({...e,parts:ti(e)}))}async function tl(e){if(!e)return[];if(globalThis.FileList&&e instanceof globalThis.FileList)return Promise.all(Array.from(e).map(async e=>{let{name:t,type:r}=e;return{name:t,contentType:r,url:await new Promise((t,r)=>{let a=new FileReader;a.onload=e=>{var r;t(null==(r=e.target)?void 0:r.result)},a.onerror=e=>r(e),a.readAsDataURL(e)})}}));if(Array.isArray(e))return e;throw Error("Invalid attachments type")}function tu(e){if("assistant"!==e.role)return!1;let t=e.parts.reduce((e,t,r)=>"step-start"===t.type?r:e,-1),r=e.parts.slice(t+1).filter(e=>"tool-invocation"===e.type);return r.length>0&&r.every(e=>"result"in e.toolInvocation)}Symbol.for("vercel.ai.schema");var td=r(14806),tc=Object.prototype.hasOwnProperty;let tp=new WeakMap,th=()=>{},tf=th(),tm=Object,ty=e=>e===tf,tg=(e,t)=>({...e,...t}),t_={},tv={},tk="undefined",tb=typeof window!=tk,tx=typeof document!=tk,tw=tb&&"Deno"in window,tE=(e,t)=>{let r=tp.get(e);return[()=>!ty(t)&&e.get(t)||t_,a=>{if(!ty(t)){let n=e.get(t);t in tv||(tv[t]=n),r[5](t,tg(n,a),n||t_)}},r[6],()=>!ty(t)&&t in tv?tv[t]:!ty(t)&&e.get(t)||t_]},tA=!0,[tI,tT]=tb&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[th,th],tS={initFocus:e=>(tx&&document.addEventListener("visibilitychange",e),tI("focus",e),()=>{tx&&document.removeEventListener("visibilitychange",e),tT("focus",e)}),initReconnect:e=>{let t=()=>{tA=!0,e()},r=()=>{tA=!1};return tI("online",t),tI("offline",r),()=>{tT("online",t),tT("offline",r)}}},tC=!h.useId,tO=!tb||tw,tN=tO?h.useEffect:h.useLayoutEffect,tR="undefined"!=typeof navigator&&navigator.connection,tj=!tO&&tR&&(["slow-2g","2g"].includes(tR.effectiveType)||tR.saveData),tM=new WeakMap,tZ=(e,t)=>e==="[object ".concat(t,"]"),tD=0,tP=e=>{let t,r,a=typeof e,n=tm.prototype.toString.call(e),s=tZ(n,"Date"),i=tZ(n,"RegExp"),o=tZ(n,"Object");if(tm(e)!==e||s||i)t=s?e.toJSON():"symbol"==a?e.toString():"string"==a?JSON.stringify(e):""+e;else{if(t=tM.get(e))return t;if(t=++tD+"~",tM.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=tP(e[r])+",";tM.set(e,t)}if(o){t="#";let a=tm.keys(e).sort();for(;!ty(r=a.pop());)ty(e[r])||(t+=r+":"+tP(e[r])+",");tM.set(e,t)}}return t},tF=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?tP(e):"",t]},tL=0,t$=()=>++tL;async function tV(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[a,n,s,i]=t,o=tg({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{}),l=o.populateCache,u=o.rollbackOnError,d=o.optimisticData,c=o.throwOnError;if("function"==typeof n){let e=[];for(let t of a.keys())!/^\$(inf|sub)\$/.test(t)&&n(a.get(t)._k)&&e.push(t);return Promise.all(e.map(p))}return p(n);async function p(e){let r,[n]=tF(e);if(!n)return;let[i,p]=tE(a,n),[h,f,m,y]=tp.get(a),g=()=>{let t=h[n];return("function"==typeof o.revalidate?o.revalidate(i().data,e):!1!==o.revalidate)&&(delete m[n],delete y[n],t&&t[0])?t[0](2).then(()=>i().data):i().data};if(t.length<3)return g();let _=s,v=!1,k=t$();f[n]=[k,0];let b=!ty(d),x=i(),w=x.data,E=x._c,A=ty(E)?w:E;if(b&&p({data:d="function"==typeof d?d(A,w):d,_c:A}),"function"==typeof _)try{_=_(A)}catch(e){r=e,v=!0}if(_&&"function"==typeof _.then){let e;if(_=await _.catch(e=>{r=e,v=!0}
3),k!==f[n][0]){if(v)throw r;return _}v&&b&&(e=r,"function"==typeof u?u(e):!1!==u)&&(l=!0,p({data:A,_c:tf}))}if(l&&!v&&("function"==typeof l?p({data:l(_,A),error:tf,_c:tf}):p({data:_,error:tf,_c:tf})),f[n][1]=t$(),Promise.resolve(g()).then(()=>{p({_c:tf})}),v){if(c)throw r;return}return _}}let tz=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},tU=(e,t)=>{if(!tp.has(e)){let r=tg(tS,t),a=Object.create(null),n=tV.bind(tf,e),s=th,i=Object.create(null),o=(e,t)=>{let r=i[e]||[];return i[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},l=(t,r,a)=>{e.set(t,r);let n=i[t];if(n)for(let e of n)e(r,a)},u=()=>{if(!tp.has(e)&&(tp.set(e,[a,Object.create(null),Object.create(null),Object.create(null),n,l,o]),!tO)){let t=r.initFocus(setTimeout.bind(tf,tz.bind(tf,a,0))),n=r.initReconnect(setTimeout.bind(tf,tz.bind(tf,a,1)));s=()=>{t&&t(),n&&n(),tp.delete(e)}}};return u(),[e,n,u,s]}return[e,tp.get(e)[4]]},[tB,tJ]=tU(new Map),tW=tg({onLoadingSlow:th,onSuccess:th,onError:th,onErrorRetry:(e,t,r,a,n)=>{let s=r.errorRetryCount,i=n.retryCount,o=~~((Math.random()+.5)*(1<<(i<8?i:8)))*r.errorRetryInterval;(ty(s)||!(i>s))&&setTimeout(a,o,n)},onDiscarded:th,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:tj?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:tj?5e3:3e3,compare:function e(t,r){var a,n;if(t===r)return!0;if(t&&r&&(a=t.constructor)===r.constructor){if(a===Date)return t.getTime()===r.getTime();if(a===RegExp)return t.toString()===r.toString();if(a===Array){if((n=t.length)===r.length)for(;n--&&e(t[n],r[n]););return -1===n}if(!a||"object"==typeof t){for(a in n=0,t)if(tc.call(t,a)&&++n&&!tc.call(r,a)||!(a in r)||!e(t[a],r[a]))return!1;return Object.keys(r).length===n}}return t!=t&&r!=r},isPaused:()=>!1,cache:tB,mutate:tJ,fallback:{}},{isOnline:()=>tA,isVisible:()=>{let e=tx&&document.visibilityState;return ty(e)||"hidden"!==e}}),tK=(e,t)=>{let r=tg(e,t);if(t){let{use:a,fallback:n}=e,{use:s,fallback:i}=t;a&&s&&(r.use=a.concat(s)),n&&i&&(r.fallback=tg(n,i))}return r},tq=(0,h.createContext)({}),tY=tb&&window.__SWR_DEVTOOLS_USE__,tH=(tY?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,a)=>{let n=r&&((...e)=>{let[a]=tF(t),[,,,n]=tp.get(tB);if(a.startsWith("$inf$"))return r(...e);let s=n[a];return ty(s)?r(...e):(delete n[a],s)});return e(t,n,a)});tY&&(window.__SWR_DEVTOOLS_REACT__=h);let tG=()=>{},tX=tG();new WeakMap;let tQ=h.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),t0={dedupe:!0},t1=Promise.resolve(tf);tm.defineProperty(e=>{let{value:t}=e,r=(0,h.useContext)(tq),a="function"==typeof t,n=(0,h.useMemo)(()=>a?t(r):t,[a,r,t]),s=(0,h.useMemo)(()=>a?n:tK(r,n),[a,r,n]),i=n&&n.provider,o=(0,h.useRef)(tf);i&&!o.current&&(o.current=tU(i(s.cache||tB),n));let l=o.current;return l&&(s.cache=l[0],s.mutate=l[1]),tN(()=>{if(l)return l[2]&&l[2](),l[3]},[]),(0,h.createElement)(tq.Provider,tg(e,{value:s}))},"defaultValue",{value:tW});let t2=(n=(e,t,r)=>{let{cache:a,compare:n,suspense:s,fallbackData:i,revalidateOnMount:o,revalidateIfStale:l,refreshInterval:u,refreshWhenHidden:d,refreshWhenOffline:c,keepPreviousData:p}=r,[f,m,y,g]=tp.get(a),[_,v]=tF(e),k=(0,h.useRef)(!1),b=(0,h.useRef)(!1),x=(0,h.useRef)(_),w=(0,h.useRef)(t),E=(0,h.useRef)(r),A=()=>E.current.isVisible()&&E.current.isOnline(),[I,T,S,C]=tE(a,_),O=(0,h.useRef)({}).current,N=ty(i)?ty(r.fallback)?tf:r.fallback[_]:i,R=(e,t)=>{for(let r in O)if("data"===r){if(!n(e[r],t[r])&&(!ty(e[r])||!n(V,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},j=(0,h.useMemo)(()=>{let e=!!_&&!!t&&(ty(o)?!E.current.isPaused()&&!s&&!1!==l:o),r=t=>{let r=tg(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},a=I(),n=C(),i=r(a),u=a===n?i:r(n),d=i;return[()=>{let e=r(I());return R(e,d)?(d.data=e.data,d.isLoading=e.isLoading,d.isValidating=e.isValidating,d.error=e.error,d):(d=e,e)},()=>u]},[a,_]),M=(0,td.useSyncExternalStore)((0,h.useCallback)(e=>S(_,(t,r)=>{R(r,t)||e()}),[a,_]),j[0],j[1]),Z=!k.current,D=f[_]&&f[_].length>0,P=M.data,F=ty(P)?N&&"function"==typeof N.then?tQ(N):N:P,L=M.error,$=(0,h.useRef)(F),V=p?ty(P)?ty($.current)?F:$.current:P:F,z=(!D||!!ty(L))&&(Z&&!ty(o)?o:!E.current.isPaused()&&(s?!ty(F)&&l:ty(F)||l)),U=!!(_&&t&&Z&&z),B=ty(M.isValidating)?U:M.isValidating,J=ty(M.isLoading)?U:M.isLoading,W=(0,h.useCallback)(async e=>{let t,a,s=w.current;if(!_||!s||b.current||E.current.isPaused())return!1;let i=!0,o=e||{},l=!y[_]||!o.dedupe,u=()=>tC?!b.current&&_===x.current&&k.current:_===x.current,d={isValidating:!1,isLoading:!1},c=()=>{T(d)},p=()=>{let e=y[_];e&&e[1]===a&&delete y[_]},h={isValidating:!0};ty(I().data)&&(h.isLoading=!0);try{if(l&&(T(h),r.loadingTimeout&&ty(I().data)&&setTimeout(()=>{i&&u()&&E.current.onLoadingSlow(_,r)},r.loadingTimeout),y[_]=[s(v),t$()]),[t,a]=y[_],t=await t,l&&setTimeout(p,r.dedupingInterval),!y[_]||y[_][1]!==a)return l&&u()&&E.current.onDiscarded(_),!1;d.error=tf;let e=m[_];if(!ty(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return c(),l&&u()&&E.current.onDiscarded(_),!1;let o=I().data;
3d.data=n(o,t)?o:t,l&&u()&&E.current.onSuccess(t,_,r)}catch(r){p();let e=E.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&u())&&(e.onError(r,_,e),(!0===t||"function"==typeof t&&t(r))&&(!E.current.revalidateOnFocus||!E.current.revalidateOnReconnect||A())&&e.onErrorRetry(r,_,e,e=>{let t=f[_];t&&t[0]&&t[0](3,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0}))}return i=!1,c(),!0},[_,a]),K=(0,h.useCallback)((...e)=>tV(a,x.current,...e),[]);if(tN(()=>{w.current=t,E.current=r,ty(P)||($.current=P)}),tN(()=>{if(!_)return;let e=W.bind(tf,t0),t=0;E.current.revalidateOnFocus&&(t=Date.now()+E.current.focusThrottleInterval);let r=((e,t,r)=>{let a=t[e]||(t[e]=[]);return a.push(r),()=>{let e=a.indexOf(r);e>=0&&(a[e]=a[a.length-1],a.pop())}})(_,f,(r,a={})=>{if(0==r){let r=Date.now();E.current.revalidateOnFocus&&r>t&&A()&&(t=r+E.current.focusThrottleInterval,e())}else if(1==r)E.current.revalidateOnReconnect&&A()&&e();else if(2==r)return W();else if(3==r)return W(a)});return b.current=!1,x.current=_,k.current=!0,T({_k:v}),z&&!y[_]&&(ty(F)||tO?e():(e=>tb&&typeof window.requestAnimationFrame!=tk?window.requestAnimationFrame(e):setTimeout(e,1))(e)),()=>{b.current=!0,r()}},[_]),tN(()=>{let e;function t(){let t="function"==typeof u?u(I().data):u;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!I().error&&(d||E.current.isVisible())&&(c||E.current.isOnline())?W(t0).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[u,d,c,_]),(0,h.useDebugValue)(V),s){let e=_&&ty(F);if(!tC&&tO&&e)throw Error("Fallback data is required when using Suspense in SSR.");e&&(w.current=t,E.current=r,b.current=!1);let a=g[_];if(tQ(!ty(a)&&e?K(a):t1),!ty(L)&&e)throw L;let n=e?W(t0):t1;!ty(V)&&e&&(n.status="fulfilled",n.value=!0),tQ(n)}return{mutate:K,get data(){return O.data=!0,V},get error(){return O.error=!0,L},get isValidating(){return O.isValidating=!0,B},get isLoading(){return O.isLoading=!0,J}}},function(...e){let t=(()=>{let e=(0,h.useContext)(tq);return(0,h.useMemo)(()=>tg(tW,e),[e])})(),[r,a,s]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],i=tK(t,s),o=n,{use:l}=i,u=(l||[]).concat(tH);for(let e=u.length;e--;)o=u[e](o);return o(r,a||i.fetcher||null,i)});var t4=r(25070);function t5(e,t){return null!=t?t4(e,t):e}var t9=function({api:e="/api/chat",id:t,initialMessages:r,initialInput:a="",sendExtraMessageFields:n,onToolCall:s,experimental_prepareRequestBody:i,maxSteps:o=1,streamProtocol:l="data",onResponse:u,onFinish:d,onError:c,credentials:p,headers:f,body:m,generateId:y=R,fetch:g,keepLastMessageOnError:_=!0,experimental_throttle:v}={}){let[k]=(0,h.useState)(y),b=null!=t?t:k,x="string"==typeof e?[e,b]:b,w=function(e){let[t,r]=(0,h.useState)(e);return(0,h.useEffect)(()=>{!function e(t,r){if(t===r)return!0;if(null==t||null==r)return!1;if("object"!=typeof t&&"object"!=typeof r)return t===r;if(t.constructor!==r.constructor)return!1;if(t instanceof Date&&r instanceof Date)return t.getTime()===r.getTime();if(Array.isArray(t)){if(t.length!==r.length)return!1;for(let a=0;a<t.length;a++)if(!e(t[a],r[a]))return!1;return!0}let a=Object.keys(t),n=Object.keys(r);if(a.length!==n.length)return!1;for(let s of a)if(!n.includes(s)||!e(t[s],r[s]))return!1;return!0}(e,t)&&r(e)},[e,t]),t}(null!=r?r:[]),{data:E,mutate:A}=t2([x,"messages"],null,{fallbackData:(0,h.useMemo)(()=>to(w),[w])}),I=(0,h.useRef)(E||[]);(0,h.useEffect)(()=>{I.current=E||[]},[E]);let{data:T,mutate:S}=t2([x,"streamData"],null),C=(0,h.useRef)(T);(0,h.useEffect)(()=>{C.current=T},[T]);let{data:O="ready",mutate:N}=t2([x,"status"],null),{data:j,mutate:M}=t2([x,"error"],null),Z=(0,h.useRef)(null),D=(0,h.useRef)({credentials:p,headers:f,body:m});(0,h.useEffect)(()=>{D.current={credentials:p,headers:f,body:m}},[p,f,m]);let P=(0,h.useCallback)(async(t,r="generate")=>{var a,p;N("submitted"),M(void 0);let h=to(t.messages),f=h.length,m=ts(null==(a=h[h.length-1])?void 0:a.toolInvocations);try{Z.current=new AbortController;let a=t5(A,v),o=t5(S,v),c=I.current;a(h,!1);let f=n?h:h.map(({role:e,content:t,experimental_attachments:r,data:a,annotations:n,toolInvocations:s,parts:i})=>({role:e,content:t,...void 0!==r&&{experimental_attachments:r},...void 0!==a&&{data:a},...void 0!==n&&{annotations:n},...void 0!==s&&{toolInvocations:s},...void 0!==i&&{parts:i}})),m=C.current;await tn({api:e,body:null!=(p=null==i?void 0:i({id:b,messages:h,requestData:t.data,requestBody:t.body}))?p:{id:b,messages:f,data:t.data,...D.current.body,...t.body},streamProtocol:l,credentials:D.current.credentials,headers:{...D.current.headers,...t.headers},abortController:()=>Z.current,restoreMessagesOnFailure(){_||a(c,!1)},onResponse:u,onUpdate({message:e,data:t,replaceLastMessage:r}){N("streaming"),a([...r?h.slice(0,h.length-1):h,e],!1),(null==t?void 0:t.length)&&o([...null!=m?m:[],...t],!1)},onToolCall:s,onFinish:d,generateId:y,fetch:g,lastMessage:h[h.length-1],requestType:r}),Z.current=null,N("ready")}catch(e){if("AbortError"===e.name)return Z.current=null,N("ready"),null;c&&e instanceof Error&&c(e),M(e),N("error")}let k=I.current;(function({originalMaxToolInvocationStep:e,originalMessageCount:t,maxSteps:r,messages:a}){var n;let s=a[a.length-1];return r>1&&null!=s&&(a.length>t||ts(s.toolInvocations)!==e)&&tu(s)&&(null!=(n=ts(s.toolInvocations))?n:0)<r})({originalMaxToolInvocationStep:m,originalMessageCount:f,maxSteps:o,messages:k})&&await P({messages:k})},[A,N,e,D,u,d,c,M,S,C,l,n,i,s,o,I,Z,y,g,_,v,b]),F=(0,h.useCallback)(async(e,{data:t,headers:r,body:a,experimental_attachments:n=e.experimental_attachments}={})=>{var s,i;let o=await tl(n);return P({messages:I.current.concat({...e,id:null!=(s=e.id)?s:y(),createdAt:null!=(i=e.createdAt)?i:new Date,experimental_attachments:o.length>0?o:void 0,parts:ti(e)}),headers:r,body:a,data:t})},[P,y]),L=(0,h.useCallback)(async({data:e,headers:t,body:r}={})=>{let a=I.current;return 0===a.length?null:P({messages:"assistant"===a[a.length-1].role?a.slice(0,-1):a,headers:t,body:r,data:e})},[P]),$=(0,h.useCallback)(()=>{Z.current&&(Z.current.abort(),Z.current=null)},[]),V=(0,h.useCallback)(async()=>{P({messages:I.current},"resume")},[P]),z=(0,h.useCallback)(e=>{"function"==typeof e&&(e=e(I.current));let t=to(e);A(t,!1),I.current=t},[A]),U=(0,h.useCallback)(e=>{"function"==typeof e&&(e=e(C.current)),S(e,!1),C.current=e},[S]),[B,J]=(0,h.useState)(a),W=(0,h.useCallback)(async(e,t={},r)=>{var a;if(null==(a=null==e?void 0:e.preventDefault)||a.call(e),!B&&!t.allowEmptySubmit)return;r&&(D.current={...D.current,...r});let n=await tl(t.experimental_attachments);
3P({messages:I.current.concat({id:y(),createdAt:new Date,role:"user",content:B,experimental_attachments:n.length>0?n:void 0,parts:[{type:"text",text:B}]}),headers:t.headers,body:t.body,data:t.data}),J("")},[B,y,P]),K=(0,h.useCallback)(({toolCallId:e,result:t})=>{let r=I.current;!function({messages:e,toolCallId:t,toolResult:r}){var a;let n=e[e.length-1],s=n.parts.find(e=>"tool-invocation"===e.type&&e.toolInvocation.toolCallId===t);if(null==s)return;let i={...s.toolInvocation,state:"result",result:r};s.toolInvocation=i,n.toolInvocations=null==(a=n.toolInvocations)?void 0:a.map(e=>e.toolCallId===t?i:e)}({messages:r,toolCallId:e,toolResult:t}),A([...r.slice(0,r.length-1),{...r[r.length-1]}],!1),"submitted"!==O&&"streaming"!==O&&tu(r[r.length-1])&&P({messages:r})},[A,O,P]);return{messages:null!=E?E:[],id:b,setMessages:z,data:T,setData:U,error:j,append:F,reload:L,stop:$,experimental_resume:V,input:B,setInput:J,handleInputChange:e=>{J(e.target.value)},handleSubmit:W,isLoading:"submitted"===O||"streaming"===O,status:O,addToolResult:K}}},14806:(e,t,r)=>{"use strict";e.exports=r(30125)},21873:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},22079:(e,t,r)=>{"use strict";var a=r(81029).hp;let n=void 0!==a,s=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function o(e,t,r){null==r&&null!==t&&"object"==typeof t&&(r=t,t=void 0),n&&a.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let o=JSON.parse(e,t);if(null===o||"object"!=typeof o)return o;let u=r&&r.protoAction||"error",d=r&&r.constructorAction||"error";if("ignore"===u&&"ignore"===d)return o;if("ignore"!==u&&"ignore"!==d){if(!1===s.test(e)&&!1===i.test(e))return o}else if("ignore"!==u&&"ignore"===d){if(!1===s.test(e))return o}else if(!1===i.test(e))return o;return l(o,{protoAction:u,constructorAction:d,safe:r&&r.safe})}function l(e,{protoAction:t="error",constructorAction:r="error",safe:a}={}){let n=[e];for(;n.length;){let e=n;for(let s of(n=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(s,"__proto__")){if(!0===a)return null;if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete s.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(s,"constructor")&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype")){if(!0===a)return null;if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete s.constructor}for(let e in s){let t=s[e];t&&"object"==typeof t&&n.push(t)}}}return e}function u(e,t,r){let a=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return o(e,t,r)}finally{Error.stackTraceLimit=a}}e.exports=u,e.exports.default=u,e.exports.parse=u,e.exports.safeParse=function(e,t){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return o(e,t,{safe:!0})}catch(e){return null}finally{Error.stackTraceLimit=r}},e.exports.scan=l},22414:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},24589:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]])},25070:e=>{e.exports=function(e,t){let r;if("function"!=typeof e)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let a=0;return function(...n){clearTimeout(r);let s=Date.now(),i=t-(s-a);i<=0?(a=s,e.apply(this,n)):r=setTimeout(()=>{a=Date.now(),e.apply(this,n)},i)}}},25276:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2h0a3.13 3.13 0 0 1 3 3.88Z",key:"y3tblf"}]])},26921:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]])},29502:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.25V14",key:"re2vv1"}],["path",{d:"M22 16a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z",key:"ame013"}]])},29633:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Briefcase",[["rect",{width:"20",height:"14",x:"2",y:"7",rx:"2",ry:"2",key:"eto64e"}],["path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"zwj3tp"}]])},30125:(e,t,r)=>{"use strict";var a=r(12115),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=a.useState,i=a.useEffect,o=a.useLayoutEffect,l=a.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),a=s({inst:{value:r,getSnapshot:t}}),n=a[0].inst,d=a[1];return o(function(){n.value=r,n.getSnapshot=t,u(n)&&d({inst:n})},[e,r,t]),i(function(){return u(n)&&d({inst:n}),e(function(){u(n)&&d({inst:n})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:d},30426:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("PlusCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]])},34747:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("MoreVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},36100:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("CalendarPlus",[["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}],["line",{x1:"19",x2:"19",y1:"16",y2:"22",key:"1ttwzi"}],["line",{x1:"16",x2:"22",y1:"19",y2:"19",key:"1g9955"}]])},37965:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]])},38026:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]])},38104:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});
3let a=(0,r(45105).A)("CalendarCheck",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]])},44274:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("CircleDollarSign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]])},48055:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},50906:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]])},53842:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},55599:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("ArrowDownWideNarrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]])},56835:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("PenTool",[["path",{d:"m12 19 7-7 3 3-7 7-3-3z",key:"rklqx2"}],["path",{d:"m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z",key:"1et58u"}],["path",{d:"m2 2 7.586 7.586",key:"etlp93"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]])},58734:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]])},60235:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]])},63581:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]])},65506:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]])},71629:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]])},73464:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},74474:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("PiggyBank",[["path",{d:"M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2h0V5z",key:"uf6l00"}],["path",{d:"M2 9v1c0 1.1.9 2 2 2h1",key:"nm575m"}],["path",{d:"M16 11h0",key:"k2aug8"}]])},79397:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]])},79552:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("MinusCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]])},83101:(e,t,r)=>{"use strict";r.d(t,{F:()=>i});var a=r(2821);let n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=a.$,i=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return s(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(e=>{let t=null==r?void 0:r[e],a=null==o?void 0:o[e];if(null===t)return null;let s=n(t)||n(a);return i[e][s]}),u=r&&Object.entries(r).reduce((e,t)=>
3{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return s(e,l,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...u}[t]):({...o,...u})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},93165:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},96583:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},96891:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(45105).A)("GitCompare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.