@walkeros/web-destination-meta 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev.d.mts +161 -0
- package/dist/dev.d.ts +161 -0
- package/dist/dev.js +1 -0
- package/dist/dev.js.map +1 -0
- package/dist/dev.mjs +1 -0
- package/dist/dev.mjs.map +1 -0
- package/dist/examples/index.js +26 -5518
- package/dist/examples/index.mjs +26 -5518
- package/dist/index.browser.js +1 -1
- package/dist/index.d.mts +15 -127
- package/dist/index.d.ts +15 -127
- package/dist/index.es5.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Destination as Destination$1, Mapping as Mapping$
|
|
1
|
+
import { Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
|
|
2
2
|
import { DestinationWeb } from '@walkeros/web-core';
|
|
3
|
-
import * as zod_to_json_schema from 'zod-to-json-schema';
|
|
4
3
|
|
|
5
4
|
declare global {
|
|
6
5
|
interface Window {
|
|
@@ -8,10 +7,10 @@ declare global {
|
|
|
8
7
|
fbq?: facebook.Pixel.Event;
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
|
-
interface Settings
|
|
10
|
+
interface Settings {
|
|
12
11
|
pixelId: string;
|
|
13
12
|
}
|
|
14
|
-
interface Mapping
|
|
13
|
+
interface Mapping {
|
|
15
14
|
track?: StandardEventNames;
|
|
16
15
|
trackCustom?: string;
|
|
17
16
|
}
|
|
@@ -27,137 +26,26 @@ interface Env extends DestinationWeb.Env {
|
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
|
-
type Types = Destination$1.Types<Settings
|
|
29
|
+
type Types = Destination$1.Types<Settings, Mapping, Env>;
|
|
31
30
|
type Destination = DestinationWeb.Destination<Types>;
|
|
32
31
|
type Config = DestinationWeb.Config<Types>;
|
|
33
|
-
type Rule = Mapping$
|
|
34
|
-
type Rules = Mapping$
|
|
32
|
+
type Rule = Mapping$1.Rule<Mapping>;
|
|
33
|
+
type Rules = Mapping$1.Rules<Rule>;
|
|
35
34
|
type StandardEventNames = 'PageView' | 'AddPaymentInfo' | 'AddToCart' | 'AddToWishlist' | 'CompleteRegistration' | 'Contact' | 'CustomizeProduct' | 'Donate' | 'FindLocation' | 'InitiateCheckout' | 'Lead' | 'Purchase' | 'Schedule' | 'Search' | 'StartTrial' | 'SubmitApplication' | 'Subscribe' | 'ViewContent' | string;
|
|
36
35
|
|
|
37
|
-
type
|
|
38
|
-
type
|
|
39
|
-
type
|
|
40
|
-
type index$2_Rule = Rule;
|
|
41
|
-
type index$2_Rules = Rules;
|
|
42
|
-
type index$2_StandardEventNames = StandardEventNames;
|
|
43
|
-
type index$2_Types = Types;
|
|
44
|
-
declare namespace index$2 {
|
|
45
|
-
export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, Mapping$1 as Mapping, index$2_Rule as Rule, index$2_Rules as Rules, Settings$1 as Settings, index$2_StandardEventNames as StandardEventNames, index$2_Types as Types };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
declare const init: Env | undefined;
|
|
49
|
-
declare const push: Env;
|
|
50
|
-
|
|
51
|
-
declare const env_init: typeof init;
|
|
52
|
-
declare const env_push: typeof push;
|
|
53
|
-
declare namespace env {
|
|
54
|
-
export { env_init as init, env_push as push };
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
declare function Purchase$1(): unknown[];
|
|
58
|
-
declare function AddToCart$1(): unknown[];
|
|
59
|
-
declare function InitiateCheckout$1(): unknown[];
|
|
60
|
-
declare function ViewContent$1(): unknown[];
|
|
61
|
-
|
|
62
|
-
declare namespace events {
|
|
63
|
-
export { AddToCart$1 as AddToCart, InitiateCheckout$1 as InitiateCheckout, Purchase$1 as Purchase, ViewContent$1 as ViewContent };
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare const Purchase: Rule;
|
|
67
|
-
declare const AddToCart: Rule;
|
|
68
|
-
declare const InitiateCheckout: Rule;
|
|
69
|
-
declare const ViewContent: Rule;
|
|
70
|
-
declare const config: {
|
|
71
|
-
order: {
|
|
72
|
-
complete: Rule;
|
|
73
|
-
};
|
|
74
|
-
product: {
|
|
75
|
-
view: Rule;
|
|
76
|
-
add: Rule;
|
|
77
|
-
};
|
|
78
|
-
cart: {
|
|
79
|
-
view: Rule;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
declare const mapping$1_AddToCart: typeof AddToCart;
|
|
84
|
-
declare const mapping$1_InitiateCheckout: typeof InitiateCheckout;
|
|
85
|
-
declare const mapping$1_Purchase: typeof Purchase;
|
|
86
|
-
declare const mapping$1_ViewContent: typeof ViewContent;
|
|
87
|
-
declare const mapping$1_config: typeof config;
|
|
88
|
-
declare namespace mapping$1 {
|
|
89
|
-
export { mapping$1_AddToCart as AddToCart, mapping$1_InitiateCheckout as InitiateCheckout, mapping$1_Purchase as Purchase, mapping$1_ViewContent as ViewContent, mapping$1_config as config };
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
declare const index$1_env: typeof env;
|
|
93
|
-
declare const index$1_events: typeof events;
|
|
94
|
-
declare namespace index$1 {
|
|
95
|
-
export { index$1_env as env, index$1_events as events, mapping$1 as mapping };
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Meta Pixel ID
|
|
100
|
-
* Must be a numeric string (Facebook Pixel IDs are numeric)
|
|
101
|
-
*/
|
|
102
|
-
declare const PixelId: z.ZodString;
|
|
103
|
-
/**
|
|
104
|
-
* Meta Pixel Standard Event Names
|
|
105
|
-
* https://developers.facebook.com/docs/meta-pixel/reference
|
|
106
|
-
*/
|
|
107
|
-
declare const StandardEventName: z.ZodEnum<["PageView", "AddPaymentInfo", "AddToCart", "AddToWishlist", "CompleteRegistration", "Contact", "CustomizeProduct", "Donate", "FindLocation", "InitiateCheckout", "Lead", "Purchase", "Schedule", "Search", "StartTrial", "SubmitApplication", "Subscribe", "ViewContent"]>;
|
|
108
|
-
/**
|
|
109
|
-
* Custom Event Name
|
|
110
|
-
* Any string for custom tracking
|
|
111
|
-
*/
|
|
112
|
-
declare const CustomEventName: z.ZodString;
|
|
113
|
-
|
|
114
|
-
declare const SettingsSchema: z.ZodObject<{
|
|
115
|
-
pixelId: z.ZodString;
|
|
116
|
-
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
pixelId: string;
|
|
118
|
-
}, {
|
|
119
|
-
pixelId: string;
|
|
120
|
-
}>;
|
|
121
|
-
type Settings = z.infer<typeof SettingsSchema>;
|
|
122
|
-
|
|
123
|
-
declare const MappingSchema: z.ZodObject<{
|
|
124
|
-
track: z.ZodOptional<z.ZodEnum<["PageView", "AddPaymentInfo", "AddToCart", "AddToWishlist", "CompleteRegistration", "Contact", "CustomizeProduct", "Donate", "FindLocation", "InitiateCheckout", "Lead", "Purchase", "Schedule", "Search", "StartTrial", "SubmitApplication", "Subscribe", "ViewContent"]>>;
|
|
125
|
-
trackCustom: z.ZodOptional<z.ZodString>;
|
|
126
|
-
}, "strip", z.ZodTypeAny, {
|
|
127
|
-
track?: "PageView" | "AddPaymentInfo" | "AddToCart" | "AddToWishlist" | "CompleteRegistration" | "Contact" | "CustomizeProduct" | "Donate" | "FindLocation" | "InitiateCheckout" | "Lead" | "Purchase" | "Schedule" | "Search" | "StartTrial" | "SubmitApplication" | "Subscribe" | "ViewContent" | undefined;
|
|
128
|
-
trackCustom?: string | undefined;
|
|
129
|
-
}, {
|
|
130
|
-
track?: "PageView" | "AddPaymentInfo" | "AddToCart" | "AddToWishlist" | "CompleteRegistration" | "Contact" | "CustomizeProduct" | "Donate" | "FindLocation" | "InitiateCheckout" | "Lead" | "Purchase" | "Schedule" | "Search" | "StartTrial" | "SubmitApplication" | "Subscribe" | "ViewContent" | undefined;
|
|
131
|
-
trackCustom?: string | undefined;
|
|
132
|
-
}>;
|
|
133
|
-
type Mapping = z.infer<typeof MappingSchema>;
|
|
134
|
-
|
|
135
|
-
declare const settings: zod_to_json_schema.JsonSchema7Type & {
|
|
136
|
-
$schema?: string | undefined;
|
|
137
|
-
definitions?: {
|
|
138
|
-
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
139
|
-
} | undefined;
|
|
140
|
-
};
|
|
141
|
-
declare const mapping: zod_to_json_schema.JsonSchema7Type & {
|
|
142
|
-
$schema?: string | undefined;
|
|
143
|
-
definitions?: {
|
|
144
|
-
[key: string]: zod_to_json_schema.JsonSchema7Type;
|
|
145
|
-
} | undefined;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
declare const index_CustomEventName: typeof CustomEventName;
|
|
36
|
+
type index_Config = Config;
|
|
37
|
+
type index_Destination = Destination;
|
|
38
|
+
type index_Env = Env;
|
|
149
39
|
type index_Mapping = Mapping;
|
|
150
|
-
|
|
151
|
-
|
|
40
|
+
type index_Rule = Rule;
|
|
41
|
+
type index_Rules = Rules;
|
|
152
42
|
type index_Settings = Settings;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
declare const index_mapping: typeof mapping;
|
|
156
|
-
declare const index_settings: typeof settings;
|
|
43
|
+
type index_StandardEventNames = StandardEventNames;
|
|
44
|
+
type index_Types = Types;
|
|
157
45
|
declare namespace index {
|
|
158
|
-
export {
|
|
46
|
+
export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_Mapping as Mapping, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_StandardEventNames as StandardEventNames, index_Types as Types };
|
|
159
47
|
}
|
|
160
48
|
|
|
161
49
|
declare const destinationMeta: Destination;
|
|
162
50
|
|
|
163
|
-
export { index
|
|
51
|
+
export { index as DestinationMeta, destinationMeta as default, destinationMeta };
|
package/dist/index.es5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,a)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){asyncGeneratorStep(i,r,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,r,a,o,s,"throw",e)}o(void 0)})}}function _call_super(e,t,n){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,n||[],_get_prototype_of(e).constructor):t.apply(e,n))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,n){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&_set_prototype_of(a,n.prototype),a},_construct.apply(null,arguments)}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _object_without_properties(e,t){if(null==e)return{};var n,r,a=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function _object_without_properties_loose(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(n,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&s[0]?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var Destination=function(){var e=function(e){ee=e},t=function(){return ee},n=function(e,n){var r=t(),a=te({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===X?void 0:X].filter(function(e){return!!e})});e.common.issues.push(a)},r=function(e){if(!e)return{};var t=e.errorMap,n=e.invalid_type_error,r=e.required_error,a=e.description;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:function(t,a){var i,o,s=e.message;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(i=null!=s?s:r)&&void 0!==i?i:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(o=null!=s?s:n)&&void 0!==o?o:a.defaultError}},description:a}},a=function(e){var t="[0-5]\\d";e.precision?t="".concat(t,"\\.\\d{").concat(e.precision,"}"):null==e.precision&&(t="".concat(t,"(\\.\\d+)?"));var n=e.precision?"+":"?";return"([01]\\d|2[0-3]):[0-5]\\d(:".concat(t,")").concat(n)},i=function(e){return new RegExp("^".concat(a(e),"$"))},o=function(e){var t="".concat(Ze,"T").concat(a(e)),n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t="".concat(t,"(").concat(n.join("|"),")"),new RegExp("^".concat(t,"$"))},s=function(e,t){return!("v4"!==t&&t||!Se.test(e))||!("v6"!==t&&t||!xe.test(e))},c=function(e,t){if(!be.test(e))return!1;try{var n=_sliced_to_array(e.split("."),1)[0];if(!n)return!1;var r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return"object"===(void 0===a?"undefined":_type_of(a))&&null!==a&&((!("typ"in a)||"JWT"===(null==a?void 0:a.typ))&&(!!a.alg&&(!t||a.alg===t)))}catch(e){return!1}},u=function(e,t){return!("v4"!==t&&t||!we.test(e))||!("v6"!==t&&t||!Pe.test(e))},l=function(e,t){var n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r;return Number.parseInt(e.toFixed(a).replace(".",""))%Number.parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)},d=function(e,t){return new at(_object_spread({values:e,typeName:yt.ZodEnum},r(t)))},p=function(e,t){var n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e?Le.create().superRefine(function(r,a){var i=e(r);if(_instanceof(i,Promise))return i.then(function(e){if(!e){var i,o,s=p(t,r),c=null===(o=null!==(i=s.fatal)&&void 0!==i?i:n)||void 0===o||o;a.addIssue(_object_spread_props(_object_spread({code:"custom"},s),{fatal:c}))}});if(!i){var o,s,c=p(t,r),u=null===(s=null!==(o=c.fatal)&&void 0!==o?o:n)||void 0===s||s;a.addIssue(_object_spread_props(_object_spread({code:"custom"},c),{fatal:u}))}}):Le.create()},_=function(e,t,n,r){(null==r?void 0:r.errorMessages)&&n&&(e.errorMessage=_object_spread_props(_object_spread({},e.errorMessage),_define_property({},t,n)))},h=function(e,t,n,r,a){e[t]=n,_(e,t,r,a)},m=function(e){if("openAi"!==e.target)return{};var t=_to_consumable_array(e.basePath).concat([e.definitionPath,e.openAiAnyTypeName]);return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?ln(t,e.currentPath):t.join("/")}},y=function(e,t){return bn(e.type._def,t)},v=function(e,t){var n={type:"string"};if(e.checks){var r=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;switch(c.kind){case"min":h(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,c.value):c.value,c.message,t);break;case"max":h(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,c.value):c.value,c.message,t);break;case"email":switch(t.emailStrategy){case"format:email":k(n,"email",c.message,t);break;case"format:idn-email":k(n,"idn-email",c.message,t);break;case"pattern:zod":j(n,hn.email,c.message,t)}break;case"url":k(n,"uri",c.message,t);break;case"uuid":k(n,"uuid",c.message,t);break;case"regex":j(n,c.regex,c.message,t);break;case"cuid":j(n,hn.cuid,c.message,t);break;case"cuid2":j(n,hn.cuid2,c.message,t);break;case"startsWith":j(n,RegExp("^".concat(g(c.value,t))),c.message,t);break;case"endsWith":j(n,RegExp("".concat(g(c.value,t),"$")),c.message,t);break;case"datetime":k(n,"date-time",c.message,t);break;case"date":k(n,"date",c.message,t);break;case"time":k(n,"time",c.message,t);break;case"duration":k(n,"duration",c.message,t);break;case"length":h(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,c.value):c.value,c.message,t),h(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,c.value):c.value,c.message,t);break;case"includes":j(n,RegExp(g(c.value,t)),c.message,t);break;case"ip":"v6"!==c.version&&k(n,"ipv4",c.message,t),"v4"!==c.version&&k(n,"ipv6",c.message,t);break;case"base64url":j(n,hn.base64url,c.message,t);break;case"jwt":j(n,hn.jwt,c.message,t);break;case"cidr":"v6"!==c.version&&j(n,hn.ipv4Cidr,c.message,t),"v4"!==c.version&&j(n,hn.ipv6Cidr,c.message,t);break;case"emoji":j(n,hn.emoji(),c.message,t);break;case"ulid":j(n,hn.ulid,c.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":k(n,"binary",c.message,t);break;case"contentEncoding:base64":h(n,"contentEncoding","base64",c.message,t);break;case"pattern:zod":j(n,hn.base64,c.message,t)}break;case"nanoid":j(n,hn.nanoid,c.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:(function(){})()}}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}}return n},g=function(e,t){return"escape"===t.patternStrategy?b(e):e},b=function(e){for(var t="",n=0;n<e.length;n++)mn.has(e[n])||(t+="\\"),t+=e[n];return t},k=function(e,t,n,r){var a;e.format||(null===(a=e.anyOf)||void 0===a?void 0:a.some(function(e){return e.format}))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push(_object_spread({format:e.format},e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}})),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push(_object_spread({format:t},n&&r.errorMessages&&{errorMessage:{format:n}}))):h(e,"format",t,n,r)},j=function(e,t,n,r){var a;e.pattern||(null===(a=e.allOf)||void 0===a?void 0:a.some(function(e){return e.pattern}))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push(_object_spread({pattern:e.pattern},e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}})),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push(_object_spread({pattern:S(t,r)},n&&r.errorMessages&&{errorMessage:{pattern:n}}))):h(e,"pattern",S(t,r),n,r)},S=function(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;for(var n=e.flags.includes("i"),r=e.flags.includes("m"),a=e.flags.includes("s"),i=n?e.source.toLowerCase():e.source,o="",s=!1,c=!1,u=!1,l=0;l<i.length;l++)if(s)o+=i[l],s=!1;else{if(n)if(c){if(i[l].match(/[a-z]/)){var d;u?(o+=i[l],o+="".concat(i[l-2],"-").concat(i[l]).toUpperCase(),u=!1):"-"===i[l+1]&&(null===(d=i[l+2])||void 0===d?void 0:d.match(/[a-z]/))?(o+=i[l],u=!0):o+="".concat(i[l]).concat(i[l].toUpperCase());continue}}else if(i[l].match(/[a-z]/)){o+="[".concat(i[l]).concat(i[l].toUpperCase(),"]");continue}if(r){if("^"===i[l]){o+="(^|(?<=[\r\n]))";continue}if("$"===i[l]){o+="($|(?=[\r\n]))";continue}}a&&"."===i[l]?o+=c?"".concat(i[l],"\r\n"):"[".concat(i[l],"\r\n]"):(o+=i[l],"\\"===i[l]?s=!0:c&&"]"===i[l]?c=!1:c||"["!==i[l]||(c=!0))}try{new RegExp(o)}catch(n){return console.warn("Could not convert regex pattern at ".concat(t.currentPath.join("/")," to a flag-independent form! Falling back to the flag-ignorant source")),e.source}return o},w=function(e,t){var n,r,a,i,o,s,c;if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&(null===(n=e.keyType)||void 0===n?void 0:n._def.typeName)===yt.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce(function(n,r){var a;return _object_spread_props(_object_spread({},n),_define_property({},r,null!==(a=bn(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["properties",r])})))&&void 0!==a?a:m(t)))},{}),additionalProperties:t.rejectedAdditionalProperties};var u={type:"object",additionalProperties:null!==(c=bn(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalProperties"])})))&&void 0!==c?c:t.allowedAdditionalProperties};if("openApi3"===t.target)return u;if((null===(r=e.keyType)||void 0===r?void 0:r._def.typeName)===yt.ZodString&&(null===(a=e.keyType._def.checks)||void 0===a?void 0:a.length)){var l=v(e.keyType._def,t),d=(l.type,_object_without_properties(l,["type"]));return _object_spread_props(_object_spread({},u),{propertyNames:d})}if((null===(i=e.keyType)||void 0===i?void 0:i._def.typeName)===yt.ZodEnum)return _object_spread_props(_object_spread({},u),{propertyNames:{enum:e.keyType._def.values}});if((null===(o=e.keyType)||void 0===o?void 0:o._def.typeName)===yt.ZodBranded&&e.keyType._def.type._def.typeName===yt.ZodString&&(null===(s=e.keyType._def.type._def.checks)||void 0===s?void 0:s.length)){var p=y(e.keyType._def,t),f=(p.type,_object_without_properties(p,["type"]));return _object_spread_props(_object_spread({},u),{propertyNames:f})}return u},x=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return bn(e.catchall._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalProperties"])}));switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}},P=function(e){try{return e.isOptional()}catch(e){return!0}},O=function(e){return Sn(e,{target:"jsonSchema7",$refStrategy:"none"})},A=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.timestamp||(new Date).setHours(0,13,37,0),n=e.group||"gr0up",r=e.count||1,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=_object_spread({},Aa,n);var r=Object.entries(t).reduce(function(t,r){var a=_sliced_to_array(r,2),i=a[0],o=a[1],s=e[i];return n.merge&&Array.isArray(s)&&Array.isArray(o)?t[i]=o.reduce(function(e,t){return e.includes(t)?e:_to_consumable_array(e).concat([t])},_to_consumable_array(s)):(n.extend||i in e)&&(t[i]=o),t},{});return n.shallow?_object_spread({},e,r):(Object.assign(e,r),e)}({name:"entity action",data:{string:"foo",number:1,boolean:!0,array:[0,"text",!1],not:void 0},context:{dev:["test",1]},globals:{lang:"elb"},custom:{completely:"random"},user:{id:"us3r",device:"c00k13",session:"s3ss10n"},nested:[{entity:"child",data:{is:"subordinated"},nested:[],context:{element:["child",0]}}],consent:{functional:!0},id:"".concat(t,"-").concat(n,"-").concat(r),trigger:"test",entity:"entity",action:"action",timestamp:t,timing:3.14,group:n,count:r,version:{source:"0.3.0",tagging:1},source:{type:"web",id:"https://localhost:80",previous_id:"http://remotehost:9001"}},e,{merge:!1});if(e.name){var i,o=_sliced_to_array(null!==(i=e.name.split(" "))&&void 0!==i?i:[],2),s=o[0],c=o[1];s&&c&&(a.entity=s,a.action=c)}return a},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"entity action",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.timestamp||(new Date).setHours(0,13,37,0),r={data:{id:"ers",name:"Everyday Ruck Snack",color:"black",size:"l",price:420}},a={data:{id:"cc",name:"Cool Cap",size:"one size",price:42}};return Z(_object_spread_props(_object_spread({},{"cart view":{data:{currency:"EUR",value:2*r.data.price},context:{shopping:["cart",0]},globals:{pagegroup:"shop"},nested:[{entity:"product",data:_object_spread_props(_object_spread({},r.data),{quantity:2}),context:{shopping:["cart",0]},nested:[]}],trigger:"load"},"checkout view":{data:{step:"payment",currency:"EUR",value:r.data.price+a.data.price},context:{shopping:["checkout",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},r),{context:{shopping:["checkout",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["checkout",0]},nested:[]})],trigger:"load"},"order complete":{data:{id:"0rd3r1d",currency:"EUR",shipping:5.22,taxes:73.76,total:555},context:{shopping:["complete",0]},globals:{pagegroup:"shop"},nested:[_object_spread_props(_object_spread({entity:"product"},r),{context:{shopping:["complete",0]},nested:[]}),_object_spread_props(_object_spread({entity:"product"},a),{context:{shopping:["complete",0]},nested:[]}),{entity:"gift",data:{name:"Surprise"},context:{shopping:["complete",0]},nested:[]}],trigger:"load"},"page view":{data:{domain:"www.example.com",title:"walkerOS documentation",referrer:"https://www.elbwalker.com/",search:"?foo=bar",hash:"#hash",id:"/docs/"},globals:{pagegroup:"docs"},trigger:"load"},"product add":_object_spread_props(_object_spread({},r),{context:{shopping:["intent",0]},globals:{pagegroup:"shop"},nested:[],trigger:"click"}),"product view":_object_spread_props(_object_spread({},r),{context:{shopping:["detail",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"}),"product visible":{data:_object_spread_props(_object_spread({},r.data),{position:3,promo:!0}),context:{shopping:["discover",0]},globals:{pagegroup:"shop"},nested:[],trigger:"load"},"promotion visible":{data:{name:"Setting up tracking easily",position:"hero"},context:{ab_test:["engagement",0]},globals:{pagegroup:"homepage"},trigger:"visible"},"session start":{data:{id:"s3ss10n",start:n,isNew:!0,count:1,runs:1,isStart:!0,storage:!0,referrer:"",device:"c00k13"},user:{id:"us3r",device:"c00k13",session:"s3ss10n",hash:"h4sh",address:"street number",email:"user@example.com",phone:"+49 123 456 789",userAgent:"Mozilla...",browser:"Chrome",browserVersion:"90",deviceType:"desktop",language:"de-DE",country:"DE",region:"HH",city:"Hamburg",zip:"20354",timezone:"Berlin",os:"walkerOS",osVersion:"1.0",screenSize:"1337x420",ip:"127.0.0.0",internal:!0,custom:"value"}}}[e],t),{name:e}))},T=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},E=function(){var e=C("order complete");return["track","Purchase",{value:e.data.total,currency:"EUR",contents:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{id:e.data.id,quantity:1}}),content_type:"product",num_items:2},{eventID:e.id}]},I=function(){var e=C("product add");return["track","AddToCart",{currency:"EUR",value:e.data.price,contents:[{id:e.data.id,quantity:1}],content_type:"product"},{eventID:e.id}]},N=function(){var e=C("cart view");return["track","InitiateCheckout",{currency:"EUR",value:e.data.value,contents:e.nested.filter(function(e){return"product"===e.entity}).map(function(e){return{id:e.data.id,quantity:e.data.quantity}}),num_items:e.nested.filter(function(e){return"product"===e.entity}).length},{eventID:e.id}]},M=function(){var e=C("product view");return["track","ViewContent",{currency:"EUR",value:e.data.price,contents:[{id:e.data.id,quantity:1}],content_type:"product"},{eventID:e.id}]},R=Object.defineProperty,D=Object.getOwnPropertyDescriptor,z=Object.getOwnPropertyNames,L=Object.prototype.hasOwnProperty,$=function(e,t){for(var n in t)R(e,n,{get:t[n],enumerable:!0})},F={};$(F,{DestinationMeta:function(){return Za},default:function(){return Qa},destinationMeta:function(){return Ya},examples:function(){return Ca},schemas:function(){return Ua}});var U,q,V,B={};$(B,{BRAND:function(){return ft},DIRTY:function(){return ie},EMPTY_PATH:function(){return ne},INVALID:function(){return ae},NEVER:function(){return on},OK:function(){return oe},ParseStatus:function(){return re},Schema:function(){return _e},ZodAny:function(){return Le},ZodArray:function(){return qe},ZodBigInt:function(){return Ie},ZodBoolean:function(){return Ne},ZodBranded:function(){return _t},ZodCatch:function(){return dt},ZodDate:function(){return Me},ZodDefault:function(){return lt},ZodDiscriminatedUnion:function(){return Ke},ZodEffects:function(){return st},ZodEnum:function(){return at},ZodError:function(){return G},ZodFirstPartyTypeKind:function(){return yt},ZodFunction:function(){return tt},ZodIntersection:function(){return Ge},ZodIssueCode:function(){return K},ZodLazy:function(){return nt},ZodLiteral:function(){return rt},ZodMap:function(){return Xe},ZodNaN:function(){return pt},ZodNativeEnum:function(){return it},ZodNever:function(){return Fe},ZodNull:function(){return ze},ZodNullable:function(){return ut},ZodNumber:function(){return Ee},ZodObject:function(){return Be},ZodOptional:function(){return ct},ZodParsedType:function(){return J},ZodPipeline:function(){return ht},ZodPromise:function(){return ot},ZodReadonly:function(){return mt},ZodRecord:function(){return Qe},ZodSchema:function(){return _e},ZodSet:function(){return et},ZodString:function(){return Te},ZodSymbol:function(){return Re},ZodTransformer:function(){return st},ZodTuple:function(){return Ye},ZodType:function(){return _e},ZodUndefined:function(){return De},ZodUnion:function(){return Je},ZodUnknown:function(){return $e},ZodVoid:function(){return Ue},addIssueToContext:function(){return n},any:function(){return Ct},array:function(){return Nt},bigint:function(){return wt},boolean:function(){return xt},coerce:function(){return an},custom:function(){return f},date:function(){return Pt},datetimeRegex:function(){return o},defaultErrorMap:function(){return X},discriminatedUnion:function(){return zt},effect:function(){return Gt},enum:function(){return Wt},function:function(){return Vt},getErrorMap:function(){return t},getParsedType:function(){return W},instanceof:function(){return bt},intersection:function(){return Lt},isAborted:function(){return se},isAsync:function(){return le},isDirty:function(){return ce},isValid:function(){return ue},late:function(){return gt},lazy:function(){return Bt},literal:function(){return Jt},makeIssue:function(){return te},map:function(){return Ut},nan:function(){return St},nativeEnum:function(){return Kt},never:function(){return Et},null:function(){return Zt},nullable:function(){return Qt},number:function(){return jt},object:function(){return Mt},objectUtil:function(){return V},oboolean:function(){return rn},onumber:function(){return nn},optional:function(){return Yt},ostring:function(){return tn},pipeline:function(){return en},preprocess:function(){return Xt},promise:function(){return Ht},quotelessJson:function(){return H},record:function(){return Ft},set:function(){return qt},setErrorMap:function(){return e},strictObject:function(){return Rt},string:function(){return kt},symbol:function(){return Ot},transformer:function(){return Gt},tuple:function(){return $t},undefined:function(){return At},union:function(){return Dt},unknown:function(){return Tt},util:function(){return U},void:function(){return It}}),(q=U||(U={})).assertEqual=function(e){},q.assertIs=function(e){},q.assertNever=function(e){throw new Error},q.arrayToEnum=function(e){var t={},n=!0,r=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value;t[s]=s}}catch(e){r=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}return t},q.getValidEnumValues=function(e){var t=q.objectKeys(e).filter(function(t){return"number"!=typeof e[e[t]]}),n={},r=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n[c]=e[c]}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return q.objectValues(n)},q.objectValues=function(e){return q.objectKeys(e).map(function(t){return e[t]})},q.objectKeys="function"==typeof Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},q.find=function(e,t){var n=!0,r=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value;if(t(s))return s}}catch(e){r=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}},q.isInteger="function"==typeof Number.isInteger?function(e){return Number.isInteger(e)}:function(e){return"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e},q.joinValues=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" | ";return e.map(function(e){return"string"==typeof e?"'".concat(e,"'"):e}).join(t)},q.jsonStringifyReplacer=function(e,t){return"bigint"===(void 0===t?"undefined":_type_of(t))?t.toString():t},(V||(V={})).mergeShapes=function(e,t){return _object_spread({},e,t)};var J=U.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),W=function(e){switch(void 0===e?"undefined":_type_of(e)){case"undefined":return J.undefined;case"string":return J.string;case"number":return Number.isNaN(e)?J.nan:J.number;case"boolean":return J.boolean;case"function":return J.function;case"bigint":return J.bigint;case"symbol":return J.symbol;case"object":return Array.isArray(e)?J.array:null===e?J.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?J.promise:"undefined"!=typeof Map&&_instanceof(e,Map)?J.map:"undefined"!=typeof Set&&_instanceof(e,Set)?J.set:"undefined"!=typeof Date&&_instanceof(e,Date)?J.date:J.object;default:return J.unknown}},K=U.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),H=function(e){return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")},G=function(e){function t(e){var n;_class_call_check(this,t),(n=_call_super(this,t)).issues=[],n.addIssue=function(e){n.issues=_to_consumable_array(n.issues).concat([e])},n.addIssues=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];n.issues=_to_consumable_array(n.issues).concat(_to_consumable_array(e))};var r=(_instanceof(this,t)?this.constructor:void 0).prototype;return Object.setPrototypeOf?Object.setPrototypeOf(n,r):n.__proto__=r,n.name="ZodError",n.issues=e,n}return _inherits(t,e),_create_class(t,[{key:"errors",get:function(){return this.issues}},{key:"format",value:function(e){var t=e||function(e){return e.message},n={_errors:[]},r=function(e){var a=!0,i=!1,o=void 0;try{for(var s,c=e.issues[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var u=s.value;if("invalid_union"===u.code)u.unionErrors.map(r);else if("invalid_return_type"===u.code)r(u.returnTypeError);else if("invalid_arguments"===u.code)r(u.argumentsError);else if(0===u.path.length)n._errors.push(t(u));else for(var l=n,d=0;d<u.path.length;){var p=u.path[d];d===u.path.length-1?(l[p]=l[p]||{_errors:[]},l[p]._errors.push(t(u))):l[p]=l[p]||{_errors:[]},l=l[p],d++}}}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}};return r(this),n}},{key:"toString",value:function(){return this.message}},{key:"message",get:function(){return JSON.stringify(this.issues,U.jsonStringifyReplacer,2)}},{key:"isEmpty",get:function(){return 0===this.issues.length}},{key:"flatten",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.message},t={},n=[],r=!0,a=!1,i=void 0;try{for(var o,s=this.issues[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if(c.path.length>0){var u=c.path[0];t[u]=t[u]||[],t[u].push(e(c))}else n.push(e(c))}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return{formErrors:n,fieldErrors:t}}},{key:"formErrors",get:function(){return this.flatten()}}],[{key:"assert",value:function(e){if(!_instanceof(e,t))throw new Error("Not a ZodError: ".concat(e))}}]),t}(_wrap_native_super(Error));G.create=function(e){return new G(e)};var Y,Q,X=function(e,t){var n;switch(e.code){case K.invalid_type:n=e.received===J.undefined?"Required":"Expected ".concat(e.expected,", received ").concat(e.received);break;case K.invalid_literal:n="Invalid literal value, expected ".concat(JSON.stringify(e.expected,U.jsonStringifyReplacer));break;case K.unrecognized_keys:n="Unrecognized key(s) in object: ".concat(U.joinValues(e.keys,", "));break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n="Invalid discriminator value. Expected ".concat(U.joinValues(e.options));break;case K.invalid_enum_value:n="Invalid enum value. Expected ".concat(U.joinValues(e.options),", received '").concat(e.received,"'");break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:"object"===_type_of(e.validation)?"includes"in e.validation?(n='Invalid input: must include "'.concat(e.validation.includes,'"'),"number"==typeof e.validation.position&&(n="".concat(n," at one or more positions greater than or equal to ").concat(e.validation.position))):"startsWith"in e.validation?n='Invalid input: must start with "'.concat(e.validation.startsWith,'"'):"endsWith"in e.validation?n='Invalid input: must end with "'.concat(e.validation.endsWith,'"'):U.assertNever(e.validation):n="regex"!==e.validation?"Invalid ".concat(e.validation):"Invalid";break;case K.too_small:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"more than"," ").concat(e.minimum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at least":"over"," ").concat(e.minimum," character(s)"):"number"===e.type||"bigint"===e.type?"Number must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(e.minimum):"date"===e.type?"Date must be ".concat(e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than ").concat(new Date(Number(e.minimum))):"Invalid input";break;case K.too_big:n="array"===e.type?"Array must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"less than"," ").concat(e.maximum," element(s)"):"string"===e.type?"String must contain ".concat(e.exact?"exactly":e.inclusive?"at most":"under"," ").concat(e.maximum," character(s)"):"number"===e.type?"Number must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"bigint"===e.type?"BigInt must be ".concat(e.exact?"exactly":e.inclusive?"less than or equal to":"less than"," ").concat(e.maximum):"date"===e.type?"Date must be ".concat(e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"," ").concat(new Date(Number(e.maximum))):"Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n="Number must be a multiple of ".concat(e.multipleOf);break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,U.assertNever(e)}return{message:n}},ee=X,te=function(e){var t=e.data,n=e.path,r=e.errorMaps,a=e.issueData,i=_to_consumable_array(n).concat(_to_consumable_array(a.path||[])),o=_object_spread_props(_object_spread({},a),{path:i});if(void 0!==a.message)return _object_spread_props(_object_spread({},a),{path:i,message:a.message});var s="",c=r.filter(function(e){return!!e}).slice().reverse(),u=!0,l=!1,d=void 0;try{for(var p,f=c[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){s=(0,p.value)(o,{data:t,defaultError:s}).message}}catch(e){l=!0,d=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw d}}return _object_spread_props(_object_spread({},a),{path:i,message:s})},ne=[],re=function(){function e(){_class_call_check(this,e),this.value="valid"}return _create_class(e,[{key:"dirty",value:function(){"valid"===this.value&&(this.value="dirty")}},{key:"abort",value:function(){"aborted"!==this.value&&(this.value="aborted")}}],[{key:"mergeArray",value:function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if("aborted"===c.status)return ae;"dirty"===c.status&&e.dirty(),n.push(c.value)}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return{status:e.value,value:n}}},{key:"mergeObjectAsync",value:function(t,n){return _async_to_generator(function(){var r,a,i,o,s,c,u,l,d,p;return _ts_generator(this,function(f){switch(f.label){case 0:r=[],a=!0,i=!1,o=void 0,f.label=1;case 1:f.trys.push([1,7,8,9]),s=n[Symbol.iterator](),f.label=2;case 2:return(a=(c=s.next()).done)?[3,6]:[4,(u=c.value).key];case 3:return l=f.sent(),[4,u.value];case 4:d=f.sent(),r.push({key:l,value:d}),f.label=5;case 5:return a=!0,[3,2];case 6:return[3,9];case 7:return p=f.sent(),i=!0,o=p,[3,9];case 8:try{a||null==s.return||s.return()}finally{if(i)throw o}return[7];case 9:return[2,e.mergeObjectSync(t,r)]}})})()}},{key:"mergeObjectSync",value:function(e,t){var n={},r=!0,a=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value,u=c.key,l=c.value;if("aborted"===u.status)return ae;if("aborted"===l.status)return ae;"dirty"===u.status&&e.dirty(),"dirty"===l.status&&e.dirty(),"__proto__"===u.value||void 0===l.value&&!c.alwaysSet||(n[u.value]=l.value)}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return{status:e.value,value:n}}}]),e}(),ae=Object.freeze({status:"aborted"}),ie=function(e){return{status:"dirty",value:e}},oe=function(e){return{status:"valid",value:e}},se=function(e){return"aborted"===e.status},ce=function(e){return"dirty"===e.status},ue=function(e){return"valid"===e.status},le=function(e){return"undefined"!=typeof Promise&&_instanceof(e,Promise)};(Q=Y||(Y={})).errToObj=function(e){return"string"==typeof e?{message:e}:e||{}},Q.toString=function(e){return"string"==typeof e?e:null==e?void 0:e.message};var de,pe=function(){function e(t,n,r,a){_class_call_check(this,e),this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}return _create_class(e,[{key:"path",get:function(){var e,t;this._cachedPath.length||(Array.isArray(this._key)?(e=this._cachedPath).push.apply(e,_to_consumable_array(this._path).concat(_to_consumable_array(this._key))):(t=this._cachedPath).push.apply(t,_to_consumable_array(this._path).concat([this._key])));return this._cachedPath}}]),e}(),fe=function(e,t){if(ue(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;var t=new G(e.common.issues);return this._error=t,this._error}}},_e=function(){function e(t){var n=this;_class_call_check(this,e),this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:function(e){return n["~validate"](e)}}}return _create_class(e,[{key:"description",get:function(){return this._def.description}},{key:"_getType",value:function(e){return W(e.data)}},{key:"_getOrReturnCtx",value:function(e,t){return t||{common:e.parent.common,data:e.data,parsedType:W(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}},{key:"_processInputParams",value:function(e){return{status:new re,ctx:{common:e.parent.common,data:e.data,parsedType:W(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}},{key:"_parseSync",value:function(e){var t=this._parse(e);if(le(t))throw new Error("Synchronous parse encountered promise.");return t}},{key:"_parseAsync",value:function(e){var t=this._parse(e);return Promise.resolve(t)}},{key:"parse",value:function(e,t){var n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}},{key:"safeParse",value:function(e,t){var n,r={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W(e)},a=this._parseSync({data:e,path:r.path,parent:r});return fe(r,a)}},{key:"~validate",value:function(e){var t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W(e)};if(!this["~standard"].async)try{var n=this._parseSync({data:e,path:[],parent:t});return ue(n)?{value:n.value}:{issues:t.common.issues}}catch(e){var r,a;(null==e||null===(a=e.message)||void 0===a||null===(r=a.toLowerCase())||void 0===r?void 0:r.includes("encountered"))&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(function(e){return ue(e)?{value:e.value}:{issues:t.common.issues}})}},{key:"parseAsync",value:function(e,t){return _async_to_generator(function(){var n;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,this.safeParseAsync(e,t)];case 1:if((n=r.sent()).success)return[2,n.data];throw n.error}})}).call(this)}},{key:"safeParseAsync",value:function(e,t){return _async_to_generator(function(){var n,r,a;return _ts_generator(this,function(i){switch(i.label){case 0:return n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:W(e)},r=this._parse({data:e,path:n.path,parent:n}),[4,le(r)?r:Promise.resolve(r)];case 1:return a=i.sent(),[2,fe(n,a)]}})}).call(this)}},{key:"refine",value:function(e,t){return this._refinement(function(n,r){var a=e(n),i=function(){return r.addIssue(_object_spread({code:K.custom},function(e){return"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t}(n)))};return"undefined"!=typeof Promise&&_instanceof(a,Promise)?a.then(function(e){return!!e||(i(),!1)}):!!a||(i(),!1)})}},{key:"refinement",value:function(e,t){return this._refinement(function(n,r){return!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1)})}},{key:"_refinement",value:function(e){return new st({schema:this,typeName:yt.ZodEffects,effect:{type:"refinement",refinement:e}})}},{key:"superRefine",value:function(e){return this._refinement(e)}},{key:"optional",value:function(){return ct.create(this,this._def)}},{key:"nullable",value:function(){return ut.create(this,this._def)}},{key:"nullish",value:function(){return this.nullable().optional()}},{key:"array",value:function(){return qe.create(this)}},{key:"promise",value:function(){return ot.create(this,this._def)}},{key:"or",value:function(e){return Je.create([this,e],this._def)}},{key:"and",value:function(e){return Ge.create(this,e,this._def)}},{key:"transform",value:function(e){return new st(_object_spread_props(_object_spread({},r(this._def)),{schema:this,typeName:yt.ZodEffects,effect:{type:"transform",transform:e}}))}},{key:"default",value:function(e){var t="function"==typeof e?e:function(){return e};return new lt(_object_spread_props(_object_spread({},r(this._def)),{innerType:this,defaultValue:t,typeName:yt.ZodDefault}))}},{key:"brand",value:function(){return new _t(_object_spread({typeName:yt.ZodBranded,type:this},r(this._def)))}},{key:"catch",value:function(e){var t="function"==typeof e?e:function(){return e};return new dt(_object_spread_props(_object_spread({},r(this._def)),{innerType:this,catchValue:t,typeName:yt.ZodCatch}))}},{key:"describe",value:function(e){return new(0,this.constructor)(_object_spread_props(_object_spread({},this._def),{description:e}))}},{key:"pipe",value:function(e){return ht.create(this,e)}},{key:"readonly",value:function(){return mt.create(this)}},{key:"isOptional",value:function(){return this.safeParse(void 0).success}},{key:"isNullable",value:function(){return this.safeParse(null).success}}]),e}(),he=/^c[^\s-]{8,}$/i,me=/^[0-9a-z]+$/,ye=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ve=/^[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,ge=/^[a-z0-9_-]{21}$/i,be=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ke=/^[-+]?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)?)??$/,je=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Se=/^(?:(?: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])$/,we=/^(?:(?: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])$/,xe=/^(([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]))$/,Pe=/^(([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])$/,Oe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ze="((\\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])))",Ce=new RegExp("^".concat(Ze,"$")),Te=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==J.string){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.string,received:t.parsedType}),ae}var r=new re,a=void 0,l=!0,d=!1,p=void 0;try{for(var f,_=this._def.checks[Symbol.iterator]();!(l=(f=_.next()).done);l=!0){var h=f.value;if("min"===h.kind)e.data.length<h.value&&(a=this._getOrReturnCtx(e,a),n(a,{code:K.too_small,minimum:h.value,type:"string",inclusive:!0,exact:!1,message:h.message}),r.dirty());else if("max"===h.kind)e.data.length>h.value&&(a=this._getOrReturnCtx(e,a),n(a,{code:K.too_big,maximum:h.value,type:"string",inclusive:!0,exact:!1,message:h.message}),r.dirty());else if("length"===h.kind){var m=e.data.length>h.value,y=e.data.length<h.value;(m||y)&&(a=this._getOrReturnCtx(e,a),m?n(a,{code:K.too_big,maximum:h.value,type:"string",inclusive:!0,exact:!0,message:h.message}):y&&n(a,{code:K.too_small,minimum:h.value,type:"string",inclusive:!0,exact:!0,message:h.message}),r.dirty())}else if("email"===h.kind)je.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"email",code:K.invalid_string,message:h.message}),r.dirty());else if("emoji"===h.kind)de||(de=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),de.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"emoji",code:K.invalid_string,message:h.message}),r.dirty());else if("uuid"===h.kind)ve.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"uuid",code:K.invalid_string,message:h.message}),r.dirty());else if("nanoid"===h.kind)ge.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"nanoid",code:K.invalid_string,message:h.message}),r.dirty());else if("cuid"===h.kind)he.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"cuid",code:K.invalid_string,message:h.message}),r.dirty());else if("cuid2"===h.kind)me.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"cuid2",code:K.invalid_string,message:h.message}),r.dirty());else if("ulid"===h.kind)ye.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"ulid",code:K.invalid_string,message:h.message}),r.dirty());else if("url"===h.kind)try{new URL(e.data)}catch(t){a=this._getOrReturnCtx(e,a),n(a,{validation:"url",code:K.invalid_string,message:h.message}),r.dirty()}else if("regex"===h.kind){h.regex.lastIndex=0,h.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"regex",code:K.invalid_string,message:h.message}),r.dirty())}else if("trim"===h.kind)e.data=e.data.trim();else if("includes"===h.kind)e.data.includes(h.value,h.position)||(a=this._getOrReturnCtx(e,a),n(a,{code:K.invalid_string,validation:{includes:h.value,position:h.position},message:h.message}),r.dirty());else if("toLowerCase"===h.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===h.kind)e.data=e.data.toUpperCase();else if("startsWith"===h.kind)e.data.startsWith(h.value)||(a=this._getOrReturnCtx(e,a),n(a,{code:K.invalid_string,validation:{startsWith:h.value},message:h.message}),r.dirty());else if("endsWith"===h.kind)e.data.endsWith(h.value)||(a=this._getOrReturnCtx(e,a),n(a,{code:K.invalid_string,validation:{endsWith:h.value},message:h.message}),r.dirty());else if("datetime"===h.kind){o(h).test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{code:K.invalid_string,validation:"datetime",message:h.message}),r.dirty())}else if("date"===h.kind){Ce.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{code:K.invalid_string,validation:"date",message:h.message}),r.dirty())}else if("time"===h.kind){i(h).test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{code:K.invalid_string,validation:"time",message:h.message}),r.dirty())}else"duration"===h.kind?ke.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"duration",code:K.invalid_string,message:h.message}),r.dirty()):"ip"===h.kind?s(e.data,h.version)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"ip",code:K.invalid_string,message:h.message}),r.dirty()):"jwt"===h.kind?c(e.data,h.alg)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"jwt",code:K.invalid_string,message:h.message}),r.dirty()):"cidr"===h.kind?u(e.data,h.version)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"cidr",code:K.invalid_string,message:h.message}),r.dirty()):"base64"===h.kind?Oe.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"base64",code:K.invalid_string,message:h.message}),r.dirty()):"base64url"===h.kind?Ae.test(e.data)||(a=this._getOrReturnCtx(e,a),n(a,{validation:"base64url",code:K.invalid_string,message:h.message}),r.dirty()):U.assertNever(h)}}catch(e){d=!0,p=e}finally{try{l||null==_.return||_.return()}finally{if(d)throw p}}return{status:r.value,value:e.data}}},{key:"_regex",value:function(e,t,n){return this.refinement(function(t){return e.test(t)},_object_spread({validation:t,code:K.invalid_string},Y.errToObj(n)))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"email",value:function(e){return this._addCheck(_object_spread({kind:"email"},Y.errToObj(e)))}},{key:"url",value:function(e){return this._addCheck(_object_spread({kind:"url"},Y.errToObj(e)))}},{key:"emoji",value:function(e){return this._addCheck(_object_spread({kind:"emoji"},Y.errToObj(e)))}},{key:"uuid",value:function(e){return this._addCheck(_object_spread({kind:"uuid"},Y.errToObj(e)))}},{key:"nanoid",value:function(e){return this._addCheck(_object_spread({kind:"nanoid"},Y.errToObj(e)))}},{key:"cuid",value:function(e){return this._addCheck(_object_spread({kind:"cuid"},Y.errToObj(e)))}},{key:"cuid2",value:function(e){return this._addCheck(_object_spread({kind:"cuid2"},Y.errToObj(e)))}},{key:"ulid",value:function(e){return this._addCheck(_object_spread({kind:"ulid"},Y.errToObj(e)))}},{key:"base64",value:function(e){return this._addCheck(_object_spread({kind:"base64"},Y.errToObj(e)))}},{key:"base64url",value:function(e){return this._addCheck(_object_spread({kind:"base64url"},Y.errToObj(e)))}},{key:"jwt",value:function(e){return this._addCheck(_object_spread({kind:"jwt"},Y.errToObj(e)))}},{key:"ip",value:function(e){return this._addCheck(_object_spread({kind:"ip"},Y.errToObj(e)))}},{key:"cidr",value:function(e){return this._addCheck(_object_spread({kind:"cidr"},Y.errToObj(e)))}},{key:"datetime",value:function(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck(_object_spread({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n},Y.errToObj(null==e?void 0:e.message)));var t,n}},{key:"date",value:function(e){return this._addCheck({kind:"date",message:e})}},{key:"time",value:function(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck(_object_spread({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision},Y.errToObj(null==e?void 0:e.message)))}},{key:"duration",value:function(e){return this._addCheck(_object_spread({kind:"duration"},Y.errToObj(e)))}},{key:"regex",value:function(e,t){return this._addCheck(_object_spread({kind:"regex",regex:e},Y.errToObj(t)))}},{key:"includes",value:function(e,t){return this._addCheck(_object_spread({kind:"includes",value:e,position:null==t?void 0:t.position},Y.errToObj(null==t?void 0:t.message)))}},{key:"startsWith",value:function(e,t){return this._addCheck(_object_spread({kind:"startsWith",value:e},Y.errToObj(t)))}},{key:"endsWith",value:function(e,t){return this._addCheck(_object_spread({kind:"endsWith",value:e},Y.errToObj(t)))}},{key:"min",value:function(e,t){return this._addCheck(_object_spread({kind:"min",value:e},Y.errToObj(t)))}},{key:"max",value:function(e,t){return this._addCheck(_object_spread({kind:"max",value:e},Y.errToObj(t)))}},{key:"length",value:function(e,t){return this._addCheck(_object_spread({kind:"length",value:e},Y.errToObj(t)))}},{key:"nonempty",value:function(e){return this.min(1,Y.errToObj(e))}},{key:"trim",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"trim"}])}))}},{key:"toLowerCase",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"toLowerCase"}])}))}},{key:"toUpperCase",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:"toUpperCase"}])}))}},{key:"isDatetime",get:function(){return!!this._def.checks.find(function(e){return"datetime"===e.kind})}},{key:"isDate",get:function(){return!!this._def.checks.find(function(e){return"date"===e.kind})}},{key:"isTime",get:function(){return!!this._def.checks.find(function(e){return"time"===e.kind})}},{key:"isDuration",get:function(){return!!this._def.checks.find(function(e){return"duration"===e.kind})}},{key:"isEmail",get:function(){return!!this._def.checks.find(function(e){return"email"===e.kind})}},{key:"isURL",get:function(){return!!this._def.checks.find(function(e){return"url"===e.kind})}},{key:"isEmoji",get:function(){return!!this._def.checks.find(function(e){return"emoji"===e.kind})}},{key:"isUUID",get:function(){return!!this._def.checks.find(function(e){return"uuid"===e.kind})}},{key:"isNANOID",get:function(){return!!this._def.checks.find(function(e){return"nanoid"===e.kind})}},{key:"isCUID",get:function(){return!!this._def.checks.find(function(e){return"cuid"===e.kind})}},{key:"isCUID2",get:function(){return!!this._def.checks.find(function(e){return"cuid2"===e.kind})}},{key:"isULID",get:function(){return!!this._def.checks.find(function(e){return"ulid"===e.kind})}},{key:"isIP",get:function(){return!!this._def.checks.find(function(e){return"ip"===e.kind})}},{key:"isCIDR",get:function(){return!!this._def.checks.find(function(e){return"cidr"===e.kind})}},{key:"isBase64",get:function(){return!!this._def.checks.find(function(e){return"base64"===e.kind})}},{key:"isBase64url",get:function(){return!!this._def.checks.find(function(e){return"base64url"===e.kind})}},{key:"minLength",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"maxLength",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}}]),t}(_e);Te.create=function(e){var t;return new Te(_object_spread({checks:[],typeName:yt.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},r(e)))};var Ee=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).min=e.gte,e.max=e.lte,e.step=e.multipleOf,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==J.number){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.number,received:t.parsedType}),ae}var r=void 0,a=new re,i=!0,o=!1,s=void 0;try{for(var c,u=this._def.checks[Symbol.iterator]();!(i=(c=u.next()).done);i=!0){var d=c.value;if("int"===d.kind)U.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),n(r,{code:K.invalid_type,expected:"integer",received:"float",message:d.message}),a.dirty());else if("min"===d.kind){(d.inclusive?e.data<d.value:e.data<=d.value)&&(r=this._getOrReturnCtx(e,r),n(r,{code:K.too_small,minimum:d.value,type:"number",inclusive:d.inclusive,exact:!1,message:d.message}),a.dirty())}else if("max"===d.kind){(d.inclusive?e.data>d.value:e.data>=d.value)&&(r=this._getOrReturnCtx(e,r),n(r,{code:K.too_big,maximum:d.value,type:"number",inclusive:d.inclusive,exact:!1,message:d.message}),a.dirty())}else"multipleOf"===d.kind?0!==l(e.data,d.value)&&(r=this._getOrReturnCtx(e,r),n(r,{code:K.not_multiple_of,multipleOf:d.value,message:d.message}),a.dirty()):"finite"===d.kind?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),n(r,{code:K.not_finite,message:d.message}),a.dirty()):U.assertNever(d)}}catch(e){o=!0,s=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw s}}return{status:a.value,value:e.data}}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Y.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Y.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Y.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Y.toString(t))}},{key:"setLimit",value:function(e,n,r,a){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:e,value:n,inclusive:r,message:Y.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"int",value:function(e){return this._addCheck({kind:"int",message:Y.toString(e)})}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Y.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Y.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Y.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Y.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Y.toString(t)})}},{key:"finite",value:function(e){return this._addCheck({kind:"finite",message:Y.toString(e)})}},{key:"safe",value:function(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Y.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Y.toString(e)})}},{key:"minValue",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"maxValue",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"isInt",get:function(){return!!this._def.checks.find(function(e){return"int"===e.kind||"multipleOf"===e.kind&&U.isInteger(e.value)})}},{key:"isFinite",get:function(){var e=null,t=null,n=!0,r=!1,a=void 0;try{for(var i,o=this._def.checks[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var s=i.value;if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}}catch(e){r=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(r)throw a}}return Number.isFinite(t)&&Number.isFinite(e)}}]),t}(_e);Ee.create=function(e){return new Ee(_object_spread({checks:[],typeName:yt.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1},r(e)))};var Ie=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments)).min=e.gte,e.max=e.lte,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==J.bigint)return this._getInvalidInput(e);var t=void 0,r=new re,a=!0,i=!1,o=void 0;try{for(var s,c=this._def.checks[Symbol.iterator]();!(a=(s=c.next()).done);a=!0){var u=s.value;if("min"===u.kind)(u.inclusive?e.data<u.value:e.data<=u.value)&&(t=this._getOrReturnCtx(e,t),n(t,{code:K.too_small,type:"bigint",minimum:u.value,inclusive:u.inclusive,message:u.message}),r.dirty());else if("max"===u.kind){(u.inclusive?e.data>u.value:e.data>=u.value)&&(t=this._getOrReturnCtx(e,t),n(t,{code:K.too_big,type:"bigint",maximum:u.value,inclusive:u.inclusive,message:u.message}),r.dirty())}else"multipleOf"===u.kind?e.data%u.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),n(t,{code:K.not_multiple_of,multipleOf:u.value,message:u.message}),r.dirty()):U.assertNever(u)}}catch(e){i=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(i)throw o}}return{status:r.value,value:e.data}}},{key:"_getInvalidInput",value:function(e){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.bigint,received:t.parsedType}),ae}},{key:"gte",value:function(e,t){return this.setLimit("min",e,!0,Y.toString(t))}},{key:"gt",value:function(e,t){return this.setLimit("min",e,!1,Y.toString(t))}},{key:"lte",value:function(e,t){return this.setLimit("max",e,!0,Y.toString(t))}},{key:"lt",value:function(e,t){return this.setLimit("max",e,!1,Y.toString(t))}},{key:"setLimit",value:function(e,n,r,a){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([{kind:e,value:n,inclusive:r,message:Y.toString(a)}])}))}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"positive",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Y.toString(e)})}},{key:"negative",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Y.toString(e)})}},{key:"nonpositive",value:function(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Y.toString(e)})}},{key:"nonnegative",value:function(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Y.toString(e)})}},{key:"multipleOf",value:function(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Y.toString(t)})}},{key:"minValue",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"maxValue",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}}]),t}(_e);Ie.create=function(e){var t;return new Ie(_object_spread({checks:[],typeName:yt.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t},r(e)))};var Ne=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==J.boolean){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.boolean,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Ne.create=function(e){return new Ne(_object_spread({typeName:yt.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1},r(e)))};var Me=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==J.date){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.date,received:t.parsedType}),ae}if(Number.isNaN(e.data.getTime())){var r=this._getOrReturnCtx(e);return n(r,{code:K.invalid_date}),ae}var a=new re,i=void 0,o=!0,s=!1,c=void 0;try{for(var u,l=this._def.checks[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var d=u.value;"min"===d.kind?e.data.getTime()<d.value&&(i=this._getOrReturnCtx(e,i),n(i,{code:K.too_small,message:d.message,inclusive:!0,exact:!1,minimum:d.value,type:"date"}),a.dirty()):"max"===d.kind?e.data.getTime()>d.value&&(i=this._getOrReturnCtx(e,i),n(i,{code:K.too_big,message:d.message,inclusive:!0,exact:!1,maximum:d.value,type:"date"}),a.dirty()):U.assertNever(d)}}catch(e){s=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw c}}return{status:a.value,value:new Date(e.data.getTime())}}},{key:"_addCheck",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{checks:_to_consumable_array(this._def.checks).concat([e])}))}},{key:"min",value:function(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Y.toString(t)})}},{key:"max",value:function(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Y.toString(t)})}},{key:"minDate",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"min"===o.kind&&(null===e||o.value>e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return null!=e?new Date(e):null}},{key:"maxDate",get:function(){var e=null,t=!0,n=!1,r=void 0;try{for(var a,i=this._def.checks[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return null!=e?new Date(e):null}}]),t}(_e);Me.create=function(e){return new Me(_object_spread({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:yt.ZodDate},r(e)))};var Re=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==J.symbol){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.symbol,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Re.create=function(e){return new Re(_object_spread({typeName:yt.ZodSymbol},r(e)))};var De=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==J.undefined){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.undefined,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);De.create=function(e){return new De(_object_spread({typeName:yt.ZodUndefined},r(e)))};var ze=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==J.null){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.null,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);ze.create=function(e){return new ze(_object_spread({typeName:yt.ZodNull},r(e)))};var Le=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._any=!0,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return oe(e.data)}}]),t}(_e);Le.create=function(e){return new Le(_object_spread({typeName:yt.ZodAny},r(e)))};var $e=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._unknown=!0,e}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return oe(e.data)}}]),t}(_e);$e.create=function(e){return new $e(_object_spread({typeName:yt.ZodUnknown},r(e)))};var Fe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.never,received:t.parsedType}),ae}}]),t}(_e);Fe.create=function(e){return new Fe(_object_spread({typeName:yt.ZodNever},r(e)))};var Ue=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==J.undefined){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.void,received:t.parsedType}),ae}return oe(e.data)}}]),t}(_e);Ue.create=function(e){return new Ue(_object_spread({typeName:yt.ZodVoid},r(e)))};var qe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.ctx,a=t.status,i=this._def;if(r.parsedType!==J.array)return n(r,{code:K.invalid_type,expected:J.array,received:r.parsedType}),ae;if(null!==i.exactLength){var o=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(o||s)&&(n(r,{code:o?K.too_big:K.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),a.dirty())}if(null!==i.minLength&&r.data.length<i.minLength.value&&(n(r,{code:K.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),a.dirty()),null!==i.maxLength&&r.data.length>i.maxLength.value&&(n(r,{code:K.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),a.dirty()),r.common.async)return Promise.all(_to_consumable_array(r.data).map(function(e,t){return i.type._parseAsync(new pe(r,e,r.path,t))})).then(function(e){return re.mergeArray(a,e)});var c=_to_consumable_array(r.data).map(function(e,t){return i.type._parseSync(new pe(r,e,r.path,t))});return re.mergeArray(a,c)}},{key:"element",get:function(){return this._def.type}},{key:"min",value:function(e,n){return new t(_object_spread_props(_object_spread({},this._def),{minLength:{value:e,message:Y.toString(n)}}))}},{key:"max",value:function(e,n){return new t(_object_spread_props(_object_spread({},this._def),{maxLength:{value:e,message:Y.toString(n)}}))}},{key:"length",value:function(e,n){return new t(_object_spread_props(_object_spread({},this._def),{exactLength:{value:e,message:Y.toString(n)}}))}},{key:"nonempty",value:function(e){return this.min(1,e)}}]),t}(_e);function Ve(e){if(_instanceof(e,Be)){var t={};for(var n in e.shape){var r=e.shape[n];t[n]=ct.create(Ve(r))}return new Be(_object_spread_props(_object_spread({},e._def),{shape:function(){return t}}))}return _instanceof(e,qe)?new qe(_object_spread_props(_object_spread({},e._def),{type:Ve(e.element)})):_instanceof(e,ct)?ct.create(Ve(e.unwrap())):_instanceof(e,ut)?ut.create(Ve(e.unwrap())):_instanceof(e,Ye)?Ye.create(e.items.map(function(e){return Ve(e)})):e}qe.create=function(e,t){return new qe(_object_spread({type:e,minLength:null,maxLength:null,exactLength:null,typeName:yt.ZodArray},r(t)))};var Be=function(e){function t(){var e;return _class_call_check(this,t),(e=_call_super(this,t,arguments))._cached=null,e.nonstrict=e.passthrough,e.augment=e.extend,e}return _inherits(t,e),_create_class(t,[{key:"_getCached",value:function(){if(null!==this._cached)return this._cached;var e=this._def.shape(),t=U.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}},{key:"_parse",value:function(e){if(this._getType(e)!==J.object){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.object,received:t.parsedType}),ae}var r=this._processInputParams(e),a=r.status,i=r.ctx,o=this._getCached(),s=o.shape,c=o.keys,u=[];if(!_instanceof(this._def.catchall,Fe)||"strip"!==this._def.unknownKeys)for(var l in i.data)c.includes(l)||u.push(l);var d=[],p=!0,f=!1,_=void 0;try{for(var h,m=c[Symbol.iterator]();!(p=(h=m.next()).done);p=!0){var y=h.value,v=s[y],g=i.data[y];d.push({key:{status:"valid",value:y},value:v._parse(new pe(i,g,i.path,y)),alwaysSet:y in i.data})}}catch(e){f=!0,_=e}finally{try{p||null==m.return||m.return()}finally{if(f)throw _}}if(_instanceof(this._def.catchall,Fe)){var b=this._def.unknownKeys;if("passthrough"===b){var k=!0,j=!1,S=void 0;try{for(var w,x=u[Symbol.iterator]();!(k=(w=x.next()).done);k=!0){var P=w.value;d.push({key:{status:"valid",value:P},value:{status:"valid",value:i.data[P]}})}}catch(e){j=!0,S=e}finally{try{k||null==x.return||x.return()}finally{if(j)throw S}}}else if("strict"===b)u.length>0&&(n(i,{code:K.unrecognized_keys,keys:u}),a.dirty());else if("strip"!==b)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{var O=this._def.catchall,A=!0,Z=!1,C=void 0;try{for(var T,E=u[Symbol.iterator]();!(A=(T=E.next()).done);A=!0){var I=T.value,N=i.data[I];d.push({key:{status:"valid",value:I},value:O._parse(new pe(i,N,i.path,I)),alwaysSet:I in i.data})}}catch(e){Z=!0,C=e}finally{try{A||null==E.return||E.return()}finally{if(Z)throw C}}}return i.common.async?Promise.resolve().then(function(){return _async_to_generator(function(){var e,t,n,r,a,i,o,s,c,u;return _ts_generator(this,function(l){switch(l.label){case 0:e=[],t=!0,n=!1,r=void 0,l.label=1;case 1:l.trys.push([1,7,8,9]),a=d[Symbol.iterator](),l.label=2;case 2:return(t=(i=a.next()).done)?[3,6]:[4,(o=i.value).key];case 3:return s=l.sent(),[4,o.value];case 4:c=l.sent(),e.push({key:s,value:c,alwaysSet:o.alwaysSet}),l.label=5;case 5:return t=!0,[3,2];case 6:return[3,9];case 7:return u=l.sent(),n=!0,r=u,[3,9];case 8:try{t||null==a.return||a.return()}finally{if(n)throw r}return[7];case 9:return[2,e]}})})()}).then(function(e){return re.mergeObjectSync(a,e)}):re.mergeObjectSync(a,d)}},{key:"shape",get:function(){return this._def.shape()}},{key:"strict",value:function(e){var n=this;return Y.errToObj,new t(_object_spread(_object_spread_props(_object_spread({},this._def),{unknownKeys:"strict"}),void 0!==e?{errorMap:function(t,r){var a,i,o,s,c=null!==(o=null===(a=(i=n._def).errorMap)||void 0===a?void 0:a.call(i,t,r).message)&&void 0!==o?o:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=Y.errToObj(e).message)&&void 0!==s?s:c}:{message:c}}}:{}))}},{key:"strip",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{unknownKeys:"strip"}))}},{key:"passthrough",value:function(){return new t(_object_spread_props(_object_spread({},this._def),{unknownKeys:"passthrough"}))}},{key:"extend",value:function(e){var n=this;return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return _object_spread({},n._def.shape(),e)}}))}},{key:"merge",value:function(e){var n=this;return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:function(){return _object_spread({},n._def.shape(),e._def.shape())},typeName:yt.ZodObject})}},{key:"setKey",value:function(e,t){return this.augment(_define_property({},e,t))}},{key:"catchall",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{catchall:e}))}},{key:"pick",value:function(e){var n={},r=!0,a=!1,i=void 0;try{for(var o,s=U.objectKeys(e)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;e[c]&&this.shape[c]&&(n[c]=this.shape[c])}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return n}}))}},{key:"omit",value:function(e){var n={},r=!0,a=!1,i=void 0;try{for(var o,s=U.objectKeys(this.shape)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;e[c]||(n[c]=this.shape[c])}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return n}}))}},{key:"deepPartial",value:function(){return Ve(this)}},{key:"partial",value:function(e){var n={},r=!0,a=!1,i=void 0;try{for(var o,s=U.objectKeys(this.shape)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value,u=this.shape[c];e&&!e[c]?n[c]=u:n[c]=u.optional()}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return n}}))}},{key:"required",value:function(e){var n={},r=!0,a=!1,i=void 0;try{for(var o,s=U.objectKeys(this.shape)[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if(e&&!e[c])n[c]=this.shape[c];else{for(var u=this.shape[c];_instanceof(u,ct);)u=u._def.innerType;n[c]=u}}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return new t(_object_spread_props(_object_spread({},this._def),{shape:function(){return n}}))}},{key:"keyof",value:function(){return d(U.objectKeys(this.shape))}}]),t}(_e);Be.create=function(e,t){return new Be(_object_spread({shape:function(){return e},unknownKeys:"strip",catchall:Fe.create(),typeName:yt.ZodObject},r(t)))},Be.strictCreate=function(e,t){return new Be(_object_spread({shape:function(){return e},unknownKeys:"strict",catchall:Fe.create(),typeName:yt.ZodObject},r(t)))},Be.lazycreate=function(e,t){return new Be(_object_spread({shape:e,unknownKeys:"strip",catchall:Fe.create(),typeName:yt.ZodObject},r(t)))};var Je=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,r=this._def.options;if(t.common.async)return Promise.all(r.map(function(e){return _async_to_generator(function(){var n,r;return _ts_generator(this,function(a){switch(a.label){case 0:return n=_object_spread_props(_object_spread({},t),{common:_object_spread_props(_object_spread({},t.common),{issues:[]}),parent:null}),r={},[4,e._parseAsync({data:t.data,path:t.path,parent:n})];case 1:return[2,(r.result=a.sent(),r.ctx=n,r)]}})})()})).then(function(e){var r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if("valid"===c.result.status)return c.result}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}var u=!0,l=!1,d=void 0;try{for(var p,f=e[Symbol.iterator]();!(u=(p=f.next()).done);u=!0){var _,h=p.value;if("dirty"===h.result.status)return(_=t.common.issues).push.apply(_,_to_consumable_array(h.ctx.common.issues)),h.result}}catch(e){l=!0,d=e}finally{try{u||null==f.return||f.return()}finally{if(l)throw d}}var m=e.map(function(e){return new G(e.ctx.common.issues)});return n(t,{code:K.invalid_union,unionErrors:m}),ae});var a,i=void 0,o=[],s=!0,c=!1,u=void 0;try{for(var l,d=r[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var p=l.value,f=_object_spread_props(_object_spread({},t),{common:_object_spread_props(_object_spread({},t.common),{issues:[]}),parent:null}),_=p._parseSync({data:t.data,path:t.path,parent:f});if("valid"===_.status)return _;"dirty"!==_.status||i||(i={result:_,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}}catch(e){c=!0,u=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw u}}if(i)return(a=t.common.issues).push.apply(a,_to_consumable_array(i.ctx.common.issues)),i.result;var h=o.map(function(e){return new G(e)});return n(t,{code:K.invalid_union,unionErrors:h}),ae}},{key:"options",get:function(){return this._def.options}}]),t}(_e);Je.create=function(e,t){return new Je(_object_spread({options:e,typeName:yt.ZodUnion},r(t)))};var We=function(e){return _instanceof(e,nt)?We(e.schema):_instanceof(e,st)?We(e.innerType()):_instanceof(e,rt)?[e.value]:_instanceof(e,at)?e.options:_instanceof(e,it)?U.objectValues(e.enum):_instanceof(e,lt)?We(e._def.innerType):_instanceof(e,De)?[void 0]:_instanceof(e,ze)?[null]:_instanceof(e,ct)?[void 0].concat(_to_consumable_array(We(e.unwrap()))):_instanceof(e,ut)?[null].concat(_to_consumable_array(We(e.unwrap()))):_instanceof(e,_t)||_instanceof(e,mt)?We(e.unwrap()):_instanceof(e,dt)?We(e._def.innerType):[]},Ke=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;if(t.parsedType!==J.object)return n(t,{code:K.invalid_type,expected:J.object,received:t.parsedType}),ae;var r=this.discriminator,a=t.data[r],i=this.optionsMap.get(a);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(n(t,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ae)}},{key:"discriminator",get:function(){return this._def.discriminator}},{key:"options",get:function(){return this._def.options}},{key:"optionsMap",get:function(){return this._def.optionsMap}}],[{key:"create",value:function(e,n,a){var i=new Map,o=!0,s=!1,c=void 0;try{for(var u,l=n[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var d=u.value,p=We(d.shape[e]);if(!p.length)throw new Error("A discriminator value for key `".concat(e,"` could not be extracted from all schema options"));var f=!0,_=!1,h=void 0;try{for(var m,y=p[Symbol.iterator]();!(f=(m=y.next()).done);f=!0){var v=m.value;if(i.has(v))throw new Error("Discriminator property ".concat(String(e)," has duplicate value ").concat(String(v)));i.set(v,d)}}catch(e){_=!0,h=e}finally{try{f||null==y.return||y.return()}finally{if(_)throw h}}}}catch(e){s=!0,c=e}finally{try{o||null==l.return||l.return()}finally{if(s)throw c}}return new t(_object_spread({typeName:yt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i},r(a)))}}]),t}(_e);function He(e,t){var n=W(e),r=W(t);if(e===t)return{valid:!0,data:e};if(n===J.object&&r===J.object){var a=U.objectKeys(t),i=U.objectKeys(e).filter(function(e){return-1!==a.indexOf(e)}),o=_object_spread({},e,t),s=!0,c=!1,u=void 0;try{for(var l,d=i[Symbol.iterator]();!(s=(l=d.next()).done);s=!0){var p=l.value,f=He(e[p],t[p]);if(!f.valid)return{valid:!1};o[p]=f.data}}catch(e){c=!0,u=e}finally{try{s||null==d.return||d.return()}finally{if(c)throw u}}return{valid:!0,data:o}}if(n===J.array&&r===J.array){if(e.length!==t.length)return{valid:!1};for(var _=[],h=0;h<e.length;h++){var m=He(e[h],t[h]);if(!m.valid)return{valid:!1};_.push(m.data)}return{valid:!0,data:_}}return n===J.date&&r===J.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}var Ge=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,a=t.ctx,i=function(e,t){if(se(e)||se(t))return ae;var i=He(e.value,t.value);return i.valid?((ce(e)||ce(t))&&r.dirty(),{status:r.value,value:i.data}):(n(a,{code:K.invalid_intersection_types}),ae)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(function(e){var t=_sliced_to_array(e,2),n=t[0],r=t[1];return i(n,r)}):i(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}]),t}(_e);Ge.create=function(e,t,n){return new Ge(_object_spread({left:e,right:t,typeName:yt.ZodIntersection},r(n)))};var Ye=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),a=r.status,i=r.ctx;if(i.parsedType!==J.array)return n(i,{code:K.invalid_type,expected:J.array,received:i.parsedType}),ae;if(i.data.length<this._def.items.length)return n(i,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ae;!this._def.rest&&i.data.length>this._def.items.length&&(n(i,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());var o=_to_consumable_array(i.data).map(function(e,n){var r=t._def.items[n]||t._def.rest;return r?r._parse(new pe(i,e,i.path,n)):null}).filter(function(e){return!!e});return i.common.async?Promise.all(o).then(function(e){return re.mergeArray(a,e)}):re.mergeArray(a,o)}},{key:"items",get:function(){return this._def.items}},{key:"rest",value:function(e){return new t(_object_spread_props(_object_spread({},this._def),{rest:e}))}}]),t}(_e);Ye.create=function(e,t){if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ye(_object_spread({items:e,typeName:yt.ZodTuple,rest:null},r(t)))};var Qe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,a=t.ctx;if(a.parsedType!==J.object)return n(a,{code:K.invalid_type,expected:J.object,received:a.parsedType}),ae;var i=[],o=this._def.keyType,s=this._def.valueType;for(var c in a.data)i.push({key:o._parse(new pe(a,c,a.path,c)),value:s._parse(new pe(a,a.data[c],a.path,c)),alwaysSet:c in a.data});return a.common.async?re.mergeObjectAsync(r,i):re.mergeObjectSync(r,i)}},{key:"element",get:function(){return this._def.valueType}}],[{key:"create",value:function(e,n,a){return _instanceof(n,_e)?new t(_object_spread({keyType:e,valueType:n,typeName:yt.ZodRecord},r(a))):new t(_object_spread({keyType:Te.create(),valueType:e,typeName:yt.ZodRecord},r(n)))}}]),t}(_e),Xe=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"keySchema",get:function(){return this._def.keyType}},{key:"valueSchema",get:function(){return this._def.valueType}},{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,a=t.ctx;if(a.parsedType!==J.map)return n(a,{code:K.invalid_type,expected:J.map,received:a.parsedType}),ae;var i=this._def.keyType,o=this._def.valueType,s=_to_consumable_array(a.data.entries()).map(function(e,t){var n=_sliced_to_array(e,2),r=n[0],s=n[1];return{key:i._parse(new pe(a,r,a.path,[t,"key"])),value:o._parse(new pe(a,s,a.path,[t,"value"]))}});if(a.common.async){var c=new Map;return Promise.resolve().then(function(){return _async_to_generator(function(){var e,t,n,a,i,o,u,l,d;return _ts_generator(this,function(p){switch(p.label){case 0:e=!0,t=!1,n=void 0,p.label=1;case 1:p.trys.push([1,7,8,9]),a=s[Symbol.iterator](),p.label=2;case 2:return(e=(i=a.next()).done)?[3,6]:[4,(o=i.value).key];case 3:return u=p.sent(),[4,o.value];case 4:if(l=p.sent(),"aborted"===u.status||"aborted"===l.status)return[2,ae];"dirty"!==u.status&&"dirty"!==l.status||r.dirty(),c.set(u.value,l.value),p.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return d=p.sent(),t=!0,n=d,[3,9];case 8:try{e||null==a.return||a.return()}finally{if(t)throw n}return[7];case 9:return[2,{status:r.value,value:c}]}})})()})}var u=new Map,l=!0,d=!1,p=void 0;try{for(var f,_=s[Symbol.iterator]();!(l=(f=_.next()).done);l=!0){var h=f.value,m=h.key,y=h.value;if("aborted"===m.status||"aborted"===y.status)return ae;"dirty"!==m.status&&"dirty"!==y.status||r.dirty(),u.set(m.value,y.value)}}catch(e){d=!0,p=e}finally{try{l||null==_.return||_.return()}finally{if(d)throw p}}return{status:r.value,value:u}}}]),t}(_e);Xe.create=function(e,t,n){return new Xe(_object_spread({valueType:t,keyType:e,typeName:yt.ZodMap},r(n)))};var et=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e),r=t.status,a=t.ctx;if(a.parsedType!==J.set)return n(a,{code:K.invalid_type,expected:J.set,received:a.parsedType}),ae;var i=this._def;null!==i.minSize&&a.data.size<i.minSize.value&&(n(a,{code:K.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),null!==i.maxSize&&a.data.size>i.maxSize.value&&(n(a,{code:K.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());var o=this._def.valueType;function s(e){var t=new Set,n=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var c=o.value;if("aborted"===c.status)return ae;"dirty"===c.status&&r.dirty(),t.add(c.value)}}catch(e){a=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(a)throw i}}return{status:r.value,value:t}}var c=_to_consumable_array(a.data.values()).map(function(e,t){return o._parse(new pe(a,e,a.path,t))});return a.common.async?Promise.all(c).then(function(e){return s(e)}):s(c)}},{key:"min",value:function(e,n){return new t(_object_spread_props(_object_spread({},this._def),{minSize:{value:e,message:Y.toString(n)}}))}},{key:"max",value:function(e,n){return new t(_object_spread_props(_object_spread({},this._def),{maxSize:{value:e,message:Y.toString(n)}}))}},{key:"size",value:function(e,t){return this.min(e,t).max(e,t)}},{key:"nonempty",value:function(e){return this.min(1,e)}}]),t}(_e);et.create=function(e,t){return new et(_object_spread({valueType:e,minSize:null,maxSize:null,typeName:yt.ZodSet},r(t)))};var tt=function(e){function a(){var e;return _class_call_check(this,a),(e=_call_super(this,a,arguments)).validate=e.implement,e}return _inherits(a,e),_create_class(a,[{key:"_parse",value:function(e){var r=this._processInputParams(e).ctx;if(r.parsedType!==J.function)return n(r,{code:K.invalid_type,expected:J.function,received:r.parsedType}),ae;function a(e,n){return te({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t(),X].filter(function(e){return!!e}),issueData:{code:K.invalid_arguments,argumentsError:n}})}function i(e,n){return te({data:e,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t(),X].filter(function(e){return!!e}),issueData:{code:K.invalid_return_type,returnTypeError:n}})}var o={errorMap:r.common.contextualErrorMap},s=r.data;if(_instanceof(this._def.returns,ot)){var c=this;return oe(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _async_to_generator(function(){var e,n,r;return _ts_generator(this,function(u){switch(u.label){case 0:return e=new G([]),[4,c._def.args.parseAsync(t,o).catch(function(n){throw e.addIssue(a(t,n)),e})];case 1:return n=u.sent(),[4,Reflect.apply(s,this,n)];case 2:return r=u.sent(),[4,c._def.returns._def.type.parseAsync(r,o).catch(function(t){throw e.addIssue(i(r,t)),e})];case 3:return[2,u.sent()]}})}).call(this)})}var u=this;return oe(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=u._def.args.safeParse(t,o);if(!r.success)throw new G([a(t,r.error)]);var c=Reflect.apply(s,this,r.data),l=u._def.returns.safeParse(c,o);if(!l.success)throw new G([i(c,l.error)]);return l.data})}},{key:"parameters",value:function(){return this._def.args}},{key:"returnType",value:function(){return this._def.returns}},{key:"args",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new a(_object_spread_props(_object_spread({},this._def),{args:Ye.create(t).rest($e.create())}))}},{key:"returns",value:function(e){return new a(_object_spread_props(_object_spread({},this._def),{returns:e}))}},{key:"implement",value:function(e){return this.parse(e)}},{key:"strictImplement",value:function(e){return this.parse(e)}}],[{key:"create",value:function(e,t,n){return new a(_object_spread({args:e||Ye.create([]).rest($e.create()),returns:t||$e.create(),typeName:yt.ZodFunction},r(n)))}}]),a}(_e),nt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"schema",get:function(){return this._def.getter()}},{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx;return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}]),t}(_e);nt.create=function(e,t){return new nt(_object_spread({getter:e,typeName:yt.ZodLazy},r(t)))};var rt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(e.data!==this._def.value){var t=this._getOrReturnCtx(e);return n(t,{received:t.data,code:K.invalid_literal,expected:this._def.value}),ae}return{status:"valid",value:e.data}}},{key:"value",get:function(){return this._def.value}}]),t}(_e);rt.create=function(e,t){return new rt(_object_spread({value:e,typeName:yt.ZodLiteral},r(t)))};var at=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if("string"!=typeof e.data){var t=this._getOrReturnCtx(e),r=this._def.values;return n(t,{expected:U.joinValues(r),received:t.parsedType,code:K.invalid_type}),ae}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){var a=this._getOrReturnCtx(e),i=this._def.values;return n(a,{received:a.data,code:K.invalid_enum_value,options:i}),ae}return oe(e.data)}},{key:"options",get:function(){return this._def.values}},{key:"enum",get:function(){var e={},t=!0,n=!1,r=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"Values",get:function(){var e={},t=!0,n=!1,r=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"Enum",get:function(){var e={},t=!0,n=!1,r=void 0;try{for(var a,i=this._def.values[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=a.value;e[o]=o}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}},{key:"extract",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(e,_object_spread({},this._def,n))}},{key:"exclude",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._def;return t.create(this.options.filter(function(t){return!e.includes(t)}),_object_spread({},this._def,n))}}]),t}(_e);at.create=d;var it=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=U.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==J.string&&r.parsedType!==J.number){var a=U.objectValues(t);return n(r,{expected:U.joinValues(a),received:r.parsedType,code:K.invalid_type}),ae}if(this._cache||(this._cache=new Set(U.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){var i=U.objectValues(t);return n(r,{received:r.data,code:K.invalid_enum_value,options:i}),ae}return oe(e.data)}},{key:"enum",get:function(){return this._def.values}}]),t}(_e);it.create=function(e,t){return new it(_object_spread({values:e,typeName:yt.ZodNativeEnum},r(t)))};var ot=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"unwrap",value:function(){return this._def.type}},{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e).ctx;if(r.parsedType!==J.promise&&!1===r.common.async)return n(r,{code:K.invalid_type,expected:J.promise,received:r.parsedType}),ae;var a=r.parsedType===J.promise?r.data:Promise.resolve(r.data);return oe(a.then(function(e){return t._def.type.parseAsync(e,{path:r.path,errorMap:r.common.contextualErrorMap})}))}}]),t}(_e);ot.create=function(e,t){return new ot(_object_spread({type:e,typeName:yt.ZodPromise},r(t)))};var st=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"innerType",value:function(){return this._def.schema}},{key:"sourceType",value:function(){return this._def.schema._def.typeName===yt.ZodEffects?this._def.schema.sourceType():this._def.schema}},{key:"_parse",value:function(e){var t=this,r=this._processInputParams(e),a=r.status,i=r.ctx,o=this._def.effect||null,s={addIssue:function(e){n(i,e),e.fatal?a.abort():a.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===o.type){var c=o.transform(i.data,s);if(i.common.async)return Promise.resolve(c).then(function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(n){switch(n.label){case 0:return"aborted"===a.value?[2,ae]:[4,this._def.schema._parseAsync({data:e,path:i.path,parent:i})];case 1:return"aborted"===(t=n.sent()).status?[2,ae]:"dirty"===t.status||"dirty"===a.value?[2,ie(t.value)]:[2,t]}})}).call(t)});if("aborted"===a.value)return ae;var u=this._def.schema._parseSync({data:c,path:i.path,parent:i});return"aborted"===u.status?ae:"dirty"===u.status||"dirty"===a.value?ie(u.value):u}if("refinement"===o.type){var l=function(e){var t=o.refinement(e,s);if(i.common.async)return Promise.resolve(t);if(_instanceof(t,Promise))throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===i.common.async){var d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return"aborted"===d.status?ae:("dirty"===d.status&&a.dirty(),l(d.value),{status:a.value,value:d.value})}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return"aborted"===e.status?ae:("dirty"===e.status&&a.dirty(),l(e.value).then(function(){return{status:a.value,value:e.value}}))})}if("transform"===o.type){if(!1===i.common.async){var p=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!ue(p))return ae;var f=o.transform(p.value,s);if(_instanceof(f,Promise))throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:f}}return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(function(e){return ue(e)?Promise.resolve(o.transform(e.value,s)).then(function(e){return{status:a.value,value:e}}):ae})}U.assertNever(o)}}]),t}(_e);st.create=function(e,t,n){return new st(_object_spread({schema:e,typeName:yt.ZodEffects,effect:t},r(n)))},st.createWithPreprocess=function(e,t,n){return new st(_object_spread({schema:t,effect:{type:"preprocess",transform:e},typeName:yt.ZodEffects},r(n)))};var ct=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return this._getType(e)===J.undefined?oe(void 0):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(_e);ct.create=function(e,t){return new ct(_object_spread({innerType:e,typeName:yt.ZodOptional},r(t)))};var ut=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){return this._getType(e)===J.null?oe(null):this._def.innerType._parse(e)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(_e);ut.create=function(e,t){return new ut(_object_spread({innerType:e,typeName:yt.ZodNullable},r(t)))};var lt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return t.parsedType===J.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}},{key:"removeDefault",value:function(){return this._def.innerType}}]),t}(_e);lt.create=function(e,t){return new lt(_object_spread({innerType:e,typeName:yt.ZodDefault,defaultValue:"function"==typeof t.default?t.default:function(){return t.default}},r(t)))};var dt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e).ctx,r=_object_spread_props(_object_spread({},n),{common:_object_spread_props(_object_spread({},n.common),{issues:[]})}),a=this._def.innerType._parse({data:r.data,path:r.path,parent:_object_spread({},r)});return le(a)?a.then(function(e){return{status:"valid",value:"valid"===e.status?e.value:t._def.catchValue({get error(){return new G(r.common.issues)},input:r.data})}}):{status:"valid",value:"valid"===a.status?a.value:this._def.catchValue({get error(){return new G(r.common.issues)},input:r.data})}}},{key:"removeCatch",value:function(){return this._def.innerType}}]),t}(_e);dt.create=function(e,t){return new dt(_object_spread({innerType:e,typeName:yt.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:function(){return t.catch}},r(t)))};var pt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){if(this._getType(e)!==J.nan){var t=this._getOrReturnCtx(e);return n(t,{code:K.invalid_type,expected:J.nan,received:t.parsedType}),ae}return{status:"valid",value:e.data}}}]),t}(_e);pt.create=function(e){return new pt(_object_spread({typeName:yt.ZodNaN},r(e)))};var ft=Symbol("zod_brand"),_t=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._processInputParams(e).ctx,n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}},{key:"unwrap",value:function(){return this._def.type}}]),t}(_e),ht=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this,n=this._processInputParams(e),r=n.status,a=n.ctx;if(a.common.async){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,this._def.in._parseAsync({data:a.data,path:a.path,parent:a})];case 1:return"aborted"===(e=t.sent()).status?[2,ae]:"dirty"===e.status?(r.dirty(),[2,ie(e.value)]):[2,this._def.out._parseAsync({data:e.value,path:a.path,parent:a})]}})}).call(t)}var i=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===i.status?ae:"dirty"===i.status?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:a.path,parent:a})}}],[{key:"create",value:function(e,n){return new t({in:e,out:n,typeName:yt.ZodPipeline})}}]),t}(_e),mt=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"_parse",value:function(e){var t=this._def.innerType._parse(e),n=function(e){return ue(e)&&(e.value=Object.freeze(e.value)),e};return le(t)?t.then(function(e){return n(e)}):n(t)}},{key:"unwrap",value:function(){return this._def.innerType}}]),t}(_e);mt.create=function(e,t){return new mt(_object_spread({innerType:e,typeName:yt.ZodReadonly},r(t)))};var yt,vt,gt={object:Be.lazycreate};(vt=yt||(yt={})).ZodString="ZodString",vt.ZodNumber="ZodNumber",vt.ZodNaN="ZodNaN",vt.ZodBigInt="ZodBigInt",vt.ZodBoolean="ZodBoolean",vt.ZodDate="ZodDate",vt.ZodSymbol="ZodSymbol",vt.ZodUndefined="ZodUndefined",vt.ZodNull="ZodNull",vt.ZodAny="ZodAny",vt.ZodUnknown="ZodUnknown",vt.ZodNever="ZodNever",vt.ZodVoid="ZodVoid",vt.ZodArray="ZodArray",vt.ZodObject="ZodObject",vt.ZodUnion="ZodUnion",vt.ZodDiscriminatedUnion="ZodDiscriminatedUnion",vt.ZodIntersection="ZodIntersection",vt.ZodTuple="ZodTuple",vt.ZodRecord="ZodRecord",vt.ZodMap="ZodMap",vt.ZodSet="ZodSet",vt.ZodFunction="ZodFunction",vt.ZodLazy="ZodLazy",vt.ZodLiteral="ZodLiteral",vt.ZodEnum="ZodEnum",vt.ZodEffects="ZodEffects",vt.ZodNativeEnum="ZodNativeEnum",vt.ZodOptional="ZodOptional",vt.ZodNullable="ZodNullable",vt.ZodDefault="ZodDefault",vt.ZodCatch="ZodCatch",vt.ZodPromise="ZodPromise",vt.ZodBranded="ZodBranded",vt.ZodPipeline="ZodPipeline",vt.ZodReadonly="ZodReadonly";var bt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{message:"Input not instance of ".concat(e.name)};return f(function(t){return _instanceof(t,e)},t)},kt=Te.create,jt=Ee.create,St=pt.create,wt=Ie.create,xt=Ne.create,Pt=Me.create,Ot=Re.create,At=De.create,Zt=ze.create,Ct=Le.create,Tt=$e.create,Et=Fe.create,It=Ue.create,Nt=qe.create,Mt=Be.create,Rt=Be.strictCreate,Dt=Je.create,zt=Ke.create,Lt=Ge.create,$t=Ye.create,Ft=Qe.create,Ut=Xe.create,qt=et.create,Vt=tt.create,Bt=nt.create,Jt=rt.create,Wt=at.create,Kt=it.create,Ht=ot.create,Gt=st.create,Yt=ct.create,Qt=ut.create,Xt=st.createWithPreprocess,en=ht.create,tn=function(){return kt().optional()},nn=function(){return jt().optional()},rn=function(){return xt().optional()},an={string:function(e){return Te.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},number:function(e){return Ee.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},boolean:function(e){return Ne.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},bigint:function(e){return Ie.create(_object_spread_props(_object_spread({},e),{coerce:!0}))},date:function(e){return Me.create(_object_spread_props(_object_spread({},e),{coerce:!0}))}},on=ae,sn=Symbol("Let zodToJsonSchema decide on which parser to use"),cn={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},un=function(e){var t=function(e){return"string"==typeof e?_object_spread_props(_object_spread({},cn),{name:e}):_object_spread({},cn,e)}(e),n=void 0!==t.name?_to_consumable_array(t.basePath).concat([t.definitionPath,t.name]):t.basePath;return _object_spread_props(_object_spread({},t),{flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(function(e){var n=_sliced_to_array(e,2),r=n[0],a=n[1];return[a._def,{def:a._def,path:_to_consumable_array(t.basePath).concat([t.definitionPath,r]),jsonSchema:void 0}]}))})},ln=function(e,t){for(var n=0;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString()].concat(_to_consumable_array(t.slice(n))).join("/")};function dn(e,t,n){var r=null!=n?n:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(function(n,r){return dn(e,t,n)})};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return pn(e,t)}}var pn=function(e,t){var n={type:"integer",format:"unix-time"};if("openApi3"===t.target)return n;var r=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;switch(c.kind){case"min":h(n,"minimum",c.value,c.message,t);break;case"max":h(n,"maximum",c.value,c.message,t)}}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n},fn=function(e){return(!("type"in e)||"string"!==e.type)&&"allOf"in e},_n=void 0,hn={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:function(){return void 0===_n&&(_n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),_n},uuid:/^[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}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([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])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/},mn=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789"),yn={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},vn=function(e,t){var n=(_instanceof(e.options,Map)?Array.from(e.options.values()):e.options).map(function(e,n){return bn(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","".concat(n)])}))}).filter(function(e){return!!e&&(!t.strictUnions||"object"===(void 0===e?"undefined":_type_of(e))&&Object.keys(e).length>0)});return n.length?{anyOf:n}:void 0},gn=function(e,t,n){switch(t){case yt.ZodString:return v(e,n);case yt.ZodNumber:return function(e,t){var n={type:"number"};if(!e.checks)return n;var r=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;switch(c.kind){case"int":n.type="integer",_(n,"type",c.message,t);break;case"min":"jsonSchema7"===t.target?c.inclusive?h(n,"minimum",c.value,c.message,t):h(n,"exclusiveMinimum",c.value,c.message,t):(c.inclusive||(n.exclusiveMinimum=!0),h(n,"minimum",c.value,c.message,t));break;case"max":"jsonSchema7"===t.target?c.inclusive?h(n,"maximum",c.value,c.message,t):h(n,"exclusiveMaximum",c.value,c.message,t):(c.inclusive||(n.exclusiveMaximum=!0),h(n,"maximum",c.value,c.message,t));break;case"multipleOf":h(n,"multipleOf",c.value,c.message,t)}}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,n);case yt.ZodObject:return function(e,t){var n="openAi"===t.target,r={type:"object",properties:{}},a=[],i=e.shape();for(var o in i){var s=i[o];if(void 0!==s&&void 0!==s._def){var c=P(s);c&&n&&("ZodOptional"===s._def.typeName&&(s=s._def.innerType),s.isNullable()||(s=s.nullable()),c=!1);var u=bn(s._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["properties",o]),propertyPath:_to_consumable_array(t.currentPath).concat(["properties",o])}));void 0!==u&&(r.properties[o]=u,c||a.push(o))}}a.length&&(r.required=a);var l=x(e,t);return void 0!==l&&(r.additionalProperties=l),r}(e,n);case yt.ZodBigInt:return function(e,t){var n={type:"integer",format:"int64"};if(!e.checks)return n;var r=!0,a=!1,i=void 0;try{for(var o,s=e.checks[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;switch(c.kind){case"min":"jsonSchema7"===t.target?c.inclusive?h(n,"minimum",c.value,c.message,t):h(n,"exclusiveMinimum",c.value,c.message,t):(c.inclusive||(n.exclusiveMinimum=!0),h(n,"minimum",c.value,c.message,t));break;case"max":"jsonSchema7"===t.target?c.inclusive?h(n,"maximum",c.value,c.message,t):h(n,"exclusiveMaximum",c.value,c.message,t):(c.inclusive||(n.exclusiveMaximum=!0),h(n,"maximum",c.value,c.message,t));break;case"multipleOf":h(n,"multipleOf",c.value,c.message,t)}}}catch(e){a=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,n);case yt.ZodBoolean:return{type:"boolean"};case yt.ZodDate:return dn(e,n);case yt.ZodUndefined:return function(e){return{not:m(e)}}(n);case yt.ZodNull:return function(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}(n);case yt.ZodArray:return function(e,t){var n,r,a,i={type:"array"};return(null===(n=e.type)||void 0===n?void 0:n._def)&&(null===(a=e.type)||void 0===a||null===(r=a._def)||void 0===r?void 0:r.typeName)!==yt.ZodAny&&(i.items=bn(e.type._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items"])}))),e.minLength&&h(i,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&h(i,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(h(i,"minItems",e.exactLength.value,e.exactLength.message,t),h(i,"maxItems",e.exactLength.value,e.exactLength.message,t)),i}(e,n);case yt.ZodUnion:case yt.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return vn(e,t);var n=_instanceof(e.options,Map)?Array.from(e.options.values()):e.options;if(n.every(function(e){return e._def.typeName in yn&&(!e._def.checks||!e._def.checks.length)})){var r=n.reduce(function(e,t){var n=yn[t._def.typeName];return n&&!e.includes(n)?_to_consumable_array(e).concat([n]):e},[]);return{type:r.length>1?r:r[0]}}if(n.every(function(e){return"ZodLiteral"===e._def.typeName&&!e.description})){var a=n.reduce(function(e,t){var n=_type_of(t._def.value);switch(n){case"string":case"number":case"boolean":return _to_consumable_array(e).concat([n]);case"bigint":return _to_consumable_array(e).concat(["integer"]);case"object":if(null===t._def.value)return _to_consumable_array(e).concat(["null"]);default:return e}},[]);if(a.length===n.length){var i=a.filter(function(e,t,n){return n.indexOf(e)===t});return{type:i.length>1?i:i[0],enum:n.reduce(function(e,t){return e.includes(t._def.value)?e:_to_consumable_array(e).concat([t._def.value])},[])}}}else if(n.every(function(e){return"ZodEnum"===e._def.typeName}))return{type:"string",enum:n.reduce(function(e,t){return _to_consumable_array(e).concat(_to_consumable_array(t._def.values.filter(function(t){return!e.includes(t)})))},[])};return vn(e,t)}(e,n);case yt.ZodIntersection:return function(e,t){var n=[bn(e.left._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","0"])})),bn(e.right._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","1"])}))].filter(function(e){return!!e}),r="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0,a=[];return n.forEach(function(e){if(fn(e)){var t;(t=a).push.apply(t,_to_consumable_array(e.allOf)),void 0===e.unevaluatedProperties&&(r=void 0)}else{var n=e;"additionalProperties"in e&&!1===e.additionalProperties?(e.additionalProperties,n=_object_without_properties(e,["additionalProperties"])):r=void 0,a.push(n)}}),a.length?_object_spread({allOf:a},r):void 0}(e,n);case yt.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(function(e,n){return bn(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","".concat(n)])}))}).reduce(function(e,t){return void 0===t?e:_to_consumable_array(e).concat([t])},[]),additionalItems:bn(e.rest._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["additionalItems"])}))}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(function(e,n){return bn(e._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","".concat(n)])}))}).reduce(function(e,t){return void 0===t?e:_to_consumable_array(e).concat([t])},[])}}(e,n);case yt.ZodRecord:return w(e,n);case yt.ZodLiteral:return function(e,t){var n=_type_of(e.value);return"bigint"!==n&&"number"!==n&&"boolean"!==n&&"string"!==n?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===n?"integer":n,enum:[e.value]}:{type:"bigint"===n?"integer":n,const:e.value}}(e,n);case yt.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case yt.ZodNativeEnum:return function(e){var t=e.values,n=Object.keys(e.values).filter(function(e){return"number"!=typeof t[t[e]]}).map(function(e){return t[e]}),r=Array.from(new Set(n.map(function(e){return void 0===e?"undefined":_type_of(e)})));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case yt.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:yn[e.innerType._def.typeName],nullable:!0}:{type:[yn[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){var n=bn(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath)}));return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&_object_spread_props(_object_spread({},n),{nullable:!0})}var r=bn(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","0"])}));return r&&{anyOf:[r,{type:"null"}]}}(e,n);case yt.ZodOptional:return function(e,t){var n;if(t.currentPath.toString()===(null===(n=t.propertyPath)||void 0===n?void 0:n.toString()))return bn(e.innerType._def,t);var r=bn(e.innerType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["anyOf","1"])}));return r?{anyOf:[{not:m(t)},r]}:m(t)}(e,n);case yt.ZodMap:return function(e,t){return"record"===t.mapStrategy?w(e,t):{type:"array",maxItems:125,items:{type:"array",items:[bn(e.keyType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","items","0"])}))||m(t),bn(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items","items","1"])}))||m(t)],minItems:2,maxItems:2}}}(e,n);case yt.ZodSet:return function(e,t){var n={type:"array",uniqueItems:!0,items:bn(e.valueType._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["items"])}))};return e.minSize&&h(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&h(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}(e,n);case yt.ZodLazy:return function(){return e.getter()._def};case yt.ZodPromise:return function(e,t){return bn(e.type._def,t)}(e,n);case yt.ZodNaN:case yt.ZodNever:return function(e){return"openAi"===e.target?void 0:{not:m(_object_spread_props(_object_spread({},e),{currentPath:_to_consumable_array(e.currentPath).concat(["not"])}))}}(n);case yt.ZodEffects:return function(e,t){return"input"===t.effectStrategy?bn(e.schema._def,t):m(t)}(e,n);case yt.ZodAny:return m(n);case yt.ZodUnknown:return function(e){return m(e)}(n);case yt.ZodDefault:return function(e,t){return _object_spread_props(_object_spread({},bn(e.innerType._def,t)),{default:e.defaultValue()})}(e,n);case yt.ZodBranded:return y(e,n);case yt.ZodReadonly:case yt.ZodCatch:return function(e,t){return bn(e.innerType._def,t)}(e,n);case yt.ZodPipeline:return function(e,t){if("input"===t.pipeStrategy)return bn(e.in._def,t);if("output"===t.pipeStrategy)return bn(e.out._def,t);var n=bn(e.in._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf","0"])}));return{allOf:[n,bn(e.out._def,_object_spread_props(_object_spread({},t),{currentPath:_to_consumable_array(t.currentPath).concat(["allOf",n?"1":"0"])}))].filter(function(e){return void 0!==e})}}(e,n);case yt.ZodFunction:case yt.ZodVoid:case yt.ZodSymbol:default:return}};function bn(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.seen.get(e);if(t.override){var a,i=null===(a=t.override)||void 0===a?void 0:a.call(t,e,t,r,n);if(i!==sn)return i}if(r&&!n){var o=kn(r,t);if(void 0!==o)return o}var s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);var c=gn(e,e.typeName,t),u="function"==typeof c?bn(c(),t):c;if(u&&jn(e,t,u),t.postProcess){var l=t.postProcess(u,e,t);return s.jsonSchema=u,l}return s.jsonSchema=u,u}var kn=function(e,t){switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:ln(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(function(e,n){return t.currentPath[n]===e})?(console.warn("Recursive reference detected at ".concat(t.currentPath.join("/"),"! Defaulting to any")),m(t)):"seen"===t.$refStrategy?m(t):void 0}},jn=function(e,t,n){return e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n},Sn=function(e,t){var n,r=un(t),a="object"===(void 0===t?"undefined":_type_of(t))&&t.definitions?Object.entries(t.definitions).reduce(function(e,t){var n,a=_sliced_to_array(t,2),i=a[0],o=a[1];return _object_spread_props(_object_spread({},e),_define_property({},i,null!==(n=bn(o._def,_object_spread_props(_object_spread({},r),{currentPath:_to_consumable_array(r.basePath).concat([r.definitionPath,i])}),!0))&&void 0!==n?n:m(r)))},{}):void 0,i="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,o=null!==(n=bn(e._def,void 0===i?r:_object_spread_props(_object_spread({},r),{currentPath:_to_consumable_array(r.basePath).concat([r.definitionPath,i])}),!1))&&void 0!==n?n:m(r),s="object"===(void 0===t?"undefined":_type_of(t))&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==s&&(o.title=s),r.flags.hasReferencedOpenAiAnyType&&(a||(a={}),a[r.openAiAnyTypeName]||(a[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===r.$refStrategy?"1":_to_consumable_array(r.basePath).concat([r.definitionPath,r.openAiAnyTypeName]).join("/")}}));var c=void 0===i?a?_object_spread_props(_object_spread({},o),_define_property({},r.definitionPath,a)):o:_define_property({$ref:_to_consumable_array("relative"===r.$refStrategy?[]:r.basePath).concat([r.definitionPath,i]).join("/")},r.definitionPath,_object_spread_props(_object_spread({},a),_define_property({},i,o)));return"jsonSchema7"===r.target?c.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==r.target&&"openAi"!==r.target||(c.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===r.target&&("anyOf"in c||"oneOf"in c||"allOf"in c||"type"in c&&Array.isArray(c.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),c},wn=Object.defineProperty,xn=function(e,t){for(var n in t)wn(e,n,{get:t[n],enumerable:!0})},Pn=B.string(),On=B.number(),An=(B.boolean(),B.string().min(1)),Zn=B.number().int().positive(),Cn=B.number().int().nonnegative(),Tn=B.number().describe("Tagging version number");B.union([B.string(),B.number(),B.boolean()]).optional();xn({},{ErrorHandlerSchema:function(){return Nn},HandlerSchema:function(){return Rn},LogHandlerSchema:function(){return Mn},StorageSchema:function(){return In},StorageTypeSchema:function(){return En},errorHandlerJsonSchema:function(){return Ln},handlerJsonSchema:function(){return Fn},logHandlerJsonSchema:function(){return $n},storageJsonSchema:function(){return zn},storageTypeJsonSchema:function(){return Dn}});var En=B.enum(["local","session","cookie"]).describe("Storage mechanism: local, session, or cookie"),In=B.object({Local:B.literal("local"),Session:B.literal("session"),Cookie:B.literal("cookie")}).describe("Storage type constants for type-safe references"),Nn=B.any().describe("Error handler function: (error, state?) => void"),Mn=B.any().describe("Log handler function: (message, verbose?) => void"),Rn=B.object({Error:Nn.describe("Error handler function"),Log:Mn.describe("Log handler function")}).describe("Handler interface with error and log functions"),Dn=Sn(En,{target:"jsonSchema7",$refStrategy:"relative",name:"StorageType"}),zn=Sn(In,{target:"jsonSchema7",$refStrategy:"relative",name:"Storage"}),Ln=Sn(Nn,{target:"jsonSchema7",$refStrategy:"relative",name:"ErrorHandler"}),$n=Sn(Mn,{target:"jsonSchema7",$refStrategy:"relative",name:"LogHandler"}),Fn=Sn(Rn,{target:"jsonSchema7",$refStrategy:"relative",name:"Handler"});B.object({onError:Nn.optional().describe("Error handler function: (error, state?) => void"),onLog:Mn.optional().describe("Log handler function: (message, verbose?) => void")}).partial(),B.object({verbose:B.boolean().describe("Enable verbose logging for debugging").optional()}).partial(),B.object({queue:B.boolean().describe("Whether to queue events when consent is not granted").optional()}).partial(),B.object({}).partial(),B.object({init:B.boolean().describe("Whether to initialize immediately").optional(),loadScript:B.boolean().describe("Whether to load external script (for web destinations)").optional()}).partial(),B.object({disabled:B.boolean().describe("Set to true to disable").optional()}).partial(),B.object({primary:B.boolean().describe("Mark as primary (only one can be primary)").optional()}).partial(),B.object({settings:B.any().optional().describe("Implementation-specific configuration")}).partial(),B.object({env:B.any().optional().describe("Environment dependencies (platform-specific)")}).partial(),B.object({type:B.string().optional().describe("Instance type identifier"),config:B.any().describe("Instance configuration")}).partial(),B.object({collector:B.any().describe("Collector instance (runtime object)"),config:B.any().describe("Configuration"),env:B.any().describe("Environment dependencies")}).partial(),B.object({batch:B.number().optional().describe("Batch size: bundle N events for batch processing"),batched:B.any().optional().describe("Batch of events to be processed")}).partial(),B.object({ignore:B.boolean().describe("Set to true to skip processing").optional(),condition:B.string().optional().describe("Condition function: return true to process")}).partial(),B.object({sources:B.record(B.string(),B.any()).describe("Map of source instances")}).partial(),B.object({destinations:B.record(B.string(),B.any()).describe("Map of destination instances")}).partial();xn({},{ConsentSchema:function(){return Wn},DeepPartialEventSchema:function(){return tr},EntitiesSchema:function(){return Qn},EntitySchema:function(){return Yn},EventSchema:function(){return Xn},OrderedPropertiesSchema:function(){return Bn},PartialEventSchema:function(){return er},PropertiesSchema:function(){return Vn},PropertySchema:function(){return qn},PropertyTypeSchema:function(){return Un},SourceSchema:function(){return Gn},SourceTypeSchema:function(){return Jn},UserSchema:function(){return Kn},VersionSchema:function(){return Hn},consentJsonSchema:function(){return ur},entityJsonSchema:function(){return sr},eventJsonSchema:function(){return nr},orderedPropertiesJsonSchema:function(){return or},partialEventJsonSchema:function(){return rr},propertiesJsonSchema:function(){return ir},sourceTypeJsonSchema:function(){return cr},userJsonSchema:function(){return ar}});var Un=B.lazy(function(){return B.union([B.boolean(),B.string(),B.number(),B.record(B.string(),qn)])}),qn=B.lazy(function(){return B.union([Un,B.array(Un)])}),Vn=B.record(B.string(),qn.optional()).describe("Flexible property collection with optional values"),Bn=B.record(B.string(),B.tuple([qn,B.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"),Jn=B.union([B.enum(["web","server","app","other"]),B.string()]).describe("Source type: web, server, app, other, or custom"),Wn=B.record(B.string(),B.boolean()).describe("Consent requirement mapping (group name → state)"),Kn=Vn.and(B.object({id:B.string().optional().describe("User identifier"),device:B.string().optional().describe("Device identifier"),session:B.string().optional().describe("Session identifier"),hash:B.string().optional().describe("Hashed identifier"),address:B.string().optional().describe("User address"),email:B.string().email().optional().describe("User email address"),phone:B.string().optional().describe("User phone number"),userAgent:B.string().optional().describe("Browser user agent string"),browser:B.string().optional().describe("Browser name"),browserVersion:B.string().optional().describe("Browser version"),deviceType:B.string().optional().describe("Device type (mobile, desktop, tablet)"),os:B.string().optional().describe("Operating system"),osVersion:B.string().optional().describe("Operating system version"),screenSize:B.string().optional().describe("Screen dimensions"),language:B.string().optional().describe("User language"),country:B.string().optional().describe("User country"),region:B.string().optional().describe("User region/state"),city:B.string().optional().describe("User city"),zip:B.string().optional().describe("User postal code"),timezone:B.string().optional().describe("User timezone"),ip:B.string().optional().describe("User IP address"),internal:B.boolean().optional().describe("Internal user flag (employee, test user)")})).describe("User identification and properties"),Hn=Vn.and(B.object({source:Pn.describe('Walker implementation version (e.g., "2.0.0")'),tagging:Tn})).describe("Walker version information"),Gn=Vn.and(B.object({type:Jn.describe("Source type identifier"),id:Pn.describe("Source identifier (typically URL on web)"),previous_id:Pn.describe("Previous source identifier (typically referrer on web)")})).describe("Event source information"),Yn=B.lazy(function(){return B.object({entity:B.string().describe("Entity name"),data:Vn.describe("Entity-specific properties"),nested:B.array(Yn).describe("Nested child entities"),context:Bn.describe("Entity context data")})}).describe("Nested entity structure with recursive nesting support"),Qn=B.array(Yn).describe("Array of nested entities"),Xn=B.object({name:B.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'),data:Vn.describe("Event-specific properties"),context:Bn.describe("Ordered context properties with priorities"),globals:Vn.describe("Global properties shared across events"),custom:Vn.describe("Custom implementation-specific properties"),user:Kn.describe("User identification and attributes"),nested:Qn.describe("Related nested entities"),consent:Wn.describe("Consent states at event time"),id:An.describe("Unique event identifier (timestamp-based)"),trigger:Pn.describe("Event trigger identifier"),entity:Pn.describe("Parsed entity from event name"),action:Pn.describe("Parsed action from event name"),timestamp:Zn.describe("Unix timestamp in milliseconds since epoch"),timing:On.describe("Event processing timing information"),group:Pn.describe("Event grouping identifier"),count:Cn.describe("Event count in session"),version:Hn.describe("Walker version information"),source:Gn.describe("Event source information")}).describe("Complete walkerOS event structure"),er=Xn.partial().describe("Partial event structure with all fields optional"),tr=B.lazy(function(){return Xn.deepPartial()}).describe("Deep partial event structure with all nested fields optional"),nr=Sn(Xn,{target:"jsonSchema7",$refStrategy:"relative",name:"Event"}),rr=Sn(er,{target:"jsonSchema7",$refStrategy:"relative",name:"PartialEvent"}),ar=Sn(Kn,{target:"jsonSchema7",$refStrategy:"relative",name:"User"}),ir=Sn(Vn,{target:"jsonSchema7",$refStrategy:"relative",name:"Properties"}),or=Sn(Bn,{target:"jsonSchema7",$refStrategy:"relative",name:"OrderedProperties"}),sr=Sn(Yn,{target:"jsonSchema7",$refStrategy:"relative",name:"Entity"}),cr=Sn(Jn,{target:"jsonSchema7",$refStrategy:"relative",name:"SourceType"}),ur=Sn(Wn,{target:"jsonSchema7",$refStrategy:"relative",name:"Consent"});xn({},{ConfigSchema:function(){return gr},LoopSchema:function(){return pr},MapSchema:function(){return _r},PolicySchema:function(){return mr},ResultSchema:function(){return br},RuleSchema:function(){return yr},RulesSchema:function(){return vr},SetSchema:function(){return fr},ValueConfigSchema:function(){return hr},ValueSchema:function(){return lr},ValuesSchema:function(){return dr},configJsonSchema:function(){return Zr},loopJsonSchema:function(){return Sr},mapJsonSchema:function(){return xr},policyJsonSchema:function(){return Pr},ruleJsonSchema:function(){return Or},rulesJsonSchema:function(){return Ar},setJsonSchema:function(){return wr},valueConfigJsonSchema:function(){return jr},valueJsonSchema:function(){return kr}});var lr=B.lazy(function(){return B.union([B.string().describe('String value or property path (e.g., "data.id")'),B.number().describe("Numeric value"),B.boolean().describe("Boolean value"),hr,B.array(lr).describe("Array of values")])}),dr=B.array(lr).describe("Array of transformation values"),pr=B.tuple([lr,lr]).describe("Loop transformation: [source, transform] tuple for array processing"),fr=B.array(lr).describe("Set: Array of values for selection or combination"),_r=B.record(B.string(),lr).describe("Map: Object mapping keys to transformation values"),hr=B.object({key:B.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'),value:B.union([B.string(),B.number(),B.boolean()]).optional().describe("Static primitive value"),fn:B.string().optional().describe("Custom transformation function as string (serialized)"),map:_r.optional().describe("Object mapping: transform event data to structured output"),loop:pr.optional().describe("Loop transformation: [source, transform] for array processing"),set:fr.optional().describe("Set of values: combine or select from multiple values"),consent:Wn.optional().describe("Required consent states to include this value"),condition:B.string().optional().describe("Condition function as string: return true to include value"),validate:B.string().optional().describe("Validation function as string: return true if value is valid")}).refine(function(e){return Object.keys(e).length>0},{message:"ValueConfig must have at least one property"}).describe("Value transformation configuration with multiple strategies"),mr=B.record(B.string(),lr).describe("Policy rules for event pre-processing (key → value mapping)"),yr=B.object({batch:B.number().optional().describe("Batch size: bundle N events for batch processing"),condition:B.string().optional().describe("Condition function as string: return true to process event"),consent:Wn.optional().describe("Required consent states to process this event"),settings:B.any().optional().describe("Destination-specific settings for this event mapping"),data:B.union([lr,dr]).optional().describe("Data transformation rules for event"),ignore:B.boolean().optional().describe("Set to true to skip processing this event"),name:B.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'),policy:mr.optional().describe("Event-level policy overrides (applied after config-level policy)")}).describe("Mapping rule for specific entity-action combination"),vr=B.record(B.string(),B.record(B.string(),B.union([yr,B.array(yr)])).optional()).describe("Nested mapping rules: { entity: { action: Rule | Rule[] } } with wildcard support"),gr=B.object({consent:Wn.optional().describe("Required consent states to process any events"),data:B.union([lr,dr]).optional().describe("Global data transformation applied to all events"),mapping:vr.optional().describe("Entity-action specific mapping rules"),policy:mr.optional().describe("Pre-processing policy rules applied before mapping")}).describe("Shared mapping configuration for sources and destinations"),br=B.object({eventMapping:yr.optional().describe("Resolved mapping rule for event"),mappingKey:B.string().optional().describe('Mapping key used (e.g., "product.view")')}).describe("Mapping resolution result"),kr=Sn(lr,{target:"jsonSchema7",$refStrategy:"relative",name:"Value"}),jr=Sn(hr,{target:"jsonSchema7",$refStrategy:"relative",name:"ValueConfig"}),Sr=Sn(pr,{target:"jsonSchema7",$refStrategy:"relative",name:"Loop"}),wr=Sn(fr,{target:"jsonSchema7",$refStrategy:"relative",name:"Set"}),xr=Sn(_r,{target:"jsonSchema7",$refStrategy:"relative",name:"Map"}),Pr=Sn(mr,{target:"jsonSchema7",$refStrategy:"relative",name:"Policy"}),Or=Sn(yr,{target:"jsonSchema7",$refStrategy:"relative",name:"Rule"}),Ar=Sn(vr,{target:"jsonSchema7",$refStrategy:"relative",name:"Rules"}),Zr=Sn(gr,{target:"jsonSchema7",$refStrategy:"relative",name:"MappingConfig"});xn({},{BatchSchema:function(){return zr},ConfigSchema:function(){return Cr},ContextSchema:function(){return Ir},DLQSchema:function(){return Wr},DataSchema:function(){return Lr},DestinationPolicySchema:function(){return Er},DestinationsSchema:function(){return qr},InitDestinationsSchema:function(){return Ur},InitSchema:function(){return Fr},InstanceSchema:function(){return $r},PartialConfigSchema:function(){return Tr},PushBatchContextSchema:function(){return Mr},PushContextSchema:function(){return Nr},PushEventSchema:function(){return Rr},PushEventsSchema:function(){return Dr},PushResultSchema:function(){return Br},RefSchema:function(){return Vr},ResultSchema:function(){return Jr},batchJsonSchema:function(){return Qr},configJsonSchema:function(){return Kr},contextJsonSchema:function(){return Gr},instanceJsonSchema:function(){return Xr},partialConfigJsonSchema:function(){return Hr},pushContextJsonSchema:function(){return Yr},resultJsonSchema:function(){return ea}});var Cr=B.object({consent:Wn.optional().describe("Required consent states to send events to this destination"),settings:B.any().describe("Implementation-specific configuration").optional(),data:B.union([lr,dr]).optional().describe("Global data transformation applied to all events for this destination"),env:B.any().describe("Environment dependencies (platform-specific)").optional(),id:An.describe("Destination instance identifier (defaults to destination key)").optional(),init:B.boolean().describe("Whether to initialize immediately").optional(),loadScript:B.boolean().describe("Whether to load external script (for web destinations)").optional(),mapping:vr.optional().describe("Entity-action specific mapping rules for this destination"),policy:mr.optional().describe("Pre-processing policy rules applied before event mapping"),queue:B.boolean().describe("Whether to queue events when consent is not granted").optional(),verbose:B.boolean().describe("Enable verbose logging for debugging").optional(),onError:Nn.optional(),onLog:Mn.optional()}).describe("Destination configuration"),Tr=Cr.deepPartial().describe("Partial destination configuration with all fields deeply optional"),Er=mr.describe("Destination policy rules for event pre-processing"),Ir=B.object({collector:B.any().describe("Collector instance (runtime object)"),config:Cr.describe("Destination configuration"),data:B.union([B.any(),B.undefined(),B.array(B.union([B.any(),B.undefined()]))]).optional().describe("Transformed event data"),env:B.any().describe("Environment dependencies")}).describe("Destination context for init and push functions"),Nr=Ir.extend({mapping:yr.optional().describe("Resolved mapping rule for this specific event")}).describe("Push context with event-specific mapping"),Mr=Nr.describe("Batch push context with event-specific mapping"),Rr=B.object({event:Xn.describe("The event to process"),mapping:yr.optional().describe("Mapping rule for this event")}).describe("Event with optional mapping for batch processing"),Dr=B.array(Rr).describe("Array of events with mappings"),zr=B.object({key:B.string().describe('Batch key (usually mapping key like "product.view")'),events:B.array(Xn).describe("Array of events in batch"),data:B.array(B.union([B.any(),B.undefined(),B.array(B.union([B.any(),B.undefined()]))])).describe("Transformed data for each event"),mapping:yr.optional().describe("Shared mapping rule for batch")}).describe("Batch of events grouped by mapping key"),Lr=B.union([B.any(),B.undefined(),B.array(B.union([B.any(),B.undefined()]))]).describe("Transformed event data (Property, undefined, or array)"),$r=B.object({config:Cr.describe("Destination configuration"),queue:B.array(Xn).optional().describe("Queued events awaiting consent"),dlq:B.array(B.tuple([Xn,B.any()])).optional().describe("Dead letter queue (failed events with errors)"),type:B.string().optional().describe("Destination type identifier"),env:B.any().optional().describe("Environment dependencies"),init:B.any().optional().describe("Initialization function"),push:B.any().describe("Push function for single events"),pushBatch:B.any().optional().describe("Batch push function"),on:B.any().optional().describe("Event lifecycle hook function")}).describe("Destination instance (runtime object with functions)"),Fr=B.object({code:$r.describe("Destination instance with implementation"),config:Tr.optional().describe("Partial configuration overrides"),env:B.any().optional().describe("Partial environment overrides")}).describe("Destination initialization configuration"),Ur=B.record(B.string(),Fr).describe("Map of destination IDs to initialization configurations"),qr=B.record(B.string(),$r).describe("Map of destination IDs to runtime instances"),Vr=B.object({id:B.string().describe("Destination ID"),destination:$r.describe("Destination instance")}).describe("Destination reference (ID + instance)"),Br=B.object({queue:B.array(Xn).optional().describe("Events queued (awaiting consent)"),error:B.any().optional().describe("Error if push failed")}).describe("Push operation result"),Jr=B.object({successful:B.array(Vr).describe("Destinations that processed successfully"),queued:B.array(Vr).describe("Destinations that queued events"),failed:B.array(Vr).describe("Destinations that failed to process")}).describe("Overall destination processing result"),Wr=B.array(B.tuple([Xn,B.any()])).describe("Dead letter queue: [(event, error), ...]"),Kr=Sn(Cr,{target:"jsonSchema7",$refStrategy:"relative",name:"DestinationConfig"}),Hr=Sn(Tr,{target:"jsonSchema7",$refStrategy:"relative",name:"PartialDestinationConfig"}),Gr=Sn(Ir,{target:"jsonSchema7",$refStrategy:"relative",name:"DestinationContext"}),Yr=Sn(Nr,{target:"jsonSchema7",$refStrategy:"relative",name:"PushContext"}),Qr=Sn(zr,{target:"jsonSchema7",$refStrategy:"relative",name:"Batch"}),Xr=Sn($r,{target:"jsonSchema7",$refStrategy:"relative",name:"DestinationInstance"}),ea=Sn(Jr,{target:"jsonSchema7",$refStrategy:"relative",name:"DestinationResult"});xn({},{CommandTypeSchema:function(){return ta},ConfigSchema:function(){return na},DestinationsSchema:function(){return sa},InitConfigSchema:function(){return aa},InstanceSchema:function(){return ca},PushContextSchema:function(){return ia},SessionDataSchema:function(){return ra},SourcesSchema:function(){return oa},commandTypeJsonSchema:function(){return ua},configJsonSchema:function(){return la},initConfigJsonSchema:function(){return pa},instanceJsonSchema:function(){return _a},pushContextJsonSchema:function(){return fa},sessionDataJsonSchema:function(){return da}});var ta=B.union([B.enum(["action","config","consent","context","destination","elb","globals","hook","init","link","run","user","walker"]),B.string()]).describe("Collector command type: standard commands or custom string for extensions"),na=B.object({run:B.boolean().describe("Whether to run collector automatically on initialization").optional(),tagging:Tn,globalsStatic:Vn.describe("Static global properties that persist across collector runs"),sessionStatic:B.record(B.any()).describe("Static session data that persists across collector runs"),verbose:B.boolean().describe("Enable verbose logging for debugging"),onError:Nn.optional(),onLog:Mn.optional()}).describe("Core collector configuration"),ra=Vn.and(B.object({isStart:B.boolean().describe("Whether this is a new session start"),storage:B.boolean().describe("Whether storage is available"),id:An.describe("Session identifier").optional(),start:Zn.describe("Session start timestamp").optional(),marketing:B.literal(!0).optional().describe("Marketing attribution flag"),updated:Zn.describe("Last update timestamp").optional(),isNew:B.boolean().describe("Whether this is a new session").optional(),device:An.describe("Device identifier").optional(),count:Cn.describe("Event count in session").optional(),runs:Cn.describe("Number of runs").optional()})).describe("Session state and tracking data"),aa=na.partial().extend({consent:Wn.optional().describe("Initial consent state"),user:Kn.optional().describe("Initial user data"),globals:Vn.optional().describe("Initial global properties"),sources:B.any().optional().describe("Source configurations"),destinations:B.any().optional().describe("Destination configurations"),custom:Vn.optional().describe("Initial custom implementation-specific properties")}).describe("Collector initialization configuration with initial state"),ia=B.object({mapping:gr.optional().describe("Source-level mapping configuration")}).describe("Push context with optional source mapping"),oa=B.record(B.string(),B.any()).describe("Map of source IDs to source instances"),sa=B.record(B.string(),B.any()).describe("Map of destination IDs to destination instances"),ca=B.object({push:B.any().describe("Push function for processing events"),command:B.any().describe("Command function for walker commands"),allowed:B.boolean().describe("Whether event processing is allowed"),config:na.describe("Current collector configuration"),consent:Wn.describe("Current consent state"),count:B.number().describe("Event count (increments with each event)"),custom:Vn.describe("Custom implementation-specific properties"),sources:oa.describe("Registered source instances"),destinations:sa.describe("Registered destination instances"),globals:Vn.describe("Current global properties"),group:B.string().describe("Event grouping identifier"),hooks:B.any().describe("Lifecycle hook functions"),on:B.any().describe("Event lifecycle configuration"),queue:B.array(Xn).describe("Queued events awaiting processing"),round:B.number().describe("Collector run count (increments with each run)"),session:B.union([B.undefined(),ra]).describe("Current session state"),timing:B.number().describe("Event processing timing information"),user:Kn.describe("Current user data"),version:B.string().describe("Walker implementation version")}).describe("Collector instance with state and methods"),ua=Sn(ta,{target:"jsonSchema7",$refStrategy:"relative",name:"CommandType"}),la=Sn(na,{target:"jsonSchema7",$refStrategy:"relative",name:"CollectorConfig"}),da=Sn(ra,{target:"jsonSchema7",$refStrategy:"relative",name:"SessionData"}),pa=Sn(aa,{target:"jsonSchema7",$refStrategy:"relative",name:"InitConfig"}),fa=Sn(ia,{target:"jsonSchema7",$refStrategy:"relative",name:"CollectorPushContext"}),_a=Sn(ca,{target:"jsonSchema7",$refStrategy:"relative",name:"CollectorInstance"});xn({},{BaseEnvSchema:function(){return ha},ConfigSchema:function(){return ma},InitSchema:function(){return ga},InitSourceSchema:function(){return ba},InitSourcesSchema:function(){return ka},InstanceSchema:function(){return va},PartialConfigSchema:function(){return ya},baseEnvJsonSchema:function(){return ja},configJsonSchema:function(){return Sa},initSourceJsonSchema:function(){return Pa},initSourcesJsonSchema:function(){return Oa},instanceJsonSchema:function(){return xa},partialConfigJsonSchema:function(){return wa}});var ha=B.object({push:B.any().describe("Collector push function"),command:B.any().describe("Collector command function"),sources:B.any().optional().describe("Map of registered source instances"),elb:B.any().describe("Public API function (alias for collector.push)")}).catchall(B.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"),ma=gr.extend({settings:B.any().describe("Implementation-specific configuration").optional(),env:ha.optional().describe("Environment dependencies (platform-specific)"),id:An.describe("Source identifier (defaults to source key)").optional(),onError:Nn.optional(),disabled:B.boolean().describe("Set to true to disable").optional(),primary:B.boolean().describe("Mark as primary (only one can be primary)").optional()}).describe("Source configuration with mapping and environment"),ya=ma.deepPartial().describe("Partial source configuration with all fields deeply optional"),va=B.object({type:B.string().describe('Source type identifier (e.g., "browser", "dataLayer")'),config:ma.describe("Current source configuration"),push:B.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"),destroy:B.any().optional().describe("Cleanup function called when source is removed"),on:B.any().optional().describe("Lifecycle hook function for event types")}).describe("Source instance with push handler and lifecycle methods"),ga=B.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>"),ba=B.object({code:ga.describe("Source initialization function"),config:ya.optional().describe("Partial configuration overrides"),env:ha.partial().optional().describe("Partial environment overrides"),primary:B.boolean().optional().describe("Mark as primary source (only one can be primary)")}).describe("Source initialization configuration"),ka=B.record(B.string(),ba).describe("Map of source IDs to initialization configurations"),ja=Sn(ha,{target:"jsonSchema7",$refStrategy:"relative",name:"SourceBaseEnv"}),Sa=Sn(ma,{target:"jsonSchema7",$refStrategy:"relative",name:"SourceConfig"}),wa=Sn(ya,{target:"jsonSchema7",$refStrategy:"relative",name:"PartialSourceConfig"}),xa=Sn(va,{target:"jsonSchema7",$refStrategy:"relative",name:"SourceInstance"}),Pa=Sn(ba,{target:"jsonSchema7",$refStrategy:"relative",name:"InitSource"}),Oa=Sn(ka,{target:"jsonSchema7",$refStrategy:"relative",name:"InitSources"}),Aa={merge:!0,shallow:!0,extend:!0},Za={},Ca={};$(Ca,{env:function(){return Ta},events:function(){return Ma},mapping:function(){return Ra}});var Ta={};$(Ta,{init:function(){return Ia},push:function(){return Na}});var Ea=function(){},Ia={window:{fbq:void 0,_fbq:void 0},document:{createElement:function(){return{src:"",async:!1,setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},Na={window:{fbq:Object.assign(Ea,{callMethod:Ea,queue:[],push:Ea,loaded:!0,version:"2.0"}),_fbq:Object.assign(Ea,{callMethod:Ea,queue:[],push:Ea,loaded:!0,version:"2.0"})},document:{createElement:function(){return{src:"",async:!1,setAttribute:function(){},removeAttribute:function(){}}},head:{appendChild:function(){}}}},Ma={};$(Ma,{AddToCart:function(){return I},InitiateCheckout:function(){return N},Purchase:function(){return E},ViewContent:function(){return M}});var Ra={};$(Ra,{AddToCart:function(){return za},InitiateCheckout:function(){return La},Purchase:function(){return Da},ViewContent:function(){return $a},config:function(){return Fa}});var Da={name:"Purchase",data:{map:{value:"data.total",currency:{value:"EUR"},contents:{loop:["nested",{condition:function(e){return A(e)&&"product"===e.entity},map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},content_type:{value:"product"},num_items:{fn:function(e){return e.nested.filter(function(e){return"product"===e.entity}).length}}}}},za={name:"AddToCart",data:{map:{value:"data.price",currency:{value:"EUR"},contents:{set:[{map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},content_type:{value:"product"}}}},La={name:"InitiateCheckout",data:{map:{value:"data.value",currency:{value:"EUR"},contents:{loop:["nested",{condition:function(e){return A(e)&&"product"===e.entity},map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]},num_items:{fn:function(e){return e.nested.filter(function(e){return"product"===e.entity}).length}}}}},$a={name:"ViewContent",data:{map:{value:"data.price",currency:{value:"EUR"},content_type:{value:"product"},contents:{set:[{map:{id:"data.id",quantity:{key:"data.quantity",value:1}}}]}}}},Fa={order:{complete:Da},product:{view:$a,add:za},cart:{view:La}},Ua={};$(Ua,{CustomEventName:function(){return Ja},MappingSchema:function(){return Ka},PixelId:function(){return Va},SettingsSchema:function(){return Wa},StandardEventName:function(){return Ba},mapping:function(){return Ga},settings:function(){return Ha}});var qa,Va=B.string().min(1).regex(/^[0-9]+$/,"Pixel ID must contain only digits"),Ba=B.enum(["PageView","AddPaymentInfo","AddToCart","AddToWishlist","CompleteRegistration","Contact","CustomizeProduct","Donate","FindLocation","InitiateCheckout","Lead","Purchase","Schedule","Search","StartTrial","SubmitApplication","Subscribe","ViewContent"]),Ja=B.string().min(1),Wa=B.object({pixelId:Va.describe("Your Meta Pixel ID from Facebook Business Manager (like 1234567890)")}),Ka=B.object({track:Ba.describe("Meta Pixel standard event name to send (like PageView or Purchase)").optional(),trackCustom:Ja.describe("Custom event name for tracking non-standard events (like NewsletterSignup)").optional()}),Ha=O(Wa),Ga=O(Ka),Ya={type:"meta-pixel",config:{},init:function(e){var t=e.config,n=e.env,r=t.settings,a=t.loadScript,i=(r||{}).pixelId;if(a&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://connect.facebook.net/en_US/fbevents.js",n=T(e).document,r=n.createElement("script");r.src=t,r.async=!0,n.head.appendChild(r)}(n),!i)return!1;!function(e){var t=T(e).window;if(!t.fbq){var n=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n.callMethod?n.callMethod.apply(n,t):n.queue.push(t)};t.fbq=n,t._fbq||(t._fbq=n),n.push=n,n.loaded=!0,n.version="2.0",n.queue=[]}}(n),(0,T(n).window.fbq)("init",i)},push:function(e,t){t.config;var n=t.mapping,r=void 0===n?{}:n,a=t.data,i=t.env,o=r.settings||{},s=o.track,c=o.trackCustom,u=T(i).window.fbq;"page view"!==e.name||r.settings||(e.name="PageView");var l=s||c||e.name;u(c?"trackCustom":"track",String(l),A(a)?a:{},{eventID:e.id})}},Qa=Ya;return qa=F,function(e,t,n,r){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var a=!0,i=!1,o=void 0;try{for(var s,c=function(){var a=s.value;L.call(e,a)||a===n||R(e,a,{get:function(){return t[a]},enumerable:!(r=D(t,a))||r.enumerable})},u=z(t)[Symbol.iterator]();!(a=(s=u.next()).done);a=!0)c()}catch(e){i=!0,o=e}finally{try{a||null==u.return||u.return()}finally{if(i)throw o}}}return e}(R({},"__esModule",{value:!0}),qa)}();
|
|
1
|
+
"use strict";function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var Destination=function(){var e=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!function(e){return Array.isArray(e)}(e)&&"[object Object]"===Object.prototype.toString.call(e)},t=function(e){return _object_spread({window:"undefined"!=typeof window?window:globalThis.window,document:"undefined"!=typeof document?document:globalThis.document},e)},n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,c={};!function(e,t){for(var r in t)n(e,r,{get:t[r],enumerable:!0})}(c,{DestinationMeta:function(){return a},default:function(){return l},destinationMeta:function(){return f}});var u,a={},f={type:"meta-pixel",config:{},init:function(e){var n=e.config,r=e.env,o=n.settings,i=n.loadScript,c=(o||{}).pixelId;if(i&&function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"https://connect.facebook.net/en_US/fbevents.js",r=t(e).document,o=r.createElement("script");o.src=n,o.async=!0,r.head.appendChild(o)}(r),!c)return!1;!function(e){var n=t(e).window;if(!n.fbq){var r=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.callMethod?r.callMethod.apply(r,t):r.queue.push(t)};n.fbq=r,n._fbq||(n._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[]}}(r),(0,t(r).window.fbq)("init",c)},push:function(n,r){r.config;var o=r.mapping,i=void 0===o?{}:o,c=r.data,u=r.env,a=i.settings||{},f=a.track,l=a.trackCustom,d=t(u).window.fbq;"page view"!==n.name||i.settings||(n.name="PageView");var p=f||l||n.name;d(l?"trackCustom":"track",String(p),e(c)?c:{},{eventID:n.id})}},l=f;return u=c,function(e,t,c,u){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var a=!0,f=!1,l=void 0;try{for(var d,p=function(){var o=d.value;i.call(e,o)||o===c||n(e,o,{get:function(){return t[o]},enumerable:!(u=r(t,o))||u.enumerable})},b=o(t)[Symbol.iterator]();!(a=(d=b.next()).done);a=!0)p()}catch(e){f=!0,l=e}finally{try{a||null==b.return||b.return()}finally{if(f)throw l}}}return e}(n({},"__esModule",{value:!0}),u)}();
|