@telemetryos/sdk 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @telemetryos/sdk
2
2
 
3
+ ## 1.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix doc comments
8
+ - Updated dependencies
9
+ - @telemetryos/root-sdk@1.4.3
10
+
11
+ ## 1.4.2
12
+
13
+ ### Patch Changes
14
+
15
+ - improve ux of init command
16
+ - Updated dependencies
17
+ - @telemetryos/root-sdk@1.4.2
18
+
3
19
  ## 1.4.1
4
20
 
5
21
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var w;(function(a){a.assertEqual=n=>n;function e(n){}a.assertIs=e;function t(n){throw new Error}a.assertNever=t,a.arrayToEnum=n=>{const i={};for(const r of n)i[r]=r;return i},a.getValidEnumValues=n=>{const i=a.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),r={};for(const o of i)r[o]=n[o];return a.objectValues(r)},a.objectValues=n=>a.objectKeys(n).map(function(i){return n[i]}),a.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&i.push(r);return i},a.find=(n,i)=>{for(const r of n)if(i(r))return r},a.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,i=" | "){return n.map(r=>typeof r=="string"?`'${r}'`:r).join(i)}a.joinValues=s,a.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(w||(w={}));var je;(function(a){a.mergeShapes=(e,t)=>({...e,...t})})(je||(je={}));const h=w.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=a=>{switch(typeof a){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(a)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(a)?h.array:a===null?h.null:a.then&&typeof a.then=="function"&&a.catch&&typeof a.catch=="function"?h.promise:typeof Map<"u"&&a instanceof Map?h.map:typeof Set<"u"&&a instanceof Set?h.set:typeof Date<"u"&&a instanceof Date?h.date:h.object;default:return h.unknown}},d=w.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"]),ct=a=>JSON.stringify(a,null,2).replace(/"([^"]+)":/g,"$1:");let C=class Ve extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},s={_errors:[]},n=i=>{for(const r of i.issues)if(r.code==="invalid_union")r.unionErrors.map(n);else if(r.code==="invalid_return_type")n(r.returnTypeError);else if(r.code==="invalid_arguments")n(r.argumentsError);else if(r.path.length===0)s._errors.push(t(r));else{let o=s,c=0;for(;c<r.path.length;){const u=r.path[c];c===r.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(r))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return n(this),s}static assert(e){if(!(e instanceof Ve))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,w.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};C.create=a=>new C(a);const W=(a,e)=>{let t;switch(a.code){case d.invalid_type:a.received===h.undefined?t="Required":t=`Expected ${a.expected}, received ${a.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(a.expected,w.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${w.joinValues(a.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${w.joinValues(a.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${w.joinValues(a.options)}, received '${a.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof a.validation=="object"?"includes"in a.validation?(t=`Invalid input: must include "${a.validation.includes}"`,typeof a.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${a.validation.position}`)):"startsWith"in a.validation?t=`Invalid input: must start with "${a.validation.startsWith}"`:"endsWith"in a.validation?t=`Invalid input: must end with "${a.validation.endsWith}"`:w.assertNever(a.validation):a.validation!=="regex"?t=`Invalid ${a.validation}`:t="Invalid";break;case d.too_small:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at least":"more than"} ${a.minimum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at least":"over"} ${a.minimum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(a.minimum))}`:t="Invalid input";break;case d.too_big:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at most":"less than"} ${a.maximum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at most":"under"} ${a.maximum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="bigint"?t=`BigInt must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly":a.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(a.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${a.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,w.assertNever(a)}return{message:t}};let Be=W;function dt(a){Be=a}function we(){return Be}const be=a=>{const{data:e,path:t,errorMaps:s,issueData:n}=a,i=[...t,...n.path||[]],r={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const c=s.filter(u=>!!u).slice().reverse();for(const u of c)o=u(r,{data:e,defaultError:o}).message;return{...n,path:i,message:o}},ut=[];function l(a,e){const t=we(),s=be({issueData:e,data:a.data,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,t,t===W?void 0:W].filter(n=>!!n)});a.common.issues.push(s)}let x=class Ue{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const i=await n.key,r=await n.value;s.push({key:i,value:r})}return Ue.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:i,value:r}=n;if(i.status==="aborted"||r.status==="aborted")return y;i.status==="dirty"&&e.dirty(),r.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof r.value<"u"||n.alwaysSet)&&(s[i.value]=r.value)}return{status:e.value,value:s}}};const y=Object.freeze({status:"aborted"}),ke=a=>({status:"dirty",value:a}),k=a=>({status:"valid",value:a}),$e=a=>a.status==="aborted",Pe=a=>a.status==="dirty",z=a=>a.status==="valid",Q=a=>typeof Promise<"u"&&a instanceof Promise;function xe(a,e,t,s){if(typeof e=="function"?a!==e||!0:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(a)}function He(a,e,t,s,n){if(typeof e=="function"?a!==e||!0:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(a,t),t}var p;(function(a){a.errToObj=e=>typeof e=="string"?{message:e}:e||{},a.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(p||(p={}));var Y,G;class E{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Le=(a,e)=>{if(z(e))return{success:!0,data:e.value};if(!a.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(a.common.issues);return this._error=t,this._error}}};function g(a){if(!a)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=a;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,r)=>{var o,c;const{message:u}=a;return i.code==="invalid_enum_value"?{message:u??r.defaultError}:typeof r.data>"u"?{message:(o=u??s)!==null&&o!==void 0?o:r.defaultError}:i.code!=="invalid_type"?{message:r.defaultError}:{message:(c=u??t)!==null&&c!==void 0?c:r.defaultError}},description:n}}let _=class{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new x,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},i=this._parseSync({data:e,path:n.path,parent:n});return Le(n,i)}"~validate"(e){var t,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return z(i)?{value:i.value}:{issues:n.common.issues}}catch(i){!((s=(t=i==null?void 0:i.message)===null||t===void 0?void 0:t.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>z(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parse({data:e,path:s.path,parent:s}),i=await(Q(n)?n:Promise.resolve(n));return Le(s,i)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const r=e(n),o=()=>i.addIssue({code:d.custom,...s(n)});return typeof Promise<"u"&&r instanceof Promise?r.then(c=>c?!0:(o(),!1)):r?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new A({schema:this,typeName:m.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:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return V.create(this)}promise(){return J.create(this,this._def)}or(e){return ie.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new A({...g(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new le({...g(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new De({typeName:m.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new he({...g(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return me.create(this,e)}readonly(){return pe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const lt=/^c[^\s-]{8,}$/i,ht=/^[0-9a-z]+$/,pt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ft=/^[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,mt=/^[a-z0-9_-]{21}$/i,yt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gt=/^[-+]?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)?)??$/,_t=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ee;const wt=/^(?:(?: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])$/,bt=/^(?:(?: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])$/,kt=/^(([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]))$/,xt=/^(([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])$/,Zt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,St=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,We="((\\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])))",Tt=new RegExp(`^${We}$`);function Ke(a){let e="[0-5]\\d";a.precision?e=`${e}\\.\\d{${a.precision}}`:a.precision==null&&(e=`${e}(\\.\\d+)?`);const t=a.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Nt(a){return new RegExp(`^${Ke(a)}$`)}function Je(a){let e=`${We}T${Ke(a)}`;const t=[];return t.push(a.local?"Z?":"Z"),a.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ct(a,e){return!!((e==="v4"||!e)&&wt.test(a)||(e==="v6"||!e)&&kt.test(a))}function At(a,e){if(!yt.test(a))return!1;try{const[t]=a.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||!n.typ||!n.alg||e&&n.alg!==e)}catch{return!1}}function Ot(a,e){return!!((e==="v4"||!e)&&bt.test(a)||(e==="v6"||!e)&&xt.test(a))}class N extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:h.string,received:n.parsedType}),y}const t=new x;let s;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if(n.kind==="max")e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,r=e.data.length<n.value;(i||r)&&(s=this._getOrReturnCtx(e,s),i?l(s,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):r&&l(s,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if(n.kind==="email")_t.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"email",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="emoji")Ee||(Ee=new RegExp(vt,"u")),Ee.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"emoji",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="uuid")ft.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"uuid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="nanoid")mt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"nanoid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="cuid")lt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="cuid2")ht.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid2",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="ulid")pt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ulid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),l(s,{validation:"url",code:d.invalid_string,message:n.message}),t.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"regex",code:d.invalid_string,message:n.message}),t.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty()):n.kind==="datetime"?Je(n).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"datetime",message:n.message}),t.dirty()):n.kind==="date"?Tt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"date",message:n.message}),t.dirty()):n.kind==="time"?Nt(n).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"time",message:n.message}),t.dirty()):n.kind==="duration"?gt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"duration",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="ip"?Ct(e.data,n.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ip",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="jwt"?At(e.data,n.alg)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"jwt",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="cidr"?Ot(e.data,n.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cidr",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="base64"?Zt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="base64url"?St.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64url",code:d.invalid_string,message:n.message}),t.dirty()):w.assertNever(n);return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...p.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...p.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...p.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...p.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...p.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...p.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...p.errToObj(t)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=a=>{var e;return new N({checks:[],typeName:m.ZodString,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...g(a)})};function Et(a,e){const t=(a.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,i=parseInt(a.toFixed(n).replace(".","")),r=parseInt(e.toFixed(n).replace(".",""));return i%r/Math.pow(10,n)}class F extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:h.number,received:n.parsedType}),y}let t;const s=new x;for(const n of this._def.checks)n.kind==="int"?w.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),l(t,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="multipleOf"?Et(e.data,n.value)!==0&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),l(t,{code:d.not_finite,message:n.message}),s.dirty()):w.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,s,n){return new F({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&w.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}F.create=a=>new F({checks:[],typeName:m.ZodNumber,coerce:(a==null?void 0:a.coerce)||!1,...g(a)});let ee=class Re extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let t;const s=new x;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):w.assertNever(n);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,s,n){return new Re({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new Re({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};ee.create=a=>{var e;return new ee({checks:[],typeName:m.ZodBigInt,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...g(a)})};class te extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.boolean,received:t.parsedType}),y}return k(e.data)}}te.create=a=>new te({typeName:m.ZodBoolean,coerce:(a==null?void 0:a.coerce)||!1,...g(a)});let se=class Ye extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:h.date,received:n.parsedType}),y}if(isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_date}),y}const t=new x;let s;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):w.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ye({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};se.create=a=>new se({checks:[],coerce:(a==null?void 0:a.coerce)||!1,typeName:m.ZodDate,...g(a)});class Ze extends _{_parse(e){if(this._getType(e)!==h.symbol){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.symbol,received:t.parsedType}),y}return k(e.data)}}Ze.create=a=>new Ze({typeName:m.ZodSymbol,...g(a)});class ae extends _{_parse(e){if(this._getType(e)!==h.undefined){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.undefined,received:t.parsedType}),y}return k(e.data)}}ae.create=a=>new ae({typeName:m.ZodUndefined,...g(a)});class ne extends _{_parse(e){if(this._getType(e)!==h.null){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.null,received:t.parsedType}),y}return k(e.data)}}ne.create=a=>new ne({typeName:m.ZodNull,...g(a)});let K=class extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}};K.create=a=>new K({typeName:m.ZodAny,...g(a)});class q extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}q.create=a=>new q({typeName:m.ZodUnknown,...g(a)});let P=class extends _{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.never,received:t.parsedType}),y}};P.create=a=>new P({typeName:m.ZodNever,...g(a)});class Se extends _{_parse(e){if(this._getType(e)!==h.undefined){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.void,received:t.parsedType}),y}return k(e.data)}}Se.create=a=>new Se({typeName:m.ZodVoid,...g(a)});let V=class _e extends _{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==h.array)return l(t,{code:d.invalid_type,expected:h.array,received:t.parsedType}),y;if(n.exactLength!==null){const r=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(r||o)&&(l(t,{code:r?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:r?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((r,o)=>n.type._parseAsync(new E(t,r,t.path,o)))).then(r=>x.mergeArray(s,r));const i=[...t.data].map((r,o)=>n.type._parseSync(new E(t,r,t.path,o)));return x.mergeArray(s,i)}get element(){return this._def.type}min(e,t){return new _e({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new _e({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new _e({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}};V.create=(a,e)=>new V({type:a,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...g(e)});function H(a){if(a instanceof S){const e={};for(const t in a.shape){const s=a.shape[t];e[t]=O.create(H(s))}return new S({...a._def,shape:()=>e})}else return a instanceof V?new V({...a._def,type:H(a.element)}):a instanceof O?O.create(H(a.unwrap())):a instanceof M?M.create(H(a.unwrap())):a instanceof I?I.create(a.items.map(e=>H(e))):a}let S=class T extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=w.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==h.object){const c=this._getOrReturnCtx(e);return l(c,{code:d.invalid_type,expected:h.object,received:c.parsedType}),y}const{status:t,ctx:s}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),r=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||r.push(c);const o=[];for(const c of i){const u=n[c],f=s.data[c];o.push({key:{status:"valid",value:c},value:u._parse(new E(s,f,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof P){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of r)o.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")r.length>0&&(l(s,{code:d.unrecognized_keys,keys:r}),t.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of r){const f=s.data[u];o.push({key:{status:"valid",value:u},value:c._parse(new E(s,f,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of o){const f=await u.key,b=await u.value;c.push({key:f,value:b,alwaysSet:u.alwaysSet})}return c}).then(c=>x.mergeObjectSync(t,c)):x.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new T({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i,r,o;const c=(r=(i=(n=this._def).errorMap)===null||i===void 0?void 0:i.call(n,t,s).message)!==null&&r!==void 0?r:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=p.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new T({...this._def,unknownKeys:"strip"})}passthrough(){return new T({...this._def,unknownKeys:"passthrough"})}extend(e){return new T({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new T({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new T({...this._def,catchall:e})}pick(e){const t={};return w.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new T({...this._def,shape:()=>t})}omit(e){const t={};return w.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new T({...this._def,shape:()=>t})}deepPartial(){return H(this)}partial(e){const t={};return w.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new T({...this._def,shape:()=>t})}required(e){const t={};return w.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof O;)n=n._def.innerType;t[s]=n}}),new T({...this._def,shape:()=>t})}keyof(){return Xe(w.objectKeys(this.shape))}};S.create=(a,e)=>new S({shape:()=>a,unknownKeys:"strip",catchall:P.create(),typeName:m.ZodObject,...g(e)});S.strictCreate=(a,e)=>new S({shape:()=>a,unknownKeys:"strict",catchall:P.create(),typeName:m.ZodObject,...g(e)});S.lazycreate=(a,e)=>new S({shape:a,unknownKeys:"strip",catchall:P.create(),typeName:m.ZodObject,...g(e)});class ie extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const r=i.map(o=>new C(o.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:r}),y}if(t.common.async)return Promise.all(s.map(async i=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(n);{let i;const r=[];for(const c of s){const u={...t,common:{...t.common,issues:[]},parent:null},f=c._parseSync({data:t.data,path:t.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&r.push(u.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=r.map(c=>new C(c));return l(t,{code:d.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}}ie.create=(a,e)=>new ie({options:a,typeName:m.ZodUnion,...g(e)});const R=a=>a instanceof ce?R(a.schema):a instanceof A?R(a.innerType()):a instanceof de?[a.value]:a instanceof fe?a.options:a instanceof ue?w.objectValues(a.enum):a instanceof le?R(a._def.innerType):a instanceof ae?[void 0]:a instanceof ne?[null]:a instanceof O?[void 0,...R(a.unwrap())]:a instanceof M?[null,...R(a.unwrap())]:a instanceof De||a instanceof pe?R(a.unwrap()):a instanceof he?R(a._def.innerType):[];class Ce extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return l(t,{code:d.invalid_type,expected:h.object,received:t.parsedType}),y;const s=this.discriminator,n=t.data[s],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const i of t){const r=R(i.shape[e]);if(!r.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of r){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,i)}}return new Ce({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...g(s)})}}function Fe(a,e){const t=$(a),s=$(e);if(a===e)return{valid:!0,data:a};if(t===h.object&&s===h.object){const n=w.objectKeys(e),i=w.objectKeys(a).filter(o=>n.indexOf(o)!==-1),r={...a,...e};for(const o of i){const c=Fe(a[o],e[o]);if(!c.valid)return{valid:!1};r[o]=c.data}return{valid:!0,data:r}}else if(t===h.array&&s===h.array){if(a.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<a.length;i++){const r=a[i],o=e[i],c=Fe(r,o);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===h.date&&s===h.date&&+a==+e?{valid:!0,data:a}:{valid:!1}}class re extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(i,r)=>{if($e(i)||$e(r))return y;const o=Fe(i.value,r.value);return o.valid?((Pe(i)||Pe(r))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:d.invalid_intersection_types}),y)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,r])=>n(i,r)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}re.create=(a,e,t)=>new re({left:a,right:e,typeName:m.ZodIntersection,...g(t)});class I extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return l(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return l(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,r)=>{const o=this._def.items[r]||this._def.rest;return o?o._parse(new E(s,i,s.path,r)):null}).filter(i=>!!i);return s.common.async?Promise.all(n).then(i=>x.mergeArray(t,i)):x.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new I({...this._def,rest:e})}}I.create=(a,e)=>{if(!Array.isArray(a))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new I({items:a,typeName:m.ZodTuple,rest:null,...g(e)})};class oe extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.object)return l(s,{code:d.invalid_type,expected:h.object,received:s.parsedType}),y;const n=[],i=this._def.keyType,r=this._def.valueType;for(const o in s.data)n.push({key:i._parse(new E(s,o,s.path,o)),value:r._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?x.mergeObjectAsync(t,n):x.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof _?new oe({keyType:e,valueType:t,typeName:m.ZodRecord,...g(s)}):new oe({keyType:N.create(),valueType:e,typeName:m.ZodRecord,...g(t)})}}class Te extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.map)return l(s,{code:d.invalid_type,expected:h.map,received:s.parsedType}),y;const n=this._def.keyType,i=this._def.valueType,r=[...s.data.entries()].map(([o,c],u)=>({key:n._parse(new E(s,o,s.path,[u,"key"])),value:i._parse(new E(s,c,s.path,[u,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of r){const u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return y;(u.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(u.value,f.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of r){const u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return y;(u.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(u.value,f.value)}return{status:t.value,value:o}}}}Te.create=(a,e,t)=>new Te({valueType:e,keyType:a,typeName:m.ZodMap,...g(t)});class B extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return l(s,{code:d.invalid_type,expected:h.set,received:s.parsedType}),y;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function r(c){const u=new Set;for(const f of c){if(f.status==="aborted")return y;f.status==="dirty"&&t.dirty(),u.add(f.value)}return{status:t.value,value:u}}const o=[...s.data.values()].map((c,u)=>i._parse(new E(s,c,s.path,u)));return s.common.async?Promise.all(o).then(c=>r(c)):r(o)}min(e,t){return new B({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new B({...this._def,maxSize:{value:e,message:p.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}B.create=(a,e)=>new B({valueType:a,minSize:null,maxSize:null,typeName:m.ZodSet,...g(e)});let Ge=class ve extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return l(t,{code:d.invalid_type,expected:h.function,received:t.parsedType}),y;function s(o,c){return be({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,we(),W].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:c}})}function n(o,c){return be({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,we(),W].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:c}})}const i={errorMap:t.common.contextualErrorMap},r=t.data;if(this._def.returns instanceof J){const o=this;return k(async function(...c){const u=new C([]),f=await o._def.args.parseAsync(c,i).catch(j=>{throw u.addIssue(s(c,j)),u}),b=await Reflect.apply(r,this,f);return await o._def.returns._def.type.parseAsync(b,i).catch(j=>{throw u.addIssue(n(b,j)),u})})}else{const o=this;return k(function(...c){const u=o._def.args.safeParse(c,i);if(!u.success)throw new C([s(c,u.error)]);const f=Reflect.apply(r,this,u.data),b=o._def.returns.safeParse(f,i);if(!b.success)throw new C([n(f,b.error)]);return b.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ve({...this._def,args:I.create(e).rest(q.create())})}returns(e){return new ve({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new ve({args:e||I.create([]).rest(q.create()),returns:t||q.create(),typeName:m.ZodFunction,...g(s)})}};class ce extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ce.create=(a,e)=>new ce({getter:a,typeName:m.ZodLazy,...g(e)});class de extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(a,e)=>new de({value:a,typeName:m.ZodLiteral,...g(e)});function Xe(a,e){return new fe({values:a,typeName:m.ZodEnum,...g(e)})}let fe=class Me extends _{constructor(){super(...arguments),Y.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:w.joinValues(s),received:t.parsedType,code:d.invalid_type}),y}if(xe(this,Y)||He(this,Y,new Set(this._def.values)),!xe(this,Y).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:s}),y}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Me.create(e,{...this._def,...t})}exclude(e,t=this._def){return Me.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};Y=new WeakMap;fe.create=Xe;class ue extends _{constructor(){super(...arguments),G.set(this,void 0)}_parse(e){const t=w.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){const n=w.objectValues(t);return l(s,{expected:w.joinValues(n),received:s.parsedType,code:d.invalid_type}),y}if(xe(this,G)||He(this,G,new Set(w.getValidEnumValues(this._def.values))),!xe(this,G).has(e.data)){const n=w.objectValues(t);return l(s,{received:s.data,code:d.invalid_enum_value,options:n}),y}return k(e.data)}get enum(){return this._def.values}}G=new WeakMap;ue.create=(a,e)=>new ue({values:a,typeName:m.ZodNativeEnum,...g(e)});class J extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:h.promise,received:t.parsedType}),y;const s=t.parsedType===h.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(a,e)=>new J({type:a,typeName:m.ZodPromise,...g(e)});class A extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:r=>{l(s,r),r.fatal?t.abort():t.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const r=n.transform(s.data,i);if(s.common.async)return Promise.resolve(r).then(async o=>{if(t.value==="aborted")return y;const c=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return c.status==="aborted"?y:c.status==="dirty"||t.value==="dirty"?ke(c.value):c});{if(t.value==="aborted")return y;const o=this._def.schema._parseSync({data:r,path:s.path,parent:s});return o.status==="aborted"?y:o.status==="dirty"||t.value==="dirty"?ke(o.value):o}}if(n.type==="refinement"){const r=o=>{const c=n.refinement(o,i);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),r(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),r(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const r=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!z(r))return r;const o=n.transform(r.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(r=>z(r)?Promise.resolve(n.transform(r.value,i)).then(o=>({status:t.value,value:o})):r);w.assertNever(n)}}A.create=(a,e,t)=>new A({schema:a,typeName:m.ZodEffects,effect:e,...g(t)});A.createWithPreprocess=(a,e,t)=>new A({schema:e,effect:{type:"preprocess",transform:a},typeName:m.ZodEffects,...g(t)});let O=class extends _{_parse(e){return this._getType(e)===h.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};O.create=(a,e)=>new O({innerType:a,typeName:m.ZodOptional,...g(e)});let M=class extends _{_parse(e){return this._getType(e)===h.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};M.create=(a,e)=>new M({innerType:a,typeName:m.ZodNullable,...g(e)});class le extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}le.create=(a,e)=>new le({innerType:a,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class he extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Q(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}he.create=(a,e)=>new he({innerType:a,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class Ne extends _{_parse(e){if(this._getType(e)!==h.nan){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}}Ne.create=a=>new Ne({typeName:m.ZodNaN,...g(a)});const It=Symbol("zod_brand");class De extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class me extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),ke(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new me({in:e,out:t,typeName:m.ZodPipeline})}}class pe extends _{_parse(e){const t=this._def.innerType._parse(e),s=n=>(z(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}pe.create=(a,e)=>new pe({innerType:a,typeName:m.ZodReadonly,...g(e)});function qe(a,e){const t=typeof a=="function"?a(e):typeof a=="string"?{message:a}:a;return typeof t=="string"?{message:t}:t}function Qe(a,e={},t){return a?K.create().superRefine((s,n)=>{var i,r;const o=a(s);if(o instanceof Promise)return o.then(c=>{var u,f;if(!c){const b=qe(e,s),j=(f=(u=b.fatal)!==null&&u!==void 0?u:t)!==null&&f!==void 0?f:!0;n.addIssue({code:"custom",...b,fatal:j})}});if(!o){const c=qe(e,s),u=(r=(i=c.fatal)!==null&&i!==void 0?i:t)!==null&&r!==void 0?r:!0;n.addIssue({code:"custom",...c,fatal:u})}}):K.create()}const jt={object:S.lazycreate};var m;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(m||(m={}));const $t=(a,e={message:`Input not instance of ${a.name}`})=>Qe(t=>t instanceof a,e),et=N.create,tt=F.create,Pt=Ne.create,Rt=ee.create,st=te.create,Ft=se.create,Mt=Ze.create,Dt=ae.create,Lt=ne.create,qt=K.create,zt=q.create,Vt=P.create,Bt=Se.create,Ut=V.create,Ht=S.create,Wt=S.strictCreate,Kt=ie.create,Jt=Ce.create,Yt=re.create,Gt=I.create,Xt=oe.create,Qt=Te.create,es=B.create,ts=Ge.create,ss=ce.create,as=de.create,ns=fe.create,is=ue.create,rs=J.create,ze=A.create,os=O.create,cs=M.create,ds=A.createWithPreprocess,us=me.create,ls=()=>et().optional(),hs=()=>tt().optional(),ps=()=>st().optional(),fs={string:a=>N.create({...a,coerce:!0}),number:a=>F.create({...a,coerce:!0}),boolean:a=>te.create({...a,coerce:!0}),bigint:a=>ee.create({...a,coerce:!0}),date:a=>se.create({...a,coerce:!0})},ms=y;var Ie=Object.freeze({__proto__:null,defaultErrorMap:W,setErrorMap:dt,getErrorMap:we,makeIssue:be,EMPTY_PATH:ut,addIssueToContext:l,ParseStatus:x,INVALID:y,DIRTY:ke,OK:k,isAborted:$e,isDirty:Pe,isValid:z,isAsync:Q,get util(){return w},get objectUtil(){return je},ZodParsedType:h,getParsedType:$,ZodType:_,datetimeRegex:Je,ZodString:N,ZodNumber:F,ZodBigInt:ee,ZodBoolean:te,ZodDate:se,ZodSymbol:Ze,ZodUndefined:ae,ZodNull:ne,ZodAny:K,ZodUnknown:q,ZodNever:P,ZodVoid:Se,ZodArray:V,ZodObject:S,ZodUnion:ie,ZodDiscriminatedUnion:Ce,ZodIntersection:re,ZodTuple:I,ZodRecord:oe,ZodMap:Te,ZodSet:B,ZodFunction:Ge,ZodLazy:ce,ZodLiteral:de,ZodEnum:fe,ZodNativeEnum:ue,ZodPromise:J,ZodEffects:A,ZodTransformer:A,ZodOptional:O,ZodNullable:M,ZodDefault:le,ZodCatch:he,ZodNaN:Ne,BRAND:It,ZodBranded:De,ZodPipeline:me,ZodReadonly:pe,custom:Qe,Schema:_,ZodSchema:_,late:jt,get ZodFirstPartyTypeKind(){return m},coerce:fs,any:qt,array:Ut,bigint:Rt,boolean:st,date:Ft,discriminatedUnion:Jt,effect:ze,enum:ns,function:ts,instanceof:$t,intersection:Yt,lazy:ss,literal:as,map:Qt,nan:Pt,nativeEnum:is,never:Vt,null:Lt,nullable:cs,number:tt,object:Ht,oboolean:ps,onumber:hs,optional:os,ostring:ls,pipeline:us,preprocess:ds,promise:rs,record:Xt,set:es,strictObject:Wt,string:et,symbol:Mt,transformer:ze,tuple:Gt,undefined:Dt,union:Kt,unknown:zt,void:Bt,NEVER:ms,ZodIssueCode:d,quotelessJson:ct,ZodError:C});const ys="1.4.0",gs={version:ys};class at{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("accounts.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current account");return e.account}}class nt{constructor(e){this._client=e}async getAllByMountPoint(e){return(await this._client.request("applications.getAllByMountPoint",{mountPoint:e})).applications}async getByName(e){return(await this._client.request("applications.getByName",{name:e})).application}async setDependencies(e){return await this._client.request("applications.setDependencies",{applicationSpecifiers:e})}}class _s{constructor(e){this._client=e}async getInformation(){const e=await this._client.request("devices.getInformation",{});if(!e.success)throw new Error("Failed to get device information");return e.deviceInformation}}function vs(a,e=console.error){a().catch(e)}class ws{constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}subscribeColorScheme(e){vs(async()=>{this._client.on("environment.colorSchemeChanged",e),e(await this.getColorScheme())})}unsubscribeColorScheme(e){this._client.off("environment.colorSchemeChanged",e)}}class it{constructor(e){this._client=e}async getAllFolders(){return(await this._client.request("mediaFolders.getAll",{})).folders}async getAllByFolderId(e){return(await this._client.request("media.getAllByFolderId",{folderId:e})).contents}async getAllByTag(e){return(await this._client.request("media.getAllByTag",{tagName:e})).contents}async getById(e){return(await this._client.request("media.getById",{id:e})).content}}class rt{constructor(e){this._client=e}get application(){return new ye("application","",this._client)}get instance(){return new ye("instance",this._client.applicationSpecifier,this._client)}get device(){return new ye("device",this._client.applicationSpecifier,this._client)}shared(e){return new ye("shared",e,this._client)}}class ye{constructor(e,t,s){this._kind=e,this._namespace=t,this._client=s}async set(e,t){return(await this._client.request("store.set",{kind:this._kind,namespace:this._namespace,key:e,value:t})).success}async get(e){return(await this._client.request("store.get",{kind:this._kind,namespace:this._namespace,key:e})).value}async subscribe(e,t){return(await this._client.subscribe("store.subscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async unsubscribe(e,t){return(await this._client.unsubscribe("store.unsubscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async delete(e){return(await this._client.request("store.delete",{kind:this._kind,namespace:this._namespace,key:e})).success}}class ot{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("users.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current user");return e.user}}class bs{constructor(e){this._client=e}async getConditions(e){const t=await this._client.request("weather.getConditions",e);if(!t.success||!t.conditions)throw new Error(t.error||"Failed to fetch weather conditions");return t.conditions}async getDailyForecast(e){const t=await this._client.request("weather.getDailyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch daily forecast");return t.forecast}async getHourlyForecast(e){const t=await this._client.request("weather.getHourlyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch hourly forecast");return t.forecast}async getAccuWeatherConditions(e){const t=await this._client.request("weather.getAccuWeatherConditions",e);if(!t.success||!t.data)throw new Error(t.error||"Failed to fetch AccuWeather conditions");return t.data}async getAccuWeatherDailyForecast(e){const t=await this._client.request("weather.getAccuWeatherDailyForecast",e);if(!t.success||!t.data)throw new Error(t.error||"Failed to fetch AccuWeather daily forecast");return t.data}async getAccuWeatherHourlyForecast(e){const t=await this._client.request("weather.getAccuWeatherHourlyForecast",e);if(!t.success||!t.data)throw new Error(t.error||"Failed to fetch AccuWeather hourly forecast");return t.data}}const ks=Ie.object({name:Ie.string(),data:Ie.any()});class xs{constructor(e){if(e._client._applicationSpecifier!=="rootSettingsNavigation")throw new Error("RootSettingsNavigation can only be used in the rootSettingsNavigation mount point");this._store=e}async setRootSettingsNavigation(e){const t=this._store.shared("root-settings-navigation"),s=await t.get("navigation"),n=this._store._client._applicationSpecifier;s[n]={applicationSpecifier:n,entries:e.entries},t.set("navigation",s)}async getRootSettingsNavigation(){const e=await this._store.shared("root-settings-navigation").get("navigation"),t=this._store._client._applicationSpecifier;return e[t]}async getAllRootSettingsNavigation(){return this._store.shared("root-settings-navigation").get("navigation")}}class Zs{constructor(e){this._client=e}async fetch(e,t){let s;typeof e=="string"?s=e:e instanceof URL?s=e.toString():(s=e.url,t||(t={method:e.method,headers:e.headers,body:e.body,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}));let n={};t!=null&&t.headers&&(t.headers instanceof Headers?t.headers.forEach((u,f)=>{n[f]=u}):Array.isArray(t.headers)?t.headers.forEach(([u,f])=>{n[u]=f}):n=t.headers);const i=await this._client.request("proxy.fetch",{url:s,method:(t==null?void 0:t.method)||"GET",headers:n,body:(t==null?void 0:t.body)||null});if(!i.success)throw new Error(`Proxy fetch failed: ${i.statusText}`);const r=new Headers(i.headers),o={status:i.status,statusText:i.statusText,headers:r};let c=null;return i.body!==null&&i.body!==void 0&&(typeof i.body=="string"||i.body instanceof ArrayBuffer?c=i.body:typeof i.body=="object"&&(c=JSON.stringify(i.body))),new Response(c,o)}}const U=1e3*30;class Ss{constructor(e){this._applicationName=e,this._applicationInstance="",this._applicationSpecifier="",this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new at(this)}get users(){return new ot(this)}get store(){return new rt(this)}get applications(){return new nt(this)}get media(){return new it(this)}get proxy(){return new Zs(this)}get devices(){return new _s(this)}get rootSettingsNavigation(){return new xs(this.store)}get weather(){return new bs(this)}get applicationName(){return this._applicationName}get applicationSpecifier(){return this._applicationSpecifier}get applicationInstance(){return this._applicationInstance}bind(){var e;const t=new URL(window.location.href),s=t.searchParams;this._applicationInstance=(e=s.get("telemetryApplicationId"))!==null&&e!==void 0?e:"";const n=s.get("applicationSpecifier");if(n)this._applicationSpecifier=n;else{const i=t.hostname.split(".");this._applicationSpecifier=i[0]||""}if(!this._applicationSpecifier||this._applicationSpecifier.length!==40)throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);if(!this._applicationInstance)throw new Error("Missing telemetryApplicationId query parameter");this._windowMessageHandler=i=>{if(i.source===window)return;for(let f=0;f<window.frames.length;f+=1)window.frames[f].postMessage(i.data,"*");const r=ks.safeParse(i.data);if(!r.success)return;const o=r.data,c=this._onHandlers.get(o.name),u=this._onceHandlers.get(o.name);if(c)for(const f of c)f(o.data);if(u){for(const f of u)f(o.data);this._onceHandlers.delete(o.name)}},window.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&window.removeEventListener("message",this._windowMessageHandler)}send(e,t){const s={telemetrySdkVersion:X,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t};window.parent.postMessage(s,"*")}request(e,t){const s=ge(),n={telemetrySdkVersion:X,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t,responseName:s};window.parent.postMessage(n,"*");let i=!1,r;const o=new Promise((u,f)=>{const b=new Error(`${e} message request with response name of ${s} timed out after ${U}`);setTimeout(()=>{i=!0,this.off(s,r),f(b)},U)}),c=new Promise(u=>{r=f=>{i||u(f)},this.once(s,u)});return Promise.race([o,c])}async subscribe(e,t,s){let n,i;typeof t=="function"?i=t:(n=t,i=s);const r=ge(),o=ge();let c=this._subscriptionNamesBySubjectName.get(e);c||(c=[],this._subscriptionNamesBySubjectName.set(e,c)),c.push(r),this._subscriptionNamesByHandler.set(i,r),this.on(r,i);const u={telemetrySdkVersion:X,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:n,responseName:o,subscriptionName:r};window.parent.postMessage(u,"*");let f=!1,b;const j=new Promise((D,L)=>{const Oe=new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${U}`);setTimeout(()=>{f=!0,this.off(o,b),L(Oe)},U)}),Ae=new Promise(D=>{b=L=>{f||D(L)},this.on(o,D)});return Promise.race([j,Ae])}async unsubscribe(e,t,s){let n,i;typeof t=="function"?i=t:(n=t,i=s);const r=ge();let o=[];if(i){const c=this._subscriptionNamesByHandler.get(i);if(!c)return{success:!1};o=[c],this._subscriptionNamesByHandler.delete(i)}else if(!this._subscriptionNamesBySubjectName.get(e))return{success:!1};for await(const c of o){this.off(c,i);const u={telemetrySdkVersion:X,applicationInstance:this._applicationInstance,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,name:e,data:n,responseName:r,unsubscribeName:c};window.parent.postMessage(u,"*");let f=!1,b;const j=new Promise((D,L)=>{const Oe=new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${U}`);setTimeout(()=>{f=!0,this.off(r,b),L(Oe)},U)}),Ae=new Promise(D=>{b=L=>{f||D(L)},this.once(r,D)});if(!(await Promise.race([j,Ae])).success)return{success:!1}}return{success:!0}}on(e,t){var s;const n=(s=this._onHandlers.get(e))!==null&&s!==void 0?s:[];n.length===0&&this._onHandlers.set(e,n),n.push(t)}once(e,t){var s;const n=(s=this._onceHandlers.get(e))!==null&&s!==void 0?s:[];n.length===0&&this._onceHandlers.set(e,n),n.push(t)}off(e,t){const s=this._onHandlers.get(e),n=this._onceHandlers.get(e);if(!(!s&&!n)){if(s){for(let i=0;i<s.length;i+=1)t&&s[i]!==t||(s.splice(i,1),i-=1);s.length===0&&this._onHandlers.delete(e)}if(n){for(let i=0;i<n.length;i+=1)t&&n[i]!==t||(n.splice(i,1),i-=1);n.length===0&&this._onceHandlers.delete(e)}}}}function ge(){return Math.random().toString(36).slice(2,9)}const X=gs.version;class Ts{constructor(e){this._client=e}async setOverride(e){if(!(await this._client.request("overrides.setOverride",{name:e})).success)throw new Error("Failed to set override");return!0}async clearOverride(e){if(!(await this._client.request("overrides.clearOverride",{name:e})).success)throw new Error("Failed to clear override");return!0}}class Ns{constructor(e){this._client=e}async nextPage(){if(!(await this._client.request("playlist.nextPage",{})).success)throw new Error("Failed to advance to next page");return!0}async previousPage(){if(!(await this._client.request("playlist.previousPage",{})).success)throw new Error("Failed to return to previous page");return!0}async setDuration(e){if(!(await this._client.request("playlist.setDuration",{duration:e})).success)throw new Error("Failed to set page duration");return!0}}class Cs extends Ss{get playlist(){return new Ns(this)}get overrides(){return new Ts(this)}}let v=null;function As(){return v}function Os(a){v=new Cs(a),v.bind()}function Es(){v==null||v.unbind(),v=null}function Is(...a){return Z(v),v.on(...a)}function js(...a){return Z(v),v.once(...a)}function $s(...a){return Z(v),v.off(...a)}function Ps(...a){return Z(v),v.send(...a)}function Rs(...a){return Z(v),v.request(...a)}function Fs(...a){return Z(v),v.subscribe(...a)}function Ms(...a){return Z(v),v.unsubscribe(...a)}function Ds(){return Z(v),v.store}function Ls(){return Z(v),v.applications}function qs(){return Z(v),v.media}function zs(){return Z(v),v.playlist}function Vs(){return Z(v),v.overrides}function Bs(){return Z(v),v.accounts}function Us(){return Z(v),v.users}function Z(a){if(!a)throw new Error("SDK is not configured")}exports.Accounts=at;exports.Applications=nt;exports.Environment=ws;exports.Media=it;exports.Store=rt;exports.Users=ot;exports.accounts=Bs;exports.applications=Ls;exports.configure=Os;exports.destroy=Es;exports.globalClient=As;exports.media=qs;exports.off=$s;exports.on=Is;exports.once=js;exports.overrides=Vs;exports.playlist=zs;exports.request=Rs;exports.send=Ps;exports.store=Ds;exports.subscribe=Fs;exports.telemetrySdkVersion=X;exports.unsubscribe=Ms;exports.users=Us;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var b;(function(a){a.assertEqual=n=>n;function e(n){}a.assertIs=e;function t(n){throw new Error}a.assertNever=t,a.arrayToEnum=n=>{const i={};for(const r of n)i[r]=r;return i},a.getValidEnumValues=n=>{const i=a.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),r={};for(const o of i)r[o]=n[o];return a.objectValues(r)},a.objectValues=n=>a.objectKeys(n).map(function(i){return n[i]}),a.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&i.push(r);return i},a.find=(n,i)=>{for(const r of n)if(i(r))return r},a.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,i=" | "){return n.map(r=>typeof r=="string"?`'${r}'`:r).join(i)}a.joinValues=s,a.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(b||(b={}));var je;(function(a){a.mergeShapes=(e,t)=>({...e,...t})})(je||(je={}));const h=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=a=>{switch(typeof a){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(a)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(a)?h.array:a===null?h.null:a.then&&typeof a.then=="function"&&a.catch&&typeof a.catch=="function"?h.promise:typeof Map<"u"&&a instanceof Map?h.map:typeof Set<"u"&&a instanceof Set?h.set:typeof Date<"u"&&a instanceof Date?h.date:h.object;default:return h.unknown}},d=b.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"]),ct=a=>JSON.stringify(a,null,2).replace(/"([^"]+)":/g,"$1:");let C=class Ve extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},s={_errors:[]},n=i=>{for(const r of i.issues)if(r.code==="invalid_union")r.unionErrors.map(n);else if(r.code==="invalid_return_type")n(r.returnTypeError);else if(r.code==="invalid_arguments")n(r.argumentsError);else if(r.path.length===0)s._errors.push(t(r));else{let o=s,c=0;for(;c<r.path.length;){const u=r.path[c];c===r.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(t(r))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return n(this),s}static assert(e){if(!(e instanceof Ve))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,b.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},s=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}};C.create=a=>new C(a);const K=(a,e)=>{let t;switch(a.code){case d.invalid_type:a.received===h.undefined?t="Required":t=`Expected ${a.expected}, received ${a.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(a.expected,b.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${b.joinValues(a.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${b.joinValues(a.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${b.joinValues(a.options)}, received '${a.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof a.validation=="object"?"includes"in a.validation?(t=`Invalid input: must include "${a.validation.includes}"`,typeof a.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${a.validation.position}`)):"startsWith"in a.validation?t=`Invalid input: must start with "${a.validation.startsWith}"`:"endsWith"in a.validation?t=`Invalid input: must end with "${a.validation.endsWith}"`:b.assertNever(a.validation):a.validation!=="regex"?t=`Invalid ${a.validation}`:t="Invalid";break;case d.too_small:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at least":"more than"} ${a.minimum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at least":"over"} ${a.minimum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${a.minimum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly equal to ":a.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(a.minimum))}`:t="Invalid input";break;case d.too_big:a.type==="array"?t=`Array must contain ${a.exact?"exactly":a.inclusive?"at most":"less than"} ${a.maximum} element(s)`:a.type==="string"?t=`String must contain ${a.exact?"exactly":a.inclusive?"at most":"under"} ${a.maximum} character(s)`:a.type==="number"?t=`Number must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="bigint"?t=`BigInt must be ${a.exact?"exactly":a.inclusive?"less than or equal to":"less than"} ${a.maximum}`:a.type==="date"?t=`Date must be ${a.exact?"exactly":a.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(a.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${a.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,b.assertNever(a)}return{message:t}};let Be=K;function dt(a){Be=a}function be(){return Be}const we=a=>{const{data:e,path:t,errorMaps:s,issueData:n}=a,i=[...t,...n.path||[]],r={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const c=s.filter(u=>!!u).slice().reverse();for(const u of c)o=u(r,{data:e,defaultError:o}).message;return{...n,path:i,message:o}},ut=[];function l(a,e){const t=be(),s=we({issueData:e,data:a.data,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,t,t===K?void 0:K].filter(n=>!!n)});a.common.issues.push(s)}let x=class Ue{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const n of t){if(n.status==="aborted")return y;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const n of t){const i=await n.key,r=await n.value;s.push({key:i,value:r})}return Ue.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const n of t){const{key:i,value:r}=n;if(i.status==="aborted"||r.status==="aborted")return y;i.status==="dirty"&&e.dirty(),r.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof r.value<"u"||n.alwaysSet)&&(s[i.value]=r.value)}return{status:e.value,value:s}}};const y=Object.freeze({status:"aborted"}),ke=a=>({status:"dirty",value:a}),k=a=>({status:"valid",value:a}),$e=a=>a.status==="aborted",Pe=a=>a.status==="dirty",z=a=>a.status==="valid",Q=a=>typeof Promise<"u"&&a instanceof Promise;function xe(a,e,t,s){if(typeof e=="function"?a!==e||!0:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(a)}function He(a,e,t,s,n){if(typeof e=="function"?a!==e||!0:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(a,t),t}var p;(function(a){a.errToObj=e=>typeof e=="string"?{message:e}:e||{},a.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(p||(p={}));var Y,G;class E{constructor(e,t,s,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Le=(a,e)=>{if(z(e))return{success:!0,data:e.value};if(!a.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(a.common.issues);return this._error=t,this._error}}};function g(a){if(!a)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:n}=a;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,r)=>{var o,c;const{message:u}=a;return i.code==="invalid_enum_value"?{message:u??r.defaultError}:typeof r.data>"u"?{message:(o=u??s)!==null&&o!==void 0?o:r.defaultError}:i.code!=="invalid_type"?{message:r.defaultError}:{message:(c=u??t)!==null&&c!==void 0?c:r.defaultError}},description:n}}class _{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new x,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Q(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const n={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},i=this._parseSync({data:e,path:n.path,parent:n});return Le(n,i)}"~validate"(e){var t,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:n});return z(i)?{value:i.value}:{issues:n.common.issues}}catch(i){!((s=(t=i==null?void 0:i.message)===null||t===void 0?void 0:t.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>z(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},n=this._parse({data:e,path:s.path,parent:s}),i=await(Q(n)?n:Promise.resolve(n));return Le(s,i)}refine(e,t){const s=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const r=e(n),o=()=>i.addIssue({code:d.custom,...s(n)});return typeof Promise<"u"&&r instanceof Promise?r.then(c=>c?!0:(o(),!1)):r?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof t=="function"?t(s,n):t),!1))}_refinement(e){return new O({schema:this,typeName:m.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:t=>this["~validate"](t)}}optional(){return A.create(this,this._def)}nullable(){return F.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return V.create(this)}promise(){return J.create(this,this._def)}or(e){return ie.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new O({...g(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new le({...g(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new De({typeName:m.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new he({...g(this._def),innerType:this,catchValue:t,typeName:m.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return me.create(this,e)}readonly(){return pe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const lt=/^c[^\s-]{8,}$/i,ht=/^[0-9a-z]+$/,pt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ft=/^[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,mt=/^[a-z0-9_-]{21}$/i,yt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gt=/^[-+]?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)?)??$/,_t=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ee;const bt=/^(?:(?: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])$/,wt=/^(?:(?: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])$/,kt=/^(([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]))$/,xt=/^(([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])$/,Zt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,St=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ke="((\\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])))",Tt=new RegExp(`^${Ke}$`);function We(a){let e="[0-5]\\d";a.precision?e=`${e}\\.\\d{${a.precision}}`:a.precision==null&&(e=`${e}(\\.\\d+)?`);const t=a.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Nt(a){return new RegExp(`^${We(a)}$`)}function Je(a){let e=`${Ke}T${We(a)}`;const t=[];return t.push(a.local?"Z?":"Z"),a.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ct(a,e){return!!((e==="v4"||!e)&&bt.test(a)||(e==="v6"||!e)&&kt.test(a))}function Ot(a,e){if(!yt.test(a))return!1;try{const[t]=a.split("."),s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||!n.typ||!n.alg||e&&n.alg!==e)}catch{return!1}}function At(a,e){return!!((e==="v4"||!e)&&wt.test(a)||(e==="v6"||!e)&&xt.test(a))}class N extends _{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:h.string,received:n.parsedType}),y}const t=new x;let s;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if(n.kind==="max")e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,r=e.data.length<n.value;(i||r)&&(s=this._getOrReturnCtx(e,s),i?l(s,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):r&&l(s,{code:d.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if(n.kind==="email")_t.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"email",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="emoji")Ee||(Ee=new RegExp(vt,"u")),Ee.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"emoji",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="uuid")ft.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"uuid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="nanoid")mt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"nanoid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="cuid")lt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="cuid2")ht.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid2",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="ulid")pt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ulid",code:d.invalid_string,message:n.message}),t.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),l(s,{validation:"url",code:d.invalid_string,message:n.message}),t.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"regex",code:d.invalid_string,message:n.message}),t.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty()):n.kind==="datetime"?Je(n).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"datetime",message:n.message}),t.dirty()):n.kind==="date"?Tt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"date",message:n.message}),t.dirty()):n.kind==="time"?Nt(n).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:d.invalid_string,validation:"time",message:n.message}),t.dirty()):n.kind==="duration"?gt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"duration",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="ip"?Ct(e.data,n.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ip",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="jwt"?Ot(e.data,n.alg)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"jwt",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="cidr"?At(e.data,n.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cidr",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="base64"?Zt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64",code:d.invalid_string,message:n.message}),t.dirty()):n.kind==="base64url"?St.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64url",code:d.invalid_string,message:n.message}),t.dirty()):b.assertNever(n);return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement(n=>e.test(n),{validation:t,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...p.errToObj(e)})}url(e){return this._addCheck({kind:"url",...p.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...p.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...p.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...p.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...p.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...p.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...p.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...p.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...p.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...p.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...p.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...p.errToObj(e)})}datetime(e){var t,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...p.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...p.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...p.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...p.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...p.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...p.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...p.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...p.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...p.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...p.errToObj(t)})}nonempty(e){return this.min(1,p.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=a=>{var e;return new N({checks:[],typeName:m.ZodString,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...g(a)})};function Et(a,e){const t=(a.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=t>s?t:s,i=parseInt(a.toFixed(n).replace(".","")),r=parseInt(e.toFixed(n).replace(".",""));return i%r/Math.pow(10,n)}class M extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:h.number,received:n.parsedType}),y}let t;const s=new x;for(const n of this._def.checks)n.kind==="int"?b.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),l(t,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="multipleOf"?Et(e.data,n.value)!==0&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),l(t,{code:d.not_finite,message:n.message}),s.dirty()):b.assertNever(n);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,s,n){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:p.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:p.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:p.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:p.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&b.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}M.create=a=>new M({checks:[],typeName:m.ZodNumber,coerce:(a==null?void 0:a.coerce)||!1,...g(a)});let ee=class Re extends _{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let t;const s=new x;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),l(t,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):b.assertNever(n);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.bigint,received:t.parsedType}),y}gte(e,t){return this.setLimit("min",e,!0,p.toString(t))}gt(e,t){return this.setLimit("min",e,!1,p.toString(t))}lte(e,t){return this.setLimit("max",e,!0,p.toString(t))}lt(e,t){return this.setLimit("max",e,!1,p.toString(t))}setLimit(e,t,s,n){return new Re({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(n)}]})}_addCheck(e){return new Re({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:p.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:p.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:p.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:p.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:p.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}};ee.create=a=>{var e;return new ee({checks:[],typeName:m.ZodBigInt,coerce:(e=a==null?void 0:a.coerce)!==null&&e!==void 0?e:!1,...g(a)})};class te extends _{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.boolean,received:t.parsedType}),y}return k(e.data)}}te.create=a=>new te({typeName:m.ZodBoolean,coerce:(a==null?void 0:a.coerce)||!1,...g(a)});let se=class Ye extends _{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_type,expected:h.date,received:n.parsedType}),y}if(isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return l(n,{code:d.invalid_date}),y}const t=new x;let s;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):b.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Ye({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:p.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:p.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}};se.create=a=>new se({checks:[],coerce:(a==null?void 0:a.coerce)||!1,typeName:m.ZodDate,...g(a)});class Ze extends _{_parse(e){if(this._getType(e)!==h.symbol){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.symbol,received:t.parsedType}),y}return k(e.data)}}Ze.create=a=>new Ze({typeName:m.ZodSymbol,...g(a)});class ae extends _{_parse(e){if(this._getType(e)!==h.undefined){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.undefined,received:t.parsedType}),y}return k(e.data)}}ae.create=a=>new ae({typeName:m.ZodUndefined,...g(a)});class ne extends _{_parse(e){if(this._getType(e)!==h.null){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.null,received:t.parsedType}),y}return k(e.data)}}ne.create=a=>new ne({typeName:m.ZodNull,...g(a)});let W=class extends _{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}};W.create=a=>new W({typeName:m.ZodAny,...g(a)});class q extends _{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}q.create=a=>new q({typeName:m.ZodUnknown,...g(a)});let P=class extends _{_parse(e){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.never,received:t.parsedType}),y}};P.create=a=>new P({typeName:m.ZodNever,...g(a)});class Se extends _{_parse(e){if(this._getType(e)!==h.undefined){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.void,received:t.parsedType}),y}return k(e.data)}}Se.create=a=>new Se({typeName:m.ZodVoid,...g(a)});let V=class _e extends _{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),n=this._def;if(t.parsedType!==h.array)return l(t,{code:d.invalid_type,expected:h.array,received:t.parsedType}),y;if(n.exactLength!==null){const r=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(r||o)&&(l(t,{code:r?d.too_big:d.too_small,minimum:o?n.exactLength.value:void 0,maximum:r?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(l(t,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(l(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((r,o)=>n.type._parseAsync(new E(t,r,t.path,o)))).then(r=>x.mergeArray(s,r));const i=[...t.data].map((r,o)=>n.type._parseSync(new E(t,r,t.path,o)));return x.mergeArray(s,i)}get element(){return this._def.type}min(e,t){return new _e({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new _e({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new _e({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}};V.create=(a,e)=>new V({type:a,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...g(e)});function H(a){if(a instanceof S){const e={};for(const t in a.shape){const s=a.shape[t];e[t]=A.create(H(s))}return new S({...a._def,shape:()=>e})}else return a instanceof V?new V({...a._def,type:H(a.element)}):a instanceof A?A.create(H(a.unwrap())):a instanceof F?F.create(H(a.unwrap())):a instanceof I?I.create(a.items.map(e=>H(e))):a}let S=class T extends _{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=b.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==h.object){const c=this._getOrReturnCtx(e);return l(c,{code:d.invalid_type,expected:h.object,received:c.parsedType}),y}const{status:t,ctx:s}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),r=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||r.push(c);const o=[];for(const c of i){const u=n[c],f=s.data[c];o.push({key:{status:"valid",value:c},value:u._parse(new E(s,f,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof P){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of r)o.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")r.length>0&&(l(s,{code:d.unrecognized_keys,keys:r}),t.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of r){const f=s.data[u];o.push({key:{status:"valid",value:u},value:c._parse(new E(s,f,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of o){const f=await u.key,w=await u.value;c.push({key:f,value:w,alwaysSet:u.alwaysSet})}return c}).then(c=>x.mergeObjectSync(t,c)):x.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new T({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i,r,o;const c=(r=(i=(n=this._def).errorMap)===null||i===void 0?void 0:i.call(n,t,s).message)!==null&&r!==void 0?r:s.defaultError;return t.code==="unrecognized_keys"?{message:(o=p.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new T({...this._def,unknownKeys:"strip"})}passthrough(){return new T({...this._def,unknownKeys:"passthrough"})}extend(e){return new T({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new T({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new T({...this._def,catchall:e})}pick(e){const t={};return b.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new T({...this._def,shape:()=>t})}omit(e){const t={};return b.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new T({...this._def,shape:()=>t})}deepPartial(){return H(this)}partial(e){const t={};return b.objectKeys(this.shape).forEach(s=>{const n=this.shape[s];e&&!e[s]?t[s]=n:t[s]=n.optional()}),new T({...this._def,shape:()=>t})}required(e){const t={};return b.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof A;)n=n._def.innerType;t[s]=n}}),new T({...this._def,shape:()=>t})}keyof(){return Xe(b.objectKeys(this.shape))}};S.create=(a,e)=>new S({shape:()=>a,unknownKeys:"strip",catchall:P.create(),typeName:m.ZodObject,...g(e)});S.strictCreate=(a,e)=>new S({shape:()=>a,unknownKeys:"strict",catchall:P.create(),typeName:m.ZodObject,...g(e)});S.lazycreate=(a,e)=>new S({shape:a,unknownKeys:"strip",catchall:P.create(),typeName:m.ZodObject,...g(e)});class ie extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const r=i.map(o=>new C(o.ctx.common.issues));return l(t,{code:d.invalid_union,unionErrors:r}),y}if(t.common.async)return Promise.all(s.map(async i=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(n);{let i;const r=[];for(const c of s){const u={...t,common:{...t.common,issues:[]},parent:null},f=c._parseSync({data:t.data,path:t.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&r.push(u.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=r.map(c=>new C(c));return l(t,{code:d.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}}ie.create=(a,e)=>new ie({options:a,typeName:m.ZodUnion,...g(e)});const R=a=>a instanceof ce?R(a.schema):a instanceof O?R(a.innerType()):a instanceof de?[a.value]:a instanceof fe?a.options:a instanceof ue?b.objectValues(a.enum):a instanceof le?R(a._def.innerType):a instanceof ae?[void 0]:a instanceof ne?[null]:a instanceof A?[void 0,...R(a.unwrap())]:a instanceof F?[null,...R(a.unwrap())]:a instanceof De||a instanceof pe?R(a.unwrap()):a instanceof he?R(a._def.innerType):[];class Ce extends _{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return l(t,{code:d.invalid_type,expected:h.object,received:t.parsedType}),y;const s=this.discriminator,n=t.data[s],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(l(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const n=new Map;for(const i of t){const r=R(i.shape[e]);if(!r.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of r){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,i)}}return new Ce({typeName:m.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...g(s)})}}function Me(a,e){const t=$(a),s=$(e);if(a===e)return{valid:!0,data:a};if(t===h.object&&s===h.object){const n=b.objectKeys(e),i=b.objectKeys(a).filter(o=>n.indexOf(o)!==-1),r={...a,...e};for(const o of i){const c=Me(a[o],e[o]);if(!c.valid)return{valid:!1};r[o]=c.data}return{valid:!0,data:r}}else if(t===h.array&&s===h.array){if(a.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<a.length;i++){const r=a[i],o=e[i],c=Me(r,o);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return t===h.date&&s===h.date&&+a==+e?{valid:!0,data:a}:{valid:!1}}class re extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=(i,r)=>{if($e(i)||$e(r))return y;const o=Me(i.value,r.value);return o.valid?((Pe(i)||Pe(r))&&t.dirty(),{status:t.value,value:o.data}):(l(s,{code:d.invalid_intersection_types}),y)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,r])=>n(i,r)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}re.create=(a,e,t)=>new re({left:a,right:e,typeName:m.ZodIntersection,...g(t)});class I extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return l(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return l(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),y;!this._def.rest&&s.data.length>this._def.items.length&&(l(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,r)=>{const o=this._def.items[r]||this._def.rest;return o?o._parse(new E(s,i,s.path,r)):null}).filter(i=>!!i);return s.common.async?Promise.all(n).then(i=>x.mergeArray(t,i)):x.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new I({...this._def,rest:e})}}I.create=(a,e)=>{if(!Array.isArray(a))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new I({items:a,typeName:m.ZodTuple,rest:null,...g(e)})};class oe extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.object)return l(s,{code:d.invalid_type,expected:h.object,received:s.parsedType}),y;const n=[],i=this._def.keyType,r=this._def.valueType;for(const o in s.data)n.push({key:i._parse(new E(s,o,s.path,o)),value:r._parse(new E(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?x.mergeObjectAsync(t,n):x.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof _?new oe({keyType:e,valueType:t,typeName:m.ZodRecord,...g(s)}):new oe({keyType:N.create(),valueType:e,typeName:m.ZodRecord,...g(t)})}}class Te extends _{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.map)return l(s,{code:d.invalid_type,expected:h.map,received:s.parsedType}),y;const n=this._def.keyType,i=this._def.valueType,r=[...s.data.entries()].map(([o,c],u)=>({key:n._parse(new E(s,o,s.path,[u,"key"])),value:i._parse(new E(s,c,s.path,[u,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of r){const u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return y;(u.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(u.value,f.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of r){const u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return y;(u.status==="dirty"||f.status==="dirty")&&t.dirty(),o.set(u.value,f.value)}return{status:t.value,value:o}}}}Te.create=(a,e,t)=>new Te({valueType:e,keyType:a,typeName:m.ZodMap,...g(t)});class B extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return l(s,{code:d.invalid_type,expected:h.set,received:s.parsedType}),y;const n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(l(s,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(l(s,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function r(c){const u=new Set;for(const f of c){if(f.status==="aborted")return y;f.status==="dirty"&&t.dirty(),u.add(f.value)}return{status:t.value,value:u}}const o=[...s.data.values()].map((c,u)=>i._parse(new E(s,c,s.path,u)));return s.common.async?Promise.all(o).then(c=>r(c)):r(o)}min(e,t){return new B({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new B({...this._def,maxSize:{value:e,message:p.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}B.create=(a,e)=>new B({valueType:a,minSize:null,maxSize:null,typeName:m.ZodSet,...g(e)});let Ge=class ve extends _{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return l(t,{code:d.invalid_type,expected:h.function,received:t.parsedType}),y;function s(o,c){return we({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,be(),K].filter(u=>!!u),issueData:{code:d.invalid_arguments,argumentsError:c}})}function n(o,c){return we({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,be(),K].filter(u=>!!u),issueData:{code:d.invalid_return_type,returnTypeError:c}})}const i={errorMap:t.common.contextualErrorMap},r=t.data;if(this._def.returns instanceof J){const o=this;return k(async function(...c){const u=new C([]),f=await o._def.args.parseAsync(c,i).catch(j=>{throw u.addIssue(s(c,j)),u}),w=await Reflect.apply(r,this,f);return await o._def.returns._def.type.parseAsync(w,i).catch(j=>{throw u.addIssue(n(w,j)),u})})}else{const o=this;return k(function(...c){const u=o._def.args.safeParse(c,i);if(!u.success)throw new C([s(c,u.error)]);const f=Reflect.apply(r,this,u.data),w=o._def.returns.safeParse(f,i);if(!w.success)throw new C([n(f,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ve({...this._def,args:I.create(e).rest(q.create())})}returns(e){return new ve({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new ve({args:e||I.create([]).rest(q.create()),returns:t||q.create(),typeName:m.ZodFunction,...g(s)})}};class ce extends _{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ce.create=(a,e)=>new ce({getter:a,typeName:m.ZodLazy,...g(e)});class de extends _{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return l(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),y}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(a,e)=>new de({value:a,typeName:m.ZodLiteral,...g(e)});function Xe(a,e){return new fe({values:a,typeName:m.ZodEnum,...g(e)})}let fe=class Fe extends _{constructor(){super(...arguments),Y.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{expected:b.joinValues(s),received:t.parsedType,code:d.invalid_type}),y}if(xe(this,Y)||He(this,Y,new Set(this._def.values)),!xe(this,Y).has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return l(t,{received:t.data,code:d.invalid_enum_value,options:s}),y}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Fe.create(e,{...this._def,...t})}exclude(e,t=this._def){return Fe.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};Y=new WeakMap;fe.create=Xe;class ue extends _{constructor(){super(...arguments),G.set(this,void 0)}_parse(e){const t=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){const n=b.objectValues(t);return l(s,{expected:b.joinValues(n),received:s.parsedType,code:d.invalid_type}),y}if(xe(this,G)||He(this,G,new Set(b.getValidEnumValues(this._def.values))),!xe(this,G).has(e.data)){const n=b.objectValues(t);return l(s,{received:s.data,code:d.invalid_enum_value,options:n}),y}return k(e.data)}get enum(){return this._def.values}}G=new WeakMap;ue.create=(a,e)=>new ue({values:a,typeName:m.ZodNativeEnum,...g(e)});class J extends _{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.promise&&t.common.async===!1)return l(t,{code:d.invalid_type,expected:h.promise,received:t.parsedType}),y;const s=t.parsedType===h.promise?t.data:Promise.resolve(t.data);return k(s.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}J.create=(a,e)=>new J({type:a,typeName:m.ZodPromise,...g(e)});class O extends _{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:r=>{l(s,r),r.fatal?t.abort():t.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const r=n.transform(s.data,i);if(s.common.async)return Promise.resolve(r).then(async o=>{if(t.value==="aborted")return y;const c=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return c.status==="aborted"?y:c.status==="dirty"||t.value==="dirty"?ke(c.value):c});{if(t.value==="aborted")return y;const o=this._def.schema._parseSync({data:r,path:s.path,parent:s});return o.status==="aborted"?y:o.status==="dirty"||t.value==="dirty"?ke(o.value):o}}if(n.type==="refinement"){const r=o=>{const c=n.refinement(o,i);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),r(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?y:(o.status==="dirty"&&t.dirty(),r(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){const r=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!z(r))return r;const o=n.transform(r.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(r=>z(r)?Promise.resolve(n.transform(r.value,i)).then(o=>({status:t.value,value:o})):r);b.assertNever(n)}}O.create=(a,e,t)=>new O({schema:a,typeName:m.ZodEffects,effect:e,...g(t)});O.createWithPreprocess=(a,e,t)=>new O({schema:e,effect:{type:"preprocess",transform:a},typeName:m.ZodEffects,...g(t)});let A=class extends _{_parse(e){return this._getType(e)===h.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};A.create=(a,e)=>new A({innerType:a,typeName:m.ZodOptional,...g(e)});let F=class extends _{_parse(e){return this._getType(e)===h.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};F.create=(a,e)=>new F({innerType:a,typeName:m.ZodNullable,...g(e)});class le extends _{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}le.create=(a,e)=>new le({innerType:a,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class he extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return Q(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}he.create=(a,e)=>new he({innerType:a,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class Ne extends _{_parse(e){if(this._getType(e)!==h.nan){const t=this._getOrReturnCtx(e);return l(t,{code:d.invalid_type,expected:h.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}}Ne.create=a=>new Ne({typeName:m.ZodNaN,...g(a)});const It=Symbol("zod_brand");class De extends _{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class me extends _{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),ke(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?y:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,t){return new me({in:e,out:t,typeName:m.ZodPipeline})}}class pe extends _{_parse(e){const t=this._def.innerType._parse(e),s=n=>(z(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>s(n)):s(t)}unwrap(){return this._def.innerType}}pe.create=(a,e)=>new pe({innerType:a,typeName:m.ZodReadonly,...g(e)});function qe(a,e){const t=typeof a=="function"?a(e):typeof a=="string"?{message:a}:a;return typeof t=="string"?{message:t}:t}function Qe(a,e={},t){return a?W.create().superRefine((s,n)=>{var i,r;const o=a(s);if(o instanceof Promise)return o.then(c=>{var u,f;if(!c){const w=qe(e,s),j=(f=(u=w.fatal)!==null&&u!==void 0?u:t)!==null&&f!==void 0?f:!0;n.addIssue({code:"custom",...w,fatal:j})}});if(!o){const c=qe(e,s),u=(r=(i=c.fatal)!==null&&i!==void 0?i:t)!==null&&r!==void 0?r:!0;n.addIssue({code:"custom",...c,fatal:u})}}):W.create()}const jt={object:S.lazycreate};var m;(function(a){a.ZodString="ZodString",a.ZodNumber="ZodNumber",a.ZodNaN="ZodNaN",a.ZodBigInt="ZodBigInt",a.ZodBoolean="ZodBoolean",a.ZodDate="ZodDate",a.ZodSymbol="ZodSymbol",a.ZodUndefined="ZodUndefined",a.ZodNull="ZodNull",a.ZodAny="ZodAny",a.ZodUnknown="ZodUnknown",a.ZodNever="ZodNever",a.ZodVoid="ZodVoid",a.ZodArray="ZodArray",a.ZodObject="ZodObject",a.ZodUnion="ZodUnion",a.ZodDiscriminatedUnion="ZodDiscriminatedUnion",a.ZodIntersection="ZodIntersection",a.ZodTuple="ZodTuple",a.ZodRecord="ZodRecord",a.ZodMap="ZodMap",a.ZodSet="ZodSet",a.ZodFunction="ZodFunction",a.ZodLazy="ZodLazy",a.ZodLiteral="ZodLiteral",a.ZodEnum="ZodEnum",a.ZodEffects="ZodEffects",a.ZodNativeEnum="ZodNativeEnum",a.ZodOptional="ZodOptional",a.ZodNullable="ZodNullable",a.ZodDefault="ZodDefault",a.ZodCatch="ZodCatch",a.ZodPromise="ZodPromise",a.ZodBranded="ZodBranded",a.ZodPipeline="ZodPipeline",a.ZodReadonly="ZodReadonly"})(m||(m={}));const $t=(a,e={message:`Input not instance of ${a.name}`})=>Qe(t=>t instanceof a,e),et=N.create,tt=M.create,Pt=Ne.create,Rt=ee.create,st=te.create,Mt=se.create,Ft=Ze.create,Dt=ae.create,Lt=ne.create,qt=W.create,zt=q.create,Vt=P.create,Bt=Se.create,Ut=V.create,Ht=S.create,Kt=S.strictCreate,Wt=ie.create,Jt=Ce.create,Yt=re.create,Gt=I.create,Xt=oe.create,Qt=Te.create,es=B.create,ts=Ge.create,ss=ce.create,as=de.create,ns=fe.create,is=ue.create,rs=J.create,ze=O.create,os=A.create,cs=F.create,ds=O.createWithPreprocess,us=me.create,ls=()=>et().optional(),hs=()=>tt().optional(),ps=()=>st().optional(),fs={string:a=>N.create({...a,coerce:!0}),number:a=>M.create({...a,coerce:!0}),boolean:a=>te.create({...a,coerce:!0}),bigint:a=>ee.create({...a,coerce:!0}),date:a=>se.create({...a,coerce:!0})},ms=y;var Ie=Object.freeze({__proto__:null,defaultErrorMap:K,setErrorMap:dt,getErrorMap:be,makeIssue:we,EMPTY_PATH:ut,addIssueToContext:l,ParseStatus:x,INVALID:y,DIRTY:ke,OK:k,isAborted:$e,isDirty:Pe,isValid:z,isAsync:Q,get util(){return b},get objectUtil(){return je},ZodParsedType:h,getParsedType:$,ZodType:_,datetimeRegex:Je,ZodString:N,ZodNumber:M,ZodBigInt:ee,ZodBoolean:te,ZodDate:se,ZodSymbol:Ze,ZodUndefined:ae,ZodNull:ne,ZodAny:W,ZodUnknown:q,ZodNever:P,ZodVoid:Se,ZodArray:V,ZodObject:S,ZodUnion:ie,ZodDiscriminatedUnion:Ce,ZodIntersection:re,ZodTuple:I,ZodRecord:oe,ZodMap:Te,ZodSet:B,ZodFunction:Ge,ZodLazy:ce,ZodLiteral:de,ZodEnum:fe,ZodNativeEnum:ue,ZodPromise:J,ZodEffects:O,ZodTransformer:O,ZodOptional:A,ZodNullable:F,ZodDefault:le,ZodCatch:he,ZodNaN:Ne,BRAND:It,ZodBranded:De,ZodPipeline:me,ZodReadonly:pe,custom:Qe,Schema:_,ZodSchema:_,late:jt,get ZodFirstPartyTypeKind(){return m},coerce:fs,any:qt,array:Ut,bigint:Rt,boolean:st,date:Mt,discriminatedUnion:Jt,effect:ze,enum:ns,function:ts,instanceof:$t,intersection:Yt,lazy:ss,literal:as,map:Qt,nan:Pt,nativeEnum:is,never:Vt,null:Lt,nullable:cs,number:tt,object:Ht,oboolean:ps,onumber:hs,optional:os,ostring:ls,pipeline:us,preprocess:ds,promise:rs,record:Xt,set:es,strictObject:Kt,string:et,symbol:Ft,transformer:ze,tuple:Gt,undefined:Dt,union:Wt,unknown:zt,void:Bt,NEVER:ms,ZodIssueCode:d,quotelessJson:ct,ZodError:C});const ys="1.4.2",gs={version:ys};class at{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("accounts.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current account");return e.account}}class nt{constructor(e){this._client=e}async getAllByMountPoint(e){return(await this._client.request("applications.getAllByMountPoint",{mountPoint:e})).applications}async getByName(e){return(await this._client.request("applications.getByName",{name:e})).application}async setDependencies(e){return await this._client.request("applications.setDependencies",{applicationSpecifiers:e})}}class _s{constructor(e){this._client=e}async getInformation(){const e=await this._client.request("devices.getInformation",{});if(!e.success)throw new Error("Failed to get device information");return e.deviceInformation}}function vs(a,e=console.error){a().catch(e)}class bs{constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}subscribeColorScheme(e){vs(async()=>{this._client.on("environment.colorSchemeChanged",e),e(await this.getColorScheme())})}unsubscribeColorScheme(e){this._client.off("environment.colorSchemeChanged",e)}}class it{constructor(e){this._client=e}async getAllFolders(){return(await this._client.request("mediaFolders.getAll",{})).folders}async getAllByFolderId(e){return(await this._client.request("media.getAllByFolderId",{folderId:e})).contents}async getAllByTag(e){return(await this._client.request("media.getAllByTag",{tagName:e})).contents}async getById(e){return(await this._client.request("media.getById",{id:e})).content}}class rt{constructor(e){this._client=e}get application(){return new ye("application","",this._client)}get instance(){return new ye("instance",this._client.applicationSpecifier,this._client)}get device(){return new ye("device",this._client.applicationSpecifier,this._client)}shared(e){return new ye("shared",e,this._client)}}class ye{constructor(e,t,s){this._kind=e,this._namespace=t,this._client=s}async set(e,t){return(await this._client.request("store.set",{kind:this._kind,namespace:this._namespace,key:e,value:t})).success}async get(e){return(await this._client.request("store.get",{kind:this._kind,namespace:this._namespace,key:e})).value}async subscribe(e,t){return(await this._client.subscribe("store.subscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async unsubscribe(e,t){return(await this._client.unsubscribe("store.unsubscribe",{kind:this._kind,namespace:this._namespace,key:e},t)).success}async delete(e){return(await this._client.request("store.delete",{kind:this._kind,namespace:this._namespace,key:e})).success}}class ot{constructor(e){this._client=e}async getCurrent(){const e=await this._client.request("users.getCurrent",{});if(!e.success)throw new Error("Failed to fetch current user");return e.user}}class ws{constructor(e){this._client=e}async getConditions(e){const t=await this._client.request("weather.getConditions",e);if(!t.success||!t.conditions)throw new Error(t.error||"Failed to fetch weather conditions");return t.conditions}async getDailyForecast(e){const t=await this._client.request("weather.getDailyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch daily forecast");return t.forecast}async getHourlyForecast(e){const t=await this._client.request("weather.getHourlyForecast",e);if(!t.success||!t.forecast)throw new Error(t.error||"Failed to fetch hourly forecast");return t.forecast}}const ks=Ie.object({name:Ie.string(),data:Ie.any()});class xs{constructor(e){if(e._client._applicationSpecifier!=="rootSettingsNavigation")throw new Error("RootSettingsNavigation can only be used in the rootSettingsNavigation mount point");this._store=e}async setRootSettingsNavigation(e){const t=this._store.shared("root-settings-navigation"),s=await t.get("navigation"),n=this._store._client._applicationSpecifier;s[n]={applicationSpecifier:n,entries:e.entries},t.set("navigation",s)}async getRootSettingsNavigation(){const e=await this._store.shared("root-settings-navigation").get("navigation"),t=this._store._client._applicationSpecifier;return e[t]}async getAllRootSettingsNavigation(){return this._store.shared("root-settings-navigation").get("navigation")}}class Zs{constructor(e){this._client=e}async fetch(e,t){let s;typeof e=="string"?s=e:e instanceof URL?s=e.toString():(s=e.url,t||(t={method:e.method,headers:e.headers,body:e.body,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}));let n={};t!=null&&t.headers&&(t.headers instanceof Headers?t.headers.forEach((u,f)=>{n[f]=u}):Array.isArray(t.headers)?t.headers.forEach(([u,f])=>{n[u]=f}):n=t.headers);const i=await this._client.request("proxy.fetch",{url:s,method:(t==null?void 0:t.method)||"GET",headers:n,body:(t==null?void 0:t.body)||null});if(!i.success)throw new Error(`Proxy fetch failed: ${i.statusText}`);const r=new Headers(i.headers),o={status:i.status,statusText:i.statusText,headers:r};let c=null;return i.body!==null&&i.body!==void 0&&(typeof i.body=="string"||i.body instanceof ArrayBuffer?c=i.body:typeof i.body=="object"&&(c=JSON.stringify(i.body))),new Response(c,o)}}const U=1e3*30;class Ss{constructor(e){this._applicationName=e,this._applicationInstance="",this._applicationSpecifier="",this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new at(this)}get users(){return new ot(this)}get store(){return new rt(this)}get applications(){return new nt(this)}get media(){return new it(this)}get proxy(){return new Zs(this)}get devices(){return new _s(this)}get rootSettingsNavigation(){return new xs(this.store)}get weather(){return new ws(this)}get applicationName(){return this._applicationName}get applicationSpecifier(){return this._applicationSpecifier}get applicationInstance(){return this._applicationInstance}bind(){var e;const t=new URL(window.location.href),s=t.searchParams;this._applicationInstance=(e=s.get("telemetryApplicationId"))!==null&&e!==void 0?e:"";const n=s.get("applicationSpecifier");if(n)this._applicationSpecifier=n;else{const i=t.hostname.split(".");this._applicationSpecifier=i[0]||""}if(!this._applicationSpecifier||this._applicationSpecifier.length!==40)throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);if(!this._applicationInstance)throw new Error("Missing telemetryApplicationId query parameter");this._windowMessageHandler=i=>{if(i.source===window)return;for(let f=0;f<window.frames.length;f+=1)window.frames[f].postMessage(i.data,"*");const r=ks.safeParse(i.data);if(!r.success)return;const o=r.data,c=this._onHandlers.get(o.name),u=this._onceHandlers.get(o.name);if(c)for(const f of c)f(o.data);if(u){for(const f of u)f(o.data);this._onceHandlers.delete(o.name)}},window.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&window.removeEventListener("message",this._windowMessageHandler)}send(e,t){const s={telemetrySdkVersion:X,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t};window.parent.postMessage(s,"*")}request(e,t){const s=ge(),n={telemetrySdkVersion:X,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t,responseName:s};window.parent.postMessage(n,"*");let i=!1,r;const o=new Promise((u,f)=>{const w=new Error(`${e} message request with response name of ${s} timed out after ${U}`);setTimeout(()=>{i=!0,this.off(s,r),f(w)},U)}),c=new Promise(u=>{r=f=>{i||u(f)},this.once(s,u)});return Promise.race([o,c])}async subscribe(e,t,s){let n,i;typeof t=="function"?i=t:(n=t,i=s);const r=ge(),o=ge();let c=this._subscriptionNamesBySubjectName.get(e);c||(c=[],this._subscriptionNamesBySubjectName.set(e,c)),c.push(r),this._subscriptionNamesByHandler.set(i,r),this.on(r,i);const u={telemetrySdkVersion:X,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:n,responseName:o,subscriptionName:r};window.parent.postMessage(u,"*");let f=!1,w;const j=new Promise((D,L)=>{const Ae=new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${U}`);setTimeout(()=>{f=!0,this.off(o,w),L(Ae)},U)}),Oe=new Promise(D=>{w=L=>{f||D(L)},this.on(o,D)});return Promise.race([j,Oe])}async unsubscribe(e,t,s){let n,i;typeof t=="function"?i=t:(n=t,i=s);const r=ge();let o=[];if(i){const c=this._subscriptionNamesByHandler.get(i);if(!c)return{success:!1};o=[c],this._subscriptionNamesByHandler.delete(i)}else if(!this._subscriptionNamesBySubjectName.get(e))return{success:!1};for await(const c of o){this.off(c,i);const u={telemetrySdkVersion:X,applicationInstance:this._applicationInstance,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,name:e,data:n,responseName:r,unsubscribeName:c};window.parent.postMessage(u,"*");let f=!1,w;const j=new Promise((D,L)=>{const Ae=new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${U}`);setTimeout(()=>{f=!0,this.off(r,w),L(Ae)},U)}),Oe=new Promise(D=>{w=L=>{f||D(L)},this.once(r,D)});if(!(await Promise.race([j,Oe])).success)return{success:!1}}return{success:!0}}on(e,t){var s;const n=(s=this._onHandlers.get(e))!==null&&s!==void 0?s:[];n.length===0&&this._onHandlers.set(e,n),n.push(t)}once(e,t){var s;const n=(s=this._onceHandlers.get(e))!==null&&s!==void 0?s:[];n.length===0&&this._onceHandlers.set(e,n),n.push(t)}off(e,t){const s=this._onHandlers.get(e),n=this._onceHandlers.get(e);if(!(!s&&!n)){if(s){for(let i=0;i<s.length;i+=1)t&&s[i]!==t||(s.splice(i,1),i-=1);s.length===0&&this._onHandlers.delete(e)}if(n){for(let i=0;i<n.length;i+=1)t&&n[i]!==t||(n.splice(i,1),i-=1);n.length===0&&this._onceHandlers.delete(e)}}}}function ge(){return Math.random().toString(36).slice(2,9)}const X=gs.version;class Ts{constructor(e){this._client=e}async setOverride(e){if(!(await this._client.request("overrides.setOverride",{name:e})).success)throw new Error("Failed to set override");return!0}async clearOverride(e){if(!(await this._client.request("overrides.clearOverride",{name:e})).success)throw new Error("Failed to clear override");return!0}}class Ns{constructor(e){this._client=e}async nextPage(){if(!(await this._client.request("playlist.nextPage",{})).success)throw new Error("Failed to advance to next page");return!0}async previousPage(){if(!(await this._client.request("playlist.previousPage",{})).success)throw new Error("Failed to return to previous page");return!0}async setDuration(e){if(!(await this._client.request("playlist.setDuration",{duration:e})).success)throw new Error("Failed to set page duration");return!0}}class Cs extends Ss{get playlist(){return new Ns(this)}get overrides(){return new Ts(this)}}let v=null;function Os(){return v}function As(a){v=new Cs(a),v.bind()}function Es(){v==null||v.unbind(),v=null}function Is(...a){return Z(v),v.on(...a)}function js(...a){return Z(v),v.once(...a)}function $s(...a){return Z(v),v.off(...a)}function Ps(...a){return Z(v),v.send(...a)}function Rs(...a){return Z(v),v.request(...a)}function Ms(...a){return Z(v),v.subscribe(...a)}function Fs(...a){return Z(v),v.unsubscribe(...a)}function Ds(){return Z(v),v.store}function Ls(){return Z(v),v.applications}function qs(){return Z(v),v.media}function zs(){return Z(v),v.playlist}function Vs(){return Z(v),v.overrides}function Bs(){return Z(v),v.accounts}function Us(){return Z(v),v.users}function Z(a){if(!a)throw new Error("SDK is not configured")}exports.Accounts=at;exports.Applications=nt;exports.Environment=bs;exports.Media=it;exports.Store=rt;exports.Users=ot;exports.accounts=Bs;exports.applications=Ls;exports.configure=As;exports.destroy=Es;exports.globalClient=Os;exports.media=qs;exports.off=$s;exports.on=Is;exports.once=js;exports.overrides=Vs;exports.playlist=zs;exports.request=Rs;exports.send=Ps;exports.store=Ds;exports.subscribe=Ms;exports.telemetrySdkVersion=X;exports.unsubscribe=Fs;exports.users=Us;
package/dist/index.js CHANGED
@@ -162,7 +162,7 @@ let C = class Ve extends Error {
162
162
  }
163
163
  };
164
164
  C.create = (a) => new C(a);
165
- const W = (a, e) => {
165
+ const K = (a, e) => {
166
166
  let t;
167
167
  switch (a.code) {
168
168
  case d.invalid_type:
@@ -218,7 +218,7 @@ const W = (a, e) => {
218
218
  }
219
219
  return { message: t };
220
220
  };
221
- let Be = W;
221
+ let Be = K;
222
222
  function nt(a) {
223
223
  Be = a;
224
224
  }
@@ -258,7 +258,7 @@ function l(a, e) {
258
258
  // then schema-bound map if available
259
259
  t,
260
260
  // then global override map
261
- t === W ? void 0 : W
261
+ t === K ? void 0 : K
262
262
  // then global default map
263
263
  ].filter((n) => !!n)
264
264
  });
@@ -356,7 +356,7 @@ function g(a) {
356
356
  return i.code === "invalid_enum_value" ? { message: u ?? r.defaultError } : typeof r.data > "u" ? { message: (o = u ?? s) !== null && o !== void 0 ? o : r.defaultError } : i.code !== "invalid_type" ? { message: r.defaultError } : { message: (c = u ?? t) !== null && c !== void 0 ? c : r.defaultError };
357
357
  }, description: n };
358
358
  }
359
- let _ = class {
359
+ class _ {
360
360
  get description() {
361
361
  return this._def.description;
362
362
  }
@@ -486,7 +486,7 @@ let _ = class {
486
486
  return this._refinement((s, n) => e(s) ? !0 : (n.addIssue(typeof t == "function" ? t(s, n) : t), !1));
487
487
  }
488
488
  _refinement(e) {
489
- return new A({
489
+ return new O({
490
490
  schema: this,
491
491
  typeName: m.ZodEffects,
492
492
  effect: { type: "refinement", refinement: e }
@@ -503,10 +503,10 @@ let _ = class {
503
503
  };
504
504
  }
505
505
  optional() {
506
- return O.create(this, this._def);
506
+ return A.create(this, this._def);
507
507
  }
508
508
  nullable() {
509
- return M.create(this, this._def);
509
+ return F.create(this, this._def);
510
510
  }
511
511
  nullish() {
512
512
  return this.nullable().optional();
@@ -524,7 +524,7 @@ let _ = class {
524
524
  return ie.create(this, e, this._def);
525
525
  }
526
526
  transform(e) {
527
- return new A({
527
+ return new O({
528
528
  ...g(this._def),
529
529
  schema: this,
530
530
  typeName: m.ZodEffects,
@@ -575,21 +575,21 @@ let _ = class {
575
575
  isNullable() {
576
576
  return this.safeParse(null).success;
577
577
  }
578
- };
578
+ }
579
579
  const rt = /^c[^\s-]{8,}$/i, ot = /^[0-9a-z]+$/, ct = /^[0-9A-HJKMNP-TV-Z]{26}$/i, dt = /^[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, ut = /^[a-z0-9_-]{21}$/i, lt = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ht = /^[-+]?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)?)??$/, pt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ft = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
580
580
  let Ee;
581
- const mt = /^(?:(?: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])$/, yt = /^(?:(?: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])$/, gt = /^(([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]))$/, _t = /^(([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])$/, vt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, wt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, We = "((\\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])))", bt = new RegExp(`^${We}$`);
582
- function Ke(a) {
581
+ const mt = /^(?:(?: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])$/, yt = /^(?:(?: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])$/, gt = /^(([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]))$/, _t = /^(([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])$/, vt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, wt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ke = "((\\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])))", bt = new RegExp(`^${Ke}$`);
582
+ function We(a) {
583
583
  let e = "[0-5]\\d";
584
584
  a.precision ? e = `${e}\\.\\d{${a.precision}}` : a.precision == null && (e = `${e}(\\.\\d+)?`);
585
585
  const t = a.precision ? "+" : "?";
586
586
  return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
587
587
  }
588
588
  function kt(a) {
589
- return new RegExp(`^${Ke(a)}$`);
589
+ return new RegExp(`^${We(a)}$`);
590
590
  }
591
591
  function Je(a) {
592
- let e = `${We}T${Ke(a)}`;
592
+ let e = `${Ke}T${We(a)}`;
593
593
  const t = [];
594
594
  return t.push(a.local ? "Z?" : "Z"), a.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
595
595
  }
@@ -1000,7 +1000,7 @@ function Tt(a, e) {
1000
1000
  const t = (a.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, i = parseInt(a.toFixed(n).replace(".", "")), r = parseInt(e.toFixed(n).replace(".", ""));
1001
1001
  return i % r / Math.pow(10, n);
1002
1002
  }
1003
- class F extends _ {
1003
+ class M extends _ {
1004
1004
  constructor() {
1005
1005
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1006
1006
  }
@@ -1058,7 +1058,7 @@ class F extends _ {
1058
1058
  return this.setLimit("max", e, !1, p.toString(t));
1059
1059
  }
1060
1060
  setLimit(e, t, s, n) {
1061
- return new F({
1061
+ return new M({
1062
1062
  ...this._def,
1063
1063
  checks: [
1064
1064
  ...this._def.checks,
@@ -1072,7 +1072,7 @@ class F extends _ {
1072
1072
  });
1073
1073
  }
1074
1074
  _addCheck(e) {
1075
- return new F({
1075
+ return new M({
1076
1076
  ...this._def,
1077
1077
  checks: [...this._def.checks, e]
1078
1078
  });
@@ -1166,7 +1166,7 @@ class F extends _ {
1166
1166
  return Number.isFinite(t) && Number.isFinite(e);
1167
1167
  }
1168
1168
  }
1169
- F.create = (a) => new F({
1169
+ M.create = (a) => new M({
1170
1170
  checks: [],
1171
1171
  typeName: m.ZodNumber,
1172
1172
  coerce: (a == null ? void 0 : a.coerce) || !1,
@@ -1455,7 +1455,7 @@ ae.create = (a) => new ae({
1455
1455
  typeName: m.ZodNull,
1456
1456
  ...g(a)
1457
1457
  });
1458
- let K = class extends _ {
1458
+ let W = class extends _ {
1459
1459
  constructor() {
1460
1460
  super(...arguments), this._any = !0;
1461
1461
  }
@@ -1463,7 +1463,7 @@ let K = class extends _ {
1463
1463
  return k(e.data);
1464
1464
  }
1465
1465
  };
1466
- K.create = (a) => new K({
1466
+ W.create = (a) => new W({
1467
1467
  typeName: m.ZodAny,
1468
1468
  ...g(a)
1469
1469
  });
@@ -1588,7 +1588,7 @@ function H(a) {
1588
1588
  const e = {};
1589
1589
  for (const t in a.shape) {
1590
1590
  const s = a.shape[t];
1591
- e[t] = O.create(H(s));
1591
+ e[t] = A.create(H(s));
1592
1592
  }
1593
1593
  return new S({
1594
1594
  ...a._def,
@@ -1597,7 +1597,7 @@ function H(a) {
1597
1597
  } else return a instanceof V ? new V({
1598
1598
  ...a._def,
1599
1599
  type: H(a.element)
1600
- }) : a instanceof O ? O.create(H(a.unwrap())) : a instanceof M ? M.create(H(a.unwrap())) : a instanceof I ? I.create(a.items.map((e) => H(e))) : a;
1600
+ }) : a instanceof A ? A.create(H(a.unwrap())) : a instanceof F ? F.create(H(a.unwrap())) : a instanceof I ? I.create(a.items.map((e) => H(e))) : a;
1601
1601
  }
1602
1602
  let S = class T extends _ {
1603
1603
  constructor() {
@@ -1852,7 +1852,7 @@ let S = class T extends _ {
1852
1852
  t[s] = this.shape[s];
1853
1853
  else {
1854
1854
  let n = this.shape[s];
1855
- for (; n instanceof O; )
1855
+ for (; n instanceof A; )
1856
1856
  n = n._def.innerType;
1857
1857
  t[s] = n;
1858
1858
  }
@@ -1959,7 +1959,7 @@ ne.create = (a, e) => new ne({
1959
1959
  typeName: m.ZodUnion,
1960
1960
  ...g(e)
1961
1961
  });
1962
- const R = (a) => a instanceof oe ? R(a.schema) : a instanceof A ? R(a.innerType()) : a instanceof ce ? [a.value] : a instanceof pe ? a.options : a instanceof de ? w.objectValues(a.enum) : a instanceof ue ? R(a._def.innerType) : a instanceof se ? [void 0] : a instanceof ae ? [null] : a instanceof O ? [void 0, ...R(a.unwrap())] : a instanceof M ? [null, ...R(a.unwrap())] : a instanceof De || a instanceof he ? R(a.unwrap()) : a instanceof le ? R(a._def.innerType) : [];
1962
+ const R = (a) => a instanceof oe ? R(a.schema) : a instanceof O ? R(a.innerType()) : a instanceof ce ? [a.value] : a instanceof pe ? a.options : a instanceof de ? w.objectValues(a.enum) : a instanceof ue ? R(a._def.innerType) : a instanceof se ? [void 0] : a instanceof ae ? [null] : a instanceof A ? [void 0, ...R(a.unwrap())] : a instanceof F ? [null, ...R(a.unwrap())] : a instanceof De || a instanceof he ? R(a.unwrap()) : a instanceof le ? R(a._def.innerType) : [];
1963
1963
  class Ce extends _ {
1964
1964
  _parse(e) {
1965
1965
  const { ctx: t } = this._processInputParams(e);
@@ -2022,14 +2022,14 @@ class Ce extends _ {
2022
2022
  });
2023
2023
  }
2024
2024
  }
2025
- function Fe(a, e) {
2025
+ function Me(a, e) {
2026
2026
  const t = $(a), s = $(e);
2027
2027
  if (a === e)
2028
2028
  return { valid: !0, data: a };
2029
2029
  if (t === h.object && s === h.object) {
2030
2030
  const n = w.objectKeys(e), i = w.objectKeys(a).filter((o) => n.indexOf(o) !== -1), r = { ...a, ...e };
2031
2031
  for (const o of i) {
2032
- const c = Fe(a[o], e[o]);
2032
+ const c = Me(a[o], e[o]);
2033
2033
  if (!c.valid)
2034
2034
  return { valid: !1 };
2035
2035
  r[o] = c.data;
@@ -2040,7 +2040,7 @@ function Fe(a, e) {
2040
2040
  return { valid: !1 };
2041
2041
  const n = [];
2042
2042
  for (let i = 0; i < a.length; i++) {
2043
- const r = a[i], o = e[i], c = Fe(r, o);
2043
+ const r = a[i], o = e[i], c = Me(r, o);
2044
2044
  if (!c.valid)
2045
2045
  return { valid: !1 };
2046
2046
  n.push(c.data);
@@ -2053,7 +2053,7 @@ class ie extends _ {
2053
2053
  const { status: t, ctx: s } = this._processInputParams(e), n = (i, r) => {
2054
2054
  if ($e(i) || $e(r))
2055
2055
  return y;
2056
- const o = Fe(i.value, r.value);
2056
+ const o = Me(i.value, r.value);
2057
2057
  return o.valid ? ((Pe(i) || Pe(r)) && t.dirty(), { status: t.value, value: o.data }) : (l(s, {
2058
2058
  code: d.invalid_intersection_types
2059
2059
  }), y);
@@ -2309,7 +2309,7 @@ let Ge = class ve extends _ {
2309
2309
  t.common.contextualErrorMap,
2310
2310
  t.schemaErrorMap,
2311
2311
  we(),
2312
- W
2312
+ K
2313
2313
  ].filter((u) => !!u),
2314
2314
  issueData: {
2315
2315
  code: d.invalid_arguments,
@@ -2325,7 +2325,7 @@ let Ge = class ve extends _ {
2325
2325
  t.common.contextualErrorMap,
2326
2326
  t.schemaErrorMap,
2327
2327
  we(),
2328
- W
2328
+ K
2329
2329
  ].filter((u) => !!u),
2330
2330
  issueData: {
2331
2331
  code: d.invalid_return_type,
@@ -2432,7 +2432,7 @@ function Xe(a, e) {
2432
2432
  ...g(e)
2433
2433
  });
2434
2434
  }
2435
- let pe = class Me extends _ {
2435
+ let pe = class Fe extends _ {
2436
2436
  constructor() {
2437
2437
  super(...arguments), Y.set(this, void 0);
2438
2438
  }
@@ -2477,13 +2477,13 @@ let pe = class Me extends _ {
2477
2477
  return e;
2478
2478
  }
2479
2479
  extract(e, t = this._def) {
2480
- return Me.create(e, {
2480
+ return Fe.create(e, {
2481
2481
  ...this._def,
2482
2482
  ...t
2483
2483
  });
2484
2484
  }
2485
2485
  exclude(e, t = this._def) {
2486
- return Me.create(this.options.filter((s) => !e.includes(s)), {
2486
+ return Fe.create(this.options.filter((s) => !e.includes(s)), {
2487
2487
  ...this._def,
2488
2488
  ...t
2489
2489
  });
@@ -2549,7 +2549,7 @@ J.create = (a, e) => new J({
2549
2549
  typeName: m.ZodPromise,
2550
2550
  ...g(e)
2551
2551
  });
2552
- class A extends _ {
2552
+ class O extends _ {
2553
2553
  innerType() {
2554
2554
  return this._def.schema;
2555
2555
  }
@@ -2626,19 +2626,19 @@ class A extends _ {
2626
2626
  w.assertNever(n);
2627
2627
  }
2628
2628
  }
2629
- A.create = (a, e, t) => new A({
2629
+ O.create = (a, e, t) => new O({
2630
2630
  schema: a,
2631
2631
  typeName: m.ZodEffects,
2632
2632
  effect: e,
2633
2633
  ...g(t)
2634
2634
  });
2635
- A.createWithPreprocess = (a, e, t) => new A({
2635
+ O.createWithPreprocess = (a, e, t) => new O({
2636
2636
  schema: e,
2637
2637
  effect: { type: "preprocess", transform: a },
2638
2638
  typeName: m.ZodEffects,
2639
2639
  ...g(t)
2640
2640
  });
2641
- let O = class extends _ {
2641
+ let A = class extends _ {
2642
2642
  _parse(e) {
2643
2643
  return this._getType(e) === h.undefined ? k(void 0) : this._def.innerType._parse(e);
2644
2644
  }
@@ -2646,12 +2646,12 @@ let O = class extends _ {
2646
2646
  return this._def.innerType;
2647
2647
  }
2648
2648
  };
2649
- O.create = (a, e) => new O({
2649
+ A.create = (a, e) => new A({
2650
2650
  innerType: a,
2651
2651
  typeName: m.ZodOptional,
2652
2652
  ...g(e)
2653
2653
  });
2654
- let M = class extends _ {
2654
+ let F = class extends _ {
2655
2655
  _parse(e) {
2656
2656
  return this._getType(e) === h.null ? k(null) : this._def.innerType._parse(e);
2657
2657
  }
@@ -2659,7 +2659,7 @@ let M = class extends _ {
2659
2659
  return this._def.innerType;
2660
2660
  }
2661
2661
  };
2662
- M.create = (a, e) => new M({
2662
+ F.create = (a, e) => new F({
2663
2663
  innerType: a,
2664
2664
  typeName: m.ZodNullable,
2665
2665
  ...g(e)
@@ -2817,7 +2817,7 @@ function qe(a, e) {
2817
2817
  return typeof t == "string" ? { message: t } : t;
2818
2818
  }
2819
2819
  function Qe(a, e = {}, t) {
2820
- return a ? K.create().superRefine((s, n) => {
2820
+ return a ? W.create().superRefine((s, n) => {
2821
2821
  var i, r;
2822
2822
  const o = a(s);
2823
2823
  if (o instanceof Promise)
@@ -2832,7 +2832,7 @@ function Qe(a, e = {}, t) {
2832
2832
  const c = qe(e, s), u = (r = (i = c.fatal) !== null && i !== void 0 ? i : t) !== null && r !== void 0 ? r : !0;
2833
2833
  n.addIssue({ code: "custom", ...c, fatal: u });
2834
2834
  }
2835
- }) : K.create();
2835
+ }) : W.create();
2836
2836
  }
2837
2837
  const Ct = {
2838
2838
  object: S.lazycreate
@@ -2841,11 +2841,11 @@ var m;
2841
2841
  (function(a) {
2842
2842
  a.ZodString = "ZodString", a.ZodNumber = "ZodNumber", a.ZodNaN = "ZodNaN", a.ZodBigInt = "ZodBigInt", a.ZodBoolean = "ZodBoolean", a.ZodDate = "ZodDate", a.ZodSymbol = "ZodSymbol", a.ZodUndefined = "ZodUndefined", a.ZodNull = "ZodNull", a.ZodAny = "ZodAny", a.ZodUnknown = "ZodUnknown", a.ZodNever = "ZodNever", a.ZodVoid = "ZodVoid", a.ZodArray = "ZodArray", a.ZodObject = "ZodObject", a.ZodUnion = "ZodUnion", a.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", a.ZodIntersection = "ZodIntersection", a.ZodTuple = "ZodTuple", a.ZodRecord = "ZodRecord", a.ZodMap = "ZodMap", a.ZodSet = "ZodSet", a.ZodFunction = "ZodFunction", a.ZodLazy = "ZodLazy", a.ZodLiteral = "ZodLiteral", a.ZodEnum = "ZodEnum", a.ZodEffects = "ZodEffects", a.ZodNativeEnum = "ZodNativeEnum", a.ZodOptional = "ZodOptional", a.ZodNullable = "ZodNullable", a.ZodDefault = "ZodDefault", a.ZodCatch = "ZodCatch", a.ZodPromise = "ZodPromise", a.ZodBranded = "ZodBranded", a.ZodPipeline = "ZodPipeline", a.ZodReadonly = "ZodReadonly";
2843
2843
  })(m || (m = {}));
2844
- const At = (a, e = {
2844
+ const Ot = (a, e = {
2845
2845
  message: `Input not instance of ${a.name}`
2846
- }) => Qe((t) => t instanceof a, e), et = N.create, tt = F.create, Ot = Ne.create, Et = Q.create, st = ee.create, It = te.create, jt = Ze.create, $t = se.create, Pt = ae.create, Rt = K.create, Ft = q.create, Mt = P.create, Dt = Se.create, Lt = V.create, qt = S.create, zt = S.strictCreate, Vt = ne.create, Bt = Ce.create, Ut = ie.create, Ht = I.create, Wt = re.create, Kt = Te.create, Jt = B.create, Yt = Ge.create, Gt = oe.create, Xt = ce.create, Qt = pe.create, es = de.create, ts = J.create, ze = A.create, ss = O.create, as = M.create, ns = A.createWithPreprocess, is = fe.create, rs = () => et().optional(), os = () => tt().optional(), cs = () => st().optional(), ds = {
2846
+ }) => Qe((t) => t instanceof a, e), et = N.create, tt = M.create, At = Ne.create, Et = Q.create, st = ee.create, It = te.create, jt = Ze.create, $t = se.create, Pt = ae.create, Rt = W.create, Mt = q.create, Ft = P.create, Dt = Se.create, Lt = V.create, qt = S.create, zt = S.strictCreate, Vt = ne.create, Bt = Ce.create, Ut = ie.create, Ht = I.create, Kt = re.create, Wt = Te.create, Jt = B.create, Yt = Ge.create, Gt = oe.create, Xt = ce.create, Qt = pe.create, es = de.create, ts = J.create, ze = O.create, ss = A.create, as = F.create, ns = O.createWithPreprocess, is = fe.create, rs = () => et().optional(), os = () => tt().optional(), cs = () => st().optional(), ds = {
2847
2847
  string: (a) => N.create({ ...a, coerce: !0 }),
2848
- number: (a) => F.create({ ...a, coerce: !0 }),
2848
+ number: (a) => M.create({ ...a, coerce: !0 }),
2849
2849
  boolean: (a) => ee.create({
2850
2850
  ...a,
2851
2851
  coerce: !0
@@ -2855,7 +2855,7 @@ const At = (a, e = {
2855
2855
  }, us = y;
2856
2856
  var Ie = /* @__PURE__ */ Object.freeze({
2857
2857
  __proto__: null,
2858
- defaultErrorMap: W,
2858
+ defaultErrorMap: K,
2859
2859
  setErrorMap: nt,
2860
2860
  getErrorMap: we,
2861
2861
  makeIssue: be,
@@ -2880,14 +2880,14 @@ var Ie = /* @__PURE__ */ Object.freeze({
2880
2880
  ZodType: _,
2881
2881
  datetimeRegex: Je,
2882
2882
  ZodString: N,
2883
- ZodNumber: F,
2883
+ ZodNumber: M,
2884
2884
  ZodBigInt: Q,
2885
2885
  ZodBoolean: ee,
2886
2886
  ZodDate: te,
2887
2887
  ZodSymbol: Ze,
2888
2888
  ZodUndefined: se,
2889
2889
  ZodNull: ae,
2890
- ZodAny: K,
2890
+ ZodAny: W,
2891
2891
  ZodUnknown: q,
2892
2892
  ZodNever: P,
2893
2893
  ZodVoid: Se,
@@ -2906,10 +2906,10 @@ var Ie = /* @__PURE__ */ Object.freeze({
2906
2906
  ZodEnum: pe,
2907
2907
  ZodNativeEnum: de,
2908
2908
  ZodPromise: J,
2909
- ZodEffects: A,
2910
- ZodTransformer: A,
2911
- ZodOptional: O,
2912
- ZodNullable: M,
2909
+ ZodEffects: O,
2910
+ ZodTransformer: O,
2911
+ ZodOptional: A,
2912
+ ZodNullable: F,
2913
2913
  ZodDefault: ue,
2914
2914
  ZodCatch: le,
2915
2915
  ZodNaN: Ne,
@@ -2934,14 +2934,14 @@ var Ie = /* @__PURE__ */ Object.freeze({
2934
2934
  effect: ze,
2935
2935
  enum: Qt,
2936
2936
  function: Yt,
2937
- instanceof: At,
2937
+ instanceof: Ot,
2938
2938
  intersection: Ut,
2939
2939
  lazy: Gt,
2940
2940
  literal: Xt,
2941
- map: Kt,
2942
- nan: Ot,
2941
+ map: Wt,
2942
+ nan: At,
2943
2943
  nativeEnum: es,
2944
- never: Mt,
2944
+ never: Ft,
2945
2945
  null: Pt,
2946
2946
  nullable: as,
2947
2947
  number: tt,
@@ -2953,7 +2953,7 @@ var Ie = /* @__PURE__ */ Object.freeze({
2953
2953
  pipeline: is,
2954
2954
  preprocess: ns,
2955
2955
  promise: ts,
2956
- record: Wt,
2956
+ record: Kt,
2957
2957
  set: Jt,
2958
2958
  strictObject: zt,
2959
2959
  string: et,
@@ -2962,14 +2962,14 @@ var Ie = /* @__PURE__ */ Object.freeze({
2962
2962
  tuple: Ht,
2963
2963
  undefined: $t,
2964
2964
  union: Vt,
2965
- unknown: Ft,
2965
+ unknown: Mt,
2966
2966
  void: Dt,
2967
2967
  NEVER: us,
2968
2968
  ZodIssueCode: d,
2969
2969
  quotelessJson: at,
2970
2970
  ZodError: C
2971
2971
  });
2972
- const ls = "1.4.0", hs = {
2972
+ const ls = "1.4.2", hs = {
2973
2973
  version: ls
2974
2974
  };
2975
2975
  class ps {
@@ -3080,7 +3080,7 @@ class ms {
3080
3080
  function ys(a, e = console.error) {
3081
3081
  a().catch(e);
3082
3082
  }
3083
- class js {
3083
+ class Is {
3084
3084
  constructor(e) {
3085
3085
  this._client = e;
3086
3086
  }
@@ -3326,7 +3326,7 @@ class ws {
3326
3326
  this._client = e;
3327
3327
  }
3328
3328
  /**
3329
- * Retrieves current weather conditions for a specified location using WeatherBit.
3329
+ * Retrieves current weather conditions for a specified location.
3330
3330
  *
3331
3331
  * @param params - Weather request parameters including location and units
3332
3332
  * @returns A promise that resolves to the current weather conditions
@@ -3351,7 +3351,7 @@ class ws {
3351
3351
  return t.conditions;
3352
3352
  }
3353
3353
  /**
3354
- * Retrieves daily weather forecast for a specified location using WeatherBit.
3354
+ * Retrieves daily weather forecast for a specified location.
3355
3355
  *
3356
3356
  * @param params - Forecast request parameters including location, units, and number of days
3357
3357
  * @returns A promise that resolves to an array of daily forecast data
@@ -3374,7 +3374,7 @@ class ws {
3374
3374
  return t.forecast;
3375
3375
  }
3376
3376
  /**
3377
- * Retrieves hourly weather forecast for a specified location using WeatherBit.
3377
+ * Retrieves hourly weather forecast for a specified location.
3378
3378
  *
3379
3379
  * @param params - Forecast request parameters including location, units, and number of hours
3380
3380
  * @returns A promise that resolves to an array of hourly forecast data
@@ -3396,69 +3396,6 @@ class ws {
3396
3396
  throw new Error(t.error || "Failed to fetch hourly forecast");
3397
3397
  return t.forecast;
3398
3398
  }
3399
- /**
3400
- * Retrieves current weather conditions using AccuWeather.
3401
- *
3402
- * @param params - Weather request parameters including location and units
3403
- * @returns A promise that resolves to the AccuWeather conditions data
3404
- * @throws {Error} If the request fails or location is invalid
3405
- *
3406
- * @example
3407
- * ```typescript
3408
- * const weather = await weather.getAccuWeatherConditions({
3409
- * city: 'Paris',
3410
- * units: 'metric'
3411
- * })
3412
- * ```
3413
- */
3414
- async getAccuWeatherConditions(e) {
3415
- const t = await this._client.request("weather.getAccuWeatherConditions", e);
3416
- if (!t.success || !t.data)
3417
- throw new Error(t.error || "Failed to fetch AccuWeather conditions");
3418
- return t.data;
3419
- }
3420
- /**
3421
- * Retrieves daily forecast using AccuWeather.
3422
- *
3423
- * @param params - Forecast request parameters including location and units
3424
- * @returns A promise that resolves to the AccuWeather daily forecast data
3425
- * @throws {Error} If the request fails or location is invalid
3426
- *
3427
- * @example
3428
- * ```typescript
3429
- * const forecast = await weather.getAccuWeatherDailyForecast({
3430
- * city: 'Sydney',
3431
- * units: 'metric'
3432
- * })
3433
- * ```
3434
- */
3435
- async getAccuWeatherDailyForecast(e) {
3436
- const t = await this._client.request("weather.getAccuWeatherDailyForecast", e);
3437
- if (!t.success || !t.data)
3438
- throw new Error(t.error || "Failed to fetch AccuWeather daily forecast");
3439
- return t.data;
3440
- }
3441
- /**
3442
- * Retrieves hourly forecast using AccuWeather.
3443
- *
3444
- * @param params - Forecast request parameters including location and units
3445
- * @returns A promise that resolves to the AccuWeather hourly forecast data
3446
- * @throws {Error} If the request fails or location is invalid
3447
- *
3448
- * @example
3449
- * ```typescript
3450
- * const forecast = await weather.getAccuWeatherHourlyForecast({
3451
- * city: 'Berlin',
3452
- * units: 'metric'
3453
- * })
3454
- * ```
3455
- */
3456
- async getAccuWeatherHourlyForecast(e) {
3457
- const t = await this._client.request("weather.getAccuWeatherHourlyForecast", e);
3458
- if (!t.success || !t.data)
3459
- throw new Error(t.error || "Failed to fetch AccuWeather hourly forecast");
3460
- return t.data;
3461
- }
3462
3399
  }
3463
3400
  const bs = Ie.object({
3464
3401
  name: Ie.string(),
@@ -3644,10 +3581,10 @@ class Zs {
3644
3581
  return new gs(this);
3645
3582
  }
3646
3583
  /**
3647
- * Provides access to the proxy API for fetching third-party content through the TelemetryOS proxy service.
3584
+ * Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
3648
3585
  *
3649
3586
  * This property returns a new Proxy instance that allows applications to fetch content from external
3650
- * URLs through the platform's proxy service, which handles authentication, caching, and CORS issues.
3587
+ * URLs through the platform, which handles authentication, caching, and CORS issues.
3651
3588
  *
3652
3589
  * NOTE: Most application developers should use the global proxy() function
3653
3590
  * instead of accessing this property directly.
@@ -3694,8 +3631,7 @@ class Zs {
3694
3631
  * Provides access to the weather API for retrieving weather data.
3695
3632
  *
3696
3633
  * This property returns a new Weather instance that allows applications to fetch
3697
- * current weather conditions and forecasts from various providers (WeatherBit, AccuWeather)
3698
- * through the General Integrations Service.
3634
+ * current weather conditions and forecasts through the TelemetryOS API.
3699
3635
  *
3700
3636
  * NOTE: Most application developers should use the global weather() function
3701
3637
  * instead of accessing this property directly.
@@ -3863,16 +3799,16 @@ class Zs {
3863
3799
  window.parent.postMessage(u, "*");
3864
3800
  let f = !1, b;
3865
3801
  const j = new Promise((D, L) => {
3866
- const Oe = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${U}`);
3802
+ const Ae = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${U}`);
3867
3803
  setTimeout(() => {
3868
- f = !0, this.off(o, b), L(Oe);
3804
+ f = !0, this.off(o, b), L(Ae);
3869
3805
  }, U);
3870
- }), Ae = new Promise((D) => {
3806
+ }), Oe = new Promise((D) => {
3871
3807
  b = (L) => {
3872
3808
  f || D(L);
3873
3809
  }, this.on(o, D);
3874
3810
  });
3875
- return Promise.race([j, Ae]);
3811
+ return Promise.race([j, Oe]);
3876
3812
  }
3877
3813
  async unsubscribe(e, t, s) {
3878
3814
  let n, i;
@@ -3901,16 +3837,16 @@ class Zs {
3901
3837
  window.parent.postMessage(u, "*");
3902
3838
  let f = !1, b;
3903
3839
  const j = new Promise((D, L) => {
3904
- const Oe = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${U}`);
3840
+ const Ae = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${U}`);
3905
3841
  setTimeout(() => {
3906
- f = !0, this.off(r, b), L(Oe);
3842
+ f = !0, this.off(r, b), L(Ae);
3907
3843
  }, U);
3908
- }), Ae = new Promise((D) => {
3844
+ }), Oe = new Promise((D) => {
3909
3845
  b = (L) => {
3910
3846
  f || D(L);
3911
3847
  }, this.once(r, D);
3912
3848
  });
3913
- if (!(await Promise.race([j, Ae])).success)
3849
+ if (!(await Promise.race([j, Oe])).success)
3914
3850
  return { success: !1 };
3915
3851
  }
3916
3852
  return { success: !0 };
@@ -4105,55 +4041,55 @@ class Ns extends Zs {
4105
4041
  }
4106
4042
  }
4107
4043
  let v = null;
4108
- function $s() {
4044
+ function js() {
4109
4045
  return v;
4110
4046
  }
4111
- function Ps(a) {
4047
+ function $s(a) {
4112
4048
  v = new Ns(a), v.bind();
4113
4049
  }
4114
- function Rs() {
4050
+ function Ps() {
4115
4051
  v == null || v.unbind(), v = null;
4116
4052
  }
4117
- function Fs(...a) {
4053
+ function Rs(...a) {
4118
4054
  return Z(v), v.on(...a);
4119
4055
  }
4120
4056
  function Ms(...a) {
4121
4057
  return Z(v), v.once(...a);
4122
4058
  }
4123
- function Ds(...a) {
4059
+ function Fs(...a) {
4124
4060
  return Z(v), v.off(...a);
4125
4061
  }
4126
- function Ls(...a) {
4062
+ function Ds(...a) {
4127
4063
  return Z(v), v.send(...a);
4128
4064
  }
4129
- function qs(...a) {
4065
+ function Ls(...a) {
4130
4066
  return Z(v), v.request(...a);
4131
4067
  }
4132
- function zs(...a) {
4068
+ function qs(...a) {
4133
4069
  return Z(v), v.subscribe(...a);
4134
4070
  }
4135
- function Vs(...a) {
4071
+ function zs(...a) {
4136
4072
  return Z(v), v.unsubscribe(...a);
4137
4073
  }
4138
- function Bs() {
4074
+ function Vs() {
4139
4075
  return Z(v), v.store;
4140
4076
  }
4141
- function Us() {
4077
+ function Bs() {
4142
4078
  return Z(v), v.applications;
4143
4079
  }
4144
- function Hs() {
4080
+ function Us() {
4145
4081
  return Z(v), v.media;
4146
4082
  }
4147
- function Ws() {
4083
+ function Hs() {
4148
4084
  return Z(v), v.playlist;
4149
4085
  }
4150
4086
  function Ks() {
4151
4087
  return Z(v), v.overrides;
4152
4088
  }
4153
- function Js() {
4089
+ function Ws() {
4154
4090
  return Z(v), v.accounts;
4155
4091
  }
4156
- function Ys() {
4092
+ function Js() {
4157
4093
  return Z(v), v.users;
4158
4094
  }
4159
4095
  function Z(a) {
@@ -4163,26 +4099,26 @@ function Z(a) {
4163
4099
  export {
4164
4100
  ps as Accounts,
4165
4101
  fs as Applications,
4166
- js as Environment,
4102
+ Is as Environment,
4167
4103
  gs as Media,
4168
4104
  _s as Store,
4169
4105
  vs as Users,
4170
- Js as accounts,
4171
- Us as applications,
4172
- Ps as configure,
4173
- Rs as destroy,
4174
- $s as globalClient,
4175
- Hs as media,
4176
- Ds as off,
4177
- Fs as on,
4106
+ Ws as accounts,
4107
+ Bs as applications,
4108
+ $s as configure,
4109
+ Ps as destroy,
4110
+ js as globalClient,
4111
+ Us as media,
4112
+ Fs as off,
4113
+ Rs as on,
4178
4114
  Ms as once,
4179
4115
  Ks as overrides,
4180
- Ws as playlist,
4181
- qs as request,
4182
- Ls as send,
4183
- Bs as store,
4184
- zs as subscribe,
4116
+ Hs as playlist,
4117
+ Ls as request,
4118
+ Ds as send,
4119
+ Vs as store,
4120
+ qs as subscribe,
4185
4121
  ge as telemetrySdkVersion,
4186
- Vs as unsubscribe,
4187
- Ys as users
4122
+ zs as unsubscribe,
4123
+ Js as users
4188
4124
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telemetryos/sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "The official TelemetryOS application API package. Use it to build applications that run on the TelemetryOS platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -35,7 +35,7 @@
35
35
  "license": "",
36
36
  "repository": "github:TelemetryTV/Application-API",
37
37
  "dependencies": {
38
- "@telemetryos/root-sdk": "^1.4.1",
38
+ "@telemetryos/root-sdk": "^1.4.3",
39
39
  "zod": "^3.24.4"
40
40
  },
41
41
  "devDependencies": {