@guardian/support-dotcom-components 1.1.0 → 1.1.1

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.
@@ -4,6 +4,8 @@ export { replaceNonArticleCountPlaceholders, containsNonArticleCountPlaceholder,
4
4
  export * from '../../shared/src/lib/geolocation';
5
5
  export * from '../../shared/src/lib/viewLog';
6
6
  export * from '../../shared/src/lib/reminderFields';
7
- export { SecondaryCtaType } from '../../shared/src/types/props/shared';
7
+ export { SecondaryCtaType, TickerCountType, TickerEndType, } from '../../shared/src/types/props/shared';
8
+ export { contributionTabFrequencies } from '../../shared/src/types/abTests/epic';
9
+ export { epicPropsSchema } from '../../shared/src/types/props/epic';
8
10
  export * from './requests';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EACH,kCAAkC,EAClC,kCAAkC,GACrC,MAAM,mCAAmC,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EACH,kCAAkC,EAClC,kCAAkC,GACrC,MAAM,mCAAmC,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qCAAqC,CAAC;AACpD,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,aAAa,GAChB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,cAAc,YAAY,CAAC"}
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- const e="gu.contributions.views",t=t=>t.get(e)||void 0,a=t=>{const a=localStorage.getItem(e),n=a?JSON.parse(a).value:[];n.push({date:(new Date).getTime(),testId:t});const s={value:n.slice(-50)};localStorage.setItem(e,JSON.stringify(s))},n="gu.history.weeklyArticleCount",s="gu.history.articleCountsThisWeek",r=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},i=e=>e.get(n)||void 0,o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business"]),d=(e,t={})=>(e.forEach((e=>{o.has(e)&&(t[e]=(t[e]??0)+1)})),t),u=(e,t,a)=>{const i=((e,t)=>{const a=r(new Date),n=e.get(s);if(n&&n.week===a){const r=n.articles[t]||0;return e.set(s,{week:a,articles:{...n.articles,[t]:r+1}}),r>0}return e.set(s,{week:a,articles:{[t]:1}}),!1})(e,t);if(!i){const t=r(new Date),s=e.get(n)||[],i=s[0];if(i&&i.week&&i.week===t)i.count+=1,i.tags=d(a,i.tags),e.set(n,s);else{s.unshift({week:t,count:1,tags:d(a,{})});const r=t-365,i=s.filter((e=>e.week>=r));e.set(n,i)}}},c={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},l={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},h={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},p=e=>Object.keys(c).find((t=>c[t].countries.includes(e??"")))||"International",m=(e,t=[])=>0===t.length||!!e&&t.includes(p(e.toUpperCase())),f=e=>{if(e){const t=p(e);return h[t]}return"£"},y=e=>{if(e)return l[e]},g=(e,t)=>{if(t){const a=(e=>c[p(e)]?.supportRegionId)(t);if(a)return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,t,n)=>`${t}/${a.toLowerCase()}/${n}`))}return e},_=(e,t,a,n)=>{if(n){const s=n[p(a)];if(s){return`${f(a)}${s[e][t].price}`}}},v={CURRENCY_SYMBOL:({countryCode:e})=>f(e),COUNTRY_NAME:({countryCode:e})=>y(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>_("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>_("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>_("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>_("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},b=(e,t,a)=>e?e.replace(k,(e=>{const n=e.substring(2,e.length-2),s=v[n];if(s){const e=s({countryCode:t,prices:a});if(e)return e}return e})):"",k=/%%.*?%%/g,x=e=>{const t=e.match(k)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},S=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},C=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),a=(t.getMonth()+1).toString().padStart(2,"0"),n=t.toLocaleString("default",{month:"long"}),s=t.getFullYear();return{reminderCta:`Remind me in ${n}`,reminderPeriod:`${s}-${a}-01`,reminderLabel:`${n} ${s}`}},w=new Date("2023-12-31"),T=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<S(e.getFullYear()),N=(e,t=new Date)=>{return"US"===e&&T(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${a=t.getFullYear()}-${(S(a).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${a}`}:"US"===e&&(e=>e>=S(e.getFullYear())&&e<w)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):C(t);var a};var I,E;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(I||(I={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(E||(E={}));const R=I.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Z=e=>{switch(typeof e){case"undefined":return R.undefined;case"string":return R.string;case"number":return isNaN(e)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(e)?R.array:null===e?R.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?R.promise:"undefined"!=typeof Map&&e instanceof Map?R.map:"undefined"!=typeof Set&&e instanceof Set?R.set:"undefined"!=typeof Date&&e instanceof Date?R.date:R.object;default:return R.unknown}},A=I.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class O extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,I.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}O.create=e=>new O(e);const M=(e,t)=>{let a;switch(e.code){case A.invalid_type:a=e.received===R.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case A.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,I.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:a=`Unrecognized key(s) in object: ${I.joinValues(e.keys,", ")}`;break;case A.invalid_union:a="Invalid input";break;case A.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${I.joinValues(e.options)}`;break;case A.invalid_enum_value:a=`Invalid enum value. Expected ${I.joinValues(e.options)}, received '${e.received}'`;break;case A.invalid_arguments:a="Invalid function arguments";break;case A.invalid_return_type:a="Invalid function return type";break;case A.invalid_date:a="Invalid date";break;case A.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:I.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case A.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case A.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case A.custom:a="Invalid input";break;case A.invalid_intersection_types:a="Intersection results could not be merged";break;case A.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case A.not_finite:a="Number must be finite";break;default:a=t.defaultError,I.assertNever(e)}return{message:a}};let P=M;function L(){return P}const U=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,r=[...a,...s.path||[]],i={...s,path:r};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...s,path:r,message:s.message||o}};function B(e,t){const a=U({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,L(),M].filter((e=>!!e))});e.common.issues.push(a)}class D{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return G;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return D.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return G;if("aborted"===s.status)return G;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const G=Object.freeze({status:"aborted"}),j=e=>({status:"valid",value:e}),K=e=>"aborted"===e.status,$=e=>"dirty"===e.status,V=e=>"valid"===e.status,F=e=>"undefined"!=typeof Promise&&e instanceof Promise;var W;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(W||(W={}));class z{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const H=(e,t)=>{if(V(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;const t=new O(e.common.issues);return this._error=t,this._error}}};function Y(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=a?a:t.defaultError},description:s}}class J{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Z(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new D,ctx:{common:e.parent.common,data:e.data,parsedType:Z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(F(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)},s=this._parseSync({data:e,path:n.path,parent:n});return H(n,s)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:Z(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(F(n)?n:Promise.resolve(n));return H(a,s)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),r=()=>n.addIssue({code:A.custom,...a(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(r(),!1))):!!s||(r(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new Oe({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Me.create(this,this._def)}nullable(){return Pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _e.create(this,this._def)}promise(){return Ae.create(this,this._def)}or(e){return ke.create([this,e],this._def)}and(e){return Se.create(this,e,this._def)}transform(e){return new Oe({...Y(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Le({...Y(this._def),innerType:this,defaultValue:t,typeName:Ke.ZodDefault})}brand(){return new De({typeName:Ke.ZodBranded,type:this,...Y(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ue({...Y(this._def),innerType:this,catchValue:t,typeName:Ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return je.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const q=/^c[^\s-]{8,}$/i,Q=/^[a-z][a-z0-9]*$/,X=/^[0-9A-HJKMNP-TV-Z]{26}$/,ee=/^[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,te=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let ae;const ne=/^(((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}))$/,se=/^(([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})))$/;class re extends J{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==R.string){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.string,received:t.parsedType}),G}const t=new D;let a;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?B(a,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&B(a,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)te.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"email",code:A.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)ae||(ae=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ae.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"emoji",code:A.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)ee.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"uuid",code:A.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)q.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"cuid",code:A.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)Q.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"cuid2",code:A.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)X.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"ulid",code:A.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(n){a=this._getOrReturnCtx(e,a),B(a,{validation:"url",code:A.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"regex",code:A.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),B(a,{code:A.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),B(a,{code:A.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),B(a,{code:A.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){((r=i).precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):0===r.precision?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{code:A.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else"ip"===i.kind?(n=e.data,("v4"!==(s=i.version)&&s||!ne.test(n))&&("v6"!==s&&s||!se.test(n))&&(a=this._getOrReturnCtx(e,a),B(a,{validation:"ip",code:A.invalid_string,message:i.message}),t.dirty())):I.assertNever(i);var n,s,r;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:A.invalid_string,...W.errToObj(a)})}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...W.errToObj(e)})}url(e){return this._addCheck({kind:"url",...W.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...W.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...W.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...W.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...W.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...W.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({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,...W.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...W.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...W.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...W.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...W.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...W.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...W.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...W.errToObj(t)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new re({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new re({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new re({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function ie(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}re.create=e=>{var t;return new re({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Y(e)})};class oe extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==R.number){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.number,received:t.parsedType}),G}let t;const a=new D;for(const n of this._def.checks)if("int"===n.kind)I.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),B(t,{code:A.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:A.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:A.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==ie(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:A.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),B(t,{code:A.not_finite,message:n.message}),a.dirty()):I.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,a,n){return new oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:W.toString(n)}]})}_addCheck(e){return new oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:W.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:W.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&I.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}oe.create=e=>new oe({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Y(e)});class de extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==R.bigint){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.bigint,received:t.parsedType}),G}let t;const a=new D;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:A.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:A.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),B(t,{code:A.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):I.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,a,n){return new de({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:W.toString(n)}]})}_addCheck(e){return new de({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}de.create=e=>{var t;return new de({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Y(e)})};class ue extends J{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==R.boolean){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.boolean,received:t.parsedType}),G}return j(e.data)}}ue.create=e=>new ue({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Y(e)});class ce extends J{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==R.date){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.date,received:t.parsedType}),G}if(isNaN(e.data.getTime())){return B(this._getOrReturnCtx(e),{code:A.invalid_date}),G}const t=new D;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:A.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:A.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):I.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ce({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:W.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:W.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ce.create=e=>new ce({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...Y(e)});class le extends J{_parse(e){if(this._getType(e)!==R.symbol){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.symbol,received:t.parsedType}),G}return j(e.data)}}le.create=e=>new le({typeName:Ke.ZodSymbol,...Y(e)});class he extends J{_parse(e){if(this._getType(e)!==R.undefined){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.undefined,received:t.parsedType}),G}return j(e.data)}}he.create=e=>new he({typeName:Ke.ZodUndefined,...Y(e)});class pe extends J{_parse(e){if(this._getType(e)!==R.null){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.null,received:t.parsedType}),G}return j(e.data)}}pe.create=e=>new pe({typeName:Ke.ZodNull,...Y(e)});class me extends J{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}}me.create=e=>new me({typeName:Ke.ZodAny,...Y(e)});class fe extends J{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}}fe.create=e=>new fe({typeName:Ke.ZodUnknown,...Y(e)});class ye extends J{_parse(e){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.never,received:t.parsedType}),G}}ye.create=e=>new ye({typeName:Ke.ZodNever,...Y(e)});class ge extends J{_parse(e){if(this._getType(e)!==R.undefined){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.void,received:t.parsedType}),G}return j(e.data)}}ge.create=e=>new ge({typeName:Ke.ZodVoid,...Y(e)});class _e extends J{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==R.array)return B(t,{code:A.invalid_type,expected:R.array,received:t.parsedType}),G;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(B(t,{code:e?A.too_big:A.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(B(t,{code:A.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(B(t,{code:A.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new z(t,e,t.path,a))))).then((e=>D.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new z(t,e,t.path,a))));return D.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new _e({...this._def,minLength:{value:e,message:W.toString(t)}})}max(e,t){return new _e({...this._def,maxLength:{value:e,message:W.toString(t)}})}length(e,t){return new _e({...this._def,exactLength:{value:e,message:W.toString(t)}})}nonempty(e){return this.min(1,e)}}function ve(e){if(e instanceof be){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=Me.create(ve(n))}return new be({...e._def,shape:()=>t})}return e instanceof _e?new _e({...e._def,type:ve(e.element)}):e instanceof Me?Me.create(ve(e.unwrap())):e instanceof Pe?Pe.create(ve(e.unwrap())):e instanceof Ce?Ce.create(e.items.map((e=>ve(e)))):e}_e.create=(e,t)=>new _e({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...Y(t)});class be extends J{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=I.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==R.object){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.object,received:t.parsedType}),G}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),r=[];if(!(this._def.catchall instanceof ye&&"strip"===this._def.unknownKeys))for(const e in a.data)s.includes(e)||r.push(e);const i=[];for(const e of s){const t=n[e],s=a.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new z(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof ye){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of r)i.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)r.length>0&&(B(a,{code:A.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const n=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new z(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>D.mergeObjectSync(t,e))):D.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new be({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,s,r,i;const o=null!==(r=null===(s=(n=this._def).errorMap)||void 0===s?void 0:s.call(n,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=W.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new be({...this._def,unknownKeys:"strip"})}passthrough(){return new be({...this._def,unknownKeys:"passthrough"})}extend(e){return new be({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new be({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new be({...this._def,catchall:e})}pick(e){const t={};return I.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new be({...this._def,shape:()=>t})}omit(e){const t={};return I.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new be({...this._def,shape:()=>t})}deepPartial(){return ve(this)}partial(e){const t={};return I.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new be({...this._def,shape:()=>t})}required(e){const t={};return I.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof Me;)e=e._def.innerType;t[a]=e}})),new be({...this._def,shape:()=>t})}keyof(){return Ee(I.objectKeys(this.shape))}}be.create=(e,t)=>new be({shape:()=>e,unknownKeys:"strip",catchall:ye.create(),typeName:Ke.ZodObject,...Y(t)}),be.strictCreate=(e,t)=>new be({shape:()=>e,unknownKeys:"strict",catchall:ye.create(),typeName:Ke.ZodObject,...Y(t)}),be.lazycreate=(e,t)=>new be({shape:e,unknownKeys:"strip",catchall:ye.create(),typeName:Ke.ZodObject,...Y(t)});class ke extends J{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new O(e.ctx.common.issues)));return B(t,{code:A.invalid_union,unionErrors:a}),G}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new O(e)));return B(t,{code:A.invalid_union,unionErrors:s}),G}}get options(){return this._def.options}}ke.create=(e,t)=>new ke({options:e,typeName:Ke.ZodUnion,...Y(t)});function xe(e,t){const a=Z(e),n=Z(t);if(e===t)return{valid:!0,data:e};if(a===R.object&&n===R.object){const a=I.objectKeys(t),n=I.objectKeys(e).filter((e=>-1!==a.indexOf(e))),s={...e,...t};for(const a of n){const n=xe(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===R.array&&n===R.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=xe(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===R.date&&n===R.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Se extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(K(e)||K(n))return G;const s=xe(e.value,n.value);return s.valid?(($(e)||$(n))&&t.dirty(),{status:t.value,value:s.data}):(B(a,{code:A.invalid_intersection_types}),G)};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((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Se.create=(e,t,a)=>new Se({left:e,right:t,typeName:Ke.ZodIntersection,...Y(a)});class Ce extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.array)return B(a,{code:A.invalid_type,expected:R.array,received:a.parsedType}),G;if(a.data.length<this._def.items.length)return B(a,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&a.data.length>this._def.items.length&&(B(a,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new z(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>D.mergeArray(t,e))):D.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Ce({...this._def,rest:e})}}Ce.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ce({items:e,typeName:Ke.ZodTuple,rest:null,...Y(t)})};class we extends J{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.map)return B(a,{code:A.invalid_type,expected:R.map,received:a.parsedType}),G;const n=this._def.keyType,s=this._def.valueType,r=[...a.data.entries()].map((([e,t],r)=>({key:n._parse(new z(a,e,a.path,[r,"key"])),value:s._parse(new z(a,t,a.path,[r,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return G;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return G;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}we.create=(e,t,a)=>new we({valueType:t,keyType:e,typeName:Ke.ZodMap,...Y(a)});class Te extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.set)return B(a,{code:A.invalid_type,expected:R.set,received:a.parsedType}),G;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(B(a,{code:A.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(B(a,{code:A.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function r(e){const a=new Set;for(const n of e){if("aborted"===n.status)return G;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>s._parse(new z(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new Te({...this._def,minSize:{value:e,message:W.toString(t)}})}max(e,t){return new Te({...this._def,maxSize:{value:e,message:W.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Te.create=(e,t)=>new Te({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...Y(t)});class Ne extends J{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ne.create=(e,t)=>new Ne({getter:e,typeName:Ke.ZodLazy,...Y(t)});class Ie extends J{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return B(t,{received:t.data,code:A.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ee(e,t){return new Re({values:e,typeName:Ke.ZodEnum,...Y(t)})}Ie.create=(e,t)=>new Ie({value:e,typeName:Ke.ZodLiteral,...Y(t)});class Re extends J{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return B(t,{expected:I.joinValues(a),received:t.parsedType,code:A.invalid_type}),G}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return B(t,{received:t.data,code:A.invalid_enum_value,options:a}),G}return j(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return Re.create(e)}exclude(e){return Re.create(this.options.filter((t=>!e.includes(t))))}}Re.create=Ee;class Ze extends J{_parse(e){const t=I.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==R.string&&a.parsedType!==R.number){const e=I.objectValues(t);return B(a,{expected:I.joinValues(e),received:a.parsedType,code:A.invalid_type}),G}if(-1===t.indexOf(e.data)){const e=I.objectValues(t);return B(a,{received:a.data,code:A.invalid_enum_value,options:e}),G}return j(e.data)}get enum(){return this._def.values}}Ze.create=(e,t)=>new Ze({values:e,typeName:Ke.ZodNativeEnum,...Y(t)});class Ae extends J{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==R.promise&&!1===t.common.async)return B(t,{code:A.invalid_type,expected:R.promise,received:t.parsedType}),G;const a=t.parsedType===R.promise?t.data:Promise.resolve(t.data);return j(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ae.create=(e,t)=>new Ae({type:e,typeName:Ke.ZodPromise,...Y(t)});class Oe extends J{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{B(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){const e=n.transform(a.data,s);return a.common.issues.length?{status:"dirty",value:a.data}:a.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:a.path,parent:a}))):this._def.schema._parseSync({data:e,path:a.path,parent:a})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?G:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?G:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!V(e))return e;const r=n.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>V(e)?Promise.resolve(n.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}I.assertNever(n)}}Oe.create=(e,t,a)=>new Oe({schema:e,typeName:Ke.ZodEffects,effect:t,...Y(a)}),Oe.createWithPreprocess=(e,t,a)=>new Oe({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...Y(a)});class Me extends J{_parse(e){return this._getType(e)===R.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(e,t)=>new Me({innerType:e,typeName:Ke.ZodOptional,...Y(t)});class Pe extends J{_parse(e){return this._getType(e)===R.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Ke.ZodNullable,...Y(t)});class Le extends J{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===R.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Le.create=(e,t)=>new Le({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Y(t)});class Ue extends J{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return F(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new O(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new O(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ue.create=(e,t)=>new Ue({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Y(t)});class Be extends J{_parse(e){if(this._getType(e)!==R.nan){const t=this._getOrReturnCtx(e);return B(t,{code:A.invalid_type,expected:R.nan,received:t.parsedType}),G}return{status:"valid",value:e.data}}}Be.create=e=>new Be({typeName:Ke.ZodNaN,...Y(e)});class De extends J{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ge extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?G:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?G:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new Ge({in:e,out:t,typeName:Ke.ZodPipeline})}}class je extends J{_parse(e){const t=this._def.innerType._parse(e);return V(t)&&(t.value=Object.freeze(t.value)),t}}var Ke;je.create=(e,t)=>new je({innerType:e,typeName:Ke.ZodReadonly,...Y(t)}),be.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ke||(Ke={}));const $e=re.create,Ve=oe.create;Be.create,de.create,ue.create,ce.create,le.create,he.create,pe.create,me.create,fe.create,ye.create,ge.create;const Fe=_e.create,We=be.create;be.strictCreate;const ze=ke.create;Se.create,Ce.create,we.create,Te.create,Ne.create;const He=Ie.create,Ye=Re.create;Ze.create,Ae.create,Oe.create,Me.create,Pe.create,Oe.createWithPreprocess,Ge.create;const Je=We({text:$e(),baseUrl:$e()});let qe=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});Ye(["CustomSecondaryCta","ContributionsReminderSecondaryCta"]);ze([We({type:He("CustomSecondaryCta"),cta:Je}),We({type:He("ContributionsReminderSecondaryCta")})]);const Qe=Ye(["unlimited","hardstop"]),Xe=Ye(["money"]),et=We({countLabel:$e(),goalReachedPrimary:$e(),goalReachedSecondary:$e()}),tt=We({total:Ve(),goal:Ve()});We({endType:Qe,countType:Xe,currencySymbol:$e(),copy:et,tickerData:tt.nullish()});const at=Ye(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),nt=Ye(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]);We({abTestName:$e(),abTestVariant:$e(),campaignCode:$e(),componentType:nt,products:Fe(at).nullish(),labels:Fe($e()).nullish(),ophanPageId:$e(),platformId:$e(),referrerUrl:$e(),clientName:$e()});const st=We({mainUrl:$e(),mobileUrl:$e().nullish(),tabletUrl:$e().nullish(),desktopUrl:$e().nullish(),leftColUrl:$e().nullish(),wideUrl:$e().nullish(),altText:$e()});We({name:$e(),description:$e().nullish(),headshot:st.nullish()});const rt=(e,t,a)=>{const n=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(e);return fetch(`${t}/${e}${n?`?force=${n}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t})).then((e=>e.json()))},it=(e,t)=>rt("epic",e,t),ot=(e,t)=>rt("liveblog-epic",e,t),dt=(e,t)=>rt("banner",e,t),ut=(e,t)=>rt("puzzles",e,t),ct=(e,t)=>rt("header",e,t);export{qe as SecondaryCtaType,g as addRegionIdToSupportUrl,C as buildReminderFields,x as containsNonArticleCountPlaceholder,p as countryCodeToCountryGroupId,dt as getBanner,y as getCountryName,it as getEpic,t as getEpicViewLog,ct as getHeader,ot as getLiveblogEpic,f as getLocalCurrencySymbol,ut as getPuzzlesBanner,N as getReminderFields,i as getWeeklyArticleHistory,m as inCountryGroups,u as incrementWeeklyArticleCount,a as logEpicView,b as replaceNonArticleCountPlaceholders};
1
+ const e="gu.contributions.views",t=t=>t.get(e)||void 0,a=t=>{const a=localStorage.getItem(e),n=a?JSON.parse(a).value:[];n.push({date:(new Date).getTime(),testId:t});const s={value:n.slice(-50)};localStorage.setItem(e,JSON.stringify(s))},n="gu.history.weeklyArticleCount",s="gu.history.articleCountsThisWeek",i=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},r=e=>e.get(n)||void 0,o=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business"]),d=(e,t={})=>(e.forEach((e=>{o.has(e)&&(t[e]=(t[e]??0)+1)})),t),u=(e,t,a)=>{const r=((e,t)=>{const a=i(new Date),n=e.get(s);if(n&&n.week===a){const i=n.articles[t]||0;return e.set(s,{week:a,articles:{...n.articles,[t]:i+1}}),i>0}return e.set(s,{week:a,articles:{[t]:1}}),!1})(e,t);if(!r){const t=i(new Date),s=e.get(n)||[],r=s[0];if(r&&r.week&&r.week===t)r.count+=1,r.tags=d(a,r.tags),e.set(n,s);else{s.unshift({week:t,count:1,tags:d(a,{})});const i=t-365,r=s.filter((e=>e.week>=i));e.set(n,r)}}},c={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},l={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},h={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},p=e=>Object.keys(c).find((t=>c[t].countries.includes(e??"")))||"International",m=(e,t=[])=>0===t.length||!!e&&t.includes(p(e.toUpperCase())),f=e=>{if(e){const t=p(e);return h[t]}return"£"},y=e=>{if(e)return l[e]},g=(e,t)=>{if(t){const a=(e=>c[p(e)]?.supportRegionId)(t);if(a)return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,t,n)=>`${t}/${a.toLowerCase()}/${n}`))}return e},v=(e,t,a,n)=>{if(n){const s=n[p(a)];if(s){return`${f(a)}${s[e][t].price}`}}},_={CURRENCY_SYMBOL:({countryCode:e})=>f(e),COUNTRY_NAME:({countryCode:e})=>y(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>v("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>v("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>v("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>v("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},b=(e,t,a)=>e?e.replace(k,(e=>{const n=e.substring(2,e.length-2),s=_[n];if(s){const e=s({countryCode:t,prices:a});if(e)return e}return e})):"",k=/%%.*?%%/g,x=e=>{const t=e.match(k)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},C=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},S=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),a=(t.getMonth()+1).toString().padStart(2,"0"),n=t.toLocaleString("default",{month:"long"}),s=t.getFullYear();return{reminderCta:`Remind me in ${n}`,reminderPeriod:`${s}-${a}-01`,reminderLabel:`${n} ${s}`}},w=new Date("2023-12-31"),T=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<C(e.getFullYear()),N=(e,t=new Date)=>{return"US"===e&&T(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${a=t.getFullYear()}-${(C(a).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${a}`}:"US"===e&&(e=>e>=C(e.getFullYear())&&e<w)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):S(t);var a};var I,E;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(I||(I={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(E||(E={}));const R=I.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=e=>{switch(typeof e){case"undefined":return R.undefined;case"string":return R.string;case"number":return isNaN(e)?R.nan:R.number;case"boolean":return R.boolean;case"function":return R.function;case"bigint":return R.bigint;case"symbol":return R.symbol;case"object":return Array.isArray(e)?R.array:null===e?R.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?R.promise:"undefined"!=typeof Map&&e instanceof Map?R.map:"undefined"!=typeof Set&&e instanceof Set?R.set:"undefined"!=typeof Date&&e instanceof Date?R.date:R.object;default:return R.unknown}},O=I.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Z extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,I.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}Z.create=e=>new Z(e);const M=(e,t)=>{let a;switch(e.code){case O.invalid_type:a=e.received===R.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case O.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,I.jsonStringifyReplacer)}`;break;case O.unrecognized_keys:a=`Unrecognized key(s) in object: ${I.joinValues(e.keys,", ")}`;break;case O.invalid_union:a="Invalid input";break;case O.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${I.joinValues(e.options)}`;break;case O.invalid_enum_value:a=`Invalid enum value. Expected ${I.joinValues(e.options)}, received '${e.received}'`;break;case O.invalid_arguments:a="Invalid function arguments";break;case O.invalid_return_type:a="Invalid function return type";break;case O.invalid_date:a="Invalid date";break;case O.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:I.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case O.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case O.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case O.custom:a="Invalid input";break;case O.invalid_intersection_types:a="Intersection results could not be merged";break;case O.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case O.not_finite:a="Number must be finite";break;default:a=t.defaultError,I.assertNever(e)}return{message:a}};let P=M;function L(){return P}const U=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,i=[...a,...s.path||[]],r={...s,path:i};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(r,{data:t,defaultError:o}).message;return{...s,path:i,message:s.message||o}};function B(e,t){const a=U({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,L(),M].filter((e=>!!e))});e.common.issues.push(a)}class D{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return G;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return D.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return G;if("aborted"===s.status)return G;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const G=Object.freeze({status:"aborted"}),j=e=>({status:"valid",value:e}),K=e=>"aborted"===e.status,$=e=>"dirty"===e.status,V=e=>"valid"===e.status,F=e=>"undefined"!=typeof Promise&&e instanceof Promise;var W;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(W||(W={}));class z{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const H=(e,t)=>{if(V(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;const t=new Z(e.common.issues);return this._error=t,this._error}}};function Y(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=a?a:t.defaultError},description:s}}class J{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return A(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new D,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(F(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},s=this._parseSync({data:e,path:n.path,parent:n});return H(n,s)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:A(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(F(n)?n:Promise.resolve(n));return H(a,s)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),i=()=>n.addIssue({code:O.custom,...a(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(i(),!1))):!!s||(i(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new Ze({schema:this,typeName:Ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Me.create(this,this._def)}nullable(){return Pe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ve.create(this,this._def)}promise(){return Oe.create(this,this._def)}or(e){return ke.create([this,e],this._def)}and(e){return Ce.create(this,e,this._def)}transform(e){return new Ze({...Y(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Le({...Y(this._def),innerType:this,defaultValue:t,typeName:Ke.ZodDefault})}brand(){return new De({typeName:Ke.ZodBranded,type:this,...Y(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ue({...Y(this._def),innerType:this,catchValue:t,typeName:Ke.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return je.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const q=/^c[^\s-]{8,}$/i,Q=/^[a-z][a-z0-9]*$/,X=/^[0-9A-HJKMNP-TV-Z]{26}$/,ee=/^[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,te=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let ae;const ne=/^(((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}))$/,se=/^(([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})))$/;class ie extends J{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==R.string){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.string,received:t.parsedType}),G}const t=new D;let a;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:O.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:O.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const n=e.data.length>r.value,s=e.data.length<r.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?B(a,{code:O.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):s&&B(a,{code:O.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)te.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"email",code:O.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)ae||(ae=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ae.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"emoji",code:O.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)ee.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"uuid",code:O.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)q.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"cuid",code:O.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)Q.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"cuid2",code:O.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)X.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"ulid",code:O.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(n){a=this._getOrReturnCtx(e,a),B(a,{validation:"url",code:O.invalid_string,message:r.message}),t.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{validation:"regex",code:O.invalid_string,message:r.message}),t.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(a=this._getOrReturnCtx(e,a),B(a,{code:O.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(a=this._getOrReturnCtx(e,a),B(a,{code:O.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(a=this._getOrReturnCtx(e,a),B(a,{code:O.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty());else if("datetime"===r.kind){((i=r).precision?i.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`):0===i.precision?i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):i.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(a=this._getOrReturnCtx(e,a),B(a,{code:O.invalid_string,validation:"datetime",message:r.message}),t.dirty())}else"ip"===r.kind?(n=e.data,("v4"!==(s=r.version)&&s||!ne.test(n))&&("v6"!==s&&s||!se.test(n))&&(a=this._getOrReturnCtx(e,a),B(a,{validation:"ip",code:O.invalid_string,message:r.message}),t.dirty())):I.assertNever(r);var n,s,i;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:O.invalid_string,...W.errToObj(a)})}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...W.errToObj(e)})}url(e){return this._addCheck({kind:"url",...W.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...W.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...W.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...W.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...W.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...W.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({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,...W.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...W.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...W.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...W.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...W.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...W.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...W.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...W.errToObj(t)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new ie({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ie({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ie({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function re(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}ie.create=e=>{var t;return new ie({checks:[],typeName:Ke.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Y(e)})};class oe extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==R.number){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.number,received:t.parsedType}),G}let t;const a=new D;for(const n of this._def.checks)if("int"===n.kind)I.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),B(t,{code:O.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:O.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:O.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==re(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:O.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),B(t,{code:O.not_finite,message:n.message}),a.dirty()):I.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,a,n){return new oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:W.toString(n)}]})}_addCheck(e){return new oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:W.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:W.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&I.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}oe.create=e=>new oe({checks:[],typeName:Ke.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Y(e)});class de extends J{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==R.bigint){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.bigint,received:t.parsedType}),G}let t;const a=new D;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:O.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),B(t,{code:O.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),B(t,{code:O.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):I.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,W.toString(t))}gt(e,t){return this.setLimit("min",e,!1,W.toString(t))}lte(e,t){return this.setLimit("max",e,!0,W.toString(t))}lt(e,t){return this.setLimit("max",e,!1,W.toString(t))}setLimit(e,t,a,n){return new de({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:W.toString(n)}]})}_addCheck(e){return new de({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:W.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}de.create=e=>{var t;return new de({checks:[],typeName:Ke.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Y(e)})};class ue extends J{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==R.boolean){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.boolean,received:t.parsedType}),G}return j(e.data)}}ue.create=e=>new ue({typeName:Ke.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Y(e)});class ce extends J{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==R.date){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.date,received:t.parsedType}),G}if(isNaN(e.data.getTime())){return B(this._getOrReturnCtx(e),{code:O.invalid_date}),G}const t=new D;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:O.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),B(a,{code:O.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):I.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ce({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:W.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:W.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ce.create=e=>new ce({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...Y(e)});class le extends J{_parse(e){if(this._getType(e)!==R.symbol){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.symbol,received:t.parsedType}),G}return j(e.data)}}le.create=e=>new le({typeName:Ke.ZodSymbol,...Y(e)});class he extends J{_parse(e){if(this._getType(e)!==R.undefined){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.undefined,received:t.parsedType}),G}return j(e.data)}}he.create=e=>new he({typeName:Ke.ZodUndefined,...Y(e)});class pe extends J{_parse(e){if(this._getType(e)!==R.null){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.null,received:t.parsedType}),G}return j(e.data)}}pe.create=e=>new pe({typeName:Ke.ZodNull,...Y(e)});class me extends J{constructor(){super(...arguments),this._any=!0}_parse(e){return j(e.data)}}me.create=e=>new me({typeName:Ke.ZodAny,...Y(e)});class fe extends J{constructor(){super(...arguments),this._unknown=!0}_parse(e){return j(e.data)}}fe.create=e=>new fe({typeName:Ke.ZodUnknown,...Y(e)});class ye extends J{_parse(e){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.never,received:t.parsedType}),G}}ye.create=e=>new ye({typeName:Ke.ZodNever,...Y(e)});class ge extends J{_parse(e){if(this._getType(e)!==R.undefined){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.void,received:t.parsedType}),G}return j(e.data)}}ge.create=e=>new ge({typeName:Ke.ZodVoid,...Y(e)});class ve extends J{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==R.array)return B(t,{code:O.invalid_type,expected:R.array,received:t.parsedType}),G;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(B(t,{code:e?O.too_big:O.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(B(t,{code:O.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(B(t,{code:O.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new z(t,e,t.path,a))))).then((e=>D.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new z(t,e,t.path,a))));return D.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new ve({...this._def,minLength:{value:e,message:W.toString(t)}})}max(e,t){return new ve({...this._def,maxLength:{value:e,message:W.toString(t)}})}length(e,t){return new ve({...this._def,exactLength:{value:e,message:W.toString(t)}})}nonempty(e){return this.min(1,e)}}function _e(e){if(e instanceof be){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=Me.create(_e(n))}return new be({...e._def,shape:()=>t})}return e instanceof ve?new ve({...e._def,type:_e(e.element)}):e instanceof Me?Me.create(_e(e.unwrap())):e instanceof Pe?Pe.create(_e(e.unwrap())):e instanceof Se?Se.create(e.items.map((e=>_e(e)))):e}ve.create=(e,t)=>new ve({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...Y(t)});class be extends J{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=I.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==R.object){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.object,received:t.parsedType}),G}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof ye&&"strip"===this._def.unknownKeys))for(const e in a.data)s.includes(e)||i.push(e);const r=[];for(const e of s){const t=n[e],s=a.data[e];r.push({key:{status:"valid",value:e},value:t._parse(new z(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof ye){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of i)r.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)i.length>0&&(B(a,{code:O.unrecognized_keys,keys:i}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of i){const n=a.data[t];r.push({key:{status:"valid",value:t},value:e._parse(new z(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of r){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>D.mergeObjectSync(t,e))):D.mergeObjectSync(t,r)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new be({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,s,i,r;const o=null!==(i=null===(s=(n=this._def).errorMap)||void 0===s?void 0:s.call(n,t,a).message)&&void 0!==i?i:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(r=W.errToObj(e).message)&&void 0!==r?r:o}:{message:o}}}:{}})}strip(){return new be({...this._def,unknownKeys:"strip"})}passthrough(){return new be({...this._def,unknownKeys:"passthrough"})}extend(e){return new be({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new be({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ke.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new be({...this._def,catchall:e})}pick(e){const t={};return I.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new be({...this._def,shape:()=>t})}omit(e){const t={};return I.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new be({...this._def,shape:()=>t})}deepPartial(){return _e(this)}partial(e){const t={};return I.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new be({...this._def,shape:()=>t})}required(e){const t={};return I.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof Me;)e=e._def.innerType;t[a]=e}})),new be({...this._def,shape:()=>t})}keyof(){return Ee(I.objectKeys(this.shape))}}be.create=(e,t)=>new be({shape:()=>e,unknownKeys:"strip",catchall:ye.create(),typeName:Ke.ZodObject,...Y(t)}),be.strictCreate=(e,t)=>new be({shape:()=>e,unknownKeys:"strict",catchall:ye.create(),typeName:Ke.ZodObject,...Y(t)}),be.lazycreate=(e,t)=>new be({shape:e,unknownKeys:"strip",catchall:ye.create(),typeName:Ke.ZodObject,...Y(t)});class ke extends J{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new Z(e.ctx.common.issues)));return B(t,{code:O.invalid_union,unionErrors:a}),G}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},i=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new Z(e)));return B(t,{code:O.invalid_union,unionErrors:s}),G}}get options(){return this._def.options}}ke.create=(e,t)=>new ke({options:e,typeName:Ke.ZodUnion,...Y(t)});function xe(e,t){const a=A(e),n=A(t);if(e===t)return{valid:!0,data:e};if(a===R.object&&n===R.object){const a=I.objectKeys(t),n=I.objectKeys(e).filter((e=>-1!==a.indexOf(e))),s={...e,...t};for(const a of n){const n=xe(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===R.array&&n===R.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=xe(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===R.date&&n===R.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ce extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(K(e)||K(n))return G;const s=xe(e.value,n.value);return s.valid?(($(e)||$(n))&&t.dirty(),{status:t.value,value:s.data}):(B(a,{code:O.invalid_intersection_types}),G)};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((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Ce.create=(e,t,a)=>new Ce({left:e,right:t,typeName:Ke.ZodIntersection,...Y(a)});class Se extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.array)return B(a,{code:O.invalid_type,expected:R.array,received:a.parsedType}),G;if(a.data.length<this._def.items.length)return B(a,{code:O.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),G;!this._def.rest&&a.data.length>this._def.items.length&&(B(a,{code:O.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new z(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>D.mergeArray(t,e))):D.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Se({...this._def,rest:e})}}Se.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Se({items:e,typeName:Ke.ZodTuple,rest:null,...Y(t)})};class we extends J{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.map)return B(a,{code:O.invalid_type,expected:R.map,received:a.parsedType}),G;const n=this._def.keyType,s=this._def.valueType,i=[...a.data.entries()].map((([e,t],i)=>({key:n._parse(new z(a,e,a.path,[i,"key"])),value:s._parse(new z(a,t,a.path,[i,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of i){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return G;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of i){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return G;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}we.create=(e,t,a)=>new we({valueType:t,keyType:e,typeName:Ke.ZodMap,...Y(a)});class Te extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==R.set)return B(a,{code:O.invalid_type,expected:R.set,received:a.parsedType}),G;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(B(a,{code:O.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(B(a,{code:O.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function i(e){const a=new Set;for(const n of e){if("aborted"===n.status)return G;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const r=[...a.data.values()].map(((e,t)=>s._parse(new z(a,e,a.path,t))));return a.common.async?Promise.all(r).then((e=>i(e))):i(r)}min(e,t){return new Te({...this._def,minSize:{value:e,message:W.toString(t)}})}max(e,t){return new Te({...this._def,maxSize:{value:e,message:W.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Te.create=(e,t)=>new Te({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...Y(t)});class Ne extends J{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ne.create=(e,t)=>new Ne({getter:e,typeName:Ke.ZodLazy,...Y(t)});class Ie extends J{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return B(t,{received:t.data,code:O.invalid_literal,expected:this._def.value}),G}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ee(e,t){return new Re({values:e,typeName:Ke.ZodEnum,...Y(t)})}Ie.create=(e,t)=>new Ie({value:e,typeName:Ke.ZodLiteral,...Y(t)});class Re extends J{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return B(t,{expected:I.joinValues(a),received:t.parsedType,code:O.invalid_type}),G}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return B(t,{received:t.data,code:O.invalid_enum_value,options:a}),G}return j(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return Re.create(e)}exclude(e){return Re.create(this.options.filter((t=>!e.includes(t))))}}Re.create=Ee;class Ae extends J{_parse(e){const t=I.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==R.string&&a.parsedType!==R.number){const e=I.objectValues(t);return B(a,{expected:I.joinValues(e),received:a.parsedType,code:O.invalid_type}),G}if(-1===t.indexOf(e.data)){const e=I.objectValues(t);return B(a,{received:a.data,code:O.invalid_enum_value,options:e}),G}return j(e.data)}get enum(){return this._def.values}}Ae.create=(e,t)=>new Ae({values:e,typeName:Ke.ZodNativeEnum,...Y(t)});class Oe extends J{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==R.promise&&!1===t.common.async)return B(t,{code:O.invalid_type,expected:R.promise,received:t.parsedType}),G;const a=t.parsedType===R.promise?t.data:Promise.resolve(t.data);return j(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Oe.create=(e,t)=>new Oe({type:e,typeName:Ke.ZodPromise,...Y(t)});class Ze extends J{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{B(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){const e=n.transform(a.data,s);return a.common.issues.length?{status:"dirty",value:a.data}:a.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:a.path,parent:a}))):this._def.schema._parseSync({data:e,path:a.path,parent:a})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?G:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?G:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!V(e))return e;const i=n.transform(e.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>V(e)?Promise.resolve(n.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}I.assertNever(n)}}Ze.create=(e,t,a)=>new Ze({schema:e,typeName:Ke.ZodEffects,effect:t,...Y(a)}),Ze.createWithPreprocess=(e,t,a)=>new Ze({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...Y(a)});class Me extends J{_parse(e){return this._getType(e)===R.undefined?j(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Me.create=(e,t)=>new Me({innerType:e,typeName:Ke.ZodOptional,...Y(t)});class Pe extends J{_parse(e){return this._getType(e)===R.null?j(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pe.create=(e,t)=>new Pe({innerType:e,typeName:Ke.ZodNullable,...Y(t)});class Le extends J{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===R.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Le.create=(e,t)=>new Le({innerType:e,typeName:Ke.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Y(t)});class Ue extends J{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return F(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new Z(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new Z(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ue.create=(e,t)=>new Ue({innerType:e,typeName:Ke.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Y(t)});class Be extends J{_parse(e){if(this._getType(e)!==R.nan){const t=this._getOrReturnCtx(e);return B(t,{code:O.invalid_type,expected:R.nan,received:t.parsedType}),G}return{status:"valid",value:e.data}}}Be.create=e=>new Be({typeName:Ke.ZodNaN,...Y(e)});class De extends J{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ge extends J{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?G:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?G:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new Ge({in:e,out:t,typeName:Ke.ZodPipeline})}}class je extends J{_parse(e){const t=this._def.innerType._parse(e);return V(t)&&(t.value=Object.freeze(t.value)),t}}var Ke;je.create=(e,t)=>new je({innerType:e,typeName:Ke.ZodReadonly,...Y(t)}),be.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ke||(Ke={}));const $e=ie.create,Ve=oe.create;Be.create,de.create;const Fe=ue.create;ce.create,le.create,he.create,pe.create;const We=me.create;fe.create,ye.create,ge.create;const ze=ve.create,He=be.create;be.strictCreate;const Ye=ke.create;Ce.create,Se.create,we.create,Te.create,Ne.create;const Je=Ie.create,qe=Re.create;Ae.create,Oe.create,Ze.create,Me.create,Pe.create,Ze.createWithPreprocess,Ge.create;const Qe=He({text:$e(),baseUrl:$e()});let Xe=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});qe(["CustomSecondaryCta","ContributionsReminderSecondaryCta"]);const et=Ye([He({type:Je("CustomSecondaryCta"),cta:Qe}),He({type:Je("ContributionsReminderSecondaryCta")})]);let tt=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const at=qe(["unlimited","hardstop"]);let nt=function(e){return e.money="money",e}({});const st=qe(["money"]),it=He({countLabel:$e(),goalReachedPrimary:$e(),goalReachedSecondary:$e()}),rt=He({total:Ve(),goal:Ve()}),ot=He({endType:at,countType:st,currencySymbol:$e(),copy:it,tickerData:rt.nullish()}),dt=qe(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),ut=qe(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),ct=He({abTestName:$e(),abTestVariant:$e(),campaignCode:$e(),componentType:ut,products:ze(dt).nullish(),labels:ze($e()).nullish(),ophanPageId:$e(),platformId:$e(),referrerUrl:$e(),clientName:$e()}),lt=He({mainUrl:$e(),mobileUrl:$e().nullish(),tabletUrl:$e().nullish(),desktopUrl:$e().nullish(),leftColUrl:$e().nullish(),wideUrl:$e().nullish(),altText:$e()}),ht=He({name:$e(),description:$e().nullish(),headshot:lt.nullish()}),pt=["ONE_OFF","MONTHLY","ANNUAL"],mt=He({for52Weeks:Ve(),forTargetedWeeks:Ve()}),ft=He({maxViewsCount:Ve(),maxViewsDays:Ve(),minDaysBetweenViews:Ve()}),yt=He({type:$e(),copy:$e().nullish()}),gt=He({reminderCta:$e(),reminderLabel:$e(),reminderPeriod:$e()}),vt=He({name:$e(),heading:$e().nullish(),paragraphs:ze($e()),highlightedText:$e().nullish(),tickerSettings:ot.nullish(),cta:Qe.nullish(),secondaryCta:et.nullish(),footer:$e().nullish(),image:lt.nullish(),showReminderFields:gt.nullish(),separateArticleCount:yt.nullish(),maxViews:ft.nullish(),showSignInLink:Fe().nullish(),bylineWithImage:ht.nullish()}),_t=He({variant:vt,tracking:ct,countryCode:$e().nullish(),articleCounts:mt,onReminderOpen:We().nullish(),fetchEmail:We().nullish(),submitComponentEvent:We().nullish(),openCmp:We().nullish(),hasConsentForArticleCount:Fe().nullish(),stage:$e().nullish()}),bt=(e,t,a)=>{const n=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(e);return fetch(`${t}/${e}${n?`?force=${n}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t})).then((e=>e.json()))},kt=(e,t)=>bt("epic",e,t),xt=(e,t)=>bt("liveblog-epic",e,t),Ct=(e,t)=>bt("banner",e,t),St=(e,t)=>bt("puzzles",e,t),wt=(e,t)=>bt("header",e,t);export{Xe as SecondaryCtaType,nt as TickerCountType,tt as TickerEndType,g as addRegionIdToSupportUrl,S as buildReminderFields,x as containsNonArticleCountPlaceholder,pt as contributionTabFrequencies,p as countryCodeToCountryGroupId,_t as epicPropsSchema,Ct as getBanner,y as getCountryName,kt as getEpic,t as getEpicViewLog,wt as getHeader,xt as getLiveblogEpic,f as getLocalCurrencySymbol,St as getPuzzlesBanner,N as getReminderFields,r as getWeeklyArticleHistory,m as inCountryGroups,u as incrementWeeklyArticleCount,a as logEpicView,b as replaceNonArticleCountPlaceholders};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="gu.contributions.views",t="gu.history.weeklyArticleCount",a="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},s=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business"]),r=(e,t={})=>(e.forEach((e=>{s.has(e)&&(t[e]=(t[e]??0)+1)})),t),i={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},o={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},u=e=>Object.keys(i).find((t=>i[t].countries.includes(e??"")))||"International",c=e=>{if(e){const t=u(e);return d[t]}return"£"},l=e=>{if(e)return o[e]},h=(e,t,a,n)=>{if(n){const s=n[u(a)];if(s){return`${c(a)}${s[e][t].price}`}}},p={CURRENCY_SYMBOL:({countryCode:e})=>c(e),COUNTRY_NAME:({countryCode:e})=>l(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>h("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>h("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>h("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>h("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},m=/%%.*?%%/g,f=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},y=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),a=(t.getMonth()+1).toString().padStart(2,"0"),n=t.toLocaleString("default",{month:"long"}),s=t.getFullYear();return{reminderCta:`Remind me in ${n}`,reminderPeriod:`${s}-${a}-01`,reminderLabel:`${n} ${s}`}},g=new Date("2023-12-31"),_=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<f(e.getFullYear());var v,b;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(v||(v={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(b||(b={}));const x=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),k=e=>{switch(typeof e){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(e)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(e)?x.array:null===e?x.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?x.promise:"undefined"!=typeof Map&&e instanceof Map?x.map:"undefined"!=typeof Set&&e instanceof Set?x.set:"undefined"!=typeof Date&&e instanceof Date?x.date:x.object;default:return x.unknown}},C=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class S extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,v.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}S.create=e=>new S(e);const w=(e,t)=>{let a;switch(e.code){case C.invalid_type:a=e.received===x.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case C.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,v.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:a=`Unrecognized key(s) in object: ${v.joinValues(e.keys,", ")}`;break;case C.invalid_union:a="Invalid input";break;case C.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${v.joinValues(e.options)}`;break;case C.invalid_enum_value:a=`Invalid enum value. Expected ${v.joinValues(e.options)}, received '${e.received}'`;break;case C.invalid_arguments:a="Invalid function arguments";break;case C.invalid_return_type:a="Invalid function return type";break;case C.invalid_date:a="Invalid date";break;case C.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:v.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case C.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case C.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case C.custom:a="Invalid input";break;case C.invalid_intersection_types:a="Intersection results could not be merged";break;case C.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case C.not_finite:a="Number must be finite";break;default:a=t.defaultError,v.assertNever(e)}return{message:a}};let T=w;function N(){return T}const I=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,r=[...a,...s.path||[]],i={...s,path:r};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...s,path:r,message:s.message||o}};function E(e,t){const a=I({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,N(),w].filter((e=>!!e))});e.common.issues.push(a)}class R{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return A;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return R.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return A;if("aborted"===s.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const A=Object.freeze({status:"aborted"}),Z=e=>({status:"valid",value:e}),O=e=>"aborted"===e.status,M=e=>"dirty"===e.status,P=e=>"valid"===e.status,L=e=>"undefined"!=typeof Promise&&e instanceof Promise;var U;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(U||(U={}));class B{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const G=(e,t)=>{if(P(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;const t=new S(e.common.issues);return this._error=t,this._error}}};function D(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=a?a:t.defaultError},description:s}}class j{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return k(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new R,ctx:{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(L(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)},s=this._parseSync({data:e,path:n.path,parent:n});return G(n,s)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:k(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(L(n)?n:Promise.resolve(n));return G(a,s)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),r=()=>n.addIssue({code:C.custom,...a(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(r(),!1))):!!s||(r(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new Se({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return we.create(this,this._def)}nullable(){return Te.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Ce.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return me.create(this,e,this._def)}transform(e){return new Se({...D(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ne({...D(this._def),innerType:this,defaultValue:t,typeName:Oe.ZodDefault})}brand(){return new Re({typeName:Oe.ZodBranded,type:this,...D(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ie({...D(this._def),innerType:this,catchValue:t,typeName:Oe.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Ae.create(this,e)}readonly(){return Ze.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const K=/^c[^\s-]{8,}$/i,$=/^[a-z][a-z0-9]*$/,V=/^[0-9A-HJKMNP-TV-Z]{26}$/,F=/^[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,W=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let z;const H=/^(((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}))$/,Y=/^(([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})))$/;class J extends j{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==x.string){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.string,received:t.parsedType}),A}const t=new R;let a;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?E(a,{code:C.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&E(a,{code:C.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)W.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"email",code:C.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)z||(z=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),z.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"emoji",code:C.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)F.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"uuid",code:C.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)K.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid",code:C.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)$.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid2",code:C.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)V.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"ulid",code:C.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(n){a=this._getOrReturnCtx(e,a),E(a,{validation:"url",code:C.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"regex",code:C.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){((r=i).precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):0===r.precision?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else"ip"===i.kind?(n=e.data,("v4"!==(s=i.version)&&s||!H.test(n))&&("v6"!==s&&s||!Y.test(n))&&(a=this._getOrReturnCtx(e,a),E(a,{validation:"ip",code:C.invalid_string,message:i.message}),t.dirty())):v.assertNever(i);var n,s,r;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:C.invalid_string,...U.errToObj(a)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...U.errToObj(e)})}url(e){return this._addCheck({kind:"url",...U.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...U.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...U.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...U.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...U.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...U.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...U.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({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,...U.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...U.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...U.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...U.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...U.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...U.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...U.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...U.errToObj(t)})}nonempty(e){return this.min(1,U.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function q(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}J.create=e=>{var t;return new J({checks:[],typeName:Oe.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...D(e)})};class Q extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==x.number){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.number,received:t.parsedType}),A}let t;const a=new R;for(const n of this._def.checks)if("int"===n.kind)v.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:C.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==q(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,a,n){return new Q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:U.toString(n)}]})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:U.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:U.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&v.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Q.create=e=>new Q({checks:[],typeName:Oe.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...D(e)});class X extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==x.bigint){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.bigint,received:t.parsedType}),A}let t;const a=new R;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,a,n){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:U.toString(n)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}X.create=e=>{var t;return new X({checks:[],typeName:Oe.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...D(e)})};class ee extends j{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==x.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.boolean,received:t.parsedType}),A}return Z(e.data)}}ee.create=e=>new ee({typeName:Oe.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...D(e)});class te extends j{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==x.date){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.date,received:t.parsedType}),A}if(isNaN(e.data.getTime())){return E(this._getOrReturnCtx(e),{code:C.invalid_date}),A}const t=new R;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):v.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:U.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:U.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}te.create=e=>new te({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...D(e)});class ae extends j{_parse(e){if(this._getType(e)!==x.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.symbol,received:t.parsedType}),A}return Z(e.data)}}ae.create=e=>new ae({typeName:Oe.ZodSymbol,...D(e)});class ne extends j{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.undefined,received:t.parsedType}),A}return Z(e.data)}}ne.create=e=>new ne({typeName:Oe.ZodUndefined,...D(e)});class se extends j{_parse(e){if(this._getType(e)!==x.null){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.null,received:t.parsedType}),A}return Z(e.data)}}se.create=e=>new se({typeName:Oe.ZodNull,...D(e)});class re extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return Z(e.data)}}re.create=e=>new re({typeName:Oe.ZodAny,...D(e)});class ie extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Z(e.data)}}ie.create=e=>new ie({typeName:Oe.ZodUnknown,...D(e)});class oe extends j{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.never,received:t.parsedType}),A}}oe.create=e=>new oe({typeName:Oe.ZodNever,...D(e)});class de extends j{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.void,received:t.parsedType}),A}return Z(e.data)}}de.create=e=>new de({typeName:Oe.ZodVoid,...D(e)});class ue extends j{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==x.array)return E(t,{code:C.invalid_type,expected:x.array,received:t.parsedType}),A;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(E(t,{code:e?C.too_big:C.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(E(t,{code:C.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(E(t,{code:C.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new B(t,e,t.path,a))))).then((e=>R.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new B(t,e,t.path,a))));return R.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:U.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:U.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:U.toString(t)}})}nonempty(e){return this.min(1,e)}}function ce(e){if(e instanceof le){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=we.create(ce(n))}return new le({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:ce(e.element)}):e instanceof we?we.create(ce(e.unwrap())):e instanceof Te?Te.create(ce(e.unwrap())):e instanceof fe?fe.create(e.items.map((e=>ce(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...D(t)});class le extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.object,received:t.parsedType}),A}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),r=[];if(!(this._def.catchall instanceof oe&&"strip"===this._def.unknownKeys))for(const e in a.data)s.includes(e)||r.push(e);const i=[];for(const e of s){const t=n[e],s=a.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new B(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof oe){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of r)i.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)r.length>0&&(E(a,{code:C.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const n=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new B(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>R.mergeObjectSync(t,e))):R.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return U.errToObj,new le({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,s,r,i;const o=null!==(r=null===(s=(n=this._def).errorMap)||void 0===s?void 0:s.call(n,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=U.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new le({...this._def,unknownKeys:"strip"})}passthrough(){return new le({...this._def,unknownKeys:"passthrough"})}extend(e){return new le({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new le({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Oe.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new le({...this._def,catchall:e})}pick(e){const t={};return v.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new le({...this._def,shape:()=>t})}omit(e){const t={};return v.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new le({...this._def,shape:()=>t})}deepPartial(){return ce(this)}partial(e){const t={};return v.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new le({...this._def,shape:()=>t})}required(e){const t={};return v.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof we;)e=e._def.innerType;t[a]=e}})),new le({...this._def,shape:()=>t})}keyof(){return be(v.objectKeys(this.shape))}}le.create=(e,t)=>new le({shape:()=>e,unknownKeys:"strip",catchall:oe.create(),typeName:Oe.ZodObject,...D(t)}),le.strictCreate=(e,t)=>new le({shape:()=>e,unknownKeys:"strict",catchall:oe.create(),typeName:Oe.ZodObject,...D(t)}),le.lazycreate=(e,t)=>new le({shape:e,unknownKeys:"strip",catchall:oe.create(),typeName:Oe.ZodObject,...D(t)});class he extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new S(e.ctx.common.issues)));return E(t,{code:C.invalid_union,unionErrors:a}),A}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new S(e)));return E(t,{code:C.invalid_union,unionErrors:s}),A}}get options(){return this._def.options}}he.create=(e,t)=>new he({options:e,typeName:Oe.ZodUnion,...D(t)});function pe(e,t){const a=k(e),n=k(t);if(e===t)return{valid:!0,data:e};if(a===x.object&&n===x.object){const a=v.objectKeys(t),n=v.objectKeys(e).filter((e=>-1!==a.indexOf(e))),s={...e,...t};for(const a of n){const n=pe(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===x.array&&n===x.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=pe(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===x.date&&n===x.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class me extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(O(e)||O(n))return A;const s=pe(e.value,n.value);return s.valid?((M(e)||M(n))&&t.dirty(),{status:t.value,value:s.data}):(E(a,{code:C.invalid_intersection_types}),A)};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((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}me.create=(e,t,a)=>new me({left:e,right:t,typeName:Oe.ZodIntersection,...D(a)});class fe extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.array)return E(a,{code:C.invalid_type,expected:x.array,received:a.parsedType}),A;if(a.data.length<this._def.items.length)return E(a,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),A;!this._def.rest&&a.data.length>this._def.items.length&&(E(a,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new B(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>R.mergeArray(t,e))):R.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new fe({...this._def,rest:e})}}fe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fe({items:e,typeName:Oe.ZodTuple,rest:null,...D(t)})};class ye extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.map)return E(a,{code:C.invalid_type,expected:x.map,received:a.parsedType}),A;const n=this._def.keyType,s=this._def.valueType,r=[...a.data.entries()].map((([e,t],r)=>({key:n._parse(new B(a,e,a.path,[r,"key"])),value:s._parse(new B(a,t,a.path,[r,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return A;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return A;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}ye.create=(e,t,a)=>new ye({valueType:t,keyType:e,typeName:Oe.ZodMap,...D(a)});class ge extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.set)return E(a,{code:C.invalid_type,expected:x.set,received:a.parsedType}),A;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(E(a,{code:C.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(E(a,{code:C.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function r(e){const a=new Set;for(const n of e){if("aborted"===n.status)return A;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>s._parse(new B(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new ge({...this._def,minSize:{value:e,message:U.toString(t)}})}max(e,t){return new ge({...this._def,maxSize:{value:e,message:U.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ge.create=(e,t)=>new ge({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...D(t)});class _e extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(e,t)=>new _e({getter:e,typeName:Oe.ZodLazy,...D(t)});class ve extends j{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:C.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function be(e,t){return new xe({values:e,typeName:Oe.ZodEnum,...D(t)})}ve.create=(e,t)=>new ve({value:e,typeName:Oe.ZodLiteral,...D(t)});class xe extends j{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return E(t,{expected:v.joinValues(a),received:t.parsedType,code:C.invalid_type}),A}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return E(t,{received:t.data,code:C.invalid_enum_value,options:a}),A}return Z(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return xe.create(e)}exclude(e){return xe.create(this.options.filter((t=>!e.includes(t))))}}xe.create=be;class ke extends j{_parse(e){const t=v.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==x.string&&a.parsedType!==x.number){const e=v.objectValues(t);return E(a,{expected:v.joinValues(e),received:a.parsedType,code:C.invalid_type}),A}if(-1===t.indexOf(e.data)){const e=v.objectValues(t);return E(a,{received:a.data,code:C.invalid_enum_value,options:e}),A}return Z(e.data)}get enum(){return this._def.values}}ke.create=(e,t)=>new ke({values:e,typeName:Oe.ZodNativeEnum,...D(t)});class Ce extends j{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&!1===t.common.async)return E(t,{code:C.invalid_type,expected:x.promise,received:t.parsedType}),A;const a=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return Z(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ce.create=(e,t)=>new Ce({type:e,typeName:Oe.ZodPromise,...D(t)});class Se extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{E(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){const e=n.transform(a.data,s);return a.common.issues.length?{status:"dirty",value:a.data}:a.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:a.path,parent:a}))):this._def.schema._parseSync({data:e,path:a.path,parent:a})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?A:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?A:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!P(e))return e;const r=n.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>P(e)?Promise.resolve(n.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}v.assertNever(n)}}Se.create=(e,t,a)=>new Se({schema:e,typeName:Oe.ZodEffects,effect:t,...D(a)}),Se.createWithPreprocess=(e,t,a)=>new Se({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...D(a)});class we extends j{_parse(e){return this._getType(e)===x.undefined?Z(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}we.create=(e,t)=>new we({innerType:e,typeName:Oe.ZodOptional,...D(t)});class Te extends j{_parse(e){return this._getType(e)===x.null?Z(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(e,t)=>new Te({innerType:e,typeName:Oe.ZodNullable,...D(t)});class Ne extends j{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===x.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:Oe.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...D(t)});class Ie extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return L(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new S(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new S(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Oe.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...D(t)});class Ee extends j{_parse(e){if(this._getType(e)!==x.nan){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}Ee.create=e=>new Ee({typeName:Oe.ZodNaN,...D(e)});class Re extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Ae extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new Ae({in:e,out:t,typeName:Oe.ZodPipeline})}}class Ze extends j{_parse(e){const t=this._def.innerType._parse(e);return P(t)&&(t.value=Object.freeze(t.value)),t}}var Oe;Ze.create=(e,t)=>new Ze({innerType:e,typeName:Oe.ZodReadonly,...D(t)}),le.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Oe||(Oe={}));const Me=J.create,Pe=Q.create;Ee.create,X.create,ee.create,te.create,ae.create,ne.create,se.create,re.create,ie.create,oe.create,de.create;const Le=ue.create,Ue=le.create;le.strictCreate;const Be=he.create;me.create,fe.create,ye.create,ge.create,_e.create;const Ge=ve.create,De=xe.create;ke.create,Ce.create,Se.create,we.create,Te.create,Se.createWithPreprocess,Ae.create;const je=Ue({text:Me(),baseUrl:Me()});let Ke=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});De(["CustomSecondaryCta","ContributionsReminderSecondaryCta"]);Be([Ue({type:Ge("CustomSecondaryCta"),cta:je}),Ue({type:Ge("ContributionsReminderSecondaryCta")})]);const $e=De(["unlimited","hardstop"]),Ve=De(["money"]),Fe=Ue({countLabel:Me(),goalReachedPrimary:Me(),goalReachedSecondary:Me()}),We=Ue({total:Pe(),goal:Pe()});Ue({endType:$e,countType:Ve,currencySymbol:Me(),copy:Fe,tickerData:We.nullish()});const ze=De(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),He=De(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]);Ue({abTestName:Me(),abTestVariant:Me(),campaignCode:Me(),componentType:He,products:Le(ze).nullish(),labels:Le(Me()).nullish(),ophanPageId:Me(),platformId:Me(),referrerUrl:Me(),clientName:Me()});const Ye=Ue({mainUrl:Me(),mobileUrl:Me().nullish(),tabletUrl:Me().nullish(),desktopUrl:Me().nullish(),leftColUrl:Me().nullish(),wideUrl:Me().nullish(),altText:Me()});Ue({name:Me(),description:Me().nullish(),headshot:Ye.nullish()});const Je=(e,t,a)=>{const n=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(e);return fetch(`${t}/${e}${n?`?force=${n}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t})).then((e=>e.json()))};exports.SecondaryCtaType=Ke,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const a=(e=>i[u(e)]?.supportRegionId)(t);if(a)return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,t,n)=>`${t}/${a.toLowerCase()}/${n}`))}return e},exports.buildReminderFields=y,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(m)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.countryCodeToCountryGroupId=u,exports.getBanner=(e,t)=>Je("banner",e,t),exports.getCountryName=l,exports.getEpic=(e,t)=>Je("epic",e,t),exports.getEpicViewLog=t=>t.get(e)||void 0,exports.getHeader=(e,t)=>Je("header",e,t),exports.getLiveblogEpic=(e,t)=>Je("liveblog-epic",e,t),exports.getLocalCurrencySymbol=c,exports.getPuzzlesBanner=(e,t)=>Je("puzzles",e,t),exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&_(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${a=t.getFullYear()}-${(f(a).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${a}`}:"US"===e&&(e=>e>=f(e.getFullYear())&&e<g)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):y(t);var a},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.inCountryGroups=(e,t=[])=>0===t.length||!!e&&t.includes(u(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,s,i)=>{const o=((e,t)=>{const s=n(new Date),r=e.get(a);if(r&&r.week===s){const n=r.articles[t]||0;return e.set(a,{week:s,articles:{...r.articles,[t]:n+1}}),n>0}return e.set(a,{week:s,articles:{[t]:1}}),!1})(e,s);if(!o){const a=n(new Date),s=e.get(t)||[],o=s[0];if(o&&o.week&&o.week===a)o.count+=1,o.tags=r(i,o.tags),e.set(t,s);else{s.unshift({week:a,count:1,tags:r(i,{})});const n=a-365,o=s.filter((e=>e.week>=n));e.set(t,o)}}},exports.logEpicView=t=>{const a=localStorage.getItem(e),n=a?JSON.parse(a).value:[];n.push({date:(new Date).getTime(),testId:t});const s={value:n.slice(-50)};localStorage.setItem(e,JSON.stringify(s))},exports.replaceNonArticleCountPlaceholders=(e,t,a)=>e?e.replace(m,(e=>{const n=e.substring(2,e.length-2),s=p[n];if(s){const e=s({countryCode:t,prices:a});if(e)return e}return e})):"";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="gu.contributions.views",t="gu.history.weeklyArticleCount",a="gu.history.articleCountsThisWeek",n=e=>{const t=e.getDay()||7;return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()-(t-1))/864e5},s=new Set(["environment/climate-change","environment/climate-crisis","environment/environment","science/science","politics/politics","us-news/us-politics","australia-news/australian-politics","world/world","world/europe-news","world/russia","books/books","culture/culture","world/coronavirus-outbreak","world/race","inequality/inequality","technology/technology","business/business"]),r=(e,t={})=>(e.forEach((e=>{s.has(e)&&(t[e]=(t[e]??0)+1)})),t),i={GBPCountries:{name:"United Kingdom",currency:"GBP",countries:["GB","FK","GI","GG","IM","JE","SH"],supportRegionId:"UK"},UnitedStates:{name:"United States",currency:"USD",countries:["US"],supportRegionId:"US"},AUDCountries:{name:"Australia",currency:"AUD",countries:["AU","KI","NR","NF","TV"],supportRegionId:"AU"},EURCountries:{name:"Europe",currency:"EUR",countries:["AD","AL","AT","BA","BE","BG","BL","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GF","GL","GP","GR","HR","HU","IE","IT","LI","LT","LU","LV","MC","ME","MF","IS","MQ","MT","NL","NO","PF","PL","PM","PT","RE","RO","RS","SE","SI","SJ","SK","SM","TF","TR","WF","YT","VA","AX","AZ","AM","GE","BY","MD","UA","MK"],supportRegionId:"EU"},International:{name:"International",currency:"USD",countries:["AE","AF","AG","AI","AO","AQ","AR","AS","AW","BB","BD","BF","BH","BI","BJ","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BZ","CC","CD","CF","CG","CI","CL","CM","CN","CO","CR","CU","CV","CW","CX","DJ","DM","DO","DZ","EC","EG","EH","ER","ET","FJ","FM","GA","GD","GH","GM","GN","GQ","GS","GT","GU","GW","GY","HK","HM","HN","HT","ID","IL","IN","IO","IQ","IR","JM","JO","JP","KE","KG","KH","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LK","LR","LS","LY","MA","MG","MH","ML","MM","MN","MO","MP","MR","MS","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NG","NI","NP","NU","OM","PA","PE","PG","PH","PK","PN","PR","PS","PW","PY","QA","RU","RW","SA","SB","SC","SD","SG","SL","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TG","TH","TJ","TK","TL","TM","TN","TO","TT","TW","TZ","UG","UM","UY","UZ","VC","VE","VG","VI","VN","VU","WS","YE","ZA","ZM","ZW"],supportRegionId:"INT"},NZDCountries:{name:"New Zealand",currency:"NZD",countries:["NZ","CK"],supportRegionId:"NZ"},Canada:{name:"Canada",currency:"CAD",countries:["CA"],supportRegionId:"CA"}},o={AD:"Andorra",AE:"the UAE",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AR:"Argentina",AS:"the US",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"the Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CD:"the Democratic Republic of the Congo",CF:"the Central Africa Republic",CG:"the Congo",CH:"Switzerland",CI:"Côte d'Ivoire",CK:"the Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cabo Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"the Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"the Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"the Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"the UK",FO:"the UK",FR:"France",GA:"Gabon",GB:"the UK",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"the Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IM:"the Isle of Man",IN:"India",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KN:"Saint Kitts and Nevis",KP:"Korea",KR:"Korea",KW:"Kuwait",KY:"the Cayman Ialnds",KZ:"Kazakhstan",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MG:"Madagascar",MK:"the Republic of North Macedonia",ML:"Mali",MM:"Myanmar",MN:"Mongolia",MO:"Macao",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"the Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"the Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Réunion",RO:"Romania",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SY:"Syrian Arab Republic",SZ:"Eswatini",TD:"Chad",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania ",UG:"Uganda",US:"the US",UY:"Uruguay",UZ:"Uzbekistan",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"the Virgin Islands",VI:"the Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe"},d={GBPCountries:"£",UnitedStates:"$",AUDCountries:"$",Canada:"CA$",EURCountries:"€",NZDCountries:"NZ$",International:"$"},u=e=>Object.keys(i).find((t=>i[t].countries.includes(e??"")))||"International",c=e=>{if(e){const t=u(e);return d[t]}return"£"},l=e=>{if(e)return o[e]},h=(e,t,a,n)=>{if(n){const s=n[u(a)];if(s){return`${c(a)}${s[e][t].price}`}}},p={CURRENCY_SYMBOL:({countryCode:e})=>c(e),COUNTRY_NAME:({countryCode:e})=>l(e),PRICE_DIGISUB_MONTHLY:({countryCode:e,prices:t})=>h("Digisub","Monthly",e,t),PRICE_DIGISUB_ANNUAL:({countryCode:e,prices:t})=>h("Digisub","Annual",e,t),PRICE_GUARDIANWEEKLY_MONTHLY:({countryCode:e,prices:t})=>h("GuardianWeekly","Monthly",e,t),PRICE_GUARDIANWEEKLY_ANNUAL:({countryCode:e,prices:t})=>h("GuardianWeekly","Annual",e,t),DAY_OF_THE_WEEK:()=>((e=new Date)=>e.toLocaleString("en-GB",{weekday:"long"}))(),DATE:()=>((e=new Date)=>e.toLocaleString("en-GB",{day:"numeric",month:"long",year:"numeric"}))()},m=/%%.*?%%/g,f=e=>{const t=(e=>{const t=new Date(e,10,1).getDay();return new Date(e,10,22+(11-t)%7)})(e);return t.setDate(t.getDate()+5),t},y=(e=new Date)=>{const t=(e=>{const t=e.getDate()<20?1:2;return e.setMonth(e.getMonth()+t),e})(e),a=(t.getMonth()+1).toString().padStart(2,"0"),n=t.toLocaleString("default",{month:"long"}),s=t.getFullYear();return{reminderCta:`Remind me in ${n}`,reminderPeriod:`${s}-${a}-01`,reminderLabel:`${n} ${s}`}},g=new Date("2023-12-31"),v=e=>e>=(e=>new Date(e.getFullYear(),9,20))(e)&&e<f(e.getFullYear());var _,b;!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const a of e)t[a]=a;return t},e.getValidEnumValues=t=>{const a=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),n={};for(const e of a)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},e.find=(e,t)=>{for(const a of e)if(t(a))return a},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(_||(_={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(b||(b={}));const x=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),k=e=>{switch(typeof e){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(e)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(e)?x.array:null===e?x.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?x.promise:"undefined"!=typeof Map&&e instanceof Map?x.map:"undefined"!=typeof Set&&e instanceof Set?x.set:"undefined"!=typeof Date&&e instanceof Date?x.date:x.object;default:return x.unknown}},C=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class S extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},a={_errors:[]},n=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(n);else if("invalid_return_type"===s.code)n(s.returnTypeError);else if("invalid_arguments"===s.code)n(s.argumentsError);else if(0===s.path.length)a._errors.push(t(s));else{let e=a,n=0;for(;n<s.path.length;){const a=s.path[n];n===s.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(s))):e[a]=e[a]||{_errors:[]},e=e[a],n++}}};return n(this),a}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=(e=>e.message)){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}S.create=e=>new S(e);const w=(e,t)=>{let a;switch(e.code){case C.invalid_type:a=e.received===x.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case C.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,_.jsonStringifyReplacer)}`;break;case C.unrecognized_keys:a=`Unrecognized key(s) in object: ${_.joinValues(e.keys,", ")}`;break;case C.invalid_union:a="Invalid input";break;case C.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${_.joinValues(e.options)}`;break;case C.invalid_enum_value:a=`Invalid enum value. Expected ${_.joinValues(e.options)}, received '${e.received}'`;break;case C.invalid_arguments:a="Invalid function arguments";break;case C.invalid_return_type:a="Invalid function return type";break;case C.invalid_date:a="Invalid date";break;case C.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:_.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case C.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case C.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case C.custom:a="Invalid input";break;case C.invalid_intersection_types:a="Intersection results could not be merged";break;case C.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case C.not_finite:a="Number must be finite";break;default:a=t.defaultError,_.assertNever(e)}return{message:a}};let T=w;function N(){return T}const I=e=>{const{data:t,path:a,errorMaps:n,issueData:s}=e,r=[...a,...s.path||[]],i={...s,path:r};let o="";const d=n.filter((e=>!!e)).slice().reverse();for(const e of d)o=e(i,{data:t,defaultError:o}).message;return{...s,path:r,message:s.message||o}};function E(e,t){const a=I({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,N(),w].filter((e=>!!e))});e.common.issues.push(a)}class A{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if("aborted"===n.status)return R;"dirty"===n.status&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const e of t)a.push({key:await e.key,value:await e.value});return A.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:t,value:s}=n;if("aborted"===t.status)return R;if("aborted"===s.status)return R;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!n.alwaysSet||(a[t.value]=s.value)}return{status:e.value,value:a}}}const R=Object.freeze({status:"aborted"}),O=e=>({status:"valid",value:e}),Z=e=>"aborted"===e.status,M=e=>"dirty"===e.status,P=e=>"valid"===e.status,L=e=>"undefined"!=typeof Promise&&e instanceof Promise;var U;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(U||(U={}));class B{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const D=(e,t)=>{if(P(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;const t=new S(e.common.issues);return this._error=t,this._error}}};function G(e){if(!e)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:s}=e;if(t&&(a||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=a?a:t.defaultError},description:s}}class j{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return k(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new A,ctx:{common:e.parent.common,data:e.data,parsedType:k(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(L(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const n={common:{issues:[],async:null!==(a=null==t?void 0:t.async)&&void 0!==a&&a,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:k(e)},s=this._parseSync({data:e,path:n.path,parent:n});return D(n,s)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:k(e)},n=this._parse({data:e,path:a.path,parent:a}),s=await(L(n)?n:Promise.resolve(n));return D(a,s)}refine(e,t){const a=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,n)=>{const s=e(t),r=()=>n.addIssue({code:C.custom,...a(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then((e=>!!e||(r(),!1))):!!s||(r(),!1)}))}refinement(e,t){return this._refinement(((a,n)=>!!e(a)||(n.addIssue("function"==typeof t?t(a,n):t),!1)))}_refinement(e){return new Se({schema:this,typeName:Ze.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return we.create(this,this._def)}nullable(){return Te.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ue.create(this,this._def)}promise(){return Ce.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return me.create(this,e,this._def)}transform(e){return new Se({...G(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Ne({...G(this._def),innerType:this,defaultValue:t,typeName:Ze.ZodDefault})}brand(){return new Ae({typeName:Ze.ZodBranded,type:this,...G(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ie({...G(this._def),innerType:this,catchValue:t,typeName:Ze.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Re.create(this,e)}readonly(){return Oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const K=/^c[^\s-]{8,}$/i,$=/^[a-z][a-z0-9]*$/,V=/^[0-9A-HJKMNP-TV-Z]{26}$/,F=/^[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,W=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let z;const H=/^(((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}))$/,Y=/^(([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})))$/;class J extends j{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==x.string){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.string,received:t.parsedType}),R}const t=new A;let a;for(const i of this._def.checks)if("min"===i.kind)e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("max"===i.kind)e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),t.dirty());else if("length"===i.kind){const n=e.data.length>i.value,s=e.data.length<i.value;(n||s)&&(a=this._getOrReturnCtx(e,a),n?E(a,{code:C.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&E(a,{code:C.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if("email"===i.kind)W.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"email",code:C.invalid_string,message:i.message}),t.dirty());else if("emoji"===i.kind)z||(z=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),z.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"emoji",code:C.invalid_string,message:i.message}),t.dirty());else if("uuid"===i.kind)F.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"uuid",code:C.invalid_string,message:i.message}),t.dirty());else if("cuid"===i.kind)K.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid",code:C.invalid_string,message:i.message}),t.dirty());else if("cuid2"===i.kind)$.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"cuid2",code:C.invalid_string,message:i.message}),t.dirty());else if("ulid"===i.kind)V.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"ulid",code:C.invalid_string,message:i.message}),t.dirty());else if("url"===i.kind)try{new URL(e.data)}catch(n){a=this._getOrReturnCtx(e,a),E(a,{validation:"url",code:C.invalid_string,message:i.message}),t.dirty()}else if("regex"===i.kind){i.regex.lastIndex=0;i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{validation:"regex",code:C.invalid_string,message:i.message}),t.dirty())}else if("trim"===i.kind)e.data=e.data.trim();else if("includes"===i.kind)e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty());else if("toLowerCase"===i.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===i.kind)e.data=e.data.toUpperCase();else if("startsWith"===i.kind)e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty());else if("endsWith"===i.kind)e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty());else if("datetime"===i.kind){((r=i).precision?r.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${r.precision}}Z$`):0===r.precision?r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):r.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$")).test(e.data)||(a=this._getOrReturnCtx(e,a),E(a,{code:C.invalid_string,validation:"datetime",message:i.message}),t.dirty())}else"ip"===i.kind?(n=e.data,("v4"!==(s=i.version)&&s||!H.test(n))&&("v6"!==s&&s||!Y.test(n))&&(a=this._getOrReturnCtx(e,a),E(a,{validation:"ip",code:C.invalid_string,message:i.message}),t.dirty())):_.assertNever(i);var n,s,r;return{status:t.value,value:e.data}}_regex(e,t,a){return this.refinement((t=>e.test(t)),{validation:t,code:C.invalid_string,...U.errToObj(a)})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...U.errToObj(e)})}url(e){return this._addCheck({kind:"url",...U.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...U.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...U.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...U.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...U.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...U.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...U.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({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,...U.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...U.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...U.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...U.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...U.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...U.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...U.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...U.errToObj(t)})}nonempty(e){return this.min(1,U.errToObj(e))}trim(){return new J({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new J({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function q(e,t){const a=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=a>n?a:n;return parseInt(e.toFixed(s).replace(".",""))%parseInt(t.toFixed(s).replace(".",""))/Math.pow(10,s)}J.create=e=>{var t;return new J({checks:[],typeName:Ze.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...G(e)})};class Q extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==x.number){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.number,received:t.parsedType}),R}let t;const a=new A;for(const n of this._def.checks)if("int"===n.kind)_.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:C.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty());else if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty())}else"multipleOf"===n.kind?0!==q(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_finite,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,a,n){return new Q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:U.toString(n)}]})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:U.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:U.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:U.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:U.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&_.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Q.create=e=>new Q({checks:[],typeName:Ze.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...G(e)});class X extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){this._def.coerce&&(e.data=BigInt(e.data));if(this._getType(e)!==x.bigint){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.bigint,received:t.parsedType}),R}let t;const a=new A;for(const n of this._def.checks)if("min"===n.kind){(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else if("max"===n.kind){(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty())}else"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),E(t,{code:C.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,U.toString(t))}gt(e,t){return this.setLimit("min",e,!1,U.toString(t))}lte(e,t){return this.setLimit("max",e,!0,U.toString(t))}lt(e,t){return this.setLimit("max",e,!1,U.toString(t))}setLimit(e,t,a,n){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:U.toString(n)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:U.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:U.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:U.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:U.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:U.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}X.create=e=>{var t;return new X({checks:[],typeName:Ze.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...G(e)})};class ee extends j{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==x.boolean){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.boolean,received:t.parsedType}),R}return O(e.data)}}ee.create=e=>new ee({typeName:Ze.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...G(e)});class te extends j{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==x.date){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.date,received:t.parsedType}),R}if(isNaN(e.data.getTime())){return E(this._getOrReturnCtx(e),{code:C.invalid_date}),R}const t=new A;let a;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),E(a,{code:C.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):_.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:U.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:U.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}te.create=e=>new te({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Ze.ZodDate,...G(e)});class ae extends j{_parse(e){if(this._getType(e)!==x.symbol){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.symbol,received:t.parsedType}),R}return O(e.data)}}ae.create=e=>new ae({typeName:Ze.ZodSymbol,...G(e)});class ne extends j{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.undefined,received:t.parsedType}),R}return O(e.data)}}ne.create=e=>new ne({typeName:Ze.ZodUndefined,...G(e)});class se extends j{_parse(e){if(this._getType(e)!==x.null){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.null,received:t.parsedType}),R}return O(e.data)}}se.create=e=>new se({typeName:Ze.ZodNull,...G(e)});class re extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}re.create=e=>new re({typeName:Ze.ZodAny,...G(e)});class ie extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}ie.create=e=>new ie({typeName:Ze.ZodUnknown,...G(e)});class oe extends j{_parse(e){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.never,received:t.parsedType}),R}}oe.create=e=>new oe({typeName:Ze.ZodNever,...G(e)});class de extends j{_parse(e){if(this._getType(e)!==x.undefined){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.void,received:t.parsedType}),R}return O(e.data)}}de.create=e=>new de({typeName:Ze.ZodVoid,...G(e)});class ue extends j{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==x.array)return E(t,{code:C.invalid_type,expected:x.array,received:t.parsedType}),R;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,s=t.data.length<n.exactLength.value;(e||s)&&(E(t,{code:e?C.too_big:C.too_small,minimum:s?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(E(t,{code:C.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(E(t,{code:C.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map(((e,a)=>n.type._parseAsync(new B(t,e,t.path,a))))).then((e=>A.mergeArray(a,e)));const s=[...t.data].map(((e,a)=>n.type._parseSync(new B(t,e,t.path,a))));return A.mergeArray(a,s)}get element(){return this._def.type}min(e,t){return new ue({...this._def,minLength:{value:e,message:U.toString(t)}})}max(e,t){return new ue({...this._def,maxLength:{value:e,message:U.toString(t)}})}length(e,t){return new ue({...this._def,exactLength:{value:e,message:U.toString(t)}})}nonempty(e){return this.min(1,e)}}function ce(e){if(e instanceof le){const t={};for(const a in e.shape){const n=e.shape[a];t[a]=we.create(ce(n))}return new le({...e._def,shape:()=>t})}return e instanceof ue?new ue({...e._def,type:ce(e.element)}):e instanceof we?we.create(ce(e.unwrap())):e instanceof Te?Te.create(ce(e.unwrap())):e instanceof fe?fe.create(e.items.map((e=>ce(e)))):e}ue.create=(e,t)=>new ue({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...G(t)});class le extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==x.object){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.object,received:t.parsedType}),R}const{status:t,ctx:a}=this._processInputParams(e),{shape:n,keys:s}=this._getCached(),r=[];if(!(this._def.catchall instanceof oe&&"strip"===this._def.unknownKeys))for(const e in a.data)s.includes(e)||r.push(e);const i=[];for(const e of s){const t=n[e],s=a.data[e];i.push({key:{status:"valid",value:e},value:t._parse(new B(a,s,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof oe){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of r)i.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)r.length>0&&(E(a,{code:C.unrecognized_keys,keys:r}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of r){const n=a.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new B(a,n,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of i){const a=await t.key;e.push({key:a,value:await t.value,alwaysSet:t.alwaysSet})}return e})).then((e=>A.mergeObjectSync(t,e))):A.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return U.errToObj,new le({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{var n,s,r,i;const o=null!==(r=null===(s=(n=this._def).errorMap)||void 0===s?void 0:s.call(n,t,a).message)&&void 0!==r?r:a.defaultError;return"unrecognized_keys"===t.code?{message:null!==(i=U.errToObj(e).message)&&void 0!==i?i:o}:{message:o}}}:{}})}strip(){return new le({...this._def,unknownKeys:"strip"})}passthrough(){return new le({...this._def,unknownKeys:"passthrough"})}extend(e){return new le({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new le({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ze.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new le({...this._def,catchall:e})}pick(e){const t={};return _.objectKeys(e).forEach((a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])})),new le({...this._def,shape:()=>t})}omit(e){const t={};return _.objectKeys(this.shape).forEach((a=>{e[a]||(t[a]=this.shape[a])})),new le({...this._def,shape:()=>t})}deepPartial(){return ce(this)}partial(e){const t={};return _.objectKeys(this.shape).forEach((a=>{const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()})),new le({...this._def,shape:()=>t})}required(e){const t={};return _.objectKeys(this.shape).forEach((a=>{if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof we;)e=e._def.innerType;t[a]=e}})),new le({...this._def,shape:()=>t})}keyof(){return be(_.objectKeys(this.shape))}}le.create=(e,t)=>new le({shape:()=>e,unknownKeys:"strip",catchall:oe.create(),typeName:Ze.ZodObject,...G(t)}),le.strictCreate=(e,t)=>new le({shape:()=>e,unknownKeys:"strict",catchall:oe.create(),typeName:Ze.ZodObject,...G(t)}),le.lazycreate=(e,t)=>new le({shape:e,unknownKeys:"strip",catchall:oe.create(),typeName:Ze.ZodObject,...G(t)});class he extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map((async e=>{const a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;const a=e.map((e=>new S(e.ctx.common.issues)));return E(t,{code:C.invalid_union,unionErrors:a}),R}));{let e;const n=[];for(const s of a){const a={...t,common:{...t.common,issues:[]},parent:null},r=s._parseSync({data:t.data,path:t.path,parent:a});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,ctx:a}),a.common.issues.length&&n.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=n.map((e=>new S(e)));return E(t,{code:C.invalid_union,unionErrors:s}),R}}get options(){return this._def.options}}he.create=(e,t)=>new he({options:e,typeName:Ze.ZodUnion,...G(t)});function pe(e,t){const a=k(e),n=k(t);if(e===t)return{valid:!0,data:e};if(a===x.object&&n===x.object){const a=_.objectKeys(t),n=_.objectKeys(e).filter((e=>-1!==a.indexOf(e))),s={...e,...t};for(const a of n){const n=pe(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(a===x.array&&n===x.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let n=0;n<e.length;n++){const s=pe(e[n],t[n]);if(!s.valid)return{valid:!1};a.push(s.data)}return{valid:!0,data:a}}return a===x.date&&n===x.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class me extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(e,n)=>{if(Z(e)||Z(n))return R;const s=pe(e.value,n.value);return s.valid?((M(e)||M(n))&&t.dirty(),{status:t.value,value:s.data}):(E(a,{code:C.invalid_intersection_types}),R)};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((([e,t])=>n(e,t))):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}me.create=(e,t,a)=>new me({left:e,right:t,typeName:Ze.ZodIntersection,...G(a)});class fe extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.array)return E(a,{code:C.invalid_type,expected:x.array,received:a.parsedType}),R;if(a.data.length<this._def.items.length)return E(a,{code:C.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&a.data.length>this._def.items.length&&(E(a,{code:C.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...a.data].map(((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new B(a,e,a.path,t)):null})).filter((e=>!!e));return a.common.async?Promise.all(n).then((e=>A.mergeArray(t,e))):A.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new fe({...this._def,rest:e})}}fe.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fe({items:e,typeName:Ze.ZodTuple,rest:null,...G(t)})};class ye extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.map)return E(a,{code:C.invalid_type,expected:x.map,received:a.parsedType}),R;const n=this._def.keyType,s=this._def.valueType,r=[...a.data.entries()].map((([e,t],r)=>({key:n._parse(new B(a,e,a.path,[r,"key"])),value:s._parse(new B(a,t,a.path,[r,"value"]))})));if(a.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const a of r){const n=await a.key,s=await a.value;if("aborted"===n.status||"aborted"===s.status)return R;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const a of r){const n=a.key,s=a.value;if("aborted"===n.status||"aborted"===s.status)return R;"dirty"!==n.status&&"dirty"!==s.status||t.dirty(),e.set(n.value,s.value)}return{status:t.value,value:e}}}}ye.create=(e,t,a)=>new ye({valueType:t,keyType:e,typeName:Ze.ZodMap,...G(a)});class ge extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==x.set)return E(a,{code:C.invalid_type,expected:x.set,received:a.parsedType}),R;const n=this._def;null!==n.minSize&&a.data.size<n.minSize.value&&(E(a,{code:C.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&a.data.size>n.maxSize.value&&(E(a,{code:C.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const s=this._def.valueType;function r(e){const a=new Set;for(const n of e){if("aborted"===n.status)return R;"dirty"===n.status&&t.dirty(),a.add(n.value)}return{status:t.value,value:a}}const i=[...a.data.values()].map(((e,t)=>s._parse(new B(a,e,a.path,t))));return a.common.async?Promise.all(i).then((e=>r(e))):r(i)}min(e,t){return new ge({...this._def,minSize:{value:e,message:U.toString(t)}})}max(e,t){return new ge({...this._def,maxSize:{value:e,message:U.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ge.create=(e,t)=>new ge({valueType:e,minSize:null,maxSize:null,typeName:Ze.ZodSet,...G(t)});class ve extends j{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ve.create=(e,t)=>new ve({getter:e,typeName:Ze.ZodLazy,...G(t)});class _e extends j{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return E(t,{received:t.data,code:C.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:e.data}}get value(){return this._def.value}}function be(e,t){return new xe({values:e,typeName:Ze.ZodEnum,...G(t)})}_e.create=(e,t)=>new _e({value:e,typeName:Ze.ZodLiteral,...G(t)});class xe extends j{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),a=this._def.values;return E(t,{expected:_.joinValues(a),received:t.parsedType,code:C.invalid_type}),R}if(-1===this._def.values.indexOf(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return E(t,{received:t.data,code:C.invalid_enum_value,options:a}),R}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return xe.create(e)}exclude(e){return xe.create(this.options.filter((t=>!e.includes(t))))}}xe.create=be;class ke extends j{_parse(e){const t=_.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==x.string&&a.parsedType!==x.number){const e=_.objectValues(t);return E(a,{expected:_.joinValues(e),received:a.parsedType,code:C.invalid_type}),R}if(-1===t.indexOf(e.data)){const e=_.objectValues(t);return E(a,{received:a.data,code:C.invalid_enum_value,options:e}),R}return O(e.data)}get enum(){return this._def.values}}ke.create=(e,t)=>new ke({values:e,typeName:Ze.ZodNativeEnum,...G(t)});class Ce extends j{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==x.promise&&!1===t.common.async)return E(t,{code:C.invalid_type,expected:x.promise,received:t.parsedType}),R;const a=t.parsedType===x.promise?t.data:Promise.resolve(t.data);return O(a.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Ce.create=(e,t)=>new Ce({type:e,typeName:Ze.ZodPromise,...G(t)});class Se extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{E(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){const e=n.transform(a.data,s);return a.common.issues.length?{status:"dirty",value:a.data}:a.common.async?Promise.resolve(e).then((e=>this._def.schema._parseAsync({data:e,path:a.path,parent:a}))):this._def.schema._parseSync({data:e,path:a.path,parent:a})}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,s);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===a.common.async){const n=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===n.status?R:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((a=>"aborted"===a.status?R:("dirty"===a.status&&t.dirty(),e(a.value).then((()=>({status:t.value,value:a.value}))))))}if("transform"===n.type){if(!1===a.common.async){const e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!P(e))return e;const r=n.transform(e.value,s);if(r instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:r}}return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then((e=>P(e)?Promise.resolve(n.transform(e.value,s)).then((e=>({status:t.value,value:e}))):e))}_.assertNever(n)}}Se.create=(e,t,a)=>new Se({schema:e,typeName:Ze.ZodEffects,effect:t,...G(a)}),Se.createWithPreprocess=(e,t,a)=>new Se({schema:t,effect:{type:"preprocess",transform:e},typeName:Ze.ZodEffects,...G(a)});class we extends j{_parse(e){return this._getType(e)===x.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}we.create=(e,t)=>new we({innerType:e,typeName:Ze.ZodOptional,...G(t)});class Te extends j{_parse(e){return this._getType(e)===x.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Te.create=(e,t)=>new Te({innerType:e,typeName:Ze.ZodNullable,...G(t)});class Ne extends j{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===x.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Ne.create=(e,t)=>new Ne({innerType:e,typeName:Ze.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...G(t)});class Ie extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return L(n)?n.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new S(a.common.issues)},input:a.data})}))):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new S(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:Ze.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...G(t)});class Ee extends j{_parse(e){if(this._getType(e)!==x.nan){const t=this._getOrReturnCtx(e);return E(t,{code:C.invalid_type,expected:x.nan,received:t.parsedType}),R}return{status:"valid",value:e.data}}}Ee.create=e=>new Ee({typeName:Ze.ZodNaN,...G(e)});class Ae extends j{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class Re extends j{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?R:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})()}{const e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?R:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new Re({in:e,out:t,typeName:Ze.ZodPipeline})}}class Oe extends j{_parse(e){const t=this._def.innerType._parse(e);return P(t)&&(t.value=Object.freeze(t.value)),t}}var Ze;Oe.create=(e,t)=>new Oe({innerType:e,typeName:Ze.ZodReadonly,...G(t)}),le.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Ze||(Ze={}));const Me=J.create,Pe=Q.create;Ee.create,X.create;const Le=ee.create;te.create,ae.create,ne.create,se.create;const Ue=re.create;ie.create,oe.create,de.create;const Be=ue.create,De=le.create;le.strictCreate;const Ge=he.create;me.create,fe.create,ye.create,ge.create,ve.create;const je=_e.create,Ke=xe.create;ke.create,Ce.create,Se.create,we.create,Te.create,Se.createWithPreprocess,Re.create;const $e=De({text:Me(),baseUrl:Me()});let Ve=function(e){return e.Custom="CustomSecondaryCta",e.ContributionsReminder="ContributionsReminderSecondaryCta",e}({});Ke(["CustomSecondaryCta","ContributionsReminderSecondaryCta"]);const Fe=Ge([De({type:je("CustomSecondaryCta"),cta:$e}),De({type:je("ContributionsReminderSecondaryCta")})]);let We=function(e){return e.unlimited="unlimited",e.hardstop="hardstop",e}({});const ze=Ke(["unlimited","hardstop"]);let He=function(e){return e.money="money",e}({});const Ye=Ke(["money"]),Je=De({countLabel:Me(),goalReachedPrimary:Me(),goalReachedSecondary:Me()}),qe=De({total:Pe(),goal:Pe()}),Qe=De({endType:ze,countType:Ye,currencySymbol:Me(),copy:Je,tickerData:qe.nullish()}),Xe=Ke(["CONTRIBUTION","MEMBERSHIP_SUPPORTER","DIGITAL_SUBSCRIPTION","PRINT_SUBSCRIPTION"]),et=Ke(["ACQUISITIONS_EPIC","ACQUISITIONS_ENGAGEMENT_BANNER","ACQUISITIONS_SUBSCRIPTIONS_BANNER","ACQUISITIONS_HEADER","ACQUISITIONS_OTHER"]),tt=De({abTestName:Me(),abTestVariant:Me(),campaignCode:Me(),componentType:et,products:Be(Xe).nullish(),labels:Be(Me()).nullish(),ophanPageId:Me(),platformId:Me(),referrerUrl:Me(),clientName:Me()}),at=De({mainUrl:Me(),mobileUrl:Me().nullish(),tabletUrl:Me().nullish(),desktopUrl:Me().nullish(),leftColUrl:Me().nullish(),wideUrl:Me().nullish(),altText:Me()}),nt=De({name:Me(),description:Me().nullish(),headshot:at.nullish()}),st=De({for52Weeks:Pe(),forTargetedWeeks:Pe()}),rt=De({maxViewsCount:Pe(),maxViewsDays:Pe(),minDaysBetweenViews:Pe()}),it=De({type:Me(),copy:Me().nullish()}),ot=De({reminderCta:Me(),reminderLabel:Me(),reminderPeriod:Me()}),dt=De({name:Me(),heading:Me().nullish(),paragraphs:Be(Me()),highlightedText:Me().nullish(),tickerSettings:Qe.nullish(),cta:$e.nullish(),secondaryCta:Fe.nullish(),footer:Me().nullish(),image:at.nullish(),showReminderFields:ot.nullish(),separateArticleCount:it.nullish(),maxViews:rt.nullish(),showSignInLink:Le().nullish(),bylineWithImage:nt.nullish()}),ut=De({variant:dt,tracking:tt,countryCode:Me().nullish(),articleCounts:st,onReminderOpen:Ue().nullish(),fetchEmail:Ue().nullish(),submitComponentEvent:Ue().nullish(),openCmp:Ue().nullish(),hasConsentForArticleCount:Le().nullish(),stage:Me().nullish()}),ct=(e,t,a)=>{const n=(e=>{if(URLSearchParams){const t=new URLSearchParams(window.location.search).get(`force-${e}`);if(t)return t}return null})(e);return fetch(`${t}/${e}${n?`?force=${n}`:""}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((t=>{if(!t.ok)throw Error(t.statusText||`Supporter Revenue ${e} | Api call returned HTTP status ${t.status}`);return t})).then((e=>e.json()))};exports.SecondaryCtaType=Ve,exports.TickerCountType=He,exports.TickerEndType=We,exports.addRegionIdToSupportUrl=(e,t)=>{if(t){const a=(e=>i[u(e)]?.supportRegionId)(t);if(a)return e.replace(/(support.theguardian.com)\/(contribute-in-epic|contribute|subscribe)/,((e,t,n)=>`${t}/${a.toLowerCase()}/${n}`))}return e},exports.buildReminderFields=y,exports.containsNonArticleCountPlaceholder=e=>{const t=e.match(m)?.filter((e=>"%%ARTICLE_COUNT%%"!==e));return!!t&&t.length>0},exports.contributionTabFrequencies=["ONE_OFF","MONTHLY","ANNUAL"],exports.countryCodeToCountryGroupId=u,exports.epicPropsSchema=ut,exports.getBanner=(e,t)=>ct("banner",e,t),exports.getCountryName=l,exports.getEpic=(e,t)=>ct("epic",e,t),exports.getEpicViewLog=t=>t.get(e)||void 0,exports.getHeader=(e,t)=>ct("header",e,t),exports.getLiveblogEpic=(e,t)=>ct("liveblog-epic",e,t),exports.getLocalCurrencySymbol=c,exports.getPuzzlesBanner=(e,t)=>ct("puzzles",e,t),exports.getReminderFields=(e,t=new Date)=>{return"US"===e&&v(t)?{reminderCta:"Remind me on Giving Tuesday",reminderPeriod:`${a=t.getFullYear()}-${(f(a).getMonth()+1).toString().padStart(0,"2")}-01`,reminderLabel:"on Giving Tuesday",reminderOption:`giving-tuesday-${a}`}:"US"===e&&(e=>e>=f(e.getFullYear())&&e<g)(t)?(e=>({reminderCta:"Remind me on New Years Eve",reminderPeriod:`${e}-12-01`,reminderLabel:"on New Years Eve",reminderOption:`new-years-eve-${e}`}))(t.getFullYear()):y(t);var a},exports.getWeeklyArticleHistory=e=>e.get(t)||void 0,exports.inCountryGroups=(e,t=[])=>0===t.length||!!e&&t.includes(u(e.toUpperCase())),exports.incrementWeeklyArticleCount=(e,s,i)=>{const o=((e,t)=>{const s=n(new Date),r=e.get(a);if(r&&r.week===s){const n=r.articles[t]||0;return e.set(a,{week:s,articles:{...r.articles,[t]:n+1}}),n>0}return e.set(a,{week:s,articles:{[t]:1}}),!1})(e,s);if(!o){const a=n(new Date),s=e.get(t)||[],o=s[0];if(o&&o.week&&o.week===a)o.count+=1,o.tags=r(i,o.tags),e.set(t,s);else{s.unshift({week:a,count:1,tags:r(i,{})});const n=a-365,o=s.filter((e=>e.week>=n));e.set(t,o)}}},exports.logEpicView=t=>{const a=localStorage.getItem(e),n=a?JSON.parse(a).value:[];n.push({date:(new Date).getTime(),testId:t});const s={value:n.slice(-50)};localStorage.setItem(e,JSON.stringify(s))},exports.replaceNonArticleCountPlaceholders=(e,t,a)=>e?e.replace(m,(e=>{const n=e.substring(2,e.length-2),s=p[n];if(s){const e=s({countryCode:t,prices:a});if(e)return e}return e})):"";
@@ -338,6 +338,86 @@ export declare const bannerSchema: z.ZodObject<{
338
338
  kind: "hex";
339
339
  r: string;
340
340
  }>>;
