@socotra/ec-react-utils 2.14.1-next.1 → 2.14.1-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,3 +1,3 @@
1
- (function(O,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("zod")):typeof define=="function"&&define.amd?define(["exports","zod"],Y):(O=typeof globalThis<"u"?globalThis:O||self,Y(O.schemas={},O.zod))})(this,function(O,Y){"use strict";function Aa(r,t){return r-t*Math.floor(r/t)}const Yn=1721426;function Tr(r,t,a,n){t=_a(r,t);let i=t-1,o=-2;return a<=2?o=0:jr(t)&&(o=-1),Yn-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*a-362)/12+o+n)}function jr(r){return r%4===0&&(r%100!==0||r%400===0)}function _a(r,t){return r==="BC"?1-t:t}function sc(r){let t="AD";return r<=0&&(t="BC",r=1-r),[t,r]}const lc={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class We{fromJulianDay(t){let a=t,n=a-Yn,i=Math.floor(n/146097),o=Aa(n,146097),s=Math.floor(o/36524),l=Aa(o,36524),c=Math.floor(l/1461),u=Aa(l,1461),d=Math.floor(u/365),g=i*400+s*100+c*4+d+(s!==4&&d!==4?1:0),[f,b]=sc(g),h=a-Tr(f,b,1,1),y=2;a<Tr(f,b,3,1)?y=0:jr(b)&&(y=1);let C=Math.floor(((h+y)*12+373)/367),A=a-Tr(f,b,C,1)+1;return new Je(f,b,C,A)}toJulianDay(t){return Tr(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return lc[jr(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return jr(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}function Qn(r,t){return r.calendar.toJulianDay(r)-t.calendar.toJulianDay(t)}function cc(r,t){return Xn(r)-Xn(t)}function Xn(r){return r.hour*36e5+r.minute*6e4+r.second*1e3+r.millisecond}let wa=null;function Ea(){return wa==null&&(wa=new Intl.DateTimeFormat().resolvedOptions().timeZone),wa}function Ye(r){r=ue(r,new We);let t=_a(r.era,r.year);return Jn(t,r.month,r.day,r.hour,r.minute,r.second,r.millisecond)}function Jn(r,t,a,n,i,o,s){let l=new Date;return l.setUTCHours(n,i,o,s),l.setUTCFullYear(r,t-1,a),l.getTime()}function xa(r,t){if(t==="UTC")return 0;if(r>0&&t===Ea())return new Date(r).getTimezoneOffset()*-6e4;let{year:a,month:n,day:i,hour:o,minute:s,second:l}=ti(r,t);return Jn(a,n,i,o,s,l,0)-Math.floor(r/1e3)*1e3}const ei=new Map;function ti(r,t){let a=ei.get(t);a||(a=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),ei.set(t,a));let n=a.formatToParts(new Date(r)),i={};for(let o of n)o.type!=="literal"&&(i[o.type]=o.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const ri=864e5;function uc(r,t,a,n){return(a===n?[a]:[a,n]).filter(o=>dc(r,t,o))}function dc(r,t,a){let n=ti(a,t);return r.year===n.year&&r.month===n.month&&r.day===n.day&&r.hour===n.hour&&r.minute===n.minute&&r.second===n.second}function ye(r,t,a="compatible"){let n=Qe(r);if(t==="UTC")return Ye(n);if(t===Ea()&&a==="compatible"){n=ue(n,new We);let c=new Date,u=_a(n.era,n.year);return c.setFullYear(u,n.month-1,n.day),c.setHours(n.hour,n.minute,n.second,n.millisecond),c.getTime()}let i=Ye(n),o=xa(i-ri,t),s=xa(i+ri,t),l=uc(n,t,i-o,i-s);if(l.length===1)return l[0];if(l.length>1)switch(a){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(a){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function ai(r,t,a="compatible"){return new Date(ye(r,t,a))}function xe(r,t){let a=xa(r,t),n=new Date(r+a),i=n.getUTCFullYear(),o=n.getUTCMonth()+1,s=n.getUTCDate(),l=n.getUTCHours(),c=n.getUTCMinutes(),u=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new et(i<1?"BC":"AD",i<1?-i+1:i,o,s,t,a,l,c,u,d)}function ni(r){return new Je(r.calendar,r.era,r.year,r.month,r.day)}function Qe(r,t){let a=0,n=0,i=0,o=0;if("timeZone"in r)({hour:a,minute:n,second:i,millisecond:o}=r);else if("hour"in r&&!t)return r;return t&&({hour:a,minute:n,second:i,millisecond:o}=t),new Er(r.calendar,r.era,r.year,r.month,r.day,a,n,i,o)}function ue(r,t){if(r.calendar.identifier===t.identifier)return r;let a=t.fromJulianDay(r.calendar.toJulianDay(r)),n=r.copy();return n.calendar=t,n.era=a.era,n.year=a.year,n.month=a.month,n.day=a.day,Me(n),n}function pc(r,t,a){if(r instanceof et)return r.timeZone===t?r:ii(r,t);let n=ye(r,t,a);return xe(n,t)}function gc(r){let t=Ye(r)-r.offset;return new Date(t)}function ii(r,t){let a=Ye(r)-r.offset;return ue(xe(a,t),r.calendar)}const Ct=36e5;function Ar(r,t){let a=r.copy(),n="hour"in a?hc(a,t):0;$a(a,t.years||0),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,r),a.month+=t.months||0,Sa(a),oi(a),a.day+=(t.weeks||0)*7,a.day+=t.days||0,a.day+=n,mc(a),a.calendar.balanceDate&&a.calendar.balanceDate(a),a.year<1&&(a.year=1,a.month=1,a.day=1);let i=a.calendar.getYearsInEra(a);if(a.year>i){var o,s;let c=(o=(s=a.calendar).isInverseEra)===null||o===void 0?void 0:o.call(s,a);a.year=i,a.month=c?1:a.calendar.getMonthsInYear(a),a.day=c?1:a.calendar.getDaysInMonth(a)}a.month<1&&(a.month=1,a.day=1);let l=a.calendar.getMonthsInYear(a);return a.month>l&&(a.month=l,a.day=a.calendar.getDaysInMonth(a)),a.day=Math.max(1,Math.min(a.calendar.getDaysInMonth(a),a.day)),a}function $a(r,t){var a,n;!((a=(n=r.calendar).isInverseEra)===null||a===void 0)&&a.call(n,r)&&(t=-t),r.year+=t}function Sa(r){for(;r.month<1;)$a(r,-1),r.month+=r.calendar.getMonthsInYear(r);let t=0;for(;r.month>(t=r.calendar.getMonthsInYear(r));)r.month-=t,$a(r,1)}function mc(r){for(;r.day<1;)r.month--,Sa(r),r.day+=r.calendar.getDaysInMonth(r);for(;r.day>r.calendar.getDaysInMonth(r);)r.day-=r.calendar.getDaysInMonth(r),r.month++,Sa(r)}function oi(r){r.month=Math.max(1,Math.min(r.calendar.getMonthsInYear(r),r.month)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day))}function Me(r){r.calendar.constrainDate&&r.calendar.constrainDate(r),r.year=Math.max(1,Math.min(r.calendar.getYearsInEra(r),r.year)),oi(r)}function si(r){let t={};for(let a in r)typeof r[a]=="number"&&(t[a]=-r[a]);return t}function li(r,t){return Ar(r,si(t))}function La(r,t){let a=r.copy();return t.era!=null&&(a.era=t.era),t.year!=null&&(a.year=t.year),t.month!=null&&(a.month=t.month),t.day!=null&&(a.day=t.day),Me(a),a}function _r(r,t){let a=r.copy();return t.hour!=null&&(a.hour=t.hour),t.minute!=null&&(a.minute=t.minute),t.second!=null&&(a.second=t.second),t.millisecond!=null&&(a.millisecond=t.millisecond),yc(a),a}function fc(r){r.second+=Math.floor(r.millisecond/1e3),r.millisecond=wr(r.millisecond,1e3),r.minute+=Math.floor(r.second/60),r.second=wr(r.second,60),r.hour+=Math.floor(r.minute/60),r.minute=wr(r.minute,60);let t=Math.floor(r.hour/24);return r.hour=wr(r.hour,24),t}function yc(r){r.millisecond=Math.max(0,Math.min(r.millisecond,1e3)),r.second=Math.max(0,Math.min(r.second,59)),r.minute=Math.max(0,Math.min(r.minute,59)),r.hour=Math.max(0,Math.min(r.hour,23))}function wr(r,t){let a=r%t;return a<0&&(a+=t),a}function hc(r,t){return r.hour+=t.hours||0,r.minute+=t.minutes||0,r.second+=t.seconds||0,r.millisecond+=t.milliseconds||0,fc(r)}function Ca(r,t,a,n){let i=r.copy();switch(t){case"era":{let l=r.calendar.getEras(),c=l.indexOf(r.era);if(c<0)throw new Error("Invalid era: "+r.era);c=he(c,a,0,l.length-1,n==null?void 0:n.round),i.era=l[c],Me(i);break}case"year":var o,s;!((o=(s=i.calendar).isInverseEra)===null||o===void 0)&&o.call(s,i)&&(a=-a),i.year=he(r.year,a,-1/0,9999,n==null?void 0:n.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,r);break;case"month":i.month=he(r.month,a,1,r.calendar.getMonthsInYear(r),n==null?void 0:n.round);break;case"day":i.day=he(r.day,a,1,r.calendar.getDaysInMonth(r),n==null?void 0:n.round);break;default:throw new Error("Unsupported field "+t)}return r.calendar.balanceDate&&r.calendar.balanceDate(i),Me(i),i}function ci(r,t,a,n){let i=r.copy();switch(t){case"hour":{let o=r.hour,s=0,l=23;if((n==null?void 0:n.hourCycle)===12){let c=o>=12;s=c?12:0,l=c?23:11}i.hour=he(o,a,s,l,n==null?void 0:n.round);break}case"minute":i.minute=he(r.minute,a,0,59,n==null?void 0:n.round);break;case"second":i.second=he(r.second,a,0,59,n==null?void 0:n.round);break;case"millisecond":i.millisecond=he(r.millisecond,a,0,999,n==null?void 0:n.round);break;default:throw new Error("Unsupported field "+t)}return i}function he(r,t,a,n,i=!1){if(i){r+=Math.sign(t),r<a&&(r=n);let o=Math.abs(t);t>0?r=Math.ceil(r/o)*o:r=Math.floor(r/o)*o,r>n&&(r=a)}else r+=t,r<a?r=n-(a-r-1):r>n&&(r=a+(r-n-1));return r}function ui(r,t){let a;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=Ar(Qe(r),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});a=ye(i,r.timeZone)}else a=Ye(r)-r.offset;a+=t.milliseconds||0,a+=(t.seconds||0)*1e3,a+=(t.minutes||0)*6e4,a+=(t.hours||0)*36e5;let n=xe(a,r.timeZone);return ue(n,r.calendar)}function bc(r,t){return ui(r,si(t))}function vc(r,t,a,n){switch(t){case"hour":{let i=0,o=23;if((n==null?void 0:n.hourCycle)===12){let h=r.hour>=12;i=h?12:0,o=h?23:11}let s=Qe(r),l=ue(_r(s,{hour:i}),new We),c=[ye(l,r.timeZone,"earlier"),ye(l,r.timeZone,"later")].filter(h=>xe(h,r.timeZone).day===l.day)[0],u=ue(_r(s,{hour:o}),new We),d=[ye(u,r.timeZone,"earlier"),ye(u,r.timeZone,"later")].filter(h=>xe(h,r.timeZone).day===u.day).pop(),g=Ye(r)-r.offset,f=Math.floor(g/Ct),b=g%Ct;return g=he(f,a,Math.floor(c/Ct),Math.floor(d/Ct),n==null?void 0:n.round)*Ct+b,ue(xe(g,r.timeZone),r.calendar)}case"minute":case"second":case"millisecond":return ci(r,t,a,n);case"era":case"year":case"month":case"day":{let i=Ca(Qe(r),t,a,n),o=ye(i,r.timeZone);return ue(xe(o,r.timeZone),r.calendar)}default:throw new Error("Unsupported field "+t)}}function Tc(r,t,a){let n=Qe(r),i=_r(La(n,t),t);if(i.compare(n)===0)return r;let o=ye(i,r.timeZone,a);return ue(xe(o,r.timeZone),r.calendar)}const jc=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Ac=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function ka(r){let t=r.match(jc);if(!t)throw new Error("Invalid ISO 8601 date string: "+r);let a=new Je(J(t[1],0,9999),J(t[2],1,12),1);return a.day=J(t[3],0,a.calendar.getDaysInMonth(a)),a}function Xe(r,t){let a=r.match(Ac);if(!a)throw new Error("Invalid ISO 8601 date time string: "+r);let n=J(a[1],-9999,9999),i=n<1?"BC":"AD",o=new et(i,n<1?-n+1:n,J(a[2],1,12),1,t,0,a[4]?J(a[4],0,23):0,a[5]?J(a[5],0,59):0,a[6]?J(a[6],0,59):0,a[7]?J(a[7],0,1/0)*1e3:0);o.day=J(a[3],0,o.calendar.getDaysInMonth(o));var s;return a[8]&&(o.offset=J(a[8],-23,23)*36e5+J((s=a[9])!==null&&s!==void 0?s:"0",0,59)*6e4),ii(o,t)}function J(r,t,a){let n=Number(r);if(n<t||n>a)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${a}`);return n}function _c(r){return`${String(r.hour).padStart(2,"0")}:${String(r.minute).padStart(2,"0")}:${String(r.second).padStart(2,"0")}${r.millisecond?String(r.millisecond/1e3).slice(1):""}`}function di(r){let t=ue(r,new We),a;return t.era==="BC"?a=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):a=String(t.year).padStart(4,"0"),`${a}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function pi(r){return`${di(r)}T${_c(r)}`}function wc(r){let t=Math.sign(r)<0?"-":"+";r=Math.abs(r);let a=Math.floor(r/36e5),n=r%36e5/6e4;return`${t}${String(a).padStart(2,"0")}:${String(n).padStart(2,"0")}`}function Ec(r){return`${pi(r)}${wc(r.offset)}[${r.timeZone}]`}function xc(r,t){if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pa(r,t,a){xc(r,t),t.set(r,a)}function Da(r){let t=typeof r[0]=="object"?r.shift():new We,a;if(typeof r[0]=="string")a=r.shift();else{let s=t.getEras();a=s[s.length-1]}let n=r.shift(),i=r.shift(),o=r.shift();return[t,a,n,i,o]}var $c=new WeakMap;class Je{copy(){return this.era?new Je(this.calendar,this.era,this.year,this.month,this.day):new Je(this.calendar,this.year,this.month,this.day)}add(t){return Ar(this,t)}subtract(t){return li(this,t)}set(t){return La(this,t)}cycle(t,a,n){return Ca(this,t,a,n)}toDate(t){return ai(this,t)}toString(){return di(this)}compare(t){return Qn(this,t)}constructor(...t){Pa(this,$c,{writable:!0,value:void 0});let[a,n,i,o,s]=Da(t);this.calendar=a,this.era=n,this.year=i,this.month=o,this.day=s,Me(this)}}var Sc=new WeakMap;class Er{copy(){return this.era?new Er(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Er(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Ar(this,t)}subtract(t){return li(this,t)}set(t){return La(_r(this,t),t)}cycle(t,a,n){switch(t){case"era":case"year":case"month":case"day":return Ca(this,t,a,n);default:return ci(this,t,a,n)}}toDate(t,a){return ai(this,t,a)}toString(){return pi(this)}compare(t){let a=Qn(this,t);return a===0?cc(this,Qe(t)):a}constructor(...t){Pa(this,Sc,{writable:!0,value:void 0});let[a,n,i,o,s]=Da(t);this.calendar=a,this.era=n,this.year=i,this.month=o,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Me(this)}}var Lc=new WeakMap;class et{copy(){return this.era?new et(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new et(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return ui(this,t)}subtract(t){return bc(this,t)}set(t,a){return Tc(this,t,a)}cycle(t,a,n){return vc(this,t,a,n)}toDate(){return gc(this)}toString(){return Ec(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-pc(t,this.timeZone).toDate().getTime()}constructor(...t){Pa(this,Lc,{writable:!0,value:void 0});let[a,n,i,o,s]=Da(t),l=t.shift(),c=t.shift();this.calendar=a,this.era=n,this.year=i,this.month=o,this.day=s,this.timeZone=l,this.offset=c,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Me(this)}}var xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ee(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Cc=Array.isArray,V=Cc;const Oa=ee(V);var kc=typeof xr=="object"&&xr&&xr.Object===Object&&xr,gi=kc,Pc=gi,Dc=typeof self=="object"&&self&&self.Object===Object&&self,Oc=Pc||Dc||Function("return this")(),de=Oc,Nc=de,Ic=Nc.Symbol,tt=Ic,mi=tt,fi=Object.prototype,Bc=fi.hasOwnProperty,Mc=fi.toString,kt=mi?mi.toStringTag:void 0;function Rc(r){var t=Bc.call(r,kt),a=r[kt];try{r[kt]=void 0;var n=!0}catch{}var i=Mc.call(r);return n&&(t?r[kt]=a:delete r[kt]),i}var qc=Rc,Fc=Object.prototype,Uc=Fc.toString;function Zc(r){return Uc.call(r)}var Gc=Zc,yi=tt,Kc=qc,zc=Gc,Vc="[object Null]",Hc="[object Undefined]",hi=yi?yi.toStringTag:void 0;function Wc(r){return r==null?r===void 0?Hc:Vc:hi&&hi in Object(r)?Kc(r):zc(r)}var rt=Wc;function Yc(r){return r!=null&&typeof r=="object"}var be=Yc,Qc=rt,Xc=be,Jc="[object Symbol]";function eu(r){return typeof r=="symbol"||Xc(r)&&Qc(r)==Jc}var Na=eu,tu=V,ru=Na,au=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nu=/^\w*$/;function iu(r,t){if(tu(r))return!1;var a=typeof r;return a=="number"||a=="symbol"||a=="boolean"||r==null||ru(r)?!0:nu.test(r)||!au.test(r)||t!=null&&r in Object(t)}var Ia=iu;function ou(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var te=ou;const Ba=ee(te);var su=rt,lu=te,cu="[object AsyncFunction]",uu="[object Function]",du="[object GeneratorFunction]",pu="[object Proxy]";function gu(r){if(!lu(r))return!1;var t=su(r);return t==uu||t==du||t==cu||t==pu}var $r=gu,mu=de,fu=mu["__core-js_shared__"],yu=fu,Ma=yu,bi=function(){var r=/[^.]+$/.exec(Ma&&Ma.keys&&Ma.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function hu(r){return!!bi&&bi in r}var bu=hu,vu=Function.prototype,Tu=vu.toString;function ju(r){if(r!=null){try{return Tu.call(r)}catch{}try{return r+""}catch{}}return""}var vi=ju,Au=$r,_u=bu,wu=te,Eu=vi,xu=/[\\^$.*+?()[\]{}|]/g,$u=/^\[object .+?Constructor\]$/,Su=Function.prototype,Lu=Object.prototype,Cu=Su.toString,ku=Lu.hasOwnProperty,Pu=RegExp("^"+Cu.call(ku).replace(xu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Du(r){if(!wu(r)||_u(r))return!1;var t=Au(r)?Pu:$u;return t.test(Eu(r))}var Ou=Du;function Nu(r,t){return r==null?void 0:r[t]}var Iu=Nu,Bu=Ou,Mu=Iu;function Ru(r,t){var a=Mu(r,t);return Bu(a)?a:void 0}var Re=Ru,qu=Re,Fu=qu(Object,"create"),Sr=Fu,Ti=Sr;function Uu(){this.__data__=Ti?Ti(null):{},this.size=0}var Zu=Uu;function Gu(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Ku=Gu,zu=Sr,Vu="__lodash_hash_undefined__",Hu=Object.prototype,Wu=Hu.hasOwnProperty;function Yu(r){var t=this.__data__;if(zu){var a=t[r];return a===Vu?void 0:a}return Wu.call(t,r)?t[r]:void 0}var Qu=Yu,Xu=Sr,Ju=Object.prototype,ed=Ju.hasOwnProperty;function td(r){var t=this.__data__;return Xu?t[r]!==void 0:ed.call(t,r)}var rd=td,ad=Sr,nd="__lodash_hash_undefined__";function id(r,t){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=ad&&t===void 0?nd:t,this}var od=id,sd=Zu,ld=Ku,cd=Qu,ud=rd,dd=od;function at(r){var t=-1,a=r==null?0:r.length;for(this.clear();++t<a;){var n=r[t];this.set(n[0],n[1])}}at.prototype.clear=sd,at.prototype.delete=ld,at.prototype.get=cd,at.prototype.has=ud,at.prototype.set=dd;var pd=at;function gd(){this.__data__=[],this.size=0}var md=gd;function fd(r,t){return r===t||r!==r&&t!==t}var Pt=fd,yd=Pt;function hd(r,t){for(var a=r.length;a--;)if(yd(r[a][0],t))return a;return-1}var Lr=hd,bd=Lr,vd=Array.prototype,Td=vd.splice;function jd(r){var t=this.__data__,a=bd(t,r);if(a<0)return!1;var n=t.length-1;return a==n?t.pop():Td.call(t,a,1),--this.size,!0}var Ad=jd,_d=Lr;function wd(r){var t=this.__data__,a=_d(t,r);return a<0?void 0:t[a][1]}var Ed=wd,xd=Lr;function $d(r){return xd(this.__data__,r)>-1}var Sd=$d,Ld=Lr;function Cd(r,t){var a=this.__data__,n=Ld(a,r);return n<0?(++this.size,a.push([r,t])):a[n][1]=t,this}var kd=Cd,Pd=md,Dd=Ad,Od=Ed,Nd=Sd,Id=kd;function nt(r){var t=-1,a=r==null?0:r.length;for(this.clear();++t<a;){var n=r[t];this.set(n[0],n[1])}}nt.prototype.clear=Pd,nt.prototype.delete=Dd,nt.prototype.get=Od,nt.prototype.has=Nd,nt.prototype.set=Id;var Cr=nt,Bd=Re,Md=de,Rd=Bd(Md,"Map"),Ra=Rd,ji=pd,qd=Cr,Fd=Ra;function Ud(){this.size=0,this.__data__={hash:new ji,map:new(Fd||qd),string:new ji}}var Zd=Ud;function Gd(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Kd=Gd,zd=Kd;function Vd(r,t){var a=r.__data__;return zd(t)?a[typeof t=="string"?"string":"hash"]:a.map}var kr=Vd,Hd=kr;function Wd(r){var t=Hd(this,r).delete(r);return this.size-=t?1:0,t}var Yd=Wd,Qd=kr;function Xd(r){return Qd(this,r).get(r)}var Jd=Xd,ep=kr;function tp(r){return ep(this,r).has(r)}var rp=tp,ap=kr;function np(r,t){var a=ap(this,r),n=a.size;return a.set(r,t),this.size+=a.size==n?0:1,this}var ip=np,op=Zd,sp=Yd,lp=Jd,cp=rp,up=ip;function it(r){var t=-1,a=r==null?0:r.length;for(this.clear();++t<a;){var n=r[t];this.set(n[0],n[1])}}it.prototype.clear=op,it.prototype.delete=sp,it.prototype.get=lp,it.prototype.has=cp,it.prototype.set=up;var qa=it,Ai=qa,dp="Expected a function";function Fa(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError(dp);var a=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=a.cache;if(o.has(i))return o.get(i);var s=r.apply(this,n);return a.cache=o.set(i,s)||o,s};return a.cache=new(Fa.Cache||Ai),a}Fa.Cache=Ai;var pp=Fa,gp=pp,mp=500;function fp(r){var t=gp(r,function(n){return a.size===mp&&a.clear(),n}),a=t.cache;return t}var yp=fp,hp=yp,bp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vp=/\\(\\)?/g,Tp=hp(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(bp,function(a,n,i,o){t.push(i?o.replace(vp,"$1"):n||a)}),t}),jp=Tp;function Ap(r,t){for(var a=-1,n=r==null?0:r.length,i=Array(n);++a<n;)i[a]=t(r[a],a,r);return i}var _i=Ap,wi=tt,_p=_i,wp=V,Ep=Na,xp=1/0,Ei=wi?wi.prototype:void 0,xi=Ei?Ei.toString:void 0;function $i(r){if(typeof r=="string")return r;if(wp(r))return _p(r,$i)+"";if(Ep(r))return xi?xi.call(r):"";var t=r+"";return t=="0"&&1/r==-xp?"-0":t}var $p=$i,Sp=$p;function Lp(r){return r==null?"":Sp(r)}var Cp=Lp,kp=V,Pp=Ia,Dp=jp,Op=Cp;function Np(r,t){return kp(r)?r:Pp(r,t)?[r]:Dp(Op(r))}var ot=Np,Ip=Na,Bp=1/0;function Mp(r){if(typeof r=="string"||Ip(r))return r;var t=r+"";return t=="0"&&1/r==-Bp?"-0":t}var st=Mp,Rp=ot,qp=st;function Fp(r,t){t=Rp(t,r);for(var a=0,n=t.length;r!=null&&a<n;)r=r[qp(t[a++])];return a&&a==n?r:void 0}var Pr=Fp,Up=Pr;function Zp(r,t,a){var n=r==null?void 0:Up(r,t);return n===void 0?a:n}var Si=Zp;const K=ee(Si);var Li=(r=>(r.MultiSelect="multiselect",r))(Li||{});const Ci=r=>{const{data:t,scope:a,timezone:n=Ea(),dataTypes:i,rootDisplayName:o,ignoreConstraints:s=!1,account:l,evaluatedConstraints:c,quote:u,transactionElement:d,element:g,customDataTypeKey:f,truthyLabel:b="True",falsyLabel:h="False"}=r,y=[];let C={};const A=Object.fromEntries(Object.entries(t??{}).filter(([,S])=>{var X;const D=(X=S.scope)==null?void 0:X.split(",").map(Ee=>Ee.trim());return!!(!D||a.some(Ee=>D.includes(Ee)))}).map(([S,D])=>{var Gl,Kl,zl,Vl,Hl,Wl,Yl,Ql,Xl,Jl,ec,tc,rc,ac,nc,ic,oc;let X=!1,Ee=!1,ya=!1,ha=!1;const Ul=D.displayName??S,eC=(Gl=D.type)==null?void 0:Gl.slice(-1),ba=D.maxLength,va=D.minLength,Ta=D.max,ja=D.min,Wn=D.constraint,Zl=D.regex;let B=D.type??"",$t;switch(eC){case"*":Ee=!0,X=!0,B=B==null?void 0:B.split("*")[0];break;case"?":B=B==null?void 0:B.split("?")[0],X=!0;break;case"+":Ee=!0,B=B==null?void 0:B.split("+")[0];break;case"!":B=B==null?void 0:B.split("!")[0];break}switch(B){case"string":B="string";break;case"int":case"long":B="integer";break;case"decimal":B="number";break;case"datetime":B="string",$t="date-time",ha=!0;break;case"date":B="string",$t="date",ha=!0;break;case"boolean":case"bool":B="boolean";break;default:ya=!0;break}if(Wn&&c&&!s){const ce=f?K(c,[(g==null?void 0:g.locator)??"",`${f}.${S}`]):K(c,`${g==null?void 0:g.locator}.${S}`),Be=f?K(c,[(u==null?void 0:u.locator)??"",`${f}.${S}`]):K(c,`${u==null?void 0:u.locator}.${S}`),Lt=f?K(c,[(d==null?void 0:d.staticLocator)??"",`${f}.${S}`]):K(c,`${d==null?void 0:d.staticLocator}.${S}`);g&&ce&&(D.options=ce),u&&Be&&(D.options=Be),d&&Lt&&(D.options=Lt)}if(!X&&!ya&&y.push(S),ya){const ce=i==null?void 0:i[B];if(ce){let Be=Ee?[]:{};const Lt=Ci({data:ce.data??{},scope:a,dataTypes:i,ignoreConstraints:s,evaluatedConstraints:c,rootDisplayName:D.displayName??ce.displayName??S,customDataTypeKey:S,quote:u,account:l,element:g,transactionElement:d,truthyLabel:b,falsyLabel:h});return u&&(zl=(Kl=u.element)==null?void 0:Kl.data)!=null&&zl[S]&&(Be=(Hl=(Vl=u.element)==null?void 0:Vl.data)==null?void 0:Hl[S]),g&&(Wl=g==null?void 0:g.data)!=null&&Wl[S]&&(Be=(Yl=g==null?void 0:g.data)==null?void 0:Yl[S]),l&&(Ql=l==null?void 0:l.data)!=null&&Ql[S]&&(Be=(Xl=l==null?void 0:l.data)==null?void 0:Xl[S]),Object.entries(Lt.definitions??{}).forEach(([tC,rC])=>{C={...C,[tC]:rC}}),Lt.definitions={},C={...C,[`${B}`]:Lt},Ee?[S,{title:D.displayName??ce.displayName??S,type:"array",default:Be,items:{$ref:`#/definitions/${B}`},...!X&&{minItems:1}}]:[S,{title:ce.displayName??S,default:Be,$ref:`#/definitions/${B}`}]}}let St="";if(l){const ce=(l==null?void 0:l.accountState)==="validated"?S.charAt(0).toLowerCase()+S.slice(1):S;St=(Jl=l==null?void 0:l.data)!=null&&Jl[ce]?(ec=l==null?void 0:l.data)==null?void 0:ec[ce]:B==="boolean"?!!D.defaultValue:D.defaultValue}return u&&(St=(rc=(tc=u.element)==null?void 0:tc.data)!=null&&rc[S]?(nc=(ac=u.element)==null?void 0:ac.data)==null?void 0:nc[S]:B==="boolean"?!!D.defaultValue:D.defaultValue),g&&(St=(ic=g==null?void 0:g.data)!=null&&ic[S]?(oc=g==null?void 0:g.data)==null?void 0:oc[S]:B==="boolean"?!!D.defaultValue:D.defaultValue),Ee?[S,{title:Ul,type:"array",default:St,...D.tag?D.tag.includes("multiselect")&&!ya&&{uniqueItems:!0}:{},items:{type:B,...ba&&{maxLength:ba},...va&&{minLength:va},...ja&&{min:ja},...Ta&&{max:Ta},...$t&&{format:$t},...Zl&&{pattern:D.regex},...D.options&&{enum:D.options},...ha&&{timezone:n}},...!X&&{minItems:1}}]:[S,{title:Ul,type:B,...St&&{default:St},...va&&{minLength:va},...ba&&{maxLength:ba},...ja&&{minimum:parseInt(ja)},...Ta&&{maximum:parseInt(Ta)},...$t&&{format:$t},...D.options&&{enum:D.options},...Zl&&{pattern:D.regex},...ha&&{timezone:n},...B==="boolean"&&{boolean:[{value:"true",label:b},{value:"false",label:h}]},...Wn&&!s&&{constraint:Wn}}]}));return{title:o||"",type:"object",definitions:C,required:y,properties:A}};class Gp{add(t,a,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],a&&this[i][n?"unshift":"push"](a)},this)}run(t,a){this[t]=this[t]||[],this[t].forEach(function(n){n.call(a&&a.context?a.context:a,a)})}}class Kp{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];a.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class p{static get version(){return"1.3.9"}static toString(){return"JavaScript Expression Parser (JSEP) v"+p.version}static addUnaryOp(t){return p.max_unop_len=Math.max(t.length,p.max_unop_len),p.unary_ops[t]=1,p}static addBinaryOp(t,a,n){return p.max_binop_len=Math.max(t.length,p.max_binop_len),p.binary_ops[t]=a,n?p.right_associative.add(t):p.right_associative.delete(t),p}static addIdentifierChar(t){return p.additional_identifier_chars.add(t),p}static addLiteral(t,a){return p.literals[t]=a,p}static removeUnaryOp(t){return delete p.unary_ops[t],t.length===p.max_unop_len&&(p.max_unop_len=p.getMaxKeyLen(p.unary_ops)),p}static removeAllUnaryOps(){return p.unary_ops={},p.max_unop_len=0,p}static removeIdentifierChar(t){return p.additional_identifier_chars.delete(t),p}static removeBinaryOp(t){return delete p.binary_ops[t],t.length===p.max_binop_len&&(p.max_binop_len=p.getMaxKeyLen(p.binary_ops)),p.right_associative.delete(t),p}static removeAllBinaryOps(){return p.binary_ops={},p.max_binop_len=0,p}static removeLiteral(t){return delete p.literals[t],p}static removeAllLiterals(){return p.literals={},p}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new p(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(a=>a.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return p.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!p.binary_ops[String.fromCharCode(t)]||p.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return p.isIdentifierStart(t)||p.isDecimalDigit(t)}throwError(t){const a=new Error(t+" at character "+this.index);throw a.index=this.index,a.description=t,a}runHook(t,a){if(p.hooks[t]){const n={context:this,node:a};return p.hooks.run(t,n),n.node}return a}searchHook(t){if(p.hooks[t]){const a={context:this};return p.hooks[t].find(function(n){return n.call(a.context,a),a.node}),a.node}}gobbleSpaces(){let t=this.code;for(;t===p.SPACE_CODE||t===p.TAB_CODE||t===p.LF_CODE||t===p.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),a=t.length===1?t[0]:{type:p.COMPOUND,body:t};return this.runHook("after-all",a)}gobbleExpressions(t){let a=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===p.SEMCOL_CODE||n===p.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())a.push(i);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return a}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,p.max_binop_len),a=t.length;for(;a>0;){if(p.binary_ops.hasOwnProperty(t)&&(!p.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!p.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=a,t;t=t.substr(0,--a)}return!1}gobbleBinaryExpression(){let t,a,n,i,o,s,l,c,u;if(s=this.gobbleToken(),!s||(a=this.gobbleBinaryOp(),!a))return s;for(o={value:a,prec:p.binaryPrecedence(a),right_a:p.right_associative.has(a)},l=this.gobbleToken(),l||this.throwError("Expected expression after "+a),i=[s,o,l];a=this.gobbleBinaryOp();){if(n=p.binaryPrecedence(a),n===0){this.index-=a.length;break}o={value:a,prec:n,right_a:p.right_associative.has(a)},u=a;const d=g=>o.right_a&&g.right_a?n>g.prec:n<=g.prec;for(;i.length>2&&d(i[i.length-2]);)l=i.pop(),a=i.pop().value,s=i.pop(),t={type:p.BINARY_EXP,operator:a,left:s,right:l},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),i.push(o,t)}for(c=i.length-1,t=i[c];c>1;)t={type:p.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:t},c-=2;return t}gobbleToken(){let t,a,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,p.isDecimalDigit(t)||t===p.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===p.SQUOTE_CODE||t===p.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===p.OBRACK_CODE)i=this.gobbleArray();else{for(a=this.expr.substr(this.index,p.max_unop_len),n=a.length;n>0;){if(p.unary_ops.hasOwnProperty(a)&&(!p.isIdentifierStart(this.code)||this.index+a.length<this.expr.length&&!p.isIdentifierPart(this.expr.charCodeAt(this.index+a.length)))){this.index+=n;const o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:p.UNARY_EXP,operator:a,argument:o,prefix:!0})}a=a.substr(0,--n)}p.isIdentifierStart(t)?(i=this.gobbleIdentifier(),p.literals.hasOwnProperty(i.name)?i={type:p.LITERAL,value:p.literals[i.name],raw:i.name}:i.name===p.this_str&&(i={type:p.THIS_EXP})):t===p.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let a=this.code;for(;a===p.PERIOD_CODE||a===p.OBRACK_CODE||a===p.OPAREN_CODE||a===p.QUMARK_CODE;){let n;if(a===p.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==p.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),a=this.code}this.index++,a===p.OBRACK_CODE?(t={type:p.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),a=this.code,a!==p.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):a===p.OPAREN_CODE?t={type:p.CALL_EXP,arguments:this.gobbleArguments(p.CPAREN_CODE),callee:t}:(a===p.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:p.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),a=this.code}return t}gobbleNumericLiteral(){let t="",a,n;for(;p.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===p.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);p.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(a=this.char,a==="e"||a==="E"){for(t+=this.expr.charAt(this.index++),a=this.char,(a==="+"||a==="-")&&(t+=this.expr.charAt(this.index++));p.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);p.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return n=this.code,p.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(n===p.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===p.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:p.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const a=this.index,n=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===n){i=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
2
- `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:p.LITERAL,value:t,raw:this.expr.substring(a,this.index)}}gobbleIdentifier(){let t=this.code,a=this.index;for(p.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,p.isIdentifierPart(t));)this.index++;return{type:p.IDENTIFIER,name:this.expr.slice(a,this.index)}}gobbleArguments(t){const a=[];let n=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){n=!0,this.index++,t===p.CPAREN_CODE&&i&&i>=a.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(o===p.COMMA_CODE){if(this.index++,i++,i!==a.length){if(t===p.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===p.CBRACK_CODE)for(let s=a.length;s<i;s++)a.push(null)}}else if(a.length!==i&&i!==0)this.throwError("Expected comma");else{const s=this.gobbleExpression();(!s||s.type===p.COMPOUND)&&this.throwError("Expected comma"),a.push(s)}}return n||this.throwError("Expected "+String.fromCharCode(t)),a}gobbleGroup(){this.index++;let t=this.gobbleExpressions(p.CPAREN_CODE);if(this.code===p.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:p.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:p.ARRAY_EXP,elements:this.gobbleArguments(p.CBRACK_CODE)}}}const zp=new Gp;Object.assign(p,{hooks:zp,plugins:new Kp(p),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),p.max_unop_len=p.getMaxKeyLen(p.unary_ops),p.max_binop_len=p.getMaxKeyLen(p.binary_ops);const ve=r=>new p(r).parse(),Vp=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(p).filter(r=>!Vp.includes(r)&&ve[r]===void 0).forEach(r=>{ve[r]=p[r]}),ve.Jsep=p;const Hp="ConditionalExpression";var Wp={name:"ternary",init(r){r.hooks.add("after-expression",function(a){if(a.node&&this.code===r.QUMARK_CODE){this.index++;const n=a.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===r.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),a.node={type:Hp,test:n,consequent:i,alternate:o},n.operator&&r.binary_ops[n.operator]<=.9){let s=n;for(;s.right.operator&&r.binary_ops[s.right.operator]<=.9;)s=s.right;a.node.test=s.right,s.right=a.node,a.node=n}}else this.throwError("Expected :")}})}};ve.plugins.register(Wp);const ki=47,Yp=92;var Qp={name:"regex",init(r){r.hooks.add("gobble-token",function(a){if(this.code===ki){const n=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===ki&&!i){const o=this.expr.slice(n,this.index);let s="";for(;++this.index<this.expr.length;){const c=this.code;if(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57)s+=this.char;else break}let l;try{l=new RegExp(o,s)}catch(c){this.throwError(c.message)}return a.node={type:r.LITERAL,value:l,raw:this.expr.slice(n-1,this.index)},a.node=this.gobbleTokenProperty(a.node),a.node}this.code===r.OBRACK_CODE?i=!0:i&&this.code===r.CBRACK_CODE&&(i=!1),this.index+=this.code===Yp?2:1}this.throwError("Unclosed Regex")}})}};const Ua=43,lt={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|="]),updateOperators:[Ua,45],assignmentPrecedence:.9,init(r){const t=[r.IDENTIFIER,r.MEMBER_EXP];lt.assignmentOperators.forEach(n=>r.addBinaryOp(n,lt.assignmentPrecedence,!0)),r.hooks.add("gobble-token",function(i){const o=this.code;lt.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:o===Ua?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),r.hooks.add("after-token",function(i){if(i.node){const o=this.code;lt.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:o===Ua?"++":"--",argument:i.node,prefix:!1})}}),r.hooks.add("after-expression",function(i){i.node&&a(i.node)});function a(n){lt.assignmentOperators.has(n.operator)?(n.type="AssignmentExpression",a(n.left),a(n.right)):n.operator||Object.values(n).forEach(i=>{i&&typeof i=="object"&&a(i)})}}};ve.plugins.register(Qp,lt),ve.addUnaryOp("typeof"),ve.addLiteral("null",null),ve.addLiteral("undefined",void 0);const M={evalAst(r,t){switch(r.type){case"BinaryExpression":case"LogicalExpression":return M.evalBinaryExpression(r,t);case"Compound":return M.evalCompound(r,t);case"ConditionalExpression":return M.evalConditionalExpression(r,t);case"Identifier":return M.evalIdentifier(r,t);case"Literal":return M.evalLiteral(r,t);case"MemberExpression":return M.evalMemberExpression(r,t);case"UnaryExpression":return M.evalUnaryExpression(r,t);case"ArrayExpression":return M.evalArrayExpression(r,t);case"CallExpression":return M.evalCallExpression(r,t);case"AssignmentExpression":return M.evalAssignmentExpression(r,t);default:throw SyntaxError("Unexpected expression",r)}},evalBinaryExpression(r,t){return{"||":(n,i)=>n||i(),"&&":(n,i)=>n&&i(),"|":(n,i)=>n|i(),"^":(n,i)=>n^i(),"&":(n,i)=>n&i(),"==":(n,i)=>n==i(),"!=":(n,i)=>n!=i(),"===":(n,i)=>n===i(),"!==":(n,i)=>n!==i(),"<":(n,i)=>n<i(),">":(n,i)=>n>i(),"<=":(n,i)=>n<=i(),">=":(n,i)=>n>=i(),"<<":(n,i)=>n<<i(),">>":(n,i)=>n>>i(),">>>":(n,i)=>n>>>i(),"+":(n,i)=>n+i(),"-":(n,i)=>n-i(),"*":(n,i)=>n*i(),"/":(n,i)=>n/i(),"%":(n,i)=>n%i()}[r.operator](M.evalAst(r.left,t),()=>M.evalAst(r.right,t))},evalCompound(r,t){let a;for(let n=0;n<r.body.length;n++){r.body[n].type==="Identifier"&&["var","let","const"].includes(r.body[n].name)&&r.body[n+1]&&r.body[n+1].type==="AssignmentExpression"&&(n+=1);const i=r.body[n];a=M.evalAst(i,t)}return a},evalConditionalExpression(r,t){return M.evalAst(r.test,t)?M.evalAst(r.consequent,t):M.evalAst(r.alternate,t)},evalIdentifier(r,t){if(r.name in t)return t[r.name];throw ReferenceError(`${r.name} is not defined`)},evalLiteral(r){return r.value},evalMemberExpression(r,t){if(r.property.type==="Identifier"&&r.property.name==="constructor"||r.object.type==="Identifier"&&r.object.name==="constructor")throw new Error("'constructor' property is disabled");const a=r.computed?M.evalAst(r.property):r.property.name,n=M.evalAst(r.object,t),i=n[a];if(typeof i=="function"){if(n===Function&&a==="bind")throw new Error("Function.prototype.bind is disabled");if(n===Function&&(a==="call"||a==="apply"))throw new Error("Function.prototype.call and Function.prototype.apply are disabled");return i===Function?i:i.bind(n)}return i},evalUnaryExpression(r,t){return{"-":n=>-M.evalAst(n,t),"!":n=>!M.evalAst(n,t),"~":n=>~M.evalAst(n,t),"+":n=>+M.evalAst(n,t),typeof:n=>typeof M.evalAst(n,t)}[r.operator](r.argument)},evalArrayExpression(r,t){return r.elements.map(a=>M.evalAst(a,t))},evalCallExpression(r,t){const a=r.arguments.map(i=>M.evalAst(i,t)),n=M.evalAst(r.callee,t);if(n===Function)throw new Error("Function constructor is disabled");return n(...a)},evalAssignmentExpression(r,t){if(r.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const a=r.left.name;if(a==="__proto__")throw new Error("Assignment to __proto__ is disabled");const n=M.evalAst(r.right,t);return t[a]=n,t[a]}};class Xp{constructor(t){this.code=t,this.ast=ve(this.code)}runInNewContext(t){const a={...t};return M.evalAst(this.ast,a)}}function $e(r,t){return r=r.slice(),r.push(t),r}function Za(r,t){return t=t.slice(),t.unshift(r),t}class Jp extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function I(r,t,a,n,i){if(!(this instanceof I))try{return new I(r,t,a,n,i)}catch(s){if(!s.avoidNew)throw s;return s.value}typeof r=="string"&&(i=n,n=a,a=t,t=r,r=null);const o=r&&typeof r=="object";if(r=r||{},this.json=r.json||a,this.path=r.path||t,this.resultType=r.resultType||"value",this.flatten=r.flatten||!1,this.wrap=Object.hasOwn(r,"wrap")?r.wrap:!0,this.sandbox=r.sandbox||{},this.eval=r.eval===void 0?"safe":r.eval,this.ignoreEvalErrors=typeof r.ignoreEvalErrors>"u"?!1:r.ignoreEvalErrors,this.parent=r.parent||null,this.parentProperty=r.parentProperty||null,this.callback=r.callback||n||null,this.otherTypeCallback=r.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},r.autostart!==!1){const s={path:o?r.path:t};o?"json"in r&&(s.json=r.json):s.json=a;const l=this.evaluate(s);if(!l||typeof l!="object")throw new Jp(l);return l}}I.prototype.evaluate=function(r,t,a,n){let i=this.parent,o=this.parentProperty,{flatten:s,wrap:l}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,a=a||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,t=t||this.json,r=r||this.path,r&&typeof r=="object"&&!Array.isArray(r)){if(!r.path&&r.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(r,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=r),s=Object.hasOwn(r,"flatten")?r.flatten:s,this.currResultType=Object.hasOwn(r,"resultType")?r.resultType:this.currResultType,this.currSandbox=Object.hasOwn(r,"sandbox")?r.sandbox:this.currSandbox,l=Object.hasOwn(r,"wrap")?r.wrap:l,this.currEval=Object.hasOwn(r,"eval")?r.eval:this.currEval,a=Object.hasOwn(r,"callback")?r.callback:a,this.currOtherTypeCallback=Object.hasOwn(r,"otherTypeCallback")?r.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(r,"parent")?r.parent:i,o=Object.hasOwn(r,"parentProperty")?r.parentProperty:o,r=r.path}if(i=i||null,o=o||null,Array.isArray(r)&&(r=I.toPathString(r)),!r&&r!==""||!t)return;const c=I.toPathArray(r);c[0]==="$"&&c.length>1&&c.shift(),this._hasParentSelector=null;const u=this._trace(c,t,["$"],i,o,a).filter(function(d){return d&&!d.isParentSelector});return u.length?!l&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce((d,g)=>{const f=this._getPreferredOutput(g);return s&&Array.isArray(f)?d=d.concat(f):d.push(f),d},[]):l?[]:void 0},I.prototype._getPreferredOutput=function(r){const t=this.currResultType;switch(t){case"all":{const a=Array.isArray(r.path)?r.path:I.toPathArray(r.path);return r.pointer=I.toPointer(a),r.path=typeof r.path=="string"?r.path:I.toPathString(r.path),r}case"value":case"parent":case"parentProperty":return r[t];case"path":return I.toPathString(r[t]);case"pointer":return I.toPointer(r.path);default:throw new TypeError("Unknown result type")}},I.prototype._handleCallback=function(r,t,a){if(t){const n=this._getPreferredOutput(r);r.path=typeof r.path=="string"?r.path:I.toPathString(r.path),t(n,a,r)}},I.prototype._trace=function(r,t,a,n,i,o,s,l){let c;if(!r.length)return c={path:a,value:t,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(c,o,"value"),c;const u=r[0],d=r.slice(1),g=[];function f(b){Array.isArray(b)?b.forEach(h=>{g.push(h)}):g.push(b)}if((typeof u!="string"||l)&&t&&Object.hasOwn(t,u))f(this._trace(d,t[u],$e(a,u),t,u,o,s));else if(u==="*")this._walk(t,b=>{f(this._trace(d,t[b],$e(a,b),t,b,o,!0,!0))});else if(u==="..")f(this._trace(d,t,a,n,i,o,s)),this._walk(t,b=>{typeof t[b]=="object"&&f(this._trace(r.slice(),t[b],$e(a,b),t,b,o,!0))});else{if(u==="^")return this._hasParentSelector=!0,{path:a.slice(0,-1),expr:d,isParentSelector:!0};if(u==="~")return c={path:$e(a,u),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(u==="$")f(this._trace(d,t,a,null,null,o,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))f(this._slice(u,d,t,a,n,i,o));else if(u.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const b=u.replace(/^\?\((.*?)\)$/u,"$1"),h=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(b);h?this._walk(t,y=>{const C=[h[2]],A=h[1]?t[y][h[1]]:t[y];this._trace(C,A,a,n,i,o,!0).length>0&&f(this._trace(d,t[y],$e(a,y),t,y,o,!0))}):this._walk(t,y=>{this._eval(b,t[y],y,a,n,i)&&f(this._trace(d,t[y],$e(a,y),t,y,o,!0))})}else if(u[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");f(this._trace(Za(this._eval(u,t,a.at(-1),a.slice(0,-1),n,i),d),t,a,n,i,o,s))}else if(u[0]==="@"){let b=!1;const h=u.slice(1,-2);switch(h){case"scalar":(!t||!["object","function"].includes(typeof t))&&(b=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===h&&(b=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(b=!0);break;case"number":Number.isFinite(t)&&(b=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(b=!0);break;case"object":t&&typeof t===h&&(b=!0);break;case"array":Array.isArray(t)&&(b=!0);break;case"other":b=this.currOtherTypeCallback(t,a,n,i);break;case"null":t===null&&(b=!0);break;default:throw new TypeError("Unknown value type "+h)}if(b)return c={path:a,value:t,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(u[0]==="`"&&t&&Object.hasOwn(t,u.slice(1))){const b=u.slice(1);f(this._trace(d,t[b],$e(a,b),t,b,o,s,!0))}else if(u.includes(",")){const b=u.split(",");for(const h of b)f(this._trace(Za(h,d),t,a,n,i,o,!0))}else!l&&t&&Object.hasOwn(t,u)&&f(this._trace(d,t[u],$e(a,u),t,u,o,s,!0))}if(this._hasParentSelector)for(let b=0;b<g.length;b++){const h=g[b];if(h&&h.isParentSelector){const y=this._trace(h.expr,t,h.path,n,i,o,s);if(Array.isArray(y)){g[b]=y[0];const C=y.length;for(let A=1;A<C;A++)b++,g.splice(b,0,y[A])}else g[b]=y}}return g},I.prototype._walk=function(r,t){if(Array.isArray(r)){const a=r.length;for(let n=0;n<a;n++)t(n)}else r&&typeof r=="object"&&Object.keys(r).forEach(a=>{t(a)})},I.prototype._slice=function(r,t,a,n,i,o,s){if(!Array.isArray(a))return;const l=a.length,c=r.split(":"),u=c[2]&&Number.parseInt(c[2])||1;let d=c[0]&&Number.parseInt(c[0])||0,g=c[1]&&Number.parseInt(c[1])||l;d=d<0?Math.max(0,d+l):Math.min(l,d),g=g<0?Math.max(0,g+l):Math.min(l,g);const f=[];for(let b=d;b<g;b+=u)this._trace(Za(b,t),a,n,i,o,s,!0).forEach(y=>{f.push(y)});return f},I.prototype._eval=function(r,t,a,n,i,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=i,this.currSandbox._$_property=a,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const s=r.includes("@path");s&&(this.currSandbox._$_path=I.toPathString(n.concat([a])));const l=this.currEval+"Script:"+r;if(!I.cache[l]){let c=r.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(c=c.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)I.cache[l]=new this.safeVm.Script(c);else if(this.currEval==="native")I.cache[l]=new this.vm.Script(c);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const u=this.currEval;I.cache[l]=new u(c)}else if(typeof this.currEval=="function")I.cache[l]={runInNewContext:u=>this.currEval(c,u)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return I.cache[l].runInNewContext(this.currSandbox)}catch(c){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+c.message+": "+r)}},I.cache={},I.toPathString=function(r){const t=r,a=t.length;let n="$";for(let i=1;i<a;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(n+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return n},I.toPointer=function(r){const t=r,a=t.length;let n="";for(let i=1;i<a;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(n+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return n},I.toPathArray=function(r){const{cache:t}=I;if(t[r])return t[r].concat();const a=[],i=r.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(o,s){return"[#"+(a.push(s)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(o,s){return"['"+s.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(o,s){return";"+s.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(o){const s=o.match(/#(\d+)/u);return!s||!s[1]?o:a[s[1]]});return t[r]=i,t[r].concat()},I.prototype.safeVm={Script:Xp};const eg=function(r,t,a){const n=r.length;for(let i=0;i<n;i++){const o=r[i];a(o)&&t.push(r.splice(i--,1)[0])}};class tg{constructor(t){this.code=t}runInNewContext(t){let a=this.code;const n=Object.keys(t),i=[];eg(n,i,u=>typeof t[u]=="function");const o=n.map(u=>t[u]);a=i.reduce((u,d)=>{let g=t[d].toString();return/function/u.test(g)||(g="function "+g),"var "+d+"="+g+";"+u},"")+a,!/(['"])use strict\1/u.test(a)&&!n.includes("arguments")&&(a="var arguments = undefined;"+a),a=a.replace(/;\s*$/u,"");const l=a.lastIndexOf(";"),c=l>-1?a.slice(0,l+1)+" return "+a.slice(l+1):" return "+a;return new Function(...n,c)(...o)}}I.prototype.vm={Script:tg};const Ga=(r,t)=>{const a=I({json:r,path:["$",`[?(@.locator=="${t}")]`]});return a.length?a[0]:null},Pi=r=>{let t;if(r.endsWith("Policy"))t="Policy";else if(r.endsWith("Quote"))t="Quote";else if(r.endsWith("Segment"))t="Segment";else return r;return r.slice(0,-t.length)},Ka=({dataModel:r,elementType:t,resultType:a="value"})=>{const n=Pi(t),i=I({path:["$","?(@property === 'exposures' || @property === 'coverages' || @property === 'policyLines'|| @property === 'exposureGroups')",n],json:r,resultType:a});return i.length?i[0]:null},rg=({dataModel:r,quote:t,elementLocator:a})=>{const n=Ga(t,a);return n?Ka({dataModel:r,elementType:n.type}):{}},ag=({dataModel:r,segment:t,elementLocator:a})=>{const n=Ga(t,a);return n?Ka({dataModel:r,elementType:n.type}):{}},ng=(r,t)=>{const a=t.endsWith("Quote")?t:`${t}Quote`;return r.filter(i=>i.type===a)},ig=(r,t)=>{const a=t.endsWith("Policy")?t:`${t}Policy`;return r.filter(i=>i.type===a)},og=({dataModel:r,element:{productName:t}})=>r.products[t]??{},Di=r=>{var n;r=r??"";const t=r.replace(/\?|\*|!|\+/g,""),a=(n=r.match(/\?|\*|!|\+/g))==null?void 0:n.pop();return{name:t,quantifier:a??""}},sg=({dataModel:r,contents:t})=>{var b,h,y,C;const a=r.exposures??{},n=r.coverages??{},i=r.policyLines??{},o=r.exposureGroups??{},l=(t??[]).map(A=>{const{name:G,quantifier:S}=Di(A);return{name:G,quantifier:S}}),c=Object.keys(a).filter(A=>{if(l.find(S=>S.name===A))return!0}),u=Object.keys(n).filter(A=>{if(l.find(S=>S.name===A))return!0}),d=Object.keys(i).filter(A=>{if(l.find(S=>S.name===A))return!0}),g=Object.keys(o).filter(A=>{if(l.find(S=>S.name===A))return!0}),f={coverages:{},exposures:{},policyLines:{},exposureGroups:{}};for(const A of c)f.exposures[A]={...a[A],quantifier:((b=l.find(G=>G.name===A))==null?void 0:b.quantifier)??""};for(const A of u)f.coverages[A]={...n[A],quantifier:((h=l.find(G=>G.name===A))==null?void 0:h.quantifier)??""};for(const A of d)f.policyLines[A]={...i[A],quantifier:((y=l.find(G=>G.name===A))==null?void 0:y.quantifier)??""};for(const A of g)f.exposureGroups[A]={...o[A],quantifier:((C=l.find(G=>G.name===A))==null?void 0:C.quantifier)??""};return f},qe=({coverageTermOptions:r,coverageTermDataModel:t,coverageTerms:a})=>{if(!Object.keys(r??{}).length||!t)return{};const n=structuredClone(r)??{},i=t;return Object.keys(i).forEach(o=>{if(!a.includes(o)||n[o])return;Object.keys(i[o].options).forEach(l=>{if(l.startsWith("*")){const c=l.substring(1);n[o]=c}})}),n},lg=({transactionSnapshot:r,paramsChangeInstruction:t,modifyChangeInstruction:a,coverageTerms:n,coverageTermsDataModel:i,timezone:o})=>{const s=a?{...a.setData??{},coverageTermsDataModel:a.setCoverageTerms??{}}:r.segment.element.data??{},l=Xe(t.effectiveTime,o),c=t.newPolicyEndTime?Xe(t.newPolicyEndTime,o):void 0;return{...s&&{...s},default:{effectiveTime:ni(l).toString(),...c&&{newPolicyEndDate:ni(c).toString()}},coverageTerms:qe({coverageTermDataModel:i,coverageTermOptions:s.coverageTermsDataModel??{},coverageTerms:n})}},cg=(r,t,a)=>{const n=qe({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t});return{data:{...r.data},...Object.keys(n).length>0&&{coverageTerms:qe({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t})}}},ug=({elementResponse:r,coverageTerms:t,coverageTermsDataModel:a})=>{const n=r.data??{},i=qe({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t});return{...n&&{...n},...Object.keys(i).length>0&&{coverageTerms:qe({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t})}}};var N;(function(r){r.assertEqual=i=>i;function t(i){}r.assertIs=t;function a(i){throw new Error}r.assertNever=a,r.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},r.getValidEnumValues=i=>{const o=r.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),s={};for(const l of o)s[l]=i[l];return r.objectValues(s)},r.objectValues=i=>r.objectKeys(i).map(function(o){return i[o]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},r.find=(i,o)=>{for(const s of i)if(o(s))return s},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}r.joinValues=n,r.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var za;(function(r){r.mergeShapes=(t,a)=>({...t,...a})})(za||(za={}));const T=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Se=r=>{switch(typeof r){case"undefined":return T.undefined;case"string":return T.string;case"number":return isNaN(r)?T.nan:T.number;case"boolean":return T.boolean;case"function":return T.function;case"bigint":return T.bigint;case"symbol":return T.symbol;case"object":return Array.isArray(r)?T.array:r===null?T.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?T.promise:typeof Map<"u"&&r instanceof Map?T.map:typeof Set<"u"&&r instanceof Set?T.set:typeof Date<"u"&&r instanceof Date?T.date:T.object;default:return T.unknown}},m=N.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"]),dg=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Q extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const a=t||function(o){return o.message},n={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(a(s));else{let l=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(a(s))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return i(this),n}static assert(t){if(!(t instanceof Q))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a={},n=[];for(const i of this.issues)i.path.length>0?(a[i.path[0]]=a[i.path[0]]||[],a[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:a}}get formErrors(){return this.flatten()}}Q.create=r=>new Q(r);const ct=(r,t)=>{let a;switch(r.code){case m.invalid_type:r.received===T.undefined?a="Required":a=`Expected ${r.expected}, received ${r.received}`;break;case m.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(r.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:a=`Unrecognized key(s) in object: ${N.joinValues(r.keys,", ")}`;break;case m.invalid_union:a="Invalid input";break;case m.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${N.joinValues(r.options)}`;break;case m.invalid_enum_value:a=`Invalid enum value. Expected ${N.joinValues(r.options)}, received '${r.received}'`;break;case m.invalid_arguments:a="Invalid function arguments";break;case m.invalid_return_type:a="Invalid function return type";break;case m.invalid_date:a="Invalid date";break;case m.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(a=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?a=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?a=`Invalid input: must end with "${r.validation.endsWith}"`:N.assertNever(r.validation):r.validation!=="regex"?a=`Invalid ${r.validation}`:a="Invalid";break;case m.too_small:r.type==="array"?a=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?a=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?a=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?a=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:a="Invalid input";break;case m.too_big:r.type==="array"?a=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?a=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?a=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?a=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?a=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:a="Invalid input";break;case m.custom:a="Invalid input";break;case m.invalid_intersection_types:a="Intersection results could not be merged";break;case m.not_multiple_of:a=`Number must be a multiple of ${r.multipleOf}`;break;case m.not_finite:a="Number must be finite";break;default:a=t.defaultError,N.assertNever(r)}return{message:a}};let Oi=ct;function pg(r){Oi=r}function Dr(){return Oi}const Or=r=>{const{data:t,path:a,errorMaps:n,issueData:i}=r,o=[...a,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(s,{data:t,defaultError:l}).message;return{...i,path:o,message:l}},gg=[];function v(r,t){const a=Dr(),n=Or({issueData:t,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,a,a===ct?void 0:ct].filter(i=>!!i)});r.common.issues.push(n)}class z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,a){const n=[];for(const i of a){if(i.status==="aborted")return E;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,a){const n=[];for(const i of a){const o=await i.key,s=await i.value;n.push({key:o,value:s})}return z.mergeObjectSync(t,n)}static mergeObjectSync(t,a){const n={};for(const i of a){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return E;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:t.value,value:n}}}const E=Object.freeze({status:"aborted"}),Nr=r=>({status:"dirty",value:r}),H=r=>({status:"valid",value:r}),Va=r=>r.status==="aborted",Ha=r=>r.status==="dirty",Dt=r=>r.status==="valid",Ot=r=>typeof Promise<"u"&&r instanceof Promise;function Ir(r,t,a,n){if(typeof t=="function"?r!==t||!n:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(r)}function Ni(r,t,a,n,i){if(typeof t=="function"?r!==t||!i:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(r,a),a}var j;(function(r){r.errToObj=t=>typeof t=="string"?{message:t}:t||{},r.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(j||(j={}));var Nt,It;class pe{constructor(t,a,n,i){this._cachedPath=[],this.parent=t,this.data=a,this._path=n,this._key=i}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 Ii=(r,t)=>{if(Dt(t))return{success:!0,data:t.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new Q(r.common.issues);return this._error=a,this._error}}};function L(r){if(!r)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:i}=r;if(t&&(a||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var l,c;const{message:u}=r;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??a)!==null&&c!==void 0?c:s.defaultError}},description:i}}class k{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Se(t.data)}_getOrReturnCtx(t,a){return a||{common:t.parent.common,data:t.data,parsedType:Se(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new z,ctx:{common:t.parent.common,data:t.data,parsedType:Se(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const a=this._parse(t);if(Ot(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(t){const a=this._parse(t);return Promise.resolve(a)}parse(t,a){const n=this.safeParse(t,a);if(n.success)return n.data;throw n.error}safeParse(t,a){var n;const i={common:{issues:[],async:(n=a==null?void 0:a.async)!==null&&n!==void 0?n:!1,contextualErrorMap:a==null?void 0:a.errorMap},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Se(t)},o=this._parseSync({data:t,path:i.path,parent:i});return Ii(i,o)}async parseAsync(t,a){const n=await this.safeParseAsync(t,a);if(n.success)return n.data;throw n.error}async safeParseAsync(t,a){const n={common:{issues:[],contextualErrorMap:a==null?void 0:a.errorMap,async:!0},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Se(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Ot(i)?i:Promise.resolve(i));return Ii(n,o)}refine(t,a){const n=i=>typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(i):a;return this._refinement((i,o)=>{const s=t(i),l=()=>o.addIssue({code:m.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(t,a){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof a=="function"?a(n,i):a),!1))}_refinement(t){return new se({schema:this,typeName:w.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return me.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oe.create(this,this._def)}promise(){return gt.create(this,this._def)}or(t){return qt.create([this,t],this._def)}and(t){return Ft.create(this,t,this._def)}transform(t){return new se({...L(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const a=typeof t=="function"?t:()=>t;return new zt({...L(this._def),innerType:this,defaultValue:a,typeName:w.ZodDefault})}brand(){return new Qa({typeName:w.ZodBranded,type:this,...L(this._def)})}catch(t){const a=typeof t=="function"?t:()=>t;return new Vt({...L(this._def),innerType:this,catchValue:a,typeName:w.ZodCatch})}describe(t){const a=this.constructor;return new a({...this._def,description:t})}pipe(t){return Ht.create(this,t)}readonly(){return Wt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mg=/^c[^\s-]{8,}$/i,fg=/^[0-9a-z]+$/,yg=/^[0-9A-HJKMNP-TV-Z]{26}$/,hg=/^[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,bg=/^[a-z0-9_-]{21}$/i,vg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Tg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,jg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wa;const Ag=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_g=/^(([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})))$/,wg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bi="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Eg=new RegExp(`^${Bi}$`);function Mi(r){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?t=`${t}\\.\\d{${r.precision}}`:r.precision==null&&(t=`${t}(\\.\\d+)?`),t}function xg(r){return new RegExp(`^${Mi(r)}$`)}function Ri(r){let t=`${Bi}T${Mi(r)}`;const a=[];return a.push(r.local?"Z?":"Z"),r.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}function $g(r,t){return!!((t==="v4"||!t)&&Ag.test(r)||(t==="v6"||!t)&&_g.test(r))}class ie extends k{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==T.string){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.string,received:i.parsedType}),E}const a=new z;let n;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,s=t.data.length<i.value;(o||s)&&(n=this._getOrReturnCtx(t,n),o?v(n,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&v(n,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")Tg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"email",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Wa||(Wa=new RegExp(jg,"u")),Wa.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"emoji",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")hg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"uuid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")bg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"nanoid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")mg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"cuid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")fg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"cuid2",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")yg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"ulid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),v(n,{validation:"url",code:m.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"regex",code:m.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?Ri(i).test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?Eg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?xg(i).test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?vg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"duration",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?$g(t.data,i.version)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"ip",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?wg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"base64",code:m.invalid_string,message:i.message}),a.dirty()):N.assertNever(i);return{status:a.value,value:t.data}}_regex(t,a,n){return this.refinement(i=>t.test(i),{validation:a,code:m.invalid_string,...j.errToObj(n)})}_addCheck(t){return new ie({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}datetime(t){var a,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(a=t==null?void 0:t.offset)!==null&&a!==void 0?a:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...j.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...j.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,a){return this._addCheck({kind:"regex",regex:t,...j.errToObj(a)})}includes(t,a){return this._addCheck({kind:"includes",value:t,position:a==null?void 0:a.position,...j.errToObj(a==null?void 0:a.message)})}startsWith(t,a){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(a)})}endsWith(t,a){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(a)})}min(t,a){return this._addCheck({kind:"min",value:t,...j.errToObj(a)})}max(t,a){return this._addCheck({kind:"max",value:t,...j.errToObj(a)})}length(t,a){return this._addCheck({kind:"length",value:t,...j.errToObj(a)})}nonempty(t){return this.min(1,j.errToObj(t))}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(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t}get maxLength(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t}}ie.create=r=>{var t;return new ie({checks:[],typeName:w.ZodString,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...L(r)})};function Sg(r,t){const a=(r.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=a>n?a:n,o=parseInt(r.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}class Le extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==T.number){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.number,received:i.parsedType}),E}let a;const n=new z;for(const i of this._def.checks)i.kind==="int"?N.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),v(a,{code:m.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Sg(t.data,i.value)!==0&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),v(a,{code:m.not_finite,message:i.message}),n.dirty()):N.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,j.toString(a))}gt(t,a){return this.setLimit("min",t,!1,j.toString(a))}lte(t,a){return this.setLimit("max",t,!0,j.toString(a))}lt(t,a){return this.setLimit("max",t,!1,j.toString(a))}setLimit(t,a,n,i){return new Le({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:j.toString(i)}]})}_addCheck(t){return new Le({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(a)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t}get maxValue(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,a=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(a===null||n.value>a)&&(a=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(a)&&Number.isFinite(t)}}Le.create=r=>new Le({checks:[],typeName:w.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...L(r)});class Ce extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==T.bigint){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.bigint,received:i.parsedType}),E}let a;const n=new z;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):N.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,j.toString(a))}gt(t,a){return this.setLimit("min",t,!1,j.toString(a))}lte(t,a){return this.setLimit("max",t,!0,j.toString(a))}lt(t,a){return this.setLimit("max",t,!1,j.toString(a))}setLimit(t,a,n,i){return new Ce({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:j.toString(i)}]})}_addCheck(t){return new Ce({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(a)})}get minValue(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t}get maxValue(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t}}Ce.create=r=>{var t;return new Ce({checks:[],typeName:w.ZodBigInt,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...L(r)})};class Bt extends k{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==T.boolean){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.boolean,received:a.parsedType}),E}return H(t.data)}}Bt.create=r=>new Bt({typeName:w.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...L(r)});class Fe extends k{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==T.date){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.date,received:i.parsedType}),E}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_date}),E}const a=new z;let n;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):N.assertNever(i);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Fe({...this._def,checks:[...this._def.checks,t]})}min(t,a){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(a)})}max(t,a){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(a)})}get minDate(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t!=null?new Date(t):null}}Fe.create=r=>new Fe({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:w.ZodDate,...L(r)});class Br extends k{_parse(t){if(this._getType(t)!==T.symbol){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.symbol,received:a.parsedType}),E}return H(t.data)}}Br.create=r=>new Br({typeName:w.ZodSymbol,...L(r)});class Mt extends k{_parse(t){if(this._getType(t)!==T.undefined){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.undefined,received:a.parsedType}),E}return H(t.data)}}Mt.create=r=>new Mt({typeName:w.ZodUndefined,...L(r)});class Rt extends k{_parse(t){if(this._getType(t)!==T.null){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.null,received:a.parsedType}),E}return H(t.data)}}Rt.create=r=>new Rt({typeName:w.ZodNull,...L(r)});class ut extends k{constructor(){super(...arguments),this._any=!0}_parse(t){return H(t.data)}}ut.create=r=>new ut({typeName:w.ZodAny,...L(r)});class Ue extends k{constructor(){super(...arguments),this._unknown=!0}_parse(t){return H(t.data)}}Ue.create=r=>new Ue({typeName:w.ZodUnknown,...L(r)});class Te extends k{_parse(t){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.never,received:a.parsedType}),E}}Te.create=r=>new Te({typeName:w.ZodNever,...L(r)});class Mr extends k{_parse(t){if(this._getType(t)!==T.undefined){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.void,received:a.parsedType}),E}return H(t.data)}}Mr.create=r=>new Mr({typeName:w.ZodVoid,...L(r)});class oe extends k{_parse(t){const{ctx:a,status:n}=this._processInputParams(t),i=this._def;if(a.parsedType!==T.array)return v(a,{code:m.invalid_type,expected:T.array,received:a.parsedType}),E;if(i.exactLength!==null){const s=a.data.length>i.exactLength.value,l=a.data.length<i.exactLength.value;(s||l)&&(v(a,{code:s?m.too_big:m.too_small,minimum:l?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&a.data.length<i.minLength.value&&(v(a,{code:m.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&a.data.length>i.maxLength.value&&(v(a,{code:m.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),a.common.async)return Promise.all([...a.data].map((s,l)=>i.type._parseAsync(new pe(a,s,a.path,l)))).then(s=>z.mergeArray(n,s));const o=[...a.data].map((s,l)=>i.type._parseSync(new pe(a,s,a.path,l)));return z.mergeArray(n,o)}get element(){return this._def.type}min(t,a){return new oe({...this._def,minLength:{value:t,message:j.toString(a)}})}max(t,a){return new oe({...this._def,maxLength:{value:t,message:j.toString(a)}})}length(t,a){return new oe({...this._def,exactLength:{value:t,message:j.toString(a)}})}nonempty(t){return this.min(1,t)}}oe.create=(r,t)=>new oe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...L(t)});function dt(r){if(r instanceof Z){const t={};for(const a in r.shape){const n=r.shape[a];t[a]=me.create(dt(n))}return new Z({...r._def,shape:()=>t})}else return r instanceof oe?new oe({...r._def,type:dt(r.element)}):r instanceof me?me.create(dt(r.unwrap())):r instanceof De?De.create(dt(r.unwrap())):r instanceof ge?ge.create(r.items.map(t=>dt(t))):r}class Z extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),a=N.objectKeys(t);return this._cached={shape:t,keys:a}}_parse(t){if(this._getType(t)!==T.object){const c=this._getOrReturnCtx(t);return v(c,{code:m.invalid_type,expected:T.object,received:c.parsedType}),E}const{status:a,ctx:n}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Te&&this._def.unknownKeys==="strip"))for(const c in n.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],d=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new pe(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Te){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")s.length>0&&(v(n,{code:m.unrecognized_keys,keys:s}),a.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new pe(n,d,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,g=await u.value;c.push({key:d,value:g,alwaysSet:u.alwaysSet})}return c}).then(c=>z.mergeObjectSync(a,c)):z.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new Z({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(a,n)=>{var i,o,s,l;const c=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,a,n).message)!==null&&s!==void 0?s:n.defaultError;return a.code==="unrecognized_keys"?{message:(l=j.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(t){return new Z({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Z({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:w.ZodObject})}setKey(t,a){return this.augment({[t]:a})}catchall(t){return new Z({...this._def,catchall:t})}pick(t){const a={};return N.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(a[n]=this.shape[n])}),new Z({...this._def,shape:()=>a})}omit(t){const a={};return N.objectKeys(this.shape).forEach(n=>{t[n]||(a[n]=this.shape[n])}),new Z({...this._def,shape:()=>a})}deepPartial(){return dt(this)}partial(t){const a={};return N.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?a[n]=i:a[n]=i.optional()}),new Z({...this._def,shape:()=>a})}required(t){const a={};return N.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])a[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof me;)i=i._def.innerType;a[n]=i}}),new Z({...this._def,shape:()=>a})}keyof(){return qi(N.objectKeys(this.shape))}}Z.create=(r,t)=>new Z({shape:()=>r,unknownKeys:"strip",catchall:Te.create(),typeName:w.ZodObject,...L(t)}),Z.strictCreate=(r,t)=>new Z({shape:()=>r,unknownKeys:"strict",catchall:Te.create(),typeName:w.ZodObject,...L(t)}),Z.lazycreate=(r,t)=>new Z({shape:r,unknownKeys:"strip",catchall:Te.create(),typeName:w.ZodObject,...L(t)});class qt extends k{_parse(t){const{ctx:a}=this._processInputParams(t),n=this._def.options;function i(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return a.common.issues.push(...l.ctx.common.issues),l.result;const s=o.map(l=>new Q(l.ctx.common.issues));return v(a,{code:m.invalid_union,unionErrors:s}),E}if(a.common.async)return Promise.all(n.map(async o=>{const s={...a,common:{...a.common,issues:[]},parent:null};return{result:await o._parseAsync({data:a.data,path:a.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const c of n){const u={...a,common:{...a.common,issues:[]},parent:null},d=c._parseSync({data:a.data,path:a.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return a.common.issues.push(...o.ctx.common.issues),o.result;const l=s.map(c=>new Q(c));return v(a,{code:m.invalid_union,unionErrors:l}),E}}get options(){return this._def.options}}qt.create=(r,t)=>new qt({options:r,typeName:w.ZodUnion,...L(t)});const ke=r=>r instanceof Zt?ke(r.schema):r instanceof se?ke(r.innerType()):r instanceof Gt?[r.value]:r instanceof Pe?r.options:r instanceof Kt?N.objectValues(r.enum):r instanceof zt?ke(r._def.innerType):r instanceof Mt?[void 0]:r instanceof Rt?[null]:r instanceof me?[void 0,...ke(r.unwrap())]:r instanceof De?[null,...ke(r.unwrap())]:r instanceof Qa||r instanceof Wt?ke(r.unwrap()):r instanceof Vt?ke(r._def.innerType):[];class Rr extends k{_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==T.object)return v(a,{code:m.invalid_type,expected:T.object,received:a.parsedType}),E;const n=this.discriminator,i=a.data[n],o=this.optionsMap.get(i);return o?a.common.async?o._parseAsync({data:a.data,path:a.path,parent:a}):o._parseSync({data:a.data,path:a.path,parent:a}):(v(a,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),E)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,a,n){const i=new Map;for(const o of a){const s=ke(o.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of s){if(i.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);i.set(l,o)}}return new Rr({typeName:w.ZodDiscriminatedUnion,discriminator:t,options:a,optionsMap:i,...L(n)})}}function Ya(r,t){const a=Se(r),n=Se(t);if(r===t)return{valid:!0,data:r};if(a===T.object&&n===T.object){const i=N.objectKeys(t),o=N.objectKeys(r).filter(l=>i.indexOf(l)!==-1),s={...r,...t};for(const l of o){const c=Ya(r[l],t[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}else if(a===T.array&&n===T.array){if(r.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<r.length;o++){const s=r[o],l=t[o],c=Ya(s,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return a===T.date&&n===T.date&&+r==+t?{valid:!0,data:r}:{valid:!1}}class Ft extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t),i=(o,s)=>{if(Va(o)||Va(s))return E;const l=Ya(o.value,s.value);return l.valid?((Ha(o)||Ha(s))&&a.dirty(),{status:a.value,value:l.data}):(v(n,{code:m.invalid_intersection_types}),E)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ft.create=(r,t,a)=>new Ft({left:r,right:t,typeName:w.ZodIntersection,...L(a)});class ge extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.array)return v(n,{code:m.invalid_type,expected:T.array,received:n.parsedType}),E;if(n.data.length<this._def.items.length)return v(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),E;!this._def.rest&&n.data.length>this._def.items.length&&(v(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const i=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new pe(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>z.mergeArray(a,o)):z.mergeArray(a,i)}get items(){return this._def.items}rest(t){return new ge({...this._def,rest:t})}}ge.create=(r,t)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ge({items:r,typeName:w.ZodTuple,rest:null,...L(t)})};class Ut extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.object)return v(n,{code:m.invalid_type,expected:T.object,received:n.parsedType}),E;const i=[],o=this._def.keyType,s=this._def.valueType;for(const l in n.data)i.push({key:o._parse(new pe(n,l,n.path,l)),value:s._parse(new pe(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?z.mergeObjectAsync(a,i):z.mergeObjectSync(a,i)}get element(){return this._def.valueType}static create(t,a,n){return a instanceof k?new Ut({keyType:t,valueType:a,typeName:w.ZodRecord,...L(n)}):new Ut({keyType:ie.create(),valueType:t,typeName:w.ZodRecord,...L(a)})}}class qr extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.map)return v(n,{code:m.invalid_type,expected:T.map,received:n.parsedType}),E;const i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([l,c],u)=>({key:i._parse(new pe(n,l,n.path,[u,"key"])),value:o._parse(new pe(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return E;(u.status==="dirty"||d.status==="dirty")&&a.dirty(),l.set(u.value,d.value)}return{status:a.value,value:l}})}else{const l=new Map;for(const c of s){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return E;(u.status==="dirty"||d.status==="dirty")&&a.dirty(),l.set(u.value,d.value)}return{status:a.value,value:l}}}}qr.create=(r,t,a)=>new qr({valueType:t,keyType:r,typeName:w.ZodMap,...L(a)});class Ze extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.set)return v(n,{code:m.invalid_type,expected:T.set,received:n.parsedType}),E;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(v(n,{code:m.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),a.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(v(n,{code:m.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),a.dirty());const o=this._def.valueType;function s(c){const u=new Set;for(const d of c){if(d.status==="aborted")return E;d.status==="dirty"&&a.dirty(),u.add(d.value)}return{status:a.value,value:u}}const l=[...n.data.values()].map((c,u)=>o._parse(new pe(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>s(c)):s(l)}min(t,a){return new Ze({...this._def,minSize:{value:t,message:j.toString(a)}})}max(t,a){return new Ze({...this._def,maxSize:{value:t,message:j.toString(a)}})}size(t,a){return this.min(t,a).max(t,a)}nonempty(t){return this.min(1,t)}}Ze.create=(r,t)=>new Ze({valueType:r,minSize:null,maxSize:null,typeName:w.ZodSet,...L(t)});class pt extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==T.function)return v(a,{code:m.invalid_type,expected:T.function,received:a.parsedType}),E;function n(l,c){return Or({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Dr(),ct].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function i(l,c){return Or({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Dr(),ct].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}const o={errorMap:a.common.contextualErrorMap},s=a.data;if(this._def.returns instanceof gt){const l=this;return H(async function(...c){const u=new Q([]),d=await l._def.args.parseAsync(c,o).catch(f=>{throw u.addIssue(n(c,f)),u}),g=await Reflect.apply(s,this,d);return await l._def.returns._def.type.parseAsync(g,o).catch(f=>{throw u.addIssue(i(g,f)),u})})}else{const l=this;return H(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new Q([n(c,u.error)]);const d=Reflect.apply(s,this,u.data),g=l._def.returns.safeParse(d,o);if(!g.success)throw new Q([i(d,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new pt({...this._def,args:ge.create(t).rest(Ue.create())})}returns(t){return new pt({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,a,n){return new pt({args:t||ge.create([]).rest(Ue.create()),returns:a||Ue.create(),typeName:w.ZodFunction,...L(n)})}}class Zt extends k{get schema(){return this._def.getter()}_parse(t){const{ctx:a}=this._processInputParams(t);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Zt.create=(r,t)=>new Zt({getter:r,typeName:w.ZodLazy,...L(t)});class Gt extends k{_parse(t){if(t.data!==this._def.value){const a=this._getOrReturnCtx(t);return v(a,{received:a.data,code:m.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:t.data}}get value(){return this._def.value}}Gt.create=(r,t)=>new Gt({value:r,typeName:w.ZodLiteral,...L(t)});function qi(r,t){return new Pe({values:r,typeName:w.ZodEnum,...L(t)})}class Pe extends k{constructor(){super(...arguments),Nt.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const a=this._getOrReturnCtx(t),n=this._def.values;return v(a,{expected:N.joinValues(n),received:a.parsedType,code:m.invalid_type}),E}if(Ir(this,Nt)||Ni(this,Nt,new Set(this._def.values)),!Ir(this,Nt).has(t.data)){const a=this._getOrReturnCtx(t),n=this._def.values;return v(a,{received:a.data,code:m.invalid_enum_value,options:n}),E}return H(t.data)}get options(){return this._def.values}get enum(){const t={};for(const a of this._def.values)t[a]=a;return t}get Values(){const t={};for(const a of this._def.values)t[a]=a;return t}get Enum(){const t={};for(const a of this._def.values)t[a]=a;return t}extract(t,a=this._def){return Pe.create(t,{...this._def,...a})}exclude(t,a=this._def){return Pe.create(this.options.filter(n=>!t.includes(n)),{...this._def,...a})}}Nt=new WeakMap,Pe.create=qi;class Kt extends k{constructor(){super(...arguments),It.set(this,void 0)}_parse(t){const a=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==T.string&&n.parsedType!==T.number){const i=N.objectValues(a);return v(n,{expected:N.joinValues(i),received:n.parsedType,code:m.invalid_type}),E}if(Ir(this,It)||Ni(this,It,new Set(N.getValidEnumValues(this._def.values))),!Ir(this,It).has(t.data)){const i=N.objectValues(a);return v(n,{received:n.data,code:m.invalid_enum_value,options:i}),E}return H(t.data)}get enum(){return this._def.values}}It=new WeakMap,Kt.create=(r,t)=>new Kt({values:r,typeName:w.ZodNativeEnum,...L(t)});class gt extends k{unwrap(){return this._def.type}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==T.promise&&a.common.async===!1)return v(a,{code:m.invalid_type,expected:T.promise,received:a.parsedType}),E;const n=a.parsedType===T.promise?a.data:Promise.resolve(a.data);return H(n.then(i=>this._def.type.parseAsync(i,{path:a.path,errorMap:a.common.contextualErrorMap})))}}gt.create=(r,t)=>new gt({type:r,typeName:w.ZodPromise,...L(t)});class se extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:a,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s=>{v(n,s),s.fatal?a.abort():a.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async l=>{if(a.value==="aborted")return E;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?E:c.status==="dirty"||a.value==="dirty"?Nr(c.value):c});{if(a.value==="aborted")return E;const l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?E:l.status==="dirty"||a.value==="dirty"?Nr(l.value):l}}if(i.type==="refinement"){const s=l=>{const c=i.refinement(l,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?E:(l.status==="dirty"&&a.dirty(),s(l.value),{status:a.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?E:(l.status==="dirty"&&a.dirty(),s(l.value).then(()=>({status:a.value,value:l.value}))))}if(i.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Dt(s))return s;const l=i.transform(s.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Dt(s)?Promise.resolve(i.transform(s.value,o)).then(l=>({status:a.value,value:l})):s);N.assertNever(i)}}se.create=(r,t,a)=>new se({schema:r,typeName:w.ZodEffects,effect:t,...L(a)}),se.createWithPreprocess=(r,t,a)=>new se({schema:t,effect:{type:"preprocess",transform:r},typeName:w.ZodEffects,...L(a)});class me extends k{_parse(t){return this._getType(t)===T.undefined?H(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}me.create=(r,t)=>new me({innerType:r,typeName:w.ZodOptional,...L(t)});class De extends k{_parse(t){return this._getType(t)===T.null?H(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}De.create=(r,t)=>new De({innerType:r,typeName:w.ZodNullable,...L(t)});class zt extends k{_parse(t){const{ctx:a}=this._processInputParams(t);let n=a.data;return a.parsedType===T.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}zt.create=(r,t)=>new zt({innerType:r,typeName:w.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...L(t)});class Vt extends k{_parse(t){const{ctx:a}=this._processInputParams(t),n={...a,common:{...a.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ot(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Q(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Q(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Vt.create=(r,t)=>new Vt({innerType:r,typeName:w.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...L(t)});class Fr extends k{_parse(t){if(this._getType(t)!==T.nan){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.nan,received:a.parsedType}),E}return{status:"valid",value:t.data}}}Fr.create=r=>new Fr({typeName:w.ZodNaN,...L(r)});const Lg=Symbol("zod_brand");class Qa extends k{_parse(t){const{ctx:a}=this._processInputParams(t),n=a.data;return this._def.type._parse({data:n,path:a.path,parent:a})}unwrap(){return this._def.type}}class Ht extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?E:i.status==="dirty"?(a.dirty(),Nr(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?E:i.status==="dirty"?(a.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,a){return new Ht({in:t,out:a,typeName:w.ZodPipeline})}}class Wt extends k{_parse(t){const a=this._def.innerType._parse(t),n=i=>(Dt(i)&&(i.value=Object.freeze(i.value)),i);return Ot(a)?a.then(i=>n(i)):n(a)}unwrap(){return this._def.innerType}}Wt.create=(r,t)=>new Wt({innerType:r,typeName:w.ZodReadonly,...L(t)});function Fi(r,t={},a){return r?ut.create().superRefine((n,i)=>{var o,s;if(!r(n)){const l=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(s=(o=l.fatal)!==null&&o!==void 0?o:a)!==null&&s!==void 0?s:!0,u=typeof l=="string"?{message:l}:l;i.addIssue({code:"custom",...u,fatal:c})}}):ut.create()}const Cg={object:Z.lazycreate};var w;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(w||(w={}));const kg=(r,t={message:`Input not instance of ${r.name}`})=>Fi(a=>a instanceof r,t),Ui=ie.create,Zi=Le.create,Pg=Fr.create,Dg=Ce.create,Gi=Bt.create,Og=Fe.create,Ng=Br.create,Ig=Mt.create,Bg=Rt.create,Mg=ut.create,Rg=Ue.create,qg=Te.create,Fg=Mr.create,Ug=oe.create,Zg=Z.create,Gg=Z.strictCreate,Kg=qt.create,zg=Rr.create,Vg=Ft.create,Hg=ge.create,Wg=Ut.create,Yg=qr.create,Qg=Ze.create,Xg=pt.create,Jg=Zt.create,em=Gt.create,tm=Pe.create,rm=Kt.create,am=gt.create,Ki=se.create,nm=me.create,im=De.create,om=se.createWithPreprocess,sm=Ht.create;var e=Object.freeze({__proto__:null,defaultErrorMap:ct,setErrorMap:pg,getErrorMap:Dr,makeIssue:Or,EMPTY_PATH:gg,addIssueToContext:v,ParseStatus:z,INVALID:E,DIRTY:Nr,OK:H,isAborted:Va,isDirty:Ha,isValid:Dt,isAsync:Ot,get util(){return N},get objectUtil(){return za},ZodParsedType:T,getParsedType:Se,ZodType:k,datetimeRegex:Ri,ZodString:ie,ZodNumber:Le,ZodBigInt:Ce,ZodBoolean:Bt,ZodDate:Fe,ZodSymbol:Br,ZodUndefined:Mt,ZodNull:Rt,ZodAny:ut,ZodUnknown:Ue,ZodNever:Te,ZodVoid:Mr,ZodArray:oe,ZodObject:Z,ZodUnion:qt,ZodDiscriminatedUnion:Rr,ZodIntersection:Ft,ZodTuple:ge,ZodRecord:Ut,ZodMap:qr,ZodSet:Ze,ZodFunction:pt,ZodLazy:Zt,ZodLiteral:Gt,ZodEnum:Pe,ZodNativeEnum:Kt,ZodPromise:gt,ZodEffects:se,ZodTransformer:se,ZodOptional:me,ZodNullable:De,ZodDefault:zt,ZodCatch:Vt,ZodNaN:Fr,BRAND:Lg,ZodBranded:Qa,ZodPipeline:Ht,ZodReadonly:Wt,custom:Fi,Schema:k,ZodSchema:k,late:Cg,get ZodFirstPartyTypeKind(){return w},coerce:{string:r=>ie.create({...r,coerce:!0}),number:r=>Le.create({...r,coerce:!0}),boolean:r=>Bt.create({...r,coerce:!0}),bigint:r=>Ce.create({...r,coerce:!0}),date:r=>Fe.create({...r,coerce:!0})},any:Mg,array:Ug,bigint:Dg,boolean:Gi,date:Og,discriminatedUnion:zg,effect:Ki,enum:tm,function:Xg,instanceof:kg,intersection:Vg,lazy:Jg,literal:em,map:Yg,nan:Pg,nativeEnum:rm,never:qg,null:Bg,nullable:im,number:Zi,object:Zg,oboolean:()=>Gi().optional(),onumber:()=>Zi().optional(),optional:nm,ostring:()=>Ui().optional(),pipeline:sm,preprocess:om,promise:am,record:Wg,set:Qg,strictObject:Gg,string:Ui,symbol:Ng,transformer:Ki,tuple:Hg,undefined:Ig,union:Kg,unknown:Rg,void:Fg,NEVER:E,ZodIssueCode:m,quotelessJson:dg,ZodError:Q});const Yt=e.string(),lm=e.object({elementType:e.string().optional(),locator:Yt.optional(),errors:e.array(e.string()).optional()}),mt=e.object({validationItems:e.array(lm).optional(),success:e.boolean().optional()}),Ur=e.enum(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","CNY","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);e.enum(["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/North","Australia/NSW","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","CET","Chile/Continental","Chile/EasterIsland","CST6CDT","Cuba","EET","Egypt","Eire","EST","EST5EDT","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/Universal","Etc/UTC","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","Hongkong","HST","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","MST","MST7MDT","Navajo","NZ","NZ-CHAT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","PRC","PST8PDT","ROC","ROK","Singapore","Turkey","UCT","Universal","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","W-SU","WET","Zulu"]);const cm=e.enum(["generateDay","termStartDay","dueDay"]),um=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),Xa=e.enum(["account","inherit","policy"]),dm=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),pm=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),gm=e.enum(["none","first","second","third","fourth","fifth"]),zi=e.object({billingPreferences:e.object({billingPlanName:e.string().optional(),billingLevel:Xa.optional()}).optional(),installmentPreferences:e.object({installmentPlanName:e.string().optional(),anchorMode:cm.optional(),anchorTime:e.string().optional(),anchorType:um.optional(),cadence:dm.optional(),dayOfMonth:e.number().optional(),dayOfWeek:pm.optional(),dueLeadDays:e.number().optional(),generateLeadDays:e.number().optional(),maxInstallmentsPerTerm:e.number().optional(),weekOfMonth:gm.optional()}).optional()}),Ja=e.enum(["quote","policy","invoice","transaction","segment","term"]),en=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),Vi=e.enum(["info","block","decline","reject","approve"]),Qt=e.object({locator:e.string(),elementLocator:e.string().optional(),clearedBy:e.string().uuid().optional(),clearedTime:e.string().optional(),createdBy:e.string().uuid().optional(),createdTime:e.string().optional(),level:Vi.optional(),note:e.string().optional()}),mm=e.object({elementLocator:e.string(),level:Vi,note:e.string().optional()});e.object({addFlags:mm.array(),clearFlags:e.string().array()});const Hi=e.enum(["none","blocked","declined","rejected","approved"]),tn=e.enum(["years","months","weeks","days","hours"]),fm=e.object({column:e.string(),table:e.string(),where:e.record(e.object({key:e.string().optional()})).optional()}).optional(),Ge=e.object({displayName:e.string().optional(),defaultValue:e.string().optional(),type:e.string().optional(),minLength:e.number().optional(),maxLength:e.number().optional(),regex:e.string().optional(),min:e.string().optional(),multiline:e.boolean().optional(),max:e.string().optional(),options:e.array(e.string()).optional(),overrides:e.string().optional(),scope:e.string().optional(),inherited:e.boolean().optional(),precision:e.number().optional(),readOnly:e.boolean().optional(),searchable:e.boolean().optional(),roundingMode:e.string().optional(),constraint:fm,tag:e.array(e.string()).optional()});e.record(Ge);const ym=e.object({displayName:e.string().optional(),abstract:e.boolean().optional(),extend:e.string().optional(),data:e.record(Ge).optional(),defaultSearchable:e.boolean().optional()}),hm=e.record(ym),bm=e.object({defaultDeadlineDays:e.number(),blocksUnderwriting:e.boolean()}),vm=e.object({appliesTo:e.array(e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])),exclusive:e.boolean(),qualification:e.record(e.string())}),Tm=e.object({generateAutoRenewals:e.boolean(),renewalTransactionType:e.string().optional(),renewalCreateLeadDays:e.number().optional(),renewalAcceptLeadDays:e.number().optional(),renewalIssueLeadDays:e.number().optional(),newTermDuration:e.number().optional()}),jm=e.object({displayName:e.string(),expirationPeriod:e.number()}),Zr=e.object({availableAfter:e.string(),availabilityTimeBasis:e.string(),retireAfter:e.string(),retire:e.boolean(),retirementTimeBasis:e.string(),removeOnRenewalAfter:e.string(),removeOnRenewal:e.boolean()}),Am=e.object({displayName:e.string(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])});e.union([e.literal("accept"),e.literal("issue")]),e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const Wi=e.object({status:e.union([e.literal("queued"),e.literal("failed")]),error:e.string()});e.union([e.literal("queued"),e.literal("failed")]);const _m=e.object({displayName:e.string(),category:e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),handling:e.union([e.literal("normal"),e.literal("flat")]),invoicing:e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")])});e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),e.union([e.literal("normal"),e.literal("flat")]),e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")]);const wm=e.object({extend:e.string(),claimCategory:e.string(),abstract:e.boolean()}),Em=e.object({dataType:e.string(),isKey:e.boolean()}),xm=e.object({key:e.string(),values:e.array(e.string())}),rn=e.object({version1:e.string(),version2:e.string(),plugins:e.record(e.record(e.string())),latestVersion:e.string()}),$m=e.object({activities:e.record(e.record(bm)),assignmentRoles:e.record(vm),qualifications:e.record(e.array(e.string()))});e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),e.union([e.literal("accept"),e.literal("issue")]),e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),e.union([e.literal("immediate"),e.literal("deferDueDate")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]);const Sm=e.object({dataType:e.string(),makeDistinct:e.boolean()}),Lm=e.object({columns:e.record(Sm),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")])});e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")]);const Cm=e.object({displayName:e.string(),value:e.number(),tag:e.string()});e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]);const km=e.object({type:e.string()}),Yi=e.object({fields:e.array(e.string())}),Pm=e.object({enabled:e.boolean(),account:Yi,policy:Yi,productIndex:e.record(e.number()),regionIndex:e.record(e.number())}),Dm=e.object({offsetDays:e.number(),offsetBasis:e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")])});e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")]);const Om=e.object({displayName:e.string(),gracePeriodDays:e.number(),delinquencyLevel:e.union([e.literal("policy"),e.literal("invoice")]).optional(),lapseTransactionType:e.string().optional(),advanceLapseTo:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]).optional(),events:e.record(Dm)});e.union([e.literal("policy"),e.literal("invoice")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]),e.object({metadata:rn,pluginVersionStatus:e.record(e.record(e.string()))});const an=e.object({isSuccess:e.boolean(),errors:e.array(e.string()),metadata:rn});e.union([e.literal("queued"),e.literal("failed")]);const Nm=e.object({top:e.number().optional(),bottom:e.number().optional(),left:e.number().optional(),right:e.number().optional()});e.union([e.literal("transaction"),e.literal("policy"),e.literal("term"),e.literal("segment"),e.literal("policyUnique"),e.literal("termUnique"),e.literal("invoice")]),e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]),e.union([e.literal("dynamic"),e.literal("prerendered")]),e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),e.union([e.literal("letter"),e.literal("legal"),e.literal("A3"),e.literal("A4"),e.literal("A5"),e.literal("B4"),e.literal("B5")]);const Im=e.object({disburseExcess:e.boolean(),disbursementType:e.string(),excludeDebits:e.string(),disbursementThresholds:e.record(e.number())}),Qi=e.object({displayName:e.string(),cadence:e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),anchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),generateLeadDays:e.number(),dueLeadDays:e.number(),installmentWeights:e.array(e.number()),maxInstallmentsPerTerm:e.number()});e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]);const Bm=e.object({lossCategory:e.string()}),Mm=e.object({added:e.record(e.record(e.unknown())),modified:e.record(e.record(e.unknown())),removed:e.record(e.record(e.unknown()))}),Rm=e.object({displayName:e.string(),initialCoreNumber:e.string(),format:e.string(),copyFromQuote:e.boolean(),termNumberFormat:e.string(),quoteNumberFormat:e.string(),initialQuoteCoreNumber:e.string()}),qm=e.object({dataType:e.string()}),Fm=e.object({table:e.string(),column:e.string(),where:e.record(xm)}),fe=e.object({displayName:e.string(),type:e.string(),scope:e.string(),defaultValue:e.string(),min:e.string(),max:e.string(),minLength:e.number(),maxLength:e.number(),precision:e.number(),options:e.array(e.string()),regex:e.string(),roundingMode:e.union([e.literal("ceiling"),e.literal("down"),e.literal("floor"),e.literal("halfDown"),e.literal("halfEven"),e.literal("halfUp"),e.literal("up")]),tag:e.array(e.string()),constraint:Fm,searchable:e.boolean(),availability:Zr.optional()});e.union([e.literal("ceiling"),e.literal("down"),e.literal("floor"),e.literal("halfDown"),e.literal("halfEven"),e.literal("halfUp"),e.literal("up")]);const Um=e.object({displayName:e.string(),numberingString:e.string()}),Zm=e.object({selectionStartTime:e.string(),resourceNames:e.array(e.string())}),Gm=e.object({staticName:e.string()}),Km=e.object({resourceInstances:e.record(Gm),resourceGroups:e.record(Zm)}),zm=e.object({creditType:e.union([e.literal("any"),e.literal("creditDistribution"),e.literal("payment")])});e.union([e.literal("any"),e.literal("creditDistribution"),e.literal("payment")]);const Vm=e.object({items:e.record(qm)}),Hm=e.object({currencyTolerances:e.record(e.number())});e.record(e.unknown());const Wm=e.object({columns:e.record(Em),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")])}),Ym=e.object({locator:e.string(),name:e.string(),deploymentResult:an,bootstrapResult:Wi}),Qm=e.object({category:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),costBearing:e.boolean()});e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),e.object({tenantDescription:e.string().optional(),tenantName:e.string().optional()}),e.object({locator:e.string(),deploymentResult:an,resourceCloneStatus:e.union([e.literal("queued"),e.literal("failed")])}),e.object({tenantDescription:e.string().optional(),tenantName:e.string().optional()}),e.object({version:e.string()}),e.record(Mm),e.object({resolve:e.boolean().optional(),version:e.string()}),e.object({resolve:e.boolean().optional()});const Xm=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(fe),defaultInvoiceDocument:e.string(),numberingPlan:e.string(),invoiceNumberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),Jm=e.object({resources:Km}),ef=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(fe),abstract:e.boolean()}),tf=e.object({type:e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]),displayName:e.string(),options:e.record(Cm),value:fe,availability:Zr.optional()}),rf=e.object({displayName:e.string(),extend:e.string(),data:e.record(fe),defaultSearchable:e.boolean(),abstract:e.boolean()}),Xi=e.object({displayName:e.string(),extend:e.string(),data:e.record(fe),numberingPlan:e.string(),abstract:e.boolean()}),Ji=e.object({displayName:e.string(),scope:e.union([e.literal("transaction"),e.literal("policy"),e.literal("term"),e.literal("segment"),e.literal("policyUnique"),e.literal("termUnique"),e.literal("invoice")]),format:e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]),rendering:e.union([e.literal("dynamic"),e.literal("prerendered")]),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")]),trigger:e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),portrait:e.boolean().optional(),pageSize:e.union([e.literal("letter"),e.literal("legal"),e.literal("A3"),e.literal("A4"),e.literal("A5"),e.literal("B4"),e.literal("B5")]).optional(),margin:Nm.optional()}),Gr=e.object({extend:e.string(),pluralType:e.string(),displayName:e.string(),coverageTerms:e.array(e.string()),contents:e.array(e.string()),charges:e.array(e.string()),defaultSearchable:e.boolean(),data:e.record(fe),availability:Zr.optional(),abstract:e.boolean()}),af=e.object({extend:e.string(),lossType:e.string(),defaultSearchable:e.boolean(),data:e.record(fe),numberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),nf=e.object({displayName:e.string(),extend:e.string(),data:e.record(fe),abstract:e.boolean()}),of=e.object({extend:e.string(),defaultInstallmentPlan:e.string(),defaultBillingPlan:e.string(),defaultTermDuration:e.number(),defaultDelinquencyPlan:e.string().optional(),defaultAutoRenewalPlan:e.string().optional(),defaultShortfallTolerancePlan:e.string().optional(),displayName:e.string(),defaultDurationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),coverageTerms:e.array(e.string()),eligibleAccountTypes:e.array(e.string()),contents:e.array(e.string()),documents:e.array(e.string()),charges:e.array(e.string()),data:e.record(fe),staticData:e.record(fe),defaultSearchable:e.boolean(),pluralType:e.string(),defaultBillingTrigger:e.union([e.literal("accept"),e.literal("issue")]),numberingPlan:e.string().optional(),numberingString:e.string().optional(),availability:Zr.optional(),withPrecommitReapplication:e.boolean().optional(),abstract:e.boolean()}),Ke=e.object({defaultTimeZone:e.string(),defaultCurrency:e.string(),defaultTermDuration:e.number(),defaultInstallmentPlan:e.string(),defaultBillingPlan:e.string(),defaultDurationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),defaultBillingTrigger:e.union([e.literal("accept"),e.literal("issue")]),defaultBillingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),defaultBackdatedInstallmentsBilling:e.union([e.literal("immediate"),e.literal("deferDueDate")]),defaultDelinquencyPlan:e.string(),defaultAutoRenewalPlan:e.string(),defaultExcessCreditPlan:e.string(),defaultLapseType:e.string(),defaultAnchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),defaultGenerateLeadDays:e.number(),defaultDueLeadDays:e.number(),defaultAuxDataSettings:e.string(),defaultShortfallTolerancePlan:e.string(),regions:e.record(Um),defaultRegion:e.string(),defaultSearchable:e.boolean(),dataTypes:e.record(rf),accounts:e.record(Xm),policyLines:e.record(Gr),exposureGroups:e.record(Gr),exposures:e.record(Gr),coverages:e.record(Gr),products:e.record(of),coverageTerms:e.record(tf),charges:e.record(_m),transactionTypes:e.record(Qm),installmentPlans:e.record(Qi),billingPlans:e.record(Am),payments:e.record(nf),disbursements:e.record(Xi),tables:e.record(Wm),constraintTables:e.record(Lm),secrets:e.record(Vm),documents:e.record(Ji),auxDataSettings:e.record(jm),customEvents:e.record(km),delinquencyPlans:e.record(Om),shortfallTolerancePlans:e.record(Hm),autoRenewalPlans:e.record(Tm),excessCreditPlans:e.record(Im),reversalTypes:e.record(zm),numberingPlans:e.record(Rm),fnol:e.record(af),claims:e.record(wm),losses:e.record(Bm),contacts:e.record(ef),contactRoles:e.array(e.string()),workManagement:$m,dataAccessControl:Pm,bootstrap:Jm,defaultInvoiceDocument:e.string()});e.object({formData:Ke.optional()}),e.object({formData:Ke.optional()}),e.object({formData:Ke.optional()}),e.object({formData:Ke.optional(),overwrite:e.boolean().optional()}),e.object({description:e.string().optional(),formData:Ke.optional(),name:e.string().optional()}),e.object({config:Ke}),e.object({formData:Ke.optional()});const sf=e.enum(["none","required","excluded"]),eo=e.enum(["generateDay","termStartDay","dueDay"]),lf=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),Xt=e.enum(["accept","issue"]),ft=e.enum(["account","inherit","policy"]),to=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),cf=e.enum(["add","delete","modify","params"]),uf=e.enum(["none","premium","tax","fee","credit","commission","flatPremium","flatTax","flatFee","flatCommission","cededPremium","flatCededPremium","nonFinancial","surcharge"]),Jt=e.enum(["none","years","months","monthsE360","weeks","days","hours"]),df=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),pf=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),gf=e.enum(["product","coverage","exposure","exposureGroup","policyLine"]),mf=e.enum(["fuzzy","exact","startsWith"]);e.enum(["application/json","application/octet-stream","application/pdf","application/zip","application/x-zip-compressed","image/jpeg","image/png","image/svg+xml","text/x-java-source","multipart/form-data","text/csv","text/html","text/plain"]);var je=(r=>(r.applicationJson="application/json",r.applicationOctetStream="application/octet-stream",r.applicationPdf="application/pdf",r.applicationZip="application/zip",r.applicationZipWindows="application/x-zip-compressed",r.imageJpg="image/jpeg",r.imagePng="image/png",r.imageSvg="image/svg+xml",r.javaSource="text/x-java-source",r.multipartFormData="multipart/form-data",r.textCsv="text/csv",r.textHtml="text/html",r.text="text/plain",r))(je||{});const ro=e.enum(["quote","policy","invoice","transaction","segment","term"]),ao=e.enum(["unspecified","account","quote","policy"]),ff=e.enum(["coverage","gap"]),nn=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),on=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),yf=e.enum(["quote","transaction"]),no=e.enum(["none","info","block","decline","reject","approve"]),hf=e.enum(["none","first","second","third","fourth","fifth"]);e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]);const sn=e.enum(["text","html","pdf","jpg","jpeg","doc","docx","xls","xlsx","csv","txt","zip"]),ln=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),bf=e.enum(["clear","delete"]),vf=e.enum(["draft","validated","approved","executed","reversed","rejected","discarded"]),Tf=e.enum(["invoice","account"]),cn=e.enum(["ach","cash","eft","standard","wire"]),jf=e.enum(["transaction","policy","term","segment","policyUnique","termUnique","invoice"]),Af=e.enum(["policyStartTime","termStartTime","transactionEffectiveTime","currentTime"]),_f=e.enum(["validated","priced","accepted","issued","underwritten","generated"]),wf=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),Ef=e.enum(["active","pastDeadline","completed","cancelled"]),io=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),xf=e.enum(["active","completed","unassigned","discarded"]),$f=e.enum(["quote","policy","transaction","activity","fnol"]),Sf=e.enum(["active","discarded","locked"]),Lf=Xi.merge(e.object({displayName:e.string().optional(),numberingPlan:e.string().optional(),data:e.record(e.any()).optional(),extend:e.string().optional()})),Cf=e.record(Lf),kf=Ji.merge(e.object({displayName:e.string().optional(),scope:jf,format:sn.optional(),selectionTimeBasis:Af.optional(),trigger:_f.optional()})),Pf=e.record(kf),Df=Qi.merge(e.object({displayName:e.string().optional(),cadence:to,anchorMode:eo.optional(),generateLeadDays:e.number().optional(),dueLeadDays:e.number().optional(),installmentWeights:e.array(e.number()).optional(),maxInstallmentsPerTerm:e.number().optional()})),Of=e.record(Df),Nf=e.object({generateAutoRenewals:e.boolean(),newTermDuration:e.number().optional(),renewalAcceptLeadDays:e.number().optional(),renewalCreateLeadDays:e.number().optional(),renewalIssueLeadDays:e.number().optional(),renewalTransactionType:e.string().optional()}),If=e.record(Nf),Bf=e.object({selectionStartTime:e.string().optional(),resourceNames:e.array(e.string()).optional()}),Mf=e.object({staticName:e.string().optional()}),Rf=e.object({resourceGroups:e.record(Bf).optional(),resourceInstances:e.record(Mf).optional()}),qf=e.object({resources:Rf.optional()}),Ff=e.record(e.object({columns:e.record(e.object({dataType:e.string()})).optional(),selectionTimeBasis:e.string().optional()})),Uf=e.object({displayName:e.string().optional(),value:e.number().optional(),tag:e.string().optional()}),Zf=e.object({type:e.string(),displayName:e.string().optional(),options:e.record(Uf)}),Gf=e.record(Zf),Kf=e.enum(["policy","invoice"]),zf=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),Vf=e.object({displayName:e.string().optional(),gracePeriodDays:e.number(),advanceLapseTo:zf.optional(),delinquencyLevel:Kf.optional(),lapseTransactionType:e.string().optional(),events:e.record(e.any()).optional()}),Hf=e.record(Vf),Wf=e.object({displayName:e.string().optional(),contents:e.array(e.string()).optional(),abstract:e.boolean().optional(),extend:e.string().optional(),coverageTerms:e.array(e.string()).optional(),data:e.record(Ge).optional(),charges:e.array(e.string()).optional(),defaultSearchable:e.boolean().optional()}),er=e.record(Wf),Yf=e.object({abstract:e.boolean(),extend:e.string().optional(),data:e.record(Ge).optional(),displayName:e.string().optional()}),Qf=e.record(Yf),Xf=e.object({defaultTimeZone:e.string().optional(),defaultCurrency:e.string().optional(),defaultTermDuration:e.number().optional(),defaultDurationBasis:e.string().optional(),defaultInstallmentPlan:e.string().optional(),defaultDelinquencyPlan:e.string().optional(),defaultAuxDataSettings:e.string().optional(),defaultShortfallTolerancePlan:e.string().optional(),defaultAutoRenewalPlan:e.string().optional(),defaultBillingTrigger:e.string().optional(),defaultBillingLevel:e.string().optional()}),Jf=e.object({abstract:e.boolean().optional(),extend:e.string().optional(),displayName:e.string().optional(),coverageTerms:e.array(e.string()).optional(),eligibleAccountTypes:e.array(e.string()).optional(),contents:e.array(e.string()).optional(),documents:e.array(e.string()).optional(),charges:e.array(e.string()).optional(),plugins:e.any(),tables:e.any(),data:e.record(Ge).optional(),staticData:e.record(Ge).optional(),defaultSearchable:e.boolean().optional()}).merge(Xf),ey=e.record(Jf),ty=e.enum(["any","creditDistribution","payment"]),ry=e.object({creditType:ty.optional()}),ay=e.record(ry),ny=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),iy=e.object({category:ny,costBearing:e.boolean()}),oy=e.record(iy);e.object({dataTypes:er.optional(),accounts:hm,products:ey,coverageTerms:Gf.optional(),delinquencyPlans:Hf,autoRenewalPlans:If,transactionTypes:oy.optional(),reversalTypes:ay.optional(),dataAccessControl:e.any().optional(),bootstrap:qf.optional(),constraintTables:Ff.optional(),payments:Qf.optional(),documents:Pf.optional(),disbursements:Cf.optional(),installmentPlans:Of.optional(),policyLines:er.optional(),exposures:er.optional(),exposureGroups:er.optional(),coverages:er.optional(),defaultTimeZone:e.string().optional(),defaultCurrency:e.string().optional(),defaultTermDuration:e.number().optional(),defaultBillingTrigger:e.string().optional(),defaultInstallmentPlan:e.string().optional(),defaultAutoRenewalPlan:e.string().optional(),defaultBackdatedInstallmentsBilling:e.string().optional(),defaultExcessCreditPlan:e.string().optional(),defaultBillingPlan:e.string().optional(),defaultDurationBasis:tn.optional(),defaultDelinquencyPlan:e.string().optional(),defaultAuxDataSettings:e.string().optional(),defaultBillingLevel:e.string().optional(),defaultShortfallTolerancePlan:e.string().optional(),defaultSearchable:e.boolean().optional(),defaultInvoiceDocument:e.string().optional(),charges:e.any(),billingPlans:e.any(),tables:e.any(),secrets:e.any(),auxDataSettings:e.any(),customEvents:e.any(),shortfallTolerancePlans:e.any(),excessCreditPlans:e.any()});const sy=e.object({abstract:e.boolean().optional(),extend:e.string().optional(),displayName:e.string().optional(),data:e.record(Ge).optional()});e.record(sy);const ly=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),oo=e.union([ly,e.string()]),Kr=tn,cy=e.enum(["accept","issue"]),uy=Xa;e.record(e.string().ulid(),e.record(e.object({column:e.string(),table:e.string(),where:e.record(e.object({staticLocator:e.string(),fieldName:e.string(),values:e.array(e.string()).optional()})).optional()}))),e.record(e.string().ulid(),e.record(e.record(e.union([e.string(),e.record(e.string())])))),e.record(e.string().ulid(),e.record(e.array(e.string())));const so=e.object({type:e.string(),staticLocator:e.string().optional(),parentLocator:e.string().optional(),coverageTerms:e.record(e.string()).optional(),data:e.record(e.any()).optional()});so.extend({elements:e.array(so).optional()});const un=e.object({locator:e.string().ulid(),removeCoverageTerms:e.record(e.unknown()).optional(),removeData:e.record(e.unknown()).optional(),setCoverageTerms:e.record(e.unknown()).optional(),setData:e.record(e.unknown()).optional()});e.object({productName:e.string().optional(),delinquencyPlanName:e.string().optional(),startTime:e.string().optional(),endTime:e.string().optional(),currency:e.string().optional(),expirationTime:e.string().optional(),setData:e.record(e.any()).optional(),removeData:e.record(e.any()).optional(),elements:e.array(un).optional(),timezone:e.string().optional(),billingPlan:e.string().optional(),defaultTermDuration:e.string().optional(),installmentPlan:e.string().optional(),durationBasis:e.string().optional(),setCoverageTerms:e.record(e.any()).optional(),removeCoverageTerms:e.record(e.any()).optional(),preferences:e.object({billingPreferences:e.object({billingPlanName:e.string().optional(),billingLevel:e.enum(["account","inherit","policy"]).optional()}).optional(),installmentPreferences:e.object({installmentPlanName:e.string().optional(),anchorMode:e.enum(["generateDay","termStartDay","dueDay"]).optional(),anchorTime:e.string().optional(),anchorType:e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]).optional(),cadence:e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]).optional(),dayOfMonth:e.number().optional(),dayOfWeek:e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]).optional(),dueLeadDays:e.number().optional(),generateLeadDays:e.number().optional(),maxInstallmentsPerTerm:e.number().optional(),weekOfMonth:e.enum(["none","first","second","third","fourth","fifth"]),installmentPlanWeights:e.array(e.number()).optional()}).optional()}).optional()});const tr=e.string().ulid(),dy=e.object({locator:tr,staticLocator:tr,rootLocator:tr.optional(),tenantLocator:tr.optional(),type:e.string(),data:e.record(e.any()).optional(),parentLocator:tr.optional(),coverageTerms:e.record(e.string()).optional(),originalEffectiveTime:e.string().optional()}),dn=dy.extend({elements:e.lazy(()=>dn.array().optional())});e.object({locator:Yt,quoteState:oo,productName:e.string(),accountLocator:Yt,startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:Hi.optional(),expirationTime:e.string().optional(),element:dn.optional(),type:e.string().optional(),duration:e.number().optional(),durationBasis:Kr.optional(),boundTime:e.string().optional(),issuedTime:e.string().optional(),policyLocator:Yt.optional(),validationResult:mt.optional(),preferences:e.any().optional(),delinquencyPlanName:e.string().optional(),autoRenewalPlanName:e.string().optional(),billingLevel:uy.optional(),billingTrigger:cy.optional(),coverageTerms:e.record(e.string()).optional(),groupLocator:Yt.optional()});const py=e.enum(["premium","tax","fee","credit","cededPremium","nonFinancial","surcharge"]),gy=e.object({locator:e.string(),elementLocator:e.string(),chargeType:e.string(),chargeCategory:py,amount:e.number(),rate:e.number(),referenceRate:e.number(),elementStaticLocator:e.string(),tag:e.string().optional(),rateDifference:e.number().optional(),reversalOfLocator:e.string().optional()});e.object({quoteLocator:e.string(),accountLocator:e.string(),quoteState:oo,productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number().optional(),durationBasis:Kr.optional(),items:e.array(gy).optional()}),e.object({quoteLocator:e.string(),clearedFlags:Qt.array().optional(),flags:Qt.array().optional()});const my=e.enum(["clear","delete"]);e.object({deleteAllAutomaticDocuments:e.boolean(),resetAllUnderwritingFlags:e.boolean(),resetFlagsAction:my,deleteDocuments:e.string().array(),resetFlags:e.string().array()});const pn=e.object({accountLocator:e.string()});e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const zr=e.object({contactLocator:e.string(),roles:e.array(e.string())});e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")]);const rr=e.object({action:e.string()}),re=e.lazy(()=>e.object({type:e.string(),locator:e.string(),parentLocator:e.string(),elements:e.array(re),coverageTerms:e.record(e.string()),data:e.record(e.record(e.unknown())),staticLocator:e.string(),originalEffectiveTime:e.string().optional(),category:e.union([e.literal("product"),e.literal("coverage"),e.literal("exposure"),e.literal("exposureGroup"),e.literal("policyLine")]).optional()}));e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]);const lo=e.object({locator:e.string(),action:e.union([e.literal("reversed"),e.literal("reapplied"),e.literal("invalidated")])});e.union([e.literal("reversed"),e.literal("reapplied"),e.literal("invalidated")]),e.union([e.literal("active"),e.literal("discarded"),e.literal("doNotRenew"),e.literal("issued"),e.literal("error"),e.literal("terminated"),e.literal("invalidated")]);const co=e.object({billingPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]).optional()}),Vr=e.object({locator:e.string(),elementLocator:e.string(),chargeType:e.string(),chargeCategory:e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),amount:e.number(),rate:e.number(),referenceRate:e.number(),tag:e.string().optional(),rateDifference:e.number().optional(),elementStaticLocator:e.string(),reversalOfLocator:e.string().optional(),handling:e.union([e.literal("normal"),e.literal("flat")]),invoicing:e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")])});e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),e.union([e.literal("normal"),e.literal("flat")]),e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")]);const fy=e.object({staticLocator:e.string(),fieldName:e.string(),values:e.array(e.string())}),gn=e.object({table:e.string(),column:e.string(),where:e.record(fy)}),yy=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),hy=e.object({termLocator:e.string(),policyLocator:e.string(),autoRenewalState:e.union([e.literal("active"),e.literal("discarded"),e.literal("doNotRenew"),e.literal("issued"),e.literal("error"),e.literal("terminated"),e.literal("invalidated")]).optional(),renewalTransactionType:e.string().optional(),newTermDuration:e.number().optional(),renewalTransactionCreateTime:e.string(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionLocator:e.string().optional()}),ar=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),staticElementLocators:e.array(e.string()).optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),staticElementLocators:e.array(e.string())})),by=e.object({locator:e.string(),name:e.string(),staticName:e.string(),documentInstanceState:e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),state:e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")])});e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),e.union([e.literal("product"),e.literal("coverage"),e.literal("exposure"),e.literal("exposureGroup"),e.literal("policyLine")]);const vy=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),data:e.record(e.record(e.unknown())),chargeSummaries:e.record(e.number())}),uo=e.object({cadence:e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]).optional(),anchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]).optional(),generateLeadDays:e.number().optional(),dueLeadDays:e.number().optional(),installmentWeights:e.array(e.number()),maxInstallmentsPerTerm:e.number().optional(),installmentPlanName:e.string().optional(),anchorType:e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]).optional(),dayOfMonth:e.number().optional(),dayOfWeek:e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]).optional(),weekOfMonth:e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]).optional(),anchorTime:e.string().optional()});e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]),e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]),e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]);const Ty=e.object({historyLocator:e.string(),staticData:e.record(e.record(e.unknown())),updatedBy:e.string(),updatedAt:e.string()}),nr=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),staticLocator:e.string().optional(),setData:e.record(e.record(e.unknown())).optional(),removeData:e.record(e.record(e.unknown())).optional(),setCoverageTerms:e.record(e.string()).optional(),removeCoverageTerms:e.record(e.record(e.unknown())).optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),staticLocator:e.string(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown()))})),le=e.object({installmentPreferences:uo.optional(),billingPreferences:co.optional()}),jy=e.object({renewalTransactionType:e.string().optional(),newTermDuration:e.number().optional(),renewalTransactionCreateTime:e.string().optional(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionLocator:e.string().optional()}),Hr=e.object({locator:e.string(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown()))}),Ay=e.object({setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown())),currency:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),elements:e.array(Hr)}),po=e.object({setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown())),currency:e.string(),timezone:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),elements:e.array(Hr),preferences:le,billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),delinquencyPlanName:e.string(),autoRenewalPlanName:e.string(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])});e.union([e.literal("accept"),e.literal("issue")]);const mn=e.object({setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown()))});e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]);const go=e.object({toTransaction:e.string(),reverseTransactions:e.array(e.string()),baseLocator:e.string()});e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]);const _y=e.object({productName:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),currency:e.string(),timezone:e.string(),coverageTerms:e.record(e.string()),data:e.record(e.record(e.unknown())),elements:e.array(re),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")])});e.object({tenantLocator:e.string(),quickQuoteLocator:e.string(),accountLocator:e.string().optional(),quickQuoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]),productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),items:e.array(Vr),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")])}),e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]);const mo=e.object({productName:e.string(),accountLocator:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),currency:e.string(),timezone:e.string(),coverageTerms:e.record(e.string()),data:e.record(e.record(e.unknown())),elements:e.array(re),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),preferences:le,delinquencyPlanName:e.string(),autoRenewalPlanName:e.string(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string(),static:e.record(e.record(e.unknown()))}),ae=e.object({quoteLocator:e.string()}),wy=e.object({quoteLocator:e.string(),underwritingStatus:e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")])}),Ey=e.object({quoteLocator:e.string()}),ir=e.object({groupLocator:e.string()}),xy=e.object({tenantLocator:e.string(),quoteLocator:e.string(),accountLocator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),items:e.array(Vr),quoteNumber:e.string()});e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]);const ze=e.object({locator:e.string(),level:e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]),referenceType:e.union([e.literal("quote"),e.literal("transaction")]),referenceLocator:e.string(),note:e.string(),tag:e.string(),elementLocator:e.string(),createdBy:e.string(),createdTime:e.string(),clearedBy:e.string(),clearedTime:e.string()}),$y=e.object({tenantLocator:e.string(),quoteLocator:e.string(),accountLocator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),underwritingStatus:e.string(),underwritingFlags:e.array(ze)}),fn=e.object({resetAllUnderwritingFlags:e.boolean(),resetFlags:e.array(e.string()),resetFlagsAction:e.union([e.literal("clear"),e.literal("delete")]),deleteAllAutomaticDocuments:e.boolean(),deleteDocuments:e.array(e.string())});e.union([e.literal("clear"),e.literal("delete")]);const yt=e.object({locator:e.string(),transactionLocator:e.string(),segmentType:e.union([e.literal("coverage"),e.literal("gap")]),startTime:e.string(),endTime:e.string(),element:re,duration:e.number(),basedOn:e.string().optional()});e.union([e.literal("coverage"),e.literal("gap")]);const Sy=e.object({locator:e.string(),type:e.union([e.literal("coverage"),e.literal("gap")]),basedOn:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),elements:e.array(vy),documentSummary:e.array(by)});e.union([e.literal("coverage"),e.literal("gap")]);const Ly=e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),number:e.number(),previousTermLocator:e.string().optional(),supersedesTermLocator:e.string().optional(),startTime:e.string(),endTime:e.string(),autoRenewalLocator:e.string().optional(),termNumber:e.string().optional()});e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),number:e.number(),startTime:e.string(),endTime:e.string(),amount:e.number()}),e.object({policyLocator:e.string(),locator:e.string(),staticLocator:e.string(),termNumber:e.number(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),subsegments:e.array(Sy)}),e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]);const x=e.object({policyLocator:e.string(),transactionLocator:e.string()}),or=e.object({policyLocator:e.string(),transactionLocator:e.string(),underwritingStatus:e.string()}),sr=e.object({policyLocator:e.string(),transactionLocator:e.string()}),Cy=e.lazy(()=>e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionState:e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]),effectiveTime:e.string(),charges:e.array(Vr),aggregatedTransactions:e.array(Cy)})),fo=e.object({locator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionType:e.string(),effectiveTime:e.string(),issuedTime:e.string(),preferences:le,segment:yt}),ky=e.lazy(()=>e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionState:e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]),effectiveTime:e.string(),underwritingStatus:e.string(),underwritingFlags:e.array(ze),aggregatedTransactions:e.array(ky)})),Py=e.object({transactionLocator:e.string(),flags:e.array(ze),clearedFlags:e.array(ze)}),yo=e.object({level:e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]),note:e.string(),tag:e.string(),elementLocator:e.string()});e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]),e.union([e.literal("quote"),e.literal("transaction")]);const yn=e.object({addFlags:e.array(yo),clearFlags:e.array(e.string())}),ho=e.object({autoRenewalPlanName:e.string()}),Dy=e.object({renewalTransactionType:e.string().optional(),newTermDuration:e.number().optional(),renewalTransactionCreateTime:e.string(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionLocator:e.string().optional()}),Wr=e.object({billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])}),Oy=e.object({billingTrigger:e.union([e.literal("accept"),e.literal("issue")])}),hn=e.object({delinquencyPlanName:e.string()}),bo=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),Oe=e.object({validationItems:e.array(bo),success:e.boolean()});e.object({locator:e.string(),requestBody:e.array(re)}),e.array(yt),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.array(yt),e.object({locator:e.string(),requestBody:Hr}),e.array(yt);const lr=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),elements:e.array(re).optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),elements:e.array(re)})),Ve=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),effectiveTime:e.string().optional(),newPolicyEndTime:e.string().optional(),preferences:le.optional(),billingModeChange:e.boolean().optional(),triggerBillingChange:e.boolean().optional(),inheritSettings:e.boolean().optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),effectiveTime:e.string()})),Ny=e.lazy(()=>e.object({locator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionState:e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]),underwritingStatus:e.string().optional(),policyLocator:e.string(),baseTransactionLocator:e.string().optional(),aggregateTransactionLocator:e.string().optional(),createdAt:e.string(),createdBy:e.string(),validationResult:Oe.optional(),changeInstructions:e.array(e.record(e.unknown())),effectiveTime:e.string(),aggregatedTransactions:e.array(Ny),termLocator:e.string(),preferences:le.optional(),transactionType:e.string(),issuedTime:e.string().optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]).optional(),acceptedTime:e.string().optional(),reapplicationOfLocator:e.string().optional()}));e.object({locator:e.string()}),e.record(e.record(e.unknown())),e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))});const vo=e.object({locator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),accountLocator:e.string(),startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:e.string().optional(),expirationTime:e.string().optional(),element:re,preferences:le.optional(),policyLocator:e.string().optional(),delinquencyPlanName:e.string().optional(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]).optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]).optional(),groupLocator:e.string(),autoRenewalPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string().optional(),quoteNumber:e.string().optional(),duration:e.number().optional(),acceptedTime:e.string().optional(),issuedTime:e.string().optional(),validationResult:Oe.optional(),quickQuoteLocator:e.string().optional(),policyNumber:e.string(),static:e.record(e.record(e.unknown()))});e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))}),e.object({locator:e.string(),requestBody:mn}),e.object({locator:e.string(),requestBody:e.array(re)}),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.object({locator:e.string(),requestBody:e.array(re)}),e.object({locator:e.string(),quickQuoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]),productName:e.string(),accountLocator:e.string().optional(),startTime:e.string().optional(),endTime:e.string().optional(),duration:e.number().optional(),expirationTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]).optional(),groupLocator:e.string(),element:re,validationResult:Oe.optional()}),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.object({locator:e.string()}),e.record(e.record(e.unknown())),e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))});const To=e.object({locator:e.string(),accountLocator:e.string(),branchHeadTransactionLocators:e.array(e.string()),issuedTransactionLocator:e.string(),productName:e.string(),timezone:e.string(),currency:e.string(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),createdAt:e.string(),createdBy:e.string(),delinquencyPlanName:e.string().optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),autoRenewalPlanName:e.string().optional(),startTime:e.string(),endTime:e.string(),latestTermLocator:e.string(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string().optional(),policyNumber:e.string().optional(),latestSegmentLocator:e.string(),validationResult:Oe.optional(),static:e.record(e.record(e.unknown()))});e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))}),e.object({locator:e.string(),requestBody:mn}),e.object({locator:e.string()}),e.object({locator:e.string(),autoRenewalState:e.union([e.literal("active"),e.literal("discarded"),e.literal("doNotRenew"),e.literal("issued"),e.literal("error"),e.literal("terminated"),e.literal("invalidated")]),policyLocator:e.string(),termLocator:e.string(),renewalTransactionType:e.string(),renewalTransactionLocator:e.string().optional(),renewalTransactionCreateTime:e.string().optional(),renewalTransactionCreatedTime:e.string().optional(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionAcceptedTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionIssuedTime:e.string().optional(),newTermDuration:e.number().optional(),validationResult:Oe.optional()}),e.object({locator:e.string(),requestBody:Dy}),e.object({locator:e.string(),requestBody:jy}),e.object({locator:e.string()});const Iy=e.object({locator:e.string(),type:e.string(),accountState:e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")]),data:e.record(e.record(e.unknown())),delinquencyPlanName:e.string(),shortfallTolerancePlanName:e.string(),autoRenewalPlanName:e.string(),excessCreditPlanName:e.string(),preferences:le,validationResult:Oe.optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string(),invoiceDocument:e.string(),accountNumber:e.string(),contacts:e.array(zr),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")])}),jo=e.object({type:e.string(),autoValidate:e.boolean(),data:e.record(e.record(e.unknown())),delinquencyPlanName:e.string(),shortfallTolerancePlanName:e.string(),autoRenewalPlanName:e.string(),excessCreditPlanName:e.string(),preferences:le,billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string(),invoiceDocument:e.string(),contacts:e.array(zr)}),By=e.object({type:e.string(),delinquencyPlanName:e.string(),shortfallTolerancePlanName:e.string(),autoRenewalPlanName:e.string(),excessCreditPlanName:e.string(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),preferences:le,billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),invoiceDocument:e.string(),autoValidate:e.boolean()});e.object({locator:e.string(),requestBody:e.record(e.record(e.record(e.string())))}),e.record(e.record(e.array(e.string()))),e.object({locator:e.string()}),e.object({requestBody:mo}),e.object({locator:e.string(),quoteNumber:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ir.optional()}),e.object({locator:e.string(),requestBody:e.record(e.record(e.record(e.string())))}),e.record(e.record(e.array(e.string()))),e.object({requestBody:_y}),e.object({accountLocator:e.string(),locator:e.string(),markAsQuoted:e.boolean().optional()}),e.object({locator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),accountLocator:e.string(),startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:e.string().optional(),expirationTime:e.string().optional(),element:re,preferences:le.optional(),policyLocator:e.string().optional(),delinquencyPlanName:e.string().optional(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]).optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]).optional(),groupLocator:e.string(),autoRenewalPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string().optional(),quoteNumber:e.string().optional(),duration:e.number().optional(),acceptedTime:e.string().optional(),issuedTime:e.string().optional(),validationResult:Oe.optional(),quickQuoteLocator:e.string().optional()}),e.object({locator:e.string(),requestBody:ir.optional()}),e.object({locator:e.string(),requestBody:e.record(e.record(e.record(e.string())))}),e.record(e.record(e.array(e.string()))),e.object({locator:e.string(),policyNumber:e.string()}),e.object({locator:e.string()}),e.object({requestBody:hy}),e.object({requestBody:jo}),e.object({accountNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({accountLocator:e.string()}),e.array(zr),e.object({accountLocator:e.string(),requestBody:zr}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:yn}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:fn.optional(),resetToDraft:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({autoRebase:e.boolean().optional(),locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({instructionLocator:e.string(),locator:e.string()}),e.object({instructionLocator:e.string(),locator:e.string(),requestBody:e.union([lr,ar,nr,Ve])}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:po}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()});const My=e.object({quoteLocator:e.string(),flags:e.array(ze),clearedFlags:e.array(ze)});e.object({locator:e.string(),requestBody:yn}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:fn.optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:hn}),e.object({locator:e.string(),requestBody:Wr}),e.object({locator:e.string(),requestBody:ho}),e.object({locator:e.string(),requestBody:ir}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Ay}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ir}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([lr,ar,nr,Ve])),transactionType:e.string()}),e.object({locator:e.string(),requestBody:go}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([lr,ar,nr,Ve]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:Ve.optional()}),e.object({locator:e.string(),requestBody:hn}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([lr,ar,nr,Ve]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:Ve}),e.object({locator:e.string(),requestBody:Oy}),e.object({locator:e.string(),requestBody:Wr}),e.object({locator:e.string(),requestBody:ho}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Wr}),e.object({accountLocator:e.string(),contactLocator:e.string()}),e.object({accountLocator:e.string(),contactLocator:e.string(),requestBody:yy}),e.object({locator:e.string()}),e.object({locator:e.string(),segmentLocator:e.string()}),e.object({locator:e.string()}),e.array(yt),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.record(e.record(gn)),e.object({locator:e.string()}),e.object({locator:e.string()}),e.array(lo),e.object({locator:e.string()}),e.array(lo),e.object({segmentLocator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({termNumber:e.string()}),e.array(Ly),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({listCompleted:e.boolean(),items:e.array(Ty)}),e.object({locator:e.string()}),e.record(e.record(gn)),e.object({quoteNumber:e.string()}),e.array(vo),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.record(e.record(gn)),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string(),termNumber:e.number().optional()}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({byIssuedTime:e.boolean().optional(),date:e.string(),locator:e.string()});const Ao=e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),timezone:e.string(),currency:e.string(),region:e.string(),transaction:fo,delinquencyPlanName:e.string().optional(),static:e.record(e.record(e.unknown()))});e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),offset:e.number().optional()}),e.array(Ao),e.object({policyNumber:e.string()}),e.array(To);const Ry=e.object({"policy.account.update":pn.optional(),"policy.account.validate":pn.optional(),"policy.account.create":pn.optional()}),qy=e.object({"policy.quote.issue":ae.optional(),"policy.quote.staticdata.replace":ae.optional(),"policy.quote.create":ae.optional(),"policy.quote.reset":ae.optional(),"policy.quote.staticdata.update":ae.optional(),"policy.quote.refuse":ae.optional(),"policy.quote.staticdata.add":ae.optional(),"policy.quote.underwrite":wy.optional(),"policy.quote.manualunderwrite":Ey.optional(),"policy.quote.update":ae.optional(),"policy.quote.price":ae.optional(),"policy.quote.validate":ae.optional(),"policy.quote.discard":ae.optional(),"policy.quote.accept":ae.optional()}),Fy=e.object({"policy.renewal.accept":x.optional(),"policy.cancellation.reset":x.optional(),"policy.cancellation.issue":x.optional(),"policy.reversal.accept":x.optional(),"policy.cancellation.accept":x.optional(),"policy.change.discard":x.optional(),"policy.change.issue":x.optional(),"policy.cancellation.validate":x.optional(),"policy.reversal.underwrite":or.optional(),"policy.cancellation.price":x.optional(),"policy.reversal.update":x.optional(),"policy.cancellation.refuse":x.optional(),"policy.change.accept":x.optional(),"policy.renewal.refuse":x.optional(),"policy.reinstatement.create":x.optional(),"policy.reinstatement.reset":x.optional(),"policy.renewal.underwrite":or.optional(),"policy.reversal.reset":x.optional(),"policy.change.update":x.optional(),"policy.reversal.validate":x.optional(),"policy.change.refuse":x.optional(),"policy.reversal.issue":x.optional(),"policy.cancellation.update":x.optional(),"policy.change.manualUnderwrite":sr.optional(),"policy.change.create":x.optional(),"policy.reinstatement.update":x.optional(),"policy.renewal.manualUnderwrite":sr.optional(),"policy.reinstatement.discard":x.optional(),"policy.renewal.price":x.optional(),"policy.reversal.discard":x.optional(),"policy.reinstatement.price":x.optional(),"policy.change.validate":x.optional(),"policy.cancellation.underwrite":or.optional(),"policy.change.underwrite":or.optional(),"policy.renewal.validate":x.optional(),"policy.reinstatement.accept":x.optional(),"policy.reversal.price":x.optional(),"policy.cancellation.create":x.optional(),"policy.reinstatement.refuse":x.optional(),"policy.renewal.create":x.optional(),"policy.renewal.reset":x.optional(),"policy.cancellation.manualUnderwrite":sr.optional(),"policy.change.price":x.optional(),"policy.cancellation.discard":x.optional(),"policy.renewal.update":x.optional(),"policy.renewal.issue":x.optional(),"policy.reinstatement.issue":x.optional(),"policy.change.reset":x.optional(),"policy.reversal.manualUnderwrite":sr.optional(),"policy.reinstatement.underwrite":or.optional(),"policy.reinstatement.validate":x.optional(),"policy.reinstatement.manualUnderwrite":sr.optional(),"policy.reversal.refuse":x.optional(),"policy.renewal.discard":x.optional(),"policy.reversal.create":x.optional()});e.object({count:e.number().optional(),extended:e.boolean().optional(),includeStaticData:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeStaticData:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountNumber:e.string()}),e.array(Iy),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string(),requestBody:e.union([lr,ar,nr,Ve])}),e.object({locator:e.string(),requestBody:jo}),e.object({locator:e.string(),requestBody:By}),e.object({accountEvents:Ry.optional(),quoteEvents:qy.optional(),transactionEvents:Fy.optional()});const Yr=e.string().uuid(),$=e.string().ulid(),_=e.string().datetime();e.string().datetime({offset:!0});const Ae=e.record(e.string(),e.string()),q=e.record(e.string(),e.any()),ht=Yr,F=Yr,cr=$,Ne=$,bt=$,_e=$,Qr=$,bn=$,_o=$,ur=$,Uy=$,wo=$,Eo=$,xo=$;function Ie(r){return e.object({listCompleted:e.boolean(),items:e.array(r)})}function Zy(r){return e.array(r)}const Gy=bo.merge(e.object({locator:Ne})),vn=Oe.merge(e.object({validationItems:e.array(Gy).optional()}));e.object({offset:e.coerce.number().nonnegative().int().optional(),count:e.coerce.number().nonnegative().int().optional()});const Ky=e.object({type:e.string(),locator:Ne,staticLocator:$,parentLocator:Ne,originalEffectiveTime:_.optional(),category:gf.optional(),data:q.optional(),coverageTerms:Ae.optional()}),$o=Ky.extend({elements:e.lazy(()=>$o.array().optional())}),zy=e.object({type:e.string(),staticLocator:$.optional(),parentLocator:Ne,data:q,coverageTerms:Ae}),Tn=zy.extend({elements:e.lazy(()=>Tn.array().optional())}),Vy=Hr.merge(e.object({locator:Ne,setData:q,removeData:q,setCoverageTerms:Ae,removeCoverageTerms:q})),Hy=yt.merge(e.object({locator:bn,segmentType:ff,startTime:_,endTime:_,element:$o,basedOn:$.optional()})),So=To.merge(e.object({locator:$,accountLocator:$,branchHeadTransactionLocators:e.array($),issuedTransactionLocator:$,durationBasis:Jt,createdAt:_,createdBy:F,startTime:_,endTime:_,billingTrigger:Xt,billingLevel:ft,latestSegmentLocator:$,static:q}));Ie(So),mn.merge(e.object({setData:q,removeData:q}));const Lo=uo.merge(e.object({cadence:to.optional(),anchorMode:eo.optional(),anchorType:lf.optional(),dayOfWeek:df.optional(),weekOfMonth:hf.optional(),installmentWeights:e.array(e.number()).optional()})),Co=co.merge(e.object({billingLevel:ft})),vt=le.merge(e.object({installmentPreferences:Lo.optional(),billingPreferences:Co.optional()})),Wy=fo.merge(e.object({locator:$,transactionCategory:nn,preferences:vt,segment:Hy}));Ao.merge(e.object({locator:$,accountLocator:$,static:q,transaction:Wy})),Wr.merge(e.object({billing:ft})),hn.merge(e.object({})),Zy(So);const ko=e.object({installmentPreferences:Lo.optional(),billingPreferences:Co.optional()});e.object({tenantLocator:ht,policyLocator:bt});const Yy=e.enum(["draft","validated","discarded"]),jn=e.enum(["account","policy"]),Po=e.object({type:e.string().optional(),autoValidate:e.boolean().optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),excessCreditPlanName:e.string().optional(),shortfallTolerancePlanName:e.string().optional(),billingLevel:jn.optional(),invoiceDocument:e.string().optional(),preferences:ko.optional()});Po.extend({data:e.record(e.any()).optional()}),Po.extend({setData:e.record(e.any()).optional(),removeData:e.record(e.any()).optional()}),e.object({locator:e.string().ulid(),type:e.string(),accountState:Yy,data:e.record(e.any()).optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),excessCreditPlanName:e.string().optional(),shortfallTolerancePlanName:e.string().optional(),billingLevel:jn.optional(),invoiceDocument:e.string().optional(),validationResult:mt.optional(),preferences:ko.optional()}),e.enum(["","?","+","*","!"]),e.enum(["?","*"]);const An=tn,Qy=Xa,Xy=e.enum(["accept","issue"]);e.object({locator:e.string(),accountLocator:e.string(),issuedTransactionLocator:e.string(),latestTermLocator:e.string(),productName:e.string(),startTime:e.string(),endTime:e.string(),durationBasis:An,billingLevel:Qy,billingTrigger:Xy,createdAt:e.string().optional(),createdBy:e.string().optional(),currency:e.string(),timezone:e.string().optional(),branchHeadTransactionLocators:e.array(e.string()).optional(),static:e.record(e.any()).optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),validationResult:mt.optional()});const _n=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),Xr=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),Jy=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),element:dn,segmentType:e.enum(["coverage","gap"]),basedOn:e.string().optional()}),eh=e.object({locator:e.string(),issuedTime:e.string(),effectiveTime:e.string(),preferences:zi.optional(),segment:Jy,transactionCategory:Xr,transactionType:e.string()}),Do=e.object({locator:e.string(),staticName:e.string().optional(),name:e.string().optional(),documentInstanceState:en,referenceType:Ja}),th=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()).optional(),data:e.record(e.any()).optional()}),rh=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string().optional(),type:e.enum(["coverage","gap"]),documentSummary:Do.array().optional(),elements:th.array()});e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:An,termNumber:e.number().int(),subsegments:rh.array().optional(),documentSummary:Do.array().optional()});const ah=e.object({locator:e.string(),staticLocator:e.string(),name:e.string(),state:en,referenceType:Ja}),nh=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()),data:e.record(e.any())}),ih=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string(),type:e.enum(["coverage","gap"]),documentSummary:ah.array(),elements:nh.array()}),Oo=e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string()});Oo.extend({number:e.number().int(),autoRenewalLocator:e.string().optional(),previousTermLocator:e.string().optional(),supersedesTermLocator:e.string().optional()}),Oo.extend({duration:e.number(),durationBasis:An,termNumber:e.number().int(),subsegments:ih.array()}),e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),currency:e.string(),timezone:e.string(),transaction:eh,static:e.record(e.any()).optional(),delinquencyPlanName:e.string().optional()}),e.object({locator:e.string(),referenceLocator:e.string(),documentInstanceState:en,createdAt:e.string(),referenceType:Ja.optional(),metadata:e.record(e.any()).optional(),renderingData:e.record(e.any()).optional(),policyLocator:e.string().optional(),referenceDocumentLocator:e.string().optional(),segmentLocator:e.string().optional(),termLocator:e.string().optional(),transactionLocator:e.string().optional(),staticName:e.string().optional(),name:e.string().optional(),createdBy:e.string().optional(),documentFormat:e.enum(["text","html","pdf"]).optional(),processingErrors:e.string().optional(),readyAt:e.string().optional()});const No=e.object({locator:e.string(),policyLocator:e.string(),termLocator:e.string(),transactionState:_n,createdAt:e.string().datetime(),createdBy:e.string().uuid(),effectiveTime:e.string().datetime(),transactionCategory:Xr,transactionType:e.string(),changeInstructions:e.array(e.any()).optional(),aggregateTransactionLocator:e.string().optional(),baseTransactionLocator:e.string().optional(),issuedTime:e.string().datetime().optional(),billingTrigger:e.enum(["accept","issue"]).optional(),preferences:zi.optional(),underwritingStatus:Hi.optional(),validationResult:mt.optional()});No.extend({aggregatedTransactions:e.lazy(()=>No.array().optional())}),e.object({action:e.literal("add"),elements:e.array(un).optional()}),e.object({locator:e.string(),action:e.literal("add"),elements:e.array(un).optional()}),e.object({action:e.literal("delete"),staticElementLocators:e.array(e.string())}),e.object({locator:e.string(),action:e.literal("delete"),staticElementLocators:e.array(e.string())}),e.object({staticLocator:e.string(),action:e.literal("modify"),removeCoverageTerms:e.record(e.string(),e.any()).optional(),removeData:e.record(e.string(),e.any()).optional(),setCoverageTerms:e.record(e.string(),e.string()).optional(),setData:e.record(e.string(),e.any()).optional()}),e.object({staticLocator:e.string(),action:e.literal("modify"),locator:e.string(),removeCoverageTerms:e.record(e.string(),e.any()).optional(),removeData:e.record(e.string(),e.any()).optional(),setCoverageTerms:e.record(e.string(),e.string()).optional(),setData:e.record(e.string(),e.any()).optional()}),e.object({action:e.literal("params"),effectiveTime:e.string().datetime(),billingModeChange:e.boolean().optional(),inheritSettings:e.boolean().optional(),newPolicyEndTime:e.string().datetime().optional(),preferences:e.object({}).optional(),triggerBillingChange:e.boolean().optional()}),e.object({locator:e.string(),action:e.literal("params"),effectiveTime:e.string().datetime(),billingModeChange:e.boolean().optional(),inheritSettings:e.boolean().optional(),newPolicyEndTime:e.string().datetime().optional(),preferences:e.object({}).optional(),triggerBillingChange:e.boolean().optional()});const oh=e.enum(["premium","tax","fee","credit","nonFinancial","surcharge"]),sh=e.union([oh,e.string()]),lh=e.object({locator:e.string(),elementLocator:e.string(),elementStaticLocator:e.string(),amount:e.number(),chargeCategory:sh,chargeType:e.string(),rate:e.number(),reversalOfLocator:e.string().optional(),rateDifference:e.number().optional(),tag:e.string().optional()}),Io=e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:Xr,transactionState:_n,effectiveTime:e.string(),termLocator:e.string().optional(),createdAt:e.string().optional(),createdBy:e.string().uuid().optional(),charges:e.array(lh).optional()});Io.extend({aggregatedTransactions:e.array(Io).optional()});const Bo=e.object({locator:e.string(),policyLocator:e.string(),transactionState:_n,effectiveTime:e.string(),transactionCategory:Xr,underwritingStatus:e.string().optional(),underwritingFlags:Qt.array().optional()});Bo.extend({aggregatedTransactions:e.array(Bo).optional()}),e.object({deleteAllAutomaticDocuments:e.boolean().optional(),resetAllUnderwritingFlags:e.boolean().optional(),resetFlagsAction:e.enum(["clear","delete"]).optional(),deleteDocuments:e.array(e.string()).optional(),resetFlags:e.array(e.string()).optional()}),e.object({transactionLocator:e.string(),clearedFlags:Qt.array().optional(),flags:Qt.array().optional()});const ch=e.enum(["open","settled"]),uh=e.object({locator:e.string(),elementStaticLocator:e.string(),invoiceLocator:e.string(),amount:e.number(),chargeCategory:e.string(),chargeType:e.string(),timezone:e.string(),installmentItemLocators:e.array(e.string()),policyLocator:e.string().optional(),quoteLocator:e.string().optional(),transactionLocator:e.string().optional(),elementType:e.string().optional(),remainingAmount:e.number().optional(),settlementTime:e.string().optional(),transactionLocators:e.array(e.string()).optional()});e.object({locator:e.string(),accountLocator:e.string(),startTime:e.string(),endTime:e.string(),invoiceState:ch,currency:Ur,dueTime:e.string(),generatedTime:e.string(),timezone:e.string(),invoiceItems:uh.array(),totalAmount:e.number().optional(),totalRemainingAmount:e.number().optional(),unsettledTime:e.string().optional(),invoiceNumber:e.string().optional()});const dh=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),ph=e.enum(["policy","invoice"]),gh=e.enum(["preGrace","inGrace","lapseTriggered","settled"]);e.enum(["policy","quote","invoice"]);const mh=e.object({advanceLapseTo:dh,gracePeriodDays:e.number(),lapseTransactionType:e.string(),delinquencyLevel:ph.optional()});e.object({locator:e.string(),delinquencyLocator:e.string(),referenceLocator:e.string(),referenceType:e.enum(["policy","quote","invoice"]),preemptingLapseTransactionLocator:e.string().optional(),transactionLocator:e.string().optional()}),e.object({locator:e.string(),accountLocator:e.string(),delinquencyState:gh,createdAt:e.string(),settings:mh,timezone:e.string(),updatedAt:e.string(),graceEndAt:e.string().optional(),graceStartedAt:e.string().optional(),lapseTransactionEffectiveDate:e.string().optional(),references:e.array(e.object({})).optional()});const fh=e.enum(["invoice","account"]),Tt=e.object({containerLocator:e.string(),containerType:fh,amount:e.number().optional()}),yh=e.enum(["ach","cash","eft","standard","wire"]),hh=e.enum(["draft","validated","posted","reversed","discarded"]);e.object({amount:e.number(),type:e.string(),useDefaultFinancialInstrument:e.boolean(),data:e.record(e.any()),targets:Tt.array(),accountLocator:e.string().optional(),financialInstrumentLocator:e.string().optional(),currency:e.string().optional(),transactionMethod:yh.optional(),transactionNumber:e.string().optional()}),e.object({locator:e.string(),currency:Ur,paymentState:hh,amount:e.number(),type:e.string(),data:e.record(e.any()).optional(),createdAt:e.string(),createdBy:e.string(),targets:Tt.array(),shortfallCreditLocators:e.string().array().optional(),accountLocator:e.string().optional(),externalCashTransactionLocator:e.string().optional(),postedAt:e.string().optional(),remainingAmount:e.number().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),validationResult:mt.optional()}),e.object({amount:e.number(),sources:e.array(Tt),targets:e.array(Tt),accountLocator:e.string().optional(),currency:e.string().optional()});const bh=e.enum(["draft","validated","executed","reversed","discarded"]);e.object({locator:e.string(),currency:Ur,creditDistributionState:bh,amount:e.number(),createdAt:e.string(),createdBy:e.string(),sources:Tt.array(),targets:Tt.array(),shortfallCreditLocators:e.string().array().optional(),accountLocator:e.string().optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),validationResult:mt.optional()}),e.object({reversalType:e.string()});const vh=e.enum(["accountCreditBalance","cash","charge","credit","installmentItem","invoiceItem","quote","policy","transaction","accountExpenseBalance"]),Th=e.enum(["credit","debit"]),jh=e.object({faTransactionLocator:e.string(),accountingType:Th,amount:e.number(),faTransactionNote:e.string(),faTransactionTime:e.string()});e.object({referenceLocator:e.string(),currency:Ur,balance:e.number(),referenceType:vh,lineItems:jh.array()});const Mo=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),expiresAt:e.string()}),wn=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),createdAt:e.string(),expiresAt:e.string()}),Ah=e.object({id:e.string(),displayName:e.string(),importConfigUrl:e.string(),clientId:e.string(),clientSecret:e.string()}),Ro=e.object({name:e.string(),permissions:e.array(e.string()),description:e.string()}),En=e.object({id:e.string(),displayName:e.string(),singleSignOnServiceUrl:e.string()}),qo=e.object({userName:e.string(),firstName:e.string(),lastName:e.string(),password:e.string(),temporaryPassword:e.boolean(),email:e.string(),tenants:e.array(e.string()),roles:e.array(e.string())}),Fo=e.object({id:e.string(),displayName:e.string(),type:e.string(),acsUrl:e.string(),callbackUrl:e.string(),entityId:e.string(),singleSignOnServiceUrl:e.string()}),_h=e.object({passwordPolicies:e.record(e.number())}),Uo=e.object({version:e.number(),name:e.string(),addPermissions:e.array(e.string()),removePermissions:e.array(e.string()),description:e.string()}),Zo=e.object({name:e.string(),description:e.string()}),Go=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),Ko=e.object({addTenants:e.array(e.string()),removeTenants:e.array(e.string())}),wh=e.object({name:e.string(),locator:e.string(),permissions:e.array(e.string()),version:e.number(),createdAt:e.string(),createdBy:e.string(),description:e.string()}),Eh=e.object({locator:e.string(),name:e.string(),type:e.union([e.literal("test"),e.literal("production"),e.literal("retired"),e.literal("deleted")]),description:e.string(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string()});e.union([e.literal("test"),e.literal("production"),e.literal("retired"),e.literal("deleted")]);const xn=e.object({locator:e.string(),userName:e.string(),firstName:e.string(),lastName:e.string(),email:e.string(),roles:e.array(e.string()),tenants:e.array(e.string()),permissions:e.array(e.string())}),zo=e.object({userLocator:e.string(),tenantLocator:e.string(),maskType:e.union([e.literal("account"),e.literal("policy")]),fields:e.record(e.array(e.string()))});e.union([e.literal("account"),e.literal("policy")]);const xh=e.object({tenantLocator:e.string(),type:e.union([e.literal("account"),e.literal("policy")]),fields:e.record(e.array(e.string()))});e.union([e.literal("account"),e.literal("policy")]),e.object({requestBody:_h}),e.unknown(),e.object({requestBody:qo}),e.array(wn),e.object({requestBody:Mo}),e.string(),e.object({requestBody:Ro}),e.object({requestBody:En}),e.object({requestBody:En}),e.object({requestBody:Ah}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:xn}),e.object({locator:e.string(),requestBody:Ko}),e.object({locator:e.string(),requestBody:Go}),e.object({locator:e.string(),requestBody:e.string()}),e.unknown(),e.object({locator:e.string()}),e.array(zo),e.object({locator:e.string(),requestBody:xh}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Zo}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:Uo}),e.object({locator:e.string()}),e.array(e.string()),e.object({locator:e.string(),tenantLocator:e.string()}),e.array(zo),e.object({locator:e.string(),tenantLocator:e.string()}),e.unknown(),e.object({locator:e.string(),tenantLocator:e.string(),type:e.union([e.literal("account"),e.literal("policy")])}),e.object({username:e.string()}),e.array(xn),e.object({locator:e.string()}),e.array(wn),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),type:e.array(e.string()).optional()}),e.record(e.unknown()),e.array(e.string()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.array(Fo),e.object({name:e.string()}),e.object({name:e.string()}),e.unknown(),e.object({tokenOrName:e.string()}),e.unknown(),e.object({locator:e.string(),tokenOrName:e.string()}),e.unknown(),En.merge(e.object({})),Fo.merge(e.object({})),Ro.merge(e.object({}));const $h=wh.merge(e.object({locator:$,createdAt:_,createdBy:F}));Uo.merge(e.object({})),Ie($h),Go.merge(e.object({})),Ko.merge(e.object({}));const Sh=e.enum(["test","production","retired","deleted"]),Lh=Eh.merge(e.object({locator:Yr,type:Sh,createdAt:_,updatedAt:_,createdBy:F,description:e.string().optional()}));e.object({listCompleted:e.boolean(),items:e.array(Lh)});const Ch=e.enum(["queued","failed"]),kh=Wi.merge(e.object({status:Ch})),Ph=rn.merge(e.object({version1:$,version2:$,latestVersion:$,plugins:e.record(e.string(),Ae)})),Dh=an.merge(e.object({metadata:Ph}));Ym.merge(e.object({locator:Yr,bootstrapResult:kh,deploymentResult:Dh})),Zo.merge(e.object({})),Mo.merge(e.object({expiresAt:_})),wn.merge(e.object({createdAt:_})),qo.merge(e.object({userName:e.string().email(),roles:e.array(e.string()).optional(),tenants:e.array(e.string()).optional()})),xn.merge(e.object({locator:F,tenants:e.array(e.string()).optional(),permissions:e.array(e.string()).optional()}));const Oh=e.object({locator:F,userName:e.string(),firstName:e.string().optional(),lastName:e.string().optional()});e.object({listCompleted:e.boolean(),items:e.array(Oh)}),e.object({firstName:e.string(),lastName:e.string(),permissions:e.array(e.string()),roles:e.array(e.string()),tenants:e.array(e.string())});const Nh=e.object({locator:e.string(),referenceLocator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),referenceDocumentLocator:e.string().optional(),transactionLocator:e.string().optional(),segmentLocator:e.string().optional(),termLocator:e.string().optional(),policyLocator:e.string().optional(),name:e.string().optional(),staticName:e.string().optional(),documentInstanceState:e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),documentFormat:e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]).optional(),metadata:e.record(e.record(e.unknown())),createdAt:e.string(),createdBy:e.string().optional(),readyAt:e.string().optional(),renderingData:e.record(e.record(e.unknown())),processingErrors:e.string().optional(),external:e.boolean(),category:e.string().optional()});e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]);const Ih=e.object({locator:e.string(),staticName:e.string(),name:e.string(),documentInstanceState:e.string(),processingErrors:e.string(),state:e.string()});e.object({locator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),referenceLocator:e.string(),documentTrigger:e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),status:e.union([e.literal("running"),e.literal("finished"),e.literal("failed")]),childrenJobs:e.array(e.string()),documents:e.array(Ih),processingErrors:e.string(),createdAt:e.string(),createdBy:e.string(),completedAt:e.string()}),e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),e.union([e.literal("running"),e.literal("finished"),e.literal("failed")]),e.object({locator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),status:e.union([e.literal("running"),e.literal("finished"),e.literal("failed")])}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({documentEvents:e.union([e.literal("readyEvent"),e.literal("failedEvent")]).optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string(),locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string(),locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string(),locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({jobLocator:e.string(),locator:e.string()});const Bh=Nh.merge(e.object({locator:Qr,referenceLocator:Qr,referenceType:ro,referenceDocumentLocator:Qr.optional(),transactionLocator:_e.optional(),segmentLocator:bn.optional(),termLocator:_o.optional(),policyLocator:bt.optional(),documentInstanceState:pf,documentFormat:sn.optional(),metadata:q.optional(),createdAt:_,createdBy:F,readyAt:_.optional(),renderingData:q.optional()}));Ie(Bh),e.object({tenantLocator:ht});const Mh=e.object({category:e.string().optional(),documentFormat:sn,metadata:e.string().optional(),name:e.string(),referenceLocator:Qr,referenceType:ro,segmentLocator:bn.optional(),staticName:e.string().optional(),transactionLocator:_e.optional()}),Rh=e.object({name:e.string(),filename:e.string(),size:e.number().nonnegative().int(),buffer:e.instanceof(Buffer)}),qh=e.object({mimetype:e.enum([je.text,je.textHtml,je.textCsv,je.imageJpg,je.applicationPdf,je.applicationZip,je.applicationZipWindows,je.applicationOctetStream])}).merge(Rh);e.object({document:qh}),e.object({tenantLocator:ht}).merge(Mh);const Fh=e.object({name:e.string(),type:e.string(),searchable:e.boolean().optional()}),Uh=e.object({entityName:e.string(),entityType:e.string(),defaultSearchable:e.boolean().optional(),fields:e.array(Fh),contents:e.array(e.string())}),Zh=e.object({defaultSearchable:e.boolean().optional(),objects:e.array(Uh)}),Vo=e.object({searchTerm:e.string(),fieldName:e.string(),match:e.union([e.literal("fuzzy"),e.literal("exact"),e.literal("startsWith")]),absolute:e.union([e.literal("none"),e.literal("required"),e.literal("excluded")])});e.union([e.literal("unspecified"),e.literal("account"),e.literal("quote"),e.literal("policy"),e.literal("fnol"),e.literal("contact")]);const Ho=e.object({score:e.number(),searchEntityType:e.union([e.literal("unspecified"),e.literal("account"),e.literal("quote"),e.literal("policy"),e.literal("fnol"),e.literal("contact")]),searchEntityLocator:e.string(),productName:e.string(),accountLocator:e.string(),searchSummary:e.record(e.record(e.unknown())),highlights:e.array(e.string())});e.object({searchToken:e.string(),offset:e.number(),count:e.number(),results:e.array(Ho)}),e.union([e.literal("fuzzy"),e.literal("exact"),e.literal("startsWith")]),e.union([e.literal("none"),e.literal("required"),e.literal("excluded")]),e.object({count:e.number().optional(),offset:e.number().optional(),searchToken:e.string()});const Gh=e.object({searchString:e.string(),searchEntityType:e.union([e.literal("unspecified"),e.literal("account"),e.literal("quote"),e.literal("policy"),e.literal("fnol"),e.literal("contact")]),searchTerms:e.array(Vo)});e.object({deploymentVersion:e.string(),searchConfiguration:Zh}),e.object({count:e.number().optional(),offset:e.number().optional(),requestBody:Gh});const Kh=e.string().uuid();e.object({tenantLocator:Kh});const zh=e.object({offset:e.string().optional(),count:e.string().optional()});e.object({searchToken:e.string()}).merge(zh);const Vh=e.object({fieldName:e.string().optional(),absolute:sf.optional(),match:mf.optional(),searchTerm:e.string().optional()}).merge(Vo);e.object({searchEntityType:ao.optional(),searchString:e.string().optional(),searchTerms:e.array(Vh).optional()});const Hh=Ho.merge(e.object({accountLocator:e.string().optional(),searchEntityLocator:e.string().ulid(),productName:e.string().optional(),score:e.number(),searchEntityType:ao,highlights:e.array(e.string()),searchSummary:e.record(e.string(),e.unknown()).optional()}));e.object({count:e.number().int(),offset:e.number().int(),searchToken:e.string().optional(),results:e.array(Hh)});const Wo=Vr.merge(e.object({locator:$,reversalOfLocator:$.optional(),elementLocator:Ne,elementStaticLocator:$,chargeCategory:uf})),Jr=rr.merge(e.object({locator:$,action:cf})),Wh=Jr.merge(e.object({elements:e.array(Tn)})),Yh=Jr.merge(e.object({staticLocator:$,setData:q,removeData:q,setCoverageTerms:Ae,removeCoverageTerms:q})),Yo=Jr.merge(e.object({effectiveTime:_,newPolicyEndTime:_.optional(),preferences:vt.optional(),triggerBillingChange:e.boolean().optional(),billingModeChange:e.boolean().optional()})),Qh=Jr.merge(e.object({staticElementLocators:e.array($)})),ea=e.union([Wh,Yh,Yo,Qh]),Qo=e.object({locator:_e,policyLocator:bt,termLocator:_o,effectiveTime:_,transactionState:on,transactionCategory:nn,transactionType:e.string(),createdAt:_,createdBy:F,aggregateTransactionLocator:_e.optional(),baseTransactionLocator:_e.optional(),issuedTime:_.optional(),acceptedTime:_.optional(),preferences:vt.optional(),underwritingStatus:e.string().optional(),validationResult:vn.optional(),changeInstructions:e.array(ea).optional(),billingTrigger:Xt}),Xh=Qo.merge(e.object({aggregatedTransactions:e.array(Qo)}));Ie(Xh),e.array(ea),e.array(ea),e.array(ea);const Jh=Yo.omit({locator:!0});e.array(Jh),go.merge(e.object({toTransaction:_e,reverseTransactions:e.array(_e),baseLocator:_e}));const eb=e.object({locator:$,policyLocator:bt,effectiveTime:_,transactionState:on,charges:e.array(Wo)}),tb=eb.extend({aggregatedTransactions:e.lazy(()=>tb.array().optional())}),jt=ze.merge(e.object({locator:$,referenceLocator:$,referenceType:yf,level:no,createdBy:F,createdTime:_,clearedBy:F,clearedTime:_,elementLocator:Ne.optional()})),rb=e.object({locator:$,policyLocator:bt,transactionCategory:nn,transactionState:on,effectiveTime:_,underwritingStatus:e.string(),underwritingFlags:e.array(jt)}),ab=rb.extend({aggregatedTransactions:e.lazy(()=>ab.array().optional())}),nb=yo.merge(e.object({elementLocator:Ne,level:no}));yn.merge(e.object({addFlags:e.array(nb),clearFlags:e.array($)})),Py.merge(e.object({transactionLocator:_e,clearedFlags:e.array(jt),flags:e.array(jt)}));const ib=vo.merge(e.object({locator:ur,quickQuoteLocator:ur,quoteState:ln,billingLevel:ft,billingTrigger:Xt.optional(),durationBasis:Jt.optional(),policyLocator:bt,preferences:vt.optional(),validationResult:vn.optional(),static:q,issuedTime:_.optional(),startTime:_.optional(),endTime:_.optional(),acceptedTime:_.optional(),expirationTime:_.optional()}));Ie(ib),mo.merge(e.object({accountLocator:cr,data:q,startTime:_.optional(),endTime:_.optional(),expirationTime:_.optional(),durationBasis:Jt.optional(),billingLevel:ft.optional(),preferences:vt.optional(),static:q.optional(),coverageTerms:Ae.optional(),billingTrigger:Xt.optional(),elements:e.array(Tn)})),po.merge(e.object({startTime:_,endTime:_,expirationTime:_,billingTrigger:Xt,billingLevel:ft,preferences:vt,removeCoverageTerms:q,removeData:q,setCoverageTerms:Ae,setData:q,elements:e.array(Vy)})),xy.merge(e.object({tenantLocator:ht,accountLocator:cr,quoteLocator:ur,quoteState:ln,startTime:_,endTime:_,expirationTime:_,durationBasis:Jt,items:e.array(Wo)})),$y.merge(e.object({tenantLocator:ht,accountLocator:cr,quoteLocator:ur,quoteState:ln,startTime:_,endTime:_,expirationTime:_,durationBasis:Jt,underwritingFlags:e.array(jt)})),My.merge(e.object({quoteLocator:ur,flags:e.array(jt),clearedFlags:e.array(jt).optional()})),ir.merge(e.object({groupLocator:$})),fn.merge(e.object({resetFlagsAction:bf,resetFlags:e.array($),deleteDocuments:e.array($)}));const ob=e.object({amount:e.number(),accountingType:e.union([e.literal("credit"),e.literal("debit")]),referenceType:e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]),referenceLocator:e.string()});e.union([e.literal("credit"),e.literal("debit")]),e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]);const sb=e.object({billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])});e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const lb=e.object({name:e.string(),offsetDays:e.number(),offsetBasis:e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")])});e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")]);const W=e.object({containerLocator:e.string(),containerType:e.union([e.literal("invoice"),e.literal("account"),e.literal("subpayment")]),amount:e.number().optional()}),$n=e.object({creditLocator:e.string()}),cb=e.object({"billing.creditdistribution.reverse":$n.optional(),"billing.creditdistribution.create":$n.optional(),"billing.creditdistribution.distribute":$n.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("executed"),e.literal("reversed"),e.literal("discarded")]),e.union([e.literal("invoice"),e.literal("account"),e.literal("subpayment")]);const ub=e.object({lapseTransactionType:e.string(),gracePeriodDays:e.number(),advanceLapseTo:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]),delinquencyLevel:e.union([e.literal("policy"),e.literal("invoice")]).optional()}),db=e.object({locator:e.string(),delinquencyLocator:e.string(),referenceLocator:e.string(),referenceType:e.union([e.literal("policy"),e.literal("quote"),e.literal("invoice")]),transactionLocator:e.string().optional(),preemptingLapseTransactionLocator:e.string().optional()});e.union([e.literal("preGrace"),e.literal("inGrace"),e.literal("lapseTriggered"),e.literal("settled")]);const pb=e.object({locator:e.string(),delinquencyLocator:e.string(),delinquencyEventState:e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]),triggerTime:e.string(),triggeredAt:e.string().optional(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string(),updatedBy:e.string(),name:e.string()});e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]);const Sn=e.object({delinquencyLocator:e.string()}),gb=e.object({locator:e.string(),delinquencyLocator:e.string(),delinquencyEventLocator:e.string(),triggerTime:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),createdAt:e.string(),updatedAt:e.string(),cancelled:e.boolean().optional(),cancellationType:e.union([e.literal("cancellationRequested"),e.literal("rescheduled"),e.literal("tenantRetired"),e.literal("delinquencySettled"),e.literal("delinquencyHeld")]).optional(),updatedDelinquencyEventLocators:e.array(e.string()),processingErrors:e.string().optional(),rescheduledByLocator:e.string().optional()});e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),e.union([e.literal("cancellationRequested"),e.literal("rescheduled"),e.literal("tenantRetired"),e.literal("delinquencySettled"),e.literal("delinquencyHeld")]);const mb=e.object({"billing.delinquency.create":Sn.optional(),"billing.delinquency.settle":Sn.optional(),"billing.delinquency.lapse":Sn.optional()});e.object({accountLocator:e.string(),delinquencyLocator:e.string(),listCompleted:e.boolean(),items:e.array(pb)}),e.union([e.literal("policy"),e.literal("quote"),e.literal("invoice")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]),e.union([e.literal("policy"),e.literal("invoice")]);const ta=e.object({accountLocator:e.string().optional(),type:e.string(),amount:e.number(),data:e.record(e.record(e.unknown())),sources:e.array(W),useDefaultFinancialInstrument:e.boolean(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional(),currency:e.string().optional()});e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]);const dr=e.object({disbursementLocator:e.string()}),fb=e.object({"billing.disbursement.create":dr.optional(),"billing.disbursement.reject":dr.optional(),"billing.disbursement.execute":dr.optional(),"billing.disbursement.reverse":dr.optional(),"billing.disbursement.approve":dr.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("approved"),e.literal("executed"),e.literal("reversed"),e.literal("rejected"),e.literal("discarded")]);const yb=e.object({accountLocator:e.string(),installmentsToBeInvoiced:e.array(e.string()),invoiceDueTime:e.string().optional(),timezone:e.string().optional()}),hb=e.object({locator:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),createdAt:e.string(),completedAt:e.string().optional(),processingErrors:e.string().optional(),invoiceLocators:e.array(e.string()),earlyInvoicingGenerationData:yb}),bb=e.object({accountLocator:e.string().optional(),invoiceThroughTime:e.string().optional(),installmentLocators:e.array(e.string()),invoiceDueTime:e.string().optional(),timezone:e.string().optional(),ignoreHolds:e.boolean()});e.object({jobLocator:e.string()});const vb=e.object({entityLocator:e.string(),type:e.union([e.literal("invoice"),e.literal("installment")])});e.union([e.literal("invoice"),e.literal("installment")]);const Tb=e.object({calculationType:e.union([e.literal("none"),e.literal("pastDueInvoices"),e.literal("allInvoices"),e.literal("invoicesAndUnbilledInstallments")]),entitiesUsedInCalculation:e.array(vb),currency:e.string(),amountToExclude:e.number()});e.union([e.literal("none"),e.literal("pastDueInvoices"),e.literal("allInvoices"),e.literal("invoicesAndUnbilledInstallments")]),e.object({locator:e.string(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]),transactionNumber:e.string().optional()}),e.object({locator:e.string(),externalIdentifier:e.string().optional(),institutionName:e.string().optional(),instrumentType:e.union([e.literal("checking"),e.literal("savings"),e.literal("creditCard"),e.literal("debitCard")]).optional(),defaultTransactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),externalAccountNumber:e.string().optional(),accountLocator:e.string().optional(),nickname:e.string().optional(),expirationTime:e.string().optional(),isDefault:e.boolean()}),e.union([e.literal("checking"),e.literal("savings"),e.literal("creditCard"),e.literal("debitCard")]),e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]);const Xo=e.object({externalIdentifier:e.string().optional(),institutionName:e.string().optional(),instrumentType:e.union([e.literal("checking"),e.literal("savings"),e.literal("creditCard"),e.literal("debitCard")]).optional(),defaultTransactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),externalAccountNumber:e.string().optional(),accountLocator:e.string().optional(),nickname:e.string().optional(),expirationTime:e.string().optional()});e.union([e.literal("invoicing"),e.literal("delinquency")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("active"),e.literal("discarded"),e.literal("released")]);const jb=e.object({accountLocator:e.string(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")])}),Ab=e.object({accountLocator:e.string().optional(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")]).optional()}),_b=e.object({installmentLatticeLocator:e.string()}),wb=e.object({installmentItemLocator:e.string(),installmentLocator:e.string(),elementLocator:e.string(),transactionLocator:e.string().optional(),transactionType:e.string().optional(),transactionCategory:e.string().optional(),transactionEffectiveTime:e.string().optional(),amount:e.number()}),Eb=e.object({installmentStartTime:e.string(),installmentEndTime:e.string(),coverageStartTime:e.string(),coverageEndTime:e.string(),normalizedWeight:e.number(),coverageDuration:e.number(),generateTime:e.string(),dueTime:e.string(),installmentDuration:e.number()}),xb=e.object({cadence:e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),anchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),generateLeadDays:e.number(),dueLeadDays:e.number(),installmentWeights:e.array(e.number()),maxInstallmentsPerTerm:e.number().optional(),anchorType:e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]).optional(),dayOfMonth:e.number().optional(),dayOfWeek:e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]).optional(),weekOfMonth:e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]).optional(),anchorTime:e.string().optional()});e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]),e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]),e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]);const $b=e.object({locator:e.string(),chargeType:e.string(),chargeCategory:e.string(),amount:e.number(),remainingAmount:e.number().optional(),settlementTime:e.string().optional(),invoiceLocator:e.string(),installmentItemLocators:e.array(e.string()),timezone:e.string(),quoteLocator:e.string().optional(),policyLocator:e.string().optional(),transactionLocator:e.string().optional(),elementStaticLocator:e.string(),elementType:e.string().optional(),transactionLocators:e.array(e.string())});e.union([e.literal("open"),e.literal("settled")]);const Sb=e.object({invoiceLocator:e.string(),accountLocator:e.string(),generateTime:e.string()}),Jo=e.object({invoiceLocator:e.string(),accountLocator:e.string()}),Lb=e.object({locator:e.string(),invoiceGenerationJobLocator:e.string(),generateTime:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),createdAt:e.string(),createdBy:e.string(),completedAt:e.string(),invoiceLocator:e.string(),processingErrors:e.string()}),es=e.object({locator:e.string(),invoiceGenerationScheduleLocator:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),generateTime:e.string(),createdAt:e.string(),createdBy:e.string(),completedAt:e.string(),processingErrors:e.string(),invoiceGenerationInstances:e.array(Lb)}),Cb=e.object({chargeType:e.string(),chargeCategory:e.string(),amount:e.number(),quoteLocator:e.string().optional(),policyLocator:e.string().optional(),elementType:e.string(),elementStaticLocator:e.string(),transactionLocators:e.array(e.string())}),kb=e.object({invoiceItemLocator:e.string(),elementType:e.string(),elementStaticLocator:e.string(),chargeType:e.string(),chargeCategory:e.string(),amount:e.number(),remainingAmount:e.number(),settlementTime:e.string().optional(),installmentItemSummaries:e.array(wb)}),ts=e.object({generateTime:e.string(),dueTime:e.string(),startTime:e.string(),endTime:e.string(),invoiceItems:e.array(Cb),totalAmount:e.number()}),Pb=e.object({amount:e.number(),faTransactionLocator:e.string(),faTransactionTime:e.string(),faTransactionNote:e.string(),accountingType:e.union([e.literal("credit"),e.literal("debit")])});e.object({listCompleted:e.boolean(),items:e.array(gb)}),e.object({listCompleted:e.boolean(),items:e.array(hb)});const Db=e.object({accountLocator:e.string().optional(),amount:e.number().optional(),addSources:e.array(W),removeSources:e.array(e.string()),addTargets:e.array(W),removeTargets:e.array(e.string()),currency:e.string().optional()}),Ob=e.object({graceEndAt:e.string().optional()}),Nb=e.object({triggerTime:e.string().optional(),delinquencyEventState:e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]).optional()}),rs=e.object({accountLocator:e.string().optional(),type:e.string().optional(),amount:e.number().optional(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),addSources:e.array(W),removeSources:e.array(e.string()),useDefaultFinancialInstrument:e.boolean().optional(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional(),currency:e.string().optional()}),Ib=e.object({accountLocator:e.string().optional(),type:e.string().optional(),amount:e.number().optional(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),addTargets:e.array(W),removeTargets:e.array(e.string()),useDefaultFinancialInstrument:e.boolean().optional(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional(),currency:e.string().optional()}),as=e.object({accountLocator:e.string().optional(),type:e.string(),amount:e.number(),currency:e.string().optional(),data:e.record(e.record(e.unknown())),targets:e.array(W),useDefaultFinancialInstrument:e.boolean(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional()}),ra=e.object({paymentLocator:e.string()}),Bb=e.object({"billing.payment.post":ra.optional(),"billing.payment.reverse":ra.optional(),"billing.payment.distribute":ra.optional(),"billing.payment.create":ra.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("posted"),e.literal("reversed"),e.literal("discarded")]);const Mb=e.object({policyLocator:e.string().optional(),quoteLocator:e.string().optional(),productName:e.string(),invoiceItemSummaries:e.array(kb)}),ns=e.object({reversalType:e.string()});e.object({locator:e.string(),installmentSettings:xb,billingSettings:sb});const Ln=e.object({shortfallCreditLocator:e.string()});e.object({locator:e.string(),creditType:e.union([e.literal("creditDistribution"),e.literal("disbursement"),e.literal("payment"),e.literal("subPayment"),e.literal("refund"),e.literal("shortfallWriteOff"),e.literal("writeOff")]),shortfallCreditState:e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),currency:e.string(),amount:e.number(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string(),targets:e.array(W),parentCreditLocator:e.string(),reversalReason:e.string().optional()}),e.union([e.literal("creditDistribution"),e.literal("disbursement"),e.literal("payment"),e.literal("subPayment"),e.literal("refund"),e.literal("shortfallWriteOff"),e.literal("writeOff")]),e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),e.object({balance:e.number(),currency:e.string()});const Rb=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),pr=e.object({validationItems:e.array(Rb),success:e.boolean()}),Cn=e.object({writeOffLocator:e.string()}),qb=e.object({"billing.writeoff.reverse":Cn.optional(),"billing.writeoff.create":Cn.optional(),"billing.writeoff.distribute":Cn.optional()});e.object({locator:e.string(),creditType:e.union([e.literal("creditDistribution"),e.literal("disbursement"),e.literal("payment"),e.literal("subPayment"),e.literal("refund"),e.literal("shortfallWriteOff"),e.literal("writeOff")]),writeOffState:e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),currency:e.string(),amount:e.number(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string(),targets:e.array(W),reversalReason:e.string().optional()}),e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),e.object({locator:e.string()}),e.object({locator:e.string(),paymentState:e.union([e.literal("draft"),e.literal("validated"),e.literal("posted"),e.literal("reversed"),e.literal("discarded")]),type:e.string(),currency:e.string(),amount:e.number(),remainingAmount:e.number().optional(),data:e.record(e.record(e.unknown())),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string().optional(),targets:e.array(W),externalCashTransactionLocator:e.string().optional(),validationResult:pr.optional(),postedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),shortfallCreditLocators:e.array(e.string()).nullable()}),e.object({locator:e.string(),requestBody:as}),e.object({locator:e.string(),requestBody:Ib}),e.object({locator:e.string()});const is=e.object({locator:e.string(),disbursementState:e.union([e.literal("draft"),e.literal("validated"),e.literal("approved"),e.literal("executed"),e.literal("reversed"),e.literal("rejected"),e.literal("discarded")]),type:e.string(),currency:e.string(),amount:e.number(),data:e.record(e.record(e.unknown())),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string().optional(),sources:e.array(W),externalCashTransactionLocator:e.string().optional(),validationResult:pr.optional(),disbursementNumber:e.string().optional()});e.object({locator:e.string(),requestBody:ta}),e.object({locator:e.string(),requestBody:rs}),e.object({locator:e.string()}),e.object({locator:e.string(),creditDistributionState:e.union([e.literal("draft"),e.literal("validated"),e.literal("executed"),e.literal("reversed"),e.literal("discarded")]),currency:e.string(),amount:e.number(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string().optional(),sources:e.array(W),targets:e.array(W),validationResult:pr.optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),shortfallCreditLocators:e.array(e.string())});const os=e.object({accountLocator:e.string().optional(),amount:e.number(),currency:e.string().optional(),sources:e.array(W),targets:e.array(W)});e.object({locator:e.string(),requestBody:Db}),e.object({requestBody:as}),e.object({invoiceNumber:e.string(),locator:e.string()});const Fb=e.object({locator:e.string(),accountLocator:e.string(),invoiceState:e.union([e.literal("open"),e.literal("settled")]),invoiceItems:e.array($b),generatedTime:e.string(),dueTime:e.string(),currency:e.string(),startTime:e.string(),endTime:e.string(),unsettledTime:e.string().optional(),timezone:e.string(),invoiceNumber:e.string().optional(),totalAmount:e.number().optional(),totalRemainingAmount:e.number().optional()});e.object({locator:e.string()}),e.object({locator:e.string()}),e.boolean(),e.object({locator:e.string()}),e.boolean(),e.object({requestBody:bb}),e.object({requestBody:jb}),e.object({locator:e.string(),accountLocator:e.string(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")]),holdState:e.union([e.literal("draft"),e.literal("validated"),e.literal("active"),e.literal("discarded"),e.literal("released")]),createdAt:e.string(),updatedAt:e.string(),validationResult:pr.optional()}),e.object({requestBody:Xo}),e.object({locator:e.string(),value:e.boolean().optional()}),e.object({requestBody:ta}),e.object({disbursementNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({requestBody:os}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ns}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Ab}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Xo}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),accountLocator:e.string(),delinquencyState:e.union([e.literal("preGrace"),e.literal("inGrace"),e.literal("lapseTriggered"),e.literal("settled")]),createdAt:e.string(),updatedAt:e.string(),settings:ub,timezone:e.string(),references:e.array(db),graceStartedAt:e.string().optional(),graceEndAt:e.string().optional(),lapseTransactionEffectiveDate:e.string().optional(),configuredDelinquencyEvents:e.array(lb)}),e.object({locator:e.string(),requestBody:Ob}),e.object({delinquencyEventLocator:e.string()}),e.object({delinquencyEventLocator:e.string(),requestBody:Nb}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ns}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({currency:e.string().optional(),locator:e.string()}),e.object({locator:e.string()}),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(es),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(es),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string()}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),delinquencyLocator:e.string(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),delinquencyLocator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),invoiceLocator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeReversed:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({invoiceLocator:e.string(),accountLocator:e.string(),invoiceState:e.union([e.literal("open"),e.literal("settled")]),startTime:e.string(),endTime:e.string(),generatedTime:e.string(),dueTime:e.string(),currency:e.string(),timezone:e.string(),totalAmount:e.number(),totalRemainingAmount:e.number(),policyInvoiceSummaries:e.array(Mb),invoiceNumber:e.string().optional()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeReversed:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeReversed:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({includeZeroAmountInvoices:e.boolean().optional(),locator:e.string()}),e.array(ts),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeZeroAmountInvoices:e.boolean().optional(),offset:e.number().optional(),quoteLocator:e.string()}),e.record(e.unknown()),e.object({includeZeroAmountInvoices:e.boolean().optional(),locator:e.string()}),e.array(ts),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeZeroAmountInvoices:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({invoiceNumber:e.string()}),e.array(Fb),e.object({accountLocator:e.string(),count:e.number().optional(),extended:e.boolean().optional(),includeZeroAmountInvoices:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),transactionLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),quoteLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({quoteLocator:e.string()}),e.object({locator:e.string(),settingsLocator:e.string().optional(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string(),termStartTime:e.string(),termEndTime:e.string(),termLocator:e.string().optional(),quoteLocator:e.string().optional(),policyLocator:e.string().optional(),currency:e.string(),timezone:e.string(),basedOnLocator:e.string().optional(),effectiveTime:e.string(),frames:e.array(Eb),reversalLattice:e.boolean()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({accountLocator:e.string(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("active"),e.literal("discarded"),e.literal("released")]).optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()});const Ub=e.object({"billing.installmentlattice.create":_b.optional()}),Zb=e.object({"billing.invoice.generate":Sb.optional(),"billing.invoice.settle":Jo.optional(),"billing.invoice.unsettle":Jo.optional()}),Gb=e.object({"billing.shortfallcredit.reverse":Ln.optional(),"billing.shortfallcredit.distribute":Ln.optional(),"billing.shortfallcredit.create":Ln.optional()});e.object({disbursementNumber:e.string()}),e.array(is),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),delinquencyLocator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),quoteLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),invoiceLocator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({currency:e.string().optional(),refLocator:e.string(),refType:e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]),size:e.number().optional()}),e.object({referenceLocator:e.string(),referenceType:e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]),balance:e.number(),currency:e.string(),lineItems:e.array(Pb)}),e.object({currency:e.string().optional()}),e.object({accountLocator:e.string(),currency:e.string().optional(),size:e.number().optional()}),e.object({count:e.number().optional(),currency:e.string().optional(),extended:e.boolean().optional(),offset:e.number().optional(),size:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({faTransactionLocator:e.string(),faTransactionTime:e.string(),faTransactionNote:e.string(),currency:e.string(),accountLines:e.array(ob)});const Kb=e.object({disbursementLocator:e.string(),disbursementState:e.union([e.literal("draft"),e.literal("validated"),e.literal("approved"),e.literal("executed"),e.literal("reversed"),e.literal("rejected"),e.literal("discarded")]),disbursedAmount:e.number(),validationResult:pr.optional()});e.object({locator:e.string(),requestBody:os}),e.object({accountLocator:e.string(),currency:e.string(),accountCreditBalance:e.number(),excludedDebitsAmountResult:Tb,thresholdUsed:e.number().optional(),createDisbursementResult:Kb.optional(),errors:e.array(e.string())}),e.object({creditDistributionEvents:cb.optional(),delinquencyEvents:mb.optional(),disbursementEvents:fb.optional(),installmentEvents:Ub.optional(),invoiceEvents:Zb.optional(),paymentEvents:Bb.optional(),shortfallCreditEvents:Gb.optional(),writeOffEvents:qb.optional()});const aa=W.merge(e.object({containerType:Tf})),zb=is.merge(e.object({locator:Uy,disbursementState:vf,data:q,createdAt:_,createdBy:F,sources:e.array(aa),accountLocator:cr.optional(),validationResult:vn.optional()}));Ie(zb),ta.merge(e.object({data:q,sources:e.array(aa),accountLocator:$.optional(),transactionMethod:cn.optional()})),rs.merge(e.object({setData:q,removeData:q,addSources:e.array(aa),removeSources:e.array(e.string()),accountLocator:cr.optional(),transactionMethod:cn})),ta.merge(e.object({data:q,sources:e.array(aa),transactionMethod:cn}));const gr=e.object({referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]),referenceLocator:e.string()});e.union([e.literal("active"),e.literal("pastDeadline"),e.literal("completed"),e.literal("cancelled")]);const ss=e.object({type:e.string(),deadlineTime:e.string().optional(),references:e.array(gr),underwritingFlagLocators:e.array(e.string()),assignedTo:e.string().optional()});e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]);const ls=e.object({deadlineTime:e.string().optional(),addReferences:e.array(gr),removeReferences:e.array(gr),addUnderwritingFlags:e.array(e.string()),removeUnderwritingFlags:e.array(e.string())}),cs=e.object({locator:e.string(),userLocator:e.string(),assignmentRole:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]),referenceLocator:e.string(),assignmentState:e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]),createdBy:e.string(),createdAt:e.string(),updatedBy:e.string().optional(),updatedAt:e.string().optional()});e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]);const us=e.object({userLocator:e.string(),assignmentRole:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]),referenceLocator:e.string()}),ds=e.object({locator:e.string(),category:e.string(),type:e.string(),activityState:e.union([e.literal("active"),e.literal("pastDeadline"),e.literal("completed"),e.literal("cancelled")]),references:e.array(gr),underwritingFlagLocators:e.array(e.string()),deadlineTime:e.string().optional(),assignedTo:e.string().optional(),createdBy:e.string(),createdAt:e.string(),updatedBy:e.string().optional(),updatedAt:e.string().optional()});e.object({listCompleted:e.boolean(),items:e.array(cs)});const ps=e.object({removeQualifications:e.record(e.string()),addQualifications:e.record(e.string())});e.object({requestBody:us}),e.object({requestBody:ss}),e.object({userLocator:e.string()}),e.record(e.string()),e.object({requestBody:ps,userLocator:e.string()}),e.record(e.string()),e.object({assignmentLocator:e.string()}),e.object({assignmentLocator:e.string()}),e.object({assignmentLocator:e.string()}),e.object({assignmentLocator:e.string(),userLocator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ls}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),userLocator:e.string()}),e.object({locator:e.string()}),e.record(e.array(e.string())),e.object({assignmentEvents:e.union([e.literal("assignedEvent"),e.literal("completedEvent"),e.literal("unassignedEvent"),e.literal("uncompletedEvent")]).optional()}),e.object({assignmentState:e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]),count:e.number().optional(),offset:e.number().optional(),referenceLocator:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])}),e.object({count:e.number().optional(),offset:e.number().optional(),referenceLocator:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])}),e.object({locator:e.string()}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({assignmentState:e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]),count:e.number().optional(),offset:e.number().optional(),userLocator:e.string()}),e.object({count:e.number().optional(),offset:e.number().optional(),userLocator:e.string()}),e.object({count:e.number().optional(),offset:e.number().optional(),referenceLocator:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])}),e.object({listCompleted:e.boolean(),items:e.array(ds)}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),offset:e.number().optional(),userLocator:e.string()}),e.object({count:e.number().optional(),offset:e.number().optional()});const na=gr.merge(e.object({referenceType:wf}));ss.merge(e.object({deadlineTime:_,references:e.array(na),assignedTo:F})),ls.merge(e.object({deadlineTime:_.optional(),addReferences:e.array(na),removeReferences:e.array(na)}));const Vb=ds.merge(e.object({locator:wo,activityState:Ef,references:e.array(na).optional(),underwritingFlagLocators:e.array(e.string()).optional(),deadlineTime:_.optional(),assignedTo:F.optional(),createdBy:F,createdAt:_,updatedBy:F.optional(),updatedAt:_.optional()}));Ie(Vb);const we=e.object({tenantLocator:ht});we.merge(e.object({userLocator:F})),we.merge(e.object({assignmentLocator:Eo})).merge(e.object({userLocator:F})),we.merge(e.object({userLocator:F})),we.merge(e.object({referenceType:e.string(),referenceLocator:$})),we.merge(e.object({activityLocator:wo})).merge(e.object({userLocator:F})),we.merge(e.object({userLocator:F})),we.merge(e.object({referenceType:e.string(),referenceLocator:$})),we.merge(e.object({referenceType:e.string(),referenceLocator:$})),we.merge(e.object({diaryLocator:xo})),us.merge(e.object({userLocator:F,referenceType:io}));const Hb=cs.merge(e.object({locator:Eo,userLocator:F,referenceType:io,assignmentState:xf,createdBy:F,createdAt:_,updatedBy:F.optional(),updatedAt:_.optional()}));Ie(Hb),e.object({locator:e.string(),key:e.string(),uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),value:e.string(),modificationTimestamp:e.string(),expirationTimestamp:e.string().optional(),auxDataSettingsName:e.string().optional()}),e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]);const Wb=e.object({key:e.string(),uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),auxDataSettingsName:e.string().optional()});e.object({offset:e.number(),count:e.number(),keys:e.array(Wb)});const Yb=e.object({uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),key:e.string(),value:e.string()}),Qb=e.object({auxDataSettingsName:e.string().optional(),auxData:e.array(Yb)});e.object({dataSizeKb:e.number()});const kn=e.object({locator:e.string(),referenceLocator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("activity"),e.literal("fnol")]),category:e.string().optional(),contents:e.string(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string(),updatedBy:e.string(),diaryState:e.union([e.literal("active"),e.literal("discarded"),e.literal("locked")])});e.union([e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("activity"),e.literal("fnol")]),e.union([e.literal("active"),e.literal("discarded"),e.literal("locked")]);const gs=e.object({category:e.string().optional(),contents:e.string()}),Xb=e.object({category:e.string().optional(),contents:e.string()});e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({locator:e.string(),requestBody:Qb}),e.unknown(),e.object({includeDiscarded:e.boolean().optional(),referenceLocator:e.string(),referenceType:e.string()}),e.array(kn),e.object({referenceLocator:e.string(),referenceType:e.string(),requestBody:gs}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(kn),e.object({locator:e.string(),requestBody:Xb}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({key:e.string(),locator:e.string()}),e.object({key:e.string(),locator:e.string()}),e.unknown(),gs.merge(e.object({}));const Jb=kn.merge(e.object({locator:xo,referenceType:$f,diaryState:Sf,createdAt:_,createdBy:F,updatedAt:_,updatedBy:F}));e.array(Jb),e.record(e.string(),e.array(e.string())),ps.merge(e.object({addQualifications:Ae,removeQualifications:Ae}));const ev=({startTime:r,endTime:t,expirationTime:a,durationBasis:n,termDuration:i,timezone:o})=>{const s=Xe(r||new Date().toISOString(),o),l=a?Xe(a,o):void 0,c=t?Xe(t,o):void 0,u=l&&l.compare(s)>0?l.toAbsoluteString():s.add({months:1}).toAbsoluteString();if(c&&c.compare(s)>0)return{startTime:s.toAbsoluteString(),endTime:c.toAbsoluteString(),expirationTime:u};if(!i||!n)return{startTime:s.toAbsoluteString(),expirationTime:u};const d=s.add({[n]:i});return{startTime:s.toAbsoluteString(),endTime:d.toAbsoluteString(),expirationTime:u}},tv=(r,t,a)=>{var o,s,l,c,u;let n;r.durationBasis?n=r.durationBasis:t.defaultDurationBasis?n=Kr.options.includes(t.defaultDurationBasis)?t.defaultDurationBasis:void 0:a.defaultDurationBasis?n=Kr.options.includes(a.defaultDurationBasis)?a.defaultDurationBasis:void 0:n=void 0;const i=ev({timezone:r.timezone??a.defaultTimeZone??"UTC",startTime:r==null?void 0:r.startTime,endTime:r==null?void 0:r.endTime,expirationTime:r==null?void 0:r.expirationTime,durationBasis:n,termDuration:(r==null?void 0:r.duration)??t.defaultTermDuration??a.defaultTermDuration});return{...((o=r==null?void 0:r.element)==null?void 0:o.data)&&{...(s=r==null?void 0:r.element)==null?void 0:s.data},default:{...i},advanced:{currency:(r==null?void 0:r.currency)??t.defaultCurrency??a.defaultCurrency??void 0,timezone:(r==null?void 0:r.timezone)??t.defaultTimeZone??a.defaultTimeZone??void 0,billingLevel:(r==null?void 0:r.billingLevel)??t.defaultBillingLevel??void 0,billingTrigger:(r==null?void 0:r.billingTrigger)??t.defaultBillingTrigger??void 0,durationBasis:(r==null?void 0:r.durationBasis)??t.defaultDurationBasis??(a==null?void 0:a.defaultDurationBasis)??void 0,delinquencyPlanName:(r==null?void 0:r.delinquencyPlanName)??(t==null?void 0:t.defaultDelinquencyPlan)??(a==null?void 0:a.defaultDelinquencyPlan)??void 0,autoRenewalPlanName:(r==null?void 0:r.autoRenewalPlanName)??(t==null?void 0:t.defaultAutoRenewalPlan)??(a==null?void 0:a.defaultAutoRenewalPlan)??void 0,installmentPlanName:((c=(l=r==null?void 0:r.preferences)==null?void 0:l.installmentPreferences)==null?void 0:c.installmentPlanName)??(t==null?void 0:t.defaultInstallmentPlan)??(a==null?void 0:a.defaultInstallmentPlan)??void 0},coverageTerms:qe({coverageTermDataModel:a.coverageTerms,coverageTermOptions:((u=r==null?void 0:r.element)==null?void 0:u.coverageTerms)??{},coverageTerms:t.coverageTerms??[]})}};var rv=Re,av=function(){try{var r=rv(Object,"defineProperty");return r({},"",{}),r}catch{}}(),ms=av,fs=ms;function nv(r,t,a){t=="__proto__"&&fs?fs(r,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[t]=a}var Pn=nv,iv=Pn,ov=Pt,sv=Object.prototype,lv=sv.hasOwnProperty;function cv(r,t,a){var n=r[t];(!(lv.call(r,t)&&ov(n,a))||a===void 0&&!(t in r))&&iv(r,t,a)}var Dn=cv,uv=9007199254740991,dv=/^(?:0|[1-9]\d*)$/;function pv(r,t){var a=typeof r;return t=t??uv,!!t&&(a=="number"||a!="symbol"&&dv.test(r))&&r>-1&&r%1==0&&r<t}var ia=pv,gv=Dn,mv=ot,fv=ia,ys=te,yv=st;function hv(r,t,a,n){if(!ys(r))return r;t=mv(t,r);for(var i=-1,o=t.length,s=o-1,l=r;l!=null&&++i<o;){var c=yv(t[i]),u=a;if(c==="__proto__"||c==="constructor"||c==="prototype")return r;if(i!=s){var d=l[c];u=n?n(d,c,l):void 0,u===void 0&&(u=ys(d)?d:fv(t[i+1])?[]:{})}gv(l,c,u),l=l[c]}return r}var hs=hv,bv=Pr,vv=hs,Tv=ot;function jv(r,t,a){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],l=bv(r,s);a(l,s)&&vv(o,Tv(s,r),l)}return o}var Av=jv;function _v(r,t){return r!=null&&t in Object(r)}var wv=_v,Ev=rt,xv=be,$v="[object Arguments]";function Sv(r){return xv(r)&&Ev(r)==$v}var Lv=Sv,bs=Lv,Cv=be,vs=Object.prototype,kv=vs.hasOwnProperty,Pv=vs.propertyIsEnumerable,Dv=bs(function(){return arguments}())?bs:function(r){return Cv(r)&&kv.call(r,"callee")&&!Pv.call(r,"callee")},mr=Dv,Ov=9007199254740991;function Nv(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ov}var On=Nv,Iv=ot,Bv=mr,Mv=V,Rv=ia,qv=On,Fv=st;function Uv(r,t,a){t=Iv(t,r);for(var n=-1,i=t.length,o=!1;++n<i;){var s=Fv(t[n]);if(!(o=r!=null&&a(r,s)))break;r=r[s]}return o||++n!=i?o:(i=r==null?0:r.length,!!i&&qv(i)&&Rv(s,i)&&(Mv(r)||Bv(r)))}var Ts=Uv,Zv=wv,Gv=Ts;function Kv(r,t){return r!=null&&Gv(r,t,Zv)}var js=Kv,zv=Av,Vv=js;function Hv(r,t){return zv(r,t,function(a,n){return Vv(r,n)})}var Wv=Hv;function Yv(r,t){for(var a=-1,n=t.length,i=r.length;++a<n;)r[i+a]=t[a];return r}var Nn=Yv,As=tt,Qv=mr,Xv=V,_s=As?As.isConcatSpreadable:void 0;function Jv(r){return Xv(r)||Qv(r)||!!(_s&&r&&r[_s])}var eT=Jv,tT=Nn,rT=eT;function ws(r,t,a,n,i){var o=-1,s=r.length;for(a||(a=rT),i||(i=[]);++o<s;){var l=r[o];t>0&&a(l)?t>1?ws(l,t-1,a,n,i):tT(i,l):n||(i[i.length]=l)}return i}var aT=ws,nT=aT;function iT(r){var t=r==null?0:r.length;return t?nT(r,1):[]}var oT=iT;function sT(r,t,a){switch(a.length){case 0:return r.call(t);case 1:return r.call(t,a[0]);case 2:return r.call(t,a[0],a[1]);case 3:return r.call(t,a[0],a[1],a[2])}return r.apply(t,a)}var lT=sT,cT=lT,Es=Math.max;function uT(r,t,a){return t=Es(t===void 0?r.length-1:t,0),function(){for(var n=arguments,i=-1,o=Es(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=a(s),cT(r,this,l)}}var xs=uT;function dT(r){return function(){return r}}var pT=dT;function gT(r){return r}var In=gT,mT=pT,$s=ms,fT=In,yT=$s?function(r,t){return $s(r,"toString",{configurable:!0,enumerable:!1,value:mT(t),writable:!0})}:fT,hT=yT,bT=800,vT=16,TT=Date.now;function jT(r){var t=0,a=0;return function(){var n=TT(),i=vT-(n-a);if(a=n,i>0){if(++t>=bT)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var AT=jT,_T=hT,wT=AT,ET=wT(_T),Ss=ET,xT=oT,$T=xs,ST=Ss;function LT(r){return ST($T(r,void 0,xT),r+"")}var Ls=LT,CT=Wv,kT=Ls,PT=kT(function(r,t){return r==null?{}:CT(r,t)}),DT=PT;const oa=ee(DT);var OT=hs;function NT(r,t,a){return r==null?r:OT(r,t,a)}var IT=NT;const P=ee(IT),BT={Date:!0,RegExp:!0,String:!0,Number:!0};function ne(r,t,a={cyclesFix:!0},n=[]){var l,c;let i=[];const o=Array.isArray(r);for(const u in r){const d=r[u],g=o?+u:u;if(!(u in t)){i.push({type:"REMOVE",path:[g],oldValue:r[u]});continue}const f=t[u],b=typeof d=="object"&&typeof f=="object"&&Array.isArray(d)===Array.isArray(f);if(d&&f&&b&&!BT[(c=(l=Object.getPrototypeOf(d))==null?void 0:l.constructor)==null?void 0:c.name]&&(!a.cyclesFix||!n.includes(d))){const h=ne(d,f,a,a.cyclesFix?n.concat([d]):[]);i.push.apply(i,h.map(y=>(y.path.unshift(g),y)))}else d!==f&&!(Number.isNaN(d)&&Number.isNaN(f))&&!(b&&(isNaN(d)?d+""==f+"":+d==+f))&&i.push({path:[g],type:"CHANGE",value:f,oldValue:d})}const s=Array.isArray(t);for(const u in t)u in r||i.push({type:"CREATE",path:[s?+u:u],value:t[u]});return i}const MT=r=>{const{data:t,default:a,advanced:n,coverageTerms:i,element:o,timezone:s}=r,l={locator:o.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};ne((o==null?void 0:o.data)??{},t).forEach(h=>{switch(h.type){case"CHANGE":case"CREATE":if(h.path.some(y=>!isNaN(Number(y)))){const y=K(t,h.path[0]);P(l.setData??{},h.path[0],y)}else P(l.setData??{},h.path,h.value);break;case"REMOVE":if(h.path.some(y=>!isNaN(Number(y)))){const y=K(t,h.path[0]);y.length===0?P(l.removeData??{},h.path[0],!0):P(l.setData??{},h.path[0],y)}else P(l.removeData??{},h.path,!0);break}}),ne(o.coverageTerms??{},i??{}).forEach(h=>{switch(h.type){case"CHANGE":case"CREATE":P(l.setCoverageTerms??{},h.path,h.value);break;case"REMOVE":P(l.removeCoverageTerms??{},h.path,!0);break}});const d=oa(o,["startTime","endTime","expirationTime"]),g=oa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName"]),f=ne(d??{},a??{}),b=ne(g??{},n??{});return f.forEach(h=>{switch(h.type){case"CHANGE":case"CREATE":P(l,h.path,ka(h.value).toDate(s).toISOString());break;case"REMOVE":P(l,h.path,null);break}}),b.forEach(h=>{switch(h.type){case"CHANGE":case"CREATE":P(l,h.path,h.value);break;case"REMOVE":P(l,h.path,null);break}}),l};var RT=Cr;function qT(){this.__data__=new RT,this.size=0}var FT=qT;function UT(r){var t=this.__data__,a=t.delete(r);return this.size=t.size,a}var ZT=UT;function GT(r){return this.__data__.get(r)}var KT=GT;function zT(r){return this.__data__.has(r)}var VT=zT,HT=Cr,WT=Ra,YT=qa,QT=200;function XT(r,t){var a=this.__data__;if(a instanceof HT){var n=a.__data__;if(!WT||n.length<QT-1)return n.push([r,t]),this.size=++a.size,this;a=this.__data__=new YT(n)}return a.set(r,t),this.size=a.size,this}var JT=XT,ej=Cr,tj=FT,rj=ZT,aj=KT,nj=VT,ij=JT;function At(r){var t=this.__data__=new ej(r);this.size=t.size}At.prototype.clear=tj,At.prototype.delete=rj,At.prototype.get=aj,At.prototype.has=nj,At.prototype.set=ij;var sa=At;function oj(r,t){for(var a=-1,n=r==null?0:r.length;++a<n&&t(r[a],a,r)!==!1;);return r}var Cs=oj,sj=Dn,lj=Pn;function cj(r,t,a,n){var i=!a;a||(a={});for(var o=-1,s=t.length;++o<s;){var l=t[o],c=n?n(a[l],r[l],l,a,r):void 0;c===void 0&&(c=r[l]),i?lj(a,l,c):sj(a,l,c)}return a}var _t=cj;function uj(r,t){for(var a=-1,n=Array(r);++a<r;)n[a]=t(a);return n}var dj=uj,la={exports:{}};function pj(){return!1}var gj=pj;la.exports,function(r,t){var a=de,n=gj,i=t&&!t.nodeType&&t,o=i&&!0&&r&&!r.nodeType&&r,s=o&&o.exports===i,l=s?a.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;r.exports=u}(la,la.exports);var wt=la.exports,mj=rt,fj=On,yj=be,hj="[object Arguments]",bj="[object Array]",vj="[object Boolean]",Tj="[object Date]",jj="[object Error]",Aj="[object Function]",_j="[object Map]",wj="[object Number]",Ej="[object Object]",xj="[object RegExp]",$j="[object Set]",Sj="[object String]",Lj="[object WeakMap]",Cj="[object ArrayBuffer]",kj="[object DataView]",Pj="[object Float32Array]",Dj="[object Float64Array]",Oj="[object Int8Array]",Nj="[object Int16Array]",Ij="[object Int32Array]",Bj="[object Uint8Array]",Mj="[object Uint8ClampedArray]",Rj="[object Uint16Array]",qj="[object Uint32Array]",U={};U[Pj]=U[Dj]=U[Oj]=U[Nj]=U[Ij]=U[Bj]=U[Mj]=U[Rj]=U[qj]=!0,U[hj]=U[bj]=U[Cj]=U[vj]=U[kj]=U[Tj]=U[jj]=U[Aj]=U[_j]=U[wj]=U[Ej]=U[xj]=U[$j]=U[Sj]=U[Lj]=!1;function Fj(r){return yj(r)&&fj(r.length)&&!!U[mj(r)]}var Uj=Fj;function Zj(r){return function(t){return r(t)}}var Bn=Zj,ca={exports:{}};ca.exports,function(r,t){var a=gi,n=t&&!t.nodeType&&t,i=n&&!0&&r&&!r.nodeType&&r,o=i&&i.exports===n,s=o&&a.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();r.exports=l}(ca,ca.exports);var Mn=ca.exports,Gj=Uj,Kj=Bn,ks=Mn,Ps=ks&&ks.isTypedArray,zj=Ps?Kj(Ps):Gj,fr=zj,Vj=dj,Hj=mr,Wj=V,Yj=wt,Qj=ia,Xj=fr,Jj=Object.prototype,eA=Jj.hasOwnProperty;function tA(r,t){var a=Wj(r),n=!a&&Hj(r),i=!a&&!n&&Yj(r),o=!a&&!n&&!i&&Xj(r),s=a||n||i||o,l=s?Vj(r.length,String):[],c=l.length;for(var u in r)(t||eA.call(r,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Qj(u,c)))&&l.push(u);return l}var Ds=tA,rA=Object.prototype;function aA(r){var t=r&&r.constructor,a=typeof t=="function"&&t.prototype||rA;return r===a}var ua=aA;function nA(r,t){return function(a){return r(t(a))}}var Os=nA,iA=Os,oA=iA(Object.keys,Object),sA=oA,lA=ua,cA=sA,uA=Object.prototype,dA=uA.hasOwnProperty;function pA(r){if(!lA(r))return cA(r);var t=[];for(var a in Object(r))dA.call(r,a)&&a!="constructor"&&t.push(a);return t}var Ns=pA,gA=$r,mA=On;function fA(r){return r!=null&&mA(r.length)&&!gA(r)}var Et=fA,yA=Ds,hA=Ns,bA=Et;function vA(r){return bA(r)?yA(r):hA(r)}var yr=vA,TA=_t,jA=yr;function AA(r,t){return r&&TA(t,jA(t),r)}var _A=AA;function wA(r){var t=[];if(r!=null)for(var a in Object(r))t.push(a);return t}var EA=wA,xA=te,$A=ua,SA=EA,LA=Object.prototype,CA=LA.hasOwnProperty;function kA(r){if(!xA(r))return SA(r);var t=$A(r),a=[];for(var n in r)n=="constructor"&&(t||!CA.call(r,n))||a.push(n);return a}var PA=kA,DA=Ds,OA=PA,NA=Et;function IA(r){return NA(r)?DA(r,!0):OA(r)}var hr=IA,BA=_t,MA=hr;function RA(r,t){return r&&BA(t,MA(t),r)}var qA=RA,da={exports:{}};da.exports,function(r,t){var a=de,n=t&&!t.nodeType&&t,i=n&&!0&&r&&!r.nodeType&&r,o=i&&i.exports===n,s=o?a.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var g=u.length,f=l?l(g):new u.constructor(g);return u.copy(f),f}r.exports=c}(da,da.exports);var Is=da.exports;function FA(r,t){var a=-1,n=r.length;for(t||(t=Array(n));++a<n;)t[a]=r[a];return t}var Bs=FA;function UA(r,t){for(var a=-1,n=r==null?0:r.length,i=0,o=[];++a<n;){var s=r[a];t(s,a,r)&&(o[i++]=s)}return o}var ZA=UA;function GA(){return[]}var Ms=GA,KA=ZA,zA=Ms,VA=Object.prototype,HA=VA.propertyIsEnumerable,Rs=Object.getOwnPropertySymbols,WA=Rs?function(r){return r==null?[]:(r=Object(r),KA(Rs(r),function(t){return HA.call(r,t)}))}:zA,Rn=WA,YA=_t,QA=Rn;function XA(r,t){return YA(r,QA(r),t)}var JA=XA,e_=Os,t_=e_(Object.getPrototypeOf,Object),pa=t_,r_=Nn,a_=pa,n_=Rn,i_=Ms,o_=Object.getOwnPropertySymbols,s_=o_?function(r){for(var t=[];r;)r_(t,n_(r)),r=a_(r);return t}:i_,qs=s_,l_=_t,c_=qs;function u_(r,t){return l_(r,c_(r),t)}var d_=u_,p_=Nn,g_=V;function m_(r,t,a){var n=t(r);return g_(r)?n:p_(n,a(r))}var Fs=m_,f_=Fs,y_=Rn,h_=yr;function b_(r){return f_(r,h_,y_)}var Us=b_,v_=Fs,T_=qs,j_=hr;function A_(r){return v_(r,j_,T_)}var Zs=A_,__=Re,w_=de,E_=__(w_,"DataView"),x_=E_,$_=Re,S_=de,L_=$_(S_,"Promise"),C_=L_,k_=Re,P_=de,D_=k_(P_,"Set"),O_=D_,N_=Re,I_=de,B_=N_(I_,"WeakMap"),M_=B_,qn=x_,Fn=Ra,Un=C_,Zn=O_,Gn=M_,Gs=rt,xt=vi,Ks="[object Map]",R_="[object Object]",zs="[object Promise]",Vs="[object Set]",Hs="[object WeakMap]",Ws="[object DataView]",q_=xt(qn),F_=xt(Fn),U_=xt(Un),Z_=xt(Zn),G_=xt(Gn),He=Gs;(qn&&He(new qn(new ArrayBuffer(1)))!=Ws||Fn&&He(new Fn)!=Ks||Un&&He(Un.resolve())!=zs||Zn&&He(new Zn)!=Vs||Gn&&He(new Gn)!=Hs)&&(He=function(r){var t=Gs(r),a=t==R_?r.constructor:void 0,n=a?xt(a):"";if(n)switch(n){case q_:return Ws;case F_:return Ks;case U_:return zs;case Z_:return Vs;case G_:return Hs}return t});var br=He,K_=Object.prototype,z_=K_.hasOwnProperty;function V_(r){var t=r.length,a=new r.constructor(t);return t&&typeof r[0]=="string"&&z_.call(r,"index")&&(a.index=r.index,a.input=r.input),a}var H_=V_,W_=de,Y_=W_.Uint8Array,Ys=Y_,Qs=Ys;function Q_(r){var t=new r.constructor(r.byteLength);return new Qs(t).set(new Qs(r)),t}var Kn=Q_,X_=Kn;function J_(r,t){var a=t?X_(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}var ew=J_,tw=/\w*$/;function rw(r){var t=new r.constructor(r.source,tw.exec(r));return t.lastIndex=r.lastIndex,t}var aw=rw,Xs=tt,Js=Xs?Xs.prototype:void 0,el=Js?Js.valueOf:void 0;function nw(r){return el?Object(el.call(r)):{}}var iw=nw,ow=Kn;function sw(r,t){var a=t?ow(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}var tl=sw,lw=Kn,cw=ew,uw=aw,dw=iw,pw=tl,gw="[object Boolean]",mw="[object Date]",fw="[object Map]",yw="[object Number]",hw="[object RegExp]",bw="[object Set]",vw="[object String]",Tw="[object Symbol]",jw="[object ArrayBuffer]",Aw="[object DataView]",_w="[object Float32Array]",ww="[object Float64Array]",Ew="[object Int8Array]",xw="[object Int16Array]",$w="[object Int32Array]",Sw="[object Uint8Array]",Lw="[object Uint8ClampedArray]",Cw="[object Uint16Array]",kw="[object Uint32Array]";function Pw(r,t,a){var n=r.constructor;switch(t){case jw:return lw(r);case gw:case mw:return new n(+r);case Aw:return cw(r,a);case _w:case ww:case Ew:case xw:case $w:case Sw:case Lw:case Cw:case kw:return pw(r,a);case fw:return new n;case yw:case vw:return new n(r);case hw:return uw(r);case bw:return new n;case Tw:return dw(r)}}var Dw=Pw,Ow=te,rl=Object.create,Nw=function(){function r(){}return function(t){if(!Ow(t))return{};if(rl)return rl(t);r.prototype=t;var a=new r;return r.prototype=void 0,a}}(),al=Nw,Iw=al,Bw=pa,Mw=ua;function Rw(r){return typeof r.constructor=="function"&&!Mw(r)?Iw(Bw(r)):{}}var nl=Rw,qw=br,Fw=be,Uw="[object Map]";function Zw(r){return Fw(r)&&qw(r)==Uw}var Gw=Zw,Kw=Gw,zw=Bn,il=Mn,ol=il&&il.isMap,Vw=ol?zw(ol):Kw,Hw=Vw,Ww=br,Yw=be,Qw="[object Set]";function Xw(r){return Yw(r)&&Ww(r)==Qw}var Jw=Xw,eE=Jw,tE=Bn,sl=Mn,ll=sl&&sl.isSet,rE=ll?tE(ll):eE,aE=rE,nE=sa,iE=Cs,oE=Dn,sE=_A,lE=qA,cE=Is,uE=Bs,dE=JA,pE=d_,gE=Us,mE=Zs,fE=br,yE=H_,hE=Dw,bE=nl,vE=V,TE=wt,jE=Hw,AE=te,_E=aE,wE=yr,EE=hr,xE=1,$E=2,SE=4,cl="[object Arguments]",LE="[object Array]",CE="[object Boolean]",kE="[object Date]",PE="[object Error]",ul="[object Function]",DE="[object GeneratorFunction]",OE="[object Map]",NE="[object Number]",dl="[object Object]",IE="[object RegExp]",BE="[object Set]",ME="[object String]",RE="[object Symbol]",qE="[object WeakMap]",FE="[object ArrayBuffer]",UE="[object DataView]",ZE="[object Float32Array]",GE="[object Float64Array]",KE="[object Int8Array]",zE="[object Int16Array]",VE="[object Int32Array]",HE="[object Uint8Array]",WE="[object Uint8ClampedArray]",YE="[object Uint16Array]",QE="[object Uint32Array]",R={};R[cl]=R[LE]=R[FE]=R[UE]=R[CE]=R[kE]=R[ZE]=R[GE]=R[KE]=R[zE]=R[VE]=R[OE]=R[NE]=R[dl]=R[IE]=R[BE]=R[ME]=R[RE]=R[HE]=R[WE]=R[YE]=R[QE]=!0,R[PE]=R[ul]=R[qE]=!1;function ga(r,t,a,n,i,o){var s,l=t&xE,c=t&$E,u=t&SE;if(a&&(s=i?a(r,n,i,o):a(r)),s!==void 0)return s;if(!AE(r))return r;var d=vE(r);if(d){if(s=yE(r),!l)return uE(r,s)}else{var g=fE(r),f=g==ul||g==DE;if(TE(r))return cE(r,l);if(g==dl||g==cl||f&&!i){if(s=c||f?{}:bE(r),!l)return c?pE(r,lE(s,r)):dE(r,sE(s,r))}else{if(!R[g])return i?r:{};s=hE(r,g,l)}}o||(o=new nE);var b=o.get(r);if(b)return b;o.set(r,s),_E(r)?r.forEach(function(C){s.add(ga(C,t,a,C,r,o))}):jE(r)&&r.forEach(function(C,A){s.set(A,ga(C,t,a,A,r,o))});var h=u?c?mE:gE:c?EE:wE,y=d?void 0:h(r);return iE(y||r,function(C,A){y&&(A=C,C=r[A]),oE(s,A,ga(C,t,a,A,r,o))}),s}var XE=ga;function JE(r){var t=r==null?0:r.length;return t?r[t-1]:void 0}var ex=JE;function tx(r,t,a){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),a=a>i?i:a,a<0&&(a+=i),i=t>a?0:a-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=r[n+t];return o}var rx=tx,ax=Pr,nx=rx;function ix(r,t){return t.length<2?r:ax(r,nx(t,0,-1))}var ox=ix,sx=ot,lx=ex,cx=ox,ux=st;function dx(r,t){return t=sx(t,r),r=cx(r,t),r==null||delete r[ux(lx(t))]}var px=dx,gx=rt,mx=pa,fx=be,yx="[object Object]",hx=Function.prototype,bx=Object.prototype,pl=hx.toString,vx=bx.hasOwnProperty,Tx=pl.call(Object);function jx(r){if(!fx(r)||gx(r)!=yx)return!1;var t=mx(r);if(t===null)return!0;var a=vx.call(t,"constructor")&&t.constructor;return typeof a=="function"&&a instanceof a&&pl.call(a)==Tx}var gl=jx,Ax=gl;function _x(r){return Ax(r)?void 0:r}var wx=_x,Ex=_i,xx=XE,$x=px,Sx=ot,Lx=_t,Cx=wx,kx=Ls,Px=Zs,Dx=1,Ox=2,Nx=4,Ix=kx(function(r,t){var a={};if(r==null)return a;var n=!1;t=Ex(t,function(o){return o=Sx(o,r),n||(n=o.length>1),o}),Lx(r,Px(r),a),n&&(a=xx(a,Dx|Ox|Nx,Cx));for(var i=t.length;i--;)$x(a,t[i]);return a}),Bx=Ix;const Mx=ee(Bx);function Rx(r,t){for(var a=-1,n=r==null?0:r.length;++a<n;)if(!t(r[a],a,r))return!1;return!0}var qx=Rx;function Fx(r){return function(t,a,n){for(var i=-1,o=Object(t),s=n(t),l=s.length;l--;){var c=s[r?l:++i];if(a(o[c],c,o)===!1)break}return t}}var Ux=Fx,Zx=Ux,Gx=Zx(),ml=Gx,Kx=ml,zx=yr;function Vx(r,t){return r&&Kx(r,t,zx)}var fl=Vx,Hx=Et;function Wx(r,t){return function(a,n){if(a==null)return a;if(!Hx(a))return r(a,n);for(var i=a.length,o=t?i:-1,s=Object(a);(t?o--:++o<i)&&n(s[o],o,s)!==!1;);return a}}var Yx=Wx,Qx=fl,Xx=Yx,Jx=Xx(Qx),e$=Jx,t$=e$;function r$(r,t){var a=!0;return t$(r,function(n,i,o){return a=!!t(n,i,o),a}),a}var a$=r$,n$="__lodash_hash_undefined__";function i$(r){return this.__data__.set(r,n$),this}var o$=i$;function s$(r){return this.__data__.has(r)}var l$=s$,c$=qa,u$=o$,d$=l$;function ma(r){var t=-1,a=r==null?0:r.length;for(this.__data__=new c$;++t<a;)this.add(r[t])}ma.prototype.add=ma.prototype.push=u$,ma.prototype.has=d$;var p$=ma;function g$(r,t){for(var a=-1,n=r==null?0:r.length;++a<n;)if(t(r[a],a,r))return!0;return!1}var m$=g$;function f$(r,t){return r.has(t)}var y$=f$,h$=p$,b$=m$,v$=y$,T$=1,j$=2;function A$(r,t,a,n,i,o){var s=a&T$,l=r.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(r),d=o.get(t);if(u&&d)return u==t&&d==r;var g=-1,f=!0,b=a&j$?new h$:void 0;for(o.set(r,t),o.set(t,r);++g<l;){var h=r[g],y=t[g];if(n)var C=s?n(y,h,g,t,r,o):n(h,y,g,r,t,o);if(C!==void 0){if(C)continue;f=!1;break}if(b){if(!b$(t,function(A,G){if(!v$(b,G)&&(h===A||i(h,A,a,n,o)))return b.push(G)})){f=!1;break}}else if(!(h===y||i(h,y,a,n,o))){f=!1;break}}return o.delete(r),o.delete(t),f}var yl=A$;function _$(r){var t=-1,a=Array(r.size);return r.forEach(function(n,i){a[++t]=[i,n]}),a}var w$=_$;function E$(r){var t=-1,a=Array(r.size);return r.forEach(function(n){a[++t]=n}),a}var x$=E$,hl=tt,bl=Ys,$$=Pt,S$=yl,L$=w$,C$=x$,k$=1,P$=2,D$="[object Boolean]",O$="[object Date]",N$="[object Error]",I$="[object Map]",B$="[object Number]",M$="[object RegExp]",R$="[object Set]",q$="[object String]",F$="[object Symbol]",U$="[object ArrayBuffer]",Z$="[object DataView]",vl=hl?hl.prototype:void 0,zn=vl?vl.valueOf:void 0;function G$(r,t,a,n,i,o,s){switch(a){case Z$:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case U$:return!(r.byteLength!=t.byteLength||!o(new bl(r),new bl(t)));case D$:case O$:case B$:return $$(+r,+t);case N$:return r.name==t.name&&r.message==t.message;case M$:case q$:return r==t+"";case I$:var l=L$;case R$:var c=n&k$;if(l||(l=C$),r.size!=t.size&&!c)return!1;var u=s.get(r);if(u)return u==t;n|=P$,s.set(r,t);var d=S$(l(r),l(t),n,i,o,s);return s.delete(r),d;case F$:if(zn)return zn.call(r)==zn.call(t)}return!1}var K$=G$,Tl=Us,z$=1,V$=Object.prototype,H$=V$.hasOwnProperty;function W$(r,t,a,n,i,o){var s=a&z$,l=Tl(r),c=l.length,u=Tl(t),d=u.length;if(c!=d&&!s)return!1;for(var g=c;g--;){var f=l[g];if(!(s?f in t:H$.call(t,f)))return!1}var b=o.get(r),h=o.get(t);if(b&&h)return b==t&&h==r;var y=!0;o.set(r,t),o.set(t,r);for(var C=s;++g<c;){f=l[g];var A=r[f],G=t[f];if(n)var S=s?n(G,A,f,t,r,o):n(A,G,f,r,t,o);if(!(S===void 0?A===G||i(A,G,a,n,o):S)){y=!1;break}C||(C=f=="constructor")}if(y&&!C){var D=r.constructor,X=t.constructor;D!=X&&"constructor"in r&&"constructor"in t&&!(typeof D=="function"&&D instanceof D&&typeof X=="function"&&X instanceof X)&&(y=!1)}return o.delete(r),o.delete(t),y}var Y$=W$,Vn=sa,Q$=yl,X$=K$,J$=Y$,jl=br,Al=V,_l=wt,eS=fr,tS=1,wl="[object Arguments]",El="[object Array]",fa="[object Object]",rS=Object.prototype,xl=rS.hasOwnProperty;function aS(r,t,a,n,i,o){var s=Al(r),l=Al(t),c=s?El:jl(r),u=l?El:jl(t);c=c==wl?fa:c,u=u==wl?fa:u;var d=c==fa,g=u==fa,f=c==u;if(f&&_l(r)){if(!_l(t))return!1;s=!0,d=!1}if(f&&!d)return o||(o=new Vn),s||eS(r)?Q$(r,t,a,n,i,o):X$(r,t,c,a,n,i,o);if(!(a&tS)){var b=d&&xl.call(r,"__wrapped__"),h=g&&xl.call(t,"__wrapped__");if(b||h){var y=b?r.value():r,C=h?t.value():t;return o||(o=new Vn),i(y,C,a,n,o)}}return f?(o||(o=new Vn),J$(r,t,a,n,i,o)):!1}var nS=aS,iS=nS,$l=be;function Sl(r,t,a,n,i){return r===t?!0:r==null||t==null||!$l(r)&&!$l(t)?r!==r&&t!==t:iS(r,t,a,n,Sl,i)}var Hn=Sl,oS=sa,sS=Hn,lS=1,cS=2;function uS(r,t,a,n){var i=a.length,o=i,s=!n;if(r==null)return!o;for(r=Object(r);i--;){var l=a[i];if(s&&l[2]?l[1]!==r[l[0]]:!(l[0]in r))return!1}for(;++i<o;){l=a[i];var c=l[0],u=r[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in r))return!1}else{var g=new oS;if(n)var f=n(u,d,c,r,t,g);if(!(f===void 0?sS(d,u,lS|cS,n,g):f))return!1}}return!0}var dS=uS,pS=te;function gS(r){return r===r&&!pS(r)}var Ll=gS,mS=Ll,fS=yr;function yS(r){for(var t=fS(r),a=t.length;a--;){var n=t[a],i=r[n];t[a]=[n,i,mS(i)]}return t}var hS=yS;function bS(r,t){return function(a){return a==null?!1:a[r]===t&&(t!==void 0||r in Object(a))}}var Cl=bS,vS=dS,TS=hS,jS=Cl;function AS(r){var t=TS(r);return t.length==1&&t[0][2]?jS(t[0][0],t[0][1]):function(a){return a===r||vS(a,r,t)}}var _S=AS,wS=Hn,ES=Si,xS=js,$S=Ia,SS=Ll,LS=Cl,CS=st,kS=1,PS=2;function DS(r,t){return $S(r)&&SS(t)?LS(CS(r),t):function(a){var n=ES(a,r);return n===void 0&&n===t?xS(a,r):wS(t,n,kS|PS)}}var OS=DS;function NS(r){return function(t){return t==null?void 0:t[r]}}var IS=NS,BS=Pr;function MS(r){return function(t){return BS(t,r)}}var RS=MS,qS=IS,FS=RS,US=Ia,ZS=st;function GS(r){return US(r)?qS(ZS(r)):FS(r)}var KS=GS,zS=_S,VS=OS,HS=In,WS=V,YS=KS;function QS(r){return typeof r=="function"?r:r==null?HS:typeof r=="object"?WS(r)?VS(r[0],r[1]):zS(r):YS(r)}var kl=QS,XS=Pt,JS=Et,eL=ia,tL=te;function rL(r,t,a){if(!tL(a))return!1;var n=typeof t;return(n=="number"?JS(a)&&eL(t,a.length):n=="string"&&t in a)?XS(a[t],r):!1}var Pl=rL,aL=qx,nL=a$,iL=kl,oL=V,sL=Pl;function lL(r,t,a){var n=oL(r)?aL:nL;return a&&sL(r,t,a)&&(t=void 0),n(r,iL(t))}var cL=lL;const uL=ee(cL);var dL=Object.prototype,pL=dL.hasOwnProperty;function gL(r,t){return r!=null&&pL.call(r,t)}var mL=gL,fL=mL,yL=Ts;function hL(r,t){return r!=null&&yL(r,t,fL)}var bL=hL;const vL=ee(bL);var TL=Ns,jL=br,AL=mr,_L=V,wL=Et,EL=wt,xL=ua,$L=fr,SL="[object Map]",LL="[object Set]",CL=Object.prototype,kL=CL.hasOwnProperty;function PL(r){if(r==null)return!0;if(wL(r)&&(_L(r)||typeof r=="string"||typeof r.splice=="function"||EL(r)||$L(r)||AL(r)))return!r.length;var t=jL(r);if(t==SL||t==LL)return!r.size;if(xL(r))return!TL(r).length;for(var a in r)if(kL.call(r,a))return!1;return!0}var DL=PL;const Dl=ee(DL);var OL=Cs,NL=al,IL=fl,BL=kl,ML=pa,RL=V,qL=wt,FL=$r,UL=te,ZL=fr;function GL(r,t,a){var n=RL(r),i=n||qL(r)||ZL(r);if(t=BL(t),a==null){var o=r&&r.constructor;i?a=n?new o:[]:UL(r)?a=FL(o)?NL(ML(r)):{}:a={}}return(i?OL:IL)(r,function(s,l,c){return t(a,s,l,c)}),a}var KL=GL;const zL=ee(KL);function vr(r,t){return zL(r,(a,n,i)=>{if(!vL(t,i))a[i]=n;else if(Ba(n)&&!Oa(n)){const o=vr(n,t[i]);Dl(o)||(a[i]=o)}else if(Oa(n)&&Oa(t[i])){const o=n.map((s,l)=>vr(s,t[i][l]));uL(o,Dl)||(a[i]=o)}})}const VL=({data:r,transactionSnapshot:t,staticLocator:a})=>{const n={action:"modify",staticLocator:a},i=structuredClone(r);n.setCoverageTerms=r.coverageTerms,n.removeCoverageTerms=vr(t.segment.element.coverageTerms??{},r.coverageTerms??{});const o=t.segment.element.data??{},s=Mx(i,["coverageTerms","default"]);return n.setData=s,n.removeData=vr(o,s),n},HL=({data:r,timezone:t})=>{const a={action:"params",effectiveTime:ka(r.default.effectiveTime).toDate(t).toISOString()};return r.default.newPolicyEndDate&&(a.newPolicyEndTime=ka(r.default.newPolicyEndDate).toDate(t).toISOString()),a},WL=Y.z.enum(["currency","timezone","billingLevel","billingTrigger","durationBasis","delinquencyPlanName","autoRenewalPlanName","installmentPlanName"]);Y.z.record(WL,Y.z.string().optional());const YL=r=>{var b,h;const{data:t,default:a,advanced:n,coverageTerms:i,quote:o}=r,s={setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};ne(((b=o.element)==null?void 0:b.data)??{},t).forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":if(y.path.some(C=>!isNaN(Number(C)))){const C=K(t,y.path[0]);P(s.setData??{},y.path[0],C)}else P(s.setData??{},y.path,y.value);break;case"REMOVE":if(y.path.some(C=>!isNaN(Number(C)))){const C=K(t,y.path[0]);C.length===0?P(s.removeData??{},y.path[0],!0):P(s.setData??{},y.path[0],C)}else P(s.removeData??{},y.path,!0);break}}),ne(((h=o.element)==null?void 0:h.coverageTerms)??{},i??{}).forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":P(s.setCoverageTerms??{},y.path,y.value);break;case"REMOVE":P(s.removeCoverageTerms??{},y.path,!0);break}});const u=oa(o,["startTime","endTime","expirationTime"]),d=oa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName","installmentPlanName"]),g=ne(u??{},a??{}),f=ne(d??{},n??{});return g.forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":P(s,y.path,y.value);break;case"REMOVE":P(s,y.path,null);break}}),f.forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":y.path.includes("installmentPlanName")?P(s,["preferences","installmentPreferences",...y.path],y.value):P(s,y.path,y.value);break;case"REMOVE":P(s,y.path,null);break}}),s},QL=r=>{var i,o;const t={locator:r.element.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};return ne(((i=r.element)==null?void 0:i.data)??{},r.data).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);P(t.setData??{},s.path[0],l)}else P(t.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);l.length===0?P(t.removeData??{},s.path[0],!0):P(t.setData??{},s.path[0],l)}else P(t.removeData??{},s.path,!0);break}}),ne(((o=r.element)==null?void 0:o.coverageTerms)??{},r.coverageTerms??{}).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":P(t.setCoverageTerms??{},s.path,s.value);break;case"REMOVE":P(t.removeCoverageTerms??{},s.path,!0);break}}),t};function XL(r){return r.keyword==="pattern"&&(r.message=`Invalid format, must match pattern ${r.params.pattern}`),r.keyword==="format"&&(r.message="Invalid format"),r.keyword==="required"&&(r.message="Required"),r.keyword==="minItems"&&(r.message=`Must have at least ${r.params.limit} item${r.params.limit!==1?"s":""}`),r.keyword==="maxItems"&&(r.message=`Must have at most ${r.params.limit} item${r.params.limit!==1?"s":""}`),r.keyword==="type"&&(r.message="Invalid format"),r.keyword==="maxLength"&&(r.message=`Must be at most ${r.params.limit} character${r.params.limit!==1?"s":""}`),r.keyword==="minLength"&&(r.message=`Must be at least ${r.params.limit} character${r.params.limit!==1?"s":""}`),r.keyword==="minimum"&&(r.message=`Must be greater than or equal to ${r.params.limit}`),r.keyword==="maximum"&&(r.message=`Must be less than or equal to ${r.params.limit}`),r.keyword==="enum"&&(r.message="Invalid value"),r.message??"Unknown error"}const JL=({dependencyMap:r,locator:t,data:a})=>{const n={};return!r[t]||Object.keys(r[t]).length===0||Object.keys(r[t]).forEach(i=>{const o={};r[t][i].where&&Object.keys(r[t][i].where??{}).forEach(s=>{const l=r[t][i].where&&r[t][i].where[s].fieldName;l&&K(a,l)&&P(o,`${s}`,K(a,l))}),n[t]?n[t]={...n[t],[i]:o}:n[t]={[i]:o}}),n};var e1=Pn,t1=Pt;function r1(r,t,a){(a!==void 0&&!t1(r[t],a)||a===void 0&&!(t in r))&&e1(r,t,a)}var Ol=r1,a1=Et,n1=be;function i1(r){return n1(r)&&a1(r)}var o1=i1;function s1(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var Nl=s1,l1=_t,c1=hr;function u1(r){return l1(r,c1(r))}var d1=u1,Il=Ol,p1=Is,g1=tl,m1=Bs,f1=nl,Bl=mr,Ml=V,y1=o1,h1=wt,b1=$r,v1=te,T1=gl,j1=fr,Rl=Nl,A1=d1;function _1(r,t,a,n,i,o,s){var l=Rl(r,a),c=Rl(t,a),u=s.get(c);if(u){Il(r,a,u);return}var d=o?o(l,c,a+"",r,t,s):void 0,g=d===void 0;if(g){var f=Ml(c),b=!f&&h1(c),h=!f&&!b&&j1(c);d=c,f||b||h?Ml(l)?d=l:y1(l)?d=m1(l):b?(g=!1,d=p1(c,!0)):h?(g=!1,d=g1(c,!0)):d=[]:T1(c)||Bl(c)?(d=l,Bl(l)?d=A1(l):(!v1(l)||b1(l))&&(d=f1(c))):g=!1}g&&(s.set(c,d),i(d,c,n,o,s),s.delete(c)),Il(r,a,d)}var w1=_1,E1=sa,x1=Ol,$1=ml,S1=w1,L1=te,C1=hr,k1=Nl;function ql(r,t,a,n,i){r!==t&&$1(t,function(o,s){if(i||(i=new E1),L1(o))S1(r,t,s,a,ql,n,i);else{var l=n?n(k1(r,s),o,s+"",r,t,i):void 0;l===void 0&&(l=o),x1(r,s,l)}},C1)}var P1=ql,D1=In,O1=xs,N1=Ss;function I1(r,t){return N1(O1(r,t,D1),r+"")}var B1=I1,M1=B1,R1=Pl;function q1(r){return M1(function(t,a){var n=-1,i=a.length,o=i>1?a[i-1]:void 0,s=i>2?a[2]:void 0;for(o=r.length>3&&typeof o=="function"?(i--,o):void 0,s&&R1(a[0],a[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var l=a[n];l&&r(t,l,n,o)}return t})}var F1=q1,U1=P1,Z1=F1,G1=Z1(function(r,t,a){U1(r,t,a)}),K1=G1;const z1=ee(K1),V1=({defaultValues:r,accountType:t,account:a})=>{var i,o;const n=z1(r??{},a??{});return{data:(a==null?void 0:a.data)??{},type:t,advanced:{autoRenewalPlanName:n==null?void 0:n.autoRenewalPlanName,delinquencyPlanName:n==null?void 0:n.delinquencyPlanName,excessCreditPlanName:n==null?void 0:n.excessCreditPlanName,shortfallTolerancePlanName:n==null?void 0:n.shortfallTolerancePlanName,billingLevel:n==null?void 0:n.billingLevel,invoiceDocument:n==null?void 0:n.invoiceDocument,installmentPlanName:(o=(i=n==null?void 0:n.preferences)==null?void 0:i.installmentPreferences)==null?void 0:o.installmentPlanName},saveAsDraft:!((r==null?void 0:r.autoValidate)??!0)}};var H1=Hn;function W1(r,t){return H1(r,t)}var Y1=W1;const Q1=ee(Y1),Fl=(r,t,a)=>{const n=[];if(Object.keys(r).length===0&&Object.keys(t).length===0)return n;Object.keys(r).length===0&&n.push({originalValue:null,newValue:t,path:a??[]});for(const o in r){const s=r[o],l=t[o];if(Array.isArray(s)&&Array.isArray(l))for(let c=0;c<l.length;c++){const u=s[c]??{},d=l[c]??{},g=Fl(u,d,a?[...a,o,`${c}`]:[o,`${c}`]);g.length!==0&&n.push(...g)}else if(Ba(r[o])&&Ba(t[o])){if(Q1(r[o],t[o]))continue;n.push({originalValue:r[o],newValue:t[o],path:a?[...a,o]:[o]})}else s!==l&&(!s&&l?n.push({originalValue:void 0,newValue:l,path:a?[...a,o]:[o]}):s&&!l?n.push({originalValue:s,newValue:void 0,path:a?[...a,o]:[o]}):n.push({originalValue:s,newValue:l,path:a?[...a,o]:[o]}))}return Object.keys(t).filter(o=>!r[o]).forEach(o=>{n.push({originalValue:"",newValue:t[o],path:a?[...a,o]:[o]})}),n},X1=(r,t,a)=>{const n=t==null?void 0:t[a];if(!n)return r;const i={...r};return Object.keys(n).forEach(o=>{const s=n[o],l=K(i,o);l&&(typeof l=="string"&&s.includes(l)||(i[o]=""))}),i};Y.z.object({autoRenewalPlanName:Y.z.string().optional(),delinquencyPlanName:Y.z.string().optional(),excessCreditPlanName:Y.z.string().optional(),shortfallTolerancePlanName:Y.z.string().optional(),billingLevel:jn.optional(),invoiceDocument:Y.z.string().optional(),installmentPlanName:Y.z.string().optional()});function J1(r){var n;const t={...r.advanced};delete t.installmentPlanName;const a={installmentPlanName:r.advanced.installmentPlanName};if(r.account){const i={setData:{},removeData:{},type:r.type,autoValidate:r.autoValidate,...t,preferences:{...r.account.preferences,...r.advanced.installmentPlanName?{installmentPreferences:a}:{}}};return ne(((n=r.account)==null?void 0:n.data)??{},r.data).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);P(i.setData??{},s.path[0],l)}else P(i.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);l.length===0?P(i.removeData??{},s.path[0],!0):P(i.setData??{},s.path[0],l)}else P(i.removeData??{},s.path,!0);break}}),i}else return{type:r.type,autoValidate:r.autoValidate,data:r.data,...t,preferences:{...r.advanced.installmentPlanName?{installmentPreferences:a}:{}}}}O.DataFieldTagFeature=Li,O.compareData=Fl,O.dataModelToJSONSchema=Ci,O.extractElementByLocator=Ga,O.extractElementDataModelFromQuote=rg,O.extractElementDataModelFromSegment=ag,O.extractElementDataModelFromType=Ka,O.extractElementsFromQuote=ng,O.extractElementsFromTransactionSegment=ig,O.extractProductDataModel=og,O.extractProductElements=sg,O.getAccountRequest=J1,O.getCoverageTermsDefaultValues=qe,O.getDefaultAccountFormValues=V1,O.getDefaultDraftTransactionValues=lg,O.getDefaultElementValues=cg,O.getDefaultInitializedTransactionValues=ug,O.getDefaultQuoteValues=tv,O.getElementNameByType=Pi,O.getElementRequest=QL,O.getElementTransactionUpdateRequestFromFormData=MT,O.getEvaluatedConstraintsRequest=JL,O.getModifyChangeInstructionCreateRequestFromFormData=VL,O.getParamsChangeInstructionCreateRequestFromFormData=HL,O.getQuoteRequest=YL,O.getRemoveDataFieldValues=vr,O.getUpdatedDataFromConstraints=X1,O.splitInputAndQuantifier=Di,O.translateError=XL,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
1
+ (function(O,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("zod")):typeof define=="function"&&define.amd?define(["exports","zod"],Y):(O=typeof globalThis<"u"?globalThis:O||self,Y(O.schemas={},O.zod))})(this,function(O,Y){"use strict";function ja(r,t){return r-t*Math.floor(r/t)}const Yn=1721426;function Tr(r,t,a,n){t=_a(r,t);let i=t-1,o=-2;return a<=2?o=0:Ar(t)&&(o=-1),Yn-1+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*a-362)/12+o+n)}function Ar(r){return r%4===0&&(r%100!==0||r%400===0)}function _a(r,t){return r==="BC"?1-t:t}function sc(r){let t="AD";return r<=0&&(t="BC",r=1-r),[t,r]}const lc={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class Ye{fromJulianDay(t){let a=t,n=a-Yn,i=Math.floor(n/146097),o=ja(n,146097),s=Math.floor(o/36524),l=ja(o,36524),c=Math.floor(l/1461),u=ja(l,1461),d=Math.floor(u/365),g=i*400+s*100+c*4+d+(s!==4&&d!==4?1:0),[f,h]=sc(g),y=a-Tr(f,h,1,1),b=2;a<Tr(f,h,3,1)?b=0:Ar(h)&&(b=1);let L=Math.floor(((y+b)*12+373)/367),j=a-Tr(f,h,L,1)+1;return new et(f,h,L,j)}toJulianDay(t){return Tr(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return lc[Ar(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Ar(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}function Qn(r,t){return r.calendar.toJulianDay(r)-t.calendar.toJulianDay(t)}function cc(r,t){return Xn(r)-Xn(t)}function Xn(r){return r.hour*36e5+r.minute*6e4+r.second*1e3+r.millisecond}let wa=null;function Ea(){return wa==null&&(wa=new Intl.DateTimeFormat().resolvedOptions().timeZone),wa}function Qe(r){r=ue(r,new Ye);let t=_a(r.era,r.year);return Jn(t,r.month,r.day,r.hour,r.minute,r.second,r.millisecond)}function Jn(r,t,a,n,i,o,s){let l=new Date;return l.setUTCHours(n,i,o,s),l.setUTCFullYear(r,t-1,a),l.getTime()}function xa(r,t){if(t==="UTC")return 0;if(r>0&&t===Ea())return new Date(r).getTimezoneOffset()*-6e4;let{year:a,month:n,day:i,hour:o,minute:s,second:l}=ti(r,t);return Jn(a,n,i,o,s,l,0)-Math.floor(r/1e3)*1e3}const ei=new Map;function ti(r,t){let a=ei.get(t);a||(a=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),ei.set(t,a));let n=a.formatToParts(new Date(r)),i={};for(let o of n)o.type!=="literal"&&(i[o.type]=o.value);return{year:i.era==="BC"||i.era==="B"?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour==="24"?0:+i.hour,minute:+i.minute,second:+i.second}}const ri=864e5;function uc(r,t,a,n){return(a===n?[a]:[a,n]).filter(o=>dc(r,t,o))}function dc(r,t,a){let n=ti(a,t);return r.year===n.year&&r.month===n.month&&r.day===n.day&&r.hour===n.hour&&r.minute===n.minute&&r.second===n.second}function ye(r,t,a="compatible"){let n=Xe(r);if(t==="UTC")return Qe(n);if(t===Ea()&&a==="compatible"){n=ue(n,new Ye);let c=new Date,u=_a(n.era,n.year);return c.setFullYear(u,n.month-1,n.day),c.setHours(n.hour,n.minute,n.second,n.millisecond),c.getTime()}let i=Qe(n),o=xa(i-ri,t),s=xa(i+ri,t),l=uc(n,t,i-o,i-s);if(l.length===1)return l[0];if(l.length>1)switch(a){case"compatible":case"earlier":return l[0];case"later":return l[l.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(a){case"earlier":return Math.min(i-o,i-s);case"compatible":case"later":return Math.max(i-o,i-s);case"reject":throw new RangeError("No such absolute time found")}}function ai(r,t,a="compatible"){return new Date(ye(r,t,a))}function $e(r,t){let a=xa(r,t),n=new Date(r+a),i=n.getUTCFullYear(),o=n.getUTCMonth()+1,s=n.getUTCDate(),l=n.getUTCHours(),c=n.getUTCMinutes(),u=n.getUTCSeconds(),d=n.getUTCMilliseconds();return new tt(i<1?"BC":"AD",i<1?-i+1:i,o,s,t,a,l,c,u,d)}function ni(r){return new et(r.calendar,r.era,r.year,r.month,r.day)}function Xe(r,t){let a=0,n=0,i=0,o=0;if("timeZone"in r)({hour:a,minute:n,second:i,millisecond:o}=r);else if("hour"in r&&!t)return r;return t&&({hour:a,minute:n,second:i,millisecond:o}=t),new Er(r.calendar,r.era,r.year,r.month,r.day,a,n,i,o)}function ue(r,t){if(r.calendar.identifier===t.identifier)return r;let a=t.fromJulianDay(r.calendar.toJulianDay(r)),n=r.copy();return n.calendar=t,n.era=a.era,n.year=a.year,n.month=a.month,n.day=a.day,Me(n),n}function pc(r,t,a){if(r instanceof tt)return r.timeZone===t?r:ii(r,t);let n=ye(r,t,a);return $e(n,t)}function gc(r){let t=Qe(r)-r.offset;return new Date(t)}function ii(r,t){let a=Qe(r)-r.offset;return ue($e(a,t),r.calendar)}const kt=36e5;function jr(r,t){let a=r.copy(),n="hour"in a?hc(a,t):0;$a(a,t.years||0),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,r),a.month+=t.months||0,Sa(a),oi(a),a.day+=(t.weeks||0)*7,a.day+=t.days||0,a.day+=n,mc(a),a.calendar.balanceDate&&a.calendar.balanceDate(a),a.year<1&&(a.year=1,a.month=1,a.day=1);let i=a.calendar.getYearsInEra(a);if(a.year>i){var o,s;let c=(o=(s=a.calendar).isInverseEra)===null||o===void 0?void 0:o.call(s,a);a.year=i,a.month=c?1:a.calendar.getMonthsInYear(a),a.day=c?1:a.calendar.getDaysInMonth(a)}a.month<1&&(a.month=1,a.day=1);let l=a.calendar.getMonthsInYear(a);return a.month>l&&(a.month=l,a.day=a.calendar.getDaysInMonth(a)),a.day=Math.max(1,Math.min(a.calendar.getDaysInMonth(a),a.day)),a}function $a(r,t){var a,n;!((a=(n=r.calendar).isInverseEra)===null||a===void 0)&&a.call(n,r)&&(t=-t),r.year+=t}function Sa(r){for(;r.month<1;)$a(r,-1),r.month+=r.calendar.getMonthsInYear(r);let t=0;for(;r.month>(t=r.calendar.getMonthsInYear(r));)r.month-=t,$a(r,1)}function mc(r){for(;r.day<1;)r.month--,Sa(r),r.day+=r.calendar.getDaysInMonth(r);for(;r.day>r.calendar.getDaysInMonth(r);)r.day-=r.calendar.getDaysInMonth(r),r.month++,Sa(r)}function oi(r){r.month=Math.max(1,Math.min(r.calendar.getMonthsInYear(r),r.month)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day))}function Me(r){r.calendar.constrainDate&&r.calendar.constrainDate(r),r.year=Math.max(1,Math.min(r.calendar.getYearsInEra(r),r.year)),oi(r)}function si(r){let t={};for(let a in r)typeof r[a]=="number"&&(t[a]=-r[a]);return t}function li(r,t){return jr(r,si(t))}function Ca(r,t){let a=r.copy();return t.era!=null&&(a.era=t.era),t.year!=null&&(a.year=t.year),t.month!=null&&(a.month=t.month),t.day!=null&&(a.day=t.day),Me(a),a}function _r(r,t){let a=r.copy();return t.hour!=null&&(a.hour=t.hour),t.minute!=null&&(a.minute=t.minute),t.second!=null&&(a.second=t.second),t.millisecond!=null&&(a.millisecond=t.millisecond),yc(a),a}function fc(r){r.second+=Math.floor(r.millisecond/1e3),r.millisecond=wr(r.millisecond,1e3),r.minute+=Math.floor(r.second/60),r.second=wr(r.second,60),r.hour+=Math.floor(r.minute/60),r.minute=wr(r.minute,60);let t=Math.floor(r.hour/24);return r.hour=wr(r.hour,24),t}function yc(r){r.millisecond=Math.max(0,Math.min(r.millisecond,1e3)),r.second=Math.max(0,Math.min(r.second,59)),r.minute=Math.max(0,Math.min(r.minute,59)),r.hour=Math.max(0,Math.min(r.hour,23))}function wr(r,t){let a=r%t;return a<0&&(a+=t),a}function hc(r,t){return r.hour+=t.hours||0,r.minute+=t.minutes||0,r.second+=t.seconds||0,r.millisecond+=t.milliseconds||0,fc(r)}function La(r,t,a,n){let i=r.copy();switch(t){case"era":{let l=r.calendar.getEras(),c=l.indexOf(r.era);if(c<0)throw new Error("Invalid era: "+r.era);c=he(c,a,0,l.length-1,n==null?void 0:n.round),i.era=l[c],Me(i);break}case"year":var o,s;!((o=(s=i.calendar).isInverseEra)===null||o===void 0)&&o.call(s,i)&&(a=-a),i.year=he(r.year,a,-1/0,9999,n==null?void 0:n.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,r);break;case"month":i.month=he(r.month,a,1,r.calendar.getMonthsInYear(r),n==null?void 0:n.round);break;case"day":i.day=he(r.day,a,1,r.calendar.getDaysInMonth(r),n==null?void 0:n.round);break;default:throw new Error("Unsupported field "+t)}return r.calendar.balanceDate&&r.calendar.balanceDate(i),Me(i),i}function ci(r,t,a,n){let i=r.copy();switch(t){case"hour":{let o=r.hour,s=0,l=23;if((n==null?void 0:n.hourCycle)===12){let c=o>=12;s=c?12:0,l=c?23:11}i.hour=he(o,a,s,l,n==null?void 0:n.round);break}case"minute":i.minute=he(r.minute,a,0,59,n==null?void 0:n.round);break;case"second":i.second=he(r.second,a,0,59,n==null?void 0:n.round);break;case"millisecond":i.millisecond=he(r.millisecond,a,0,999,n==null?void 0:n.round);break;default:throw new Error("Unsupported field "+t)}return i}function he(r,t,a,n,i=!1){if(i){r+=Math.sign(t),r<a&&(r=n);let o=Math.abs(t);t>0?r=Math.ceil(r/o)*o:r=Math.floor(r/o)*o,r>n&&(r=a)}else r+=t,r<a?r=n-(a-r-1):r>n&&(r=a+(r-n-1));return r}function ui(r,t){let a;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let i=jr(Xe(r),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});a=ye(i,r.timeZone)}else a=Qe(r)-r.offset;a+=t.milliseconds||0,a+=(t.seconds||0)*1e3,a+=(t.minutes||0)*6e4,a+=(t.hours||0)*36e5;let n=$e(a,r.timeZone);return ue(n,r.calendar)}function bc(r,t){return ui(r,si(t))}function vc(r,t,a,n){switch(t){case"hour":{let i=0,o=23;if((n==null?void 0:n.hourCycle)===12){let y=r.hour>=12;i=y?12:0,o=y?23:11}let s=Xe(r),l=ue(_r(s,{hour:i}),new Ye),c=[ye(l,r.timeZone,"earlier"),ye(l,r.timeZone,"later")].filter(y=>$e(y,r.timeZone).day===l.day)[0],u=ue(_r(s,{hour:o}),new Ye),d=[ye(u,r.timeZone,"earlier"),ye(u,r.timeZone,"later")].filter(y=>$e(y,r.timeZone).day===u.day).pop(),g=Qe(r)-r.offset,f=Math.floor(g/kt),h=g%kt;return g=he(f,a,Math.floor(c/kt),Math.floor(d/kt),n==null?void 0:n.round)*kt+h,ue($e(g,r.timeZone),r.calendar)}case"minute":case"second":case"millisecond":return ci(r,t,a,n);case"era":case"year":case"month":case"day":{let i=La(Xe(r),t,a,n),o=ye(i,r.timeZone);return ue($e(o,r.timeZone),r.calendar)}default:throw new Error("Unsupported field "+t)}}function Tc(r,t,a){let n=Xe(r),i=_r(Ca(n,t),t);if(i.compare(n)===0)return r;let o=ye(i,r.timeZone,a);return ue($e(o,r.timeZone),r.calendar)}const Ac=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,jc=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function ka(r){let t=r.match(Ac);if(!t)throw new Error("Invalid ISO 8601 date string: "+r);let a=new et(J(t[1],0,9999),J(t[2],1,12),1);return a.day=J(t[3],0,a.calendar.getDaysInMonth(a)),a}function Je(r,t){let a=r.match(jc);if(!a)throw new Error("Invalid ISO 8601 date time string: "+r);let n=J(a[1],-9999,9999),i=n<1?"BC":"AD",o=new tt(i,n<1?-n+1:n,J(a[2],1,12),1,t,0,a[4]?J(a[4],0,23):0,a[5]?J(a[5],0,59):0,a[6]?J(a[6],0,59):0,a[7]?J(a[7],0,1/0)*1e3:0);o.day=J(a[3],0,o.calendar.getDaysInMonth(o));var s;return a[8]&&(o.offset=J(a[8],-23,23)*36e5+J((s=a[9])!==null&&s!==void 0?s:"0",0,59)*6e4),ii(o,t)}function J(r,t,a){let n=Number(r);if(n<t||n>a)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${a}`);return n}function _c(r){return`${String(r.hour).padStart(2,"0")}:${String(r.minute).padStart(2,"0")}:${String(r.second).padStart(2,"0")}${r.millisecond?String(r.millisecond/1e3).slice(1):""}`}function di(r){let t=ue(r,new Ye),a;return t.era==="BC"?a=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):a=String(t.year).padStart(4,"0"),`${a}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function pi(r){return`${di(r)}T${_c(r)}`}function wc(r){let t=Math.sign(r)<0?"-":"+";r=Math.abs(r);let a=Math.floor(r/36e5),n=r%36e5/6e4;return`${t}${String(a).padStart(2,"0")}:${String(n).padStart(2,"0")}`}function Ec(r){return`${pi(r)}${wc(r.offset)}[${r.timeZone}]`}function xc(r,t){if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pa(r,t,a){xc(r,t),t.set(r,a)}function Da(r){let t=typeof r[0]=="object"?r.shift():new Ye,a;if(typeof r[0]=="string")a=r.shift();else{let s=t.getEras();a=s[s.length-1]}let n=r.shift(),i=r.shift(),o=r.shift();return[t,a,n,i,o]}var $c=new WeakMap;class et{copy(){return this.era?new et(this.calendar,this.era,this.year,this.month,this.day):new et(this.calendar,this.year,this.month,this.day)}add(t){return jr(this,t)}subtract(t){return li(this,t)}set(t){return Ca(this,t)}cycle(t,a,n){return La(this,t,a,n)}toDate(t){return ai(this,t)}toString(){return di(this)}compare(t){return Qn(this,t)}constructor(...t){Pa(this,$c,{writable:!0,value:void 0});let[a,n,i,o,s]=Da(t);this.calendar=a,this.era=n,this.year=i,this.month=o,this.day=s,Me(this)}}var Sc=new WeakMap;class Er{copy(){return this.era?new Er(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Er(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return jr(this,t)}subtract(t){return li(this,t)}set(t){return Ca(_r(this,t),t)}cycle(t,a,n){switch(t){case"era":case"year":case"month":case"day":return La(this,t,a,n);default:return ci(this,t,a,n)}}toDate(t,a){return ai(this,t,a)}toString(){return pi(this)}compare(t){let a=Qn(this,t);return a===0?cc(this,Xe(t)):a}constructor(...t){Pa(this,Sc,{writable:!0,value:void 0});let[a,n,i,o,s]=Da(t);this.calendar=a,this.era=n,this.year=i,this.month=o,this.day=s,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Me(this)}}var Cc=new WeakMap;class tt{copy(){return this.era?new tt(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new tt(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return ui(this,t)}subtract(t){return bc(this,t)}set(t,a){return Tc(this,t,a)}cycle(t,a,n){return vc(this,t,a,n)}toDate(){return gc(this)}toString(){return Ec(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-pc(t,this.timeZone).toDate().getTime()}constructor(...t){Pa(this,Cc,{writable:!0,value:void 0});let[a,n,i,o,s]=Da(t),l=t.shift(),c=t.shift();this.calendar=a,this.era=n,this.year=i,this.month=o,this.day=s,this.timeZone=l,this.offset=c,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Me(this)}}var xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ee(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Lc=Array.isArray,V=Lc;const Oa=ee(V);var kc=typeof xr=="object"&&xr&&xr.Object===Object&&xr,gi=kc,Pc=gi,Dc=typeof self=="object"&&self&&self.Object===Object&&self,Oc=Pc||Dc||Function("return this")(),de=Oc,Nc=de,Ic=Nc.Symbol,rt=Ic,mi=rt,fi=Object.prototype,Bc=fi.hasOwnProperty,Mc=fi.toString,Pt=mi?mi.toStringTag:void 0;function Rc(r){var t=Bc.call(r,Pt),a=r[Pt];try{r[Pt]=void 0;var n=!0}catch{}var i=Mc.call(r);return n&&(t?r[Pt]=a:delete r[Pt]),i}var qc=Rc,Fc=Object.prototype,Uc=Fc.toString;function Zc(r){return Uc.call(r)}var Gc=Zc,yi=rt,Kc=qc,zc=Gc,Vc="[object Null]",Hc="[object Undefined]",hi=yi?yi.toStringTag:void 0;function Wc(r){return r==null?r===void 0?Hc:Vc:hi&&hi in Object(r)?Kc(r):zc(r)}var at=Wc;function Yc(r){return r!=null&&typeof r=="object"}var be=Yc,Qc=at,Xc=be,Jc="[object Symbol]";function eu(r){return typeof r=="symbol"||Xc(r)&&Qc(r)==Jc}var Na=eu,tu=V,ru=Na,au=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nu=/^\w*$/;function iu(r,t){if(tu(r))return!1;var a=typeof r;return a=="number"||a=="symbol"||a=="boolean"||r==null||ru(r)?!0:nu.test(r)||!au.test(r)||t!=null&&r in Object(t)}var Ia=iu;function ou(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var te=ou;const Ba=ee(te);var su=at,lu=te,cu="[object AsyncFunction]",uu="[object Function]",du="[object GeneratorFunction]",pu="[object Proxy]";function gu(r){if(!lu(r))return!1;var t=su(r);return t==uu||t==du||t==cu||t==pu}var $r=gu,mu=de,fu=mu["__core-js_shared__"],yu=fu,Ma=yu,bi=function(){var r=/[^.]+$/.exec(Ma&&Ma.keys&&Ma.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function hu(r){return!!bi&&bi in r}var bu=hu,vu=Function.prototype,Tu=vu.toString;function Au(r){if(r!=null){try{return Tu.call(r)}catch{}try{return r+""}catch{}}return""}var vi=Au,ju=$r,_u=bu,wu=te,Eu=vi,xu=/[\\^$.*+?()[\]{}|]/g,$u=/^\[object .+?Constructor\]$/,Su=Function.prototype,Cu=Object.prototype,Lu=Su.toString,ku=Cu.hasOwnProperty,Pu=RegExp("^"+Lu.call(ku).replace(xu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Du(r){if(!wu(r)||_u(r))return!1;var t=ju(r)?Pu:$u;return t.test(Eu(r))}var Ou=Du;function Nu(r,t){return r==null?void 0:r[t]}var Iu=Nu,Bu=Ou,Mu=Iu;function Ru(r,t){var a=Mu(r,t);return Bu(a)?a:void 0}var Re=Ru,qu=Re,Fu=qu(Object,"create"),Sr=Fu,Ti=Sr;function Uu(){this.__data__=Ti?Ti(null):{},this.size=0}var Zu=Uu;function Gu(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Ku=Gu,zu=Sr,Vu="__lodash_hash_undefined__",Hu=Object.prototype,Wu=Hu.hasOwnProperty;function Yu(r){var t=this.__data__;if(zu){var a=t[r];return a===Vu?void 0:a}return Wu.call(t,r)?t[r]:void 0}var Qu=Yu,Xu=Sr,Ju=Object.prototype,ed=Ju.hasOwnProperty;function td(r){var t=this.__data__;return Xu?t[r]!==void 0:ed.call(t,r)}var rd=td,ad=Sr,nd="__lodash_hash_undefined__";function id(r,t){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=ad&&t===void 0?nd:t,this}var od=id,sd=Zu,ld=Ku,cd=Qu,ud=rd,dd=od;function nt(r){var t=-1,a=r==null?0:r.length;for(this.clear();++t<a;){var n=r[t];this.set(n[0],n[1])}}nt.prototype.clear=sd,nt.prototype.delete=ld,nt.prototype.get=cd,nt.prototype.has=ud,nt.prototype.set=dd;var pd=nt;function gd(){this.__data__=[],this.size=0}var md=gd;function fd(r,t){return r===t||r!==r&&t!==t}var Dt=fd,yd=Dt;function hd(r,t){for(var a=r.length;a--;)if(yd(r[a][0],t))return a;return-1}var Cr=hd,bd=Cr,vd=Array.prototype,Td=vd.splice;function Ad(r){var t=this.__data__,a=bd(t,r);if(a<0)return!1;var n=t.length-1;return a==n?t.pop():Td.call(t,a,1),--this.size,!0}var jd=Ad,_d=Cr;function wd(r){var t=this.__data__,a=_d(t,r);return a<0?void 0:t[a][1]}var Ed=wd,xd=Cr;function $d(r){return xd(this.__data__,r)>-1}var Sd=$d,Cd=Cr;function Ld(r,t){var a=this.__data__,n=Cd(a,r);return n<0?(++this.size,a.push([r,t])):a[n][1]=t,this}var kd=Ld,Pd=md,Dd=jd,Od=Ed,Nd=Sd,Id=kd;function it(r){var t=-1,a=r==null?0:r.length;for(this.clear();++t<a;){var n=r[t];this.set(n[0],n[1])}}it.prototype.clear=Pd,it.prototype.delete=Dd,it.prototype.get=Od,it.prototype.has=Nd,it.prototype.set=Id;var Lr=it,Bd=Re,Md=de,Rd=Bd(Md,"Map"),Ra=Rd,Ai=pd,qd=Lr,Fd=Ra;function Ud(){this.size=0,this.__data__={hash:new Ai,map:new(Fd||qd),string:new Ai}}var Zd=Ud;function Gd(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var Kd=Gd,zd=Kd;function Vd(r,t){var a=r.__data__;return zd(t)?a[typeof t=="string"?"string":"hash"]:a.map}var kr=Vd,Hd=kr;function Wd(r){var t=Hd(this,r).delete(r);return this.size-=t?1:0,t}var Yd=Wd,Qd=kr;function Xd(r){return Qd(this,r).get(r)}var Jd=Xd,ep=kr;function tp(r){return ep(this,r).has(r)}var rp=tp,ap=kr;function np(r,t){var a=ap(this,r),n=a.size;return a.set(r,t),this.size+=a.size==n?0:1,this}var ip=np,op=Zd,sp=Yd,lp=Jd,cp=rp,up=ip;function ot(r){var t=-1,a=r==null?0:r.length;for(this.clear();++t<a;){var n=r[t];this.set(n[0],n[1])}}ot.prototype.clear=op,ot.prototype.delete=sp,ot.prototype.get=lp,ot.prototype.has=cp,ot.prototype.set=up;var qa=ot,ji=qa,dp="Expected a function";function Fa(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError(dp);var a=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=a.cache;if(o.has(i))return o.get(i);var s=r.apply(this,n);return a.cache=o.set(i,s)||o,s};return a.cache=new(Fa.Cache||ji),a}Fa.Cache=ji;var pp=Fa,gp=pp,mp=500;function fp(r){var t=gp(r,function(n){return a.size===mp&&a.clear(),n}),a=t.cache;return t}var yp=fp,hp=yp,bp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vp=/\\(\\)?/g,Tp=hp(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(bp,function(a,n,i,o){t.push(i?o.replace(vp,"$1"):n||a)}),t}),Ap=Tp;function jp(r,t){for(var a=-1,n=r==null?0:r.length,i=Array(n);++a<n;)i[a]=t(r[a],a,r);return i}var _i=jp,wi=rt,_p=_i,wp=V,Ep=Na,Ei=wi?wi.prototype:void 0,xi=Ei?Ei.toString:void 0;function $i(r){if(typeof r=="string")return r;if(wp(r))return _p(r,$i)+"";if(Ep(r))return xi?xi.call(r):"";var t=r+"";return t=="0"&&1/r==-1/0?"-0":t}var xp=$i,$p=xp;function Sp(r){return r==null?"":$p(r)}var Cp=Sp,Lp=V,kp=Ia,Pp=Ap,Dp=Cp;function Op(r,t){return Lp(r)?r:kp(r,t)?[r]:Pp(Dp(r))}var st=Op,Np=Na;function Ip(r){if(typeof r=="string"||Np(r))return r;var t=r+"";return t=="0"&&1/r==-1/0?"-0":t}var lt=Ip,Bp=st,Mp=lt;function Rp(r,t){t=Bp(t,r);for(var a=0,n=t.length;r!=null&&a<n;)r=r[Mp(t[a++])];return a&&a==n?r:void 0}var Pr=Rp,qp=Pr;function Fp(r,t,a){var n=r==null?void 0:qp(r,t);return n===void 0?a:n}var Si=Fp;const K=ee(Si);var Ci=(r=>(r.MultiSelect="multiselect",r))(Ci||{});const Li=r=>{const{data:t,scope:a,timezone:n=Ea(),dataTypes:i,rootDisplayName:o,ignoreConstraints:s=!1,account:l,evaluatedConstraints:c,quote:u,transactionElement:d,element:g,customDataTypeKey:f,truthyLabel:h="True",falsyLabel:y="False"}=r,b=[];let L={};const j=Object.fromEntries(Object.entries(t??{}).filter(([,S])=>{var X;const D=(X=S.scope)==null?void 0:X.split(",").map(xe=>xe.trim());return!!(!D||a.some(xe=>D.includes(xe)))}).map(([S,D])=>{var Gl,Kl,zl,Vl,Hl,Wl,Yl,Ql,Xl,Jl,ec,tc,rc,ac,nc,ic,oc;let X=!1,xe=!1,ya=!1,ha=!1;const Ul=D.displayName??S,iL=(Gl=D.type)==null?void 0:Gl.slice(-1),ba=D.maxLength,va=D.minLength,Ta=D.max,Aa=D.min,Wn=D.constraint,Zl=D.regex;let B=D.type??"",St;switch(iL){case"*":xe=!0,X=!0,B=B==null?void 0:B.split("*")[0];break;case"?":B=B==null?void 0:B.split("?")[0],X=!0;break;case"+":xe=!0,B=B==null?void 0:B.split("+")[0];break;case"!":B=B==null?void 0:B.split("!")[0];break}switch(B){case"string":B="string";break;case"int":case"long":B="integer";break;case"decimal":B="number";break;case"datetime":B="string",St="date-time",ha=!0;break;case"date":B="string",St="date",ha=!0;break;case"boolean":case"bool":B="boolean";break;default:ya=!0;break}if(Wn&&c&&!s){const ce=f?K(c,[(g==null?void 0:g.locator)??"",`${f}.${S}`]):K(c,`${g==null?void 0:g.locator}.${S}`),Be=f?K(c,[(u==null?void 0:u.locator)??"",`${f}.${S}`]):K(c,`${u==null?void 0:u.locator}.${S}`),Lt=f?K(c,[(d==null?void 0:d.staticLocator)??"",`${f}.${S}`]):K(c,`${d==null?void 0:d.staticLocator}.${S}`);g&&ce&&(D.options=ce),u&&Be&&(D.options=Be),d&&Lt&&(D.options=Lt)}if(!X&&!ya&&b.push(S),ya){const ce=i==null?void 0:i[B];if(ce){let Be=xe?[]:{};const Lt=Li({data:ce.data??{},scope:a,dataTypes:i,ignoreConstraints:s,evaluatedConstraints:c,rootDisplayName:D.displayName??ce.displayName??S,customDataTypeKey:S,quote:u,account:l,element:g,transactionElement:d,truthyLabel:h,falsyLabel:y});return u&&(zl=(Kl=u.element)==null?void 0:Kl.data)!=null&&zl[S]&&(Be=(Hl=(Vl=u.element)==null?void 0:Vl.data)==null?void 0:Hl[S]),g&&(Wl=g==null?void 0:g.data)!=null&&Wl[S]&&(Be=(Yl=g==null?void 0:g.data)==null?void 0:Yl[S]),l&&(Ql=l==null?void 0:l.data)!=null&&Ql[S]&&(Be=(Xl=l==null?void 0:l.data)==null?void 0:Xl[S]),Object.entries(Lt.definitions??{}).forEach(([oL,sL])=>{L={...L,[oL]:sL}}),Lt.definitions={},L={...L,[`${B}`]:Lt},xe?[S,{title:D.displayName??ce.displayName??S,type:"array",default:Be,items:{$ref:`#/definitions/${B}`},...!X&&{minItems:1}}]:[S,{title:ce.displayName??S,default:Be,$ref:`#/definitions/${B}`}]}}let Ct="";if(l){const ce=(l==null?void 0:l.accountState)==="validated"?S.charAt(0).toLowerCase()+S.slice(1):S;Ct=(Jl=l==null?void 0:l.data)!=null&&Jl[ce]?(ec=l==null?void 0:l.data)==null?void 0:ec[ce]:B==="boolean"?!!D.defaultValue:D.defaultValue}return u&&(Ct=(rc=(tc=u.element)==null?void 0:tc.data)!=null&&rc[S]?(nc=(ac=u.element)==null?void 0:ac.data)==null?void 0:nc[S]:B==="boolean"?!!D.defaultValue:D.defaultValue),g&&(Ct=(ic=g==null?void 0:g.data)!=null&&ic[S]?(oc=g==null?void 0:g.data)==null?void 0:oc[S]:B==="boolean"?!!D.defaultValue:D.defaultValue),xe?[S,{title:Ul,type:"array",default:Ct,...D.tag?D.tag.includes("multiselect")&&!ya&&{uniqueItems:!0}:{},items:{type:B,...ba&&{maxLength:ba},...va&&{minLength:va},...Aa&&{min:Aa},...Ta&&{max:Ta},...St&&{format:St},...Zl&&{pattern:D.regex},...D.options&&{enum:D.options},...ha&&{timezone:n}},...!X&&{minItems:1}}]:[S,{title:Ul,type:B,...Ct&&{default:Ct},...va&&{minLength:va},...ba&&{maxLength:ba},...Aa&&{minimum:parseInt(Aa)},...Ta&&{maximum:parseInt(Ta)},...St&&{format:St},...D.options&&{enum:D.options},...Zl&&{pattern:D.regex},...ha&&{timezone:n},...B==="boolean"&&{boolean:[{value:"true",label:h},{value:"false",label:y}]},...Wn&&!s&&{constraint:Wn}}]}));return{title:o||"",type:"object",definitions:L,required:b,properties:j}};class Up{add(t,a,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(t)?t:[t]).forEach(function(i){this[i]=this[i]||[],a&&this[i][n?"unshift":"push"](a)},this)}run(t,a){this[t]=this[t]||[],this[t].forEach(function(n){n.call(a&&a.context?a.context:a,a)})}}class Zp{constructor(t){this.jsep=t,this.registered={}}register(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];a.forEach(i=>{if(typeof i!="object"||!i.name||!i.init)throw new Error("Invalid JSEP plugin format");this.registered[i.name]||(i.init(this.jsep),this.registered[i.name]=i)})}}class p{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+p.version}static addUnaryOp(t){return p.max_unop_len=Math.max(t.length,p.max_unop_len),p.unary_ops[t]=1,p}static addBinaryOp(t,a,n){return p.max_binop_len=Math.max(t.length,p.max_binop_len),p.binary_ops[t]=a,n?p.right_associative.add(t):p.right_associative.delete(t),p}static addIdentifierChar(t){return p.additional_identifier_chars.add(t),p}static addLiteral(t,a){return p.literals[t]=a,p}static removeUnaryOp(t){return delete p.unary_ops[t],t.length===p.max_unop_len&&(p.max_unop_len=p.getMaxKeyLen(p.unary_ops)),p}static removeAllUnaryOps(){return p.unary_ops={},p.max_unop_len=0,p}static removeIdentifierChar(t){return p.additional_identifier_chars.delete(t),p}static removeBinaryOp(t){return delete p.binary_ops[t],t.length===p.max_binop_len&&(p.max_binop_len=p.getMaxKeyLen(p.binary_ops)),p.right_associative.delete(t),p}static removeAllBinaryOps(){return p.binary_ops={},p.max_binop_len=0,p}static removeLiteral(t){return delete p.literals[t],p}static removeAllLiterals(){return p.literals={},p}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new p(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map(a=>a.length))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return p.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!p.binary_ops[String.fromCharCode(t)]||p.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return p.isIdentifierStart(t)||p.isDecimalDigit(t)}throwError(t){const a=new Error(t+" at character "+this.index);throw a.index=this.index,a.description=t,a}runHook(t,a){if(p.hooks[t]){const n={context:this,node:a};return p.hooks.run(t,n),n.node}return a}searchHook(t){if(p.hooks[t]){const a={context:this};return p.hooks[t].find(function(n){return n.call(a.context,a),a.node}),a.node}}gobbleSpaces(){let t=this.code;for(;t===p.SPACE_CODE||t===p.TAB_CODE||t===p.LF_CODE||t===p.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),a=t.length===1?t[0]:{type:p.COMPOUND,body:t};return this.runHook("after-all",a)}gobbleExpressions(t){let a=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===p.SEMCOL_CODE||n===p.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())a.push(i);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return a}gobbleExpression(){const t=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",t)}gobbleBinaryOp(){this.gobbleSpaces();let t=this.expr.substr(this.index,p.max_binop_len),a=t.length;for(;a>0;){if(p.binary_ops.hasOwnProperty(t)&&(!p.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!p.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=a,t;t=t.substr(0,--a)}return!1}gobbleBinaryExpression(){let t,a,n,i,o,s,l,c,u;if(s=this.gobbleToken(),!s||(a=this.gobbleBinaryOp(),!a))return s;for(o={value:a,prec:p.binaryPrecedence(a),right_a:p.right_associative.has(a)},l=this.gobbleToken(),l||this.throwError("Expected expression after "+a),i=[s,o,l];a=this.gobbleBinaryOp();){if(n=p.binaryPrecedence(a),n===0){this.index-=a.length;break}o={value:a,prec:n,right_a:p.right_associative.has(a)},u=a;const d=g=>o.right_a&&g.right_a?n>g.prec:n<=g.prec;for(;i.length>2&&d(i[i.length-2]);)l=i.pop(),a=i.pop().value,s=i.pop(),t={type:p.BINARY_EXP,operator:a,left:s,right:l},i.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+u),i.push(o,t)}for(c=i.length-1,t=i[c];c>1;)t={type:p.BINARY_EXP,operator:i[c-1].value,left:i[c-2],right:t},c-=2;return t}gobbleToken(){let t,a,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(t=this.code,p.isDecimalDigit(t)||t===p.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===p.SQUOTE_CODE||t===p.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(t===p.OBRACK_CODE)i=this.gobbleArray();else{for(a=this.expr.substr(this.index,p.max_unop_len),n=a.length;n>0;){if(p.unary_ops.hasOwnProperty(a)&&(!p.isIdentifierStart(this.code)||this.index+a.length<this.expr.length&&!p.isIdentifierPart(this.expr.charCodeAt(this.index+a.length)))){this.index+=n;const o=this.gobbleToken();return o||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:p.UNARY_EXP,operator:a,argument:o,prefix:!0})}a=a.substr(0,--n)}p.isIdentifierStart(t)?(i=this.gobbleIdentifier(),p.literals.hasOwnProperty(i.name)?i={type:p.LITERAL,value:p.literals[i.name],raw:i.name}:i.name===p.this_str&&(i={type:p.THIS_EXP})):t===p.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(t){this.gobbleSpaces();let a=this.code;for(;a===p.PERIOD_CODE||a===p.OBRACK_CODE||a===p.OPAREN_CODE||a===p.QUMARK_CODE;){let n;if(a===p.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==p.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),a=this.code}this.index++,a===p.OBRACK_CODE?(t={type:p.MEMBER_EXP,computed:!0,object:t,property:this.gobbleExpression()},t.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),a=this.code,a!==p.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):a===p.OPAREN_CODE?t={type:p.CALL_EXP,arguments:this.gobbleArguments(p.CPAREN_CODE),callee:t}:(a===p.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),t={type:p.MEMBER_EXP,computed:!1,object:t,property:this.gobbleIdentifier()}),n&&(t.optional=!0),this.gobbleSpaces(),a=this.code}return t}gobbleNumericLiteral(){let t="",a,n;for(;p.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(this.code===p.PERIOD_CODE)for(t+=this.expr.charAt(this.index++);p.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);if(a=this.char,a==="e"||a==="E"){for(t+=this.expr.charAt(this.index++),a=this.char,(a==="+"||a==="-")&&(t+=this.expr.charAt(this.index++));p.isDecimalDigit(this.code);)t+=this.expr.charAt(this.index++);p.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+t+this.char+")")}return n=this.code,p.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+t+this.char+")"):(n===p.PERIOD_CODE||t.length===1&&t.charCodeAt(0)===p.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:p.LITERAL,value:parseFloat(t),raw:t}}gobbleStringLiteral(){let t="";const a=this.index,n=this.expr.charAt(this.index++);let i=!1;for(;this.index<this.expr.length;){let o=this.expr.charAt(this.index++);if(o===n){i=!0;break}else if(o==="\\")switch(o=this.expr.charAt(this.index++),o){case"n":t+=`
2
+ `;break;case"r":t+="\r";break;case"t":t+=" ";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=o}else t+=o}return i||this.throwError('Unclosed quote after "'+t+'"'),{type:p.LITERAL,value:t,raw:this.expr.substring(a,this.index)}}gobbleIdentifier(){let t=this.code,a=this.index;for(p.isIdentifierStart(t)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(t=this.code,p.isIdentifierPart(t));)this.index++;return{type:p.IDENTIFIER,name:this.expr.slice(a,this.index)}}gobbleArguments(t){const a=[];let n=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let o=this.code;if(o===t){n=!0,this.index++,t===p.CPAREN_CODE&&i&&i>=a.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}else if(o===p.COMMA_CODE){if(this.index++,i++,i!==a.length){if(t===p.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===p.CBRACK_CODE)for(let s=a.length;s<i;s++)a.push(null)}}else if(a.length!==i&&i!==0)this.throwError("Expected comma");else{const s=this.gobbleExpression();(!s||s.type===p.COMPOUND)&&this.throwError("Expected comma"),a.push(s)}}return n||this.throwError("Expected "+String.fromCharCode(t)),a}gobbleGroup(){this.index++;let t=this.gobbleExpressions(p.CPAREN_CODE);if(this.code===p.CPAREN_CODE)return this.index++,t.length===1?t[0]:t.length?{type:p.SEQUENCE_EXP,expressions:t}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:p.ARRAY_EXP,elements:this.gobbleArguments(p.CBRACK_CODE)}}}const Gp=new Up;Object.assign(p,{hooks:Gp,plugins:new Zp(p),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),p.max_unop_len=p.getMaxKeyLen(p.unary_ops),p.max_binop_len=p.getMaxKeyLen(p.binary_ops);const ve=r=>new p(r).parse(),Kp=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(p).filter(r=>!Kp.includes(r)&&ve[r]===void 0).forEach(r=>{ve[r]=p[r]}),ve.Jsep=p;const zp="ConditionalExpression";var Vp={name:"ternary",init(r){r.hooks.add("after-expression",function(a){if(a.node&&this.code===r.QUMARK_CODE){this.index++;const n=a.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===r.COLON_CODE){this.index++;const o=this.gobbleExpression();if(o||this.throwError("Expected expression"),a.node={type:zp,test:n,consequent:i,alternate:o},n.operator&&r.binary_ops[n.operator]<=.9){let s=n;for(;s.right.operator&&r.binary_ops[s.right.operator]<=.9;)s=s.right;a.node.test=s.right,s.right=a.node,a.node=n}}else this.throwError("Expected :")}})}};ve.plugins.register(Vp);const ki=47,Hp=92;var Wp={name:"regex",init(r){r.hooks.add("gobble-token",function(a){if(this.code===ki){const n=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===ki&&!i){const o=this.expr.slice(n,this.index);let s="";for(;++this.index<this.expr.length;){const c=this.code;if(c>=97&&c<=122||c>=65&&c<=90||c>=48&&c<=57)s+=this.char;else break}let l;try{l=new RegExp(o,s)}catch(c){this.throwError(c.message)}return a.node={type:r.LITERAL,value:l,raw:this.expr.slice(n-1,this.index)},a.node=this.gobbleTokenProperty(a.node),a.node}this.code===r.OBRACK_CODE?i=!0:i&&this.code===r.CBRACK_CODE&&(i=!1),this.index+=this.code===Hp?2:1}this.throwError("Unclosed Regex")}})}};const Ua=43,ct={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Ua,45],assignmentPrecedence:.9,init(r){const t=[r.IDENTIFIER,r.MEMBER_EXP];ct.assignmentOperators.forEach(n=>r.addBinaryOp(n,ct.assignmentPrecedence,!0)),r.hooks.add("gobble-token",function(i){const o=this.code;ct.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:o===Ua?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!t.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),r.hooks.add("after-token",function(i){if(i.node){const o=this.code;ct.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(t.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:o===Ua?"++":"--",argument:i.node,prefix:!1})}}),r.hooks.add("after-expression",function(i){i.node&&a(i.node)});function a(n){ct.assignmentOperators.has(n.operator)?(n.type="AssignmentExpression",a(n.left),a(n.right)):n.operator||Object.values(n).forEach(i=>{i&&typeof i=="object"&&a(i)})}}};ve.plugins.register(Wp,ct),ve.addUnaryOp("typeof"),ve.addLiteral("null",null),ve.addLiteral("undefined",void 0);const Yp=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),M={evalAst(r,t){switch(r.type){case"BinaryExpression":case"LogicalExpression":return M.evalBinaryExpression(r,t);case"Compound":return M.evalCompound(r,t);case"ConditionalExpression":return M.evalConditionalExpression(r,t);case"Identifier":return M.evalIdentifier(r,t);case"Literal":return M.evalLiteral(r,t);case"MemberExpression":return M.evalMemberExpression(r,t);case"UnaryExpression":return M.evalUnaryExpression(r,t);case"ArrayExpression":return M.evalArrayExpression(r,t);case"CallExpression":return M.evalCallExpression(r,t);case"AssignmentExpression":return M.evalAssignmentExpression(r,t);default:throw SyntaxError("Unexpected expression",r)}},evalBinaryExpression(r,t){return{"||":(n,i)=>n||i(),"&&":(n,i)=>n&&i(),"|":(n,i)=>n|i(),"^":(n,i)=>n^i(),"&":(n,i)=>n&i(),"==":(n,i)=>n==i(),"!=":(n,i)=>n!=i(),"===":(n,i)=>n===i(),"!==":(n,i)=>n!==i(),"<":(n,i)=>n<i(),">":(n,i)=>n>i(),"<=":(n,i)=>n<=i(),">=":(n,i)=>n>=i(),"<<":(n,i)=>n<<i(),">>":(n,i)=>n>>i(),">>>":(n,i)=>n>>>i(),"+":(n,i)=>n+i(),"-":(n,i)=>n-i(),"*":(n,i)=>n*i(),"/":(n,i)=>n/i(),"%":(n,i)=>n%i()}[r.operator](M.evalAst(r.left,t),()=>M.evalAst(r.right,t))},evalCompound(r,t){let a;for(let n=0;n<r.body.length;n++){r.body[n].type==="Identifier"&&["var","let","const"].includes(r.body[n].name)&&r.body[n+1]&&r.body[n+1].type==="AssignmentExpression"&&(n+=1);const i=r.body[n];a=M.evalAst(i,t)}return a},evalConditionalExpression(r,t){return M.evalAst(r.test,t)?M.evalAst(r.consequent,t):M.evalAst(r.alternate,t)},evalIdentifier(r,t){if(Object.hasOwn(t,r.name))return t[r.name];throw ReferenceError(`${r.name} is not defined`)},evalLiteral(r){return r.value},evalMemberExpression(r,t){const a=r.computed?M.evalAst(r.property):r.property.name,n=M.evalAst(r.object,t);if(n==null)throw TypeError(`Cannot read properties of ${n} (reading '${a}')`);if(!Object.hasOwn(n,a)&&Yp.has(a))throw TypeError(`Cannot read properties of ${n} (reading '${a}')`);const i=n[a];return typeof i=="function"?i.bind(n):i},evalUnaryExpression(r,t){return{"-":n=>-M.evalAst(n,t),"!":n=>!M.evalAst(n,t),"~":n=>~M.evalAst(n,t),"+":n=>+M.evalAst(n,t),typeof:n=>typeof M.evalAst(n,t)}[r.operator](r.argument)},evalArrayExpression(r,t){return r.elements.map(a=>M.evalAst(a,t))},evalCallExpression(r,t){const a=r.arguments.map(i=>M.evalAst(i,t));return M.evalAst(r.callee,t)(...a)},evalAssignmentExpression(r,t){if(r.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const a=r.left.name,n=M.evalAst(r.right,t);return t[a]=n,t[a]}};class Qp{constructor(t){this.code=t,this.ast=ve(this.code)}runInNewContext(t){const a=Object.assign(Object.create(null),t);return M.evalAst(this.ast,a)}}function Se(r,t){return r=r.slice(),r.push(t),r}function Za(r,t){return t=t.slice(),t.unshift(r),t}class Xp extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}}function I(r,t,a,n,i){if(!(this instanceof I))try{return new I(r,t,a,n,i)}catch(s){if(!s.avoidNew)throw s;return s.value}typeof r=="string"&&(i=n,n=a,a=t,t=r,r=null);const o=r&&typeof r=="object";if(r=r||{},this.json=r.json||a,this.path=r.path||t,this.resultType=r.resultType||"value",this.flatten=r.flatten||!1,this.wrap=Object.hasOwn(r,"wrap")?r.wrap:!0,this.sandbox=r.sandbox||{},this.eval=r.eval===void 0?"safe":r.eval,this.ignoreEvalErrors=typeof r.ignoreEvalErrors>"u"?!1:r.ignoreEvalErrors,this.parent=r.parent||null,this.parentProperty=r.parentProperty||null,this.callback=r.callback||n||null,this.otherTypeCallback=r.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},r.autostart!==!1){const s={path:o?r.path:t};o?"json"in r&&(s.json=r.json):s.json=a;const l=this.evaluate(s);if(!l||typeof l!="object")throw new Xp(l);return l}}I.prototype.evaluate=function(r,t,a,n){let i=this.parent,o=this.parentProperty,{flatten:s,wrap:l}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,a=a||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,t=t||this.json,r=r||this.path,r&&typeof r=="object"&&!Array.isArray(r)){if(!r.path&&r.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(r,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=r),s=Object.hasOwn(r,"flatten")?r.flatten:s,this.currResultType=Object.hasOwn(r,"resultType")?r.resultType:this.currResultType,this.currSandbox=Object.hasOwn(r,"sandbox")?r.sandbox:this.currSandbox,l=Object.hasOwn(r,"wrap")?r.wrap:l,this.currEval=Object.hasOwn(r,"eval")?r.eval:this.currEval,a=Object.hasOwn(r,"callback")?r.callback:a,this.currOtherTypeCallback=Object.hasOwn(r,"otherTypeCallback")?r.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(r,"parent")?r.parent:i,o=Object.hasOwn(r,"parentProperty")?r.parentProperty:o,r=r.path}if(i=i||null,o=o||null,Array.isArray(r)&&(r=I.toPathString(r)),!r&&r!==""||!t)return;const c=I.toPathArray(r);c[0]==="$"&&c.length>1&&c.shift(),this._hasParentSelector=null;const u=this._trace(c,t,["$"],i,o,a).filter(function(d){return d&&!d.isParentSelector});return u.length?!l&&u.length===1&&!u[0].hasArrExpr?this._getPreferredOutput(u[0]):u.reduce((d,g)=>{const f=this._getPreferredOutput(g);return s&&Array.isArray(f)?d=d.concat(f):d.push(f),d},[]):l?[]:void 0},I.prototype._getPreferredOutput=function(r){const t=this.currResultType;switch(t){case"all":{const a=Array.isArray(r.path)?r.path:I.toPathArray(r.path);return r.pointer=I.toPointer(a),r.path=typeof r.path=="string"?r.path:I.toPathString(r.path),r}case"value":case"parent":case"parentProperty":return r[t];case"path":return I.toPathString(r[t]);case"pointer":return I.toPointer(r.path);default:throw new TypeError("Unknown result type")}},I.prototype._handleCallback=function(r,t,a){if(t){const n=this._getPreferredOutput(r);r.path=typeof r.path=="string"?r.path:I.toPathString(r.path),t(n,a,r)}},I.prototype._trace=function(r,t,a,n,i,o,s,l){let c;if(!r.length)return c={path:a,value:t,parent:n,parentProperty:i,hasArrExpr:s},this._handleCallback(c,o,"value"),c;const u=r[0],d=r.slice(1),g=[];function f(h){Array.isArray(h)?h.forEach(y=>{g.push(y)}):g.push(h)}if((typeof u!="string"||l)&&t&&Object.hasOwn(t,u))f(this._trace(d,t[u],Se(a,u),t,u,o,s));else if(u==="*")this._walk(t,h=>{f(this._trace(d,t[h],Se(a,h),t,h,o,!0,!0))});else if(u==="..")f(this._trace(d,t,a,n,i,o,s)),this._walk(t,h=>{typeof t[h]=="object"&&f(this._trace(r.slice(),t[h],Se(a,h),t,h,o,!0))});else{if(u==="^")return this._hasParentSelector=!0,{path:a.slice(0,-1),expr:d,isParentSelector:!0};if(u==="~")return c={path:Se(a,u),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(u==="$")f(this._trace(d,t,a,null,null,o,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))f(this._slice(u,d,t,a,n,i,o));else if(u.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const h=u.replace(/^\?\((.*?)\)$/u,"$1"),y=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(h);y?this._walk(t,b=>{const L=[y[2]],j=y[1]?t[b][y[1]]:t[b];this._trace(L,j,a,n,i,o,!0).length>0&&f(this._trace(d,t[b],Se(a,b),t,b,o,!0))}):this._walk(t,b=>{this._eval(h,t[b],b,a,n,i)&&f(this._trace(d,t[b],Se(a,b),t,b,o,!0))})}else if(u[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");f(this._trace(Za(this._eval(u,t,a.at(-1),a.slice(0,-1),n,i),d),t,a,n,i,o,s))}else if(u[0]==="@"){let h=!1;const y=u.slice(1,-2);switch(y){case"scalar":(!t||!["object","function"].includes(typeof t))&&(h=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===y&&(h=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(h=!0);break;case"number":Number.isFinite(t)&&(h=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(h=!0);break;case"object":t&&typeof t===y&&(h=!0);break;case"array":Array.isArray(t)&&(h=!0);break;case"other":h=this.currOtherTypeCallback(t,a,n,i);break;case"null":t===null&&(h=!0);break;default:throw new TypeError("Unknown value type "+y)}if(h)return c={path:a,value:t,parent:n,parentProperty:i},this._handleCallback(c,o,"value"),c}else if(u[0]==="`"&&t&&Object.hasOwn(t,u.slice(1))){const h=u.slice(1);f(this._trace(d,t[h],Se(a,h),t,h,o,s,!0))}else if(u.includes(",")){const h=u.split(",");for(const y of h)f(this._trace(Za(y,d),t,a,n,i,o,!0))}else!l&&t&&Object.hasOwn(t,u)&&f(this._trace(d,t[u],Se(a,u),t,u,o,s,!0))}if(this._hasParentSelector)for(let h=0;h<g.length;h++){const y=g[h];if(y&&y.isParentSelector){const b=this._trace(y.expr,t,y.path,n,i,o,s);if(Array.isArray(b)){g[h]=b[0];const L=b.length;for(let j=1;j<L;j++)h++,g.splice(h,0,b[j])}else g[h]=b}}return g},I.prototype._walk=function(r,t){if(Array.isArray(r)){const a=r.length;for(let n=0;n<a;n++)t(n)}else r&&typeof r=="object"&&Object.keys(r).forEach(a=>{t(a)})},I.prototype._slice=function(r,t,a,n,i,o,s){if(!Array.isArray(a))return;const l=a.length,c=r.split(":"),u=c[2]&&Number.parseInt(c[2])||1;let d=c[0]&&Number.parseInt(c[0])||0,g=c[1]&&Number.parseInt(c[1])||l;d=d<0?Math.max(0,d+l):Math.min(l,d),g=g<0?Math.max(0,g+l):Math.min(l,g);const f=[];for(let h=d;h<g;h+=u)this._trace(Za(h,t),a,n,i,o,s,!0).forEach(b=>{f.push(b)});return f},I.prototype._eval=function(r,t,a,n,i,o){this.currSandbox._$_parentProperty=o,this.currSandbox._$_parent=i,this.currSandbox._$_property=a,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;const s=r.includes("@path");s&&(this.currSandbox._$_path=I.toPathString(n.concat([a])));const l=this.currEval+"Script:"+r;if(!I.cache[l]){let c=r.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(s&&(c=c.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)I.cache[l]=new this.safeVm.Script(c);else if(this.currEval==="native")I.cache[l]=new this.vm.Script(c);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const u=this.currEval;I.cache[l]=new u(c)}else if(typeof this.currEval=="function")I.cache[l]={runInNewContext:u=>this.currEval(c,u)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return I.cache[l].runInNewContext(this.currSandbox)}catch(c){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+c.message+": "+r)}},I.cache={},I.toPathString=function(r){const t=r,a=t.length;let n="$";for(let i=1;i<a;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(n+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return n},I.toPointer=function(r){const t=r,a=t.length;let n="";for(let i=1;i<a;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(n+="/"+t[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return n},I.toPathArray=function(r){const{cache:t}=I;if(t[r])return t[r].concat();const a=[],i=r.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(o,s){return"[#"+(a.push(s)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(o,s){return"['"+s.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(o,s){return";"+s.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(o){const s=o.match(/#(\d+)/u);return!s||!s[1]?o:a[s[1]]});return t[r]=i,t[r].concat()},I.prototype.safeVm={Script:Qp};const Jp=function(r,t,a){const n=r.length;for(let i=0;i<n;i++){const o=r[i];a(o)&&t.push(r.splice(i--,1)[0])}};class eg{constructor(t){this.code=t}runInNewContext(t){let a=this.code;const n=Object.keys(t),i=[];Jp(n,i,u=>typeof t[u]=="function");const o=n.map(u=>t[u]);a=i.reduce((u,d)=>{let g=t[d].toString();return/function/u.test(g)||(g="function "+g),"var "+d+"="+g+";"+u},"")+a,!/(['"])use strict\1/u.test(a)&&!n.includes("arguments")&&(a="var arguments = undefined;"+a),a=a.replace(/;\s*$/u,"");const l=a.lastIndexOf(";"),c=l!==-1?a.slice(0,l+1)+" return "+a.slice(l+1):" return "+a;return new Function(...n,c)(...o)}}I.prototype.vm={Script:eg};const Ga=(r,t)=>{const a=I({json:r,path:["$",`[?(@.locator=="${t}")]`]});return a.length?a[0]:null},Pi=r=>{let t;if(r.endsWith("Policy"))t="Policy";else if(r.endsWith("Quote"))t="Quote";else if(r.endsWith("Segment"))t="Segment";else return r;return r.slice(0,-t.length)},Ka=({dataModel:r,elementType:t,resultType:a="value"})=>{const n=Pi(t),i=I({path:["$","?(@property === 'exposures' || @property === 'coverages' || @property === 'policyLines'|| @property === 'exposureGroups')",n],json:r,resultType:a});return i.length?i[0]:null},tg=({dataModel:r,quote:t,elementLocator:a})=>{const n=Ga(t,a);return n?Ka({dataModel:r,elementType:n.type}):{}},rg=({dataModel:r,segment:t,elementLocator:a})=>{const n=Ga(t,a);return n?Ka({dataModel:r,elementType:n.type}):{}},ag=(r,t)=>{const a=t.endsWith("Quote")?t:`${t}Quote`;return r.filter(i=>i.type===a)},ng=(r,t)=>{const a=t.endsWith("Policy")?t:`${t}Policy`;return r.filter(i=>i.type===a)},ig=({dataModel:r,element:{productName:t}})=>r.products[t]??{},Di=r=>{var n;r=r??"";const t=r.replace(/\?|\*|!|\+/g,""),a=(n=r.match(/\?|\*|!|\+/g))==null?void 0:n.pop();return{name:t,quantifier:a??""}},og=({dataModel:r,contents:t})=>{var h,y,b,L;const a=r.exposures??{},n=r.coverages??{},i=r.policyLines??{},o=r.exposureGroups??{},l=(t??[]).map(j=>{const{name:G,quantifier:S}=Di(j);return{name:G,quantifier:S}}),c=Object.keys(a).filter(j=>{if(l.find(S=>S.name===j))return!0}),u=Object.keys(n).filter(j=>{if(l.find(S=>S.name===j))return!0}),d=Object.keys(i).filter(j=>{if(l.find(S=>S.name===j))return!0}),g=Object.keys(o).filter(j=>{if(l.find(S=>S.name===j))return!0}),f={coverages:{},exposures:{},policyLines:{},exposureGroups:{}};for(const j of c)f.exposures[j]={...a[j],quantifier:((h=l.find(G=>G.name===j))==null?void 0:h.quantifier)??""};for(const j of u)f.coverages[j]={...n[j],quantifier:((y=l.find(G=>G.name===j))==null?void 0:y.quantifier)??""};for(const j of d)f.policyLines[j]={...i[j],quantifier:((b=l.find(G=>G.name===j))==null?void 0:b.quantifier)??""};for(const j of g)f.exposureGroups[j]={...o[j],quantifier:((L=l.find(G=>G.name===j))==null?void 0:L.quantifier)??""};return f},qe=({coverageTermOptions:r,coverageTermDataModel:t,coverageTerms:a})=>{if(!Object.keys(r??{}).length||!t)return{};const n=structuredClone(r)??{},i=t;return Object.keys(i).forEach(o=>{if(!a.includes(o)||n[o])return;Object.keys(i[o].options).forEach(l=>{if(l.startsWith("*")){const c=l.substring(1);n[o]=c}})}),n},sg=({transactionSnapshot:r,paramsChangeInstruction:t,modifyChangeInstruction:a,coverageTerms:n,coverageTermsDataModel:i,timezone:o})=>{const s=a?{...a.setData??{},coverageTermsDataModel:a.setCoverageTerms??{}}:r.segment.element.data??{},l=Je(t.effectiveTime,o),c=t.newPolicyEndTime?Je(t.newPolicyEndTime,o):void 0;return{...s&&{...s},default:{effectiveTime:ni(l).toString(),...c&&{newPolicyEndDate:ni(c).toString()}},coverageTerms:qe({coverageTermDataModel:i,coverageTermOptions:s.coverageTermsDataModel??{},coverageTerms:n})}},lg=(r,t,a)=>{const n=qe({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t});return{data:{...r.data},...Object.keys(n).length>0&&{coverageTerms:qe({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t})}}},cg=({elementResponse:r,coverageTerms:t,coverageTermsDataModel:a})=>{const n=r.data??{},i=qe({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t});return{...n&&{...n},...Object.keys(i).length>0&&{coverageTerms:qe({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t})}}};var N;(function(r){r.assertEqual=i=>i;function t(i){}r.assertIs=t;function a(i){throw new Error}r.assertNever=a,r.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},r.getValidEnumValues=i=>{const o=r.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),s={};for(const l of o)s[l]=i[l];return r.objectValues(s)},r.objectValues=i=>r.objectKeys(i).map(function(o){return i[o]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},r.find=(i,o)=>{for(const s of i)if(o(s))return s},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}r.joinValues=n,r.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(N||(N={}));var za;(function(r){r.mergeShapes=(t,a)=>({...t,...a})})(za||(za={}));const T=N.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Te=r=>{switch(typeof r){case"undefined":return T.undefined;case"string":return T.string;case"number":return isNaN(r)?T.nan:T.number;case"boolean":return T.boolean;case"function":return T.function;case"bigint":return T.bigint;case"symbol":return T.symbol;case"object":return Array.isArray(r)?T.array:r===null?T.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?T.promise:typeof Map<"u"&&r instanceof Map?T.map:typeof Set<"u"&&r instanceof Set?T.set:typeof Date<"u"&&r instanceof Date?T.date:T.object;default:return T.unknown}},m=N.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"]),ug=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Q extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(o){return o.message},n={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(a(s));else{let l=n,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(a(s))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return i(this),n}static assert(t){if(!(t instanceof Q))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a={},n=[];for(const i of this.issues)i.path.length>0?(a[i.path[0]]=a[i.path[0]]||[],a[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:a}}get formErrors(){return this.flatten()}}Q.create=r=>new Q(r);const ut=(r,t)=>{let a;switch(r.code){case m.invalid_type:r.received===T.undefined?a="Required":a=`Expected ${r.expected}, received ${r.received}`;break;case m.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(r.expected,N.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:a=`Unrecognized key(s) in object: ${N.joinValues(r.keys,", ")}`;break;case m.invalid_union:a="Invalid input";break;case m.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${N.joinValues(r.options)}`;break;case m.invalid_enum_value:a=`Invalid enum value. Expected ${N.joinValues(r.options)}, received '${r.received}'`;break;case m.invalid_arguments:a="Invalid function arguments";break;case m.invalid_return_type:a="Invalid function return type";break;case m.invalid_date:a="Invalid date";break;case m.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(a=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?a=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?a=`Invalid input: must end with "${r.validation.endsWith}"`:N.assertNever(r.validation):r.validation!=="regex"?a=`Invalid ${r.validation}`:a="Invalid";break;case m.too_small:r.type==="array"?a=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?a=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?a=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?a=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:a="Invalid input";break;case m.too_big:r.type==="array"?a=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?a=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?a=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?a=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?a=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:a="Invalid input";break;case m.custom:a="Invalid input";break;case m.invalid_intersection_types:a="Intersection results could not be merged";break;case m.not_multiple_of:a=`Number must be a multiple of ${r.multipleOf}`;break;case m.not_finite:a="Number must be finite";break;default:a=t.defaultError,N.assertNever(r)}return{message:a}};let Oi=ut;function dg(r){Oi=r}function Dr(){return Oi}const Or=r=>{const{data:t,path:a,errorMaps:n,issueData:i}=r,o=[...a,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let l="";const c=n.filter(u=>!!u).slice().reverse();for(const u of c)l=u(s,{data:t,defaultError:l}).message;return{...i,path:o,message:l}},pg=[];function v(r,t){const a=Dr(),n=Or({issueData:t,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,a,a===ut?void 0:ut].filter(i=>!!i)});r.common.issues.push(n)}class z{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,a){const n=[];for(const i of a){if(i.status==="aborted")return E;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,a){const n=[];for(const i of a){const o=await i.key,s=await i.value;n.push({key:o,value:s})}return z.mergeObjectSync(t,n)}static mergeObjectSync(t,a){const n={};for(const i of a){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return E;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(n[o.value]=s.value)}return{status:t.value,value:n}}}const E=Object.freeze({status:"aborted"}),Nr=r=>({status:"dirty",value:r}),H=r=>({status:"valid",value:r}),Va=r=>r.status==="aborted",Ha=r=>r.status==="dirty",Fe=r=>r.status==="valid",Ot=r=>typeof Promise<"u"&&r instanceof Promise;function Ir(r,t,a,n){if(typeof t=="function"?r!==t||!0:!t.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(r)}function Ni(r,t,a,n,i){if(typeof t=="function"?r!==t||!0:!t.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(r,a),a}var A;(function(r){r.errToObj=t=>typeof t=="string"?{message:t}:t||{},r.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(A||(A={}));var Nt,It;class pe{constructor(t,a,n,i){this._cachedPath=[],this.parent=t,this.data=a,this._path=n,this._key=i}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 Ii=(r,t)=>{if(Fe(t))return{success:!0,data:t.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new Q(r.common.issues);return this._error=a,this._error}}};function C(r){if(!r)return{};const{errorMap:t,invalid_type_error:a,required_error:n,description:i}=r;if(t&&(a||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var l,c;const{message:u}=r;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??a)!==null&&c!==void 0?c:s.defaultError}},description:i}}class k{get description(){return this._def.description}_getType(t){return Te(t.data)}_getOrReturnCtx(t,a){return a||{common:t.parent.common,data:t.data,parsedType:Te(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new z,ctx:{common:t.parent.common,data:t.data,parsedType:Te(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const a=this._parse(t);if(Ot(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(t){const a=this._parse(t);return Promise.resolve(a)}parse(t,a){const n=this.safeParse(t,a);if(n.success)return n.data;throw n.error}safeParse(t,a){var n;const i={common:{issues:[],async:(n=a==null?void 0:a.async)!==null&&n!==void 0?n:!1,contextualErrorMap:a==null?void 0:a.errorMap},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Te(t)},o=this._parseSync({data:t,path:i.path,parent:i});return Ii(i,o)}"~validate"(t){var a,n;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Te(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Fe(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((n=(a=o==null?void 0:o.message)===null||a===void 0?void 0:a.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Fe(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,a){const n=await this.safeParseAsync(t,a);if(n.success)return n.data;throw n.error}async safeParseAsync(t,a){const n={common:{issues:[],contextualErrorMap:a==null?void 0:a.errorMap,async:!0},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Te(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Ot(i)?i:Promise.resolve(i));return Ii(n,o)}refine(t,a){const n=i=>typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(i):a;return this._refinement((i,o)=>{const s=t(i),l=()=>o.addIssue({code:m.custom,...n(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(l(),!1)):s?!0:(l(),!1)})}refinement(t,a){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof a=="function"?a(n,i):a),!1))}_refinement(t){return new se({schema:this,typeName:w.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:a=>this["~validate"](a)}}optional(){return me.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oe.create(this)}promise(){return mt.create(this,this._def)}or(t){return qt.create([this,t],this._def)}and(t){return Ft.create(this,t,this._def)}transform(t){return new se({...C(this._def),schema:this,typeName:w.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const a=typeof t=="function"?t:()=>t;return new zt({...C(this._def),innerType:this,defaultValue:a,typeName:w.ZodDefault})}brand(){return new Qa({typeName:w.ZodBranded,type:this,...C(this._def)})}catch(t){const a=typeof t=="function"?t:()=>t;return new Vt({...C(this._def),innerType:this,catchValue:a,typeName:w.ZodCatch})}describe(t){const a=this.constructor;return new a({...this._def,description:t})}pipe(t){return Ht.create(this,t)}readonly(){return Wt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gg=/^c[^\s-]{8,}$/i,mg=/^[0-9a-z]+$/,fg=/^[0-9A-HJKMNP-TV-Z]{26}$/i,yg=/^[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,hg=/^[a-z0-9_-]{21}$/i,bg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Tg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ag="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wa;const jg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_g=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,wg=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Eg=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xg=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$g=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Bi="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sg=new RegExp(`^${Bi}$`);function Mi(r){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?t=`${t}\\.\\d{${r.precision}}`:r.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Cg(r){return new RegExp(`^${Mi(r)}$`)}function Ri(r){let t=`${Bi}T${Mi(r)}`;const a=[];return a.push(r.local?"Z?":"Z"),r.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,new RegExp(`^${t}$`)}function Lg(r,t){return!!((t==="v4"||!t)&&jg.test(r)||(t==="v6"||!t)&&wg.test(r))}function kg(r,t){if(!bg.test(r))return!1;try{const[a]=r.split("."),n=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Pg(r,t){return!!((t==="v4"||!t)&&_g.test(r)||(t==="v6"||!t)&&Eg.test(r))}class ie extends k{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==T.string){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.string,received:i.parsedType}),E}const a=new z;let n;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,s=t.data.length<i.value;(o||s)&&(n=this._getOrReturnCtx(t,n),o?v(n,{code:m.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&v(n,{code:m.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")Tg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"email",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Wa||(Wa=new RegExp(Ag,"u")),Wa.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"emoji",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")yg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"uuid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")hg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"nanoid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")gg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"cuid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")mg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"cuid2",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")fg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"ulid",code:m.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),v(n,{validation:"url",code:m.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"regex",code:m.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?Ri(i).test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?Sg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?Cg(i).test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{code:m.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?vg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"duration",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?Lg(t.data,i.version)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"ip",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?kg(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"jwt",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?Pg(t.data,i.version)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"cidr",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?xg.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"base64",code:m.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?$g.test(t.data)||(n=this._getOrReturnCtx(t,n),v(n,{validation:"base64url",code:m.invalid_string,message:i.message}),a.dirty()):N.assertNever(i);return{status:a.value,value:t.data}}_regex(t,a,n){return this.refinement(i=>t.test(i),{validation:a,code:m.invalid_string,...A.errToObj(n)})}_addCheck(t){return new ie({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...A.errToObj(t)})}url(t){return this._addCheck({kind:"url",...A.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...A.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...A.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...A.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...A.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...A.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...A.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...A.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...A.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...A.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...A.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...A.errToObj(t)})}datetime(t){var a,n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(a=t==null?void 0:t.offset)!==null&&a!==void 0?a:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!1,...A.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...A.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...A.errToObj(t)})}regex(t,a){return this._addCheck({kind:"regex",regex:t,...A.errToObj(a)})}includes(t,a){return this._addCheck({kind:"includes",value:t,position:a==null?void 0:a.position,...A.errToObj(a==null?void 0:a.message)})}startsWith(t,a){return this._addCheck({kind:"startsWith",value:t,...A.errToObj(a)})}endsWith(t,a){return this._addCheck({kind:"endsWith",value:t,...A.errToObj(a)})}min(t,a){return this._addCheck({kind:"min",value:t,...A.errToObj(a)})}max(t,a){return this._addCheck({kind:"max",value:t,...A.errToObj(a)})}length(t,a){return this._addCheck({kind:"length",value:t,...A.errToObj(a)})}nonempty(t){return this.min(1,A.errToObj(t))}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(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t}get maxLength(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t}}ie.create=r=>{var t;return new ie({checks:[],typeName:w.ZodString,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...C(r)})};function Dg(r,t){const a=(r.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=a>n?a:n,o=parseInt(r.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}class Ce extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==T.number){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.number,received:i.parsedType}),E}let a;const n=new z;for(const i of this._def.checks)i.kind==="int"?N.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),v(a,{code:m.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Dg(t.data,i.value)!==0&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),v(a,{code:m.not_finite,message:i.message}),n.dirty()):N.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,A.toString(a))}gt(t,a){return this.setLimit("min",t,!1,A.toString(a))}lte(t,a){return this.setLimit("max",t,!0,A.toString(a))}lt(t,a){return this.setLimit("max",t,!1,A.toString(a))}setLimit(t,a,n,i){return new Ce({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:A.toString(i)}]})}_addCheck(t){return new Ce({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:A.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(a)})}finite(t){return this._addCheck({kind:"finite",message:A.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(t)})}get minValue(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t}get maxValue(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&N.isInteger(t.value))}get isFinite(){let t=null,a=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(a===null||n.value>a)&&(a=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(a)&&Number.isFinite(t)}}Ce.create=r=>new Ce({checks:[],typeName:w.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...C(r)});class Le extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==T.bigint)return this._getInvalidInput(t);let a;const n=new z;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),v(a,{code:m.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):N.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.bigint,received:a.parsedType}),E}gte(t,a){return this.setLimit("min",t,!0,A.toString(a))}gt(t,a){return this.setLimit("min",t,!1,A.toString(a))}lte(t,a){return this.setLimit("max",t,!0,A.toString(a))}lt(t,a){return this.setLimit("max",t,!1,A.toString(a))}setLimit(t,a,n,i){return new Le({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:A.toString(i)}]})}_addCheck(t){return new Le({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(a)})}get minValue(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t}get maxValue(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t}}Le.create=r=>{var t;return new Le({checks:[],typeName:w.ZodBigInt,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...C(r)})};class Bt extends k{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==T.boolean){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.boolean,received:a.parsedType}),E}return H(t.data)}}Bt.create=r=>new Bt({typeName:w.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...C(r)});class Ue extends k{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==T.date){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_type,expected:T.date,received:i.parsedType}),E}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return v(i,{code:m.invalid_date}),E}const a=new z;let n;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),v(n,{code:m.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):N.assertNever(i);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Ue({...this._def,checks:[...this._def.checks,t]})}min(t,a){return this._addCheck({kind:"min",value:t.getTime(),message:A.toString(a)})}max(t,a){return this._addCheck({kind:"max",value:t.getTime(),message:A.toString(a)})}get minDate(){let t=null;for(const a of this._def.checks)a.kind==="min"&&(t===null||a.value>t)&&(t=a.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const a of this._def.checks)a.kind==="max"&&(t===null||a.value<t)&&(t=a.value);return t!=null?new Date(t):null}}Ue.create=r=>new Ue({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:w.ZodDate,...C(r)});class Br extends k{_parse(t){if(this._getType(t)!==T.symbol){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.symbol,received:a.parsedType}),E}return H(t.data)}}Br.create=r=>new Br({typeName:w.ZodSymbol,...C(r)});class Mt extends k{_parse(t){if(this._getType(t)!==T.undefined){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.undefined,received:a.parsedType}),E}return H(t.data)}}Mt.create=r=>new Mt({typeName:w.ZodUndefined,...C(r)});class Rt extends k{_parse(t){if(this._getType(t)!==T.null){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.null,received:a.parsedType}),E}return H(t.data)}}Rt.create=r=>new Rt({typeName:w.ZodNull,...C(r)});class dt extends k{constructor(){super(...arguments),this._any=!0}_parse(t){return H(t.data)}}dt.create=r=>new dt({typeName:w.ZodAny,...C(r)});class Ze extends k{constructor(){super(...arguments),this._unknown=!0}_parse(t){return H(t.data)}}Ze.create=r=>new Ze({typeName:w.ZodUnknown,...C(r)});class Ae extends k{_parse(t){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.never,received:a.parsedType}),E}}Ae.create=r=>new Ae({typeName:w.ZodNever,...C(r)});class Mr extends k{_parse(t){if(this._getType(t)!==T.undefined){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.void,received:a.parsedType}),E}return H(t.data)}}Mr.create=r=>new Mr({typeName:w.ZodVoid,...C(r)});class oe extends k{_parse(t){const{ctx:a,status:n}=this._processInputParams(t),i=this._def;if(a.parsedType!==T.array)return v(a,{code:m.invalid_type,expected:T.array,received:a.parsedType}),E;if(i.exactLength!==null){const s=a.data.length>i.exactLength.value,l=a.data.length<i.exactLength.value;(s||l)&&(v(a,{code:s?m.too_big:m.too_small,minimum:l?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&a.data.length<i.minLength.value&&(v(a,{code:m.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&a.data.length>i.maxLength.value&&(v(a,{code:m.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),a.common.async)return Promise.all([...a.data].map((s,l)=>i.type._parseAsync(new pe(a,s,a.path,l)))).then(s=>z.mergeArray(n,s));const o=[...a.data].map((s,l)=>i.type._parseSync(new pe(a,s,a.path,l)));return z.mergeArray(n,o)}get element(){return this._def.type}min(t,a){return new oe({...this._def,minLength:{value:t,message:A.toString(a)}})}max(t,a){return new oe({...this._def,maxLength:{value:t,message:A.toString(a)}})}length(t,a){return new oe({...this._def,exactLength:{value:t,message:A.toString(a)}})}nonempty(t){return this.min(1,t)}}oe.create=(r,t)=>new oe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:w.ZodArray,...C(t)});function pt(r){if(r instanceof Z){const t={};for(const a in r.shape){const n=r.shape[a];t[a]=me.create(pt(n))}return new Z({...r._def,shape:()=>t})}else return r instanceof oe?new oe({...r._def,type:pt(r.element)}):r instanceof me?me.create(pt(r.unwrap())):r instanceof De?De.create(pt(r.unwrap())):r instanceof ge?ge.create(r.items.map(t=>pt(t))):r}class Z extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),a=N.objectKeys(t);return this._cached={shape:t,keys:a}}_parse(t){if(this._getType(t)!==T.object){const c=this._getOrReturnCtx(t);return v(c,{code:m.invalid_type,expected:T.object,received:c.parsedType}),E}const{status:a,ctx:n}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ae&&this._def.unknownKeys==="strip"))for(const c in n.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],d=n.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new pe(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof Ae){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:n.data[u]}});else if(c==="strict")s.length>0&&(v(n,{code:m.unrecognized_keys,keys:s}),a.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=n.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new pe(n,d,n.path,u)),alwaysSet:u in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,g=await u.value;c.push({key:d,value:g,alwaysSet:u.alwaysSet})}return c}).then(c=>z.mergeObjectSync(a,c)):z.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(t){return A.errToObj,new Z({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(a,n)=>{var i,o,s,l;const c=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,a,n).message)!==null&&s!==void 0?s:n.defaultError;return a.code==="unrecognized_keys"?{message:(l=A.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(t){return new Z({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Z({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:w.ZodObject})}setKey(t,a){return this.augment({[t]:a})}catchall(t){return new Z({...this._def,catchall:t})}pick(t){const a={};return N.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(a[n]=this.shape[n])}),new Z({...this._def,shape:()=>a})}omit(t){const a={};return N.objectKeys(this.shape).forEach(n=>{t[n]||(a[n]=this.shape[n])}),new Z({...this._def,shape:()=>a})}deepPartial(){return pt(this)}partial(t){const a={};return N.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?a[n]=i:a[n]=i.optional()}),new Z({...this._def,shape:()=>a})}required(t){const a={};return N.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])a[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof me;)i=i._def.innerType;a[n]=i}}),new Z({...this._def,shape:()=>a})}keyof(){return qi(N.objectKeys(this.shape))}}Z.create=(r,t)=>new Z({shape:()=>r,unknownKeys:"strip",catchall:Ae.create(),typeName:w.ZodObject,...C(t)}),Z.strictCreate=(r,t)=>new Z({shape:()=>r,unknownKeys:"strict",catchall:Ae.create(),typeName:w.ZodObject,...C(t)}),Z.lazycreate=(r,t)=>new Z({shape:r,unknownKeys:"strip",catchall:Ae.create(),typeName:w.ZodObject,...C(t)});class qt extends k{_parse(t){const{ctx:a}=this._processInputParams(t),n=this._def.options;function i(o){for(const l of o)if(l.result.status==="valid")return l.result;for(const l of o)if(l.result.status==="dirty")return a.common.issues.push(...l.ctx.common.issues),l.result;const s=o.map(l=>new Q(l.ctx.common.issues));return v(a,{code:m.invalid_union,unionErrors:s}),E}if(a.common.async)return Promise.all(n.map(async o=>{const s={...a,common:{...a.common,issues:[]},parent:null};return{result:await o._parseAsync({data:a.data,path:a.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const c of n){const u={...a,common:{...a.common,issues:[]},parent:null},d=c._parseSync({data:a.data,path:a.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return a.common.issues.push(...o.ctx.common.issues),o.result;const l=s.map(c=>new Q(c));return v(a,{code:m.invalid_union,unionErrors:l}),E}}get options(){return this._def.options}}qt.create=(r,t)=>new qt({options:r,typeName:w.ZodUnion,...C(t)});const ke=r=>r instanceof Zt?ke(r.schema):r instanceof se?ke(r.innerType()):r instanceof Gt?[r.value]:r instanceof Pe?r.options:r instanceof Kt?N.objectValues(r.enum):r instanceof zt?ke(r._def.innerType):r instanceof Mt?[void 0]:r instanceof Rt?[null]:r instanceof me?[void 0,...ke(r.unwrap())]:r instanceof De?[null,...ke(r.unwrap())]:r instanceof Qa||r instanceof Wt?ke(r.unwrap()):r instanceof Vt?ke(r._def.innerType):[];class Rr extends k{_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==T.object)return v(a,{code:m.invalid_type,expected:T.object,received:a.parsedType}),E;const n=this.discriminator,i=a.data[n],o=this.optionsMap.get(i);return o?a.common.async?o._parseAsync({data:a.data,path:a.path,parent:a}):o._parseSync({data:a.data,path:a.path,parent:a}):(v(a,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),E)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,a,n){const i=new Map;for(const o of a){const s=ke(o.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const l of s){if(i.has(l))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(l)}`);i.set(l,o)}}return new Rr({typeName:w.ZodDiscriminatedUnion,discriminator:t,options:a,optionsMap:i,...C(n)})}}function Ya(r,t){const a=Te(r),n=Te(t);if(r===t)return{valid:!0,data:r};if(a===T.object&&n===T.object){const i=N.objectKeys(t),o=N.objectKeys(r).filter(l=>i.indexOf(l)!==-1),s={...r,...t};for(const l of o){const c=Ya(r[l],t[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}else if(a===T.array&&n===T.array){if(r.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<r.length;o++){const s=r[o],l=t[o],c=Ya(s,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return a===T.date&&n===T.date&&+r==+t?{valid:!0,data:r}:{valid:!1}}class Ft extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t),i=(o,s)=>{if(Va(o)||Va(s))return E;const l=Ya(o.value,s.value);return l.valid?((Ha(o)||Ha(s))&&a.dirty(),{status:a.value,value:l.data}):(v(n,{code:m.invalid_intersection_types}),E)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Ft.create=(r,t,a)=>new Ft({left:r,right:t,typeName:w.ZodIntersection,...C(a)});class ge extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.array)return v(n,{code:m.invalid_type,expected:T.array,received:n.parsedType}),E;if(n.data.length<this._def.items.length)return v(n,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),E;!this._def.rest&&n.data.length>this._def.items.length&&(v(n,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const i=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new pe(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>z.mergeArray(a,o)):z.mergeArray(a,i)}get items(){return this._def.items}rest(t){return new ge({...this._def,rest:t})}}ge.create=(r,t)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ge({items:r,typeName:w.ZodTuple,rest:null,...C(t)})};class Ut extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.object)return v(n,{code:m.invalid_type,expected:T.object,received:n.parsedType}),E;const i=[],o=this._def.keyType,s=this._def.valueType;for(const l in n.data)i.push({key:o._parse(new pe(n,l,n.path,l)),value:s._parse(new pe(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?z.mergeObjectAsync(a,i):z.mergeObjectSync(a,i)}get element(){return this._def.valueType}static create(t,a,n){return a instanceof k?new Ut({keyType:t,valueType:a,typeName:w.ZodRecord,...C(n)}):new Ut({keyType:ie.create(),valueType:t,typeName:w.ZodRecord,...C(a)})}}class qr extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.map)return v(n,{code:m.invalid_type,expected:T.map,received:n.parsedType}),E;const i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([l,c],u)=>({key:i._parse(new pe(n,l,n.path,[u,"key"])),value:o._parse(new pe(n,c,n.path,[u,"value"]))}));if(n.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,d=await c.value;if(u.status==="aborted"||d.status==="aborted")return E;(u.status==="dirty"||d.status==="dirty")&&a.dirty(),l.set(u.value,d.value)}return{status:a.value,value:l}})}else{const l=new Map;for(const c of s){const u=c.key,d=c.value;if(u.status==="aborted"||d.status==="aborted")return E;(u.status==="dirty"||d.status==="dirty")&&a.dirty(),l.set(u.value,d.value)}return{status:a.value,value:l}}}}qr.create=(r,t,a)=>new qr({valueType:t,keyType:r,typeName:w.ZodMap,...C(a)});class Ge extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==T.set)return v(n,{code:m.invalid_type,expected:T.set,received:n.parsedType}),E;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(v(n,{code:m.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),a.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(v(n,{code:m.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),a.dirty());const o=this._def.valueType;function s(c){const u=new Set;for(const d of c){if(d.status==="aborted")return E;d.status==="dirty"&&a.dirty(),u.add(d.value)}return{status:a.value,value:u}}const l=[...n.data.values()].map((c,u)=>o._parse(new pe(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>s(c)):s(l)}min(t,a){return new Ge({...this._def,minSize:{value:t,message:A.toString(a)}})}max(t,a){return new Ge({...this._def,maxSize:{value:t,message:A.toString(a)}})}size(t,a){return this.min(t,a).max(t,a)}nonempty(t){return this.min(1,t)}}Ge.create=(r,t)=>new Ge({valueType:r,minSize:null,maxSize:null,typeName:w.ZodSet,...C(t)});class gt extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==T.function)return v(a,{code:m.invalid_type,expected:T.function,received:a.parsedType}),E;function n(l,c){return Or({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Dr(),ut].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function i(l,c){return Or({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Dr(),ut].filter(u=>!!u),issueData:{code:m.invalid_return_type,returnTypeError:c}})}const o={errorMap:a.common.contextualErrorMap},s=a.data;if(this._def.returns instanceof mt){const l=this;return H(async function(...c){const u=new Q([]),d=await l._def.args.parseAsync(c,o).catch(f=>{throw u.addIssue(n(c,f)),u}),g=await Reflect.apply(s,this,d);return await l._def.returns._def.type.parseAsync(g,o).catch(f=>{throw u.addIssue(i(g,f)),u})})}else{const l=this;return H(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new Q([n(c,u.error)]);const d=Reflect.apply(s,this,u.data),g=l._def.returns.safeParse(d,o);if(!g.success)throw new Q([i(d,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new gt({...this._def,args:ge.create(t).rest(Ze.create())})}returns(t){return new gt({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,a,n){return new gt({args:t||ge.create([]).rest(Ze.create()),returns:a||Ze.create(),typeName:w.ZodFunction,...C(n)})}}class Zt extends k{get schema(){return this._def.getter()}_parse(t){const{ctx:a}=this._processInputParams(t);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Zt.create=(r,t)=>new Zt({getter:r,typeName:w.ZodLazy,...C(t)});class Gt extends k{_parse(t){if(t.data!==this._def.value){const a=this._getOrReturnCtx(t);return v(a,{received:a.data,code:m.invalid_literal,expected:this._def.value}),E}return{status:"valid",value:t.data}}get value(){return this._def.value}}Gt.create=(r,t)=>new Gt({value:r,typeName:w.ZodLiteral,...C(t)});function qi(r,t){return new Pe({values:r,typeName:w.ZodEnum,...C(t)})}class Pe extends k{constructor(){super(...arguments),Nt.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const a=this._getOrReturnCtx(t),n=this._def.values;return v(a,{expected:N.joinValues(n),received:a.parsedType,code:m.invalid_type}),E}if(Ir(this,Nt)||Ni(this,Nt,new Set(this._def.values)),!Ir(this,Nt).has(t.data)){const a=this._getOrReturnCtx(t),n=this._def.values;return v(a,{received:a.data,code:m.invalid_enum_value,options:n}),E}return H(t.data)}get options(){return this._def.values}get enum(){const t={};for(const a of this._def.values)t[a]=a;return t}get Values(){const t={};for(const a of this._def.values)t[a]=a;return t}get Enum(){const t={};for(const a of this._def.values)t[a]=a;return t}extract(t,a=this._def){return Pe.create(t,{...this._def,...a})}exclude(t,a=this._def){return Pe.create(this.options.filter(n=>!t.includes(n)),{...this._def,...a})}}Nt=new WeakMap,Pe.create=qi;class Kt extends k{constructor(){super(...arguments),It.set(this,void 0)}_parse(t){const a=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==T.string&&n.parsedType!==T.number){const i=N.objectValues(a);return v(n,{expected:N.joinValues(i),received:n.parsedType,code:m.invalid_type}),E}if(Ir(this,It)||Ni(this,It,new Set(N.getValidEnumValues(this._def.values))),!Ir(this,It).has(t.data)){const i=N.objectValues(a);return v(n,{received:n.data,code:m.invalid_enum_value,options:i}),E}return H(t.data)}get enum(){return this._def.values}}It=new WeakMap,Kt.create=(r,t)=>new Kt({values:r,typeName:w.ZodNativeEnum,...C(t)});class mt extends k{unwrap(){return this._def.type}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==T.promise&&a.common.async===!1)return v(a,{code:m.invalid_type,expected:T.promise,received:a.parsedType}),E;const n=a.parsedType===T.promise?a.data:Promise.resolve(a.data);return H(n.then(i=>this._def.type.parseAsync(i,{path:a.path,errorMap:a.common.contextualErrorMap})))}}mt.create=(r,t)=>new mt({type:r,typeName:w.ZodPromise,...C(t)});class se extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===w.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:a,ctx:n}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s=>{v(n,s),s.fatal?a.abort():a.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(n.data,o);if(n.common.async)return Promise.resolve(s).then(async l=>{if(a.value==="aborted")return E;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?E:c.status==="dirty"||a.value==="dirty"?Nr(c.value):c});{if(a.value==="aborted")return E;const l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?E:l.status==="dirty"||a.value==="dirty"?Nr(l.value):l}}if(i.type==="refinement"){const s=l=>{const c=i.refinement(l,o);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return l.status==="aborted"?E:(l.status==="dirty"&&a.dirty(),s(l.value),{status:a.value,value:l.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>l.status==="aborted"?E:(l.status==="dirty"&&a.dirty(),s(l.value).then(()=>({status:a.value,value:l.value}))))}if(i.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Fe(s))return s;const l=i.transform(s.value,o);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:l}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Fe(s)?Promise.resolve(i.transform(s.value,o)).then(l=>({status:a.value,value:l})):s);N.assertNever(i)}}se.create=(r,t,a)=>new se({schema:r,typeName:w.ZodEffects,effect:t,...C(a)}),se.createWithPreprocess=(r,t,a)=>new se({schema:t,effect:{type:"preprocess",transform:r},typeName:w.ZodEffects,...C(a)});class me extends k{_parse(t){return this._getType(t)===T.undefined?H(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}me.create=(r,t)=>new me({innerType:r,typeName:w.ZodOptional,...C(t)});class De extends k{_parse(t){return this._getType(t)===T.null?H(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}De.create=(r,t)=>new De({innerType:r,typeName:w.ZodNullable,...C(t)});class zt extends k{_parse(t){const{ctx:a}=this._processInputParams(t);let n=a.data;return a.parsedType===T.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}zt.create=(r,t)=>new zt({innerType:r,typeName:w.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...C(t)});class Vt extends k{_parse(t){const{ctx:a}=this._processInputParams(t),n={...a,common:{...a.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Ot(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Q(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Q(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Vt.create=(r,t)=>new Vt({innerType:r,typeName:w.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...C(t)});class Fr extends k{_parse(t){if(this._getType(t)!==T.nan){const a=this._getOrReturnCtx(t);return v(a,{code:m.invalid_type,expected:T.nan,received:a.parsedType}),E}return{status:"valid",value:t.data}}}Fr.create=r=>new Fr({typeName:w.ZodNaN,...C(r)});const Og=Symbol("zod_brand");class Qa extends k{_parse(t){const{ctx:a}=this._processInputParams(t),n=a.data;return this._def.type._parse({data:n,path:a.path,parent:a})}unwrap(){return this._def.type}}class Ht extends k{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?E:i.status==="dirty"?(a.dirty(),Nr(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?E:i.status==="dirty"?(a.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,a){return new Ht({in:t,out:a,typeName:w.ZodPipeline})}}class Wt extends k{_parse(t){const a=this._def.innerType._parse(t),n=i=>(Fe(i)&&(i.value=Object.freeze(i.value)),i);return Ot(a)?a.then(i=>n(i)):n(a)}unwrap(){return this._def.innerType}}Wt.create=(r,t)=>new Wt({innerType:r,typeName:w.ZodReadonly,...C(t)});function Fi(r,t={},a){return r?dt.create().superRefine((n,i)=>{var o,s;if(!r(n)){const l=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(s=(o=l.fatal)!==null&&o!==void 0?o:a)!==null&&s!==void 0?s:!0,u=typeof l=="string"?{message:l}:l;i.addIssue({code:"custom",...u,fatal:c})}}):dt.create()}const Ng={object:Z.lazycreate};var w;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(w||(w={}));const Ig=(r,t={message:`Input not instance of ${r.name}`})=>Fi(a=>a instanceof r,t),Ui=ie.create,Zi=Ce.create,Bg=Fr.create,Mg=Le.create,Gi=Bt.create,Rg=Ue.create,qg=Br.create,Fg=Mt.create,Ug=Rt.create,Zg=dt.create,Gg=Ze.create,Kg=Ae.create,zg=Mr.create,Vg=oe.create,Hg=Z.create,Wg=Z.strictCreate,Yg=qt.create,Qg=Rr.create,Xg=Ft.create,Jg=ge.create,em=Ut.create,tm=qr.create,rm=Ge.create,am=gt.create,nm=Zt.create,im=Gt.create,om=Pe.create,sm=Kt.create,lm=mt.create,Ki=se.create,cm=me.create,um=De.create,dm=se.createWithPreprocess,pm=Ht.create;var e=Object.freeze({__proto__:null,defaultErrorMap:ut,setErrorMap:dg,getErrorMap:Dr,makeIssue:Or,EMPTY_PATH:pg,addIssueToContext:v,ParseStatus:z,INVALID:E,DIRTY:Nr,OK:H,isAborted:Va,isDirty:Ha,isValid:Fe,isAsync:Ot,get util(){return N},get objectUtil(){return za},ZodParsedType:T,getParsedType:Te,ZodType:k,datetimeRegex:Ri,ZodString:ie,ZodNumber:Ce,ZodBigInt:Le,ZodBoolean:Bt,ZodDate:Ue,ZodSymbol:Br,ZodUndefined:Mt,ZodNull:Rt,ZodAny:dt,ZodUnknown:Ze,ZodNever:Ae,ZodVoid:Mr,ZodArray:oe,ZodObject:Z,ZodUnion:qt,ZodDiscriminatedUnion:Rr,ZodIntersection:Ft,ZodTuple:ge,ZodRecord:Ut,ZodMap:qr,ZodSet:Ge,ZodFunction:gt,ZodLazy:Zt,ZodLiteral:Gt,ZodEnum:Pe,ZodNativeEnum:Kt,ZodPromise:mt,ZodEffects:se,ZodTransformer:se,ZodOptional:me,ZodNullable:De,ZodDefault:zt,ZodCatch:Vt,ZodNaN:Fr,BRAND:Og,ZodBranded:Qa,ZodPipeline:Ht,ZodReadonly:Wt,custom:Fi,Schema:k,ZodSchema:k,late:Ng,get ZodFirstPartyTypeKind(){return w},coerce:{string:r=>ie.create({...r,coerce:!0}),number:r=>Ce.create({...r,coerce:!0}),boolean:r=>Bt.create({...r,coerce:!0}),bigint:r=>Le.create({...r,coerce:!0}),date:r=>Ue.create({...r,coerce:!0})},any:Zg,array:Vg,bigint:Mg,boolean:Gi,date:Rg,discriminatedUnion:Qg,effect:Ki,enum:om,function:am,instanceof:Ig,intersection:Xg,lazy:nm,literal:im,map:tm,nan:Bg,nativeEnum:sm,never:Kg,null:Ug,nullable:um,number:Zi,object:Hg,oboolean:()=>Gi().optional(),onumber:()=>Zi().optional(),optional:cm,ostring:()=>Ui().optional(),pipeline:pm,preprocess:dm,promise:lm,record:em,set:rm,strictObject:Wg,string:Ui,symbol:qg,transformer:Ki,tuple:Jg,undefined:Fg,union:Yg,unknown:Gg,void:zg,NEVER:E,ZodIssueCode:m,quotelessJson:ug,ZodError:Q});const Yt=e.string(),gm=e.object({elementType:e.string().optional(),locator:Yt.optional(),errors:e.array(e.string()).optional()}),ft=e.object({validationItems:e.array(gm).optional(),success:e.boolean().optional()}),Ur=e.enum(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","CNY","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);e.enum(["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad_Juarez","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/North","Australia/NSW","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","CET","Chile/Continental","Chile/EasterIsland","CST6CDT","Cuba","EET","Egypt","Eire","EST","EST5EDT","Etc/GMT","Etc/GMT+0","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-0","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Etc/GMT0","Etc/Greenwich","Etc/UCT","Etc/Universal","Etc/UTC","Etc/Zulu","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Factory","GB","GB-Eire","GMT","GMT+0","GMT-0","GMT0","Greenwich","Hongkong","HST","Iceland","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","Jamaica","Japan","Kwajalein","Libya","MET","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","MST","MST7MDT","Navajo","NZ","NZ-CHAT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","Poland","Portugal","PRC","PST8PDT","ROC","ROK","Singapore","Turkey","UCT","Universal","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Samoa","UTC","W-SU","WET","Zulu"]);const mm=e.enum(["generateDay","termStartDay","dueDay"]),fm=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),Xa=e.enum(["account","inherit","policy"]),ym=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),hm=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),bm=e.enum(["none","first","second","third","fourth","fifth"]),zi=e.object({billingPreferences:e.object({billingPlanName:e.string().optional(),billingLevel:Xa.optional()}).optional(),installmentPreferences:e.object({installmentPlanName:e.string().optional(),anchorMode:mm.optional(),anchorTime:e.string().optional(),anchorType:fm.optional(),cadence:ym.optional(),dayOfMonth:e.number().optional(),dayOfWeek:hm.optional(),dueLeadDays:e.number().optional(),generateLeadDays:e.number().optional(),maxInstallmentsPerTerm:e.number().optional(),weekOfMonth:bm.optional()}).optional()}),Ja=e.enum(["quote","policy","invoice","transaction","segment","term"]),en=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),Vi=e.enum(["info","block","decline","reject","approve"]),Qt=e.object({locator:e.string(),elementLocator:e.string().optional(),clearedBy:e.string().uuid().optional(),clearedTime:e.string().optional(),createdBy:e.string().uuid().optional(),createdTime:e.string().optional(),level:Vi.optional(),note:e.string().optional()}),vm=e.object({elementLocator:e.string(),level:Vi,note:e.string().optional()});e.object({addFlags:vm.array(),clearFlags:e.string().array()});const Hi=e.enum(["none","blocked","declined","rejected","approved"]),tn=e.enum(["years","months","weeks","days","hours"]),Tm=e.object({column:e.string(),table:e.string(),where:e.record(e.object({key:e.string().optional()})).optional()}).optional(),Ke=e.object({displayName:e.string().optional(),defaultValue:e.string().optional(),type:e.string().optional(),minLength:e.number().optional(),maxLength:e.number().optional(),regex:e.string().optional(),min:e.string().optional(),multiline:e.boolean().optional(),max:e.string().optional(),options:e.array(e.string()).optional(),overrides:e.string().optional(),scope:e.string().optional(),inherited:e.boolean().optional(),precision:e.number().optional(),readOnly:e.boolean().optional(),searchable:e.boolean().optional(),roundingMode:e.string().optional(),constraint:Tm,tag:e.array(e.string()).optional()});e.record(Ke);const Am=e.object({displayName:e.string().optional(),abstract:e.boolean().optional(),extend:e.string().optional(),data:e.record(Ke).optional(),defaultSearchable:e.boolean().optional()}),jm=e.record(Am),_m=e.object({defaultDeadlineDays:e.number(),blocksUnderwriting:e.boolean()}),wm=e.object({appliesTo:e.array(e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])),exclusive:e.boolean(),qualification:e.record(e.string())}),Em=e.object({generateAutoRenewals:e.boolean(),renewalTransactionType:e.string().optional(),renewalCreateLeadDays:e.number().optional(),renewalAcceptLeadDays:e.number().optional(),renewalIssueLeadDays:e.number().optional(),newTermDuration:e.number().optional()}),xm=e.object({displayName:e.string(),expirationPeriod:e.number()}),Zr=e.object({availableAfter:e.string(),availabilityTimeBasis:e.string(),retireAfter:e.string(),retire:e.boolean(),retirementTimeBasis:e.string(),removeOnRenewalAfter:e.string(),removeOnRenewal:e.boolean()}),$m=e.object({displayName:e.string(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])});e.union([e.literal("accept"),e.literal("issue")]),e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const Wi=e.object({status:e.union([e.literal("queued"),e.literal("failed")]),error:e.string()});e.union([e.literal("queued"),e.literal("failed")]);const Sm=e.object({displayName:e.string(),category:e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),handling:e.union([e.literal("normal"),e.literal("flat")]),invoicing:e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")])});e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),e.union([e.literal("normal"),e.literal("flat")]),e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")]);const Cm=e.object({extend:e.string(),claimCategory:e.string(),abstract:e.boolean()}),Lm=e.object({dataType:e.string(),isKey:e.boolean()}),km=e.object({key:e.string(),values:e.array(e.string())}),rn=e.object({version1:e.string(),version2:e.string(),plugins:e.record(e.record(e.string())),latestVersion:e.string()}),Pm=e.object({activities:e.record(e.record(_m)),assignmentRoles:e.record(wm),qualifications:e.record(e.array(e.string()))});e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),e.union([e.literal("accept"),e.literal("issue")]),e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),e.union([e.literal("immediate"),e.literal("deferDueDate")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]);const Dm=e.object({dataType:e.string(),makeDistinct:e.boolean()}),Om=e.object({columns:e.record(Dm),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")])});e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")]);const Nm=e.object({displayName:e.string(),value:e.number(),tag:e.string()});e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]);const Im=e.object({type:e.string()}),Yi=e.object({fields:e.array(e.string())}),Bm=e.object({enabled:e.boolean(),account:Yi,policy:Yi,productIndex:e.record(e.number()),regionIndex:e.record(e.number())}),Mm=e.object({offsetDays:e.number(),offsetBasis:e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")])});e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")]);const Rm=e.object({displayName:e.string(),gracePeriodDays:e.number(),delinquencyLevel:e.union([e.literal("policy"),e.literal("invoice")]).optional(),lapseTransactionType:e.string().optional(),advanceLapseTo:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]).optional(),events:e.record(Mm)});e.union([e.literal("policy"),e.literal("invoice")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]),e.object({metadata:rn,pluginVersionStatus:e.record(e.record(e.string()))});const an=e.object({isSuccess:e.boolean(),errors:e.array(e.string()),metadata:rn});e.union([e.literal("queued"),e.literal("failed")]);const qm=e.object({top:e.number().optional(),bottom:e.number().optional(),left:e.number().optional(),right:e.number().optional()});e.union([e.literal("transaction"),e.literal("policy"),e.literal("term"),e.literal("segment"),e.literal("policyUnique"),e.literal("termUnique"),e.literal("invoice")]),e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]),e.union([e.literal("dynamic"),e.literal("prerendered")]),e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),e.union([e.literal("letter"),e.literal("legal"),e.literal("A3"),e.literal("A4"),e.literal("A5"),e.literal("B4"),e.literal("B5")]);const Fm=e.object({disburseExcess:e.boolean(),disbursementType:e.string(),excludeDebits:e.string(),disbursementThresholds:e.record(e.number())}),Qi=e.object({displayName:e.string(),cadence:e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),anchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),generateLeadDays:e.number(),dueLeadDays:e.number(),installmentWeights:e.array(e.number()),maxInstallmentsPerTerm:e.number()});e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]);const Um=e.object({lossCategory:e.string()}),Zm=e.object({added:e.record(e.record(e.unknown())),modified:e.record(e.record(e.unknown())),removed:e.record(e.record(e.unknown()))}),Gm=e.object({displayName:e.string(),initialCoreNumber:e.string(),format:e.string(),copyFromQuote:e.boolean(),termNumberFormat:e.string(),quoteNumberFormat:e.string(),initialQuoteCoreNumber:e.string()}),Km=e.object({dataType:e.string()}),zm=e.object({table:e.string(),column:e.string(),where:e.record(km)}),fe=e.object({displayName:e.string(),type:e.string(),scope:e.string(),defaultValue:e.string(),min:e.string(),max:e.string(),minLength:e.number(),maxLength:e.number(),precision:e.number(),options:e.array(e.string()),regex:e.string(),roundingMode:e.union([e.literal("ceiling"),e.literal("down"),e.literal("floor"),e.literal("halfDown"),e.literal("halfEven"),e.literal("halfUp"),e.literal("up")]),tag:e.array(e.string()),constraint:zm,searchable:e.boolean(),availability:Zr.optional()});e.union([e.literal("ceiling"),e.literal("down"),e.literal("floor"),e.literal("halfDown"),e.literal("halfEven"),e.literal("halfUp"),e.literal("up")]);const Vm=e.object({displayName:e.string(),numberingString:e.string()}),Hm=e.object({selectionStartTime:e.string(),resourceNames:e.array(e.string())}),Wm=e.object({staticName:e.string()}),Ym=e.object({resourceInstances:e.record(Wm),resourceGroups:e.record(Hm)}),Qm=e.object({creditType:e.union([e.literal("any"),e.literal("creditDistribution"),e.literal("payment")])});e.union([e.literal("any"),e.literal("creditDistribution"),e.literal("payment")]);const Xm=e.object({items:e.record(Km)}),Jm=e.object({currencyTolerances:e.record(e.number())});e.record(e.unknown());const ef=e.object({columns:e.record(Lm),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")])}),tf=e.object({locator:e.string(),name:e.string(),deploymentResult:an,bootstrapResult:Wi}),rf=e.object({category:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),costBearing:e.boolean()});e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),e.object({tenantDescription:e.string().optional(),tenantName:e.string().optional()}),e.object({locator:e.string(),deploymentResult:an,resourceCloneStatus:e.union([e.literal("queued"),e.literal("failed")])}),e.object({tenantDescription:e.string().optional(),tenantName:e.string().optional()}),e.object({version:e.string()}),e.record(Zm),e.object({resolve:e.boolean().optional(),version:e.string()}),e.object({resolve:e.boolean().optional()});const af=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(fe),defaultInvoiceDocument:e.string(),numberingPlan:e.string(),invoiceNumberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),nf=e.object({resources:Ym}),of=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(fe),abstract:e.boolean()}),sf=e.object({type:e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]),displayName:e.string(),options:e.record(Nm),value:fe,availability:Zr.optional()}),lf=e.object({displayName:e.string(),extend:e.string(),data:e.record(fe),defaultSearchable:e.boolean(),abstract:e.boolean()}),Xi=e.object({displayName:e.string(),extend:e.string(),data:e.record(fe),numberingPlan:e.string(),abstract:e.boolean()}),Ji=e.object({displayName:e.string(),scope:e.union([e.literal("transaction"),e.literal("policy"),e.literal("term"),e.literal("segment"),e.literal("policyUnique"),e.literal("termUnique"),e.literal("invoice")]),format:e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]),rendering:e.union([e.literal("dynamic"),e.literal("prerendered")]),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")]),trigger:e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),portrait:e.boolean().optional(),pageSize:e.union([e.literal("letter"),e.literal("legal"),e.literal("A3"),e.literal("A4"),e.literal("A5"),e.literal("B4"),e.literal("B5")]).optional(),margin:qm.optional()}),Gr=e.object({extend:e.string(),pluralType:e.string(),displayName:e.string(),coverageTerms:e.array(e.string()),contents:e.array(e.string()),charges:e.array(e.string()),defaultSearchable:e.boolean(),data:e.record(fe),availability:Zr.optional(),abstract:e.boolean()}),cf=e.object({extend:e.string(),lossType:e.string(),defaultSearchable:e.boolean(),data:e.record(fe),numberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),uf=e.object({displayName:e.string(),extend:e.string(),data:e.record(fe),abstract:e.boolean()}),df=e.object({extend:e.string(),defaultInstallmentPlan:e.string(),defaultBillingPlan:e.string(),defaultTermDuration:e.number(),defaultDelinquencyPlan:e.string().optional(),defaultAutoRenewalPlan:e.string().optional(),defaultShortfallTolerancePlan:e.string().optional(),displayName:e.string(),defaultDurationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),coverageTerms:e.array(e.string()),eligibleAccountTypes:e.array(e.string()),contents:e.array(e.string()),documents:e.array(e.string()),charges:e.array(e.string()),data:e.record(fe),staticData:e.record(fe),defaultSearchable:e.boolean(),pluralType:e.string(),defaultBillingTrigger:e.union([e.literal("accept"),e.literal("issue")]),numberingPlan:e.string().optional(),numberingString:e.string().optional(),availability:Zr.optional(),withPrecommitReapplication:e.boolean().optional(),abstract:e.boolean()}),ze=e.object({defaultTimeZone:e.string(),defaultCurrency:e.string(),defaultTermDuration:e.number(),defaultInstallmentPlan:e.string(),defaultBillingPlan:e.string(),defaultDurationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),defaultBillingTrigger:e.union([e.literal("accept"),e.literal("issue")]),defaultBillingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),defaultBackdatedInstallmentsBilling:e.union([e.literal("immediate"),e.literal("deferDueDate")]),defaultDelinquencyPlan:e.string(),defaultAutoRenewalPlan:e.string(),defaultExcessCreditPlan:e.string(),defaultLapseType:e.string(),defaultAnchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),defaultGenerateLeadDays:e.number(),defaultDueLeadDays:e.number(),defaultAuxDataSettings:e.string(),defaultShortfallTolerancePlan:e.string(),regions:e.record(Vm),defaultRegion:e.string(),defaultSearchable:e.boolean(),dataTypes:e.record(lf),accounts:e.record(af),policyLines:e.record(Gr),exposureGroups:e.record(Gr),exposures:e.record(Gr),coverages:e.record(Gr),products:e.record(df),coverageTerms:e.record(sf),charges:e.record(Sm),transactionTypes:e.record(rf),installmentPlans:e.record(Qi),billingPlans:e.record($m),payments:e.record(uf),disbursements:e.record(Xi),tables:e.record(ef),constraintTables:e.record(Om),secrets:e.record(Xm),documents:e.record(Ji),auxDataSettings:e.record(xm),customEvents:e.record(Im),delinquencyPlans:e.record(Rm),shortfallTolerancePlans:e.record(Jm),autoRenewalPlans:e.record(Em),excessCreditPlans:e.record(Fm),reversalTypes:e.record(Qm),numberingPlans:e.record(Gm),fnol:e.record(cf),claims:e.record(Cm),losses:e.record(Um),contacts:e.record(of),contactRoles:e.array(e.string()),workManagement:Pm,dataAccessControl:Bm,bootstrap:nf,defaultInvoiceDocument:e.string()});e.object({formData:ze.optional()}),e.object({formData:ze.optional()}),e.object({formData:ze.optional()}),e.object({formData:ze.optional(),overwrite:e.boolean().optional()}),e.object({description:e.string().optional(),formData:ze.optional(),name:e.string().optional()}),e.object({config:ze}),e.object({formData:ze.optional()});const pf=e.enum(["none","required","excluded"]),eo=e.enum(["generateDay","termStartDay","dueDay"]),gf=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),Xt=e.enum(["accept","issue"]),yt=e.enum(["account","inherit","policy"]),to=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),mf=e.enum(["add","delete","modify","params"]),ff=e.enum(["none","premium","tax","fee","credit","commission","flatPremium","flatTax","flatFee","flatCommission","cededPremium","flatCededPremium","nonFinancial","surcharge"]),Jt=e.enum(["none","years","months","monthsE360","weeks","days","hours"]),yf=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),hf=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),bf=e.enum(["product","coverage","exposure","exposureGroup","policyLine"]),vf=e.enum(["fuzzy","exact","startsWith"]);e.enum(["application/json","application/octet-stream","application/pdf","application/zip","application/x-zip-compressed","image/jpeg","image/png","image/svg+xml","text/x-java-source","multipart/form-data","text/csv","text/html","text/plain"]);var je=(r=>(r.applicationJson="application/json",r.applicationOctetStream="application/octet-stream",r.applicationPdf="application/pdf",r.applicationZip="application/zip",r.applicationZipWindows="application/x-zip-compressed",r.imageJpg="image/jpeg",r.imagePng="image/png",r.imageSvg="image/svg+xml",r.javaSource="text/x-java-source",r.multipartFormData="multipart/form-data",r.textCsv="text/csv",r.textHtml="text/html",r.text="text/plain",r))(je||{});const ro=e.enum(["quote","policy","invoice","transaction","segment","term"]),ao=e.enum(["unspecified","account","quote","policy"]),Tf=e.enum(["coverage","gap"]),nn=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),on=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),Af=e.enum(["quote","transaction"]),no=e.enum(["none","info","block","decline","reject","approve"]),jf=e.enum(["none","first","second","third","fourth","fifth"]);e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]);const sn=e.enum(["text","html","pdf","jpg","jpeg","doc","docx","xls","xlsx","csv","txt","zip"]),ln=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),_f=e.enum(["clear","delete"]),wf=e.enum(["draft","validated","approved","executed","reversed","rejected","discarded"]),Ef=e.enum(["invoice","account"]),cn=e.enum(["ach","cash","eft","standard","wire"]),xf=e.enum(["transaction","policy","term","segment","policyUnique","termUnique","invoice"]),$f=e.enum(["policyStartTime","termStartTime","transactionEffectiveTime","currentTime"]),Sf=e.enum(["validated","priced","accepted","issued","underwritten","generated"]),Cf=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),Lf=e.enum(["active","pastDeadline","completed","cancelled"]),io=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),kf=e.enum(["active","completed","unassigned","discarded"]),Pf=e.enum(["quote","policy","transaction","activity","fnol"]),Df=e.enum(["active","discarded","locked"]),Of=Xi.merge(e.object({displayName:e.string().optional(),numberingPlan:e.string().optional(),data:e.record(e.any()).optional(),extend:e.string().optional()})),Nf=e.record(Of),If=Ji.merge(e.object({displayName:e.string().optional(),scope:xf,format:sn.optional(),selectionTimeBasis:$f.optional(),trigger:Sf.optional()})),Bf=e.record(If),Mf=Qi.merge(e.object({displayName:e.string().optional(),cadence:to,anchorMode:eo.optional(),generateLeadDays:e.number().optional(),dueLeadDays:e.number().optional(),installmentWeights:e.array(e.number()).optional(),maxInstallmentsPerTerm:e.number().optional()})),Rf=e.record(Mf),qf=e.object({generateAutoRenewals:e.boolean(),newTermDuration:e.number().optional(),renewalAcceptLeadDays:e.number().optional(),renewalCreateLeadDays:e.number().optional(),renewalIssueLeadDays:e.number().optional(),renewalTransactionType:e.string().optional()}),Ff=e.record(qf),Uf=e.object({selectionStartTime:e.string().optional(),resourceNames:e.array(e.string()).optional()}),Zf=e.object({staticName:e.string().optional()}),Gf=e.object({resourceGroups:e.record(Uf).optional(),resourceInstances:e.record(Zf).optional()}),Kf=e.object({resources:Gf.optional()}),zf=e.record(e.object({columns:e.record(e.object({dataType:e.string()})).optional(),selectionTimeBasis:e.string().optional()})),Vf=e.object({displayName:e.string().optional(),value:e.number().optional(),tag:e.string().optional()}),Hf=e.object({type:e.string(),displayName:e.string().optional(),options:e.record(Vf)}),Wf=e.record(Hf),Yf=e.enum(["policy","invoice"]),Qf=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),Xf=e.object({displayName:e.string().optional(),gracePeriodDays:e.number(),advanceLapseTo:Qf.optional(),delinquencyLevel:Yf.optional(),lapseTransactionType:e.string().optional(),events:e.record(e.any()).optional()}),Jf=e.record(Xf),ey=e.object({displayName:e.string().optional(),contents:e.array(e.string()).optional(),abstract:e.boolean().optional(),extend:e.string().optional(),coverageTerms:e.array(e.string()).optional(),data:e.record(Ke).optional(),charges:e.array(e.string()).optional(),defaultSearchable:e.boolean().optional()}),er=e.record(ey),ty=e.object({abstract:e.boolean(),extend:e.string().optional(),data:e.record(Ke).optional(),displayName:e.string().optional()}),ry=e.record(ty),ay=e.object({defaultTimeZone:e.string().optional(),defaultCurrency:e.string().optional(),defaultTermDuration:e.number().optional(),defaultDurationBasis:e.string().optional(),defaultInstallmentPlan:e.string().optional(),defaultDelinquencyPlan:e.string().optional(),defaultAuxDataSettings:e.string().optional(),defaultShortfallTolerancePlan:e.string().optional(),defaultAutoRenewalPlan:e.string().optional(),defaultBillingTrigger:e.string().optional(),defaultBillingLevel:e.string().optional()}),ny=e.object({abstract:e.boolean().optional(),extend:e.string().optional(),displayName:e.string().optional(),coverageTerms:e.array(e.string()).optional(),eligibleAccountTypes:e.array(e.string()).optional(),contents:e.array(e.string()).optional(),documents:e.array(e.string()).optional(),charges:e.array(e.string()).optional(),plugins:e.any(),tables:e.any(),data:e.record(Ke).optional(),staticData:e.record(Ke).optional(),defaultSearchable:e.boolean().optional()}).merge(ay),iy=e.record(ny),oy=e.enum(["any","creditDistribution","payment"]),sy=e.object({creditType:oy.optional()}),ly=e.record(sy),cy=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),uy=e.object({category:cy,costBearing:e.boolean()}),dy=e.record(uy);e.object({dataTypes:er.optional(),accounts:jm,products:iy,coverageTerms:Wf.optional(),delinquencyPlans:Jf,autoRenewalPlans:Ff,transactionTypes:dy.optional(),reversalTypes:ly.optional(),dataAccessControl:e.any().optional(),bootstrap:Kf.optional(),constraintTables:zf.optional(),payments:ry.optional(),documents:Bf.optional(),disbursements:Nf.optional(),installmentPlans:Rf.optional(),policyLines:er.optional(),exposures:er.optional(),exposureGroups:er.optional(),coverages:er.optional(),defaultTimeZone:e.string().optional(),defaultCurrency:e.string().optional(),defaultTermDuration:e.number().optional(),defaultBillingTrigger:e.string().optional(),defaultInstallmentPlan:e.string().optional(),defaultAutoRenewalPlan:e.string().optional(),defaultBackdatedInstallmentsBilling:e.string().optional(),defaultExcessCreditPlan:e.string().optional(),defaultBillingPlan:e.string().optional(),defaultDurationBasis:tn.optional(),defaultDelinquencyPlan:e.string().optional(),defaultAuxDataSettings:e.string().optional(),defaultBillingLevel:e.string().optional(),defaultShortfallTolerancePlan:e.string().optional(),defaultSearchable:e.boolean().optional(),defaultInvoiceDocument:e.string().optional(),charges:e.any(),billingPlans:e.any(),tables:e.any(),secrets:e.any(),auxDataSettings:e.any(),customEvents:e.any(),shortfallTolerancePlans:e.any(),excessCreditPlans:e.any()});const py=e.object({abstract:e.boolean().optional(),extend:e.string().optional(),displayName:e.string().optional(),data:e.record(Ke).optional()});e.record(py);const gy=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),oo=e.union([gy,e.string()]),Kr=tn,my=e.enum(["accept","issue"]),fy=Xa;e.record(e.string().ulid(),e.record(e.object({column:e.string(),table:e.string(),where:e.record(e.object({staticLocator:e.string(),fieldName:e.string(),values:e.array(e.string()).optional()})).optional()}))),e.record(e.string().ulid(),e.record(e.record(e.union([e.string(),e.record(e.string())])))),e.record(e.string().ulid(),e.record(e.array(e.string())));const so=e.object({type:e.string(),staticLocator:e.string().optional(),parentLocator:e.string().optional(),coverageTerms:e.record(e.string()).optional(),data:e.record(e.any()).optional()});so.extend({elements:e.array(so).optional()});const un=e.object({locator:e.string().ulid(),removeCoverageTerms:e.record(e.unknown()).optional(),removeData:e.record(e.unknown()).optional(),setCoverageTerms:e.record(e.unknown()).optional(),setData:e.record(e.unknown()).optional()});e.object({productName:e.string().optional(),delinquencyPlanName:e.string().optional(),startTime:e.string().optional(),endTime:e.string().optional(),currency:e.string().optional(),expirationTime:e.string().optional(),setData:e.record(e.any()).optional(),removeData:e.record(e.any()).optional(),elements:e.array(un).optional(),timezone:e.string().optional(),billingPlan:e.string().optional(),defaultTermDuration:e.string().optional(),installmentPlan:e.string().optional(),durationBasis:e.string().optional(),setCoverageTerms:e.record(e.any()).optional(),removeCoverageTerms:e.record(e.any()).optional(),preferences:e.object({billingPreferences:e.object({billingPlanName:e.string().optional(),billingLevel:e.enum(["account","inherit","policy"]).optional()}).optional(),installmentPreferences:e.object({installmentPlanName:e.string().optional(),anchorMode:e.enum(["generateDay","termStartDay","dueDay"]).optional(),anchorTime:e.string().optional(),anchorType:e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]).optional(),cadence:e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]).optional(),dayOfMonth:e.number().optional(),dayOfWeek:e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]).optional(),dueLeadDays:e.number().optional(),generateLeadDays:e.number().optional(),maxInstallmentsPerTerm:e.number().optional(),weekOfMonth:e.enum(["none","first","second","third","fourth","fifth"]),installmentPlanWeights:e.array(e.number()).optional()}).optional()}).optional()});const tr=e.string().ulid(),yy=e.object({locator:tr,staticLocator:tr,rootLocator:tr.optional(),tenantLocator:tr.optional(),type:e.string(),data:e.record(e.any()).optional(),parentLocator:tr.optional(),coverageTerms:e.record(e.string()).optional(),originalEffectiveTime:e.string().optional()}),dn=yy.extend({elements:e.lazy(()=>dn.array().optional())});e.object({locator:Yt,quoteState:oo,productName:e.string(),accountLocator:Yt,startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:Hi.optional(),expirationTime:e.string().optional(),element:dn.optional(),type:e.string().optional(),duration:e.number().optional(),durationBasis:Kr.optional(),boundTime:e.string().optional(),issuedTime:e.string().optional(),policyLocator:Yt.optional(),validationResult:ft.optional(),preferences:e.any().optional(),delinquencyPlanName:e.string().optional(),autoRenewalPlanName:e.string().optional(),billingLevel:fy.optional(),billingTrigger:my.optional(),coverageTerms:e.record(e.string()).optional(),groupLocator:Yt.optional()});const hy=e.enum(["premium","tax","fee","credit","cededPremium","nonFinancial","surcharge"]),by=e.object({locator:e.string(),elementLocator:e.string(),chargeType:e.string(),chargeCategory:hy,amount:e.number(),rate:e.number(),referenceRate:e.number(),elementStaticLocator:e.string(),tag:e.string().optional(),rateDifference:e.number().optional(),reversalOfLocator:e.string().optional()});e.object({quoteLocator:e.string(),accountLocator:e.string(),quoteState:oo,productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number().optional(),durationBasis:Kr.optional(),items:e.array(by).optional()}),e.object({quoteLocator:e.string(),clearedFlags:Qt.array().optional(),flags:Qt.array().optional()});const vy=e.enum(["clear","delete"]);e.object({deleteAllAutomaticDocuments:e.boolean(),resetAllUnderwritingFlags:e.boolean(),resetFlagsAction:vy,deleteDocuments:e.string().array(),resetFlags:e.string().array()});const pn=e.object({accountLocator:e.string()});e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const zr=e.object({contactLocator:e.string(),roles:e.array(e.string())});e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")]);const rr=e.object({action:e.string()}),re=e.lazy(()=>e.object({type:e.string(),locator:e.string(),parentLocator:e.string(),elements:e.array(re),coverageTerms:e.record(e.string()),data:e.record(e.record(e.unknown())),staticLocator:e.string(),originalEffectiveTime:e.string().optional(),category:e.union([e.literal("product"),e.literal("coverage"),e.literal("exposure"),e.literal("exposureGroup"),e.literal("policyLine")]).optional()}));e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]);const lo=e.object({locator:e.string(),action:e.union([e.literal("reversed"),e.literal("reapplied"),e.literal("invalidated")])});e.union([e.literal("reversed"),e.literal("reapplied"),e.literal("invalidated")]),e.union([e.literal("active"),e.literal("discarded"),e.literal("doNotRenew"),e.literal("issued"),e.literal("error"),e.literal("terminated"),e.literal("invalidated")]);const co=e.object({billingPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]).optional()}),Vr=e.object({locator:e.string(),elementLocator:e.string(),chargeType:e.string(),chargeCategory:e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),amount:e.number(),rate:e.number(),referenceRate:e.number(),tag:e.string().optional(),rateDifference:e.number().optional(),elementStaticLocator:e.string(),reversalOfLocator:e.string().optional(),handling:e.union([e.literal("normal"),e.literal("flat")]),invoicing:e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")])});e.union([e.literal("none"),e.literal("premium"),e.literal("tax"),e.literal("fee"),e.literal("credit"),e.literal("commission"),e.literal("flatPremium"),e.literal("flatTax"),e.literal("flatFee"),e.literal("flatCommission"),e.literal("cededPremium"),e.literal("flatCededPremium"),e.literal("nonFinancial"),e.literal("surcharge")]),e.union([e.literal("normal"),e.literal("flat")]),e.union([e.literal("scheduled"),e.literal("next"),e.literal("immediate")]);const Ty=e.object({staticLocator:e.string(),fieldName:e.string(),values:e.array(e.string())}),gn=e.object({table:e.string(),column:e.string(),where:e.record(Ty)}),Ay=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),jy=e.object({termLocator:e.string(),policyLocator:e.string(),autoRenewalState:e.union([e.literal("active"),e.literal("discarded"),e.literal("doNotRenew"),e.literal("issued"),e.literal("error"),e.literal("terminated"),e.literal("invalidated")]).optional(),renewalTransactionType:e.string().optional(),newTermDuration:e.number().optional(),renewalTransactionCreateTime:e.string(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionLocator:e.string().optional()}),ar=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),staticElementLocators:e.array(e.string()).optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),staticElementLocators:e.array(e.string())})),_y=e.object({locator:e.string(),name:e.string(),staticName:e.string(),documentInstanceState:e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),state:e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")])});e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),e.union([e.literal("product"),e.literal("coverage"),e.literal("exposure"),e.literal("exposureGroup"),e.literal("policyLine")]);const wy=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),data:e.record(e.record(e.unknown())),chargeSummaries:e.record(e.number())}),uo=e.object({cadence:e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]).optional(),anchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]).optional(),generateLeadDays:e.number().optional(),dueLeadDays:e.number().optional(),installmentWeights:e.array(e.number()),maxInstallmentsPerTerm:e.number().optional(),installmentPlanName:e.string().optional(),anchorType:e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]).optional(),dayOfMonth:e.number().optional(),dayOfWeek:e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]).optional(),weekOfMonth:e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]).optional(),anchorTime:e.string().optional()});e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]),e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]),e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]);const Ey=e.object({historyLocator:e.string(),staticData:e.record(e.record(e.unknown())),updatedBy:e.string(),updatedAt:e.string()}),nr=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),staticLocator:e.string().optional(),setData:e.record(e.record(e.unknown())).optional(),removeData:e.record(e.record(e.unknown())).optional(),setCoverageTerms:e.record(e.string()).optional(),removeCoverageTerms:e.record(e.record(e.unknown())).optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),staticLocator:e.string(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown()))})),le=e.object({installmentPreferences:uo.optional(),billingPreferences:co.optional()}),xy=e.object({renewalTransactionType:e.string().optional(),newTermDuration:e.number().optional(),renewalTransactionCreateTime:e.string().optional(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionLocator:e.string().optional()}),Hr=e.object({locator:e.string(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown()))}),$y=e.object({setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown())),currency:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),elements:e.array(Hr)}),po=e.object({setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),setCoverageTerms:e.record(e.string()),removeCoverageTerms:e.record(e.record(e.unknown())),currency:e.string(),timezone:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),elements:e.array(Hr),preferences:le,billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),delinquencyPlanName:e.string(),autoRenewalPlanName:e.string(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])});e.union([e.literal("accept"),e.literal("issue")]);const mn=e.object({setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown()))});e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]);const go=e.object({toTransaction:e.string(),reverseTransactions:e.array(e.string()),baseLocator:e.string()});e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]);const Sy=e.object({productName:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),currency:e.string(),timezone:e.string(),coverageTerms:e.record(e.string()),data:e.record(e.record(e.unknown())),elements:e.array(re),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")])});e.object({tenantLocator:e.string(),quickQuoteLocator:e.string(),accountLocator:e.string().optional(),quickQuoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]),productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),items:e.array(Vr),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")])}),e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]);const mo=e.object({productName:e.string(),accountLocator:e.string(),startTime:e.string(),endTime:e.string(),expirationTime:e.string(),currency:e.string(),timezone:e.string(),coverageTerms:e.record(e.string()),data:e.record(e.record(e.unknown())),elements:e.array(re),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),preferences:le,delinquencyPlanName:e.string(),autoRenewalPlanName:e.string(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string(),static:e.record(e.record(e.unknown()))}),ae=e.object({quoteLocator:e.string()}),Cy=e.object({quoteLocator:e.string(),underwritingStatus:e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")])}),Ly=e.object({quoteLocator:e.string()}),ir=e.object({groupLocator:e.string()}),ky=e.object({tenantLocator:e.string(),quoteLocator:e.string(),accountLocator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),items:e.array(Vr),quoteNumber:e.string()});e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]);const Ve=e.object({locator:e.string(),level:e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]),referenceType:e.union([e.literal("quote"),e.literal("transaction")]),referenceLocator:e.string(),note:e.string(),tag:e.string(),elementLocator:e.string(),createdBy:e.string(),createdTime:e.string(),clearedBy:e.string(),clearedTime:e.string()}),Py=e.object({tenantLocator:e.string(),quoteLocator:e.string(),accountLocator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),underwritingStatus:e.string(),underwritingFlags:e.array(Ve)}),fn=e.object({resetAllUnderwritingFlags:e.boolean(),resetFlags:e.array(e.string()),resetFlagsAction:e.union([e.literal("clear"),e.literal("delete")]),deleteAllAutomaticDocuments:e.boolean(),deleteDocuments:e.array(e.string())});e.union([e.literal("clear"),e.literal("delete")]);const ht=e.object({locator:e.string(),transactionLocator:e.string(),segmentType:e.union([e.literal("coverage"),e.literal("gap")]),startTime:e.string(),endTime:e.string(),element:re,duration:e.number(),basedOn:e.string().optional()});e.union([e.literal("coverage"),e.literal("gap")]);const Dy=e.object({locator:e.string(),type:e.union([e.literal("coverage"),e.literal("gap")]),basedOn:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),elements:e.array(wy),documentSummary:e.array(_y)});e.union([e.literal("coverage"),e.literal("gap")]);const Oy=e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),number:e.number(),previousTermLocator:e.string().optional(),supersedesTermLocator:e.string().optional(),startTime:e.string(),endTime:e.string(),autoRenewalLocator:e.string().optional(),termNumber:e.string().optional()});e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),number:e.number(),startTime:e.string(),endTime:e.string(),amount:e.number()}),e.object({policyLocator:e.string(),locator:e.string(),staticLocator:e.string(),termNumber:e.number(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),subsegments:e.array(Dy)}),e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]);const x=e.object({policyLocator:e.string(),transactionLocator:e.string()}),or=e.object({policyLocator:e.string(),transactionLocator:e.string(),underwritingStatus:e.string()}),sr=e.object({policyLocator:e.string(),transactionLocator:e.string()}),Ny=e.lazy(()=>e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionState:e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]),effectiveTime:e.string(),charges:e.array(Vr),aggregatedTransactions:e.array(Ny)})),fo=e.object({locator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionType:e.string(),effectiveTime:e.string(),issuedTime:e.string(),preferences:le,segment:ht}),Iy=e.lazy(()=>e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionState:e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]),effectiveTime:e.string(),underwritingStatus:e.string(),underwritingFlags:e.array(Ve),aggregatedTransactions:e.array(Iy)})),By=e.object({transactionLocator:e.string(),flags:e.array(Ve),clearedFlags:e.array(Ve)}),yo=e.object({level:e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]),note:e.string(),tag:e.string(),elementLocator:e.string()});e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]),e.union([e.literal("quote"),e.literal("transaction")]);const yn=e.object({addFlags:e.array(yo),clearFlags:e.array(e.string())}),ho=e.object({autoRenewalPlanName:e.string()}),My=e.object({renewalTransactionType:e.string().optional(),newTermDuration:e.number().optional(),renewalTransactionCreateTime:e.string(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionLocator:e.string().optional()}),Wr=e.object({billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])}),Ry=e.object({billingTrigger:e.union([e.literal("accept"),e.literal("issue")])}),hn=e.object({delinquencyPlanName:e.string()}),bo=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),Oe=e.object({validationItems:e.array(bo),success:e.boolean()});e.object({locator:e.string(),requestBody:e.array(re)}),e.array(ht),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.array(ht),e.object({locator:e.string(),requestBody:Hr}),e.array(ht);const lr=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),elements:e.array(re).optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),elements:e.array(re)})),He=rr.and(e.object({locator:e.string().optional(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]).optional(),effectiveTime:e.string().optional(),newPolicyEndTime:e.string().optional(),preferences:le.optional(),billingModeChange:e.boolean().optional(),triggerBillingChange:e.boolean().optional(),inheritSettings:e.boolean().optional()})).and(e.object({locator:e.string(),action:e.union([e.literal("params"),e.literal("modify"),e.literal("add"),e.literal("delete")]),effectiveTime:e.string()})),qy=e.lazy(()=>e.object({locator:e.string(),transactionCategory:e.union([e.literal("issuance"),e.literal("change"),e.literal("renewal"),e.literal("cancellation"),e.literal("reinstatement"),e.literal("reversal"),e.literal("aggregate")]),transactionState:e.union([e.literal("draft"),e.literal("initialized"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded"),e.literal("invalidated"),e.literal("reversed")]),underwritingStatus:e.string().optional(),policyLocator:e.string(),baseTransactionLocator:e.string().optional(),aggregateTransactionLocator:e.string().optional(),createdAt:e.string(),createdBy:e.string(),validationResult:Oe.optional(),changeInstructions:e.array(e.record(e.unknown())),effectiveTime:e.string(),aggregatedTransactions:e.array(qy),termLocator:e.string(),preferences:le.optional(),transactionType:e.string(),issuedTime:e.string().optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]).optional(),acceptedTime:e.string().optional(),reapplicationOfLocator:e.string().optional()}));e.object({locator:e.string()}),e.record(e.record(e.unknown())),e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))});const vo=e.object({locator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),accountLocator:e.string(),startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:e.string().optional(),expirationTime:e.string().optional(),element:re,preferences:le.optional(),policyLocator:e.string().optional(),delinquencyPlanName:e.string().optional(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]).optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]).optional(),groupLocator:e.string(),autoRenewalPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string().optional(),quoteNumber:e.string().optional(),duration:e.number().optional(),acceptedTime:e.string().optional(),issuedTime:e.string().optional(),validationResult:Oe.optional(),quickQuoteLocator:e.string().optional(),policyNumber:e.string(),static:e.record(e.record(e.unknown()))});e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))}),e.object({locator:e.string(),requestBody:mn}),e.object({locator:e.string(),requestBody:e.array(re)}),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.object({locator:e.string(),requestBody:e.array(re)}),e.object({locator:e.string(),quickQuoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("quoted"),e.literal("discarded")]),productName:e.string(),accountLocator:e.string().optional(),startTime:e.string().optional(),endTime:e.string().optional(),duration:e.number().optional(),expirationTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]).optional(),groupLocator:e.string(),element:re,validationResult:Oe.optional()}),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.object({locator:e.string()}),e.record(e.record(e.unknown())),e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))});const To=e.object({locator:e.string(),accountLocator:e.string(),branchHeadTransactionLocators:e.array(e.string()),issuedTransactionLocator:e.string(),productName:e.string(),timezone:e.string(),currency:e.string(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]),createdAt:e.string(),createdBy:e.string(),delinquencyPlanName:e.string().optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]),autoRenewalPlanName:e.string().optional(),startTime:e.string(),endTime:e.string(),latestTermLocator:e.string(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string().optional(),policyNumber:e.string().optional(),latestSegmentLocator:e.string(),validationResult:Oe.optional(),static:e.record(e.record(e.unknown()))});e.object({locator:e.string(),requestBody:e.record(e.record(e.unknown()))}),e.object({locator:e.string(),requestBody:mn}),e.object({locator:e.string()}),e.object({locator:e.string(),autoRenewalState:e.union([e.literal("active"),e.literal("discarded"),e.literal("doNotRenew"),e.literal("issued"),e.literal("error"),e.literal("terminated"),e.literal("invalidated")]),policyLocator:e.string(),termLocator:e.string(),renewalTransactionType:e.string(),renewalTransactionLocator:e.string().optional(),renewalTransactionCreateTime:e.string().optional(),renewalTransactionCreatedTime:e.string().optional(),renewalTransactionAcceptTime:e.string().optional(),renewalTransactionAcceptedTime:e.string().optional(),renewalTransactionIssueTime:e.string().optional(),renewalTransactionIssuedTime:e.string().optional(),newTermDuration:e.number().optional(),validationResult:Oe.optional()}),e.object({locator:e.string(),requestBody:My}),e.object({locator:e.string(),requestBody:xy}),e.object({locator:e.string()});const Fy=e.object({locator:e.string(),type:e.string(),accountState:e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")]),data:e.record(e.record(e.unknown())),delinquencyPlanName:e.string(),shortfallTolerancePlanName:e.string(),autoRenewalPlanName:e.string(),excessCreditPlanName:e.string(),preferences:le,validationResult:Oe.optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string(),invoiceDocument:e.string(),accountNumber:e.string(),contacts:e.array(zr),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")])}),Ao=e.object({type:e.string(),autoValidate:e.boolean(),data:e.record(e.record(e.unknown())),delinquencyPlanName:e.string(),shortfallTolerancePlanName:e.string(),autoRenewalPlanName:e.string(),excessCreditPlanName:e.string(),preferences:le,billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string(),invoiceDocument:e.string(),contacts:e.array(zr)}),Uy=e.object({type:e.string(),delinquencyPlanName:e.string(),shortfallTolerancePlanName:e.string(),autoRenewalPlanName:e.string(),excessCreditPlanName:e.string(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),preferences:le,billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),invoiceDocument:e.string(),autoValidate:e.boolean()});e.object({locator:e.string(),requestBody:e.record(e.record(e.record(e.string())))}),e.record(e.record(e.array(e.string()))),e.object({locator:e.string()}),e.object({requestBody:mo}),e.object({locator:e.string(),quoteNumber:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ir.optional()}),e.object({locator:e.string(),requestBody:e.record(e.record(e.record(e.string())))}),e.record(e.record(e.array(e.string()))),e.object({requestBody:Sy}),e.object({accountLocator:e.string(),locator:e.string(),markAsQuoted:e.boolean().optional()}),e.object({locator:e.string(),quoteState:e.union([e.literal("draft"),e.literal("validated"),e.literal("earlyUnderwritten"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued"),e.literal("underwrittenBlocked"),e.literal("declined"),e.literal("rejected"),e.literal("refused"),e.literal("discarded")]),productName:e.string(),accountLocator:e.string(),startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:e.string().optional(),expirationTime:e.string().optional(),element:re,preferences:le.optional(),policyLocator:e.string().optional(),delinquencyPlanName:e.string().optional(),durationBasis:e.union([e.literal("none"),e.literal("years"),e.literal("months"),e.literal("monthsE360"),e.literal("weeks"),e.literal("days"),e.literal("hours")]).optional(),billingTrigger:e.union([e.literal("accept"),e.literal("issue")]).optional(),groupLocator:e.string(),autoRenewalPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]),region:e.string().optional(),quoteNumber:e.string().optional(),duration:e.number().optional(),acceptedTime:e.string().optional(),issuedTime:e.string().optional(),validationResult:Oe.optional(),quickQuoteLocator:e.string().optional()}),e.object({locator:e.string(),requestBody:ir.optional()}),e.object({locator:e.string(),requestBody:e.record(e.record(e.record(e.string())))}),e.record(e.record(e.array(e.string()))),e.object({locator:e.string(),policyNumber:e.string()}),e.object({locator:e.string()}),e.object({requestBody:jy}),e.object({requestBody:Ao}),e.object({accountNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({accountLocator:e.string()}),e.array(zr),e.object({accountLocator:e.string(),requestBody:zr}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:yn}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:fn.optional(),resetToDraft:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({autoRebase:e.boolean().optional(),locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({instructionLocator:e.string(),locator:e.string()}),e.object({instructionLocator:e.string(),locator:e.string(),requestBody:e.union([lr,ar,nr,He])}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:po}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()});const Zy=e.object({quoteLocator:e.string(),flags:e.array(Ve),clearedFlags:e.array(Ve)});e.object({locator:e.string(),requestBody:yn}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:fn.optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:hn}),e.object({locator:e.string(),requestBody:Wr}),e.object({locator:e.string(),requestBody:ho}),e.object({locator:e.string(),requestBody:ir}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:$y}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ir}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([lr,ar,nr,He])),transactionType:e.string()}),e.object({locator:e.string(),requestBody:go}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([lr,ar,nr,He]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:He.optional()}),e.object({locator:e.string(),requestBody:hn}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([lr,ar,nr,He]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:He}),e.object({locator:e.string(),requestBody:Ry}),e.object({locator:e.string(),requestBody:Wr}),e.object({locator:e.string(),requestBody:ho}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Wr}),e.object({accountLocator:e.string(),contactLocator:e.string()}),e.object({accountLocator:e.string(),contactLocator:e.string(),requestBody:Ay}),e.object({locator:e.string()}),e.object({locator:e.string(),segmentLocator:e.string()}),e.object({locator:e.string()}),e.array(ht),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.record(e.record(gn)),e.object({locator:e.string()}),e.object({locator:e.string()}),e.array(lo),e.object({locator:e.string()}),e.array(lo),e.object({segmentLocator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({termNumber:e.string()}),e.array(Oy),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({listCompleted:e.boolean(),items:e.array(Ey)}),e.object({locator:e.string()}),e.record(e.record(gn)),e.object({quoteNumber:e.string()}),e.array(vo),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.record(e.record(gn)),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string(),termNumber:e.number().optional()}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({byIssuedTime:e.boolean().optional(),date:e.string(),locator:e.string()});const jo=e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),timezone:e.string(),currency:e.string(),region:e.string(),transaction:fo,delinquencyPlanName:e.string().optional(),static:e.record(e.record(e.unknown()))});e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),offset:e.number().optional()}),e.array(jo),e.object({policyNumber:e.string()}),e.array(To);const Gy=e.object({"policy.account.update":pn.optional(),"policy.account.validate":pn.optional(),"policy.account.create":pn.optional()}),Ky=e.object({"policy.quote.issue":ae.optional(),"policy.quote.staticdata.replace":ae.optional(),"policy.quote.create":ae.optional(),"policy.quote.reset":ae.optional(),"policy.quote.staticdata.update":ae.optional(),"policy.quote.refuse":ae.optional(),"policy.quote.staticdata.add":ae.optional(),"policy.quote.underwrite":Cy.optional(),"policy.quote.manualunderwrite":Ly.optional(),"policy.quote.update":ae.optional(),"policy.quote.price":ae.optional(),"policy.quote.validate":ae.optional(),"policy.quote.discard":ae.optional(),"policy.quote.accept":ae.optional()}),zy=e.object({"policy.renewal.accept":x.optional(),"policy.cancellation.reset":x.optional(),"policy.cancellation.issue":x.optional(),"policy.reversal.accept":x.optional(),"policy.cancellation.accept":x.optional(),"policy.change.discard":x.optional(),"policy.change.issue":x.optional(),"policy.cancellation.validate":x.optional(),"policy.reversal.underwrite":or.optional(),"policy.cancellation.price":x.optional(),"policy.reversal.update":x.optional(),"policy.cancellation.refuse":x.optional(),"policy.change.accept":x.optional(),"policy.renewal.refuse":x.optional(),"policy.reinstatement.create":x.optional(),"policy.reinstatement.reset":x.optional(),"policy.renewal.underwrite":or.optional(),"policy.reversal.reset":x.optional(),"policy.change.update":x.optional(),"policy.reversal.validate":x.optional(),"policy.change.refuse":x.optional(),"policy.reversal.issue":x.optional(),"policy.cancellation.update":x.optional(),"policy.change.manualUnderwrite":sr.optional(),"policy.change.create":x.optional(),"policy.reinstatement.update":x.optional(),"policy.renewal.manualUnderwrite":sr.optional(),"policy.reinstatement.discard":x.optional(),"policy.renewal.price":x.optional(),"policy.reversal.discard":x.optional(),"policy.reinstatement.price":x.optional(),"policy.change.validate":x.optional(),"policy.cancellation.underwrite":or.optional(),"policy.change.underwrite":or.optional(),"policy.renewal.validate":x.optional(),"policy.reinstatement.accept":x.optional(),"policy.reversal.price":x.optional(),"policy.cancellation.create":x.optional(),"policy.reinstatement.refuse":x.optional(),"policy.renewal.create":x.optional(),"policy.renewal.reset":x.optional(),"policy.cancellation.manualUnderwrite":sr.optional(),"policy.change.price":x.optional(),"policy.cancellation.discard":x.optional(),"policy.renewal.update":x.optional(),"policy.renewal.issue":x.optional(),"policy.reinstatement.issue":x.optional(),"policy.change.reset":x.optional(),"policy.reversal.manualUnderwrite":sr.optional(),"policy.reinstatement.underwrite":or.optional(),"policy.reinstatement.validate":x.optional(),"policy.reinstatement.manualUnderwrite":sr.optional(),"policy.reversal.refuse":x.optional(),"policy.renewal.discard":x.optional(),"policy.reversal.create":x.optional()});e.object({count:e.number().optional(),extended:e.boolean().optional(),includeStaticData:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeStaticData:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountNumber:e.string()}),e.array(Fy),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string(),requestBody:e.union([lr,ar,nr,He])}),e.object({locator:e.string(),requestBody:Ao}),e.object({locator:e.string(),requestBody:Uy}),e.object({accountEvents:Gy.optional(),quoteEvents:Ky.optional(),transactionEvents:zy.optional()});const Yr=e.string().uuid(),$=e.string().ulid(),_=e.string().datetime();e.string().datetime({offset:!0});const _e=e.record(e.string(),e.string()),q=e.record(e.string(),e.any()),bt=Yr,F=Yr,cr=$,Ne=$,vt=$,we=$,Qr=$,bn=$,_o=$,ur=$,Vy=$,wo=$,Eo=$,xo=$;function Ie(r){return e.object({listCompleted:e.boolean(),items:e.array(r)})}function Hy(r){return e.array(r)}const Wy=bo.merge(e.object({locator:Ne})),vn=Oe.merge(e.object({validationItems:e.array(Wy).optional()}));e.object({offset:e.coerce.number().nonnegative().int().optional(),count:e.coerce.number().nonnegative().int().optional()});const Yy=e.object({type:e.string(),locator:Ne,staticLocator:$,parentLocator:Ne,originalEffectiveTime:_.optional(),category:bf.optional(),data:q.optional(),coverageTerms:_e.optional()}),$o=Yy.extend({elements:e.lazy(()=>$o.array().optional())}),Qy=e.object({type:e.string(),staticLocator:$.optional(),parentLocator:Ne,data:q,coverageTerms:_e}),Tn=Qy.extend({elements:e.lazy(()=>Tn.array().optional())}),Xy=Hr.merge(e.object({locator:Ne,setData:q,removeData:q,setCoverageTerms:_e,removeCoverageTerms:q})),Jy=ht.merge(e.object({locator:bn,segmentType:Tf,startTime:_,endTime:_,element:$o,basedOn:$.optional()})),So=To.merge(e.object({locator:$,accountLocator:$,branchHeadTransactionLocators:e.array($),issuedTransactionLocator:$,durationBasis:Jt,createdAt:_,createdBy:F,startTime:_,endTime:_,billingTrigger:Xt,billingLevel:yt,latestSegmentLocator:$,static:q}));Ie(So),mn.merge(e.object({setData:q,removeData:q}));const Co=uo.merge(e.object({cadence:to.optional(),anchorMode:eo.optional(),anchorType:gf.optional(),dayOfWeek:yf.optional(),weekOfMonth:jf.optional(),installmentWeights:e.array(e.number()).optional()})),Lo=co.merge(e.object({billingLevel:yt})),Tt=le.merge(e.object({installmentPreferences:Co.optional(),billingPreferences:Lo.optional()})),eh=fo.merge(e.object({locator:$,transactionCategory:nn,preferences:Tt,segment:Jy}));jo.merge(e.object({locator:$,accountLocator:$,static:q,transaction:eh})),Wr.merge(e.object({billing:yt})),hn.merge(e.object({})),Hy(So);const ko=e.object({installmentPreferences:Co.optional(),billingPreferences:Lo.optional()});e.object({tenantLocator:bt,policyLocator:vt});const th=e.enum(["draft","validated","discarded"]),An=e.enum(["account","policy"]),Po=e.object({type:e.string().optional(),autoValidate:e.boolean().optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),excessCreditPlanName:e.string().optional(),shortfallTolerancePlanName:e.string().optional(),billingLevel:An.optional(),invoiceDocument:e.string().optional(),preferences:ko.optional()});Po.extend({data:e.record(e.any()).optional()}),Po.extend({setData:e.record(e.any()).optional(),removeData:e.record(e.any()).optional()}),e.object({locator:e.string().ulid(),type:e.string(),accountState:th,data:e.record(e.any()).optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),excessCreditPlanName:e.string().optional(),shortfallTolerancePlanName:e.string().optional(),billingLevel:An.optional(),invoiceDocument:e.string().optional(),validationResult:ft.optional(),preferences:ko.optional()}),e.enum(["","?","+","*","!"]),e.enum(["?","*"]);const jn=tn,rh=Xa,ah=e.enum(["accept","issue"]);e.object({locator:e.string(),accountLocator:e.string(),issuedTransactionLocator:e.string(),latestTermLocator:e.string(),productName:e.string(),startTime:e.string(),endTime:e.string(),durationBasis:jn,billingLevel:rh,billingTrigger:ah,createdAt:e.string().optional(),createdBy:e.string().optional(),currency:e.string(),timezone:e.string().optional(),branchHeadTransactionLocators:e.array(e.string()).optional(),static:e.record(e.any()).optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),validationResult:ft.optional()});const _n=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),Xr=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),nh=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),element:dn,segmentType:e.enum(["coverage","gap"]),basedOn:e.string().optional()}),ih=e.object({locator:e.string(),issuedTime:e.string(),effectiveTime:e.string(),preferences:zi.optional(),segment:nh,transactionCategory:Xr,transactionType:e.string()}),Do=e.object({locator:e.string(),staticName:e.string().optional(),name:e.string().optional(),documentInstanceState:en,referenceType:Ja}),oh=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()).optional(),data:e.record(e.any()).optional()}),sh=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string().optional(),type:e.enum(["coverage","gap"]),documentSummary:Do.array().optional(),elements:oh.array()});e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:jn,termNumber:e.number().int(),subsegments:sh.array().optional(),documentSummary:Do.array().optional()});const lh=e.object({locator:e.string(),staticLocator:e.string(),name:e.string(),state:en,referenceType:Ja}),ch=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()),data:e.record(e.any())}),uh=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string(),type:e.enum(["coverage","gap"]),documentSummary:lh.array(),elements:ch.array()}),Oo=e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string()});Oo.extend({number:e.number().int(),autoRenewalLocator:e.string().optional(),previousTermLocator:e.string().optional(),supersedesTermLocator:e.string().optional()}),Oo.extend({duration:e.number(),durationBasis:jn,termNumber:e.number().int(),subsegments:uh.array()}),e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),currency:e.string(),timezone:e.string(),transaction:ih,static:e.record(e.any()).optional(),delinquencyPlanName:e.string().optional()}),e.object({locator:e.string(),referenceLocator:e.string(),documentInstanceState:en,createdAt:e.string(),referenceType:Ja.optional(),metadata:e.record(e.any()).optional(),renderingData:e.record(e.any()).optional(),policyLocator:e.string().optional(),referenceDocumentLocator:e.string().optional(),segmentLocator:e.string().optional(),termLocator:e.string().optional(),transactionLocator:e.string().optional(),staticName:e.string().optional(),name:e.string().optional(),createdBy:e.string().optional(),documentFormat:e.enum(["text","html","pdf"]).optional(),processingErrors:e.string().optional(),readyAt:e.string().optional()});const No=e.object({locator:e.string(),policyLocator:e.string(),termLocator:e.string(),transactionState:_n,createdAt:e.string().datetime(),createdBy:e.string().uuid(),effectiveTime:e.string().datetime(),transactionCategory:Xr,transactionType:e.string(),changeInstructions:e.array(e.any()).optional(),aggregateTransactionLocator:e.string().optional(),baseTransactionLocator:e.string().optional(),issuedTime:e.string().datetime().optional(),billingTrigger:e.enum(["accept","issue"]).optional(),preferences:zi.optional(),underwritingStatus:Hi.optional(),validationResult:ft.optional()});No.extend({aggregatedTransactions:e.lazy(()=>No.array().optional())}),e.object({action:e.literal("add"),elements:e.array(un).optional()}),e.object({locator:e.string(),action:e.literal("add"),elements:e.array(un).optional()}),e.object({action:e.literal("delete"),staticElementLocators:e.array(e.string())}),e.object({locator:e.string(),action:e.literal("delete"),staticElementLocators:e.array(e.string())}),e.object({staticLocator:e.string(),action:e.literal("modify"),removeCoverageTerms:e.record(e.string(),e.any()).optional(),removeData:e.record(e.string(),e.any()).optional(),setCoverageTerms:e.record(e.string(),e.string()).optional(),setData:e.record(e.string(),e.any()).optional()}),e.object({staticLocator:e.string(),action:e.literal("modify"),locator:e.string(),removeCoverageTerms:e.record(e.string(),e.any()).optional(),removeData:e.record(e.string(),e.any()).optional(),setCoverageTerms:e.record(e.string(),e.string()).optional(),setData:e.record(e.string(),e.any()).optional()}),e.object({action:e.literal("params"),effectiveTime:e.string().datetime(),billingModeChange:e.boolean().optional(),inheritSettings:e.boolean().optional(),newPolicyEndTime:e.string().datetime().optional(),preferences:e.object({}).optional(),triggerBillingChange:e.boolean().optional()}),e.object({locator:e.string(),action:e.literal("params"),effectiveTime:e.string().datetime(),billingModeChange:e.boolean().optional(),inheritSettings:e.boolean().optional(),newPolicyEndTime:e.string().datetime().optional(),preferences:e.object({}).optional(),triggerBillingChange:e.boolean().optional()});const dh=e.enum(["premium","tax","fee","credit","nonFinancial","surcharge"]),ph=e.union([dh,e.string()]),gh=e.object({locator:e.string(),elementLocator:e.string(),elementStaticLocator:e.string(),amount:e.number(),chargeCategory:ph,chargeType:e.string(),rate:e.number(),reversalOfLocator:e.string().optional(),rateDifference:e.number().optional(),tag:e.string().optional()}),Io=e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:Xr,transactionState:_n,effectiveTime:e.string(),termLocator:e.string().optional(),createdAt:e.string().optional(),createdBy:e.string().uuid().optional(),charges:e.array(gh).optional()});Io.extend({aggregatedTransactions:e.array(Io).optional()});const Bo=e.object({locator:e.string(),policyLocator:e.string(),transactionState:_n,effectiveTime:e.string(),transactionCategory:Xr,underwritingStatus:e.string().optional(),underwritingFlags:Qt.array().optional()});Bo.extend({aggregatedTransactions:e.array(Bo).optional()}),e.object({deleteAllAutomaticDocuments:e.boolean().optional(),resetAllUnderwritingFlags:e.boolean().optional(),resetFlagsAction:e.enum(["clear","delete"]).optional(),deleteDocuments:e.array(e.string()).optional(),resetFlags:e.array(e.string()).optional()}),e.object({transactionLocator:e.string(),clearedFlags:Qt.array().optional(),flags:Qt.array().optional()});const mh=e.enum(["open","settled"]),fh=e.object({locator:e.string(),elementStaticLocator:e.string(),invoiceLocator:e.string(),amount:e.number(),chargeCategory:e.string(),chargeType:e.string(),timezone:e.string(),installmentItemLocators:e.array(e.string()),policyLocator:e.string().optional(),quoteLocator:e.string().optional(),transactionLocator:e.string().optional(),elementType:e.string().optional(),remainingAmount:e.number().optional(),settlementTime:e.string().optional(),transactionLocators:e.array(e.string()).optional()});e.object({locator:e.string(),accountLocator:e.string(),startTime:e.string(),endTime:e.string(),invoiceState:mh,currency:Ur,dueTime:e.string(),generatedTime:e.string(),timezone:e.string(),invoiceItems:fh.array(),totalAmount:e.number().optional(),totalRemainingAmount:e.number().optional(),unsettledTime:e.string().optional(),invoiceNumber:e.string().optional()});const yh=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),hh=e.enum(["policy","invoice"]),bh=e.enum(["preGrace","inGrace","lapseTriggered","settled"]);e.enum(["policy","quote","invoice"]);const vh=e.object({advanceLapseTo:yh,gracePeriodDays:e.number(),lapseTransactionType:e.string(),delinquencyLevel:hh.optional()});e.object({locator:e.string(),delinquencyLocator:e.string(),referenceLocator:e.string(),referenceType:e.enum(["policy","quote","invoice"]),preemptingLapseTransactionLocator:e.string().optional(),transactionLocator:e.string().optional()}),e.object({locator:e.string(),accountLocator:e.string(),delinquencyState:bh,createdAt:e.string(),settings:vh,timezone:e.string(),updatedAt:e.string(),graceEndAt:e.string().optional(),graceStartedAt:e.string().optional(),lapseTransactionEffectiveDate:e.string().optional(),references:e.array(e.object({})).optional()});const Th=e.enum(["invoice","account"]),At=e.object({containerLocator:e.string(),containerType:Th,amount:e.number().optional()}),Ah=e.enum(["ach","cash","eft","standard","wire"]),jh=e.enum(["draft","validated","posted","reversed","discarded"]);e.object({amount:e.number(),type:e.string(),useDefaultFinancialInstrument:e.boolean(),data:e.record(e.any()),targets:At.array(),accountLocator:e.string().optional(),financialInstrumentLocator:e.string().optional(),currency:e.string().optional(),transactionMethod:Ah.optional(),transactionNumber:e.string().optional()}),e.object({locator:e.string(),currency:Ur,paymentState:jh,amount:e.number(),type:e.string(),data:e.record(e.any()).optional(),createdAt:e.string(),createdBy:e.string(),targets:At.array(),shortfallCreditLocators:e.string().array().optional(),accountLocator:e.string().optional(),externalCashTransactionLocator:e.string().optional(),postedAt:e.string().optional(),remainingAmount:e.number().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),validationResult:ft.optional()}),e.object({amount:e.number(),sources:e.array(At),targets:e.array(At),accountLocator:e.string().optional(),currency:e.string().optional()});const _h=e.enum(["draft","validated","executed","reversed","discarded"]);e.object({locator:e.string(),currency:Ur,creditDistributionState:_h,amount:e.number(),createdAt:e.string(),createdBy:e.string(),sources:At.array(),targets:At.array(),shortfallCreditLocators:e.string().array().optional(),accountLocator:e.string().optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),validationResult:ft.optional()}),e.object({reversalType:e.string()});const wh=e.enum(["accountCreditBalance","cash","charge","credit","installmentItem","invoiceItem","quote","policy","transaction","accountExpenseBalance"]),Eh=e.enum(["credit","debit"]),xh=e.object({faTransactionLocator:e.string(),accountingType:Eh,amount:e.number(),faTransactionNote:e.string(),faTransactionTime:e.string()});e.object({referenceLocator:e.string(),currency:Ur,balance:e.number(),referenceType:wh,lineItems:xh.array()});const Mo=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),expiresAt:e.string()}),wn=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),createdAt:e.string(),expiresAt:e.string()}),$h=e.object({id:e.string(),displayName:e.string(),importConfigUrl:e.string(),clientId:e.string(),clientSecret:e.string()}),Ro=e.object({name:e.string(),permissions:e.array(e.string()),description:e.string()}),En=e.object({id:e.string(),displayName:e.string(),singleSignOnServiceUrl:e.string()}),qo=e.object({userName:e.string(),firstName:e.string(),lastName:e.string(),password:e.string(),temporaryPassword:e.boolean(),email:e.string(),tenants:e.array(e.string()),roles:e.array(e.string())}),Fo=e.object({id:e.string(),displayName:e.string(),type:e.string(),acsUrl:e.string(),callbackUrl:e.string(),entityId:e.string(),singleSignOnServiceUrl:e.string()}),Sh=e.object({passwordPolicies:e.record(e.number())}),Uo=e.object({version:e.number(),name:e.string(),addPermissions:e.array(e.string()),removePermissions:e.array(e.string()),description:e.string()}),Zo=e.object({name:e.string(),description:e.string()}),Go=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),Ko=e.object({addTenants:e.array(e.string()),removeTenants:e.array(e.string())}),Ch=e.object({name:e.string(),locator:e.string(),permissions:e.array(e.string()),version:e.number(),createdAt:e.string(),createdBy:e.string(),description:e.string()}),Lh=e.object({locator:e.string(),name:e.string(),type:e.union([e.literal("test"),e.literal("production"),e.literal("retired"),e.literal("deleted")]),description:e.string(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string()});e.union([e.literal("test"),e.literal("production"),e.literal("retired"),e.literal("deleted")]);const xn=e.object({locator:e.string(),userName:e.string(),firstName:e.string(),lastName:e.string(),email:e.string(),roles:e.array(e.string()),tenants:e.array(e.string()),permissions:e.array(e.string())}),zo=e.object({userLocator:e.string(),tenantLocator:e.string(),maskType:e.union([e.literal("account"),e.literal("policy")]),fields:e.record(e.array(e.string()))});e.union([e.literal("account"),e.literal("policy")]);const kh=e.object({tenantLocator:e.string(),type:e.union([e.literal("account"),e.literal("policy")]),fields:e.record(e.array(e.string()))});e.union([e.literal("account"),e.literal("policy")]),e.object({requestBody:Sh}),e.unknown(),e.object({requestBody:qo}),e.array(wn),e.object({requestBody:Mo}),e.string(),e.object({requestBody:Ro}),e.object({requestBody:En}),e.object({requestBody:En}),e.object({requestBody:$h}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:xn}),e.object({locator:e.string(),requestBody:Ko}),e.object({locator:e.string(),requestBody:Go}),e.object({locator:e.string(),requestBody:e.string()}),e.unknown(),e.object({locator:e.string()}),e.array(zo),e.object({locator:e.string(),requestBody:kh}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Zo}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:Uo}),e.object({locator:e.string()}),e.array(e.string()),e.object({locator:e.string(),tenantLocator:e.string()}),e.array(zo),e.object({locator:e.string(),tenantLocator:e.string()}),e.unknown(),e.object({locator:e.string(),tenantLocator:e.string(),type:e.union([e.literal("account"),e.literal("policy")])}),e.object({username:e.string()}),e.array(xn),e.object({locator:e.string()}),e.array(wn),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),type:e.array(e.string()).optional()}),e.record(e.unknown()),e.array(e.string()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.array(Fo),e.object({name:e.string()}),e.object({name:e.string()}),e.unknown(),e.object({tokenOrName:e.string()}),e.unknown(),e.object({locator:e.string(),tokenOrName:e.string()}),e.unknown(),En.merge(e.object({})),Fo.merge(e.object({})),Ro.merge(e.object({}));const Ph=Ch.merge(e.object({locator:$,createdAt:_,createdBy:F}));Uo.merge(e.object({})),Ie(Ph),Go.merge(e.object({})),Ko.merge(e.object({}));const Dh=e.enum(["test","production","retired","deleted"]),Oh=Lh.merge(e.object({locator:Yr,type:Dh,createdAt:_,updatedAt:_,createdBy:F,description:e.string().optional()}));e.object({listCompleted:e.boolean(),items:e.array(Oh)});const Nh=e.enum(["queued","failed"]),Ih=Wi.merge(e.object({status:Nh})),Bh=rn.merge(e.object({version1:$,version2:$,latestVersion:$,plugins:e.record(e.string(),_e)})),Mh=an.merge(e.object({metadata:Bh}));tf.merge(e.object({locator:Yr,bootstrapResult:Ih,deploymentResult:Mh})),Zo.merge(e.object({})),Mo.merge(e.object({expiresAt:_})),wn.merge(e.object({createdAt:_})),qo.merge(e.object({userName:e.string().email(),roles:e.array(e.string()).optional(),tenants:e.array(e.string()).optional()})),xn.merge(e.object({locator:F,tenants:e.array(e.string()).optional(),permissions:e.array(e.string()).optional()}));const Rh=e.object({locator:F,userName:e.string(),firstName:e.string().optional(),lastName:e.string().optional()});e.object({listCompleted:e.boolean(),items:e.array(Rh)}),e.object({firstName:e.string(),lastName:e.string(),permissions:e.array(e.string()),roles:e.array(e.string()),tenants:e.array(e.string())});const qh=e.object({locator:e.string(),referenceLocator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),referenceDocumentLocator:e.string().optional(),transactionLocator:e.string().optional(),segmentLocator:e.string().optional(),termLocator:e.string().optional(),policyLocator:e.string().optional(),name:e.string().optional(),staticName:e.string().optional(),documentInstanceState:e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),documentFormat:e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]).optional(),metadata:e.record(e.record(e.unknown())),createdAt:e.string(),createdBy:e.string().optional(),readyAt:e.string().optional(),renderingData:e.record(e.record(e.unknown())),processingErrors:e.string().optional(),external:e.boolean(),category:e.string().optional()});e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),e.union([e.literal("draft"),e.literal("dataReady"),e.literal("ready"),e.literal("dataError"),e.literal("renderError"),e.literal("conversionError")]),e.union([e.literal("text"),e.literal("html"),e.literal("pdf"),e.literal("jpg"),e.literal("jpeg"),e.literal("doc"),e.literal("docx"),e.literal("xls"),e.literal("xlsx"),e.literal("csv"),e.literal("txt"),e.literal("zip")]);const Fh=e.object({locator:e.string(),staticName:e.string(),name:e.string(),documentInstanceState:e.string(),processingErrors:e.string(),state:e.string()});e.object({locator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),referenceLocator:e.string(),documentTrigger:e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),status:e.union([e.literal("running"),e.literal("finished"),e.literal("failed")]),childrenJobs:e.array(e.string()),documents:e.array(Fh),processingErrors:e.string(),createdAt:e.string(),createdBy:e.string(),completedAt:e.string()}),e.union([e.literal("validated"),e.literal("priced"),e.literal("accepted"),e.literal("issued"),e.literal("underwritten"),e.literal("generated")]),e.union([e.literal("running"),e.literal("finished"),e.literal("failed")]),e.object({locator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("invoice"),e.literal("transaction"),e.literal("segment"),e.literal("term")]),status:e.union([e.literal("running"),e.literal("finished"),e.literal("failed")])}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({documentEvents:e.union([e.literal("readyEvent"),e.literal("failedEvent")]).optional()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string(),locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string(),locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string(),locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({jobLocator:e.string(),locator:e.string()});const Uh=qh.merge(e.object({locator:Qr,referenceLocator:Qr,referenceType:ro,referenceDocumentLocator:Qr.optional(),transactionLocator:we.optional(),segmentLocator:bn.optional(),termLocator:_o.optional(),policyLocator:vt.optional(),documentInstanceState:hf,documentFormat:sn.optional(),metadata:q.optional(),createdAt:_,createdBy:F,readyAt:_.optional(),renderingData:q.optional()}));Ie(Uh),e.object({tenantLocator:bt});const Zh=e.object({category:e.string().optional(),documentFormat:sn,metadata:e.string().optional(),name:e.string(),referenceLocator:Qr,referenceType:ro,segmentLocator:bn.optional(),staticName:e.string().optional(),transactionLocator:we.optional()}),Gh=e.object({name:e.string(),filename:e.string(),size:e.number().nonnegative().int(),buffer:e.instanceof(Buffer)}),Kh=e.object({mimetype:e.enum([je.text,je.textHtml,je.textCsv,je.imageJpg,je.applicationPdf,je.applicationZip,je.applicationZipWindows,je.applicationOctetStream])}).merge(Gh);e.object({document:Kh}),e.object({tenantLocator:bt}).merge(Zh);const zh=e.object({name:e.string(),type:e.string(),searchable:e.boolean().optional()}),Vh=e.object({entityName:e.string(),entityType:e.string(),defaultSearchable:e.boolean().optional(),fields:e.array(zh),contents:e.array(e.string())}),Hh=e.object({defaultSearchable:e.boolean().optional(),objects:e.array(Vh)}),Vo=e.object({searchTerm:e.string(),fieldName:e.string(),match:e.union([e.literal("fuzzy"),e.literal("exact"),e.literal("startsWith")]),absolute:e.union([e.literal("none"),e.literal("required"),e.literal("excluded")])});e.union([e.literal("unspecified"),e.literal("account"),e.literal("quote"),e.literal("policy"),e.literal("fnol"),e.literal("contact")]);const Ho=e.object({score:e.number(),searchEntityType:e.union([e.literal("unspecified"),e.literal("account"),e.literal("quote"),e.literal("policy"),e.literal("fnol"),e.literal("contact")]),searchEntityLocator:e.string(),productName:e.string(),accountLocator:e.string(),searchSummary:e.record(e.record(e.unknown())),highlights:e.array(e.string())});e.object({searchToken:e.string(),offset:e.number(),count:e.number(),results:e.array(Ho)}),e.union([e.literal("fuzzy"),e.literal("exact"),e.literal("startsWith")]),e.union([e.literal("none"),e.literal("required"),e.literal("excluded")]),e.object({count:e.number().optional(),offset:e.number().optional(),searchToken:e.string()});const Wh=e.object({searchString:e.string(),searchEntityType:e.union([e.literal("unspecified"),e.literal("account"),e.literal("quote"),e.literal("policy"),e.literal("fnol"),e.literal("contact")]),searchTerms:e.array(Vo)});e.object({deploymentVersion:e.string(),searchConfiguration:Hh}),e.object({count:e.number().optional(),offset:e.number().optional(),requestBody:Wh});const Yh=e.string().uuid();e.object({tenantLocator:Yh});const Qh=e.object({offset:e.string().optional(),count:e.string().optional()});e.object({searchToken:e.string()}).merge(Qh);const Xh=e.object({fieldName:e.string().optional(),absolute:pf.optional(),match:vf.optional(),searchTerm:e.string().optional()}).merge(Vo);e.object({searchEntityType:ao.optional(),searchString:e.string().optional(),searchTerms:e.array(Xh).optional()});const Jh=Ho.merge(e.object({accountLocator:e.string().optional(),searchEntityLocator:e.string().ulid(),productName:e.string().optional(),score:e.number(),searchEntityType:ao,highlights:e.array(e.string()),searchSummary:e.record(e.string(),e.unknown()).optional()}));e.object({count:e.number().int(),offset:e.number().int(),searchToken:e.string().optional(),results:e.array(Jh)});const Wo=Vr.merge(e.object({locator:$,reversalOfLocator:$.optional(),elementLocator:Ne,elementStaticLocator:$,chargeCategory:ff})),Jr=rr.merge(e.object({locator:$,action:mf})),eb=Jr.merge(e.object({elements:e.array(Tn)})),tb=Jr.merge(e.object({staticLocator:$,setData:q,removeData:q,setCoverageTerms:_e,removeCoverageTerms:q})),Yo=Jr.merge(e.object({effectiveTime:_,newPolicyEndTime:_.optional(),preferences:Tt.optional(),triggerBillingChange:e.boolean().optional(),billingModeChange:e.boolean().optional()})),rb=Jr.merge(e.object({staticElementLocators:e.array($)})),ea=e.union([eb,tb,Yo,rb]),Qo=e.object({locator:we,policyLocator:vt,termLocator:_o,effectiveTime:_,transactionState:on,transactionCategory:nn,transactionType:e.string(),createdAt:_,createdBy:F,aggregateTransactionLocator:we.optional(),baseTransactionLocator:we.optional(),issuedTime:_.optional(),acceptedTime:_.optional(),preferences:Tt.optional(),underwritingStatus:e.string().optional(),validationResult:vn.optional(),changeInstructions:e.array(ea).optional(),billingTrigger:Xt}),ab=Qo.merge(e.object({aggregatedTransactions:e.array(Qo)}));Ie(ab),e.array(ea),e.array(ea),e.array(ea);const nb=Yo.omit({locator:!0});e.array(nb),go.merge(e.object({toTransaction:we,reverseTransactions:e.array(we),baseLocator:we}));const ib=e.object({locator:$,policyLocator:vt,effectiveTime:_,transactionState:on,charges:e.array(Wo)}),ob=ib.extend({aggregatedTransactions:e.lazy(()=>ob.array().optional())}),jt=Ve.merge(e.object({locator:$,referenceLocator:$,referenceType:Af,level:no,createdBy:F,createdTime:_,clearedBy:F,clearedTime:_,elementLocator:Ne.optional()})),sb=e.object({locator:$,policyLocator:vt,transactionCategory:nn,transactionState:on,effectiveTime:_,underwritingStatus:e.string(),underwritingFlags:e.array(jt)}),lb=sb.extend({aggregatedTransactions:e.lazy(()=>lb.array().optional())}),cb=yo.merge(e.object({elementLocator:Ne,level:no}));yn.merge(e.object({addFlags:e.array(cb),clearFlags:e.array($)})),By.merge(e.object({transactionLocator:we,clearedFlags:e.array(jt),flags:e.array(jt)}));const ub=vo.merge(e.object({locator:ur,quickQuoteLocator:ur,quoteState:ln,billingLevel:yt,billingTrigger:Xt.optional(),durationBasis:Jt.optional(),policyLocator:vt,preferences:Tt.optional(),validationResult:vn.optional(),static:q,issuedTime:_.optional(),startTime:_.optional(),endTime:_.optional(),acceptedTime:_.optional(),expirationTime:_.optional()}));Ie(ub),mo.merge(e.object({accountLocator:cr,data:q,startTime:_.optional(),endTime:_.optional(),expirationTime:_.optional(),durationBasis:Jt.optional(),billingLevel:yt.optional(),preferences:Tt.optional(),static:q.optional(),coverageTerms:_e.optional(),billingTrigger:Xt.optional(),elements:e.array(Tn)})),po.merge(e.object({startTime:_,endTime:_,expirationTime:_,billingTrigger:Xt,billingLevel:yt,preferences:Tt,removeCoverageTerms:q,removeData:q,setCoverageTerms:_e,setData:q,elements:e.array(Xy)})),ky.merge(e.object({tenantLocator:bt,accountLocator:cr,quoteLocator:ur,quoteState:ln,startTime:_,endTime:_,expirationTime:_,durationBasis:Jt,items:e.array(Wo)})),Py.merge(e.object({tenantLocator:bt,accountLocator:cr,quoteLocator:ur,quoteState:ln,startTime:_,endTime:_,expirationTime:_,durationBasis:Jt,underwritingFlags:e.array(jt)})),Zy.merge(e.object({quoteLocator:ur,flags:e.array(jt),clearedFlags:e.array(jt).optional()})),ir.merge(e.object({groupLocator:$})),fn.merge(e.object({resetFlagsAction:_f,resetFlags:e.array($),deleteDocuments:e.array($)}));const db=e.object({amount:e.number(),accountingType:e.union([e.literal("credit"),e.literal("debit")]),referenceType:e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]),referenceLocator:e.string()});e.union([e.literal("credit"),e.literal("debit")]),e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]);const pb=e.object({billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])});e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const gb=e.object({name:e.string(),offsetDays:e.number(),offsetBasis:e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")])});e.union([e.literal("delinquencyCreation"),e.literal("gracePeriodStart"),e.literal("gracePeriodEnd")]);const W=e.object({containerLocator:e.string(),containerType:e.union([e.literal("invoice"),e.literal("account"),e.literal("subpayment")]),amount:e.number().optional()}),$n=e.object({creditLocator:e.string()}),mb=e.object({"billing.creditdistribution.reverse":$n.optional(),"billing.creditdistribution.create":$n.optional(),"billing.creditdistribution.distribute":$n.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("executed"),e.literal("reversed"),e.literal("discarded")]),e.union([e.literal("invoice"),e.literal("account"),e.literal("subpayment")]);const fb=e.object({lapseTransactionType:e.string(),gracePeriodDays:e.number(),advanceLapseTo:e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]),delinquencyLevel:e.union([e.literal("policy"),e.literal("invoice")]).optional()}),yb=e.object({locator:e.string(),delinquencyLocator:e.string(),referenceLocator:e.string(),referenceType:e.union([e.literal("policy"),e.literal("quote"),e.literal("invoice")]),transactionLocator:e.string().optional(),preemptingLapseTransactionLocator:e.string().optional()});e.union([e.literal("preGrace"),e.literal("inGrace"),e.literal("lapseTriggered"),e.literal("settled")]);const hb=e.object({locator:e.string(),delinquencyLocator:e.string(),delinquencyEventState:e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]),triggerTime:e.string(),triggeredAt:e.string().optional(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string(),updatedBy:e.string(),name:e.string()});e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]);const Sn=e.object({delinquencyLocator:e.string()}),bb=e.object({locator:e.string(),delinquencyLocator:e.string(),delinquencyEventLocator:e.string(),triggerTime:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),createdAt:e.string(),updatedAt:e.string(),cancelled:e.boolean().optional(),cancellationType:e.union([e.literal("cancellationRequested"),e.literal("rescheduled"),e.literal("tenantRetired"),e.literal("delinquencySettled"),e.literal("delinquencyHeld")]).optional(),updatedDelinquencyEventLocators:e.array(e.string()),processingErrors:e.string().optional(),rescheduledByLocator:e.string().optional()});e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),e.union([e.literal("cancellationRequested"),e.literal("rescheduled"),e.literal("tenantRetired"),e.literal("delinquencySettled"),e.literal("delinquencyHeld")]);const vb=e.object({"billing.delinquency.create":Sn.optional(),"billing.delinquency.settle":Sn.optional(),"billing.delinquency.lapse":Sn.optional()});e.object({accountLocator:e.string(),delinquencyLocator:e.string(),listCompleted:e.boolean(),items:e.array(hb)}),e.union([e.literal("policy"),e.literal("quote"),e.literal("invoice")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("priced"),e.literal("underwritten"),e.literal("accepted"),e.literal("issued")]),e.union([e.literal("policy"),e.literal("invoice")]);const ta=e.object({accountLocator:e.string().optional(),type:e.string(),amount:e.number(),data:e.record(e.record(e.unknown())),sources:e.array(W),useDefaultFinancialInstrument:e.boolean(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional(),currency:e.string().optional()});e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]);const dr=e.object({disbursementLocator:e.string()}),Tb=e.object({"billing.disbursement.create":dr.optional(),"billing.disbursement.reject":dr.optional(),"billing.disbursement.execute":dr.optional(),"billing.disbursement.reverse":dr.optional(),"billing.disbursement.approve":dr.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("approved"),e.literal("executed"),e.literal("reversed"),e.literal("rejected"),e.literal("discarded")]);const Ab=e.object({accountLocator:e.string(),installmentsToBeInvoiced:e.array(e.string()),invoiceDueTime:e.string().optional(),timezone:e.string().optional()}),jb=e.object({locator:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),createdAt:e.string(),completedAt:e.string().optional(),processingErrors:e.string().optional(),invoiceLocators:e.array(e.string()),earlyInvoicingGenerationData:Ab}),_b=e.object({accountLocator:e.string().optional(),invoiceThroughTime:e.string().optional(),installmentLocators:e.array(e.string()),invoiceDueTime:e.string().optional(),timezone:e.string().optional(),ignoreHolds:e.boolean()});e.object({jobLocator:e.string()});const wb=e.object({entityLocator:e.string(),type:e.union([e.literal("invoice"),e.literal("installment")])});e.union([e.literal("invoice"),e.literal("installment")]);const Eb=e.object({calculationType:e.union([e.literal("none"),e.literal("pastDueInvoices"),e.literal("allInvoices"),e.literal("invoicesAndUnbilledInstallments")]),entitiesUsedInCalculation:e.array(wb),currency:e.string(),amountToExclude:e.number()});e.union([e.literal("none"),e.literal("pastDueInvoices"),e.literal("allInvoices"),e.literal("invoicesAndUnbilledInstallments")]),e.object({locator:e.string(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]),transactionNumber:e.string().optional()}),e.object({locator:e.string(),externalIdentifier:e.string().optional(),institutionName:e.string().optional(),instrumentType:e.union([e.literal("checking"),e.literal("savings"),e.literal("creditCard"),e.literal("debitCard")]).optional(),defaultTransactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),externalAccountNumber:e.string().optional(),accountLocator:e.string().optional(),nickname:e.string().optional(),expirationTime:e.string().optional(),isDefault:e.boolean()}),e.union([e.literal("checking"),e.literal("savings"),e.literal("creditCard"),e.literal("debitCard")]),e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]);const Xo=e.object({externalIdentifier:e.string().optional(),institutionName:e.string().optional(),instrumentType:e.union([e.literal("checking"),e.literal("savings"),e.literal("creditCard"),e.literal("debitCard")]).optional(),defaultTransactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),externalAccountNumber:e.string().optional(),accountLocator:e.string().optional(),nickname:e.string().optional(),expirationTime:e.string().optional()});e.union([e.literal("invoicing"),e.literal("delinquency")]),e.union([e.literal("draft"),e.literal("validated"),e.literal("active"),e.literal("discarded"),e.literal("released")]);const xb=e.object({accountLocator:e.string(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")])}),$b=e.object({accountLocator:e.string().optional(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")]).optional()}),Sb=e.object({installmentLatticeLocator:e.string()}),Cb=e.object({installmentItemLocator:e.string(),installmentLocator:e.string(),elementLocator:e.string(),transactionLocator:e.string().optional(),transactionType:e.string().optional(),transactionCategory:e.string().optional(),transactionEffectiveTime:e.string().optional(),amount:e.number()}),Lb=e.object({installmentStartTime:e.string(),installmentEndTime:e.string(),coverageStartTime:e.string(),coverageEndTime:e.string(),normalizedWeight:e.number(),coverageDuration:e.number(),generateTime:e.string(),dueTime:e.string(),installmentDuration:e.number()}),kb=e.object({cadence:e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),anchorMode:e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),generateLeadDays:e.number(),dueLeadDays:e.number(),installmentWeights:e.array(e.number()),maxInstallmentsPerTerm:e.number().optional(),anchorType:e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]).optional(),dayOfMonth:e.number().optional(),dayOfWeek:e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]).optional(),weekOfMonth:e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]).optional(),anchorTime:e.string().optional()});e.union([e.literal("none"),e.literal("fullPay"),e.literal("weekly"),e.literal("everyOtherWeek"),e.literal("monthly"),e.literal("quarterly"),e.literal("semiannually"),e.literal("annually"),e.literal("thirtyDays"),e.literal("everyNDays")]),e.union([e.literal("generateDay"),e.literal("termStartDay"),e.literal("dueDay")]),e.union([e.literal("none"),e.literal("dayOfMonth"),e.literal("anchorTime"),e.literal("dayOfWeek"),e.literal("weekOfMonth")]),e.union([e.literal("monday"),e.literal("tuesday"),e.literal("wednesday"),e.literal("thursday"),e.literal("friday"),e.literal("saturday"),e.literal("sunday")]),e.union([e.literal("none"),e.literal("first"),e.literal("second"),e.literal("third"),e.literal("fourth"),e.literal("fifth")]);const Pb=e.object({locator:e.string(),chargeType:e.string(),chargeCategory:e.string(),amount:e.number(),remainingAmount:e.number().optional(),settlementTime:e.string().optional(),invoiceLocator:e.string(),installmentItemLocators:e.array(e.string()),timezone:e.string(),quoteLocator:e.string().optional(),policyLocator:e.string().optional(),transactionLocator:e.string().optional(),elementStaticLocator:e.string(),elementType:e.string().optional(),transactionLocators:e.array(e.string())});e.union([e.literal("open"),e.literal("settled")]);const Db=e.object({invoiceLocator:e.string(),accountLocator:e.string(),generateTime:e.string()}),Jo=e.object({invoiceLocator:e.string(),accountLocator:e.string()}),Ob=e.object({locator:e.string(),invoiceGenerationJobLocator:e.string(),generateTime:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),createdAt:e.string(),createdBy:e.string(),completedAt:e.string(),invoiceLocator:e.string(),processingErrors:e.string()}),es=e.object({locator:e.string(),invoiceGenerationScheduleLocator:e.string(),jobStatus:e.union([e.literal("finished"),e.literal("failed"),e.literal("running")]),generateTime:e.string(),createdAt:e.string(),createdBy:e.string(),completedAt:e.string(),processingErrors:e.string(),invoiceGenerationInstances:e.array(Ob)}),Nb=e.object({chargeType:e.string(),chargeCategory:e.string(),amount:e.number(),quoteLocator:e.string().optional(),policyLocator:e.string().optional(),elementType:e.string(),elementStaticLocator:e.string(),transactionLocators:e.array(e.string())}),Ib=e.object({invoiceItemLocator:e.string(),elementType:e.string(),elementStaticLocator:e.string(),chargeType:e.string(),chargeCategory:e.string(),amount:e.number(),remainingAmount:e.number(),settlementTime:e.string().optional(),installmentItemSummaries:e.array(Cb)}),ts=e.object({generateTime:e.string(),dueTime:e.string(),startTime:e.string(),endTime:e.string(),invoiceItems:e.array(Nb),totalAmount:e.number()}),Bb=e.object({amount:e.number(),faTransactionLocator:e.string(),faTransactionTime:e.string(),faTransactionNote:e.string(),accountingType:e.union([e.literal("credit"),e.literal("debit")])});e.object({listCompleted:e.boolean(),items:e.array(bb)}),e.object({listCompleted:e.boolean(),items:e.array(jb)});const Mb=e.object({accountLocator:e.string().optional(),amount:e.number().optional(),addSources:e.array(W),removeSources:e.array(e.string()),addTargets:e.array(W),removeTargets:e.array(e.string()),currency:e.string().optional()}),Rb=e.object({graceEndAt:e.string().optional()}),qb=e.object({triggerTime:e.string().optional(),delinquencyEventState:e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]).optional()}),rs=e.object({accountLocator:e.string().optional(),type:e.string().optional(),amount:e.number().optional(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),addSources:e.array(W),removeSources:e.array(e.string()),useDefaultFinancialInstrument:e.boolean().optional(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional(),currency:e.string().optional()}),Fb=e.object({accountLocator:e.string().optional(),type:e.string().optional(),amount:e.number().optional(),setData:e.record(e.record(e.unknown())),removeData:e.record(e.record(e.unknown())),addTargets:e.array(W),removeTargets:e.array(e.string()),useDefaultFinancialInstrument:e.boolean().optional(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional(),currency:e.string().optional()}),as=e.object({accountLocator:e.string().optional(),type:e.string(),amount:e.number(),currency:e.string().optional(),data:e.record(e.record(e.unknown())),targets:e.array(W),useDefaultFinancialInstrument:e.boolean(),financialInstrumentLocator:e.string().optional(),transactionMethod:e.union([e.literal("ach"),e.literal("cash"),e.literal("eft"),e.literal("standard"),e.literal("wire")]).optional(),transactionNumber:e.string().optional()}),ra=e.object({paymentLocator:e.string()}),Ub=e.object({"billing.payment.post":ra.optional(),"billing.payment.reverse":ra.optional(),"billing.payment.distribute":ra.optional(),"billing.payment.create":ra.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("posted"),e.literal("reversed"),e.literal("discarded")]);const Zb=e.object({policyLocator:e.string().optional(),quoteLocator:e.string().optional(),productName:e.string(),invoiceItemSummaries:e.array(Ib)}),ns=e.object({reversalType:e.string()});e.object({locator:e.string(),installmentSettings:kb,billingSettings:pb});const Cn=e.object({shortfallCreditLocator:e.string()});e.object({locator:e.string(),creditType:e.union([e.literal("creditDistribution"),e.literal("disbursement"),e.literal("payment"),e.literal("subPayment"),e.literal("refund"),e.literal("shortfallWriteOff"),e.literal("writeOff")]),shortfallCreditState:e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),currency:e.string(),amount:e.number(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string(),targets:e.array(W),parentCreditLocator:e.string(),reversalReason:e.string().optional()}),e.union([e.literal("creditDistribution"),e.literal("disbursement"),e.literal("payment"),e.literal("subPayment"),e.literal("refund"),e.literal("shortfallWriteOff"),e.literal("writeOff")]),e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),e.object({balance:e.number(),currency:e.string()});const Gb=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),pr=e.object({validationItems:e.array(Gb),success:e.boolean()}),Ln=e.object({writeOffLocator:e.string()}),Kb=e.object({"billing.writeoff.reverse":Ln.optional(),"billing.writeoff.create":Ln.optional(),"billing.writeoff.distribute":Ln.optional()});e.object({locator:e.string(),creditType:e.union([e.literal("creditDistribution"),e.literal("disbursement"),e.literal("payment"),e.literal("subPayment"),e.literal("refund"),e.literal("shortfallWriteOff"),e.literal("writeOff")]),writeOffState:e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),currency:e.string(),amount:e.number(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string(),targets:e.array(W),reversalReason:e.string().optional()}),e.union([e.literal("draft"),e.literal("distributed"),e.literal("reversed")]),e.object({locator:e.string()}),e.object({locator:e.string(),paymentState:e.union([e.literal("draft"),e.literal("validated"),e.literal("posted"),e.literal("reversed"),e.literal("discarded")]),type:e.string(),currency:e.string(),amount:e.number(),remainingAmount:e.number().optional(),data:e.record(e.record(e.unknown())),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string().optional(),targets:e.array(W),externalCashTransactionLocator:e.string().optional(),validationResult:pr.optional(),postedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),shortfallCreditLocators:e.array(e.string()).nullable()}),e.object({locator:e.string(),requestBody:as}),e.object({locator:e.string(),requestBody:Fb}),e.object({locator:e.string()});const is=e.object({locator:e.string(),disbursementState:e.union([e.literal("draft"),e.literal("validated"),e.literal("approved"),e.literal("executed"),e.literal("reversed"),e.literal("rejected"),e.literal("discarded")]),type:e.string(),currency:e.string(),amount:e.number(),data:e.record(e.record(e.unknown())),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string().optional(),sources:e.array(W),externalCashTransactionLocator:e.string().optional(),validationResult:pr.optional(),disbursementNumber:e.string().optional()});e.object({locator:e.string(),requestBody:ta}),e.object({locator:e.string(),requestBody:rs}),e.object({locator:e.string()}),e.object({locator:e.string(),creditDistributionState:e.union([e.literal("draft"),e.literal("validated"),e.literal("executed"),e.literal("reversed"),e.literal("discarded")]),currency:e.string(),amount:e.number(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string().optional(),sources:e.array(W),targets:e.array(W),validationResult:pr.optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),shortfallCreditLocators:e.array(e.string())});const os=e.object({accountLocator:e.string().optional(),amount:e.number(),currency:e.string().optional(),sources:e.array(W),targets:e.array(W)});e.object({locator:e.string(),requestBody:Mb}),e.object({requestBody:as}),e.object({invoiceNumber:e.string(),locator:e.string()});const zb=e.object({locator:e.string(),accountLocator:e.string(),invoiceState:e.union([e.literal("open"),e.literal("settled")]),invoiceItems:e.array(Pb),generatedTime:e.string(),dueTime:e.string(),currency:e.string(),startTime:e.string(),endTime:e.string(),unsettledTime:e.string().optional(),timezone:e.string(),invoiceNumber:e.string().optional(),totalAmount:e.number().optional(),totalRemainingAmount:e.number().optional()});e.object({locator:e.string()}),e.object({locator:e.string()}),e.boolean(),e.object({locator:e.string()}),e.boolean(),e.object({requestBody:_b}),e.object({requestBody:xb}),e.object({locator:e.string(),accountLocator:e.string(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")]),holdState:e.union([e.literal("draft"),e.literal("validated"),e.literal("active"),e.literal("discarded"),e.literal("released")]),createdAt:e.string(),updatedAt:e.string(),validationResult:pr.optional()}),e.object({requestBody:Xo}),e.object({locator:e.string(),value:e.boolean().optional()}),e.object({requestBody:ta}),e.object({disbursementNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({requestBody:os}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ns}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:$b}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Xo}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),accountLocator:e.string(),delinquencyState:e.union([e.literal("preGrace"),e.literal("inGrace"),e.literal("lapseTriggered"),e.literal("settled")]),createdAt:e.string(),updatedAt:e.string(),settings:fb,timezone:e.string(),references:e.array(yb),graceStartedAt:e.string().optional(),graceEndAt:e.string().optional(),lapseTransactionEffectiveDate:e.string().optional(),configuredDelinquencyEvents:e.array(gb)}),e.object({locator:e.string(),requestBody:Rb}),e.object({delinquencyEventLocator:e.string()}),e.object({delinquencyEventLocator:e.string(),requestBody:qb}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ns}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({currency:e.string().optional(),locator:e.string()}),e.object({locator:e.string()}),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(es),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(es),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({jobLocator:e.string()}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),delinquencyLocator:e.string(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),delinquencyLocator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),invoiceLocator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeReversed:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({invoiceLocator:e.string(),accountLocator:e.string(),invoiceState:e.union([e.literal("open"),e.literal("settled")]),startTime:e.string(),endTime:e.string(),generatedTime:e.string(),dueTime:e.string(),currency:e.string(),timezone:e.string(),totalAmount:e.number(),totalRemainingAmount:e.number(),policyInvoiceSummaries:e.array(Zb),invoiceNumber:e.string().optional()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeReversed:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeReversed:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({includeZeroAmountInvoices:e.boolean().optional(),locator:e.string()}),e.array(ts),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeZeroAmountInvoices:e.boolean().optional(),offset:e.number().optional(),quoteLocator:e.string()}),e.record(e.unknown()),e.object({includeZeroAmountInvoices:e.boolean().optional(),locator:e.string()}),e.array(ts),e.object({count:e.number().optional(),extended:e.boolean().optional(),includeZeroAmountInvoices:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({invoiceNumber:e.string()}),e.array(zb),e.object({accountLocator:e.string(),count:e.number().optional(),extended:e.boolean().optional(),includeZeroAmountInvoices:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),transactionLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),quoteLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({quoteLocator:e.string()}),e.object({locator:e.string(),settingsLocator:e.string().optional(),createdAt:e.string(),createdBy:e.string(),accountLocator:e.string(),termStartTime:e.string(),termEndTime:e.string(),termLocator:e.string().optional(),quoteLocator:e.string().optional(),policyLocator:e.string().optional(),currency:e.string(),timezone:e.string(),basedOnLocator:e.string().optional(),effectiveTime:e.string(),frames:e.array(Lb),reversalLattice:e.boolean()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({accountLocator:e.string(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("active"),e.literal("discarded"),e.literal("released")]).optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()});const Vb=e.object({"billing.installmentlattice.create":Sb.optional()}),Hb=e.object({"billing.invoice.generate":Db.optional(),"billing.invoice.settle":Jo.optional(),"billing.invoice.unsettle":Jo.optional()}),Wb=e.object({"billing.shortfallcredit.reverse":Cn.optional(),"billing.shortfallcredit.distribute":Cn.optional(),"billing.shortfallcredit.create":Cn.optional()});e.object({disbursementNumber:e.string()}),e.array(is),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),delinquencyLocator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),quoteLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional(),policyLocator:e.string()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),invoiceLocator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({count:e.number().optional(),extended:e.boolean().optional(),locator:e.string(),offset:e.number().optional()}),e.record(e.unknown()),e.object({accountLocator:e.string().optional(),count:e.number().optional(),extended:e.boolean().optional(),offset:e.number().optional()}),e.record(e.unknown()),e.object({currency:e.string().optional(),refLocator:e.string(),refType:e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]),size:e.number().optional()}),e.object({referenceLocator:e.string(),referenceType:e.union([e.literal("accountCreditBalance"),e.literal("cash"),e.literal("charge"),e.literal("credit"),e.literal("installmentItem"),e.literal("invoiceItem"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("accountExpenseBalance")]),balance:e.number(),currency:e.string(),lineItems:e.array(Bb)}),e.object({currency:e.string().optional()}),e.object({accountLocator:e.string(),currency:e.string().optional(),size:e.number().optional()}),e.object({count:e.number().optional(),currency:e.string().optional(),extended:e.boolean().optional(),offset:e.number().optional(),size:e.number().optional()}),e.record(e.unknown()),e.object({locator:e.string()}),e.object({faTransactionLocator:e.string(),faTransactionTime:e.string(),faTransactionNote:e.string(),currency:e.string(),accountLines:e.array(db)});const Yb=e.object({disbursementLocator:e.string(),disbursementState:e.union([e.literal("draft"),e.literal("validated"),e.literal("approved"),e.literal("executed"),e.literal("reversed"),e.literal("rejected"),e.literal("discarded")]),disbursedAmount:e.number(),validationResult:pr.optional()});e.object({locator:e.string(),requestBody:os}),e.object({accountLocator:e.string(),currency:e.string(),accountCreditBalance:e.number(),excludedDebitsAmountResult:Eb,thresholdUsed:e.number().optional(),createDisbursementResult:Yb.optional(),errors:e.array(e.string())}),e.object({creditDistributionEvents:mb.optional(),delinquencyEvents:vb.optional(),disbursementEvents:Tb.optional(),installmentEvents:Vb.optional(),invoiceEvents:Hb.optional(),paymentEvents:Ub.optional(),shortfallCreditEvents:Wb.optional(),writeOffEvents:Kb.optional()});const aa=W.merge(e.object({containerType:Ef})),Qb=is.merge(e.object({locator:Vy,disbursementState:wf,data:q,createdAt:_,createdBy:F,sources:e.array(aa),accountLocator:cr.optional(),validationResult:vn.optional()}));Ie(Qb),ta.merge(e.object({data:q,sources:e.array(aa),accountLocator:$.optional(),transactionMethod:cn.optional()})),rs.merge(e.object({setData:q,removeData:q,addSources:e.array(aa),removeSources:e.array(e.string()),accountLocator:cr.optional(),transactionMethod:cn})),ta.merge(e.object({data:q,sources:e.array(aa),transactionMethod:cn}));const gr=e.object({referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]),referenceLocator:e.string()});e.union([e.literal("active"),e.literal("pastDeadline"),e.literal("completed"),e.literal("cancelled")]);const ss=e.object({type:e.string(),deadlineTime:e.string().optional(),references:e.array(gr),underwritingFlagLocators:e.array(e.string()),assignedTo:e.string().optional()});e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]);const ls=e.object({deadlineTime:e.string().optional(),addReferences:e.array(gr),removeReferences:e.array(gr),addUnderwritingFlags:e.array(e.string()),removeUnderwritingFlags:e.array(e.string())}),cs=e.object({locator:e.string(),userLocator:e.string(),assignmentRole:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]),referenceLocator:e.string(),assignmentState:e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]),createdBy:e.string(),createdAt:e.string(),updatedBy:e.string().optional(),updatedAt:e.string().optional()});e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]);const us=e.object({userLocator:e.string(),assignmentRole:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")]),referenceLocator:e.string()}),ds=e.object({locator:e.string(),category:e.string(),type:e.string(),activityState:e.union([e.literal("active"),e.literal("pastDeadline"),e.literal("completed"),e.literal("cancelled")]),references:e.array(gr),underwritingFlagLocators:e.array(e.string()),deadlineTime:e.string().optional(),assignedTo:e.string().optional(),createdBy:e.string(),createdAt:e.string(),updatedBy:e.string().optional(),updatedAt:e.string().optional()});e.object({listCompleted:e.boolean(),items:e.array(cs)});const ps=e.object({removeQualifications:e.record(e.string()),addQualifications:e.record(e.string())});e.object({requestBody:us}),e.object({requestBody:ss}),e.object({userLocator:e.string()}),e.record(e.string()),e.object({requestBody:ps,userLocator:e.string()}),e.record(e.string()),e.object({assignmentLocator:e.string()}),e.object({assignmentLocator:e.string()}),e.object({assignmentLocator:e.string()}),e.object({assignmentLocator:e.string(),userLocator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:ls}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),userLocator:e.string()}),e.object({locator:e.string()}),e.record(e.array(e.string())),e.object({assignmentEvents:e.union([e.literal("assignedEvent"),e.literal("completedEvent"),e.literal("unassignedEvent"),e.literal("uncompletedEvent")]).optional()}),e.object({assignmentState:e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]),count:e.number().optional(),offset:e.number().optional(),referenceLocator:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])}),e.object({count:e.number().optional(),offset:e.number().optional(),referenceLocator:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])}),e.object({locator:e.string()}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({assignmentState:e.union([e.literal("active"),e.literal("completed"),e.literal("unassigned"),e.literal("discarded")]),count:e.number().optional(),offset:e.number().optional(),userLocator:e.string()}),e.object({count:e.number().optional(),offset:e.number().optional(),userLocator:e.string()}),e.object({count:e.number().optional(),offset:e.number().optional(),referenceLocator:e.string(),referenceType:e.union([e.literal("account"),e.literal("quickQuote"),e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("invoice")])}),e.object({listCompleted:e.boolean(),items:e.array(ds)}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({count:e.number().optional(),offset:e.number().optional(),userLocator:e.string()}),e.object({count:e.number().optional(),offset:e.number().optional()});const na=gr.merge(e.object({referenceType:Cf}));ss.merge(e.object({deadlineTime:_,references:e.array(na),assignedTo:F})),ls.merge(e.object({deadlineTime:_.optional(),addReferences:e.array(na),removeReferences:e.array(na)}));const Xb=ds.merge(e.object({locator:wo,activityState:Lf,references:e.array(na).optional(),underwritingFlagLocators:e.array(e.string()).optional(),deadlineTime:_.optional(),assignedTo:F.optional(),createdBy:F,createdAt:_,updatedBy:F.optional(),updatedAt:_.optional()}));Ie(Xb);const Ee=e.object({tenantLocator:bt});Ee.merge(e.object({userLocator:F})),Ee.merge(e.object({assignmentLocator:Eo})).merge(e.object({userLocator:F})),Ee.merge(e.object({userLocator:F})),Ee.merge(e.object({referenceType:e.string(),referenceLocator:$})),Ee.merge(e.object({activityLocator:wo})).merge(e.object({userLocator:F})),Ee.merge(e.object({userLocator:F})),Ee.merge(e.object({referenceType:e.string(),referenceLocator:$})),Ee.merge(e.object({referenceType:e.string(),referenceLocator:$})),Ee.merge(e.object({diaryLocator:xo})),us.merge(e.object({userLocator:F,referenceType:io}));const Jb=cs.merge(e.object({locator:Eo,userLocator:F,referenceType:io,assignmentState:kf,createdBy:F,createdAt:_,updatedBy:F.optional(),updatedAt:_.optional()}));Ie(Jb),e.object({locator:e.string(),key:e.string(),uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),value:e.string(),modificationTimestamp:e.string(),expirationTimestamp:e.string().optional(),auxDataSettingsName:e.string().optional()}),e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]);const ev=e.object({key:e.string(),uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),auxDataSettingsName:e.string().optional()});e.object({offset:e.number(),count:e.number(),keys:e.array(ev)});const tv=e.object({uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),key:e.string(),value:e.string()}),rv=e.object({auxDataSettingsName:e.string().optional(),auxData:e.array(tv)});e.object({dataSizeKb:e.number()});const kn=e.object({locator:e.string(),referenceLocator:e.string(),referenceType:e.union([e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("activity"),e.literal("fnol")]),category:e.string().optional(),contents:e.string(),createdAt:e.string(),createdBy:e.string(),updatedAt:e.string(),updatedBy:e.string(),diaryState:e.union([e.literal("active"),e.literal("discarded"),e.literal("locked")])});e.union([e.literal("quote"),e.literal("policy"),e.literal("transaction"),e.literal("activity"),e.literal("fnol")]),e.union([e.literal("active"),e.literal("discarded"),e.literal("locked")]);const gs=e.object({category:e.string().optional(),contents:e.string()}),av=e.object({category:e.string().optional(),contents:e.string()});e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({locator:e.string(),requestBody:rv}),e.unknown(),e.object({includeDiscarded:e.boolean().optional(),referenceLocator:e.string(),referenceType:e.string()}),e.array(kn),e.object({referenceLocator:e.string(),referenceType:e.string(),requestBody:gs}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(kn),e.object({locator:e.string(),requestBody:av}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({key:e.string(),locator:e.string()}),e.object({key:e.string(),locator:e.string()}),e.unknown(),gs.merge(e.object({}));const nv=kn.merge(e.object({locator:xo,referenceType:Pf,diaryState:Df,createdAt:_,createdBy:F,updatedAt:_,updatedBy:F}));e.array(nv),e.record(e.string(),e.array(e.string())),ps.merge(e.object({addQualifications:_e,removeQualifications:_e}));const iv=({startTime:r,endTime:t,expirationTime:a,durationBasis:n,termDuration:i,timezone:o})=>{const s=Je(r||new Date().toISOString(),o),l=a?Je(a,o):void 0,c=t?Je(t,o):void 0,u=l&&l.compare(s)>0?l.toAbsoluteString():s.add({months:1}).toAbsoluteString();if(c&&c.compare(s)>0)return{startTime:s.toAbsoluteString(),endTime:c.toAbsoluteString(),expirationTime:u};if(!i||!n)return{startTime:s.toAbsoluteString(),expirationTime:u};const d=s.add({[n]:i});return{startTime:s.toAbsoluteString(),endTime:d.toAbsoluteString(),expirationTime:u}},ov=(r,t,a)=>{var o,s,l,c,u;let n;r.durationBasis?n=r.durationBasis:t.defaultDurationBasis?n=Kr.options.includes(t.defaultDurationBasis)?t.defaultDurationBasis:void 0:a.defaultDurationBasis?n=Kr.options.includes(a.defaultDurationBasis)?a.defaultDurationBasis:void 0:n=void 0;const i=iv({timezone:r.timezone??a.defaultTimeZone??"UTC",startTime:r==null?void 0:r.startTime,endTime:r==null?void 0:r.endTime,expirationTime:r==null?void 0:r.expirationTime,durationBasis:n,termDuration:(r==null?void 0:r.duration)??t.defaultTermDuration??a.defaultTermDuration});return{...((o=r==null?void 0:r.element)==null?void 0:o.data)&&{...(s=r==null?void 0:r.element)==null?void 0:s.data},default:{...i},advanced:{currency:(r==null?void 0:r.currency)??t.defaultCurrency??a.defaultCurrency??void 0,timezone:(r==null?void 0:r.timezone)??t.defaultTimeZone??a.defaultTimeZone??void 0,billingLevel:(r==null?void 0:r.billingLevel)??t.defaultBillingLevel??void 0,billingTrigger:(r==null?void 0:r.billingTrigger)??t.defaultBillingTrigger??void 0,durationBasis:(r==null?void 0:r.durationBasis)??t.defaultDurationBasis??(a==null?void 0:a.defaultDurationBasis)??void 0,delinquencyPlanName:(r==null?void 0:r.delinquencyPlanName)??(t==null?void 0:t.defaultDelinquencyPlan)??(a==null?void 0:a.defaultDelinquencyPlan)??void 0,autoRenewalPlanName:(r==null?void 0:r.autoRenewalPlanName)??(t==null?void 0:t.defaultAutoRenewalPlan)??(a==null?void 0:a.defaultAutoRenewalPlan)??void 0,installmentPlanName:((c=(l=r==null?void 0:r.preferences)==null?void 0:l.installmentPreferences)==null?void 0:c.installmentPlanName)??(t==null?void 0:t.defaultInstallmentPlan)??(a==null?void 0:a.defaultInstallmentPlan)??void 0},coverageTerms:qe({coverageTermDataModel:a.coverageTerms,coverageTermOptions:((u=r==null?void 0:r.element)==null?void 0:u.coverageTerms)??{},coverageTerms:t.coverageTerms??[]})}};var sv=Re,lv=function(){try{var r=sv(Object,"defineProperty");return r({},"",{}),r}catch{}}(),ms=lv,fs=ms;function cv(r,t,a){t=="__proto__"&&fs?fs(r,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[t]=a}var Pn=cv,uv=Pn,dv=Dt,pv=Object.prototype,gv=pv.hasOwnProperty;function mv(r,t,a){var n=r[t];(!(gv.call(r,t)&&dv(n,a))||a===void 0&&!(t in r))&&uv(r,t,a)}var Dn=mv,fv=9007199254740991,yv=/^(?:0|[1-9]\d*)$/;function hv(r,t){var a=typeof r;return t=t??fv,!!t&&(a=="number"||a!="symbol"&&yv.test(r))&&r>-1&&r%1==0&&r<t}var ia=hv,bv=Dn,vv=st,Tv=ia,ys=te,Av=lt;function jv(r,t,a,n){if(!ys(r))return r;t=vv(t,r);for(var i=-1,o=t.length,s=o-1,l=r;l!=null&&++i<o;){var c=Av(t[i]),u=a;if(c==="__proto__"||c==="constructor"||c==="prototype")return r;if(i!=s){var d=l[c];u=n?n(d,c,l):void 0,u===void 0&&(u=ys(d)?d:Tv(t[i+1])?[]:{})}bv(l,c,u),l=l[c]}return r}var hs=jv,_v=Pr,wv=hs,Ev=st;function xv(r,t,a){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],l=_v(r,s);a(l,s)&&wv(o,Ev(s,r),l)}return o}var $v=xv;function Sv(r,t){return r!=null&&t in Object(r)}var Cv=Sv,Lv=at,kv=be,Pv="[object Arguments]";function Dv(r){return kv(r)&&Lv(r)==Pv}var Ov=Dv,bs=Ov,Nv=be,vs=Object.prototype,Iv=vs.hasOwnProperty,Bv=vs.propertyIsEnumerable,Mv=bs(function(){return arguments}())?bs:function(r){return Nv(r)&&Iv.call(r,"callee")&&!Bv.call(r,"callee")},mr=Mv,Rv=9007199254740991;function qv(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Rv}var On=qv,Fv=st,Uv=mr,Zv=V,Gv=ia,Kv=On,zv=lt;function Vv(r,t,a){t=Fv(t,r);for(var n=-1,i=t.length,o=!1;++n<i;){var s=zv(t[n]);if(!(o=r!=null&&a(r,s)))break;r=r[s]}return o||++n!=i?o:(i=r==null?0:r.length,!!i&&Kv(i)&&Gv(s,i)&&(Zv(r)||Uv(r)))}var Ts=Vv,Hv=Cv,Wv=Ts;function Yv(r,t){return r!=null&&Wv(r,t,Hv)}var As=Yv,Qv=$v,Xv=As;function Jv(r,t){return Qv(r,t,function(a,n){return Xv(r,n)})}var eT=Jv;function tT(r,t){for(var a=-1,n=t.length,i=r.length;++a<n;)r[i+a]=t[a];return r}var Nn=tT,js=rt,rT=mr,aT=V,_s=js?js.isConcatSpreadable:void 0;function nT(r){return aT(r)||rT(r)||!!(_s&&r&&r[_s])}var iT=nT,oT=Nn,sT=iT;function ws(r,t,a,n,i){var o=-1,s=r.length;for(a||(a=sT),i||(i=[]);++o<s;){var l=r[o];t>0&&a(l)?t>1?ws(l,t-1,a,n,i):oT(i,l):n||(i[i.length]=l)}return i}var lT=ws,cT=lT;function uT(r){var t=r==null?0:r.length;return t?cT(r,1):[]}var dT=uT;function pT(r,t,a){switch(a.length){case 0:return r.call(t);case 1:return r.call(t,a[0]);case 2:return r.call(t,a[0],a[1]);case 3:return r.call(t,a[0],a[1],a[2])}return r.apply(t,a)}var gT=pT,mT=gT,Es=Math.max;function fT(r,t,a){return t=Es(t===void 0?r.length-1:t,0),function(){for(var n=arguments,i=-1,o=Es(n.length-t,0),s=Array(o);++i<o;)s[i]=n[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=n[i];return l[t]=a(s),mT(r,this,l)}}var xs=fT;function yT(r){return function(){return r}}var hT=yT;function bT(r){return r}var In=bT,vT=hT,$s=ms,TT=In,AT=$s?function(r,t){return $s(r,"toString",{configurable:!0,enumerable:!1,value:vT(t),writable:!0})}:TT,jT=AT,_T=800,wT=16,ET=Date.now;function xT(r){var t=0,a=0;return function(){var n=ET(),i=wT-(n-a);if(a=n,i>0){if(++t>=_T)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var $T=xT,ST=jT,CT=$T,LT=CT(ST),Ss=LT,kT=dT,PT=xs,DT=Ss;function OT(r){return DT(PT(r,void 0,kT),r+"")}var Cs=OT,NT=eT,IT=Cs,BT=IT(function(r,t){return r==null?{}:NT(r,t)}),MT=BT;const oa=ee(MT);var RT=hs;function qT(r,t,a){return r==null?r:RT(r,t,a)}var FT=qT;const P=ee(FT),UT={Date:!0,RegExp:!0,String:!0,Number:!0};function ne(r,t,a={cyclesFix:!0},n=[]){var l,c;let i=[];const o=Array.isArray(r);for(const u in r){const d=r[u],g=o?+u:u;if(!(u in t)){i.push({type:"REMOVE",path:[g],oldValue:r[u]});continue}const f=t[u],h=typeof d=="object"&&typeof f=="object"&&Array.isArray(d)===Array.isArray(f);d&&f&&h&&!UT[(c=(l=Object.getPrototypeOf(d))==null?void 0:l.constructor)==null?void 0:c.name]&&(!a.cyclesFix||!n.includes(d))?i.push.apply(i,ne(d,f,a,a.cyclesFix?n.concat([d]):[]).map(y=>(y.path.unshift(g),y))):d!==f&&!(Number.isNaN(d)&&Number.isNaN(f))&&!(h&&(isNaN(d)?d+""==f+"":+d==+f))&&i.push({path:[g],type:"CHANGE",value:f,oldValue:d})}const s=Array.isArray(t);for(const u in t)u in r||i.push({type:"CREATE",path:[s?+u:u],value:t[u]});return i}const ZT=r=>{const{data:t,default:a,advanced:n,coverageTerms:i,element:o,timezone:s}=r,l={locator:o.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};ne((o==null?void 0:o.data)??{},t).forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":if(y.path.some(b=>!isNaN(Number(b)))){const b=K(t,y.path[0]);P(l.setData??{},y.path[0],b)}else P(l.setData??{},y.path,y.value);break;case"REMOVE":if(y.path.some(b=>!isNaN(Number(b)))){const b=K(t,y.path[0]);b.length===0?P(l.removeData??{},y.path[0],!0):P(l.setData??{},y.path[0],b)}else P(l.removeData??{},y.path,!0);break}}),ne(o.coverageTerms??{},i??{}).forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":P(l.setCoverageTerms??{},y.path,y.value);break;case"REMOVE":P(l.removeCoverageTerms??{},y.path,!0);break}});const d=oa(o,["startTime","endTime","expirationTime"]),g=oa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName"]),f=ne(d??{},a??{}),h=ne(g??{},n??{});return f.forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":P(l,y.path,ka(y.value).toDate(s).toISOString());break;case"REMOVE":P(l,y.path,null);break}}),h.forEach(y=>{switch(y.type){case"CHANGE":case"CREATE":P(l,y.path,y.value);break;case"REMOVE":P(l,y.path,null);break}}),l};var GT=Lr;function KT(){this.__data__=new GT,this.size=0}var zT=KT;function VT(r){var t=this.__data__,a=t.delete(r);return this.size=t.size,a}var HT=VT;function WT(r){return this.__data__.get(r)}var YT=WT;function QT(r){return this.__data__.has(r)}var XT=QT,JT=Lr,eA=Ra,tA=qa,rA=200;function aA(r,t){var a=this.__data__;if(a instanceof JT){var n=a.__data__;if(!eA||n.length<rA-1)return n.push([r,t]),this.size=++a.size,this;a=this.__data__=new tA(n)}return a.set(r,t),this.size=a.size,this}var nA=aA,iA=Lr,oA=zT,sA=HT,lA=YT,cA=XT,uA=nA;function _t(r){var t=this.__data__=new iA(r);this.size=t.size}_t.prototype.clear=oA,_t.prototype.delete=sA,_t.prototype.get=lA,_t.prototype.has=cA,_t.prototype.set=uA;var sa=_t;function dA(r,t){for(var a=-1,n=r==null?0:r.length;++a<n&&t(r[a],a,r)!==!1;);return r}var Ls=dA,pA=Dn,gA=Pn;function mA(r,t,a,n){var i=!a;a||(a={});for(var o=-1,s=t.length;++o<s;){var l=t[o],c=n?n(a[l],r[l],l,a,r):void 0;c===void 0&&(c=r[l]),i?gA(a,l,c):pA(a,l,c)}return a}var wt=mA;function fA(r,t){for(var a=-1,n=Array(r);++a<r;)n[a]=t(a);return n}var yA=fA,la={exports:{}};function hA(){return!1}var bA=hA;la.exports,function(r,t){var a=de,n=bA,i=t&&!t.nodeType&&t,o=i&&!0&&r&&!r.nodeType&&r,s=o&&o.exports===i,l=s?a.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||n;r.exports=u}(la,la.exports);var Et=la.exports,vA=at,TA=On,AA=be,jA="[object Arguments]",_A="[object Array]",wA="[object Boolean]",EA="[object Date]",xA="[object Error]",$A="[object Function]",SA="[object Map]",CA="[object Number]",LA="[object Object]",kA="[object RegExp]",PA="[object Set]",DA="[object String]",OA="[object WeakMap]",NA="[object ArrayBuffer]",IA="[object DataView]",BA="[object Float32Array]",MA="[object Float64Array]",RA="[object Int8Array]",qA="[object Int16Array]",FA="[object Int32Array]",UA="[object Uint8Array]",ZA="[object Uint8ClampedArray]",GA="[object Uint16Array]",KA="[object Uint32Array]",U={};U[BA]=U[MA]=U[RA]=U[qA]=U[FA]=U[UA]=U[ZA]=U[GA]=U[KA]=!0,U[jA]=U[_A]=U[NA]=U[wA]=U[IA]=U[EA]=U[xA]=U[$A]=U[SA]=U[CA]=U[LA]=U[kA]=U[PA]=U[DA]=U[OA]=!1;function zA(r){return AA(r)&&TA(r.length)&&!!U[vA(r)]}var VA=zA;function HA(r){return function(t){return r(t)}}var Bn=HA,ca={exports:{}};ca.exports,function(r,t){var a=gi,n=t&&!t.nodeType&&t,i=n&&!0&&r&&!r.nodeType&&r,o=i&&i.exports===n,s=o&&a.process,l=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();r.exports=l}(ca,ca.exports);var Mn=ca.exports,WA=VA,YA=Bn,ks=Mn,Ps=ks&&ks.isTypedArray,QA=Ps?YA(Ps):WA,fr=QA,XA=yA,JA=mr,ej=V,tj=Et,rj=ia,aj=fr,nj=Object.prototype,ij=nj.hasOwnProperty;function oj(r,t){var a=ej(r),n=!a&&JA(r),i=!a&&!n&&tj(r),o=!a&&!n&&!i&&aj(r),s=a||n||i||o,l=s?XA(r.length,String):[],c=l.length;for(var u in r)(t||ij.call(r,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||rj(u,c)))&&l.push(u);return l}var Ds=oj,sj=Object.prototype;function lj(r){var t=r&&r.constructor,a=typeof t=="function"&&t.prototype||sj;return r===a}var ua=lj;function cj(r,t){return function(a){return r(t(a))}}var Os=cj,uj=Os,dj=uj(Object.keys,Object),pj=dj,gj=ua,mj=pj,fj=Object.prototype,yj=fj.hasOwnProperty;function hj(r){if(!gj(r))return mj(r);var t=[];for(var a in Object(r))yj.call(r,a)&&a!="constructor"&&t.push(a);return t}var Ns=hj,bj=$r,vj=On;function Tj(r){return r!=null&&vj(r.length)&&!bj(r)}var xt=Tj,Aj=Ds,jj=Ns,_j=xt;function wj(r){return _j(r)?Aj(r):jj(r)}var yr=wj,Ej=wt,xj=yr;function $j(r,t){return r&&Ej(t,xj(t),r)}var Sj=$j;function Cj(r){var t=[];if(r!=null)for(var a in Object(r))t.push(a);return t}var Lj=Cj,kj=te,Pj=ua,Dj=Lj,Oj=Object.prototype,Nj=Oj.hasOwnProperty;function Ij(r){if(!kj(r))return Dj(r);var t=Pj(r),a=[];for(var n in r)n=="constructor"&&(t||!Nj.call(r,n))||a.push(n);return a}var Bj=Ij,Mj=Ds,Rj=Bj,qj=xt;function Fj(r){return qj(r)?Mj(r,!0):Rj(r)}var hr=Fj,Uj=wt,Zj=hr;function Gj(r,t){return r&&Uj(t,Zj(t),r)}var Kj=Gj,da={exports:{}};da.exports,function(r,t){var a=de,n=t&&!t.nodeType&&t,i=n&&!0&&r&&!r.nodeType&&r,o=i&&i.exports===n,s=o?a.Buffer:void 0,l=s?s.allocUnsafe:void 0;function c(u,d){if(d)return u.slice();var g=u.length,f=l?l(g):new u.constructor(g);return u.copy(f),f}r.exports=c}(da,da.exports);var Is=da.exports;function zj(r,t){var a=-1,n=r.length;for(t||(t=Array(n));++a<n;)t[a]=r[a];return t}var Bs=zj;function Vj(r,t){for(var a=-1,n=r==null?0:r.length,i=0,o=[];++a<n;){var s=r[a];t(s,a,r)&&(o[i++]=s)}return o}var Hj=Vj;function Wj(){return[]}var Ms=Wj,Yj=Hj,Qj=Ms,Xj=Object.prototype,Jj=Xj.propertyIsEnumerable,Rs=Object.getOwnPropertySymbols,e_=Rs?function(r){return r==null?[]:(r=Object(r),Yj(Rs(r),function(t){return Jj.call(r,t)}))}:Qj,Rn=e_,t_=wt,r_=Rn;function a_(r,t){return t_(r,r_(r),t)}var n_=a_,i_=Os,o_=i_(Object.getPrototypeOf,Object),pa=o_,s_=Nn,l_=pa,c_=Rn,u_=Ms,d_=Object.getOwnPropertySymbols,p_=d_?function(r){for(var t=[];r;)s_(t,c_(r)),r=l_(r);return t}:u_,qs=p_,g_=wt,m_=qs;function f_(r,t){return g_(r,m_(r),t)}var y_=f_,h_=Nn,b_=V;function v_(r,t,a){var n=t(r);return b_(r)?n:h_(n,a(r))}var Fs=v_,T_=Fs,A_=Rn,j_=yr;function __(r){return T_(r,j_,A_)}var Us=__,w_=Fs,E_=qs,x_=hr;function $_(r){return w_(r,x_,E_)}var Zs=$_,S_=Re,C_=de,L_=S_(C_,"DataView"),k_=L_,P_=Re,D_=de,O_=P_(D_,"Promise"),N_=O_,I_=Re,B_=de,M_=I_(B_,"Set"),R_=M_,q_=Re,F_=de,U_=q_(F_,"WeakMap"),Z_=U_,qn=k_,Fn=Ra,Un=N_,Zn=R_,Gn=Z_,Gs=at,$t=vi,Ks="[object Map]",G_="[object Object]",zs="[object Promise]",Vs="[object Set]",Hs="[object WeakMap]",Ws="[object DataView]",K_=$t(qn),z_=$t(Fn),V_=$t(Un),H_=$t(Zn),W_=$t(Gn),We=Gs;(qn&&We(new qn(new ArrayBuffer(1)))!=Ws||Fn&&We(new Fn)!=Ks||Un&&We(Un.resolve())!=zs||Zn&&We(new Zn)!=Vs||Gn&&We(new Gn)!=Hs)&&(We=function(r){var t=Gs(r),a=t==G_?r.constructor:void 0,n=a?$t(a):"";if(n)switch(n){case K_:return Ws;case z_:return Ks;case V_:return zs;case H_:return Vs;case W_:return Hs}return t});var br=We,Y_=Object.prototype,Q_=Y_.hasOwnProperty;function X_(r){var t=r.length,a=new r.constructor(t);return t&&typeof r[0]=="string"&&Q_.call(r,"index")&&(a.index=r.index,a.input=r.input),a}var J_=X_,ew=de,tw=ew.Uint8Array,Ys=tw,Qs=Ys;function rw(r){var t=new r.constructor(r.byteLength);return new Qs(t).set(new Qs(r)),t}var Kn=rw,aw=Kn;function nw(r,t){var a=t?aw(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}var iw=nw,ow=/\w*$/;function sw(r){var t=new r.constructor(r.source,ow.exec(r));return t.lastIndex=r.lastIndex,t}var lw=sw,Xs=rt,Js=Xs?Xs.prototype:void 0,el=Js?Js.valueOf:void 0;function cw(r){return el?Object(el.call(r)):{}}var uw=cw,dw=Kn;function pw(r,t){var a=t?dw(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}var tl=pw,gw=Kn,mw=iw,fw=lw,yw=uw,hw=tl,bw="[object Boolean]",vw="[object Date]",Tw="[object Map]",Aw="[object Number]",jw="[object RegExp]",_w="[object Set]",ww="[object String]",Ew="[object Symbol]",xw="[object ArrayBuffer]",$w="[object DataView]",Sw="[object Float32Array]",Cw="[object Float64Array]",Lw="[object Int8Array]",kw="[object Int16Array]",Pw="[object Int32Array]",Dw="[object Uint8Array]",Ow="[object Uint8ClampedArray]",Nw="[object Uint16Array]",Iw="[object Uint32Array]";function Bw(r,t,a){var n=r.constructor;switch(t){case xw:return gw(r);case bw:case vw:return new n(+r);case $w:return mw(r,a);case Sw:case Cw:case Lw:case kw:case Pw:case Dw:case Ow:case Nw:case Iw:return hw(r,a);case Tw:return new n;case Aw:case ww:return new n(r);case jw:return fw(r);case _w:return new n;case Ew:return yw(r)}}var Mw=Bw,Rw=te,rl=Object.create,qw=function(){function r(){}return function(t){if(!Rw(t))return{};if(rl)return rl(t);r.prototype=t;var a=new r;return r.prototype=void 0,a}}(),al=qw,Fw=al,Uw=pa,Zw=ua;function Gw(r){return typeof r.constructor=="function"&&!Zw(r)?Fw(Uw(r)):{}}var nl=Gw,Kw=br,zw=be,Vw="[object Map]";function Hw(r){return zw(r)&&Kw(r)==Vw}var Ww=Hw,Yw=Ww,Qw=Bn,il=Mn,ol=il&&il.isMap,Xw=ol?Qw(ol):Yw,Jw=Xw,eE=br,tE=be,rE="[object Set]";function aE(r){return tE(r)&&eE(r)==rE}var nE=aE,iE=nE,oE=Bn,sl=Mn,ll=sl&&sl.isSet,sE=ll?oE(ll):iE,lE=sE,cE=sa,uE=Ls,dE=Dn,pE=Sj,gE=Kj,mE=Is,fE=Bs,yE=n_,hE=y_,bE=Us,vE=Zs,TE=br,AE=J_,jE=Mw,_E=nl,wE=V,EE=Et,xE=Jw,$E=te,SE=lE,CE=yr,LE=hr,kE=1,PE=2,DE=4,cl="[object Arguments]",OE="[object Array]",NE="[object Boolean]",IE="[object Date]",BE="[object Error]",ul="[object Function]",ME="[object GeneratorFunction]",RE="[object Map]",qE="[object Number]",dl="[object Object]",FE="[object RegExp]",UE="[object Set]",ZE="[object String]",GE="[object Symbol]",KE="[object WeakMap]",zE="[object ArrayBuffer]",VE="[object DataView]",HE="[object Float32Array]",WE="[object Float64Array]",YE="[object Int8Array]",QE="[object Int16Array]",XE="[object Int32Array]",JE="[object Uint8Array]",ex="[object Uint8ClampedArray]",tx="[object Uint16Array]",rx="[object Uint32Array]",R={};R[cl]=R[OE]=R[zE]=R[VE]=R[NE]=R[IE]=R[HE]=R[WE]=R[YE]=R[QE]=R[XE]=R[RE]=R[qE]=R[dl]=R[FE]=R[UE]=R[ZE]=R[GE]=R[JE]=R[ex]=R[tx]=R[rx]=!0,R[BE]=R[ul]=R[KE]=!1;function ga(r,t,a,n,i,o){var s,l=t&kE,c=t&PE,u=t&DE;if(a&&(s=i?a(r,n,i,o):a(r)),s!==void 0)return s;if(!$E(r))return r;var d=wE(r);if(d){if(s=AE(r),!l)return fE(r,s)}else{var g=TE(r),f=g==ul||g==ME;if(EE(r))return mE(r,l);if(g==dl||g==cl||f&&!i){if(s=c||f?{}:_E(r),!l)return c?hE(r,gE(s,r)):yE(r,pE(s,r))}else{if(!R[g])return i?r:{};s=jE(r,g,l)}}o||(o=new cE);var h=o.get(r);if(h)return h;o.set(r,s),SE(r)?r.forEach(function(L){s.add(ga(L,t,a,L,r,o))}):xE(r)&&r.forEach(function(L,j){s.set(j,ga(L,t,a,j,r,o))});var y=u?c?vE:bE:c?LE:CE,b=d?void 0:y(r);return uE(b||r,function(L,j){b&&(j=L,L=r[j]),dE(s,j,ga(L,t,a,j,r,o))}),s}var ax=ga;function nx(r){var t=r==null?0:r.length;return t?r[t-1]:void 0}var ix=nx;function ox(r,t,a){var n=-1,i=r.length;t<0&&(t=-t>i?0:i+t),a=a>i?i:a,a<0&&(a+=i),i=t>a?0:a-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=r[n+t];return o}var sx=ox,lx=Pr,cx=sx;function ux(r,t){return t.length<2?r:lx(r,cx(t,0,-1))}var dx=ux,px=st,gx=ix,mx=dx,fx=lt;function yx(r,t){return t=px(t,r),r=mx(r,t),r==null||delete r[fx(gx(t))]}var hx=yx,bx=at,vx=pa,Tx=be,Ax="[object Object]",jx=Function.prototype,_x=Object.prototype,pl=jx.toString,wx=_x.hasOwnProperty,Ex=pl.call(Object);function xx(r){if(!Tx(r)||bx(r)!=Ax)return!1;var t=vx(r);if(t===null)return!0;var a=wx.call(t,"constructor")&&t.constructor;return typeof a=="function"&&a instanceof a&&pl.call(a)==Ex}var gl=xx,$x=gl;function Sx(r){return $x(r)?void 0:r}var Cx=Sx,Lx=_i,kx=ax,Px=hx,Dx=st,Ox=wt,Nx=Cx,Ix=Cs,Bx=Zs,Mx=1,Rx=2,qx=4,Fx=Ix(function(r,t){var a={};if(r==null)return a;var n=!1;t=Lx(t,function(o){return o=Dx(o,r),n||(n=o.length>1),o}),Ox(r,Bx(r),a),n&&(a=kx(a,Mx|Rx|qx,Nx));for(var i=t.length;i--;)Px(a,t[i]);return a}),Ux=Fx;const Zx=ee(Ux);function Gx(r,t){for(var a=-1,n=r==null?0:r.length;++a<n;)if(!t(r[a],a,r))return!1;return!0}var Kx=Gx;function zx(r){return function(t,a,n){for(var i=-1,o=Object(t),s=n(t),l=s.length;l--;){var c=s[r?l:++i];if(a(o[c],c,o)===!1)break}return t}}var Vx=zx,Hx=Vx,Wx=Hx(),ml=Wx,Yx=ml,Qx=yr;function Xx(r,t){return r&&Yx(r,t,Qx)}var fl=Xx,Jx=xt;function e$(r,t){return function(a,n){if(a==null)return a;if(!Jx(a))return r(a,n);for(var i=a.length,o=t?i:-1,s=Object(a);(t?o--:++o<i)&&n(s[o],o,s)!==!1;);return a}}var t$=e$,r$=fl,a$=t$,n$=a$(r$),i$=n$,o$=i$;function s$(r,t){var a=!0;return o$(r,function(n,i,o){return a=!!t(n,i,o),a}),a}var l$=s$,c$="__lodash_hash_undefined__";function u$(r){return this.__data__.set(r,c$),this}var d$=u$;function p$(r){return this.__data__.has(r)}var g$=p$,m$=qa,f$=d$,y$=g$;function ma(r){var t=-1,a=r==null?0:r.length;for(this.__data__=new m$;++t<a;)this.add(r[t])}ma.prototype.add=ma.prototype.push=f$,ma.prototype.has=y$;var h$=ma;function b$(r,t){for(var a=-1,n=r==null?0:r.length;++a<n;)if(t(r[a],a,r))return!0;return!1}var v$=b$;function T$(r,t){return r.has(t)}var A$=T$,j$=h$,_$=v$,w$=A$,E$=1,x$=2;function $$(r,t,a,n,i,o){var s=a&E$,l=r.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(r),d=o.get(t);if(u&&d)return u==t&&d==r;var g=-1,f=!0,h=a&x$?new j$:void 0;for(o.set(r,t),o.set(t,r);++g<l;){var y=r[g],b=t[g];if(n)var L=s?n(b,y,g,t,r,o):n(y,b,g,r,t,o);if(L!==void 0){if(L)continue;f=!1;break}if(h){if(!_$(t,function(j,G){if(!w$(h,G)&&(y===j||i(y,j,a,n,o)))return h.push(G)})){f=!1;break}}else if(!(y===b||i(y,b,a,n,o))){f=!1;break}}return o.delete(r),o.delete(t),f}var yl=$$;function S$(r){var t=-1,a=Array(r.size);return r.forEach(function(n,i){a[++t]=[i,n]}),a}var C$=S$;function L$(r){var t=-1,a=Array(r.size);return r.forEach(function(n){a[++t]=n}),a}var k$=L$,hl=rt,bl=Ys,P$=Dt,D$=yl,O$=C$,N$=k$,I$=1,B$=2,M$="[object Boolean]",R$="[object Date]",q$="[object Error]",F$="[object Map]",U$="[object Number]",Z$="[object RegExp]",G$="[object Set]",K$="[object String]",z$="[object Symbol]",V$="[object ArrayBuffer]",H$="[object DataView]",vl=hl?hl.prototype:void 0,zn=vl?vl.valueOf:void 0;function W$(r,t,a,n,i,o,s){switch(a){case H$:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case V$:return!(r.byteLength!=t.byteLength||!o(new bl(r),new bl(t)));case M$:case R$:case U$:return P$(+r,+t);case q$:return r.name==t.name&&r.message==t.message;case Z$:case K$:return r==t+"";case F$:var l=O$;case G$:var c=n&I$;if(l||(l=N$),r.size!=t.size&&!c)return!1;var u=s.get(r);if(u)return u==t;n|=B$,s.set(r,t);var d=D$(l(r),l(t),n,i,o,s);return s.delete(r),d;case z$:if(zn)return zn.call(r)==zn.call(t)}return!1}var Y$=W$,Tl=Us,Q$=1,X$=Object.prototype,J$=X$.hasOwnProperty;function e1(r,t,a,n,i,o){var s=a&Q$,l=Tl(r),c=l.length,u=Tl(t),d=u.length;if(c!=d&&!s)return!1;for(var g=c;g--;){var f=l[g];if(!(s?f in t:J$.call(t,f)))return!1}var h=o.get(r),y=o.get(t);if(h&&y)return h==t&&y==r;var b=!0;o.set(r,t),o.set(t,r);for(var L=s;++g<c;){f=l[g];var j=r[f],G=t[f];if(n)var S=s?n(G,j,f,t,r,o):n(j,G,f,r,t,o);if(!(S===void 0?j===G||i(j,G,a,n,o):S)){b=!1;break}L||(L=f=="constructor")}if(b&&!L){var D=r.constructor,X=t.constructor;D!=X&&"constructor"in r&&"constructor"in t&&!(typeof D=="function"&&D instanceof D&&typeof X=="function"&&X instanceof X)&&(b=!1)}return o.delete(r),o.delete(t),b}var t1=e1,Vn=sa,r1=yl,a1=Y$,n1=t1,Al=br,jl=V,_l=Et,i1=fr,o1=1,wl="[object Arguments]",El="[object Array]",fa="[object Object]",s1=Object.prototype,xl=s1.hasOwnProperty;function l1(r,t,a,n,i,o){var s=jl(r),l=jl(t),c=s?El:Al(r),u=l?El:Al(t);c=c==wl?fa:c,u=u==wl?fa:u;var d=c==fa,g=u==fa,f=c==u;if(f&&_l(r)){if(!_l(t))return!1;s=!0,d=!1}if(f&&!d)return o||(o=new Vn),s||i1(r)?r1(r,t,a,n,i,o):a1(r,t,c,a,n,i,o);if(!(a&o1)){var h=d&&xl.call(r,"__wrapped__"),y=g&&xl.call(t,"__wrapped__");if(h||y){var b=h?r.value():r,L=y?t.value():t;return o||(o=new Vn),i(b,L,a,n,o)}}return f?(o||(o=new Vn),n1(r,t,a,n,i,o)):!1}var c1=l1,u1=c1,$l=be;function Sl(r,t,a,n,i){return r===t?!0:r==null||t==null||!$l(r)&&!$l(t)?r!==r&&t!==t:u1(r,t,a,n,Sl,i)}var Hn=Sl,d1=sa,p1=Hn,g1=1,m1=2;function f1(r,t,a,n){var i=a.length,o=i,s=!n;if(r==null)return!o;for(r=Object(r);i--;){var l=a[i];if(s&&l[2]?l[1]!==r[l[0]]:!(l[0]in r))return!1}for(;++i<o;){l=a[i];var c=l[0],u=r[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in r))return!1}else{var g=new d1;if(n)var f=n(u,d,c,r,t,g);if(!(f===void 0?p1(d,u,g1|m1,n,g):f))return!1}}return!0}var y1=f1,h1=te;function b1(r){return r===r&&!h1(r)}var Cl=b1,v1=Cl,T1=yr;function A1(r){for(var t=T1(r),a=t.length;a--;){var n=t[a],i=r[n];t[a]=[n,i,v1(i)]}return t}var j1=A1;function _1(r,t){return function(a){return a==null?!1:a[r]===t&&(t!==void 0||r in Object(a))}}var Ll=_1,w1=y1,E1=j1,x1=Ll;function $1(r){var t=E1(r);return t.length==1&&t[0][2]?x1(t[0][0],t[0][1]):function(a){return a===r||w1(a,r,t)}}var S1=$1,C1=Hn,L1=Si,k1=As,P1=Ia,D1=Cl,O1=Ll,N1=lt,I1=1,B1=2;function M1(r,t){return P1(r)&&D1(t)?O1(N1(r),t):function(a){var n=L1(a,r);return n===void 0&&n===t?k1(a,r):C1(t,n,I1|B1)}}var R1=M1;function q1(r){return function(t){return t==null?void 0:t[r]}}var F1=q1,U1=Pr;function Z1(r){return function(t){return U1(t,r)}}var G1=Z1,K1=F1,z1=G1,V1=Ia,H1=lt;function W1(r){return V1(r)?K1(H1(r)):z1(r)}var Y1=W1,Q1=S1,X1=R1,J1=In,eS=V,tS=Y1;function rS(r){return typeof r=="function"?r:r==null?J1:typeof r=="object"?eS(r)?X1(r[0],r[1]):Q1(r):tS(r)}var kl=rS,aS=Dt,nS=xt,iS=ia,oS=te;function sS(r,t,a){if(!oS(a))return!1;var n=typeof t;return(n=="number"?nS(a)&&iS(t,a.length):n=="string"&&t in a)?aS(a[t],r):!1}var Pl=sS,lS=Kx,cS=l$,uS=kl,dS=V,pS=Pl;function gS(r,t,a){var n=dS(r)?lS:cS;return a&&pS(r,t,a)&&(t=void 0),n(r,uS(t))}var mS=gS;const fS=ee(mS);var yS=Object.prototype,hS=yS.hasOwnProperty;function bS(r,t){return r!=null&&hS.call(r,t)}var vS=bS,TS=vS,AS=Ts;function jS(r,t){return r!=null&&AS(r,t,TS)}var _S=jS;const wS=ee(_S);var ES=Ns,xS=br,$S=mr,SS=V,CS=xt,LS=Et,kS=ua,PS=fr,DS="[object Map]",OS="[object Set]",NS=Object.prototype,IS=NS.hasOwnProperty;function BS(r){if(r==null)return!0;if(CS(r)&&(SS(r)||typeof r=="string"||typeof r.splice=="function"||LS(r)||PS(r)||$S(r)))return!r.length;var t=xS(r);if(t==DS||t==OS)return!r.size;if(kS(r))return!ES(r).length;for(var a in r)if(IS.call(r,a))return!1;return!0}var MS=BS;const Dl=ee(MS);var RS=Ls,qS=al,FS=fl,US=kl,ZS=pa,GS=V,KS=Et,zS=$r,VS=te,HS=fr;function WS(r,t,a){var n=GS(r),i=n||KS(r)||HS(r);if(t=US(t),a==null){var o=r&&r.constructor;i?a=n?new o:[]:VS(r)?a=zS(o)?qS(ZS(r)):{}:a={}}return(i?RS:FS)(r,function(s,l,c){return t(a,s,l,c)}),a}var YS=WS;const QS=ee(YS);function vr(r,t){return QS(r,(a,n,i)=>{if(!wS(t,i))a[i]=n;else if(Ba(n)&&!Oa(n)){const o=vr(n,t[i]);Dl(o)||(a[i]=o)}else if(Oa(n)&&Oa(t[i])){const o=n.map((s,l)=>vr(s,t[i][l]));fS(o,Dl)||(a[i]=o)}})}const XS=({data:r,transactionSnapshot:t,staticLocator:a})=>{const n={action:"modify",staticLocator:a},i=structuredClone(r);n.setCoverageTerms=r.coverageTerms,n.removeCoverageTerms=vr(t.segment.element.coverageTerms??{},r.coverageTerms??{});const o=t.segment.element.data??{},s=Zx(i,["coverageTerms","default"]);return n.setData=s,n.removeData=vr(o,s),n},JS=({data:r,timezone:t})=>{const a={action:"params",effectiveTime:ka(r.default.effectiveTime).toDate(t).toISOString()};return r.default.newPolicyEndDate&&(a.newPolicyEndTime=ka(r.default.newPolicyEndDate).toDate(t).toISOString()),a},eC=Y.z.enum(["currency","timezone","billingLevel","billingTrigger","durationBasis","delinquencyPlanName","autoRenewalPlanName","installmentPlanName"]);Y.z.record(eC,Y.z.string().optional());const tC=r=>{var h,y;const{data:t,default:a,advanced:n,coverageTerms:i,quote:o}=r,s={setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};ne(((h=o.element)==null?void 0:h.data)??{},t).forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":if(b.path.some(L=>!isNaN(Number(L)))){const L=K(t,b.path[0]);P(s.setData??{},b.path[0],L)}else P(s.setData??{},b.path,b.value);break;case"REMOVE":if(b.path.some(L=>!isNaN(Number(L)))){const L=K(t,b.path[0]);L.length===0?P(s.removeData??{},b.path[0],!0):P(s.setData??{},b.path[0],L)}else P(s.removeData??{},b.path,!0);break}}),ne(((y=o.element)==null?void 0:y.coverageTerms)??{},i??{}).forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":P(s.setCoverageTerms??{},b.path,b.value);break;case"REMOVE":P(s.removeCoverageTerms??{},b.path,!0);break}});const u=oa(o,["startTime","endTime","expirationTime"]),d=oa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName","installmentPlanName"]),g=ne(u??{},a??{}),f=ne(d??{},n??{});return g.forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":P(s,b.path,b.value);break;case"REMOVE":P(s,b.path,null);break}}),f.forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":b.path.includes("installmentPlanName")?P(s,["preferences","installmentPreferences",...b.path],b.value):P(s,b.path,b.value);break;case"REMOVE":P(s,b.path,null);break}}),s},rC=r=>{var i,o;const t={locator:r.element.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};return ne(((i=r.element)==null?void 0:i.data)??{},r.data).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);P(t.setData??{},s.path[0],l)}else P(t.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);l.length===0?P(t.removeData??{},s.path[0],!0):P(t.setData??{},s.path[0],l)}else P(t.removeData??{},s.path,!0);break}}),ne(((o=r.element)==null?void 0:o.coverageTerms)??{},r.coverageTerms??{}).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":P(t.setCoverageTerms??{},s.path,s.value);break;case"REMOVE":P(t.removeCoverageTerms??{},s.path,!0);break}}),t};function aC(r){return r.keyword==="pattern"&&(r.message=`Invalid format, must match pattern ${r.params.pattern}`),r.keyword==="format"&&(r.message="Invalid format"),r.keyword==="required"&&(r.message="Required"),r.keyword==="minItems"&&(r.message=`Must have at least ${r.params.limit} item${r.params.limit!==1?"s":""}`),r.keyword==="maxItems"&&(r.message=`Must have at most ${r.params.limit} item${r.params.limit!==1?"s":""}`),r.keyword==="type"&&(r.message="Invalid format"),r.keyword==="maxLength"&&(r.message=`Must be at most ${r.params.limit} character${r.params.limit!==1?"s":""}`),r.keyword==="minLength"&&(r.message=`Must be at least ${r.params.limit} character${r.params.limit!==1?"s":""}`),r.keyword==="minimum"&&(r.message=`Must be greater than or equal to ${r.params.limit}`),r.keyword==="maximum"&&(r.message=`Must be less than or equal to ${r.params.limit}`),r.keyword==="enum"&&(r.message="Invalid value"),r.message??"Unknown error"}const nC=({dependencyMap:r,locator:t,data:a})=>{const n={};return!r[t]||Object.keys(r[t]).length===0||Object.keys(r[t]).forEach(i=>{const o={};r[t][i].where&&Object.keys(r[t][i].where??{}).forEach(s=>{const l=r[t][i].where&&r[t][i].where[s].fieldName;l&&K(a,l)&&P(o,`${s}`,K(a,l))}),n[t]?n[t]={...n[t],[i]:o}:n[t]={[i]:o}}),n};var iC=Pn,oC=Dt;function sC(r,t,a){(a!==void 0&&!oC(r[t],a)||a===void 0&&!(t in r))&&iC(r,t,a)}var Ol=sC,lC=xt,cC=be;function uC(r){return cC(r)&&lC(r)}var dC=uC;function pC(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var Nl=pC,gC=wt,mC=hr;function fC(r){return gC(r,mC(r))}var yC=fC,Il=Ol,hC=Is,bC=tl,vC=Bs,TC=nl,Bl=mr,Ml=V,AC=dC,jC=Et,_C=$r,wC=te,EC=gl,xC=fr,Rl=Nl,$C=yC;function SC(r,t,a,n,i,o,s){var l=Rl(r,a),c=Rl(t,a),u=s.get(c);if(u){Il(r,a,u);return}var d=o?o(l,c,a+"",r,t,s):void 0,g=d===void 0;if(g){var f=Ml(c),h=!f&&jC(c),y=!f&&!h&&xC(c);d=c,f||h||y?Ml(l)?d=l:AC(l)?d=vC(l):h?(g=!1,d=hC(c,!0)):y?(g=!1,d=bC(c,!0)):d=[]:EC(c)||Bl(c)?(d=l,Bl(l)?d=$C(l):(!wC(l)||_C(l))&&(d=TC(c))):g=!1}g&&(s.set(c,d),i(d,c,n,o,s),s.delete(c)),Il(r,a,d)}var CC=SC,LC=sa,kC=Ol,PC=ml,DC=CC,OC=te,NC=hr,IC=Nl;function ql(r,t,a,n,i){r!==t&&PC(t,function(o,s){if(i||(i=new LC),OC(o))DC(r,t,s,a,ql,n,i);else{var l=n?n(IC(r,s),o,s+"",r,t,i):void 0;l===void 0&&(l=o),kC(r,s,l)}},NC)}var BC=ql,MC=In,RC=xs,qC=Ss;function FC(r,t){return qC(RC(r,t,MC),r+"")}var UC=FC,ZC=UC,GC=Pl;function KC(r){return ZC(function(t,a){var n=-1,i=a.length,o=i>1?a[i-1]:void 0,s=i>2?a[2]:void 0;for(o=r.length>3&&typeof o=="function"?(i--,o):void 0,s&&GC(a[0],a[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var l=a[n];l&&r(t,l,n,o)}return t})}var zC=KC,VC=BC,HC=zC,WC=HC(function(r,t,a){VC(r,t,a)}),YC=WC;const QC=ee(YC),XC=({defaultValues:r,accountType:t,account:a})=>{var i,o;const n=QC(r??{},a??{});return{data:(a==null?void 0:a.data)??{},type:t,advanced:{autoRenewalPlanName:n==null?void 0:n.autoRenewalPlanName,delinquencyPlanName:n==null?void 0:n.delinquencyPlanName,excessCreditPlanName:n==null?void 0:n.excessCreditPlanName,shortfallTolerancePlanName:n==null?void 0:n.shortfallTolerancePlanName,billingLevel:n==null?void 0:n.billingLevel,invoiceDocument:n==null?void 0:n.invoiceDocument,installmentPlanName:(o=(i=n==null?void 0:n.preferences)==null?void 0:i.installmentPreferences)==null?void 0:o.installmentPlanName},saveAsDraft:!((r==null?void 0:r.autoValidate)??!0)}};var JC=Hn;function eL(r,t){return JC(r,t)}var tL=eL;const rL=ee(tL),Fl=(r,t,a)=>{const n=[];if(Object.keys(r).length===0&&Object.keys(t).length===0)return n;Object.keys(r).length===0&&n.push({originalValue:null,newValue:t,path:a??[]});for(const o in r){const s=r[o],l=t[o];if(Array.isArray(s)&&Array.isArray(l))for(let c=0;c<l.length;c++){const u=s[c]??{},d=l[c]??{},g=Fl(u,d,a?[...a,o,`${c}`]:[o,`${c}`]);g.length!==0&&n.push(...g)}else if(Ba(r[o])&&Ba(t[o])){if(rL(r[o],t[o]))continue;n.push({originalValue:r[o],newValue:t[o],path:a?[...a,o]:[o]})}else s!==l&&(!s&&l?n.push({originalValue:void 0,newValue:l,path:a?[...a,o]:[o]}):s&&!l?n.push({originalValue:s,newValue:void 0,path:a?[...a,o]:[o]}):n.push({originalValue:s,newValue:l,path:a?[...a,o]:[o]}))}return Object.keys(t).filter(o=>!r[o]).forEach(o=>{n.push({originalValue:"",newValue:t[o],path:a?[...a,o]:[o]})}),n},aL=(r,t,a)=>{const n=t==null?void 0:t[a];if(!n)return r;const i={...r};return Object.keys(n).forEach(o=>{const s=n[o],l=K(i,o);l&&(typeof l=="string"&&s.includes(l)||(i[o]=""))}),i};Y.z.object({autoRenewalPlanName:Y.z.string().optional(),delinquencyPlanName:Y.z.string().optional(),excessCreditPlanName:Y.z.string().optional(),shortfallTolerancePlanName:Y.z.string().optional(),billingLevel:An.optional(),invoiceDocument:Y.z.string().optional(),installmentPlanName:Y.z.string().optional()});function nL(r){var n;const t={...r.advanced};delete t.installmentPlanName;const a={installmentPlanName:r.advanced.installmentPlanName};if(r.account){const i={setData:{},removeData:{},type:r.type,autoValidate:r.autoValidate,...t,preferences:{...r.account.preferences,...r.advanced.installmentPlanName?{installmentPreferences:a}:{}}};return ne(((n=r.account)==null?void 0:n.data)??{},r.data).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);P(i.setData??{},s.path[0],l)}else P(i.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=K(r.data,s.path[0]);l.length===0?P(i.removeData??{},s.path[0],!0):P(i.setData??{},s.path[0],l)}else P(i.removeData??{},s.path,!0);break}}),i}else return{type:r.type,autoValidate:r.autoValidate,data:r.data,...t,preferences:{...r.advanced.installmentPlanName?{installmentPreferences:a}:{}}}}O.DataFieldTagFeature=Ci,O.compareData=Fl,O.dataModelToJSONSchema=Li,O.extractElementByLocator=Ga,O.extractElementDataModelFromQuote=tg,O.extractElementDataModelFromSegment=rg,O.extractElementDataModelFromType=Ka,O.extractElementsFromQuote=ag,O.extractElementsFromTransactionSegment=ng,O.extractProductDataModel=ig,O.extractProductElements=og,O.getAccountRequest=nL,O.getCoverageTermsDefaultValues=qe,O.getDefaultAccountFormValues=XC,O.getDefaultDraftTransactionValues=sg,O.getDefaultElementValues=lg,O.getDefaultInitializedTransactionValues=cg,O.getDefaultQuoteValues=ov,O.getElementNameByType=Pi,O.getElementRequest=rC,O.getElementTransactionUpdateRequestFromFormData=ZT,O.getEvaluatedConstraintsRequest=nC,O.getModifyChangeInstructionCreateRequestFromFormData=XS,O.getParamsChangeInstructionCreateRequestFromFormData=JS,O.getQuoteRequest=tC,O.getRemoveDataFieldValues=vr,O.getUpdatedDataFromConstraints=aL,O.splitInputAndQuantifier=Di,O.translateError=aC,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
3
3
  //# sourceMappingURL=index.umd.js.map