@telemetryos/sdk 1.8.1 → 1.8.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,24 @@
1
1
  # @telemetryos/sdk
2
2
 
3
+ ## 1.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix issue where uninitialized store hooks could set values
8
+
9
+ Store hooks could call setValue() before isLoading was true. Now this does nothing and logs an error.
10
+
11
+ - Updated dependencies
12
+ - @telemetryos/root-sdk@1.8.3
13
+
14
+ ## 1.8.2
15
+
16
+ ### Patch Changes
17
+
18
+ - Support windows paths in the CLI
19
+ - Updated dependencies
20
+ - @telemetryos/root-sdk@1.8.2
21
+
3
22
  ## 1.8.1
4
23
 
5
24
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var b;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{const i={};for(const r of a)i[r]=r;return i},n.getValidEnumValues=a=>{const i=n.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),r={};for(const o of i)r[o]=a[o];return n.objectValues(r)},n.objectValues=a=>n.objectKeys(a).map(function(i){return a[i]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const r in a)Object.prototype.hasOwnProperty.call(a,r)&&i.push(r);return i},n.find=(a,i)=>{for(const r of a)if(i(r))return r},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,i=" | "){return a.map(r=>typeof r=="string"?`'${r}'`:r).join(i)}n.joinValues=s,n.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(b||(b={}));var _e;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(_e||(_e={}));const l=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),O=n=>{switch(typeof n){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(n)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(n)?l.array:n===null?l.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?l.promise:typeof Map<"u"&&n instanceof Map?l.map:typeof Set<"u"&&n instanceof Set?l.set:typeof Date<"u"&&n instanceof Date?l.date:l.object;default:return l.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"]);class C 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:[]},a=i=>{for(const r of i.issues)if(r.code==="invalid_union")r.unionErrors.map(a);else if(r.code==="invalid_return_type")a(r.returnTypeError);else if(r.code==="invalid_arguments")a(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 h=r.path[c];c===r.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(t(r))):o[h]=o[h]||{_errors:[]},o=o[h],c++}}};return a(this),s}static assert(e){if(!(e instanceof C))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 a of this.issues)if(a.path.length>0){const i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=n=>new C(n);const re=(n,e)=>{let t;switch(n.code){case d.invalid_type:n.received===l.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,b.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${b.joinValues(n.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${b.joinValues(n.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${b.joinValues(n.options)}, received '${n.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 n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:b.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case d.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case d.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.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 ${n.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,b.assertNever(n)}return{message:t}};let Je=re;function Ge(){return Je}const Ye=n=>{const{data:e,path:t,errorMaps:s,issueData:a}=n,i=[...t,...a.path||[]],r={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let o="";const c=s.filter(h=>!!h).slice().reverse();for(const h of c)o=h(r,{data:e,defaultError:o}).message;return{...a,path:i,message:o}};function u(n,e){const t=Ge(),s=Ye({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===re?void 0:re].filter(a=>!!a)});n.common.issues.push(s)}let N=class je{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 a of t){if(a.status==="aborted")return y;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const i=await a.key,r=await a.value;s.push({key:i,value:r})}return je.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const a of t){const{key:i,value:r}=a;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"||a.alwaysSet)&&(s[i.value]=r.value)}return{status:e.value,value:s}}};const y=Object.freeze({status:"aborted"}),ie=n=>({status:"dirty",value:n}),x=n=>({status:"valid",value:n}),ve=n=>n.status==="aborted",be=n=>n.status==="dirty",L=n=>n.status==="valid",X=n=>typeof Promise<"u"&&n instanceof Promise;var p;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(p||(p={}));let $=class{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const we=(n,e)=>{if(L(e))return{success:!0,data:e.value};if(!n.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(n.common.issues);return this._error=t,this._error}}};function _(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=n;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:a}:{errorMap:(i,r)=>{const{message:o}=n;return i.code==="invalid_enum_value"?{message:o??r.defaultError}:typeof r.data>"u"?{message:o??s??r.defaultError}:i.code!=="invalid_type"?{message:r.defaultError}:{message:o??t??r.defaultError}},description:a}}let v=class{get description(){return this._def.description}_getType(e){return O(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(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){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)},a=this._parseSync({data:e,path:s.path,parent:s});return we(s,a)}"~validate"(e){var t,s;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:a});return L(i)?{value:i.value}:{issues:a.common.issues}}catch(i){(s=(t=i==null?void 0:i.message)==null?void 0:t.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:a}).then(i=>L(i)?{value:i.value}:{issues:a.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:O(e)},a=this._parse({data:e,path:s.path,parent:s}),i=await(X(a)?a:Promise.resolve(a));return we(s,i)}refine(e,t){const s=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{const r=e(a),o=()=>i.addIssue({code:d.custom,...s(a)});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,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,a):t),!1))}_refinement(e){return new D({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 I.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return q.create(this)}promise(){return te.create(this,this._def)}or(e){return Q.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new D({..._(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new he({..._(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new bt({typeName:m.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new pe({..._(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 ge.create(this,e)}readonly(){return fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Xe=/^c[^\s-]{8,}$/i,Qe=/^[0-9a-z]+$/,et=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tt=/^[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,st=/^[a-z0-9_-]{21}$/i,at=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nt=/^[-+]?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)?)??$/,rt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,it="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ne;const ot=/^(?:(?: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])$/,ct=/^(?:(?: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])$/,dt=/^(([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]))$/,ut=/^(([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])$/,lt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ht=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\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])))",pt=new RegExp(`^${Pe}$`);function Re(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ft(n){return new RegExp(`^${Re(n)}$`)}function mt(n){let e=`${Pe}T${Re(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function gt(n,e){return!!((e==="v4"||!e)&&ot.test(n)||(e==="v6"||!e)&&dt.test(n))}function yt(n,e){if(!at.test(n))return!1;try{const[t]=n.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function _t(n,e){return!!((e==="v4"||!e)&&ct.test(n)||(e==="v6"||!e)&&ut.test(n))}class A extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:l.string,received:a.parsedType}),y}const t=new N;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,r=e.data.length<a.value;(i||r)&&(s=this._getOrReturnCtx(e,s),i?u(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&u(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if(a.kind==="email")rt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"email",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="emoji")ne||(ne=new RegExp(it,"u")),ne.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"emoji",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="uuid")tt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"uuid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="nanoid")st.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"nanoid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="cuid")Xe.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="cuid2")Qe.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid2",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="ulid")et.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ulid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),u(s,{validation:"url",code:d.invalid_string,message:a.message}),t.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"regex",code:d.invalid_string,message:a.message}),t.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty()):a.kind==="datetime"?mt(a).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"datetime",message:a.message}),t.dirty()):a.kind==="date"?pt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"date",message:a.message}),t.dirty()):a.kind==="time"?ft(a).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"time",message:a.message}),t.dirty()):a.kind==="duration"?nt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"duration",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="ip"?gt(e.data,a.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ip",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="jwt"?yt(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"jwt",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="cidr"?_t(e.data,a.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cidr",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="base64"?lt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="base64url"?ht.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64url",code:d.invalid_string,message:a.message}),t.dirty()):b.assertNever(a);return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new A({...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){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:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!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 A({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new A({...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}}A.create=n=>new A({checks:[],typeName:m.ZodString,coerce:(n==null?void 0:n.coerce)??!1,..._(n)});function vt(n,e){const t=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,i=Number.parseInt(n.toFixed(a).replace(".","")),r=Number.parseInt(e.toFixed(a).replace(".",""));return i%r/10**a}let ke=class oe extends v{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)!==l.number){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:l.number,received:a.parsedType}),y}let t;const s=new N;for(const a of this._def.checks)a.kind==="int"?b.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),u(t,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?vt(e.data,a.value)!==0&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),u(t,{code:d.not_finite,message:a.message}),s.dirty()):b.assertNever(a);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,a){return new oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(a)}]})}_addCheck(e){return new oe({...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)}};ke.create=n=>new ke({checks:[],typeName:m.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,..._(n)});class K extends v{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)!==l.bigint)return this._getInvalidInput(e);let t;const s=new N;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):b.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.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,a){return new K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(a)}]})}_addCheck(e){return new K({...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}}K.create=n=>new K({checks:[],typeName:m.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,..._(n)});class xe extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.boolean,received:t.parsedType}),y}return x(e.data)}}xe.create=n=>new xe({typeName:m.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,..._(n)});let Se=class Fe extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:l.date,received:a.parsedType}),y}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_date}),y}const t=new N;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):b.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Fe({...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=n=>new Se({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:m.ZodDate,..._(n)});class Ne extends v{_parse(e){if(this._getType(e)!==l.symbol){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.symbol,received:t.parsedType}),y}return x(e.data)}}Ne.create=n=>new Ne({typeName:m.ZodSymbol,..._(n)});class Ce extends v{_parse(e){if(this._getType(e)!==l.undefined){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.undefined,received:t.parsedType}),y}return x(e.data)}}Ce.create=n=>new Ce({typeName:m.ZodUndefined,..._(n)});class Te extends v{_parse(e){if(this._getType(e)!==l.null){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.null,received:t.parsedType}),y}return x(e.data)}}Te.create=n=>new Te({typeName:m.ZodNull,..._(n)});class ce extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return x(e.data)}}ce.create=n=>new ce({typeName:m.ZodAny,..._(n)});class Ze extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return x(e.data)}}Ze.create=n=>new Ze({typeName:m.ZodUnknown,..._(n)});let E=class extends v{_parse(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.never,received:t.parsedType}),y}};E.create=n=>new E({typeName:m.ZodNever,..._(n)});class Oe extends v{_parse(e){if(this._getType(e)!==l.undefined){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.void,received:t.parsedType}),y}return x(e.data)}}Oe.create=n=>new Oe({typeName:m.ZodVoid,..._(n)});let q=class Y extends v{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==l.array)return u(t,{code:d.invalid_type,expected:l.array,received:t.parsedType}),y;if(a.exactLength!==null){const r=t.data.length>a.exactLength.value,o=t.data.length<a.exactLength.value;(r||o)&&(u(t,{code:r?d.too_big:d.too_small,minimum:o?a.exactLength.value:void 0,maximum:r?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(u(t,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(u(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((r,o)=>a.type._parseAsync(new $(t,r,t.path,o)))).then(r=>N.mergeArray(s,r));const i=[...t.data].map((r,o)=>a.type._parseSync(new $(t,r,t.path,o)));return N.mergeArray(s,i)}get element(){return this._def.type}min(e,t){return new Y({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new Y({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new Y({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}};q.create=(n,e)=>new q({type:n,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,..._(e)});function M(n){if(n instanceof T){const e={};for(const t in n.shape){const s=n.shape[t];e[t]=I.create(M(s))}return new T({...n._def,shape:()=>e})}else return n instanceof q?new q({...n._def,type:M(n.element)}):n instanceof I?I.create(M(n.unwrap())):n instanceof V?V.create(M(n.unwrap())):n instanceof R?R.create(n.items.map(e=>M(e))):n}let T=class S extends v{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},this._cached}_parse(e){if(this._getType(e)!==l.object){const c=this._getOrReturnCtx(e);return u(c,{code:d.invalid_type,expected:l.object,received:c.parsedType}),y}const{status:t,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),r=[];if(!(this._def.catchall instanceof E&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||r.push(c);const o=[];for(const c of i){const h=a[c],g=s.data[c];o.push({key:{status:"valid",value:c},value:h._parse(new $(s,g,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof E){const c=this._def.unknownKeys;if(c==="passthrough")for(const h of r)o.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(c==="strict")r.length>0&&(u(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 h of r){const g=s.data[h];o.push({key:{status:"valid",value:h},value:c._parse(new $(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const h of o){const g=await h.key,w=await h.value;c.push({key:g,value:w,alwaysSet:h.alwaysSet})}return c}).then(c=>N.mergeObjectSync(t,c)):N.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new S({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var a,i;const r=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:p.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend(e){return new S({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new S({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 S({...this._def,catchall:e})}pick(e){const t={};for(const s of b.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new S({...this._def,shape:()=>t})}omit(e){const t={};for(const s of b.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new S({...this._def,shape:()=>t})}deepPartial(){return M(this)}partial(e){const t={};for(const s of b.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new S({...this._def,shape:()=>t})}required(e){const t={};for(const s of b.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof I;)a=a._def.innerType;t[s]=a}return new S({...this._def,shape:()=>t})}keyof(){return Me(b.objectKeys(this.shape))}};T.create=(n,e)=>new T({shape:()=>n,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,..._(e)});T.strictCreate=(n,e)=>new T({shape:()=>n,unknownKeys:"strict",catchall:E.create(),typeName:m.ZodObject,..._(e)});T.lazycreate=(n,e)=>new T({shape:n,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,..._(e)});let Q=class extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function a(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 u(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(a);{let i;const r=[];for(const c of s){const h={...t,common:{...t.common,issues:[]},parent:null},g=c._parseSync({data:t.data,path:t.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!i&&(i={result:g,ctx:h}),h.common.issues.length&&r.push(h.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=r.map(c=>new C(c));return u(t,{code:d.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}};Q.create=(n,e)=>new Q({options:n,typeName:m.ZodUnion,..._(e)});function de(n,e){const t=O(n),s=O(e);if(n===e)return{valid:!0,data:n};if(t===l.object&&s===l.object){const a=b.objectKeys(e),i=b.objectKeys(n).filter(o=>a.indexOf(o)!==-1),r={...n,...e};for(const o of i){const c=de(n[o],e[o]);if(!c.valid)return{valid:!1};r[o]=c.data}return{valid:!0,data:r}}else if(t===l.array&&s===l.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<n.length;i++){const r=n[i],o=e[i],c=de(r,o);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return t===l.date&&s===l.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}let ee=class extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(i,r)=>{if(ve(i)||ve(r))return y;const o=de(i.value,r.value);return o.valid?((be(i)||be(r))&&t.dirty(),{status:t.value,value:o.data}):(u(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])=>a(i,r)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};ee.create=(n,e,t)=>new ee({left:n,right:e,typeName:m.ZodIntersection,..._(t)});class R extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==l.array)return u(s,{code:d.invalid_type,expected:l.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return u(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&&(u(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,r)=>{const o=this._def.items[r]||this._def.rest;return o?o._parse(new $(s,i,s.path,r)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>N.mergeArray(t,i)):N.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:n,typeName:m.ZodTuple,rest:null,..._(e)})};class Ae extends v{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!==l.map)return u(s,{code:d.invalid_type,expected:l.map,received:s.parsedType}),y;const a=this._def.keyType,i=this._def.valueType,r=[...s.data.entries()].map(([o,c],h)=>({key:a._parse(new $(s,o,s.path,[h,"key"])),value:i._parse(new $(s,c,s.path,[h,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of r){const h=await c.key,g=await c.value;if(h.status==="aborted"||g.status==="aborted")return y;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(h.value,g.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of r){const h=c.key,g=c.value;if(h.status==="aborted"||g.status==="aborted")return y;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(h.value,g.value)}return{status:t.value,value:o}}}}Ae.create=(n,e,t)=>new Ae({valueType:e,keyType:n,typeName:m.ZodMap,..._(t)});class W extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==l.set)return u(s,{code:d.invalid_type,expected:l.set,received:s.parsedType}),y;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(u(s,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(u(s,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const i=this._def.valueType;function r(c){const h=new Set;for(const g of c){if(g.status==="aborted")return y;g.status==="dirty"&&t.dirty(),h.add(g.value)}return{status:t.value,value:h}}const o=[...s.data.values()].map((c,h)=>i._parse(new $(s,c,s.path,h)));return s.common.async?Promise.all(o).then(c=>r(c)):r(o)}min(e,t){return new W({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new W({...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)}}W.create=(n,e)=>new W({valueType:n,minSize:null,maxSize:null,typeName:m.ZodSet,..._(e)});class Ie extends v{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})}}Ie.create=(n,e)=>new Ie({getter:n,typeName:m.ZodLazy,..._(e)});let ue=class extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return u(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}};ue.create=(n,e)=>new ue({value:n,typeName:m.ZodLiteral,..._(e)});function Me(n,e){return new me({values:n,typeName:m.ZodEnum,..._(e)})}let me=class le extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{expected:b.joinValues(s),received:t.parsedType,code:d.invalid_type}),y}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{received:t.data,code:d.invalid_enum_value,options:s}),y}return x(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 le.create(e,{...this._def,...t})}exclude(e,t=this._def){return le.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};me.create=Me;class $e extends v{_parse(e){const t=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==l.string&&s.parsedType!==l.number){const a=b.objectValues(t);return u(s,{expected:b.joinValues(a),received:s.parsedType,code:d.invalid_type}),y}if(this._cache||(this._cache=new Set(b.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=b.objectValues(t);return u(s,{received:s.data,code:d.invalid_enum_value,options:a}),y}return x(e.data)}get enum(){return this._def.values}}$e.create=(n,e)=>new $e({values:n,typeName:m.ZodNativeEnum,..._(e)});let te=class extends v{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return u(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),y;const s=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return x(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}};te.create=(n,e)=>new te({type:n,typeName:m.ZodPromise,..._(e)});let D=class extends v{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),a=this._def.effect||null,i={addIssue:r=>{u(s,r),r.fatal?t.abort():t.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const r=a.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"?ie(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"?ie(o.value):o}}if(a.type==="refinement"){const r=o=>{const c=a.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(a.type==="transform")if(s.common.async===!1){const r=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!L(r))return y;const o=a.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=>L(r)?Promise.resolve(a.transform(r.value,i)).then(o=>({status:t.value,value:o})):y);b.assertNever(a)}};D.create=(n,e,t)=>new D({schema:n,typeName:m.ZodEffects,effect:e,..._(t)});D.createWithPreprocess=(n,e,t)=>new D({schema:e,effect:{type:"preprocess",transform:n},typeName:m.ZodEffects,..._(t)});let I=class extends v{_parse(e){return this._getType(e)===l.undefined?x(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};I.create=(n,e)=>new I({innerType:n,typeName:m.ZodOptional,..._(e)});let V=class extends v{_parse(e){return this._getType(e)===l.null?x(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V.create=(n,e)=>new V({innerType:n,typeName:m.ZodNullable,..._(e)});class he extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===l.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}he.create=(n,e)=>new he({innerType:n,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class pe extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return X(a)?a.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:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}pe.create=(n,e)=>new pe({innerType:n,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class Ee extends v{_parse(e){if(this._getType(e)!==l.nan){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}}Ee.create=n=>new Ee({typeName:m.ZodNaN,..._(n)});class bt extends v{_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 ge extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),ie(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new ge({in:e,out:t,typeName:m.ZodPipeline})}}class fe extends v{_parse(e){const t=this._def.innerType._parse(e),s=a=>(L(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}fe.create=(n,e)=>new fe({innerType:n,typeName:m.ZodReadonly,..._(e)});var m;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(m||(m={}));const wt=A.create,kt=ce.create;E.create;q.create;const xt=T.create;Q.create;ee.create;R.create;const St=ue.create;me.create;te.create;I.create;V.create;const Nt="1.8.1",Ct={version:Nt};class Le{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 qe{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})}bind(e,t){if(this._client._messageInterceptors.has(e))throw new Error(`Interceptor already bound for message ${e}`);this._client._messageInterceptors.set(e,t)}}class De{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}}class Ve{constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}async subscribeColorScheme(e){return(await this._client.subscribe("environment.subscribeColorScheme",{},e)).success}async unsubscribeColorScheme(e){return(await this._client.unsubscribe("environment.unsubscribeColorScheme",{},e)).success}}class ze{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 Be{constructor(e){this._client=e}async fetch(e,t){var s;let a;typeof e=="string"?a=e:e instanceof URL?a=e.toString():(a=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 i={};t!=null&&t.headers&&(t.headers instanceof Headers?t.headers.forEach((g,w)=>{i[w]=g}):Array.isArray(t.headers)?t.headers.forEach(([g,w])=>{i[g]=w}):i=t.headers);const r=await this._client.request("proxy.fetch",{url:a,method:(t==null?void 0:t.method)||"GET",headers:i,body:(s=t==null?void 0:t.body)!==null&&s!==void 0?s:null});if(!r.success)throw new TypeError(r.errorMessage,{cause:r.errorCause?Error(r.errorCause):void 0});const o=new Headers(r.headers),c={status:r.status,statusText:r.statusText,headers:o};let h=null;if(r.body!==null&&r.body!==void 0)if(r.bodyType==="binary"){const g=atob(r.body),w=new Uint8Array(g.length);for(let Z=0;Z<g.length;Z++)w[Z]=g.charCodeAt(Z);h=w}else r.bodyType==="text"?h=r.body:r.bodyType==="json"&&(h=JSON.stringify(r.body));return new Response(h,c)}}class Ue{constructor(e){this._client=e}get application(){return new B("application","",this._client)}get instance(){return new B("instance",this._client.applicationInstance,this._client)}get device(){return new B("device",this._client.applicationInstance,this._client)}shared(e){return new B("shared",e,this._client)}}class B{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 He{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 Ke{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}}class We{constructor(e){this._client=e}async getSymbols(){const e=await this._client.request("currency.getSymbols",{});if(!e.success||!e.symbols)throw new Error("Failed to fetch currency symbols");return e.symbols}async getRates(e){var t,s,a;const i=await this._client.request("currency.getRates",e);if(!i.success||!i.rates)throw((t=i.error)===null||t===void 0?void 0:t.code)===201?new Error(`Invalid base currency '${e.base}'`):((s=i.error)===null||s===void 0?void 0:s.code)===202?new Error(`Invalid target currency symbol '${e.symbols}'`):new Error(((a=i.error)===null||a===void 0?void 0:a.message)||"Failed to fetch currency rates");return i.rates}}function J(n){return{...n,type:"client"}}const Tt=xt({type:St("bridge"),name:wt(),data:kt()});class Zt{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){var t;const s=this._store.shared("root-settings-navigation"),a=(t=await s.get("navigation"))!==null&&t!==void 0?t:{},i=this._store._client._applicationSpecifier;a[i]={applicationSpecifier:i,entries:e.entries},s.set("navigation",a)}async getRootSettingsNavigation(){var e;const t=(e=await this._store.shared("root-settings-navigation").get("navigation"))!==null&&e!==void 0?e:{},s=this._store._client._applicationSpecifier;return t[s]}async getAllRootSettingsNavigation(){var e;return(e=await this._store.shared("root-settings-navigation").get("navigation"))!==null&&e!==void 0?e:{}}}const F=1e3*30,ye=typeof window>"u"&&typeof self<"u",U=ye?self:window;function z(n){ye?self.postMessage(n):U.parent.postMessage(n,"*")}class Ot{constructor(e){this._applicationName=e,this._applicationInstance="",this._applicationSpecifier="",this._messageInterceptors=new Map,this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new Le(this)}get users(){return new He(this)}get store(){return new Ue(this)}get applications(){return new qe(this)}get media(){return new ze(this)}get proxy(){return new Be(this)}get devices(){return new De(this)}get rootSettingsNavigation(){return new Zt(this.store)}get weather(){return new Ke(this)}get currency(){return new We(this)}get environment(){return new Ve(this)}get applicationName(){return this._applicationName}get applicationSpecifier(){return this._applicationSpecifier}get applicationInstance(){return this._applicationInstance}bind(){var e,t,s;const a=new URL(U.location.href),i=a.searchParams;if(this._applicationInstance=(e=i.get("applicationInstance"))!==null&&e!==void 0?e:"",!this._applicationInstance)throw new Error("Missing applicationInstance query parameter");if(this._applicationSpecifier=(t=i.get("applicationSpecifier"))!==null&&t!==void 0?t:"",!this._applicationSpecifier){const r=a.hostname.split(".");this._applicationSpecifier=(s=r[0])!==null&&s!==void 0?s:""}if(!this._applicationSpecifier||this._applicationSpecifier.length!==40)throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);this._windowMessageHandler=r=>{if(r.source===U||!r.data||typeof r.data!="object"||!("type"in r.data)||r.data.type!=="client"&&r.data.type!=="bridge")return;let o;if(r.data.type==="client"){const c=this._messageInterceptors.get(r.data.name);if(!c){z(r.data);return}o={...c(r.data.data),type:"bridge"}}if(!o){const c=Tt.safeParse(r.data);if(!c.success)return;o=c.data;const h=this._onHandlers.get(o.name),g=this._onceHandlers.get(o.name);if(h)for(const w of h)w(o.data);if(g){for(const w of g)w(o.data);this._onceHandlers.delete(o.name)}}if(!ye)for(let c=0;c<window.frames.length;c+=1)window.frames[c].postMessage(o,"*")},U.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&U.removeEventListener("message",this._windowMessageHandler)}send(e,t){const s=J({telemetrySdkVersion:H,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t});z(s)}request(e,t){const s=G(),a=J({telemetrySdkVersion:H,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t,responseName:s});z(a);let i=!1,r;const o=new Promise((h,g)=>{const w=new Error(`${e} message request with response name of ${s} timed out after ${F}`);setTimeout(()=>{i=!0,this.off(s,r),g(w)},F)}),c=new Promise(h=>{r=g=>{i||h(g)},this.once(s,h)});return Promise.race([o,c])}async subscribe(e,t,s){let a,i;typeof t=="function"?i=t:(a=t,i=s);const r=G(),o=G();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 h=J({telemetrySdkVersion:H,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:a,responseName:o,subscriptionName:r});z(h);let g=!1,w;const Z=new Promise((j,P)=>{const ae=new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${F}`);setTimeout(()=>{g=!0,this.off(o,w),P(ae)},F)}),se=new Promise(j=>{w=P=>{g||j(P)},this.on(o,j)});return Promise.race([Z,se])}async unsubscribe(e,t,s){let a,i;typeof t=="function"?i=t:(a=t,i=s);const r=G();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 h=J({telemetrySdkVersion:H,applicationInstance:this._applicationInstance,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,name:e,data:a,responseName:r,unsubscribeName:c});z(h);let g=!1,w;const Z=new Promise((j,P)=>{const ae=new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${F}`);setTimeout(()=>{g=!0,this.off(r,w),P(ae)},F)}),se=new Promise(j=>{w=P=>{g||j(P)},this.once(r,j)});if(!(await Promise.race([Z,se])).success)return{success:!1}}return{success:!0}}on(e,t){var s;const a=(s=this._onHandlers.get(e))!==null&&s!==void 0?s:[];a.length===0&&this._onHandlers.set(e,a),a.push(t)}once(e,t){var s;const a=(s=this._onceHandlers.get(e))!==null&&s!==void 0?s:[];a.length===0&&this._onceHandlers.set(e,a),a.push(t)}off(e,t){const s=this._onHandlers.get(e),a=this._onceHandlers.get(e);if(!(!s&&!a)){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(a){for(let i=0;i<a.length;i+=1)t&&a[i]!==t||(a.splice(i,1),i-=1);a.length===0&&this._onceHandlers.delete(e)}}}}function G(){return Math.random().toString(36).slice(2,9)}const H=Ct.version;class At{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 It{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 $t extends Ot{get playlist(){return new It(this)}get overrides(){return new At(this)}}let f=null;function Et(){return f}function jt(n){f=new $t(n),f.bind()}function Pt(){f==null||f.unbind(),f=null}function Rt(...n){return k(f),f.on(...n)}function Ft(...n){return k(f),f.once(...n)}function Mt(...n){return k(f),f.off(...n)}function Lt(...n){return k(f),f.send(...n)}function qt(...n){return k(f),f.request(...n)}function Dt(...n){return k(f),f.subscribe(...n)}function Vt(...n){return k(f),f.unsubscribe(...n)}function zt(){return k(f),f.store}function Bt(){return k(f),f.applications}function Ut(){return k(f),f.media}function Ht(){return k(f),f.accounts}function Kt(){return k(f),f.users}function Wt(){return k(f),f.devices}function Jt(){return k(f),f.proxy}function Gt(){return k(f),f.weather}function Yt(){return k(f),f.currency}function Xt(){return k(f),f.environment}function Qt(){return k(f),f.playlist}function es(){return k(f),f.overrides}function k(n){if(!n)throw new Error("SDK is not configured")}exports.Accounts=Le;exports.Applications=qe;exports.Currency=We;exports.Devices=De;exports.Environment=Ve;exports.Media=ze;exports.Proxy=Be;exports.Store=Ue;exports.StoreSlice=B;exports.Users=He;exports.Weather=Ke;exports.accounts=Ht;exports.applications=Bt;exports.configure=jt;exports.currency=Yt;exports.destroy=Pt;exports.devices=Wt;exports.environment=Xt;exports.globalClient=Et;exports.media=Ut;exports.off=Mt;exports.on=Rt;exports.once=Ft;exports.overrides=es;exports.playlist=Qt;exports.proxy=Jt;exports.request=qt;exports.send=Lt;exports.store=zt;exports.subscribe=Dt;exports.telemetrySdkVersion=H;exports.unsubscribe=Vt;exports.users=Kt;exports.weather=Gt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var b;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{const i={};for(const r of a)i[r]=r;return i},n.getValidEnumValues=a=>{const i=n.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),r={};for(const o of i)r[o]=a[o];return n.objectValues(r)},n.objectValues=a=>n.objectKeys(a).map(function(i){return a[i]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const r in a)Object.prototype.hasOwnProperty.call(a,r)&&i.push(r);return i},n.find=(a,i)=>{for(const r of a)if(i(r))return r},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,i=" | "){return a.map(r=>typeof r=="string"?`'${r}'`:r).join(i)}n.joinValues=s,n.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(b||(b={}));var _e;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(_e||(_e={}));const l=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),O=n=>{switch(typeof n){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(n)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(n)?l.array:n===null?l.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?l.promise:typeof Map<"u"&&n instanceof Map?l.map:typeof Set<"u"&&n instanceof Set?l.set:typeof Date<"u"&&n instanceof Date?l.date:l.object;default:return l.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"]);class C 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:[]},a=i=>{for(const r of i.issues)if(r.code==="invalid_union")r.unionErrors.map(a);else if(r.code==="invalid_return_type")a(r.returnTypeError);else if(r.code==="invalid_arguments")a(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 h=r.path[c];c===r.path.length-1?(o[h]=o[h]||{_errors:[]},o[h]._errors.push(t(r))):o[h]=o[h]||{_errors:[]},o=o[h],c++}}};return a(this),s}static assert(e){if(!(e instanceof C))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 a of this.issues)if(a.path.length>0){const i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=n=>new C(n);const re=(n,e)=>{let t;switch(n.code){case d.invalid_type:n.received===l.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,b.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${b.joinValues(n.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${b.joinValues(n.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${b.joinValues(n.options)}, received '${n.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 n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:b.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case d.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case d.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.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 ${n.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,b.assertNever(n)}return{message:t}};let Je=re;function Ge(){return Je}const Ye=n=>{const{data:e,path:t,errorMaps:s,issueData:a}=n,i=[...t,...a.path||[]],r={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let o="";const c=s.filter(h=>!!h).slice().reverse();for(const h of c)o=h(r,{data:e,defaultError:o}).message;return{...a,path:i,message:o}};function u(n,e){const t=Ge(),s=Ye({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===re?void 0:re].filter(a=>!!a)});n.common.issues.push(s)}let N=class je{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 a of t){if(a.status==="aborted")return y;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const i=await a.key,r=await a.value;s.push({key:i,value:r})}return je.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const a of t){const{key:i,value:r}=a;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"||a.alwaysSet)&&(s[i.value]=r.value)}return{status:e.value,value:s}}};const y=Object.freeze({status:"aborted"}),ie=n=>({status:"dirty",value:n}),x=n=>({status:"valid",value:n}),ve=n=>n.status==="aborted",be=n=>n.status==="dirty",L=n=>n.status==="valid",X=n=>typeof Promise<"u"&&n instanceof Promise;var p;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(p||(p={}));let $=class{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const we=(n,e)=>{if(L(e))return{success:!0,data:e.value};if(!n.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(n.common.issues);return this._error=t,this._error}}};function _(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=n;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:a}:{errorMap:(i,r)=>{const{message:o}=n;return i.code==="invalid_enum_value"?{message:o??r.defaultError}:typeof r.data>"u"?{message:o??s??r.defaultError}:i.code!=="invalid_type"?{message:r.defaultError}:{message:o??t??r.defaultError}},description:a}}let v=class{get description(){return this._def.description}_getType(e){return O(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new N,ctx:{common:e.parent.common,data:e.data,parsedType:O(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(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){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)},a=this._parseSync({data:e,path:s.path,parent:s});return we(s,a)}"~validate"(e){var t,s;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:O(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:a});return L(i)?{value:i.value}:{issues:a.common.issues}}catch(i){(s=(t=i==null?void 0:i.message)==null?void 0:t.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:a}).then(i=>L(i)?{value:i.value}:{issues:a.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:O(e)},a=this._parse({data:e,path:s.path,parent:s}),i=await(X(a)?a:Promise.resolve(a));return we(s,i)}refine(e,t){const s=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{const r=e(a),o=()=>i.addIssue({code:d.custom,...s(a)});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,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,a):t),!1))}_refinement(e){return new D({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 I.create(this,this._def)}nullable(){return V.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return q.create(this)}promise(){return te.create(this,this._def)}or(e){return Q.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new D({..._(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new he({..._(this._def),innerType:this,defaultValue:t,typeName:m.ZodDefault})}brand(){return new bt({typeName:m.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new pe({..._(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 ge.create(this,e)}readonly(){return fe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const Xe=/^c[^\s-]{8,}$/i,Qe=/^[0-9a-z]+$/,et=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tt=/^[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,st=/^[a-z0-9_-]{21}$/i,at=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,nt=/^[-+]?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)?)??$/,rt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,it="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ne;const ot=/^(?:(?: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])$/,ct=/^(?:(?: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])$/,dt=/^(([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]))$/,ut=/^(([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])$/,lt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ht=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\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])))",pt=new RegExp(`^${Pe}$`);function Re(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ft(n){return new RegExp(`^${Re(n)}$`)}function mt(n){let e=`${Pe}T${Re(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function gt(n,e){return!!((e==="v4"||!e)&&ot.test(n)||(e==="v6"||!e)&&dt.test(n))}function yt(n,e){if(!at.test(n))return!1;try{const[t]=n.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function _t(n,e){return!!((e==="v4"||!e)&&ct.test(n)||(e==="v6"||!e)&&ut.test(n))}class A extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:l.string,received:a.parsedType}),y}const t=new N;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),t.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,r=e.data.length<a.value;(i||r)&&(s=this._getOrReturnCtx(e,s),i?u(s,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):r&&u(s,{code:d.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),t.dirty())}else if(a.kind==="email")rt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"email",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="emoji")ne||(ne=new RegExp(it,"u")),ne.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"emoji",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="uuid")tt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"uuid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="nanoid")st.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"nanoid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="cuid")Xe.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="cuid2")Qe.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cuid2",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="ulid")et.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ulid",code:d.invalid_string,message:a.message}),t.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),u(s,{validation:"url",code:d.invalid_string,message:a.message}),t.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"regex",code:d.invalid_string,message:a.message}),t.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),t.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{startsWith:a.value},message:a.message}),t.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:{endsWith:a.value},message:a.message}),t.dirty()):a.kind==="datetime"?mt(a).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"datetime",message:a.message}),t.dirty()):a.kind==="date"?pt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"date",message:a.message}),t.dirty()):a.kind==="time"?ft(a).test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{code:d.invalid_string,validation:"time",message:a.message}),t.dirty()):a.kind==="duration"?nt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"duration",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="ip"?gt(e.data,a.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"ip",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="jwt"?yt(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"jwt",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="cidr"?_t(e.data,a.version)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"cidr",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="base64"?lt.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64",code:d.invalid_string,message:a.message}),t.dirty()):a.kind==="base64url"?ht.test(e.data)||(s=this._getOrReturnCtx(e,s),u(s,{validation:"base64url",code:d.invalid_string,message:a.message}),t.dirty()):b.assertNever(a);return{status:t.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:d.invalid_string,...p.errToObj(s)})}_addCheck(e){return new A({...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){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:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!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 A({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new A({...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}}A.create=n=>new A({checks:[],typeName:m.ZodString,coerce:(n==null?void 0:n.coerce)??!1,..._(n)});function vt(n,e){const t=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,i=Number.parseInt(n.toFixed(a).replace(".","")),r=Number.parseInt(e.toFixed(a).replace(".",""));return i%r/10**a}let ke=class oe extends v{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)!==l.number){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:l.number,received:a.parsedType}),y}let t;const s=new N;for(const a of this._def.checks)a.kind==="int"?b.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),u(t,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?vt(e.data,a.value)!==0&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),u(t,{code:d.not_finite,message:a.message}),s.dirty()):b.assertNever(a);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,a){return new oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(a)}]})}_addCheck(e){return new oe({...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)}};ke.create=n=>new ke({checks:[],typeName:m.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,..._(n)});class K extends v{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)!==l.bigint)return this._getInvalidInput(e);let t;const s=new N;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),u(t,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):b.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.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,a){return new K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:p.toString(a)}]})}_addCheck(e){return new K({...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}}K.create=n=>new K({checks:[],typeName:m.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,..._(n)});class xe extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.boolean,received:t.parsedType}),y}return x(e.data)}}xe.create=n=>new xe({typeName:m.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,..._(n)});let Se=class Fe extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_type,expected:l.date,received:a.parsedType}),y}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return u(a,{code:d.invalid_date}),y}const t=new N;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),t.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),u(s,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),t.dirty()):b.assertNever(a);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Fe({...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=n=>new Se({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:m.ZodDate,..._(n)});class Ne extends v{_parse(e){if(this._getType(e)!==l.symbol){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.symbol,received:t.parsedType}),y}return x(e.data)}}Ne.create=n=>new Ne({typeName:m.ZodSymbol,..._(n)});class Ce extends v{_parse(e){if(this._getType(e)!==l.undefined){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.undefined,received:t.parsedType}),y}return x(e.data)}}Ce.create=n=>new Ce({typeName:m.ZodUndefined,..._(n)});class Te extends v{_parse(e){if(this._getType(e)!==l.null){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.null,received:t.parsedType}),y}return x(e.data)}}Te.create=n=>new Te({typeName:m.ZodNull,..._(n)});class ce extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return x(e.data)}}ce.create=n=>new ce({typeName:m.ZodAny,..._(n)});class Ze extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return x(e.data)}}Ze.create=n=>new Ze({typeName:m.ZodUnknown,..._(n)});let E=class extends v{_parse(e){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.never,received:t.parsedType}),y}};E.create=n=>new E({typeName:m.ZodNever,..._(n)});class Oe extends v{_parse(e){if(this._getType(e)!==l.undefined){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.void,received:t.parsedType}),y}return x(e.data)}}Oe.create=n=>new Oe({typeName:m.ZodVoid,..._(n)});let q=class Y extends v{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==l.array)return u(t,{code:d.invalid_type,expected:l.array,received:t.parsedType}),y;if(a.exactLength!==null){const r=t.data.length>a.exactLength.value,o=t.data.length<a.exactLength.value;(r||o)&&(u(t,{code:r?d.too_big:d.too_small,minimum:o?a.exactLength.value:void 0,maximum:r?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(u(t,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(u(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((r,o)=>a.type._parseAsync(new $(t,r,t.path,o)))).then(r=>N.mergeArray(s,r));const i=[...t.data].map((r,o)=>a.type._parseSync(new $(t,r,t.path,o)));return N.mergeArray(s,i)}get element(){return this._def.type}min(e,t){return new Y({...this._def,minLength:{value:e,message:p.toString(t)}})}max(e,t){return new Y({...this._def,maxLength:{value:e,message:p.toString(t)}})}length(e,t){return new Y({...this._def,exactLength:{value:e,message:p.toString(t)}})}nonempty(e){return this.min(1,e)}};q.create=(n,e)=>new q({type:n,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,..._(e)});function M(n){if(n instanceof T){const e={};for(const t in n.shape){const s=n.shape[t];e[t]=I.create(M(s))}return new T({...n._def,shape:()=>e})}else return n instanceof q?new q({...n._def,type:M(n.element)}):n instanceof I?I.create(M(n.unwrap())):n instanceof V?V.create(M(n.unwrap())):n instanceof R?R.create(n.items.map(e=>M(e))):n}let T=class S extends v{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},this._cached}_parse(e){if(this._getType(e)!==l.object){const c=this._getOrReturnCtx(e);return u(c,{code:d.invalid_type,expected:l.object,received:c.parsedType}),y}const{status:t,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),r=[];if(!(this._def.catchall instanceof E&&this._def.unknownKeys==="strip"))for(const c in s.data)i.includes(c)||r.push(c);const o=[];for(const c of i){const h=a[c],g=s.data[c];o.push({key:{status:"valid",value:c},value:h._parse(new $(s,g,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof E){const c=this._def.unknownKeys;if(c==="passthrough")for(const h of r)o.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(c==="strict")r.length>0&&(u(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 h of r){const g=s.data[h];o.push({key:{status:"valid",value:h},value:c._parse(new $(s,g,s.path,h)),alwaysSet:h in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const h of o){const g=await h.key,w=await h.value;c.push({key:g,value:w,alwaysSet:h.alwaysSet})}return c}).then(c=>N.mergeObjectSync(t,c)):N.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return p.errToObj,new S({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var a,i;const r=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:p.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new S({...this._def,unknownKeys:"strip"})}passthrough(){return new S({...this._def,unknownKeys:"passthrough"})}extend(e){return new S({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new S({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 S({...this._def,catchall:e})}pick(e){const t={};for(const s of b.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new S({...this._def,shape:()=>t})}omit(e){const t={};for(const s of b.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new S({...this._def,shape:()=>t})}deepPartial(){return M(this)}partial(e){const t={};for(const s of b.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new S({...this._def,shape:()=>t})}required(e){const t={};for(const s of b.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof I;)a=a._def.innerType;t[s]=a}return new S({...this._def,shape:()=>t})}keyof(){return Me(b.objectKeys(this.shape))}};T.create=(n,e)=>new T({shape:()=>n,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,..._(e)});T.strictCreate=(n,e)=>new T({shape:()=>n,unknownKeys:"strict",catchall:E.create(),typeName:m.ZodObject,..._(e)});T.lazycreate=(n,e)=>new T({shape:n,unknownKeys:"strip",catchall:E.create(),typeName:m.ZodObject,..._(e)});let Q=class extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function a(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 u(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(a);{let i;const r=[];for(const c of s){const h={...t,common:{...t.common,issues:[]},parent:null},g=c._parseSync({data:t.data,path:t.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!i&&(i={result:g,ctx:h}),h.common.issues.length&&r.push(h.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=r.map(c=>new C(c));return u(t,{code:d.invalid_union,unionErrors:o}),y}}get options(){return this._def.options}};Q.create=(n,e)=>new Q({options:n,typeName:m.ZodUnion,..._(e)});function de(n,e){const t=O(n),s=O(e);if(n===e)return{valid:!0,data:n};if(t===l.object&&s===l.object){const a=b.objectKeys(e),i=b.objectKeys(n).filter(o=>a.indexOf(o)!==-1),r={...n,...e};for(const o of i){const c=de(n[o],e[o]);if(!c.valid)return{valid:!1};r[o]=c.data}return{valid:!0,data:r}}else if(t===l.array&&s===l.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<n.length;i++){const r=n[i],o=e[i],c=de(r,o);if(!c.valid)return{valid:!1};a.push(c.data)}return{valid:!0,data:a}}else return t===l.date&&s===l.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}let ee=class extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(i,r)=>{if(ve(i)||ve(r))return y;const o=de(i.value,r.value);return o.valid?((be(i)||be(r))&&t.dirty(),{status:t.value,value:o.data}):(u(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])=>a(i,r)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};ee.create=(n,e,t)=>new ee({left:n,right:e,typeName:m.ZodIntersection,..._(t)});class R extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==l.array)return u(s,{code:d.invalid_type,expected:l.array,received:s.parsedType}),y;if(s.data.length<this._def.items.length)return u(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&&(u(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((i,r)=>{const o=this._def.items[r]||this._def.rest;return o?o._parse(new $(s,i,s.path,r)):null}).filter(i=>!!i);return s.common.async?Promise.all(a).then(i=>N.mergeArray(t,i)):N.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:n,typeName:m.ZodTuple,rest:null,..._(e)})};class Ae extends v{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!==l.map)return u(s,{code:d.invalid_type,expected:l.map,received:s.parsedType}),y;const a=this._def.keyType,i=this._def.valueType,r=[...s.data.entries()].map(([o,c],h)=>({key:a._parse(new $(s,o,s.path,[h,"key"])),value:i._parse(new $(s,c,s.path,[h,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of r){const h=await c.key,g=await c.value;if(h.status==="aborted"||g.status==="aborted")return y;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(h.value,g.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const c of r){const h=c.key,g=c.value;if(h.status==="aborted"||g.status==="aborted")return y;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),o.set(h.value,g.value)}return{status:t.value,value:o}}}}Ae.create=(n,e,t)=>new Ae({valueType:e,keyType:n,typeName:m.ZodMap,..._(t)});class W extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==l.set)return u(s,{code:d.invalid_type,expected:l.set,received:s.parsedType}),y;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(u(s,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(u(s,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const i=this._def.valueType;function r(c){const h=new Set;for(const g of c){if(g.status==="aborted")return y;g.status==="dirty"&&t.dirty(),h.add(g.value)}return{status:t.value,value:h}}const o=[...s.data.values()].map((c,h)=>i._parse(new $(s,c,s.path,h)));return s.common.async?Promise.all(o).then(c=>r(c)):r(o)}min(e,t){return new W({...this._def,minSize:{value:e,message:p.toString(t)}})}max(e,t){return new W({...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)}}W.create=(n,e)=>new W({valueType:n,minSize:null,maxSize:null,typeName:m.ZodSet,..._(e)});class Ie extends v{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})}}Ie.create=(n,e)=>new Ie({getter:n,typeName:m.ZodLazy,..._(e)});let ue=class extends v{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return u(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}};ue.create=(n,e)=>new ue({value:n,typeName:m.ZodLiteral,..._(e)});function Me(n,e){return new me({values:n,typeName:m.ZodEnum,..._(e)})}let me=class le extends v{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{expected:b.joinValues(s),received:t.parsedType,code:d.invalid_type}),y}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return u(t,{received:t.data,code:d.invalid_enum_value,options:s}),y}return x(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 le.create(e,{...this._def,...t})}exclude(e,t=this._def){return le.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}};me.create=Me;class $e extends v{_parse(e){const t=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==l.string&&s.parsedType!==l.number){const a=b.objectValues(t);return u(s,{expected:b.joinValues(a),received:s.parsedType,code:d.invalid_type}),y}if(this._cache||(this._cache=new Set(b.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=b.objectValues(t);return u(s,{received:s.data,code:d.invalid_enum_value,options:a}),y}return x(e.data)}get enum(){return this._def.values}}$e.create=(n,e)=>new $e({values:n,typeName:m.ZodNativeEnum,..._(e)});let te=class extends v{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==l.promise&&t.common.async===!1)return u(t,{code:d.invalid_type,expected:l.promise,received:t.parsedType}),y;const s=t.parsedType===l.promise?t.data:Promise.resolve(t.data);return x(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}};te.create=(n,e)=>new te({type:n,typeName:m.ZodPromise,..._(e)});let D=class extends v{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),a=this._def.effect||null,i={addIssue:r=>{u(s,r),r.fatal?t.abort():t.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const r=a.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"?ie(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"?ie(o.value):o}}if(a.type==="refinement"){const r=o=>{const c=a.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(a.type==="transform")if(s.common.async===!1){const r=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!L(r))return y;const o=a.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=>L(r)?Promise.resolve(a.transform(r.value,i)).then(o=>({status:t.value,value:o})):y);b.assertNever(a)}};D.create=(n,e,t)=>new D({schema:n,typeName:m.ZodEffects,effect:e,..._(t)});D.createWithPreprocess=(n,e,t)=>new D({schema:e,effect:{type:"preprocess",transform:n},typeName:m.ZodEffects,..._(t)});let I=class extends v{_parse(e){return this._getType(e)===l.undefined?x(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};I.create=(n,e)=>new I({innerType:n,typeName:m.ZodOptional,..._(e)});let V=class extends v{_parse(e){return this._getType(e)===l.null?x(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V.create=(n,e)=>new V({innerType:n,typeName:m.ZodNullable,..._(e)});class he extends v{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===l.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}he.create=(n,e)=>new he({innerType:n,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class pe extends v{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return X(a)?a.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:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}pe.create=(n,e)=>new pe({innerType:n,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class Ee extends v{_parse(e){if(this._getType(e)!==l.nan){const t=this._getOrReturnCtx(e);return u(t,{code:d.invalid_type,expected:l.nan,received:t.parsedType}),y}return{status:"valid",value:e.data}}}Ee.create=n=>new Ee({typeName:m.ZodNaN,..._(n)});class bt extends v{_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 ge extends v{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),ie(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?y:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new ge({in:e,out:t,typeName:m.ZodPipeline})}}class fe extends v{_parse(e){const t=this._def.innerType._parse(e),s=a=>(L(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}fe.create=(n,e)=>new fe({innerType:n,typeName:m.ZodReadonly,..._(e)});var m;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(m||(m={}));const wt=A.create,kt=ce.create;E.create;q.create;const xt=T.create;Q.create;ee.create;R.create;const St=ue.create;me.create;te.create;I.create;V.create;const Nt="1.8.3",Ct={version:Nt};class Le{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 qe{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})}bind(e,t){if(this._client._messageInterceptors.has(e))throw new Error(`Interceptor already bound for message ${e}`);this._client._messageInterceptors.set(e,t)}}class De{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}}class Ve{constructor(e){this._client=e}async getColorScheme(){return(await this._client.request("environment.getColorScheme",{})).colorScheme}async subscribeColorScheme(e){return(await this._client.subscribe("environment.subscribeColorScheme",{},e)).success}async unsubscribeColorScheme(e){return(await this._client.unsubscribe("environment.unsubscribeColorScheme",{},e)).success}}class ze{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 Be{constructor(e){this._client=e}async fetch(e,t){var s;let a;typeof e=="string"?a=e:e instanceof URL?a=e.toString():(a=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 i={};t!=null&&t.headers&&(t.headers instanceof Headers?t.headers.forEach((g,w)=>{i[w]=g}):Array.isArray(t.headers)?t.headers.forEach(([g,w])=>{i[g]=w}):i=t.headers);const r=await this._client.request("proxy.fetch",{url:a,method:(t==null?void 0:t.method)||"GET",headers:i,body:(s=t==null?void 0:t.body)!==null&&s!==void 0?s:null});if(!r.success)throw new TypeError(r.errorMessage,{cause:r.errorCause?Error(r.errorCause):void 0});const o=new Headers(r.headers),c={status:r.status,statusText:r.statusText,headers:o};let h=null;if(r.body!==null&&r.body!==void 0)if(r.bodyType==="binary"){const g=atob(r.body),w=new Uint8Array(g.length);for(let Z=0;Z<g.length;Z++)w[Z]=g.charCodeAt(Z);h=w}else r.bodyType==="text"?h=r.body:r.bodyType==="json"&&(h=JSON.stringify(r.body));return new Response(h,c)}}class Ue{constructor(e){this._client=e}get application(){return new B("application","",this._client)}get instance(){return new B("instance",this._client.applicationInstance,this._client)}get device(){return new B("device",this._client.applicationInstance,this._client)}shared(e){return new B("shared",e,this._client)}}class B{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 He{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 Ke{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}}class We{constructor(e){this._client=e}async getSymbols(){const e=await this._client.request("currency.getSymbols",{});if(!e.success||!e.symbols)throw new Error("Failed to fetch currency symbols");return e.symbols}async getRates(e){var t,s,a;const i=await this._client.request("currency.getRates",e);if(!i.success||!i.rates)throw((t=i.error)===null||t===void 0?void 0:t.code)===201?new Error(`Invalid base currency '${e.base}'`):((s=i.error)===null||s===void 0?void 0:s.code)===202?new Error(`Invalid target currency symbol '${e.symbols}'`):new Error(((a=i.error)===null||a===void 0?void 0:a.message)||"Failed to fetch currency rates");return i.rates}}function J(n){return{...n,type:"client"}}const Tt=xt({type:St("bridge"),name:wt(),data:kt()});class Zt{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){var t;const s=this._store.shared("root-settings-navigation"),a=(t=await s.get("navigation"))!==null&&t!==void 0?t:{},i=this._store._client._applicationSpecifier;a[i]={applicationSpecifier:i,entries:e.entries},s.set("navigation",a)}async getRootSettingsNavigation(){var e;const t=(e=await this._store.shared("root-settings-navigation").get("navigation"))!==null&&e!==void 0?e:{},s=this._store._client._applicationSpecifier;return t[s]}async getAllRootSettingsNavigation(){var e;return(e=await this._store.shared("root-settings-navigation").get("navigation"))!==null&&e!==void 0?e:{}}}const F=1e3*30,ye=typeof window>"u"&&typeof self<"u",U=ye?self:window;function z(n){ye?self.postMessage(n):U.parent.postMessage(n,"*")}class Ot{constructor(e){this._applicationName=e,this._applicationInstance="",this._applicationSpecifier="",this._messageInterceptors=new Map,this._onHandlers=new Map,this._onceHandlers=new Map,this._subscriptionNamesByHandler=new Map,this._subscriptionNamesBySubjectName=new Map}get accounts(){return new Le(this)}get users(){return new He(this)}get store(){return new Ue(this)}get applications(){return new qe(this)}get media(){return new ze(this)}get proxy(){return new Be(this)}get devices(){return new De(this)}get rootSettingsNavigation(){return new Zt(this.store)}get weather(){return new Ke(this)}get currency(){return new We(this)}get environment(){return new Ve(this)}get applicationName(){return this._applicationName}get applicationSpecifier(){return this._applicationSpecifier}get applicationInstance(){return this._applicationInstance}bind(){var e,t,s;const a=new URL(U.location.href),i=a.searchParams;if(this._applicationInstance=(e=i.get("applicationInstance"))!==null&&e!==void 0?e:"",!this._applicationInstance)throw new Error("Missing applicationInstance query parameter");if(this._applicationSpecifier=(t=i.get("applicationSpecifier"))!==null&&t!==void 0?t:"",!this._applicationSpecifier){const r=a.hostname.split(".");this._applicationSpecifier=(s=r[0])!==null&&s!==void 0?s:""}if(!this._applicationSpecifier||this._applicationSpecifier.length!==40)throw new Error(`Invalid applicationSpecifier: expected 40-character hash, got "${this._applicationSpecifier}"`);this._windowMessageHandler=r=>{if(r.source===U||!r.data||typeof r.data!="object"||!("type"in r.data)||r.data.type!=="client"&&r.data.type!=="bridge")return;let o;if(r.data.type==="client"){const c=this._messageInterceptors.get(r.data.name);if(!c){z(r.data);return}o={...c(r.data.data),type:"bridge"}}if(!o){const c=Tt.safeParse(r.data);if(!c.success)return;o=c.data;const h=this._onHandlers.get(o.name),g=this._onceHandlers.get(o.name);if(h)for(const w of h)w(o.data);if(g){for(const w of g)w(o.data);this._onceHandlers.delete(o.name)}}if(!ye)for(let c=0;c<window.frames.length;c+=1)window.frames[c].postMessage(o,"*")},U.addEventListener("message",this._windowMessageHandler)}unbind(){this._windowMessageHandler&&U.removeEventListener("message",this._windowMessageHandler)}send(e,t){const s=J({telemetrySdkVersion:H,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t});z(s)}request(e,t){const s=G(),a=J({telemetrySdkVersion:H,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:t,responseName:s});z(a);let i=!1,r;const o=new Promise((h,g)=>{const w=new Error(`${e} message request with response name of ${s} timed out after ${F}`);setTimeout(()=>{i=!0,this.off(s,r),g(w)},F)}),c=new Promise(h=>{r=g=>{i||h(g)},this.once(s,h)});return Promise.race([o,c])}async subscribe(e,t,s){let a,i;typeof t=="function"?i=t:(a=t,i=s);const r=G(),o=G();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 h=J({telemetrySdkVersion:H,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,applicationInstance:this._applicationInstance,name:e,data:a,responseName:o,subscriptionName:r});z(h);let g=!1,w;const Z=new Promise((j,P)=>{const ae=new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${F}`);setTimeout(()=>{g=!0,this.off(o,w),P(ae)},F)}),se=new Promise(j=>{w=P=>{g||j(P)},this.on(o,j)});return Promise.race([Z,se])}async unsubscribe(e,t,s){let a,i;typeof t=="function"?i=t:(a=t,i=s);const r=G();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 h=J({telemetrySdkVersion:H,applicationInstance:this._applicationInstance,applicationName:this._applicationName,applicationSpecifier:this._applicationSpecifier,name:e,data:a,responseName:r,unsubscribeName:c});z(h);let g=!1,w;const Z=new Promise((j,P)=>{const ae=new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${F}`);setTimeout(()=>{g=!0,this.off(r,w),P(ae)},F)}),se=new Promise(j=>{w=P=>{g||j(P)},this.once(r,j)});if(!(await Promise.race([Z,se])).success)return{success:!1}}return{success:!0}}on(e,t){var s;const a=(s=this._onHandlers.get(e))!==null&&s!==void 0?s:[];a.length===0&&this._onHandlers.set(e,a),a.push(t)}once(e,t){var s;const a=(s=this._onceHandlers.get(e))!==null&&s!==void 0?s:[];a.length===0&&this._onceHandlers.set(e,a),a.push(t)}off(e,t){const s=this._onHandlers.get(e),a=this._onceHandlers.get(e);if(!(!s&&!a)){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(a){for(let i=0;i<a.length;i+=1)t&&a[i]!==t||(a.splice(i,1),i-=1);a.length===0&&this._onceHandlers.delete(e)}}}}function G(){return Math.random().toString(36).slice(2,9)}const H=Ct.version;class At{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 It{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 $t extends Ot{get playlist(){return new It(this)}get overrides(){return new At(this)}}let f=null;function Et(){return f}function jt(n){f=new $t(n),f.bind()}function Pt(){f==null||f.unbind(),f=null}function Rt(...n){return k(f),f.on(...n)}function Ft(...n){return k(f),f.once(...n)}function Mt(...n){return k(f),f.off(...n)}function Lt(...n){return k(f),f.send(...n)}function qt(...n){return k(f),f.request(...n)}function Dt(...n){return k(f),f.subscribe(...n)}function Vt(...n){return k(f),f.unsubscribe(...n)}function zt(){return k(f),f.store}function Bt(){return k(f),f.applications}function Ut(){return k(f),f.media}function Ht(){return k(f),f.accounts}function Kt(){return k(f),f.users}function Wt(){return k(f),f.devices}function Jt(){return k(f),f.proxy}function Gt(){return k(f),f.weather}function Yt(){return k(f),f.currency}function Xt(){return k(f),f.environment}function Qt(){return k(f),f.playlist}function es(){return k(f),f.overrides}function k(n){if(!n)throw new Error("SDK is not configured")}exports.Accounts=Le;exports.Applications=qe;exports.Currency=We;exports.Devices=De;exports.Environment=Ve;exports.Media=ze;exports.Proxy=Be;exports.Store=Ue;exports.StoreSlice=B;exports.Users=He;exports.Weather=Ke;exports.accounts=Ht;exports.applications=Bt;exports.configure=jt;exports.currency=Yt;exports.destroy=Pt;exports.devices=Wt;exports.environment=Xt;exports.globalClient=Et;exports.media=Ut;exports.off=Mt;exports.on=Rt;exports.once=Ft;exports.overrides=es;exports.playlist=Qt;exports.proxy=Jt;exports.request=qt;exports.send=Lt;exports.store=zt;exports.subscribe=Dt;exports.telemetrySdkVersion=H;exports.unsubscribe=Vt;exports.users=Kt;exports.weather=Gt;
package/dist/index.js CHANGED
@@ -2605,7 +2605,7 @@ me.create;
2605
2605
  te.create;
2606
2606
  I.create;
2607
2607
  V.create;
2608
- const mt = "1.8.1", _t = {
2608
+ const mt = "1.8.3", _t = {
2609
2609
  version: mt
2610
2610
  };
2611
2611
  class gt {
package/dist/react.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),_=require("./index.cjs");var T={exports:{}},E={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),b=require("./index.cjs");var O={exports:{}},w={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var $;function oe(){if($)return E;$=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(o,c,f){var m=null;if(f!==void 0&&(m=""+f),c.key!==void 0&&(m=""+c.key),"key"in c){f={};for(var p in c)p!=="key"&&(f[p]=c[p])}else f=c;return c=f.ref,{$$typeof:n,type:o,key:m,ref:c!==void 0?c:null,props:f}}return E.Fragment=t,E.jsx=s,E.jsxs=s,E}var w={};/**
9
+ */var J;function oe(){if(J)return w;J=1;var n=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function s(o,c,f){var g=null;if(f!==void 0&&(g=""+f),c.key!==void 0&&(g=""+c.key),"key"in c){f={};for(var p in c)p!=="key"&&(f[p]=c[p])}else f=c;return c=f.ref,{$$typeof:n,type:o,key:g,ref:c!==void 0?c:null,props:f}}return w.Fragment=t,w.jsx=s,w.jsxs=s,w}var R={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var D;function se(){return D||(D=1,process.env.NODE_ENV!=="production"&&(function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case H:return"Profiler";case q:return"StrictMode";case Q:return"Suspense";case Z:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case V:return"Portal";case G:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case X:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return r=e.displayName||null,r!==null?r:n(e.type)||"Memo";case A:r=e._payload,e=e._init;try{return n(e(r))}catch{}}return null}function t(e){return""+e}function s(e){try{t(e);var r=!1}catch{r=!0}if(r){r=console;var a=r.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),t(e)}}function o(e){if(e===N)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===A)return"<...>";try{var r=n(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function c(){var e=O.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function m(e){if(L.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function p(e,r){function a(){z||(z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}function S(){var e=n(this.type);return U[e]||(U[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function j(e,r,a,u,R,P){var l=a.ref;return e={$$typeof:y,type:e,key:r,props:a,_owner:u},(l!==void 0?l:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:S}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:R}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function g(e,r,a,u,R,P){var l=r.children;if(l!==void 0)if(u)if(re(l)){for(u=0;u<l.length;u++)k(l[u]);Object.freeze&&Object.freeze(l)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else k(l);if(L.call(r,"key")){l=n(e);var x=Object.keys(r).filter(function(te){return te!=="key"});u=0<x.length?"{key: someKey, "+x.join(": ..., ")+": ...}":"{key: someKey}",M[l+u]||(x=0<x.length?"{"+x.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var q;function se(){return q||(q=1,process.env.NODE_ENV!=="production"&&(function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case j:return"Profiler";case h:return"StrictMode";case Q:return"Suspense";case Z:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case P:return"Portal";case G:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case X:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return r=e.displayName||null,r!==null?r:n(e.type)||"Memo";case F:r=e._payload,e=e._init;try{return n(e(r))}catch{}}return null}function t(e){return""+e}function s(e){try{t(e);var r=!1}catch{r=!0}if(r){r=console;var a=r.error,u=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",u),t(e)}}function o(e){if(e===E)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===F)return"<...>";try{var r=n(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function c(){var e=L.A;return e===null?null:e.getOwner()}function f(){return Error("react-stack-top-frame")}function g(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function p(e,r){function a(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}function C(){var e=n(this.type);return D[e]||(D[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function k(e,r,a,u,A,U){var l=a.ref;return e={$$typeof:T,type:e,key:r,props:a,_owner:u},(l!==void 0?l:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:C}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function y(e,r,a,u,A,U){var l=r.children;if(l!==void 0)if(u)if(re(l)){for(u=0;u<l.length;u++)m(l[u]);Object.freeze&&Object.freeze(l)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(l);if(Y.call(r,"key")){l=n(e);var v=Object.keys(r).filter(function(te){return te!=="key"});u=0<v.length?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}",V[l+u]||(v=0<v.length?"{"+v.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,u,l,x,l),M[l+u]=!0)}if(l=null,a!==void 0&&(s(a),l=""+a),m(r)&&(s(r.key),l=""+r.key),"key"in r){a={};for(var F in r)F!=="key"&&(a[F]=r[F])}else a=r;return l&&p(a,typeof e=="function"?e.displayName||e.name||"Unknown":e),j(e,l,a,c(),R,P)}function k(e){b(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===A&&(e._payload.status==="fulfilled"?b(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function b(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}var h=d,y=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),G=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ne=Symbol.for("react.client.reference"),O=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,re=Array.isArray,C=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var z,U={},I=h.react_stack_bottom_frame.bind(h,f)(),Y=C(o(f)),M={};w.Fragment=N,w.jsx=function(e,r,a){var u=1e4>O.recentlyCreatedOwnerStacks++;return g(e,r,a,!1,u?Error("react-stack-top-frame"):I,u?C(o(e)):Y)},w.jsxs=function(e,r,a){var u=1e4>O.recentlyCreatedOwnerStacks++;return g(e,r,a,!0,u?Error("react-stack-top-frame"):I,u?C(o(e)):Y)}})()),w}var W;function ae(){return W||(W=1,process.env.NODE_ENV==="production"?T.exports=oe():T.exports=se()),T.exports}var i=ae();const ie=`:root {
22
+ <%s key={someKey} {...props} />`,u,l,v,l),V[l+u]=!0)}if(l=null,a!==void 0&&(s(a),l=""+a),g(r)&&(s(r.key),l=""+r.key),"key"in r){a={};for(var I in r)I!=="key"&&(a[I]=r[I])}else a=r;return l&&p(a,typeof e=="function"?e.displayName||e.name||"Unknown":e),k(e,l,a,c(),A,U)}function m(e){_(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===F&&(e._payload.status==="fulfilled"?_(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function _(e){return typeof e=="object"&&e!==null&&e.$$typeof===T}var x=d,T=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),G=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),ne=Symbol.for("react.client.reference"),L=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,re=Array.isArray,z=console.createTask?console.createTask:function(){return null};x={react_stack_bottom_frame:function(e){return e()}};var M,D={},$=x.react_stack_bottom_frame.bind(x,f)(),W=z(o(f)),V={};R.Fragment=E,R.jsx=function(e,r,a){var u=1e4>L.recentlyCreatedOwnerStacks++;return y(e,r,a,!1,u?Error("react-stack-top-frame"):$,u?z(o(e)):W)},R.jsxs=function(e,r,a){var u=1e4>L.recentlyCreatedOwnerStacks++;return y(e,r,a,!0,u?Error("react-stack-top-frame"):$,u?z(o(e)):W)}})()),R}var H;function ae(){return H||(H=1,process.env.NODE_ENV==="production"?O.exports=oe():O.exports=se()),O.exports}var i=ae();const ie=`:root {
23
23
  --background: 0 0% 100%;
24
24
  --foreground: 222.2 84% 4.9%;
25
25
 
@@ -115,8 +115,9 @@ React keys must be passed directly to JSX without using spread:
115
115
  }
116
116
 
117
117
  .settings__divider {
118
- border: none;
119
- border-top: 1px solid hsl(var(--border));
118
+ border: solid hsl(var(--border));
119
+ border-width: 1px 0 0;
120
+ width: 100%;
120
121
  }
121
122
 
122
123
  /* =============================================================================
@@ -472,4 +473,4 @@ React keys must be passed directly to JSX without using spread:
472
473
  border-color: hsl(var(--primary));
473
474
  color: hsl(var(--primary-foreground));
474
475
  }
475
- `;let J=!1;function ce(){if(J||typeof document>"u")return;const n=document.createElement("style");n.setAttribute("data-telemetryos-sdk",""),n.textContent=ie,document.head.appendChild(n),J=!0}ce();function ue({children:n}){const t=()=>{const s=window.matchMedia("(prefers-color-scheme: dark)"),o=m=>{let p;m==="system"?p=s.matches:p=m!=="light",p?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},c=_.environment().subscribeColorScheme(o);c.catch(console.error);const f=()=>{_.environment().getColorScheme().then(o).catch(console.error)};return s.addEventListener("change",f),()=>{c.then(()=>_.environment().unsubscribeColorScheme(o)).catch(console.error),s.removeEventListener("change",f)}};return d.useEffect(t,[]),i.jsx("div",{className:"settings__container",children:n})}function le({children:n}){return i.jsx("div",{className:"settings__box",children:n})}function de({children:n}){return i.jsx("div",{className:"settings__heading",children:n})}function fe(){return i.jsx("hr",{className:"settings__divider"})}function pe({children:n}){return i.jsx("label",{className:"settings__field",children:n})}function ge({children:n}){return i.jsx("div",{className:"settings__label",children:n})}function me({children:n}){return i.jsx("div",{className:"settings__hint",children:n})}function be({children:n}){return i.jsx("div",{className:"settings__error",children:n})}function he({children:n}){return i.jsx("div",{className:"settings__input-frame",children:n})}function _e({children:n}){return i.jsx("div",{className:"settings__textarea-frame",children:n})}function xe({children:n}){return i.jsx("div",{className:"settings__select-frame",children:n})}function ve({children:n}){return i.jsx("div",{className:"settings__slider-frame",children:n})}function Se({children:n}){return i.jsx("div",{className:"settings__slider-ruler",children:n})}function ke({children:n}){return i.jsx("div",{className:"settings__color-frame",children:n})}function ye({children:n}){return i.jsx("label",{className:"settings__switch-frame",children:n})}function Ee({children:n}){return i.jsx("span",{className:"settings__switch-label",children:n})}function we({children:n}){return i.jsx("label",{className:"settings__checkbox-frame",children:n})}function Re({children:n}){return i.jsx("span",{className:"settings__checkbox-label",children:n})}function Te({children:n}){return i.jsx("label",{className:"settings__radio-frame",children:n})}function je({children:n}){return i.jsx("span",{className:"settings__radio-label",children:n})}function Ne({children:n}){return i.jsx("div",{className:"settings__button-frame",children:n})}function v(n,t,s,o=0){var c;const[f,m]=d.useState(!0),[p]=d.useState(s),[S,j]=d.useState(void 0),[g,k]=d.useState(void 0);return d.useEffect(()=>{const b=h=>{j(y=>JSON.stringify(y)===JSON.stringify(h)?y:h),m(!1)};return n.subscribe(t,b).catch(console.error),()=>{n.unsubscribe(t,b).catch(console.error)}},[n,t]),d.useEffect(()=>{if(typeof g<"u"){const b=setTimeout(()=>{n.set(t,g)},o);return()=>clearTimeout(b)}},[g,n,t,o]),d.useEffect(()=>{if(JSON.stringify(g)===JSON.stringify(S)){const b=setTimeout(()=>{k(void 0)},500);return()=>clearTimeout(b)}},[g,S]),[f,(c=g??S)!==null&&c!==void 0?c:p,k]}function Ae(n,t){return(s,o=0)=>v(s,n,t,o)}function Oe(n,t){return(s=0)=>{const o=d.useMemo(()=>_.store().instance,[]);return v(o,n,t,s)}}function Ce(n,t){return(s=0)=>{const o=d.useMemo(()=>_.store().application,[]);return v(o,n,t,s)}}function Pe(n,t){return(s=0)=>{const o=d.useMemo(()=>_.store().device,[]);return v(o,n,t,s)}}function Fe(n,t,s){return(o=0)=>{const c=d.useMemo(()=>_.store().shared(s),[]);return v(c,n,t,o)}}function Le(n){const t=()=>{document.documentElement.style.fontSize=`calc(1vmax * ${n})`};d.useEffect(t,[n])}function ze(){const[n,t]=d.useState(()=>window.innerWidth/window.innerHeight),s=()=>{const o=()=>{t(window.innerWidth/window.innerHeight)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)};return d.useEffect(s,[]),n}function Ue(n,t){return{uiWidthFactor:Math.min(t,1)/n,uiHeightFactor:Math.max(t,1)/n}}exports.SettingsBox=le;exports.SettingsButtonFrame=Ne;exports.SettingsCheckboxFrame=we;exports.SettingsCheckboxLabel=Re;exports.SettingsColorFrame=ke;exports.SettingsContainer=ue;exports.SettingsDivider=fe;exports.SettingsError=be;exports.SettingsField=pe;exports.SettingsHeading=de;exports.SettingsHint=me;exports.SettingsInputFrame=he;exports.SettingsLabel=ge;exports.SettingsRadioFrame=Te;exports.SettingsRadioLabel=je;exports.SettingsSelectFrame=xe;exports.SettingsSliderFrame=ve;exports.SettingsSliderRuler=Se;exports.SettingsSwitchFrame=ye;exports.SettingsSwitchLabel=Ee;exports.SettingsTextAreaFrame=_e;exports.createUseApplicationStoreState=Ce;exports.createUseDeviceStoreState=Pe;exports.createUseInstanceStoreState=Oe;exports.createUseSharedStoreState=Fe;exports.createUseStoreState=Ae;exports.useStoreState=v;exports.useUiAspectRatio=ze;exports.useUiResponsiveFactors=Ue;exports.useUiScaleToSetRem=Le;
476
+ `;let B=!1;function ce(){if(B||typeof document>"u")return;const n=document.createElement("style");n.setAttribute("data-telemetryos-sdk",""),n.textContent=ie,document.head.appendChild(n),B=!0}ce();function ue({children:n}){const t=()=>{const s=window.matchMedia("(prefers-color-scheme: dark)"),o=g=>{let p;g==="system"?p=s.matches:p=g!=="light",p?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},c=b.environment().subscribeColorScheme(o);c.catch(console.error);const f=()=>{b.environment().getColorScheme().then(o).catch(console.error)};return s.addEventListener("change",f),()=>{c.then(()=>b.environment().unsubscribeColorScheme(o)).catch(console.error),s.removeEventListener("change",f)}};return d.useEffect(t,[]),i.jsx("div",{className:"settings__container",children:n})}function le({children:n}){return i.jsx("div",{className:"settings__box",children:n})}function de({children:n}){return i.jsx("div",{className:"settings__heading",children:n})}function fe(){return i.jsx("hr",{className:"settings__divider"})}function pe({children:n}){return i.jsx("label",{className:"settings__field",children:n})}function ge({children:n}){return i.jsx("div",{className:"settings__label",children:n})}function me({children:n}){return i.jsx("div",{className:"settings__hint",children:n})}function he({children:n}){return i.jsx("div",{className:"settings__error",children:n})}function be({children:n}){return i.jsx("div",{className:"settings__input-frame",children:n})}function _e({children:n}){return i.jsx("div",{className:"settings__textarea-frame",children:n})}function xe({children:n}){return i.jsx("div",{className:"settings__select-frame",children:n})}function ve({children:n}){return i.jsx("div",{className:"settings__slider-frame",children:n})}function Se({children:n}){return i.jsx("div",{className:"settings__slider-ruler",children:n})}function ke({children:n}){return i.jsx("div",{className:"settings__color-frame",children:n})}function ye({children:n}){return i.jsx("label",{className:"settings__switch-frame",children:n})}function Ee({children:n}){return i.jsx("span",{className:"settings__switch-label",children:n})}function we({children:n}){return i.jsx("label",{className:"settings__checkbox-frame",children:n})}function Re({children:n}){return i.jsx("span",{className:"settings__checkbox-label",children:n})}function Te({children:n}){return i.jsx("label",{className:"settings__radio-frame",children:n})}function je({children:n}){return i.jsx("span",{className:"settings__radio-label",children:n})}function Ne({children:n}){return i.jsx("div",{className:"settings__button-frame",children:n})}function S(n,t,s,o=0){var c;const[f,g]=d.useState(!0),p=d.useRef(!0),[C]=d.useState(s),[k,y]=d.useState(void 0),[m,_]=d.useState(void 0),x=d.useCallback(h=>{p.current?console.error("Cannot set store value while loading. Destructure and check the first element of the returned tuple."):_(h)},[]),T=()=>{g(!0),p.current=!0,y(void 0),_(void 0);const h=j=>{y(N=>JSON.stringify(N)===JSON.stringify(j)?N:j),g(!1),p.current=!1};return n.subscribe(t,h).catch(console.error),()=>{n.unsubscribe(t,h).catch(console.error)}};d.useEffect(T,[n,t]);const P=()=>{if(!p.current&&typeof m<"u"){const h=setTimeout(()=>{n.set(t,m)},o);return()=>clearTimeout(h)}};d.useEffect(P,[m,n,t,o]);const E=()=>{if(JSON.stringify(m)===JSON.stringify(k)){const h=setTimeout(()=>{_(void 0)},500);return()=>clearTimeout(h)}};return d.useEffect(E,[m,k]),[f,(c=m??k)!==null&&c!==void 0?c:C,x]}function Ae(n,t){return(s,o=0)=>S(s,n,t,o)}function Oe(n,t){return(s=0)=>{const o=d.useMemo(()=>b.store().instance,[]);return S(o,n,t,s)}}function Ce(n,t){return(s=0)=>{const o=d.useMemo(()=>b.store().application,[]);return S(o,n,t,s)}}function Pe(n,t){return(s=0)=>{const o=d.useMemo(()=>b.store().device,[]);return S(o,n,t,s)}}function Fe(n,t,s){return(o=0)=>{const c=d.useMemo(()=>b.store().shared(s),[]);return S(c,n,t,o)}}function Le(n){const t=()=>{document.documentElement.style.fontSize=`calc(1vmax * ${n})`};d.useEffect(t,[n])}function ze(){const[n,t]=d.useState(()=>window.innerWidth/window.innerHeight),s=()=>{const o=()=>{t(window.innerWidth/window.innerHeight)};return window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)};return d.useEffect(s,[]),n}function Ue(n,t){return{uiWidthFactor:Math.min(t,1)/n,uiHeightFactor:Math.max(t,1)/n}}exports.SettingsBox=le;exports.SettingsButtonFrame=Ne;exports.SettingsCheckboxFrame=we;exports.SettingsCheckboxLabel=Re;exports.SettingsColorFrame=ke;exports.SettingsContainer=ue;exports.SettingsDivider=fe;exports.SettingsError=he;exports.SettingsField=pe;exports.SettingsHeading=de;exports.SettingsHint=me;exports.SettingsInputFrame=be;exports.SettingsLabel=ge;exports.SettingsRadioFrame=Te;exports.SettingsRadioLabel=je;exports.SettingsSelectFrame=xe;exports.SettingsSliderFrame=ve;exports.SettingsSliderRuler=Se;exports.SettingsSwitchFrame=ye;exports.SettingsSwitchLabel=Ee;exports.SettingsTextAreaFrame=_e;exports.createUseApplicationStoreState=Ce;exports.createUseDeviceStoreState=Pe;exports.createUseInstanceStoreState=Oe;exports.createUseSharedStoreState=Fe;exports.createUseStoreState=Ae;exports.useStoreState=S;exports.useUiAspectRatio=ze;exports.useUiResponsiveFactors=Ue;exports.useUiScaleToSetRem=Le;
package/dist/react.js CHANGED
@@ -1,6 +1,6 @@
1
- import cn, { useEffect as b, useState as w, useMemo as j } from "react";
2
- import { environment as I, store as N } from "./index.js";
3
- var T = { exports: {} }, y = {};
1
+ import ie, { useEffect as x, useState as w, useRef as ce, useCallback as le, useMemo as O } from "react";
2
+ import { environment as $, store as C } from "./index.js";
3
+ var A = { exports: {} }, y = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.js
@@ -10,29 +10,29 @@ var T = { exports: {} }, y = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var J;
14
- function un() {
15
- if (J) return y;
16
- J = 1;
17
- var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
13
+ var G;
14
+ function ue() {
15
+ if (G) return y;
16
+ G = 1;
17
+ var n = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
18
18
  function s(o, c, d) {
19
- var g = null;
20
- if (d !== void 0 && (g = "" + d), c.key !== void 0 && (g = "" + c.key), "key" in c) {
19
+ var p = null;
20
+ if (d !== void 0 && (p = "" + d), c.key !== void 0 && (p = "" + c.key), "key" in c) {
21
21
  d = {};
22
22
  for (var f in c)
23
23
  f !== "key" && (d[f] = c[f]);
24
24
  } else d = c;
25
25
  return c = d.ref, {
26
- $$typeof: e,
26
+ $$typeof: n,
27
27
  type: o,
28
- key: g,
28
+ key: p,
29
29
  ref: c !== void 0 ? c : null,
30
30
  props: d
31
31
  };
32
32
  }
33
33
  return y.Fragment = t, y.jsx = s, y.jsxs = s, y;
34
34
  }
35
- var S = {};
35
+ var E = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.development.js
@@ -42,243 +42,243 @@ var S = {};
42
42
  * This source code is licensed under the MIT license found in the
43
43
  * LICENSE file in the root directory of this source tree.
44
44
  */
45
- var V;
46
- function ln() {
47
- return V || (V = 1, process.env.NODE_ENV !== "production" && (function() {
48
- function e(n) {
49
- if (n == null) return null;
50
- if (typeof n == "function")
51
- return n.$$typeof === on ? null : n.displayName || n.name || null;
52
- if (typeof n == "string") return n;
53
- switch (n) {
54
- case O:
45
+ var X;
46
+ function de() {
47
+ return X || (X = 1, process.env.NODE_ENV !== "production" && (function() {
48
+ function n(e) {
49
+ if (e == null) return null;
50
+ if (typeof e == "function")
51
+ return e.$$typeof === oe ? null : e.displayName || e.name || null;
52
+ if (typeof e == "string") return e;
53
+ switch (e) {
54
+ case R:
55
55
  return "Fragment";
56
- case B:
56
+ case T:
57
57
  return "Profiler";
58
- case X:
58
+ case m:
59
59
  return "StrictMode";
60
- case nn:
60
+ case ee:
61
61
  return "Suspense";
62
- case en:
62
+ case ne:
63
63
  return "SuspenseList";
64
- case tn:
64
+ case te:
65
65
  return "Activity";
66
66
  }
67
- if (typeof n == "object")
68
- switch (typeof n.tag == "number" && console.error(
67
+ if (typeof e == "object")
68
+ switch (typeof e.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), n.$$typeof) {
71
- case G:
70
+ ), e.$$typeof) {
71
+ case D:
72
72
  return "Portal";
73
73
  case Z:
74
- return n.displayName || "Context";
75
- case Q:
76
- return (n._context.displayName || "Context") + ".Consumer";
74
+ return e.displayName || "Context";
75
+ case j:
76
+ return (e._context.displayName || "Context") + ".Consumer";
77
77
  case K:
78
- var r = n.render;
79
- return n = n.displayName, n || (n = r.displayName || r.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
80
- case rn:
81
- return r = n.displayName || null, r !== null ? r : e(n.type) || "Memo";
82
- case C:
83
- r = n._payload, n = n._init;
78
+ var r = e.render;
79
+ return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
+ case re:
81
+ return r = e.displayName || null, r !== null ? r : n(e.type) || "Memo";
82
+ case z:
83
+ r = e._payload, e = e._init;
84
84
  try {
85
- return e(n(r));
85
+ return n(e(r));
86
86
  } catch {
87
87
  }
88
88
  }
89
89
  return null;
90
90
  }
91
- function t(n) {
92
- return "" + n;
91
+ function t(e) {
92
+ return "" + e;
93
93
  }
94
- function s(n) {
94
+ function s(e) {
95
95
  try {
96
- t(n);
96
+ t(e);
97
97
  var r = !1;
98
98
  } catch {
99
99
  r = !0;
100
100
  }
101
101
  if (r) {
102
102
  r = console;
103
- var a = r.error, u = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
103
+ var a = r.error, l = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
104
  return a.call(
105
105
  r,
106
106
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- u
108
- ), t(n);
107
+ l
108
+ ), t(e);
109
109
  }
110
110
  }
111
- function o(n) {
112
- if (n === O) return "<>";
113
- if (typeof n == "object" && n !== null && n.$$typeof === C)
111
+ function o(e) {
112
+ if (e === R) return "<>";
113
+ if (typeof e == "object" && e !== null && e.$$typeof === z)
114
114
  return "<...>";
115
115
  try {
116
- var r = e(n);
116
+ var r = n(e);
117
117
  return r ? "<" + r + ">" : "<...>";
118
118
  } catch {
119
119
  return "<...>";
120
120
  }
121
121
  }
122
122
  function c() {
123
- var n = P.A;
124
- return n === null ? null : n.getOwner();
123
+ var e = L.A;
124
+ return e === null ? null : e.getOwner();
125
125
  }
126
126
  function d() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
- function g(n) {
130
- if (Y.call(n, "key")) {
131
- var r = Object.getOwnPropertyDescriptor(n, "key").get;
129
+ function p(e) {
130
+ if (M.call(e, "key")) {
131
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
132
132
  if (r && r.isReactWarning) return !1;
133
133
  }
134
- return n.key !== void 0;
134
+ return e.key !== void 0;
135
135
  }
136
- function f(n, r) {
136
+ function f(e, r) {
137
137
  function a() {
138
- U || (U = !0, console.error(
138
+ W || (W = !0, console.error(
139
139
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
140
140
  r
141
141
  ));
142
142
  }
143
- a.isReactWarning = !0, Object.defineProperty(n, "key", {
143
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
144
144
  get: a,
145
145
  configurable: !0
146
146
  });
147
147
  }
148
- function x() {
149
- var n = e(this.type);
150
- return $[n] || ($[n] = !0, console.error(
148
+ function P() {
149
+ var e = n(this.type);
150
+ return V[e] || (V[e] = !0, console.error(
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
- )), n = this.props.ref, n !== void 0 ? n : null;
152
+ )), e = this.props.ref, e !== void 0 ? e : null;
153
153
  }
154
- function A(n, r, a, u, R, z) {
155
- var l = a.ref;
156
- return n = {
157
- $$typeof: k,
158
- type: n,
154
+ function v(e, r, a, l, N, Y) {
155
+ var u = a.ref;
156
+ return e = {
157
+ $$typeof: F,
158
+ type: e,
159
159
  key: r,
160
160
  props: a,
161
- _owner: u
162
- }, (l !== void 0 ? l : null) !== null ? Object.defineProperty(n, "ref", {
161
+ _owner: l
162
+ }, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
163
163
  enumerable: !1,
164
- get: x
165
- }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
164
+ get: P
165
+ }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
166
166
  configurable: !1,
167
167
  enumerable: !1,
168
168
  writable: !0,
169
169
  value: 0
170
- }), Object.defineProperty(n, "_debugInfo", {
170
+ }), Object.defineProperty(e, "_debugInfo", {
171
171
  configurable: !1,
172
172
  enumerable: !1,
173
173
  writable: !0,
174
174
  value: null
175
- }), Object.defineProperty(n, "_debugStack", {
175
+ }), Object.defineProperty(e, "_debugStack", {
176
176
  configurable: !1,
177
177
  enumerable: !1,
178
178
  writable: !0,
179
- value: R
180
- }), Object.defineProperty(n, "_debugTask", {
179
+ value: N
180
+ }), Object.defineProperty(e, "_debugTask", {
181
181
  configurable: !1,
182
182
  enumerable: !1,
183
183
  writable: !0,
184
- value: z
185
- }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
184
+ value: Y
185
+ }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
186
186
  }
187
- function p(n, r, a, u, R, z) {
188
- var l = r.children;
189
- if (l !== void 0)
190
- if (u)
191
- if (sn(l)) {
192
- for (u = 0; u < l.length; u++)
193
- v(l[u]);
194
- Object.freeze && Object.freeze(l);
187
+ function k(e, r, a, l, N, Y) {
188
+ var u = r.children;
189
+ if (u !== void 0)
190
+ if (l)
191
+ if (se(u)) {
192
+ for (l = 0; l < u.length; l++)
193
+ g(u[l]);
194
+ Object.freeze && Object.freeze(u);
195
195
  } else
196
196
  console.error(
197
197
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
198
198
  );
199
- else v(l);
200
- if (Y.call(r, "key")) {
201
- l = e(n);
202
- var h = Object.keys(r).filter(function(an) {
203
- return an !== "key";
199
+ else g(u);
200
+ if (M.call(r, "key")) {
201
+ u = n(e);
202
+ var b = Object.keys(r).filter(function(ae) {
203
+ return ae !== "key";
204
204
  });
205
- u = 0 < h.length ? "{key: someKey, " + h.join(": ..., ") + ": ...}" : "{key: someKey}", W[l + u] || (h = 0 < h.length ? "{" + h.join(": ..., ") + ": ...}" : "{}", console.error(
205
+ l = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", H[u + l] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
206
206
  `A props object containing a "key" prop is being spread into JSX:
207
207
  let props = %s;
208
208
  <%s {...props} />
209
209
  React keys must be passed directly to JSX without using spread:
210
210
  let props = %s;
211
211
  <%s key={someKey} {...props} />`,
212
- u,
213
212
  l,
214
- h,
215
- l
216
- ), W[l + u] = !0);
213
+ u,
214
+ b,
215
+ u
216
+ ), H[u + l] = !0);
217
217
  }
218
- if (l = null, a !== void 0 && (s(a), l = "" + a), g(r) && (s(r.key), l = "" + r.key), "key" in r) {
218
+ if (u = null, a !== void 0 && (s(a), u = "" + a), p(r) && (s(r.key), u = "" + r.key), "key" in r) {
219
219
  a = {};
220
- for (var L in r)
221
- L !== "key" && (a[L] = r[L]);
220
+ for (var U in r)
221
+ U !== "key" && (a[U] = r[U]);
222
222
  } else a = r;
223
- return l && f(
223
+ return u && f(
224
224
  a,
225
- typeof n == "function" ? n.displayName || n.name || "Unknown" : n
226
- ), A(
227
- n,
228
- l,
225
+ typeof e == "function" ? e.displayName || e.name || "Unknown" : e
226
+ ), v(
227
+ e,
228
+ u,
229
229
  a,
230
230
  c(),
231
- R,
232
- z
231
+ N,
232
+ Y
233
233
  );
234
234
  }
235
- function v(n) {
236
- m(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === C && (n._payload.status === "fulfilled" ? m(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
235
+ function g(e) {
236
+ h(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === z && (e._payload.status === "fulfilled" ? h(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
237
237
  }
238
- function m(n) {
239
- return typeof n == "object" && n !== null && n.$$typeof === k;
238
+ function h(e) {
239
+ return typeof e == "object" && e !== null && e.$$typeof === F;
240
240
  }
241
- var _ = cn, k = Symbol.for("react.transitional.element"), G = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), Q = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), K = Symbol.for("react.forward_ref"), nn = Symbol.for("react.suspense"), en = Symbol.for("react.suspense_list"), rn = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), tn = Symbol.for("react.activity"), on = Symbol.for("react.client.reference"), P = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Y = Object.prototype.hasOwnProperty, sn = Array.isArray, F = console.createTask ? console.createTask : function() {
241
+ var _ = ie, F = Symbol.for("react.transitional.element"), D = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), K = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ne = Symbol.for("react.suspense_list"), re = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), oe = Symbol.for("react.client.reference"), L = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, se = Array.isArray, I = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  _ = {
245
- react_stack_bottom_frame: function(n) {
246
- return n();
245
+ react_stack_bottom_frame: function(e) {
246
+ return e();
247
247
  }
248
248
  };
249
- var U, $ = {}, D = _.react_stack_bottom_frame.bind(
249
+ var W, V = {}, J = _.react_stack_bottom_frame.bind(
250
250
  _,
251
251
  d
252
- )(), M = F(o(d)), W = {};
253
- S.Fragment = O, S.jsx = function(n, r, a) {
254
- var u = 1e4 > P.recentlyCreatedOwnerStacks++;
255
- return p(
256
- n,
252
+ )(), q = I(o(d)), H = {};
253
+ E.Fragment = R, E.jsx = function(e, r, a) {
254
+ var l = 1e4 > L.recentlyCreatedOwnerStacks++;
255
+ return k(
256
+ e,
257
257
  r,
258
258
  a,
259
259
  !1,
260
- u ? Error("react-stack-top-frame") : D,
261
- u ? F(o(n)) : M
260
+ l ? Error("react-stack-top-frame") : J,
261
+ l ? I(o(e)) : q
262
262
  );
263
- }, S.jsxs = function(n, r, a) {
264
- var u = 1e4 > P.recentlyCreatedOwnerStacks++;
265
- return p(
266
- n,
263
+ }, E.jsxs = function(e, r, a) {
264
+ var l = 1e4 > L.recentlyCreatedOwnerStacks++;
265
+ return k(
266
+ e,
267
267
  r,
268
268
  a,
269
269
  !0,
270
- u ? Error("react-stack-top-frame") : D,
271
- u ? F(o(n)) : M
270
+ l ? Error("react-stack-top-frame") : J,
271
+ l ? I(o(e)) : q
272
272
  );
273
273
  };
274
- })()), S;
274
+ })()), E;
275
275
  }
276
- var q;
277
- function dn() {
278
- return q || (q = 1, process.env.NODE_ENV === "production" ? T.exports = un() : T.exports = ln()), T.exports;
276
+ var B;
277
+ function fe() {
278
+ return B || (B = 1, process.env.NODE_ENV === "production" ? A.exports = ue() : A.exports = de()), A.exports;
279
279
  }
280
- var i = dn();
281
- const fn = `:root {
280
+ var i = fe();
281
+ const pe = `:root {
282
282
  --background: 0 0% 100%;
283
283
  --foreground: 222.2 84% 4.9%;
284
284
 
@@ -374,8 +374,9 @@ const fn = `:root {
374
374
  }
375
375
 
376
376
  .settings__divider {
377
- border: none;
378
- border-top: 1px solid hsl(var(--border));
377
+ border: solid hsl(var(--border));
378
+ border-width: 1px 0 0;
379
+ width: 100%;
379
380
  }
380
381
 
381
382
  /* =============================================================================
@@ -732,191 +733,194 @@ const fn = `:root {
732
733
  color: hsl(var(--primary-foreground));
733
734
  }
734
735
  `;
735
- let H = !1;
736
- function pn() {
737
- if (H || typeof document > "u")
736
+ let Q = !1;
737
+ function ge() {
738
+ if (Q || typeof document > "u")
738
739
  return;
739
- const e = document.createElement("style");
740
- e.setAttribute("data-telemetryos-sdk", ""), e.textContent = fn, document.head.appendChild(e), H = !0;
740
+ const n = document.createElement("style");
741
+ n.setAttribute("data-telemetryos-sdk", ""), n.textContent = pe, document.head.appendChild(n), Q = !0;
741
742
  }
742
- pn();
743
- function _n({ children: e }) {
744
- return b(() => {
745
- const s = window.matchMedia("(prefers-color-scheme: dark)"), o = (g) => {
743
+ ge();
744
+ function _e({ children: n }) {
745
+ return x(() => {
746
+ const s = window.matchMedia("(prefers-color-scheme: dark)"), o = (p) => {
746
747
  let f;
747
- g === "system" ? f = s.matches : f = g !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
748
- }, c = I().subscribeColorScheme(o);
748
+ p === "system" ? f = s.matches : f = p !== "light", f ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
749
+ }, c = $().subscribeColorScheme(o);
749
750
  c.catch(console.error);
750
751
  const d = () => {
751
- I().getColorScheme().then(o).catch(console.error);
752
+ $().getColorScheme().then(o).catch(console.error);
752
753
  };
753
754
  return s.addEventListener("change", d), () => {
754
- c.then(() => I().unsubscribeColorScheme(o)).catch(console.error), s.removeEventListener("change", d);
755
+ c.then(() => $().unsubscribeColorScheme(o)).catch(console.error), s.removeEventListener("change", d);
755
756
  };
756
- }, []), i.jsx("div", { className: "settings__container", children: e });
757
+ }, []), i.jsx("div", { className: "settings__container", children: n });
757
758
  }
758
- function hn({ children: e }) {
759
- return i.jsx("div", { className: "settings__box", children: e });
759
+ function be({ children: n }) {
760
+ return i.jsx("div", { className: "settings__box", children: n });
760
761
  }
761
- function bn({ children: e }) {
762
- return i.jsx("div", { className: "settings__heading", children: e });
762
+ function xe({ children: n }) {
763
+ return i.jsx("div", { className: "settings__heading", children: n });
763
764
  }
764
- function xn() {
765
+ function ve() {
765
766
  return i.jsx("hr", { className: "settings__divider" });
766
767
  }
767
- function vn({ children: e }) {
768
- return i.jsx("label", { className: "settings__field", children: e });
768
+ function ke({ children: n }) {
769
+ return i.jsx("label", { className: "settings__field", children: n });
769
770
  }
770
- function kn({ children: e }) {
771
- return i.jsx("div", { className: "settings__label", children: e });
771
+ function ye({ children: n }) {
772
+ return i.jsx("div", { className: "settings__label", children: n });
772
773
  }
773
- function yn({ children: e }) {
774
- return i.jsx("div", { className: "settings__hint", children: e });
774
+ function Ee({ children: n }) {
775
+ return i.jsx("div", { className: "settings__hint", children: n });
775
776
  }
776
- function Sn({ children: e }) {
777
- return i.jsx("div", { className: "settings__error", children: e });
777
+ function we({ children: n }) {
778
+ return i.jsx("div", { className: "settings__error", children: n });
778
779
  }
779
- function wn({ children: e }) {
780
- return i.jsx("div", { className: "settings__input-frame", children: e });
780
+ function Se({ children: n }) {
781
+ return i.jsx("div", { className: "settings__input-frame", children: n });
781
782
  }
782
- function En({ children: e }) {
783
- return i.jsx("div", { className: "settings__textarea-frame", children: e });
783
+ function Re({ children: n }) {
784
+ return i.jsx("div", { className: "settings__textarea-frame", children: n });
784
785
  }
785
- function Rn({ children: e }) {
786
- return i.jsx("div", { className: "settings__select-frame", children: e });
786
+ function Te({ children: n }) {
787
+ return i.jsx("div", { className: "settings__select-frame", children: n });
787
788
  }
788
- function Tn({ children: e }) {
789
- return i.jsx("div", { className: "settings__slider-frame", children: e });
789
+ function je({ children: n }) {
790
+ return i.jsx("div", { className: "settings__slider-frame", children: n });
790
791
  }
791
- function jn({ children: e }) {
792
- return i.jsx("div", { className: "settings__slider-ruler", children: e });
792
+ function Ne({ children: n }) {
793
+ return i.jsx("div", { className: "settings__slider-ruler", children: n });
793
794
  }
794
- function Nn({ children: e }) {
795
- return i.jsx("div", { className: "settings__color-frame", children: e });
795
+ function Ae({ children: n }) {
796
+ return i.jsx("div", { className: "settings__color-frame", children: n });
796
797
  }
797
- function An({ children: e }) {
798
- return i.jsx("label", { className: "settings__switch-frame", children: e });
798
+ function Oe({ children: n }) {
799
+ return i.jsx("label", { className: "settings__switch-frame", children: n });
799
800
  }
800
- function On({ children: e }) {
801
- return i.jsx("span", { className: "settings__switch-label", children: e });
801
+ function Ce({ children: n }) {
802
+ return i.jsx("span", { className: "settings__switch-label", children: n });
802
803
  }
803
- function Cn({ children: e }) {
804
- return i.jsx("label", { className: "settings__checkbox-frame", children: e });
804
+ function Pe({ children: n }) {
805
+ return i.jsx("label", { className: "settings__checkbox-frame", children: n });
805
806
  }
806
- function Pn({ children: e }) {
807
- return i.jsx("span", { className: "settings__checkbox-label", children: e });
807
+ function Fe({ children: n }) {
808
+ return i.jsx("span", { className: "settings__checkbox-label", children: n });
808
809
  }
809
- function Fn({ children: e }) {
810
- return i.jsx("label", { className: "settings__radio-frame", children: e });
810
+ function ze({ children: n }) {
811
+ return i.jsx("label", { className: "settings__radio-frame", children: n });
811
812
  }
812
- function zn({ children: e }) {
813
- return i.jsx("span", { className: "settings__radio-label", children: e });
813
+ function Le({ children: n }) {
814
+ return i.jsx("span", { className: "settings__radio-label", children: n });
814
815
  }
815
- function Ln({ children: e }) {
816
- return i.jsx("div", { className: "settings__button-frame", children: e });
816
+ function Ie({ children: n }) {
817
+ return i.jsx("div", { className: "settings__button-frame", children: n });
817
818
  }
818
- function E(e, t, s, o = 0) {
819
+ function S(n, t, s, o = 0) {
819
820
  var c;
820
- const [d, g] = w(!0), [f] = w(s), [x, A] = w(void 0), [p, v] = w(void 0);
821
- return b(() => {
822
- const m = (_) => {
823
- A((k) => JSON.stringify(k) === JSON.stringify(_) ? k : _), g(!1);
821
+ const [d, p] = w(!0), f = ce(!0), [P] = w(s), [v, k] = w(void 0), [g, h] = w(void 0), _ = le((m) => {
822
+ f.current ? console.error("Cannot set store value while loading. Destructure and check the first element of the returned tuple.") : h(m);
823
+ }, []);
824
+ return x(() => {
825
+ p(!0), f.current = !0, k(void 0), h(void 0);
826
+ const m = (T) => {
827
+ k((j) => JSON.stringify(j) === JSON.stringify(T) ? j : T), p(!1), f.current = !1;
824
828
  };
825
- return e.subscribe(t, m).catch(console.error), () => {
826
- e.unsubscribe(t, m).catch(console.error);
829
+ return n.subscribe(t, m).catch(console.error), () => {
830
+ n.unsubscribe(t, m).catch(console.error);
827
831
  };
828
- }, [e, t]), b(() => {
829
- if (typeof p < "u") {
832
+ }, [n, t]), x(() => {
833
+ if (!f.current && typeof g < "u") {
830
834
  const m = setTimeout(() => {
831
- e.set(t, p);
835
+ n.set(t, g);
832
836
  }, o);
833
837
  return () => clearTimeout(m);
834
838
  }
835
- }, [p, e, t, o]), b(() => {
836
- if (JSON.stringify(p) === JSON.stringify(x)) {
839
+ }, [g, n, t, o]), x(() => {
840
+ if (JSON.stringify(g) === JSON.stringify(v)) {
837
841
  const m = setTimeout(() => {
838
- v(void 0);
842
+ h(void 0);
839
843
  }, 500);
840
844
  return () => clearTimeout(m);
841
845
  }
842
- }, [p, x]), [d, (c = p ?? x) !== null && c !== void 0 ? c : f, v];
846
+ }, [g, v]), [d, (c = g ?? v) !== null && c !== void 0 ? c : P, _];
843
847
  }
844
- function In(e, t) {
845
- return (s, o = 0) => E(s, e, t, o);
848
+ function Ye(n, t) {
849
+ return (s, o = 0) => S(s, n, t, o);
846
850
  }
847
- function Yn(e, t) {
851
+ function Ue(n, t) {
848
852
  return (s = 0) => {
849
- const o = j(() => N().instance, []);
850
- return E(o, e, t, s);
853
+ const o = O(() => C().instance, []);
854
+ return S(o, n, t, s);
851
855
  };
852
856
  }
853
- function Un(e, t) {
857
+ function $e(n, t) {
854
858
  return (s = 0) => {
855
- const o = j(() => N().application, []);
856
- return E(o, e, t, s);
859
+ const o = O(() => C().application, []);
860
+ return S(o, n, t, s);
857
861
  };
858
862
  }
859
- function $n(e, t) {
863
+ function De(n, t) {
860
864
  return (s = 0) => {
861
- const o = j(() => N().device, []);
862
- return E(o, e, t, s);
865
+ const o = O(() => C().device, []);
866
+ return S(o, n, t, s);
863
867
  };
864
868
  }
865
- function Dn(e, t, s) {
869
+ function Me(n, t, s) {
866
870
  return (o = 0) => {
867
- const c = j(() => N().shared(s), []);
868
- return E(c, e, t, o);
871
+ const c = O(() => C().shared(s), []);
872
+ return S(c, n, t, o);
869
873
  };
870
874
  }
871
- function Mn(e) {
872
- b(() => {
873
- document.documentElement.style.fontSize = `calc(1vmax * ${e})`;
874
- }, [e]);
875
+ function We(n) {
876
+ x(() => {
877
+ document.documentElement.style.fontSize = `calc(1vmax * ${n})`;
878
+ }, [n]);
875
879
  }
876
- function Wn() {
877
- const [e, t] = w(() => window.innerWidth / window.innerHeight);
878
- return b(() => {
880
+ function Ve() {
881
+ const [n, t] = w(() => window.innerWidth / window.innerHeight);
882
+ return x(() => {
879
883
  const o = () => {
880
884
  t(window.innerWidth / window.innerHeight);
881
885
  };
882
886
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
883
- }, []), e;
887
+ }, []), n;
884
888
  }
885
- function Jn(e, t) {
889
+ function Je(n, t) {
886
890
  return {
887
- uiWidthFactor: Math.min(t, 1) / e,
888
- uiHeightFactor: Math.max(t, 1) / e
891
+ uiWidthFactor: Math.min(t, 1) / n,
892
+ uiHeightFactor: Math.max(t, 1) / n
889
893
  };
890
894
  }
891
895
  export {
892
- hn as SettingsBox,
893
- Ln as SettingsButtonFrame,
894
- Cn as SettingsCheckboxFrame,
895
- Pn as SettingsCheckboxLabel,
896
- Nn as SettingsColorFrame,
897
- _n as SettingsContainer,
898
- xn as SettingsDivider,
899
- Sn as SettingsError,
900
- vn as SettingsField,
901
- bn as SettingsHeading,
902
- yn as SettingsHint,
903
- wn as SettingsInputFrame,
904
- kn as SettingsLabel,
905
- Fn as SettingsRadioFrame,
906
- zn as SettingsRadioLabel,
907
- Rn as SettingsSelectFrame,
908
- Tn as SettingsSliderFrame,
909
- jn as SettingsSliderRuler,
910
- An as SettingsSwitchFrame,
911
- On as SettingsSwitchLabel,
912
- En as SettingsTextAreaFrame,
913
- Un as createUseApplicationStoreState,
914
- $n as createUseDeviceStoreState,
915
- Yn as createUseInstanceStoreState,
916
- Dn as createUseSharedStoreState,
917
- In as createUseStoreState,
918
- E as useStoreState,
919
- Wn as useUiAspectRatio,
920
- Jn as useUiResponsiveFactors,
921
- Mn as useUiScaleToSetRem
896
+ be as SettingsBox,
897
+ Ie as SettingsButtonFrame,
898
+ Pe as SettingsCheckboxFrame,
899
+ Fe as SettingsCheckboxLabel,
900
+ Ae as SettingsColorFrame,
901
+ _e as SettingsContainer,
902
+ ve as SettingsDivider,
903
+ we as SettingsError,
904
+ ke as SettingsField,
905
+ xe as SettingsHeading,
906
+ Ee as SettingsHint,
907
+ Se as SettingsInputFrame,
908
+ ye as SettingsLabel,
909
+ ze as SettingsRadioFrame,
910
+ Le as SettingsRadioLabel,
911
+ Te as SettingsSelectFrame,
912
+ je as SettingsSliderFrame,
913
+ Ne as SettingsSliderRuler,
914
+ Oe as SettingsSwitchFrame,
915
+ Ce as SettingsSwitchLabel,
916
+ Re as SettingsTextAreaFrame,
917
+ $e as createUseApplicationStoreState,
918
+ De as createUseDeviceStoreState,
919
+ Ue as createUseInstanceStoreState,
920
+ Me as createUseSharedStoreState,
921
+ Ye as createUseStoreState,
922
+ S as useStoreState,
923
+ Ve as useUiAspectRatio,
924
+ Je as useUiResponsiveFactors,
925
+ We as useUiScaleToSetRem
922
926
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telemetryos/sdk",
3
- "version": "1.8.1",
3
+ "version": "1.8.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",
@@ -42,7 +42,7 @@
42
42
  "license": "",
43
43
  "repository": "github:TelemetryTV/Application-API",
44
44
  "dependencies": {
45
- "@telemetryos/root-sdk": "^1.8.1",
45
+ "@telemetryos/root-sdk": "^1.8.3",
46
46
  "zod": "^3.24.4"
47
47
  },
48
48
  "peerDependencies": {