341
+ buttonTextColour: z.ZodOptional<z.ZodObject<{
342
+ r: z.ZodEffects<z.ZodString, string, string>;
343
+ g: z.ZodEffects<z.ZodString, string, string>;
344
+ b: z.ZodEffects<z.ZodString, string, string>;
345
+ kind: z.ZodLiteral<"hex">;
346
+ }, "strip", z.ZodTypeAny, {
347
+ b: string;
348
+ g: string;
349
+ kind: "hex";
350
+ r: string;
351
+ }, {
352
+ b: string;
353
+ g: string;
354
+ kind: "hex";
355
+ r: string;
356
+ }>>;
357
+ buttonBorderColour: z.ZodOptional<z.ZodObject<{
358
+ r: z.ZodEffects<z.ZodString, string, string>;
359
+ g: z.ZodEffects<z.ZodString, string, string>;
360
+ b: z.ZodEffects<z.ZodString, string, string>;
361
+ kind: z.ZodLiteral<"hex">;
362
+ }, "strip", z.ZodTypeAny, {
363
+ b: string;
364
+ g: string;
365
+ kind: "hex";
366
+ r: string;
367
+ }, {
368
+ b: string;
369
+ g: string;
370
+ kind: "hex";
371
+ r: string;
372
+ }>>;
373
+ buttonSelectColour: z.ZodOptional<z.ZodObject<{
374
+ r: z.ZodEffects<z.ZodString, string, string>;
375
+ g: z.ZodEffects<z.ZodString, string, string>;
376
+ b: z.ZodEffects<z.ZodString, string, string>;
377
+ kind: z.ZodLiteral<"hex">;
378
+ }, "strip", z.ZodTypeAny, {
379
+ b: string;
380
+ g: string;
381
+ kind: "hex";
382
+ r: string;
383
+ }, {
384
+ b: string;
385
+ g: string;
386
+ kind: "hex";
387
+ r: string;
388
+ }>>;
389
+ buttonSelectTextColour: z.ZodOptional<z.ZodObject<{
390
+ r: z.ZodEffects<z.ZodString, string, string>;
391
+ g: z.ZodEffects<z.ZodString, string, string>;
392
+ b: z.ZodEffects<z.ZodString, string, string>;
393
+ kind: z.ZodLiteral<"hex">;
394
+ }, "strip", z.ZodTypeAny, {
395
+ b: string;
396
+ g: string;
397
+ kind: "hex";
398
+ r: string;
399
+ }, {
400
+ b: string;
401
+ g: string;
402
+ kind: "hex";
403
+ r: string;
404
+ }>>;
405
+ buttonSelectBorderColour: z.ZodOptional<z.ZodObject<{
406
+ r: z.ZodEffects<z.ZodString, string, string>;
407
+ g: z.ZodEffects<z.ZodString, string, string>;
408
+ b: z.ZodEffects<z.ZodString, string, string>;
409
+ kind: z.ZodLiteral<"hex">;
410
+ }, "strip", z.ZodTypeAny, {
411
+ b: string;
412
+ g: string;
413
+ kind: "hex";
414
+ r: string;
415
+ }, {
416
+ b: string;
417
+ g: string;
418
+ kind: "hex";
419
+ r: string;
420
+ }>>;
341
421
  kind: z.ZodLiteral<"ChoiceCards">;
342
422
  }, "strip", z.ZodTypeAny, {
343
423
  kind: "ChoiceCards";
@@ -347,6 +427,36 @@ export declare const bannerSchema: z.ZodObject<{
347
427
  kind: "hex";
348
428
  r: string;
349
429
  } | undefined;
430
+ buttonTextColour?: {
431
+ b: string;
432
+ g: string;
433
+ kind: "hex";
434
+ r: string;
435
+ } | undefined;
436
+ buttonBorderColour?: {
437
+ b: string;
438
+ g: string;
439
+ kind: "hex";
440
+ r: string;
441
+ } | undefined;
442
+ buttonSelectColour?: {
443
+ b: string;
444
+ g: string;
445
+ kind: "hex";
446
+ r: string;
447
+ } | undefined;
448
+ buttonSelectTextColour?: {
449
+ b: string;
450
+ g: string;
451
+ kind: "hex";
452
+ r: string;
453
+ } | undefined;
454
+ buttonSelectBorderColour?: {
455
+ b: string;
456
+ g: string;
457
+ kind: "hex";
458
+ r: string;
459
+ } | undefined;
350
460
  }, {
351
461
  kind: "ChoiceCards";
352
462
  buttonColour?: {
@@ -355,6 +465,36 @@ export declare const bannerSchema: z.ZodObject<{
355
465
  kind: "hex";
356
466
  r: string;
357
467
  } | undefined;
468
+ buttonTextColour?: {
469
+ b: string;
470
+ g: string;
471
+ kind: "hex";
472
+ r: string;
473
+ } | undefined;
474
+ buttonBorderColour?: {
475
+ b: string;
476
+ g: string;
477
+ kind: "hex";
478
+ r: string;
479
+ } | undefined;
480
+ buttonSelectColour?: {
481
+ b: string;
482
+ g: string;
483
+ kind: "hex";
484
+ r: string;
485
+ } | undefined;
486
+ buttonSelectTextColour?: {
487
+ b: string;
488
+ g: string;
489
+ kind: "hex";
490
+ r: string;
491
+ } | undefined;
492
+ buttonSelectBorderColour?: {
493
+ b: string;
494
+ g: string;
495
+ kind: "hex";
496
+ r: string;
497
+ } | undefined;
358
498
  }>]>>;
359
499
  colours: z.ZodObject<{
360
500
  basic: z.ZodObject<{
@@ -479,6 +619,36 @@ export declare const bannerSchema: z.ZodObject<{
479
619
  kind: "hex";
480
620
  r: string;
481
621
  } | undefined;
622
+ buttonTextColour?: {
623
+ b: string;
624
+ g: string;
625
+ kind: "hex";
626
+ r: string;
627
+ } | undefined;
628
+ buttonBorderColour?: {
629
+ b: string;
630
+ g: string;
631
+ kind: "hex";
632
+ r: string;
633
+ } | undefined;
634
+ buttonSelectColour?: {
635
+ b: string;
636
+ g: string;
637
+ kind: "hex";
638
+ r: string;
639
+ } | undefined;
640
+ buttonSelectTextColour?: {
641
+ b: string;
642
+ g: string;
643
+ kind: "hex";
644
+ r: string;
645
+ } | undefined;
646
+ buttonSelectBorderColour?: {
647
+ b: string;
648
+ g: string;
649
+ kind: "hex";
650
+ r: string;
651
+ } | undefined;
482
652
  } | undefined;
483
653
  }, {
484
654
  colours: {
@@ -511,6 +681,36 @@ export declare const bannerSchema: z.ZodObject<{
511
681
  kind: "hex";
512
682
  r: string;
513
683
  } | undefined;
684
+ buttonTextColour?: {
685
+ b: string;
686
+ g: string;
687
+ kind: "hex";
688
+ r: string;
689
+ } | undefined;
690
+ buttonBorderColour?: {
691
+ b: string;
692
+ g: string;
693
+ kind: "hex";
694
+ r: string;
695
+ } | undefined;
696
+ buttonSelectColour?: {
697
+ b: string;
698
+ g: string;
699
+ kind: "hex";
700
+ r: string;
701
+ } | undefined;
702
+ buttonSelectTextColour?: {
703
+ b: string;
704
+ g: string;
705
+ kind: "hex";
706
+ r: string;
707
+ } | undefined;
708
+ buttonSelectBorderColour?: {
709
+ b: string;
710
+ g: string;
711
+ kind: "hex";
712
+ r: string;
713
+ } | undefined;
514
714
  } | undefined;
515
715
  }>>>;
516
716
  }, "strip", z.ZodTypeAny, {
@@ -619,6 +819,36 @@ export declare const bannerSchema: z.ZodObject<{
619
819
  kind: "hex";
620
820
  r: string;
621
821
  } | undefined;
822
+ buttonTextColour?: {
823
+ b: string;
824
+ g: string;
825
+ kind: "hex";
826
+ r: string;
827
+ } | undefined;
828
+ buttonBorderColour?: {
829
+ b: string;
830
+ g: string;
831
+ kind: "hex";
832
+ r: string;
833
+ } | undefined;
834
+ buttonSelectColour?: {
835
+ b: string;
836
+ g: string;
837
+ kind: "hex";
838
+ r: string;
839
+ } | undefined;
840
+ buttonSelectTextColour?: {
841
+ b: string;
842
+ g: string;
843
+ kind: "hex";
844
+ r: string;
845
+ } | undefined;
846
+ buttonSelectBorderColour?: {
847
+ b: string;
848
+ g: string;
849
+ kind: "hex";
850
+ r: string;
851
+ } | undefined;
622
852
  } | undefined;
623
853
  } | null | undefined;
624
854
  }, {
@@ -727,6 +957,36 @@ export declare const bannerSchema: z.ZodObject<{
727
957
  kind: "hex";
728
958
  r: string;
729
959
  } | undefined;
960
+ buttonTextColour?: {
961
+ b: string;
962
+ g: string;
963
+ kind: "hex";
964
+ r: string;
965
+ } | undefined;
966
+ buttonBorderColour?: {
967
+ b: string;
968
+ g: string;
969
+ kind: "hex";
970
+ r: string;
971
+ } | undefined;
972
+ buttonSelectColour?: {
973
+ b: string;
974
+ g: string;
975
+ kind: "hex";
976
+ r: string;
977
+ } | undefined;
978
+ buttonSelectTextColour?: {
979
+ b: string;
980
+ g: string;
981
+ kind: "hex";
982
+ r: string;
983
+ } | undefined;
984
+ buttonSelectBorderColour?: {
985
+ b: string;
986
+ g: string;
987
+ kind: "hex";
988
+ r: string;
989
+ } | undefined;
730
990
  } | undefined;
731
991
  } | null | undefined;
732
992
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EACH,GAAG,EAEH,YAAY,EAEZ,cAAc,EAEd,QAAQ,EAEX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAA4B,MAAM,UAAU,CAAC;AAExE,eAAO,MAAM,mBAAmB,yDAAuD,CAAC;AAExF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAYD,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,mBAAmB;IAC/D,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAC3C,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC;AAEH,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,WAAW,CAAC;IAC5D,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/banner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EACH,GAAG,EAEH,YAAY,EAEZ,cAAc,EAEd,QAAQ,EAEX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAA4B,MAAM,UAAU,CAAC;AAExE,eAAO,MAAM,mBAAmB,yDAAuD,CAAC;AAExF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,MAAM,WAAW,aAAa;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAYD,MAAM,WAAW,WAAY,SAAQ,UAAU,CAAC,mBAAmB;IAC/D,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,oBAAoB,CAAC,EAAE,CAAC,cAAc,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1C,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;IAC3C,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC;AAEH,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,WAAW,CAAC;IAC5D,QAAQ,EAAE,QAAQ,CAAC;CACtB"}
@@ -51,6 +51,86 @@ export declare const configurableDesignSchema: z.ZodObject<{
51
51
  kind: "hex";
52
52
  r: string;
53
53
  }>>;
54
+ buttonTextColour: z.ZodOptional<z.ZodObject<{
55
+ r: z.ZodEffects<z.ZodString, string, string>;
56
+ g: z.ZodEffects<z.ZodString, string, string>;
57
+ b: z.ZodEffects<z.ZodString, string, string>;
58
+ kind: z.ZodLiteral<"hex">;
59
+ }, "strip", z.ZodTypeAny, {
60
+ b: string;
61
+ g: string;
62
+ kind: "hex";
63
+ r: string;
64
+ }, {
65
+ b: string;
66
+ g: string;
67
+ kind: "hex";
68
+ r: string;
69
+ }>>;
70
+ buttonBorderColour: z.ZodOptional<z.ZodObject<{
71
+ r: z.ZodEffects<z.ZodString, string, string>;
72
+ g: z.ZodEffects<z.ZodString, string, string>;
73
+ b: z.ZodEffects<z.ZodString, string, string>;
74
+ kind: z.ZodLiteral<"hex">;
75
+ }, "strip", z.ZodTypeAny, {
76
+ b: string;
77
+ g: string;
78
+ kind: "hex";
79
+ r: string;
80
+ }, {
81
+ b: string;
82
+ g: string;
83
+ kind: "hex";
84
+ r: string;
85
+ }>>;
86
+ buttonSelectColour: z.ZodOptional<z.ZodObject<{
87
+ r: z.ZodEffects<z.ZodString, string, string>;
88
+ g: z.ZodEffects<z.ZodString, string, string>;
89
+ b: z.ZodEffects<z.ZodString, string, string>;
90
+ kind: z.ZodLiteral<"hex">;
91
+ }, "strip", z.ZodTypeAny, {
92
+ b: string;
93
+ g: string;
94
+ kind: "hex";
95
+ r: string;
96
+ }, {
97
+ b: string;
98
+ g: string;
99
+ kind: "hex";
100
+ r: string;
101
+ }>>;
102
+ buttonSelectTextColour: z.ZodOptional<z.ZodObject<{
103
+ r: z.ZodEffects<z.ZodString, string, string>;
104
+ g: z.ZodEffects<z.ZodString, string, string>;
105
+ b: z.ZodEffects<z.ZodString, string, string>;
106
+ kind: z.ZodLiteral<"hex">;
107
+ }, "strip", z.ZodTypeAny, {
108
+ b: string;
109
+ g: string;
110
+ kind: "hex";
111
+ r: string;
112
+ }, {
113
+ b: string;
114
+ g: string;
115
+ kind: "hex";
116
+ r: string;
117
+ }>>;
118
+ buttonSelectBorderColour: z.ZodOptional<z.ZodObject<{
119
+ r: z.ZodEffects<z.ZodString, string, string>;
120
+ g: z.ZodEffects<z.ZodString, string, string>;
121
+ b: z.ZodEffects<z.ZodString, string, string>;
122
+ kind: z.ZodLiteral<"hex">;
123
+ }, "strip", z.ZodTypeAny, {
124
+ b: string;
125
+ g: string;
126
+ kind: "hex";
127
+ r: string;
128
+ }, {
129
+ b: string;
130
+ g: string;
131
+ kind: "hex";
132
+ r: string;
133
+ }>>;
54
134
  kind: z.ZodLiteral<"ChoiceCards">;
55
135
  }, "strip", z.ZodTypeAny, {
56
136
  kind: "ChoiceCards";
@@ -60,6 +140,36 @@ export declare const configurableDesignSchema: z.ZodObject<{
60
140
  kind: "hex";
61
141
  r: string;
62
142
  } | undefined;
143
+ buttonTextColour?: {
144
+ b: string;
145
+ g: string;
146
+ kind: "hex";
147
+ r: string;
148
+ } | undefined;
149
+ buttonBorderColour?: {
150
+ b: string;
151
+ g: string;
152
+ kind: "hex";
153
+ r: string;
154
+ } | undefined;
155
+ buttonSelectColour?: {
156
+ b: string;
157
+ g: string;
158
+ kind: "hex";
159
+ r: string;
160
+ } | undefined;
161
+ buttonSelectTextColour?: {
162
+ b: string;
163
+ g: string;
164
+ kind: "hex";
165
+ r: string;
166
+ } | undefined;
167
+ buttonSelectBorderColour?: {
168
+ b: string;
169
+ g: string;
170
+ kind: "hex";
171
+ r: string;
172
+ } | undefined;
63
173
  }, {
64
174
  kind: "ChoiceCards";
65
175
  buttonColour?: {
@@ -68,6 +178,36 @@ export declare const configurableDesignSchema: z.ZodObject<{
68
178
  kind: "hex";
69
179
  r: string;
70
180
  } | undefined;
181
+ buttonTextColour?: {
182
+ b: string;
183
+ g: string;
184
+ kind: "hex";
185
+ r: string;
186
+ } | undefined;
187
+ buttonBorderColour?: {
188
+ b: string;
189
+ g: string;
190
+ kind: "hex";
191
+ r: string;
192
+ } | undefined;
193
+ buttonSelectColour?: {
194
+ b: string;
195
+ g: string;
196
+ kind: "hex";
197
+ r: string;
198
+ } | undefined;
199
+ buttonSelectTextColour?: {
200
+ b: string;
201
+ g: string;
202
+ kind: "hex";
203
+ r: string;
204
+ } | undefined;
205
+ buttonSelectBorderColour?: {
206
+ b: string;
207
+ g: string;
208
+ kind: "hex";
209
+ r: string;
210
+ } | undefined;
71
211
  }>]>>;
72
212
  colours: z.ZodObject<{
73
213
  basic: z.ZodObject<{
@@ -192,6 +332,36 @@ export declare const configurableDesignSchema: z.ZodObject<{
192
332
  kind: "hex";
193
333
  r: string;
194
334
  } | undefined;
335
+ buttonTextColour?: {
336
+ b: string;
337
+ g: string;
338
+ kind: "hex";
339
+ r: string;
340
+ } | undefined;
341
+ buttonBorderColour?: {
342
+ b: string;
343
+ g: string;
344
+ kind: "hex";
345
+ r: string;
346
+ } | undefined;
347
+ buttonSelectColour?: {
348
+ b: string;
349
+ g: string;
350
+ kind: "hex";
351
+ r: string;
352
+ } | undefined;
353
+ buttonSelectTextColour?: {
354
+ b: string;
355
+ g: string;
356
+ kind: "hex";
357
+ r: string;
358
+ } | undefined;
359
+ buttonSelectBorderColour?: {
360
+ b: string;
361
+ g: string;
362
+ kind: "hex";
363
+ r: string;
364
+ } | undefined;
195
365
  } | undefined;
196
366
  }, {
197
367
  colours: {
@@ -224,6 +394,36 @@ export declare const configurableDesignSchema: z.ZodObject<{
224
394
  kind: "hex";
225
395
  r: string;
226
396
  } | undefined;
397
+ buttonTextColour?: {
398
+ b: string;
399
+ g: string;
400
+ kind: "hex";
401
+ r: string;
402
+ } | undefined;
403
+ buttonBorderColour?: {
404
+ b: string;
405
+ g: string;
406
+ kind: "hex";
407
+ r: string;
408
+ } | undefined;
409
+ buttonSelectColour?: {
410
+ b: string;
411
+ g: string;
412
+ kind: "hex";
413
+ r: string;
414
+ } | undefined;
415
+ buttonSelectTextColour?: {
416
+ b: string;
417
+ g: string;
418
+ kind: "hex";
419
+ r: string;
420
+ } | undefined;
421
+ buttonSelectBorderColour?: {
422
+ b: string;
423
+ g: string;
424
+ kind: "hex";
425
+ r: string;
426
+ } | undefined;
227
427
  } | undefined;
228
428
  }>;
229
429
  type HexChar = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F';
@@ -263,6 +463,11 @@ export interface BannerDesignImage extends BannerDesignHeaderImage {
263
463
  interface ChoiceCardsDesign {
264
464
  kind: 'ChoiceCards';
265
465
  buttonColour?: HexColour;
466
+ buttonTextColour?: HexColour;
467
+ buttonBorderColour?: HexColour;
468
+ buttonSelectColour?: HexColour;
469
+ buttonSelectTextColour?: HexColour;
470
+ buttonSelectBorderColour?: HexColour;
266
471
  }
267
472
  type Visual = BannerDesignImage | ChoiceCardsDesign;
268
473
  export interface ConfigurableDesign {
@@ -1 +1 @@
1
- {"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAazB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAK1B,CAAC;AAiBH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAC;AAEH,KAAK,OAAO,GACN,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AAEV,KAAK,QAAQ,GAAG,GAAG,OAAO,GAAG,OAAO,EAAE,CAAC;AAEvC,MAAM,WAAW,SAAS;IACtB,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,MAAO,SAAS,KAAG,MAA+B,CAAC;AAEjF,UAAU,cAAc;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,UAAU,YAAY;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,SAAS,CAAC;IAC1B,qBAAqB,EAAE,SAAS,CAAC;IACjC,UAAU,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAC9D,IAAI,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,iBAAiB;IACvB,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC5B;AACD,KAAK,MAAM,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,OAAO,EAAE;QACL,KAAK,EAAE;YACH,UAAU,EAAE,SAAS,CAAC;YACtB,QAAQ,EAAE,SAAS,CAAC;YACpB,UAAU,EAAE,SAAS,CAAC;YACtB,gBAAgB,EAAE,SAAS,CAAC;SAC/B,CAAC;QACF,eAAe,EAAE;YACb,IAAI,EAAE,SAAS,CAAC;YAChB,SAAS,EAAE,SAAS,CAAC;SACxB,CAAC;QACF,UAAU,EAAE,SAAS,CAAC;QACtB,YAAY,EAAE,SAAS,CAAC;QACxB,WAAW,EAAE,SAAS,CAAC;QACvB,eAAe,EAAE,eAAe,CAAC;QACjC,MAAM,EAAE,YAAY,CAAC;KACxB,CAAC;CACL"}
1
+ {"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAazB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAK1B,CAAC;AAsBH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAC;AAEH,KAAK,OAAO,GACN,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,CAAC;AAEV,KAAK,QAAQ,GAAG,GAAG,OAAO,GAAG,OAAO,EAAE,CAAC;AAEvC,MAAM,WAAW,SAAS;IACtB,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,iBAAiB,MAAO,SAAS,KAAG,MAA+B,CAAC;AAEjF,UAAU,cAAc;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;CACtB;AACD,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9D,UAAU,YAAY;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,SAAS,CAAC;IAC1B,qBAAqB,EAAE,SAAS,CAAC;IACjC,UAAU,EAAE,SAAS,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAC9D,IAAI,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,iBAAiB;IACvB,IAAI,EAAE,aAAa,CAAC;IACpB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC,wBAAwB,CAAC,EAAE,SAAS,CAAC;CACxC;AACD,KAAK,MAAM,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,OAAO,EAAE;QACL,KAAK,EAAE;YACH,UAAU,EAAE,SAAS,CAAC;YACtB,QAAQ,EAAE,SAAS,CAAC;YACpB,UAAU,EAAE,SAAS,CAAC;YACtB,gBAAgB,EAAE,SAAS,CAAC;SAC/B,CAAC;QACF,eAAe,EAAE;YACb,IAAI,EAAE,SAAS,CAAC;YAChB,SAAS,EAAE,SAAS,CAAC;SACxB,CAAC;QACF,UAAU,EAAE,SAAS,CAAC;QACtB,YAAY,EAAE,SAAS,CAAC;QACxB,WAAW,EAAE,SAAS,CAAC;QACvB,eAAe,EAAE,eAAe,CAAC;QACjC,MAAM,EAAE,YAAY,CAAC;KACxB,CAAC;CACL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/support-dotcom-components",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",