@socotra/ec-react-utils 2.14.0-next.2 → 2.14.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +2 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.umd.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(function(z,he){typeof exports=="object"&&typeof module<"u"?he(exports,require("zod")):typeof define=="function"&&define.amd?define(["exports","zod"],he):(z=typeof globalThis<"u"?globalThis:z||self,he(z.schemas={},z.zod))})(this,function(z,he){"use strict";var yt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var yl=Array.isArray,ge=yl;const _a=be(ge);var hl=typeof yt=="object"&&yt&&yt.Object===Object&&yt,Mn=hl,bl=Mn,vl=typeof self=="object"&&self&&self.Object===Object&&self,Tl=bl||vl||Function("return this")(),ke=Tl,jl=ke,_l=jl.Symbol,ht=_l,Bn=ht,Rn=Object.prototype,Al=Rn.hasOwnProperty,wl=Rn.toString,Gt=Bn?Bn.toStringTag:void 0;function El(r){var t=Al.call(r,Gt),a=r[Gt];try{r[Gt]=void 0;var n=!0}catch{}var i=wl.call(r);return n&&(t?r[Gt]=a:delete r[Gt]),i}var xl=El,$l=Object.prototype,Ll=$l.toString;function Sl(r){return Ll.call(r)}var Cl=Sl,qn=ht,kl=xl,Dl=Cl,Pl="[object Null]",Ol="[object Undefined]",Fn=qn?qn.toStringTag:void 0;function Nl(r){return r==null?r===void 0?Ol:Pl:Fn&&Fn in Object(r)?kl(r):Dl(r)}var bt=Nl;function Il(r){return r!=null&&typeof r=="object"}var Be=Il,Ml=bt,Bl=Be,Rl="[object Symbol]";function ql(r){return typeof r=="symbol"||Bl(r)&&Ml(r)==Rl}var Aa=ql,Fl=ge,Ul=Aa,Zl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gl=/^\w*$/;function Kl(r,t){if(Fl(r))return!1;var a=typeof r;return a=="number"||a=="symbol"||a=="boolean"||r==null||Ul(r)?!0:Gl.test(r)||!Zl.test(r)||t!=null&&r in Object(t)}var wa=Kl;function zl(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var je=zl;const Ea=be(je);var Vl=bt,Hl=je,Yl="[object AsyncFunction]",Wl="[object Function]",Ql="[object GeneratorFunction]",Xl="[object Proxy]";function Jl(r){if(!Hl(r))return!1;var t=Vl(r);return t==Wl||t==Ql||t==Yl||t==Xl}var Pr=Jl,ec=ke,tc=ec["__core-js_shared__"],rc=tc,xa=rc,Un=function(){var r=/[^.]+$/.exec(xa&&xa.keys&&xa.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function ac(r){return!!Un&&Un in r}var nc=ac,ic=Function.prototype,oc=ic.toString;function sc(r){if(r!=null){try{return oc.call(r)}catch{}try{return r+""}catch{}}return""}var Zn=sc,lc=Pr,cc=nc,uc=je,dc=Zn,pc=/[\\^$.*+?()[\]{}|]/g,gc=/^\[object .+?Constructor\]$/,mc=Function.prototype,fc=Object.prototype,yc=mc.toString,hc=fc.hasOwnProperty,bc=RegExp("^"+yc.call(hc).replace(pc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vc(r){if(!uc(r)||cc(r))return!1;var t=lc(r)?bc:gc;return t.test(dc(r))}var Tc=vc;function jc(r,t){return r==null?void 0:r[t]}var _c=jc,Ac=Tc,wc=_c;function Ec(r,t){var a=wc(r,t);return Ac(a)?a:void 0}var it=Ec,xc=it,$c=xc(Object,"create"),Or=$c,Gn=Or;function Lc(){this.__data__=Gn?Gn(null):{},this.size=0}var Sc=Lc;function Cc(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var kc=Cc,Dc=Or,Pc="__lodash_hash_undefined__",Oc=Object.prototype,Nc=Oc.hasOwnProperty;function Ic(r){var t=this.__data__;if(Dc){var a=t[r];return a===Pc?void 0:a}return Nc.call(t,r)?t[r]:void 0}var Mc=Ic,Bc=Or,Rc=Object.prototype,qc=Rc.hasOwnProperty;function Fc(r){var t=this.__data__;return Bc?t[r]!==void 0:qc.call(t,r)}var Uc=Fc,Zc=Or,Gc="__lodash_hash_undefined__";function Kc(r,t){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=Zc&&t===void 0?Gc:t,this}var zc=Kc,Vc=Sc,Hc=kc,Yc=Mc,Wc=Uc,Qc=zc;function vt(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])}}vt.prototype.clear=Vc,vt.prototype.delete=Hc,vt.prototype.get=Yc,vt.prototype.has=Wc,vt.prototype.set=Qc;var Xc=vt;function Jc(){this.__data__=[],this.size=0}var eu=Jc;function tu(r,t){return r===t||r!==r&&t!==t}var Kt=tu,ru=Kt;function au(r,t){for(var a=r.length;a--;)if(ru(r[a][0],t))return a;return-1}var Nr=au,nu=Nr,iu=Array.prototype,ou=iu.splice;function su(r){var t=this.__data__,a=nu(t,r);if(a<0)return!1;var n=t.length-1;return a==n?t.pop():ou.call(t,a,1),--this.size,!0}var lu=su,cu=Nr;function uu(r){var t=this.__data__,a=cu(t,r);return a<0?void 0:t[a][1]}var du=uu,pu=Nr;function gu(r){return pu(this.__data__,r)>-1}var mu=gu,fu=Nr;function yu(r,t){var a=this.__data__,n=fu(a,r);return n<0?(++this.size,a.push([r,t])):a[n][1]=t,this}var hu=yu,bu=eu,vu=lu,Tu=du,ju=mu,_u=hu;function Tt(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])}}Tt.prototype.clear=bu,Tt.prototype.delete=vu,Tt.prototype.get=Tu,Tt.prototype.has=ju,Tt.prototype.set=_u;var Ir=Tt,Au=it,wu=ke,Eu=Au(wu,"Map"),$a=Eu,Kn=Xc,xu=Ir,$u=$a;function Lu(){this.size=0,this.__data__={hash:new Kn,map:new($u||xu),string:new Kn}}var Su=Lu;function Cu(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var ku=Cu,Du=ku;function Pu(r,t){var a=r.__data__;return Du(t)?a[typeof t=="string"?"string":"hash"]:a.map}var Mr=Pu,Ou=Mr;function Nu(r){var t=Ou(this,r).delete(r);return this.size-=t?1:0,t}var Iu=Nu,Mu=Mr;function Bu(r){return Mu(this,r).get(r)}var Ru=Bu,qu=Mr;function Fu(r){return qu(this,r).has(r)}var Uu=Fu,Zu=Mr;function Gu(r,t){var a=Zu(this,r),n=a.size;return a.set(r,t),this.size+=a.size==n?0:1,this}var Ku=Gu,zu=Su,Vu=Iu,Hu=Ru,Yu=Uu,Wu=Ku;function jt(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])}}jt.prototype.clear=zu,jt.prototype.delete=Vu,jt.prototype.get=Hu,jt.prototype.has=Yu,jt.prototype.set=Wu;var La=jt,zn=La,Qu="Expected a function";function Sa(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError(Qu);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(Sa.Cache||zn),a}Sa.Cache=zn;var Xu=Sa,Ju=Xu,ed=500;function td(r){var t=Ju(r,function(n){return a.size===ed&&a.clear(),n}),a=t.cache;return t}var rd=td,ad=rd,nd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,id=/\\(\\)?/g,od=ad(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(nd,function(a,n,i,o){t.push(i?o.replace(id,"$1"):n||a)}),t}),sd=od;function ld(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 Vn=ld,Hn=ht,cd=Vn,ud=ge,dd=Aa,pd=1/0,Yn=Hn?Hn.prototype:void 0,Wn=Yn?Yn.toString:void 0;function Qn(r){if(typeof r=="string")return r;if(ud(r))return cd(r,Qn)+"";if(dd(r))return Wn?Wn.call(r):"";var t=r+"";return t=="0"&&1/r==-pd?"-0":t}var gd=Qn,md=gd;function fd(r){return r==null?"":md(r)}var yd=fd,hd=ge,bd=wa,vd=sd,Td=yd;function jd(r,t){return hd(r)?r:bd(r,t)?[r]:vd(Td(r))}var _t=jd,_d=Aa,Ad=1/0;function wd(r){if(typeof r=="string"||_d(r))return r;var t=r+"";return t=="0"&&1/r==-Ad?"-0":t}var At=wd,Ed=_t,xd=At;function $d(r,t){t=Ed(t,r);for(var a=0,n=t.length;r!=null&&a<n;)r=r[xd(t[a++])];return a&&a==n?r:void 0}var Br=$d,Ld=Br;function Sd(r,t,a){var n=r==null?void 0:Ld(r,t);return n===void 0?a:n}var Xn=Sd;const ue=be(Xn);var Jn=(r=>(r.MultiSelect="multiselect",r))(Jn||{});const ei=r=>{const{data:t,scope:a,dataTypes:n,rootDisplayName:i,ignoreConstraints:o=!1,account:s,evaluatedConstraints:l,quote:c,transactionElement:u,element:d,customDataTypeKey:f,truthyLabel:h="True",falsyLabel:g="False"}=r,_=[];let b={};const Z=Object.fromEntries(Object.entries(t??{}).filter(([,$])=>{var ce;const C=(ce=$.scope)==null?void 0:ce.split(",").map(ie=>ie.trim());return!!(!C||a.some(ie=>C.includes(ie)))}).map(([$,C])=>{var B,R,W,ae,oe,le,ye,Ke,Ie,rt,Me,de,Se,at,ft,ml,fl;let ce=!1,ie=!1,G=!1;const k=C.displayName??$,w=(B=C.type)==null?void 0:B.slice(-1),H=C.maxLength,F=C.minLength,D=C.max,re=C.min,se=C.constraint,L=C.regex;let m=C.type??"",v;switch(w){case"*":ie=!0,ce=!0,m=m==null?void 0:m.split("*")[0];break;case"?":m=m==null?void 0:m.split("?")[0],ce=!0;break;case"+":ie=!0,m=m==null?void 0:m.split("+")[0];break;case"!":m=m==null?void 0:m.split("!")[0];break}switch(m){case"string":m="string";break;case"int":case"long":m="integer";break;case"decimal":m="number";break;case"datetime":m="string",v="date-time";break;case"date":m="string",v="date";break;case"boolean":case"bool":m="boolean";break;default:G=!0;break}if(se&&l&&!o){const Ce=f?ue(l,[(d==null?void 0:d.locator)??"",`${f}.${$}`]):ue(l,`${d==null?void 0:d.locator}.${$}`),nt=f?ue(l,[(c==null?void 0:c.locator)??"",`${f}.${$}`]):ue(l,`${c==null?void 0:c.locator}.${$}`),Zt=f?ue(l,[(u==null?void 0:u.staticLocator)??"",`${f}.${$}`]):ue(l,`${u==null?void 0:u.staticLocator}.${$}`);d&&Ce&&(C.options=Ce),c&&nt&&(C.options=nt),u&&Zt&&(C.options=Zt)}if(!ce&&!G&&_.push($),G){const Ce=n==null?void 0:n[m];if(Ce){let nt=ie?[]:{};const Zt=ei({data:Ce.data??{},scope:a,dataTypes:n,ignoreConstraints:o,evaluatedConstraints:l,rootDisplayName:C.displayName??Ce.displayName??$,customDataTypeKey:$,quote:c,account:s,element:d,transactionElement:u,truthyLabel:h,falsyLabel:g});return c&&(W=(R=c.element)==null?void 0:R.data)!=null&&W[$]&&(nt=(oe=(ae=c.element)==null?void 0:ae.data)==null?void 0:oe[$]),d&&(le=d==null?void 0:d.data)!=null&&le[$]&&(nt=(ye=d==null?void 0:d.data)==null?void 0:ye[$]),s&&(Ke=s==null?void 0:s.data)!=null&&Ke[$]&&(nt=(Ie=s==null?void 0:s.data)==null?void 0:Ie[$]),Object.entries(Zt.definitions??{}).forEach(([ZS,GS])=>{b={...b,[ZS]:GS}}),Zt.definitions={},b={...b,[`${m}`]:Zt},ie?[$,{title:C.displayName??Ce.displayName??$,type:"array",default:nt,items:{$ref:`#/definitions/${m}`},...!ce&&{minItems:1}}]:[$,{title:Ce.displayName??$,default:nt,$ref:`#/definitions/${m}`}]}}let E="";if(s){const Ce=(s==null?void 0:s.accountState)==="validated"?$.charAt(0).toLowerCase()+$.slice(1):$;E=(rt=s==null?void 0:s.data)!=null&&rt[Ce]?(Me=s==null?void 0:s.data)==null?void 0:Me[Ce]:m==="boolean"?!!C.defaultValue:C.defaultValue}return c&&(E=(Se=(de=c.element)==null?void 0:de.data)!=null&&Se[$]?(ft=(at=c.element)==null?void 0:at.data)==null?void 0:ft[$]:m==="boolean"?!!C.defaultValue:C.defaultValue),d&&(E=(ml=d==null?void 0:d.data)!=null&&ml[$]?(fl=d==null?void 0:d.data)==null?void 0:fl[$]:m==="boolean"?!!C.defaultValue:C.defaultValue),ie?[$,{title:k,type:"array",default:E,...C.tag?C.tag.includes("multiselect")&&!G&&{uniqueItems:!0}:{},items:{type:m,...H&&{maxLength:H},...F&&{minLength:F},...re&&{min:re},...D&&{max:D},...v&&{format:v},...L&&{pattern:C.regex},...C.options&&{enum:C.options}},...!ce&&{minItems:1}}]:[$,{title:k,type:m,...E&&{default:E},...F&&{minLength:F},...H&&{maxLength:H},...re&&{minimum:parseInt(re)},...D&&{maximum:parseInt(D)},...v&&{format:v},...C.options&&{enum:C.options},...L&&{pattern:C.regex},...m==="boolean"&&{boolean:[{value:"true",label:h},{value:"false",label:g}]},...se&&!o&&{constraint:se}}]}));return{title:i||"",type:"object",definitions:b,required:_,properties:Z}};class Cd{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 kd{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=f=>o.right_a&&f.right_a?n>f.prec:n<=f.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 Dd=new Cd;Object.assign(p,{hooks:Dd,plugins:new kd(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 Re=r=>new p(r).parse(),Pd=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(p).filter(r=>!Pd.includes(r)&&Re[r]===void 0).forEach(r=>{Re[r]=p[r]}),Re.Jsep=p;const Od="ConditionalExpression";var Nd={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:Od,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 :")}})}};Re.plugins.register(Nd);const ti=47,Id=92;var Md={name:"regex",init(r){r.hooks.add("gobble-token",function(a){if(this.code===ti){const n=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===ti&&!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===Id?2:1}this.throwError("Unclosed Regex")}})}};const Ca=43,wt={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|="]),updateOperators:[Ca,45],assignmentPrecedence:.9,init(r){const t=[r.IDENTIFIER,r.MEMBER_EXP];wt.assignmentOperators.forEach(n=>r.addBinaryOp(n,wt.assignmentPrecedence,!0)),r.hooks.add("gobble-token",function(i){const o=this.code;wt.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:o===Ca?"++":"--",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;wt.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===Ca?"++":"--",argument:i.node,prefix:!1})}}),r.hooks.add("after-expression",function(i){i.node&&a(i.node)});function a(n){wt.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)})}}};Re.plugins.register(Md,wt),Re.addUnaryOp("typeof"),Re.addLiteral("null",null),Re.addLiteral("undefined",void 0);const Q={evalAst(r,t){switch(r.type){case"BinaryExpression":case"LogicalExpression":return Q.evalBinaryExpression(r,t);case"Compound":return Q.evalCompound(r,t);case"ConditionalExpression":return Q.evalConditionalExpression(r,t);case"Identifier":return Q.evalIdentifier(r,t);case"Literal":return Q.evalLiteral(r,t);case"MemberExpression":return Q.evalMemberExpression(r,t);case"UnaryExpression":return Q.evalUnaryExpression(r,t);case"ArrayExpression":return Q.evalArrayExpression(r,t);case"CallExpression":return Q.evalCallExpression(r,t);case"AssignmentExpression":return Q.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](Q.evalAst(r.left,t),()=>Q.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=Q.evalAst(i,t)}return a},evalConditionalExpression(r,t){return Q.evalAst(r.test,t)?Q.evalAst(r.consequent,t):Q.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?Q.evalAst(r.property):r.property.name,n=Q.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=>-Q.evalAst(n,t),"!":n=>!Q.evalAst(n,t),"~":n=>~Q.evalAst(n,t),"+":n=>+Q.evalAst(n,t),typeof:n=>typeof Q.evalAst(n,t)}[r.operator](r.argument)},evalArrayExpression(r,t){return r.elements.map(a=>Q.evalAst(a,t))},evalCallExpression(r,t){const a=r.arguments.map(i=>Q.evalAst(i,t)),n=Q.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=Q.evalAst(r.right,t);return t[a]=n,t[a]}};class Bd{constructor(t){this.code=t,this.ast=Re(this.code)}runInNewContext(t){const a={...t};return Q.evalAst(this.ast,a)}}function ze(r,t){return r=r.slice(),r.push(t),r}function ka(r,t){return t=t.slice(),t.unshift(r),t}class Rd 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 Y(r,t,a,n,i){if(!(this instanceof Y))try{return new Y(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 Rd(l);return l}}Y.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=Y.toPathString(r)),!r&&r!==""||!t)return;const c=Y.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,f)=>{const h=this._getPreferredOutput(f);return s&&Array.isArray(h)?d=d.concat(h):d.push(h),d},[]):l?[]:void 0},Y.prototype._getPreferredOutput=function(r){const t=this.currResultType;switch(t){case"all":{const a=Array.isArray(r.path)?r.path:Y.toPathArray(r.path);return r.pointer=Y.toPointer(a),r.path=typeof r.path=="string"?r.path:Y.toPathString(r.path),r}case"value":case"parent":case"parentProperty":return r[t];case"path":return Y.toPathString(r[t]);case"pointer":return Y.toPointer(r.path);default:throw new TypeError("Unknown result type")}},Y.prototype._handleCallback=function(r,t,a){if(t){const n=this._getPreferredOutput(r);r.path=typeof r.path=="string"?r.path:Y.toPathString(r.path),t(n,a,r)}},Y.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),f=[];function h(g){Array.isArray(g)?g.forEach(_=>{f.push(_)}):f.push(g)}if((typeof u!="string"||l)&&t&&Object.hasOwn(t,u))h(this._trace(d,t[u],ze(a,u),t,u,o,s));else if(u==="*")this._walk(t,g=>{h(this._trace(d,t[g],ze(a,g),t,g,o,!0,!0))});else if(u==="..")h(this._trace(d,t,a,n,i,o,s)),this._walk(t,g=>{typeof t[g]=="object"&&h(this._trace(r.slice(),t[g],ze(a,g),t,g,o,!0))});else{if(u==="^")return this._hasParentSelector=!0,{path:a.slice(0,-1),expr:d,isParentSelector:!0};if(u==="~")return c={path:ze(a,u),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(u==="$")h(this._trace(d,t,a,null,null,o,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))h(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 g=u.replace(/^\?\((.*?)\)$/u,"$1"),_=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(g);_?this._walk(t,b=>{const Z=[_[2]],x=_[1]?t[b][_[1]]:t[b];this._trace(Z,x,a,n,i,o,!0).length>0&&h(this._trace(d,t[b],ze(a,b),t,b,o,!0))}):this._walk(t,b=>{this._eval(g,t[b],b,a,n,i)&&h(this._trace(d,t[b],ze(a,b),t,b,o,!0))})}else if(u[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(ka(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 g=!1;const _=u.slice(1,-2);switch(_){case"scalar":(!t||!["object","function"].includes(typeof t))&&(g=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===_&&(g=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(g=!0);break;case"number":Number.isFinite(t)&&(g=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(g=!0);break;case"object":t&&typeof t===_&&(g=!0);break;case"array":Array.isArray(t)&&(g=!0);break;case"other":g=this.currOtherTypeCallback(t,a,n,i);break;case"null":t===null&&(g=!0);break;default:throw new TypeError("Unknown value type "+_)}if(g)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 g=u.slice(1);h(this._trace(d,t[g],ze(a,g),t,g,o,s,!0))}else if(u.includes(",")){const g=u.split(",");for(const _ of g)h(this._trace(ka(_,d),t,a,n,i,o,!0))}else!l&&t&&Object.hasOwn(t,u)&&h(this._trace(d,t[u],ze(a,u),t,u,o,s,!0))}if(this._hasParentSelector)for(let g=0;g<f.length;g++){const _=f[g];if(_&&_.isParentSelector){const b=this._trace(_.expr,t,_.path,n,i,o,s);if(Array.isArray(b)){f[g]=b[0];const Z=b.length;for(let x=1;x<Z;x++)g++,f.splice(g,0,b[x])}else f[g]=b}}return f},Y.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)})},Y.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,f=c[1]&&Number.parseInt(c[1])||l;d=d<0?Math.max(0,d+l):Math.min(l,d),f=f<0?Math.max(0,f+l):Math.min(l,f);const h=[];for(let g=d;g<f;g+=u)this._trace(ka(g,t),a,n,i,o,s,!0).forEach(b=>{h.push(b)});return h},Y.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=Y.toPathString(n.concat([a])));const l=this.currEval+"Script:"+r;if(!Y.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)Y.cache[l]=new this.safeVm.Script(c);else if(this.currEval==="native")Y.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;Y.cache[l]=new u(c)}else if(typeof this.currEval=="function")Y.cache[l]={runInNewContext:u=>this.currEval(c,u)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return Y.cache[l].runInNewContext(this.currSandbox)}catch(c){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+c.message+": "+r)}},Y.cache={},Y.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},Y.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},Y.toPathArray=function(r){const{cache:t}=Y;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()},Y.prototype.safeVm={Script:Bd};const qd=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 Fd{constructor(t){this.code=t}runInNewContext(t){let a=this.code;const n=Object.keys(t),i=[];qd(n,i,u=>typeof t[u]=="function");const o=n.map(u=>t[u]);a=i.reduce((u,d)=>{let f=t[d].toString();return/function/u.test(f)||(f="function "+f),"var "+d+"="+f+";"+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)}}Y.prototype.vm={Script:Fd};const Da=(r,t)=>{const a=Y({json:r,path:["$",`[?(@.locator=="${t}")]`]});return a.length?a[0]:null},ri=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)},Pa=({dataModel:r,elementType:t,resultType:a="value"})=>{const n=ri(t),i=Y({path:["$","?(@property === 'exposures' || @property === 'coverages' || @property === 'policyLines'|| @property === 'exposureGroups')",n],json:r,resultType:a});return i.length?i[0]:null},Ud=({dataModel:r,quote:t,elementLocator:a})=>{const n=Da(t,a);return n?Pa({dataModel:r,elementType:n.type}):{}},Zd=({dataModel:r,segment:t,elementLocator:a})=>{const n=Da(t,a);return n?Pa({dataModel:r,elementType:n.type}):{}},Gd=(r,t)=>{const a=t.endsWith("Quote")?t:`${t}Quote`;return r.filter(i=>i.type===a)},Kd=(r,t)=>{const a=t.endsWith("Policy")?t:`${t}Policy`;return r.filter(i=>i.type===a)},zd=({dataModel:r,element:{productName:t}})=>r.products[t]??{},ai=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??""}},Vd=({dataModel:r,contents:t})=>{var g,_,b,Z;const a=r.exposures??{},n=r.coverages??{},i=r.policyLines??{},o=r.exposureGroups??{},l=(t??[]).map(x=>{const{name:$,quantifier:C}=ai(x);return{name:$,quantifier:C}}),c=Object.keys(a).filter(x=>{if(l.find(C=>C.name===x))return!0}),u=Object.keys(n).filter(x=>{if(l.find(C=>C.name===x))return!0}),d=Object.keys(i).filter(x=>{if(l.find(C=>C.name===x))return!0}),f=Object.keys(o).filter(x=>{if(l.find(C=>C.name===x))return!0}),h={coverages:{},exposures:{},policyLines:{},exposureGroups:{}};for(const x of c)h.exposures[x]={...a[x],quantifier:((g=l.find($=>$.name===x))==null?void 0:g.quantifier)??""};for(const x of u)h.coverages[x]={...n[x],quantifier:((_=l.find($=>$.name===x))==null?void 0:_.quantifier)??""};for(const x of d)h.policyLines[x]={...i[x],quantifier:((b=l.find($=>$.name===x))==null?void 0:b.quantifier)??""};for(const x of f)h.exposureGroups[x]={...o[x],quantifier:((Z=l.find($=>$.name===x))==null?void 0:Z.quantifier)??""};return h},ot=({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};var ni={exports:{}};(function(r,t){(function(a,n){r.exports=n()})(yt,function(){var a=1e3,n=6e4,i=36e5,o="millisecond",s="second",l="minute",c="hour",u="day",d="week",f="month",h="quarter",g="year",_="date",b="Invalid Date",Z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var m=["th","st","nd","rd"],v=L%100;return"["+L+(m[(v-20)%10]||m[v]||m[0])+"]"}},C=function(L,m,v){var E=String(L);return!E||E.length>=m?L:""+Array(m+1-E.length).join(v)+L},ce={s:C,z:function(L){var m=-L.utcOffset(),v=Math.abs(m),E=Math.floor(v/60),j=v%60;return(m<=0?"+":"-")+C(E,2,"0")+":"+C(j,2,"0")},m:function L(m,v){if(m.date()<v.date())return-L(v,m);var E=12*(v.year()-m.year())+(v.month()-m.month()),j=m.clone().add(E,f),B=v-j<0,R=m.clone().add(E+(B?-1:1),f);return+(-(E+(v-j)/(B?j-R:R-j))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:g,w:d,d:u,D:_,h:c,m:l,s,ms:o,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},ie="en",G={};G[ie]=$;var k="$isDayjsObject",w=function(L){return L instanceof re||!(!L||!L[k])},H=function L(m,v,E){var j;if(!m)return ie;if(typeof m=="string"){var B=m.toLowerCase();G[B]&&(j=B),v&&(G[B]=v,j=B);var R=m.split("-");if(!j&&R.length>1)return L(R[0])}else{var W=m.name;G[W]=m,j=W}return!E&&j&&(ie=j),j||!E&&ie},F=function(L,m){if(w(L))return L.clone();var v=typeof m=="object"?m:{};return v.date=L,v.args=arguments,new re(v)},D=ce;D.l=H,D.i=w,D.w=function(L,m){return F(L,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var re=function(){function L(v){this.$L=H(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[k]=!0}var m=L.prototype;return m.parse=function(v){this.$d=function(E){var j=E.date,B=E.utc;if(j===null)return new Date(NaN);if(D.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var R=j.match(Z);if(R){var W=R[2]-1||0,ae=(R[7]||"0").substring(0,3);return B?new Date(Date.UTC(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,ae)):new Date(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,ae)}}return new Date(j)}(v),this.init()},m.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},m.$utils=function(){return D},m.isValid=function(){return this.$d.toString()!==b},m.isSame=function(v,E){var j=F(v);return this.startOf(E)<=j&&j<=this.endOf(E)},m.isAfter=function(v,E){return F(v)<this.startOf(E)},m.isBefore=function(v,E){return this.endOf(E)<F(v)},m.$g=function(v,E,j){return D.u(v)?this[E]:this.set(j,v)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(v,E){var j=this,B=!!D.u(E)||E,R=D.p(v),W=function(Me,de){var Se=D.w(j.$u?Date.UTC(j.$y,de,Me):new Date(j.$y,de,Me),j);return B?Se:Se.endOf(u)},ae=function(Me,de){return D.w(j.toDate()[Me].apply(j.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(de)),j)},oe=this.$W,le=this.$M,ye=this.$D,Ke="set"+(this.$u?"UTC":"");switch(R){case g:return B?W(1,0):W(31,11);case f:return B?W(1,le):W(0,le+1);case d:var Ie=this.$locale().weekStart||0,rt=(oe<Ie?oe+7:oe)-Ie;return W(B?ye-rt:ye+(6-rt),le);case u:case _:return ae(Ke+"Hours",0);case c:return ae(Ke+"Minutes",1);case l:return ae(Ke+"Seconds",2);case s:return ae(Ke+"Milliseconds",3);default:return this.clone()}},m.endOf=function(v){return this.startOf(v,!1)},m.$set=function(v,E){var j,B=D.p(v),R="set"+(this.$u?"UTC":""),W=(j={},j[u]=R+"Date",j[_]=R+"Date",j[f]=R+"Month",j[g]=R+"FullYear",j[c]=R+"Hours",j[l]=R+"Minutes",j[s]=R+"Seconds",j[o]=R+"Milliseconds",j)[B],ae=B===u?this.$D+(E-this.$W):E;if(B===f||B===g){var oe=this.clone().set(_,1);oe.$d[W](ae),oe.init(),this.$d=oe.set(_,Math.min(this.$D,oe.daysInMonth())).$d}else W&&this.$d[W](ae);return this.init(),this},m.set=function(v,E){return this.clone().$set(v,E)},m.get=function(v){return this[D.p(v)]()},m.add=function(v,E){var j,B=this;v=Number(v);var R=D.p(E),W=function(le){var ye=F(B);return D.w(ye.date(ye.date()+Math.round(le*v)),B)};if(R===f)return this.set(f,this.$M+v);if(R===g)return this.set(g,this.$y+v);if(R===u)return W(1);if(R===d)return W(7);var ae=(j={},j[l]=n,j[c]=i,j[s]=a,j)[R]||1,oe=this.$d.getTime()+v*ae;return D.w(oe,this)},m.subtract=function(v,E){return this.add(-1*v,E)},m.format=function(v){var E=this,j=this.$locale();if(!this.isValid())return j.invalidDate||b;var B=v||"YYYY-MM-DDTHH:mm:ssZ",R=D.z(this),W=this.$H,ae=this.$m,oe=this.$M,le=j.weekdays,ye=j.months,Ke=j.meridiem,Ie=function(de,Se,at,ft){return de&&(de[Se]||de(E,B))||at[Se].slice(0,ft)},rt=function(de){return D.s(W%12||12,de,"0")},Me=Ke||function(de,Se,at){var ft=de<12?"AM":"PM";return at?ft.toLowerCase():ft};return B.replace(x,function(de,Se){return Se||function(at){switch(at){case"YY":return String(E.$y).slice(-2);case"YYYY":return D.s(E.$y,4,"0");case"M":return oe+1;case"MM":return D.s(oe+1,2,"0");case"MMM":return Ie(j.monthsShort,oe,ye,3);case"MMMM":return Ie(ye,oe);case"D":return E.$D;case"DD":return D.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return Ie(j.weekdaysMin,E.$W,le,2);case"ddd":return Ie(j.weekdaysShort,E.$W,le,3);case"dddd":return le[E.$W];case"H":return String(W);case"HH":return D.s(W,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return Me(W,ae,!0);case"A":return Me(W,ae,!1);case"m":return String(ae);case"mm":return D.s(ae,2,"0");case"s":return String(E.$s);case"ss":return D.s(E.$s,2,"0");case"SSS":return D.s(E.$ms,3,"0");case"Z":return R}return null}(de)||R.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(v,E,j){var B,R=this,W=D.p(E),ae=F(v),oe=(ae.utcOffset()-this.utcOffset())*n,le=this-ae,ye=function(){return D.m(R,ae)};switch(W){case g:B=ye()/12;break;case f:B=ye();break;case h:B=ye()/3;break;case d:B=(le-oe)/6048e5;break;case u:B=(le-oe)/864e5;break;case c:B=le/i;break;case l:B=le/n;break;case s:B=le/a;break;default:B=le}return j?B:D.a(B)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return G[this.$L]},m.locale=function(v,E){if(!v)return this.$L;var j=this.clone(),B=H(v,E,!0);return B&&(j.$L=B),j},m.clone=function(){return D.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},L}(),se=re.prototype;return F.prototype=se,[["$ms",o],["$s",s],["$m",l],["$H",c],["$W",u],["$M",f],["$y",g],["$D",_]].forEach(function(L){se[L[1]]=function(m){return this.$g(m,L[0],L[1])}}),F.extend=function(L,m){return L.$i||(L(m,re,F),L.$i=!0),F},F.locale=H,F.isDayjs=w,F.unix=function(L){return F(1e3*L)},F.en=G[ie],F.Ls=G,F.p={},F})})(ni);var Hd=ni.exports;const ve=be(Hd),Yd=({transactionSnapshot:r,paramsChangeInstruction:t,modifyChangeInstruction:a,coverageTerms:n,coverageTermsDataModel:i})=>{const o=a?{...a.setData??{},coverageTermsDataModel:a.setCoverageTerms??{}}:r.segment.element.data??{};return{...o&&{...o},default:{effectiveTime:ve(t.effectiveTime).format("YYYY-MM-DD"),...t.newPolicyEndTime&&{newPolicyEndDate:ve(t.newPolicyEndTime).format("YYYY-MM-DD")}},coverageTerms:ot({coverageTermDataModel:i,coverageTermOptions:o.coverageTermsDataModel??{},coverageTerms:n})}},Wd=(r,t,a)=>{const n=ot({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t});return{data:{...r.data},...Object.keys(n).length>0&&{coverageTerms:ot({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t})}}},Qd=({elementResponse:r,coverageTerms:t,coverageTermsDataModel:a})=>{const n=r.data??{},i=ot({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t});return{...n&&{...n},...Object.keys(i).length>0&&{coverageTerms:ot({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t})}}};var V;(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})(V||(V={}));var Oa;(function(r){r.mergeShapes=(t,a)=>({...t,...a})})(Oa||(Oa={}));const A=V.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ve=r=>{switch(typeof r){case"undefined":return A.undefined;case"string":return A.string;case"number":return isNaN(r)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(r)?A.array:r===null?A.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?A.promise:typeof Map<"u"&&r instanceof Map?A.map:typeof Set<"u"&&r instanceof Set?A.set:typeof Date<"u"&&r instanceof Date?A.date:A.object;default:return A.unknown}},y=V.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Xd=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Te 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 Te))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,V.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()}}Te.create=r=>new Te(r);const Et=(r,t)=>{let a;switch(r.code){case y.invalid_type:r.received===A.undefined?a="Required":a=`Expected ${r.expected}, received ${r.received}`;break;case y.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(r.expected,V.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:a=`Unrecognized key(s) in object: ${V.joinValues(r.keys,", ")}`;break;case y.invalid_union:a="Invalid input";break;case y.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${V.joinValues(r.options)}`;break;case y.invalid_enum_value:a=`Invalid enum value. Expected ${V.joinValues(r.options)}, received '${r.received}'`;break;case y.invalid_arguments:a="Invalid function arguments";break;case y.invalid_return_type:a="Invalid function return type";break;case y.invalid_date:a="Invalid date";break;case y.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}"`:V.assertNever(r.validation):r.validation!=="regex"?a=`Invalid ${r.validation}`:a="Invalid";break;case y.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 y.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 y.custom:a="Invalid input";break;case y.invalid_intersection_types:a="Intersection results could not be merged";break;case y.not_multiple_of:a=`Number must be a multiple of ${r.multipleOf}`;break;case y.not_finite:a="Number must be finite";break;default:a=t.defaultError,V.assertNever(r)}return{message:a}};let ii=Et;function Jd(r){ii=r}function Rr(){return ii}const qr=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}},ep=[];function T(r,t){const a=Rr(),n=qr({issueData:t,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,a,a===Et?void 0:Et].filter(i=>!!i)});r.common.issues.push(n)}class pe{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 N;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 pe.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 N;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 N=Object.freeze({status:"aborted"}),Fr=r=>({status:"dirty",value:r}),me=r=>({status:"valid",value:r}),Na=r=>r.status==="aborted",Ia=r=>r.status==="dirty",zt=r=>r.status==="valid",Vt=r=>typeof Promise<"u"&&r instanceof Promise;function Ur(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 oi(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 S;(function(r){r.errToObj=t=>typeof t=="string"?{message:t}:t||{},r.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(S||(S={}));var Ht,Yt;class De{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 si=(r,t)=>{if(zt(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 Te(r.common.issues);return this._error=a,this._error}}};function q(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 U{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 Ve(t.data)}_getOrReturnCtx(t,a){return a||{common:t.parent.common,data:t.data,parsedType:Ve(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pe,ctx:{common:t.parent.common,data:t.data,parsedType:Ve(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const a=this._parse(t);if(Vt(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:Ve(t)},o=this._parseSync({data:t,path:i.path,parent:i});return si(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:Ve(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Vt(i)?i:Promise.resolve(i));return si(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:y.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 $e({schema:this,typeName:O.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Oe.create(this,this._def)}nullable(){return Xe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xe.create(this,this._def)}promise(){return St.create(this,this._def)}or(t){return Jt.create([this,t],this._def)}and(t){return er.create(this,t,this._def)}transform(t){return new $e({...q(this._def),schema:this,typeName:O.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const a=typeof t=="function"?t:()=>t;return new ir({...q(this._def),innerType:this,defaultValue:a,typeName:O.ZodDefault})}brand(){return new Ra({typeName:O.ZodBranded,type:this,...q(this._def)})}catch(t){const a=typeof t=="function"?t:()=>t;return new or({...q(this._def),innerType:this,catchValue:a,typeName:O.ZodCatch})}describe(t){const a=this.constructor;return new a({...this._def,description:t})}pipe(t){return sr.create(this,t)}readonly(){return lr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tp=/^c[^\s-]{8,}$/i,rp=/^[0-9a-z]+$/,ap=/^[0-9A-HJKMNP-TV-Z]{26}$/,np=/^[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,ip=/^[a-z0-9_-]{21}$/i,op=/^[-+]?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)?)??$/,sp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ma;const cp=/^(?:(?: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])$/,up=/^(([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})))$/,dp=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,li="((\\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])))",pp=new RegExp(`^${li}$`);function ci(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 gp(r){return new RegExp(`^${ci(r)}$`)}function ui(r){let t=`${li}T${ci(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 mp(r,t){return!!((t==="v4"||!t)&&cp.test(r)||(t==="v6"||!t)&&up.test(r))}class Ee extends U{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.string,received:i.parsedType}),N}const a=new pe;let n;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),T(n,{code:y.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),T(n,{code:y.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?T(n,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&T(n,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")sp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"email",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Ma||(Ma=new RegExp(lp,"u")),Ma.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"emoji",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")np.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"uuid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")ip.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"nanoid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")tp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"cuid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")rp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"cuid2",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")ap.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"ulid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),T(n,{validation:"url",code:y.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),T(n,{validation:"regex",code:y.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),T(n,{code:y.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),T(n,{code:y.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?ui(i).test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?pp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?gp(i).test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?op.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"duration",code:y.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?mp(t.data,i.version)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"ip",code:y.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?dp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"base64",code:y.invalid_string,message:i.message}),a.dirty()):V.assertNever(i);return{status:a.value,value:t.data}}_regex(t,a,n){return this.refinement(i=>t.test(i),{validation:a,code:y.invalid_string,...S.errToObj(n)})}_addCheck(t){return new Ee({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...S.errToObj(t)})}url(t){return this._addCheck({kind:"url",...S.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...S.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...S.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...S.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...S.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...S.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...S.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...S.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...S.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,...S.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,...S.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...S.errToObj(t)})}regex(t,a){return this._addCheck({kind:"regex",regex:t,...S.errToObj(a)})}includes(t,a){return this._addCheck({kind:"includes",value:t,position:a==null?void 0:a.position,...S.errToObj(a==null?void 0:a.message)})}startsWith(t,a){return this._addCheck({kind:"startsWith",value:t,...S.errToObj(a)})}endsWith(t,a){return this._addCheck({kind:"endsWith",value:t,...S.errToObj(a)})}min(t,a){return this._addCheck({kind:"min",value:t,...S.errToObj(a)})}max(t,a){return this._addCheck({kind:"max",value:t,...S.errToObj(a)})}length(t,a){return this._addCheck({kind:"length",value:t,...S.errToObj(a)})}nonempty(t){return this.min(1,S.errToObj(t))}trim(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ee({...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}}Ee.create=r=>{var t;return new Ee({checks:[],typeName:O.ZodString,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...q(r)})};function fp(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 He extends U{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)!==A.number){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.number,received:i.parsedType}),N}let a;const n=new pe;for(const i of this._def.checks)i.kind==="int"?V.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),T(a,{code:y.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),T(a,{code:y.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),T(a,{code:y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?fp(t.data,i.value)!==0&&(a=this._getOrReturnCtx(t,a),T(a,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),T(a,{code:y.not_finite,message:i.message}),n.dirty()):V.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,S.toString(a))}gt(t,a){return this.setLimit("min",t,!1,S.toString(a))}lte(t,a){return this.setLimit("max",t,!0,S.toString(a))}lt(t,a){return this.setLimit("max",t,!1,S.toString(a))}setLimit(t,a,n,i){return new He({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:S.toString(i)}]})}_addCheck(t){return new He({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:S.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:S.toString(a)})}finite(t){return this._addCheck({kind:"finite",message:S.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.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"&&V.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)}}He.create=r=>new He({checks:[],typeName:O.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...q(r)});class Ye extends U{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)!==A.bigint){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.bigint,received:i.parsedType}),N}let a;const n=new pe;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),T(a,{code:y.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),T(a,{code:y.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),T(a,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):V.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,S.toString(a))}gt(t,a){return this.setLimit("min",t,!1,S.toString(a))}lte(t,a){return this.setLimit("max",t,!0,S.toString(a))}lt(t,a){return this.setLimit("max",t,!1,S.toString(a))}setLimit(t,a,n,i){return new Ye({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:S.toString(i)}]})}_addCheck(t){return new Ye({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:S.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}}Ye.create=r=>{var t;return new Ye({checks:[],typeName:O.ZodBigInt,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...q(r)})};class Wt extends U{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.boolean,received:a.parsedType}),N}return me(t.data)}}Wt.create=r=>new Wt({typeName:O.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...q(r)});class st extends U{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.date,received:i.parsedType}),N}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_date}),N}const a=new pe;let n;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),T(n,{code:y.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),T(n,{code:y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):V.assertNever(i);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new st({...this._def,checks:[...this._def.checks,t]})}min(t,a){return this._addCheck({kind:"min",value:t.getTime(),message:S.toString(a)})}max(t,a){return this._addCheck({kind:"max",value:t.getTime(),message:S.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}}st.create=r=>new st({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:O.ZodDate,...q(r)});class Zr extends U{_parse(t){if(this._getType(t)!==A.symbol){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.symbol,received:a.parsedType}),N}return me(t.data)}}Zr.create=r=>new Zr({typeName:O.ZodSymbol,...q(r)});class Qt extends U{_parse(t){if(this._getType(t)!==A.undefined){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.undefined,received:a.parsedType}),N}return me(t.data)}}Qt.create=r=>new Qt({typeName:O.ZodUndefined,...q(r)});class Xt extends U{_parse(t){if(this._getType(t)!==A.null){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.null,received:a.parsedType}),N}return me(t.data)}}Xt.create=r=>new Xt({typeName:O.ZodNull,...q(r)});class xt extends U{constructor(){super(...arguments),this._any=!0}_parse(t){return me(t.data)}}xt.create=r=>new xt({typeName:O.ZodAny,...q(r)});class lt extends U{constructor(){super(...arguments),this._unknown=!0}_parse(t){return me(t.data)}}lt.create=r=>new lt({typeName:O.ZodUnknown,...q(r)});class qe extends U{_parse(t){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.never,received:a.parsedType}),N}}qe.create=r=>new qe({typeName:O.ZodNever,...q(r)});class Gr extends U{_parse(t){if(this._getType(t)!==A.undefined){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.void,received:a.parsedType}),N}return me(t.data)}}Gr.create=r=>new Gr({typeName:O.ZodVoid,...q(r)});class xe extends U{_parse(t){const{ctx:a,status:n}=this._processInputParams(t),i=this._def;if(a.parsedType!==A.array)return T(a,{code:y.invalid_type,expected:A.array,received:a.parsedType}),N;if(i.exactLength!==null){const s=a.data.length>i.exactLength.value,l=a.data.length<i.exactLength.value;(s||l)&&(T(a,{code:s?y.too_big:y.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&&(T(a,{code:y.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&&(T(a,{code:y.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 De(a,s,a.path,l)))).then(s=>pe.mergeArray(n,s));const o=[...a.data].map((s,l)=>i.type._parseSync(new De(a,s,a.path,l)));return pe.mergeArray(n,o)}get element(){return this._def.type}min(t,a){return new xe({...this._def,minLength:{value:t,message:S.toString(a)}})}max(t,a){return new xe({...this._def,maxLength:{value:t,message:S.toString(a)}})}length(t,a){return new xe({...this._def,exactLength:{value:t,message:S.toString(a)}})}nonempty(t){return this.min(1,t)}}xe.create=(r,t)=>new xe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:O.ZodArray,...q(t)});function $t(r){if(r instanceof ne){const t={};for(const a in r.shape){const n=r.shape[a];t[a]=Oe.create($t(n))}return new ne({...r._def,shape:()=>t})}else return r instanceof xe?new xe({...r._def,type:$t(r.element)}):r instanceof Oe?Oe.create($t(r.unwrap())):r instanceof Xe?Xe.create($t(r.unwrap())):r instanceof Pe?Pe.create(r.items.map(t=>$t(t))):r}class ne extends U{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=V.objectKeys(t);return this._cached={shape:t,keys:a}}_parse(t){if(this._getType(t)!==A.object){const c=this._getOrReturnCtx(t);return T(c,{code:y.invalid_type,expected:A.object,received:c.parsedType}),N}const{status:a,ctx:n}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof qe&&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 De(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof qe){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&&(T(n,{code:y.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 De(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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>pe.mergeObjectSync(a,c)):pe.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(t){return S.errToObj,new ne({...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=S.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new ne({...this._def,unknownKeys:"strip"})}passthrough(){return new ne({...this._def,unknownKeys:"passthrough"})}extend(t){return new ne({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ne({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:O.ZodObject})}setKey(t,a){return this.augment({[t]:a})}catchall(t){return new ne({...this._def,catchall:t})}pick(t){const a={};return V.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(a[n]=this.shape[n])}),new ne({...this._def,shape:()=>a})}omit(t){const a={};return V.objectKeys(this.shape).forEach(n=>{t[n]||(a[n]=this.shape[n])}),new ne({...this._def,shape:()=>a})}deepPartial(){return $t(this)}partial(t){const a={};return V.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?a[n]=i:a[n]=i.optional()}),new ne({...this._def,shape:()=>a})}required(t){const a={};return V.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])a[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Oe;)i=i._def.innerType;a[n]=i}}),new ne({...this._def,shape:()=>a})}keyof(){return di(V.objectKeys(this.shape))}}ne.create=(r,t)=>new ne({shape:()=>r,unknownKeys:"strip",catchall:qe.create(),typeName:O.ZodObject,...q(t)}),ne.strictCreate=(r,t)=>new ne({shape:()=>r,unknownKeys:"strict",catchall:qe.create(),typeName:O.ZodObject,...q(t)}),ne.lazycreate=(r,t)=>new ne({shape:r,unknownKeys:"strip",catchall:qe.create(),typeName:O.ZodObject,...q(t)});class Jt extends U{_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 Te(l.ctx.common.issues));return T(a,{code:y.invalid_union,unionErrors:s}),N}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 Te(c));return T(a,{code:y.invalid_union,unionErrors:l}),N}}get options(){return this._def.options}}Jt.create=(r,t)=>new Jt({options:r,typeName:O.ZodUnion,...q(t)});const We=r=>r instanceof rr?We(r.schema):r instanceof $e?We(r.innerType()):r instanceof ar?[r.value]:r instanceof Qe?r.options:r instanceof nr?V.objectValues(r.enum):r instanceof ir?We(r._def.innerType):r instanceof Qt?[void 0]:r instanceof Xt?[null]:r instanceof Oe?[void 0,...We(r.unwrap())]:r instanceof Xe?[null,...We(r.unwrap())]:r instanceof Ra||r instanceof lr?We(r.unwrap()):r instanceof or?We(r._def.innerType):[];class Kr extends U{_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==A.object)return T(a,{code:y.invalid_type,expected:A.object,received:a.parsedType}),N;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}):(T(a,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),N)}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=We(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 Kr({typeName:O.ZodDiscriminatedUnion,discriminator:t,options:a,optionsMap:i,...q(n)})}}function Ba(r,t){const a=Ve(r),n=Ve(t);if(r===t)return{valid:!0,data:r};if(a===A.object&&n===A.object){const i=V.objectKeys(t),o=V.objectKeys(r).filter(l=>i.indexOf(l)!==-1),s={...r,...t};for(const l of o){const c=Ba(r[l],t[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}else if(a===A.array&&n===A.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=Ba(s,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return a===A.date&&n===A.date&&+r==+t?{valid:!0,data:r}:{valid:!1}}class er extends U{_parse(t){const{status:a,ctx:n}=this._processInputParams(t),i=(o,s)=>{if(Na(o)||Na(s))return N;const l=Ba(o.value,s.value);return l.valid?((Ia(o)||Ia(s))&&a.dirty(),{status:a.value,value:l.data}):(T(n,{code:y.invalid_intersection_types}),N)};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}))}}er.create=(r,t,a)=>new er({left:r,right:t,typeName:O.ZodIntersection,...q(a)});class Pe extends U{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==A.array)return T(n,{code:y.invalid_type,expected:A.array,received:n.parsedType}),N;if(n.data.length<this._def.items.length)return T(n,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N;!this._def.rest&&n.data.length>this._def.items.length&&(T(n,{code:y.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 De(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>pe.mergeArray(a,o)):pe.mergeArray(a,i)}get items(){return this._def.items}rest(t){return new Pe({...this._def,rest:t})}}Pe.create=(r,t)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pe({items:r,typeName:O.ZodTuple,rest:null,...q(t)})};class tr extends U{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!==A.object)return T(n,{code:y.invalid_type,expected:A.object,received:n.parsedType}),N;const i=[],o=this._def.keyType,s=this._def.valueType;for(const l in n.data)i.push({key:o._parse(new De(n,l,n.path,l)),value:s._parse(new De(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?pe.mergeObjectAsync(a,i):pe.mergeObjectSync(a,i)}get element(){return this._def.valueType}static create(t,a,n){return a instanceof U?new tr({keyType:t,valueType:a,typeName:O.ZodRecord,...q(n)}):new tr({keyType:Ee.create(),valueType:t,typeName:O.ZodRecord,...q(a)})}}class zr extends U{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!==A.map)return T(n,{code:y.invalid_type,expected:A.map,received:n.parsedType}),N;const i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([l,c],u)=>({key:i._parse(new De(n,l,n.path,[u,"key"])),value:o._parse(new De(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 N;(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 N;(u.status==="dirty"||d.status==="dirty")&&a.dirty(),l.set(u.value,d.value)}return{status:a.value,value:l}}}}zr.create=(r,t,a)=>new zr({valueType:t,keyType:r,typeName:O.ZodMap,...q(a)});class ct extends U{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==A.set)return T(n,{code:y.invalid_type,expected:A.set,received:n.parsedType}),N;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(T(n,{code:y.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&&(T(n,{code:y.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 N;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 De(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>s(c)):s(l)}min(t,a){return new ct({...this._def,minSize:{value:t,message:S.toString(a)}})}max(t,a){return new ct({...this._def,maxSize:{value:t,message:S.toString(a)}})}size(t,a){return this.min(t,a).max(t,a)}nonempty(t){return this.min(1,t)}}ct.create=(r,t)=>new ct({valueType:r,minSize:null,maxSize:null,typeName:O.ZodSet,...q(t)});class Lt extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==A.function)return T(a,{code:y.invalid_type,expected:A.function,received:a.parsedType}),N;function n(l,c){return qr({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Rr(),Et].filter(u=>!!u),issueData:{code:y.invalid_arguments,argumentsError:c}})}function i(l,c){return qr({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Rr(),Et].filter(u=>!!u),issueData:{code:y.invalid_return_type,returnTypeError:c}})}const o={errorMap:a.common.contextualErrorMap},s=a.data;if(this._def.returns instanceof St){const l=this;return me(async function(...c){const u=new Te([]),d=await l._def.args.parseAsync(c,o).catch(h=>{throw u.addIssue(n(c,h)),u}),f=await Reflect.apply(s,this,d);return await l._def.returns._def.type.parseAsync(f,o).catch(h=>{throw u.addIssue(i(f,h)),u})})}else{const l=this;return me(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new Te([n(c,u.error)]);const d=Reflect.apply(s,this,u.data),f=l._def.returns.safeParse(d,o);if(!f.success)throw new Te([i(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Lt({...this._def,args:Pe.create(t).rest(lt.create())})}returns(t){return new Lt({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,a,n){return new Lt({args:t||Pe.create([]).rest(lt.create()),returns:a||lt.create(),typeName:O.ZodFunction,...q(n)})}}class rr extends U{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})}}rr.create=(r,t)=>new rr({getter:r,typeName:O.ZodLazy,...q(t)});class ar extends U{_parse(t){if(t.data!==this._def.value){const a=this._getOrReturnCtx(t);return T(a,{received:a.data,code:y.invalid_literal,expected:this._def.value}),N}return{status:"valid",value:t.data}}get value(){return this._def.value}}ar.create=(r,t)=>new ar({value:r,typeName:O.ZodLiteral,...q(t)});function di(r,t){return new Qe({values:r,typeName:O.ZodEnum,...q(t)})}class Qe extends U{constructor(){super(...arguments),Ht.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const a=this._getOrReturnCtx(t),n=this._def.values;return T(a,{expected:V.joinValues(n),received:a.parsedType,code:y.invalid_type}),N}if(Ur(this,Ht)||oi(this,Ht,new Set(this._def.values)),!Ur(this,Ht).has(t.data)){const a=this._getOrReturnCtx(t),n=this._def.values;return T(a,{received:a.data,code:y.invalid_enum_value,options:n}),N}return me(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 Qe.create(t,{...this._def,...a})}exclude(t,a=this._def){return Qe.create(this.options.filter(n=>!t.includes(n)),{...this._def,...a})}}Ht=new WeakMap,Qe.create=di;class nr extends U{constructor(){super(...arguments),Yt.set(this,void 0)}_parse(t){const a=V.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==A.string&&n.parsedType!==A.number){const i=V.objectValues(a);return T(n,{expected:V.joinValues(i),received:n.parsedType,code:y.invalid_type}),N}if(Ur(this,Yt)||oi(this,Yt,new Set(V.getValidEnumValues(this._def.values))),!Ur(this,Yt).has(t.data)){const i=V.objectValues(a);return T(n,{received:n.data,code:y.invalid_enum_value,options:i}),N}return me(t.data)}get enum(){return this._def.values}}Yt=new WeakMap,nr.create=(r,t)=>new nr({values:r,typeName:O.ZodNativeEnum,...q(t)});class St extends U{unwrap(){return this._def.type}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==A.promise&&a.common.async===!1)return T(a,{code:y.invalid_type,expected:A.promise,received:a.parsedType}),N;const n=a.parsedType===A.promise?a.data:Promise.resolve(a.data);return me(n.then(i=>this._def.type.parseAsync(i,{path:a.path,errorMap:a.common.contextualErrorMap})))}}St.create=(r,t)=>new St({type:r,typeName:O.ZodPromise,...q(t)});class $e extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===O.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=>{T(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 N;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?N:c.status==="dirty"||a.value==="dirty"?Fr(c.value):c});{if(a.value==="aborted")return N;const l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?N:l.status==="dirty"||a.value==="dirty"?Fr(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"?N:(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"?N:(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(!zt(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=>zt(s)?Promise.resolve(i.transform(s.value,o)).then(l=>({status:a.value,value:l})):s);V.assertNever(i)}}$e.create=(r,t,a)=>new $e({schema:r,typeName:O.ZodEffects,effect:t,...q(a)}),$e.createWithPreprocess=(r,t,a)=>new $e({schema:t,effect:{type:"preprocess",transform:r},typeName:O.ZodEffects,...q(a)});class Oe extends U{_parse(t){return this._getType(t)===A.undefined?me(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oe.create=(r,t)=>new Oe({innerType:r,typeName:O.ZodOptional,...q(t)});class Xe extends U{_parse(t){return this._getType(t)===A.null?me(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xe.create=(r,t)=>new Xe({innerType:r,typeName:O.ZodNullable,...q(t)});class ir extends U{_parse(t){const{ctx:a}=this._processInputParams(t);let n=a.data;return a.parsedType===A.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}ir.create=(r,t)=>new ir({innerType:r,typeName:O.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...q(t)});class or extends U{_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 Vt(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Te(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Te(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}or.create=(r,t)=>new or({innerType:r,typeName:O.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...q(t)});class Vr extends U{_parse(t){if(this._getType(t)!==A.nan){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.nan,received:a.parsedType}),N}return{status:"valid",value:t.data}}}Vr.create=r=>new Vr({typeName:O.ZodNaN,...q(r)});const yp=Symbol("zod_brand");class Ra extends U{_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 sr extends U{_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"?N:i.status==="dirty"?(a.dirty(),Fr(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"?N: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 sr({in:t,out:a,typeName:O.ZodPipeline})}}class lr extends U{_parse(t){const a=this._def.innerType._parse(t),n=i=>(zt(i)&&(i.value=Object.freeze(i.value)),i);return Vt(a)?a.then(i=>n(i)):n(a)}unwrap(){return this._def.innerType}}lr.create=(r,t)=>new lr({innerType:r,typeName:O.ZodReadonly,...q(t)});function pi(r,t={},a){return r?xt.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})}}):xt.create()}const hp={object:ne.lazycreate};var O;(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"})(O||(O={}));const bp=(r,t={message:`Input not instance of ${r.name}`})=>pi(a=>a instanceof r,t),gi=Ee.create,mi=He.create,vp=Vr.create,Tp=Ye.create,fi=Wt.create,jp=st.create,_p=Zr.create,Ap=Qt.create,wp=Xt.create,Ep=xt.create,xp=lt.create,$p=qe.create,Lp=Gr.create,Sp=xe.create,Cp=ne.create,kp=ne.strictCreate,Dp=Jt.create,Pp=Kr.create,Op=er.create,Np=Pe.create,Ip=tr.create,Mp=zr.create,Bp=ct.create,Rp=Lt.create,qp=rr.create,Fp=ar.create,Up=Qe.create,Zp=nr.create,Gp=St.create,yi=$e.create,Kp=Oe.create,zp=Xe.create,Vp=$e.createWithPreprocess,Hp=sr.create;var e=Object.freeze({__proto__:null,defaultErrorMap:Et,setErrorMap:Jd,getErrorMap:Rr,makeIssue:qr,EMPTY_PATH:ep,addIssueToContext:T,ParseStatus:pe,INVALID:N,DIRTY:Fr,OK:me,isAborted:Na,isDirty:Ia,isValid:zt,isAsync:Vt,get util(){return V},get objectUtil(){return Oa},ZodParsedType:A,getParsedType:Ve,ZodType:U,datetimeRegex:ui,ZodString:Ee,ZodNumber:He,ZodBigInt:Ye,ZodBoolean:Wt,ZodDate:st,ZodSymbol:Zr,ZodUndefined:Qt,ZodNull:Xt,ZodAny:xt,ZodUnknown:lt,ZodNever:qe,ZodVoid:Gr,ZodArray:xe,ZodObject:ne,ZodUnion:Jt,ZodDiscriminatedUnion:Kr,ZodIntersection:er,ZodTuple:Pe,ZodRecord:tr,ZodMap:zr,ZodSet:ct,ZodFunction:Lt,ZodLazy:rr,ZodLiteral:ar,ZodEnum:Qe,ZodNativeEnum:nr,ZodPromise:St,ZodEffects:$e,ZodTransformer:$e,ZodOptional:Oe,ZodNullable:Xe,ZodDefault:ir,ZodCatch:or,ZodNaN:Vr,BRAND:yp,ZodBranded:Ra,ZodPipeline:sr,ZodReadonly:lr,custom:pi,Schema:U,ZodSchema:U,late:hp,get ZodFirstPartyTypeKind(){return O},coerce:{string:r=>Ee.create({...r,coerce:!0}),number:r=>He.create({...r,coerce:!0}),boolean:r=>Wt.create({...r,coerce:!0}),bigint:r=>Ye.create({...r,coerce:!0}),date:r=>st.create({...r,coerce:!0})},any:Ep,array:Sp,bigint:Tp,boolean:fi,date:jp,discriminatedUnion:Pp,effect:yi,enum:Up,function:Rp,instanceof:bp,intersection:Op,lazy:qp,literal:Fp,map:Mp,nan:vp,nativeEnum:Zp,never:$p,null:wp,nullable:zp,number:mi,object:Cp,oboolean:()=>fi().optional(),onumber:()=>mi().optional(),optional:Kp,ostring:()=>gi().optional(),pipeline:Hp,preprocess:Vp,promise:Gp,record:Ip,set:Bp,strictObject:kp,string:gi,symbol:_p,transformer:yi,tuple:Np,undefined:Ap,union:Dp,unknown:xp,void:Lp,NEVER:N,ZodIssueCode:y,quotelessJson:Xd,ZodError:Te});const cr=e.string(),Yp=e.object({elementType:e.string().optional(),locator:cr.optional(),errors:e.array(e.string()).optional()}),Ct=e.object({validationItems:e.array(Yp).optional(),success:e.boolean().optional()}),Hr=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 Wp=e.enum(["generateDay","termStartDay","dueDay"]),Qp=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),qa=e.enum(["account","inherit","policy"]),Xp=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),Jp=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),eg=e.enum(["none","first","second","third","fourth","fifth"]),hi=e.object({billingPreferences:e.object({billingPlanName:e.string().optional(),billingLevel:qa.optional()}).optional(),installmentPreferences:e.object({installmentPlanName:e.string().optional(),anchorMode:Wp.optional(),anchorTime:e.string().optional(),anchorType:Qp.optional(),cadence:Xp.optional(),dayOfMonth:e.number().optional(),dayOfWeek:Jp.optional(),dueLeadDays:e.number().optional(),generateLeadDays:e.number().optional(),maxInstallmentsPerTerm:e.number().optional(),weekOfMonth:eg.optional()}).optional()}),Fa=e.enum(["quote","policy","invoice","transaction","segment","term"]),Ua=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),bi=e.enum(["info","block","decline","reject","approve"]),ur=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:bi.optional(),note:e.string().optional()}),tg=e.object({elementLocator:e.string(),level:bi,note:e.string().optional()});e.object({addFlags:tg.array(),clearFlags:e.string().array()});const vi=e.enum(["none","blocked","declined","rejected","approved"]),Za=e.enum(["years","months","weeks","days","hours"]),rg=e.object({column:e.string(),table:e.string(),where:e.record(e.object({key:e.string().optional()})).optional()}).optional(),ut=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:rg,tag:e.array(e.string()).optional()});e.record(ut);const ag=e.object({displayName:e.string().optional(),abstract:e.boolean().optional(),extend:e.string().optional(),data:e.record(ut).optional(),defaultSearchable:e.boolean().optional()}),ng=e.record(ag),ig=e.object({defaultDeadlineDays:e.number(),blocksUnderwriting:e.boolean()}),og=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())}),sg=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()}),lg=e.object({displayName:e.string(),expirationPeriod:e.number()}),Yr=e.object({availableAfter:e.string(),availabilityTimeBasis:e.string(),retireAfter:e.string(),retire:e.boolean(),retirementTimeBasis:e.string(),removeOnRenewalAfter:e.string(),removeOnRenewal:e.boolean()}),cg=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 Ti=e.object({status:e.union([e.literal("queued"),e.literal("failed")]),error:e.string()});e.union([e.literal("queued"),e.literal("failed")]);const ug=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 dg=e.object({extend:e.string(),claimCategory:e.string(),abstract:e.boolean()}),pg=e.object({dataType:e.string(),isKey:e.boolean()}),gg=e.object({key:e.string(),values:e.array(e.string())}),Ga=e.object({version1:e.string(),version2:e.string(),plugins:e.record(e.record(e.string())),latestVersion:e.string()}),mg=e.object({activities:e.record(e.record(ig)),assignmentRoles:e.record(og),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 fg=e.object({dataType:e.string(),makeDistinct:e.boolean()}),yg=e.object({columns:e.record(fg),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 hg=e.object({displayName:e.string(),value:e.number(),tag:e.string()});e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]);const bg=e.object({type:e.string()}),ji=e.object({fields:e.array(e.string())}),vg=e.object({enabled:e.boolean(),account:ji,policy:ji,productIndex:e.record(e.number()),regionIndex:e.record(e.number())}),Tg=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 jg=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(Tg)});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:Ga,pluginVersionStatus:e.record(e.record(e.string()))});const Ka=e.object({isSuccess:e.boolean(),errors:e.array(e.string()),metadata:Ga});e.union([e.literal("queued"),e.literal("failed")]);const _g=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 Ag=e.object({disburseExcess:e.boolean(),disbursementType:e.string(),excludeDebits:e.string(),disbursementThresholds:e.record(e.number())}),_i=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 wg=e.object({lossCategory:e.string()}),Eg=e.object({added:e.record(e.record(e.unknown())),modified:e.record(e.record(e.unknown())),removed:e.record(e.record(e.unknown()))}),xg=e.object({displayName:e.string(),initialCoreNumber:e.string(),format:e.string(),copyFromQuote:e.boolean(),termNumberFormat:e.string(),quoteNumberFormat:e.string(),initialQuoteCoreNumber:e.string()}),$g=e.object({dataType:e.string()}),Lg=e.object({table:e.string(),column:e.string(),where:e.record(gg)}),Ne=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:Lg,searchable:e.boolean(),availability:Yr.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 Sg=e.object({displayName:e.string(),numberingString:e.string()}),Cg=e.object({selectionStartTime:e.string(),resourceNames:e.array(e.string())}),kg=e.object({staticName:e.string()}),Dg=e.object({resourceInstances:e.record(kg),resourceGroups:e.record(Cg)}),Pg=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 Og=e.object({items:e.record($g)}),Ng=e.object({currencyTolerances:e.record(e.number())});e.record(e.unknown());const Ig=e.object({columns:e.record(pg),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")])}),Mg=e.object({locator:e.string(),name:e.string(),deploymentResult:Ka,bootstrapResult:Ti}),Bg=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:Ka,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(Eg),e.object({resolve:e.boolean().optional(),version:e.string()}),e.object({resolve:e.boolean().optional()});const Rg=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(Ne),defaultInvoiceDocument:e.string(),numberingPlan:e.string(),invoiceNumberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),qg=e.object({resources:Dg}),Fg=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(Ne),abstract:e.boolean()}),Ug=e.object({type:e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]),displayName:e.string(),options:e.record(hg),value:Ne,availability:Yr.optional()}),Zg=e.object({displayName:e.string(),extend:e.string(),data:e.record(Ne),defaultSearchable:e.boolean(),abstract:e.boolean()}),Ai=e.object({displayName:e.string(),extend:e.string(),data:e.record(Ne),numberingPlan:e.string(),abstract:e.boolean()}),wi=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:_g.optional()}),Wr=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(Ne),availability:Yr.optional(),abstract:e.boolean()}),Gg=e.object({extend:e.string(),lossType:e.string(),defaultSearchable:e.boolean(),data:e.record(Ne),numberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),Kg=e.object({displayName:e.string(),extend:e.string(),data:e.record(Ne),abstract:e.boolean()}),zg=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(Ne),staticData:e.record(Ne),defaultSearchable:e.boolean(),pluralType:e.string(),defaultBillingTrigger:e.union([e.literal("accept"),e.literal("issue")]),numberingPlan:e.string().optional(),numberingString:e.string().optional(),availability:Yr.optional(),withPrecommitReapplication:e.boolean().optional(),abstract:e.boolean()}),dt=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(Sg),defaultRegion:e.string(),defaultSearchable:e.boolean(),dataTypes:e.record(Zg),accounts:e.record(Rg),policyLines:e.record(Wr),exposureGroups:e.record(Wr),exposures:e.record(Wr),coverages:e.record(Wr),products:e.record(zg),coverageTerms:e.record(Ug),charges:e.record(ug),transactionTypes:e.record(Bg),installmentPlans:e.record(_i),billingPlans:e.record(cg),payments:e.record(Kg),disbursements:e.record(Ai),tables:e.record(Ig),constraintTables:e.record(yg),secrets:e.record(Og),documents:e.record(wi),auxDataSettings:e.record(lg),customEvents:e.record(bg),delinquencyPlans:e.record(jg),shortfallTolerancePlans:e.record(Ng),autoRenewalPlans:e.record(sg),excessCreditPlans:e.record(Ag),reversalTypes:e.record(Pg),numberingPlans:e.record(xg),fnol:e.record(Gg),claims:e.record(dg),losses:e.record(wg),contacts:e.record(Fg),contactRoles:e.array(e.string()),workManagement:mg,dataAccessControl:vg,bootstrap:qg,defaultInvoiceDocument:e.string()});e.object({formData:dt.optional()}),e.object({formData:dt.optional()}),e.object({formData:dt.optional()}),e.object({formData:dt.optional(),overwrite:e.boolean().optional()}),e.object({description:e.string().optional(),formData:dt.optional(),name:e.string().optional()}),e.object({config:dt}),e.object({formData:dt.optional()});const Vg=e.enum(["none","required","excluded"]),Ei=e.enum(["generateDay","termStartDay","dueDay"]),Hg=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),dr=e.enum(["accept","issue"]),kt=e.enum(["account","inherit","policy"]),xi=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),Yg=e.enum(["add","delete","modify","params"]),Wg=e.enum(["none","premium","tax","fee","credit","commission","flatPremium","flatTax","flatFee","flatCommission","cededPremium","flatCededPremium","nonFinancial","surcharge"]),pr=e.enum(["none","years","months","monthsE360","weeks","days","hours"]),Qg=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),Xg=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),Jg=e.enum(["product","coverage","exposure","exposureGroup","policyLine"]),em=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 Fe=(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))(Fe||{});const $i=e.enum(["quote","policy","invoice","transaction","segment","term"]),Li=e.enum(["unspecified","account","quote","policy"]),tm=e.enum(["coverage","gap"]),za=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),Va=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),rm=e.enum(["quote","transaction"]),Si=e.enum(["none","info","block","decline","reject","approve"]),am=e.enum(["none","first","second","third","fourth","fifth"]);e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]);const Ha=e.enum(["text","html","pdf","jpg","jpeg","doc","docx","xls","xlsx","csv","txt","zip"]),Ya=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),nm=e.enum(["clear","delete"]),im=e.enum(["draft","validated","approved","executed","reversed","rejected","discarded"]),om=e.enum(["invoice","account"]),Wa=e.enum(["ach","cash","eft","standard","wire"]),sm=e.enum(["transaction","policy","term","segment","policyUnique","termUnique","invoice"]),lm=e.enum(["policyStartTime","termStartTime","transactionEffectiveTime","currentTime"]),cm=e.enum(["validated","priced","accepted","issued","underwritten","generated"]),um=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),dm=e.enum(["active","pastDeadline","completed","cancelled"]),Ci=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),pm=e.enum(["active","completed","unassigned","discarded"]),gm=e.enum(["quote","policy","transaction","activity","fnol"]),mm=e.enum(["active","discarded","locked"]),fm=Ai.merge(e.object({displayName:e.string().optional(),numberingPlan:e.string().optional(),data:e.record(e.any()).optional(),extend:e.string().optional()})),ym=e.record(fm),hm=wi.merge(e.object({displayName:e.string().optional(),scope:sm,format:Ha.optional(),selectionTimeBasis:lm.optional(),trigger:cm.optional()})),bm=e.record(hm),vm=_i.merge(e.object({displayName:e.string().optional(),cadence:xi,anchorMode:Ei.optional(),generateLeadDays:e.number().optional(),dueLeadDays:e.number().optional(),installmentWeights:e.array(e.number()).optional(),maxInstallmentsPerTerm:e.number().optional()})),Tm=e.record(vm),jm=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()}),_m=e.record(jm),Am=e.object({selectionStartTime:e.string().optional(),resourceNames:e.array(e.string()).optional()}),wm=e.object({staticName:e.string().optional()}),Em=e.object({resourceGroups:e.record(Am).optional(),resourceInstances:e.record(wm).optional()}),xm=e.object({resources:Em.optional()}),$m=e.record(e.object({columns:e.record(e.object({dataType:e.string()})).optional(),selectionTimeBasis:e.string().optional()})),Lm=e.object({displayName:e.string().optional(),value:e.number().optional(),tag:e.string().optional()}),Sm=e.object({type:e.string(),displayName:e.string().optional(),options:e.record(Lm)}),Cm=e.record(Sm),km=e.enum(["policy","invoice"]),Dm=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),Pm=e.object({displayName:e.string().optional(),gracePeriodDays:e.number(),advanceLapseTo:Dm.optional(),delinquencyLevel:km.optional(),lapseTransactionType:e.string().optional(),events:e.record(e.any()).optional()}),Om=e.record(Pm),Nm=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(ut).optional(),charges:e.array(e.string()).optional(),defaultSearchable:e.boolean().optional()}),gr=e.record(Nm),Im=e.object({abstract:e.boolean(),extend:e.string().optional(),data:e.record(ut).optional(),displayName:e.string().optional()}),Mm=e.record(Im),Bm=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()}),Rm=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(ut).optional(),staticData:e.record(ut).optional(),defaultSearchable:e.boolean().optional()}).merge(Bm),qm=e.record(Rm),Fm=e.enum(["any","creditDistribution","payment"]),Um=e.object({creditType:Fm.optional()}),Zm=e.record(Um),Gm=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),Km=e.object({category:Gm,costBearing:e.boolean()}),zm=e.record(Km);e.object({dataTypes:gr.optional(),accounts:ng,products:qm,coverageTerms:Cm.optional(),delinquencyPlans:Om,autoRenewalPlans:_m,transactionTypes:zm.optional(),reversalTypes:Zm.optional(),dataAccessControl:e.any().optional(),bootstrap:xm.optional(),constraintTables:$m.optional(),payments:Mm.optional(),documents:bm.optional(),disbursements:ym.optional(),installmentPlans:Tm.optional(),policyLines:gr.optional(),exposures:gr.optional(),exposureGroups:gr.optional(),coverages:gr.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:Za.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 Vm=e.object({abstract:e.boolean().optional(),extend:e.string().optional(),displayName:e.string().optional(),data:e.record(ut).optional()});e.record(Vm);const Hm=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),ki=e.union([Hm,e.string()]),Qr=Za,Ym=e.enum(["accept","issue"]),Wm=qa;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 Di=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()});Di.extend({elements:e.array(Di).optional()});const Qa=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(Qa).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 mr=e.string().ulid(),Qm=e.object({locator:mr,staticLocator:mr,rootLocator:mr.optional(),tenantLocator:mr.optional(),type:e.string(),data:e.record(e.any()).optional(),parentLocator:mr.optional(),coverageTerms:e.record(e.string()).optional(),originalEffectiveTime:e.string().optional()}),Xa=Qm.extend({elements:e.lazy(()=>Xa.array().optional())});e.object({locator:cr,quoteState:ki,productName:e.string(),accountLocator:cr,startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:vi.optional(),expirationTime:e.string().optional(),element:Xa.optional(),type:e.string().optional(),duration:e.number().optional(),durationBasis:Qr.optional(),boundTime:e.string().optional(),issuedTime:e.string().optional(),policyLocator:cr.optional(),validationResult:Ct.optional(),preferences:e.any().optional(),delinquencyPlanName:e.string().optional(),autoRenewalPlanName:e.string().optional(),billingLevel:Wm.optional(),billingTrigger:Ym.optional(),coverageTerms:e.record(e.string()).optional(),groupLocator:cr.optional()});const Xm=e.enum(["premium","tax","fee","credit","cededPremium","nonFinancial","surcharge"]),Jm=e.object({locator:e.string(),elementLocator:e.string(),chargeType:e.string(),chargeCategory:Xm,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:ki,productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number().optional(),durationBasis:Qr.optional(),items:e.array(Jm).optional()}),e.object({quoteLocator:e.string(),clearedFlags:ur.array().optional(),flags:ur.array().optional()});const ef=e.enum(["clear","delete"]);e.object({deleteAllAutomaticDocuments:e.boolean(),resetAllUnderwritingFlags:e.boolean(),resetFlagsAction:ef,deleteDocuments:e.string().array(),resetFlags:e.string().array()});const Ja=e.object({accountLocator:e.string()});e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const Xr=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 fr=e.object({action:e.string()}),_e=e.lazy(()=>e.object({type:e.string(),locator:e.string(),parentLocator:e.string(),elements:e.array(_e),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 Pi=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 Oi=e.object({billingPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]).optional()}),Jr=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 tf=e.object({staticLocator:e.string(),fieldName:e.string(),values:e.array(e.string())}),en=e.object({table:e.string(),column:e.string(),where:e.record(tf)}),rf=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),af=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()}),yr=fr.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())})),nf=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 of=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),data:e.record(e.record(e.unknown())),chargeSummaries:e.record(e.number())}),Ni=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 sf=e.object({historyLocator:e.string(),staticData:e.record(e.record(e.unknown())),updatedBy:e.string(),updatedAt:e.string()}),hr=fr.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:Ni.optional(),billingPreferences:Oi.optional()}),lf=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()}),ea=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()))}),cf=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(ea)}),Ii=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(ea),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 tn=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 Mi=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 uf=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(_e),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(Jr),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 Bi=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(_e),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()}),df=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")])}),pf=e.object({quoteLocator:e.string()}),br=e.object({groupLocator:e.string()}),gf=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(Jr),quoteNumber:e.string()});e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]);const pt=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()}),mf=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(pt)}),rn=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 Dt=e.object({locator:e.string(),transactionLocator:e.string(),segmentType:e.union([e.literal("coverage"),e.literal("gap")]),startTime:e.string(),endTime:e.string(),element:_e,duration:e.number(),basedOn:e.string().optional()});e.union([e.literal("coverage"),e.literal("gap")]);const ff=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(of),documentSummary:e.array(nf)});e.union([e.literal("coverage"),e.literal("gap")]);const yf=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(ff)}),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 I=e.object({policyLocator:e.string(),transactionLocator:e.string()}),vr=e.object({policyLocator:e.string(),transactionLocator:e.string(),underwritingStatus:e.string()}),Tr=e.object({policyLocator:e.string(),transactionLocator:e.string()}),hf=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(Jr),aggregatedTransactions:e.array(hf)})),Ri=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:Dt}),bf=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(pt),aggregatedTransactions:e.array(bf)})),vf=e.object({transactionLocator:e.string(),flags:e.array(pt),clearedFlags:e.array(pt)}),qi=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 an=e.object({addFlags:e.array(qi),clearFlags:e.array(e.string())}),Fi=e.object({autoRenewalPlanName:e.string()}),Tf=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()}),ta=e.object({billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])}),jf=e.object({billingTrigger:e.union([e.literal("accept"),e.literal("issue")])}),nn=e.object({delinquencyPlanName:e.string()}),Ui=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),Je=e.object({validationItems:e.array(Ui),success:e.boolean()});e.object({locator:e.string(),requestBody:e.array(_e)}),e.array(Dt),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.array(Dt),e.object({locator:e.string(),requestBody:ea}),e.array(Dt);const jr=fr.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(_e).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(_e)})),gt=fr.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()})),_f=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:Je.optional(),changeInstructions:e.array(e.record(e.unknown())),effectiveTime:e.string(),aggregatedTransactions:e.array(_f),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 Zi=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:_e,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:Je.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:tn}),e.object({locator:e.string(),requestBody:e.array(_e)}),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.object({locator:e.string(),requestBody:e.array(_e)}),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:_e,validationResult:Je.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 Gi=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:Je.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:tn}),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:Je.optional()}),e.object({locator:e.string(),requestBody:Tf}),e.object({locator:e.string(),requestBody:lf}),e.object({locator:e.string()});const Af=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:Je.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(Xr),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")])}),Ki=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(Xr)}),wf=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:Bi}),e.object({locator:e.string(),quoteNumber:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:br.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:uf}),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:_e,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:Je.optional(),quickQuoteLocator:e.string().optional()}),e.object({locator:e.string(),requestBody:br.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:af}),e.object({requestBody:Ki}),e.object({accountNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({accountLocator:e.string()}),e.array(Xr),e.object({accountLocator:e.string(),requestBody:Xr}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:an}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:rn.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([jr,yr,hr,gt])}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Ii}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()});const Ef=e.object({quoteLocator:e.string(),flags:e.array(pt),clearedFlags:e.array(pt)});e.object({locator:e.string(),requestBody:an}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:rn.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:nn}),e.object({locator:e.string(),requestBody:ta}),e.object({locator:e.string(),requestBody:Fi}),e.object({locator:e.string(),requestBody:br}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:cf}),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:br}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([jr,yr,hr,gt])),transactionType:e.string()}),e.object({locator:e.string(),requestBody:Mi}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([jr,yr,hr,gt]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:gt.optional()}),e.object({locator:e.string(),requestBody:nn}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([jr,yr,hr,gt]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:gt}),e.object({locator:e.string(),requestBody:jf}),e.object({locator:e.string(),requestBody:ta}),e.object({locator:e.string(),requestBody:Fi}),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:ta}),e.object({accountLocator:e.string(),contactLocator:e.string()}),e.object({accountLocator:e.string(),contactLocator:e.string(),requestBody:rf}),e.object({locator:e.string()}),e.object({locator:e.string(),segmentLocator:e.string()}),e.object({locator:e.string()}),e.array(Dt),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.record(e.record(en)),e.object({locator:e.string()}),e.object({locator:e.string()}),e.array(Pi),e.object({locator:e.string()}),e.array(Pi),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(yf),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({listCompleted:e.boolean(),items:e.array(sf)}),e.object({locator:e.string()}),e.record(e.record(en)),e.object({quoteNumber:e.string()}),e.array(Zi),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(en)),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 zi=e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),timezone:e.string(),currency:e.string(),region:e.string(),transaction:Ri,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(zi),e.object({policyNumber:e.string()}),e.array(Gi);const xf=e.object({"policy.account.update":Ja.optional(),"policy.account.validate":Ja.optional(),"policy.account.create":Ja.optional()}),$f=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":df.optional(),"policy.quote.manualunderwrite":pf.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()}),Lf=e.object({"policy.renewal.accept":I.optional(),"policy.cancellation.reset":I.optional(),"policy.cancellation.issue":I.optional(),"policy.reversal.accept":I.optional(),"policy.cancellation.accept":I.optional(),"policy.change.discard":I.optional(),"policy.change.issue":I.optional(),"policy.cancellation.validate":I.optional(),"policy.reversal.underwrite":vr.optional(),"policy.cancellation.price":I.optional(),"policy.reversal.update":I.optional(),"policy.cancellation.refuse":I.optional(),"policy.change.accept":I.optional(),"policy.renewal.refuse":I.optional(),"policy.reinstatement.create":I.optional(),"policy.reinstatement.reset":I.optional(),"policy.renewal.underwrite":vr.optional(),"policy.reversal.reset":I.optional(),"policy.change.update":I.optional(),"policy.reversal.validate":I.optional(),"policy.change.refuse":I.optional(),"policy.reversal.issue":I.optional(),"policy.cancellation.update":I.optional(),"policy.change.manualUnderwrite":Tr.optional(),"policy.change.create":I.optional(),"policy.reinstatement.update":I.optional(),"policy.renewal.manualUnderwrite":Tr.optional(),"policy.reinstatement.discard":I.optional(),"policy.renewal.price":I.optional(),"policy.reversal.discard":I.optional(),"policy.reinstatement.price":I.optional(),"policy.change.validate":I.optional(),"policy.cancellation.underwrite":vr.optional(),"policy.change.underwrite":vr.optional(),"policy.renewal.validate":I.optional(),"policy.reinstatement.accept":I.optional(),"policy.reversal.price":I.optional(),"policy.cancellation.create":I.optional(),"policy.reinstatement.refuse":I.optional(),"policy.renewal.create":I.optional(),"policy.renewal.reset":I.optional(),"policy.cancellation.manualUnderwrite":Tr.optional(),"policy.change.price":I.optional(),"policy.cancellation.discard":I.optional(),"policy.renewal.update":I.optional(),"policy.renewal.issue":I.optional(),"policy.reinstatement.issue":I.optional(),"policy.change.reset":I.optional(),"policy.reversal.manualUnderwrite":Tr.optional(),"policy.reinstatement.underwrite":vr.optional(),"policy.reinstatement.validate":I.optional(),"policy.reinstatement.manualUnderwrite":Tr.optional(),"policy.reversal.refuse":I.optional(),"policy.renewal.discard":I.optional(),"policy.reversal.create":I.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(Af),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([jr,yr,hr,gt])}),e.object({locator:e.string(),requestBody:Ki}),e.object({locator:e.string(),requestBody:wf}),e.object({accountEvents:xf.optional(),quoteEvents:$f.optional(),transactionEvents:Lf.optional()});const ra=e.string().uuid(),M=e.string().ulid(),P=e.string().datetime();e.string().datetime({offset:!0});const Ue=e.record(e.string(),e.string()),J=e.record(e.string(),e.any()),Pt=ra,ee=ra,_r=M,et=M,Ot=M,Ze=M,aa=M,on=M,Vi=M,Ar=M,Sf=M,Hi=M,Yi=M,Wi=M;function tt(r){return e.object({listCompleted:e.boolean(),items:e.array(r)})}function Cf(r){return e.array(r)}const kf=Ui.merge(e.object({locator:et})),sn=Je.merge(e.object({validationItems:e.array(kf).optional()}));e.object({offset:e.coerce.number().nonnegative().int().optional(),count:e.coerce.number().nonnegative().int().optional()});const Df=e.object({type:e.string(),locator:et,staticLocator:M,parentLocator:et,originalEffectiveTime:P.optional(),category:Jg.optional(),data:J.optional(),coverageTerms:Ue.optional()}),Qi=Df.extend({elements:e.lazy(()=>Qi.array().optional())}),Pf=e.object({type:e.string(),staticLocator:M.optional(),parentLocator:et,data:J,coverageTerms:Ue}),ln=Pf.extend({elements:e.lazy(()=>ln.array().optional())}),Of=ea.merge(e.object({locator:et,setData:J,removeData:J,setCoverageTerms:Ue,removeCoverageTerms:J})),Nf=Dt.merge(e.object({locator:on,segmentType:tm,startTime:P,endTime:P,element:Qi,basedOn:M.optional()})),Xi=Gi.merge(e.object({locator:M,accountLocator:M,branchHeadTransactionLocators:e.array(M),issuedTransactionLocator:M,durationBasis:pr,createdAt:P,createdBy:ee,startTime:P,endTime:P,billingTrigger:dr,billingLevel:kt,latestSegmentLocator:M,static:J}));tt(Xi),tn.merge(e.object({setData:J,removeData:J}));const Ji=Ni.merge(e.object({cadence:xi.optional(),anchorMode:Ei.optional(),anchorType:Hg.optional(),dayOfWeek:Qg.optional(),weekOfMonth:am.optional(),installmentWeights:e.array(e.number()).optional()})),eo=Oi.merge(e.object({billingLevel:kt})),Nt=Le.merge(e.object({installmentPreferences:Ji.optional(),billingPreferences:eo.optional()})),If=Ri.merge(e.object({locator:M,transactionCategory:za,preferences:Nt,segment:Nf}));zi.merge(e.object({locator:M,accountLocator:M,static:J,transaction:If})),ta.merge(e.object({billing:kt})),nn.merge(e.object({})),Cf(Xi);const to=e.object({installmentPreferences:Ji.optional(),billingPreferences:eo.optional()});e.object({tenantLocator:Pt,policyLocator:Ot});const Mf=e.enum(["draft","validated","discarded"]),cn=e.enum(["account","policy"]),ro=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:cn.optional(),invoiceDocument:e.string().optional(),preferences:to.optional()});ro.extend({data:e.record(e.any()).optional()}),ro.extend({setData:e.record(e.any()).optional(),removeData:e.record(e.any()).optional()}),e.object({locator:e.string().ulid(),type:e.string(),accountState:Mf,data:e.record(e.any()).optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),excessCreditPlanName:e.string().optional(),shortfallTolerancePlanName:e.string().optional(),billingLevel:cn.optional(),invoiceDocument:e.string().optional(),validationResult:Ct.optional(),preferences:to.optional()}),e.enum(["","?","+","*","!"]),e.enum(["?","*"]);const un=Za,Bf=qa,Rf=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:un,billingLevel:Bf,billingTrigger:Rf,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:Ct.optional()});const dn=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),na=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),qf=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),element:Xa,segmentType:e.enum(["coverage","gap"]),basedOn:e.string().optional()}),Ff=e.object({locator:e.string(),issuedTime:e.string(),effectiveTime:e.string(),preferences:hi.optional(),segment:qf,transactionCategory:na,transactionType:e.string()}),ao=e.object({locator:e.string(),staticName:e.string().optional(),name:e.string().optional(),documentInstanceState:Ua,referenceType:Fa}),Uf=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()).optional(),data:e.record(e.any()).optional()}),Zf=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string().optional(),type:e.enum(["coverage","gap"]),documentSummary:ao.array().optional(),elements:Uf.array()});e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:un,termNumber:e.number().int(),subsegments:Zf.array().optional(),documentSummary:ao.array().optional()});const Gf=e.object({locator:e.string(),staticLocator:e.string(),name:e.string(),state:Ua,referenceType:Fa}),Kf=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()),data:e.record(e.any())}),zf=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string(),type:e.enum(["coverage","gap"]),documentSummary:Gf.array(),elements:Kf.array()}),no=e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string()});no.extend({number:e.number().int(),autoRenewalLocator:e.string().optional(),previousTermLocator:e.string().optional(),supersedesTermLocator:e.string().optional()}),no.extend({duration:e.number(),durationBasis:un,termNumber:e.number().int(),subsegments:zf.array()}),e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),currency:e.string(),timezone:e.string(),transaction:Ff,static:e.record(e.any()).optional(),delinquencyPlanName:e.string().optional()}),e.object({locator:e.string(),referenceLocator:e.string(),documentInstanceState:Ua,createdAt:e.string(),referenceType:Fa.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 io=e.object({locator:e.string(),policyLocator:e.string(),termLocator:e.string(),transactionState:dn,createdAt:e.string().datetime(),createdBy:e.string().uuid(),effectiveTime:e.string().datetime(),transactionCategory:na,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:hi.optional(),underwritingStatus:vi.optional(),validationResult:Ct.optional()});io.extend({aggregatedTransactions:e.lazy(()=>io.array().optional())}),e.object({action:e.literal("add"),elements:e.array(Qa).optional()}),e.object({locator:e.string(),action:e.literal("add"),elements:e.array(Qa).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 Vf=e.enum(["premium","tax","fee","credit","nonFinancial","surcharge"]),Hf=e.union([Vf,e.string()]),Yf=e.object({locator:e.string(),elementLocator:e.string(),elementStaticLocator:e.string(),amount:e.number(),chargeCategory:Hf,chargeType:e.string(),rate:e.number(),reversalOfLocator:e.string().optional(),rateDifference:e.number().optional(),tag:e.string().optional()}),oo=e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:na,transactionState:dn,effectiveTime:e.string(),termLocator:e.string().optional(),createdAt:e.string().optional(),createdBy:e.string().uuid().optional(),charges:e.array(Yf).optional()});oo.extend({aggregatedTransactions:e.array(oo).optional()});const so=e.object({locator:e.string(),policyLocator:e.string(),transactionState:dn,effectiveTime:e.string(),transactionCategory:na,underwritingStatus:e.string().optional(),underwritingFlags:ur.array().optional()});so.extend({aggregatedTransactions:e.array(so).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:ur.array().optional(),flags:ur.array().optional()});const Wf=e.enum(["open","settled"]),Qf=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:Wf,currency:Hr,dueTime:e.string(),generatedTime:e.string(),timezone:e.string(),invoiceItems:Qf.array(),totalAmount:e.number().optional(),totalRemainingAmount:e.number().optional(),unsettledTime:e.string().optional(),invoiceNumber:e.string().optional()});const Xf=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),Jf=e.enum(["policy","invoice"]),ey=e.enum(["preGrace","inGrace","lapseTriggered","settled"]);e.enum(["policy","quote","invoice"]);const ty=e.object({advanceLapseTo:Xf,gracePeriodDays:e.number(),lapseTransactionType:e.string(),delinquencyLevel:Jf.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:ey,createdAt:e.string(),settings:ty,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 ry=e.enum(["invoice","account"]),It=e.object({containerLocator:e.string(),containerType:ry,amount:e.number().optional()}),ay=e.enum(["ach","cash","eft","standard","wire"]),ny=e.enum(["draft","validated","posted","reversed","discarded"]);e.object({amount:e.number(),type:e.string(),useDefaultFinancialInstrument:e.boolean(),data:e.record(e.any()),targets:It.array(),accountLocator:e.string().optional(),financialInstrumentLocator:e.string().optional(),currency:e.string().optional(),transactionMethod:ay.optional(),transactionNumber:e.string().optional()}),e.object({locator:e.string(),currency:Hr,paymentState:ny,amount:e.number(),type:e.string(),data:e.record(e.any()).optional(),createdAt:e.string(),createdBy:e.string(),targets:It.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:Ct.optional()}),e.object({amount:e.number(),sources:e.array(It),targets:e.array(It),accountLocator:e.string().optional(),currency:e.string().optional()});const iy=e.enum(["draft","validated","executed","reversed","discarded"]);e.object({locator:e.string(),currency:Hr,creditDistributionState:iy,amount:e.number(),createdAt:e.string(),createdBy:e.string(),sources:It.array(),targets:It.array(),shortfallCreditLocators:e.string().array().optional(),accountLocator:e.string().optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),validationResult:Ct.optional()}),e.object({reversalType:e.string()});const oy=e.enum(["accountCreditBalance","cash","charge","credit","installmentItem","invoiceItem","quote","policy","transaction","accountExpenseBalance"]),sy=e.enum(["credit","debit"]),ly=e.object({faTransactionLocator:e.string(),accountingType:sy,amount:e.number(),faTransactionNote:e.string(),faTransactionTime:e.string()});e.object({referenceLocator:e.string(),currency:Hr,balance:e.number(),referenceType:oy,lineItems:ly.array()});const lo=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),expiresAt:e.string()}),pn=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),createdAt:e.string(),expiresAt:e.string()}),cy=e.object({id:e.string(),displayName:e.string(),importConfigUrl:e.string(),clientId:e.string(),clientSecret:e.string()}),co=e.object({name:e.string(),permissions:e.array(e.string()),description:e.string()}),gn=e.object({id:e.string(),displayName:e.string(),singleSignOnServiceUrl:e.string()}),uo=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())}),po=e.object({id:e.string(),displayName:e.string(),type:e.string(),acsUrl:e.string(),callbackUrl:e.string(),entityId:e.string(),singleSignOnServiceUrl:e.string()}),uy=e.object({passwordPolicies:e.record(e.number())}),go=e.object({version:e.number(),name:e.string(),addPermissions:e.array(e.string()),removePermissions:e.array(e.string()),description:e.string()}),mo=e.object({name:e.string(),description:e.string()}),fo=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),yo=e.object({addTenants:e.array(e.string()),removeTenants:e.array(e.string())}),dy=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()}),py=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 mn=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())}),ho=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 gy=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:uy}),e.unknown(),e.object({requestBody:uo}),e.array(pn),e.object({requestBody:lo}),e.string(),e.object({requestBody:co}),e.object({requestBody:gn}),e.object({requestBody:gn}),e.object({requestBody:cy}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:mn}),e.object({locator:e.string(),requestBody:yo}),e.object({locator:e.string(),requestBody:fo}),e.object({locator:e.string(),requestBody:e.string()}),e.unknown(),e.object({locator:e.string()}),e.array(ho),e.object({locator:e.string(),requestBody:gy}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:mo}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:go}),e.object({locator:e.string()}),e.array(e.string()),e.object({locator:e.string(),tenantLocator:e.string()}),e.array(ho),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(mn),e.object({locator:e.string()}),e.array(pn),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(po),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(),gn.merge(e.object({})),po.merge(e.object({})),co.merge(e.object({}));const my=dy.merge(e.object({locator:M,createdAt:P,createdBy:ee}));go.merge(e.object({})),tt(my),fo.merge(e.object({})),yo.merge(e.object({}));const fy=e.enum(["test","production","retired","deleted"]),yy=py.merge(e.object({locator:ra,type:fy,createdAt:P,updatedAt:P,createdBy:ee,description:e.string().optional()}));e.object({listCompleted:e.boolean(),items:e.array(yy)});const hy=e.enum(["queued","failed"]),by=Ti.merge(e.object({status:hy})),vy=Ga.merge(e.object({version1:M,version2:M,latestVersion:M,plugins:e.record(e.string(),Ue)})),Ty=Ka.merge(e.object({metadata:vy}));Mg.merge(e.object({locator:ra,bootstrapResult:by,deploymentResult:Ty})),mo.merge(e.object({})),lo.merge(e.object({expiresAt:P})),pn.merge(e.object({createdAt:P})),uo.merge(e.object({userName:e.string().email(),roles:e.array(e.string()).optional(),tenants:e.array(e.string()).optional()})),mn.merge(e.object({locator:ee,tenants:e.array(e.string()).optional(),permissions:e.array(e.string()).optional()}));const jy=e.object({locator:ee,userName:e.string(),firstName:e.string().optional(),lastName:e.string().optional()});e.object({listCompleted:e.boolean(),items:e.array(jy)}),e.object({firstName:e.string(),lastName:e.string(),permissions:e.array(e.string()),roles:e.array(e.string()),tenants:e.array(e.string())});const _y=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 Ay=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(Ay),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 wy=_y.merge(e.object({locator:aa,referenceLocator:aa,referenceType:$i,referenceDocumentLocator:aa.optional(),transactionLocator:Ze.optional(),segmentLocator:on.optional(),termLocator:Vi.optional(),policyLocator:Ot.optional(),documentInstanceState:Xg,documentFormat:Ha.optional(),metadata:J.optional(),createdAt:P,createdBy:ee,readyAt:P.optional(),renderingData:J.optional()}));tt(wy),e.object({tenantLocator:Pt});const Ey=e.object({category:e.string().optional(),documentFormat:Ha,metadata:e.string().optional(),name:e.string(),referenceLocator:aa,referenceType:$i,segmentLocator:on.optional(),staticName:e.string().optional(),transactionLocator:Ze.optional()}),xy=e.object({name:e.string(),filename:e.string(),size:e.number().nonnegative().int(),buffer:e.instanceof(Buffer)}),$y=e.object({mimetype:e.enum([Fe.text,Fe.textHtml,Fe.textCsv,Fe.imageJpg,Fe.applicationPdf,Fe.applicationZip,Fe.applicationZipWindows,Fe.applicationOctetStream])}).merge(xy);e.object({document:$y}),e.object({tenantLocator:Pt}).merge(Ey);const Ly=e.object({name:e.string(),type:e.string(),searchable:e.boolean().optional()}),Sy=e.object({entityName:e.string(),entityType:e.string(),defaultSearchable:e.boolean().optional(),fields:e.array(Ly),contents:e.array(e.string())}),Cy=e.object({defaultSearchable:e.boolean().optional(),objects:e.array(Sy)}),bo=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 vo=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(vo)}),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 ky=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(bo)});e.object({deploymentVersion:e.string(),searchConfiguration:Cy}),e.object({count:e.number().optional(),offset:e.number().optional(),requestBody:ky});const Dy=e.string().uuid();e.object({tenantLocator:Dy});const Py=e.object({offset:e.string().optional(),count:e.string().optional()});e.object({searchToken:e.string()}).merge(Py);const Oy=e.object({fieldName:e.string().optional(),absolute:Vg.optional(),match:em.optional(),searchTerm:e.string().optional()}).merge(bo);e.object({searchEntityType:Li.optional(),searchString:e.string().optional(),searchTerms:e.array(Oy).optional()});const Ny=vo.merge(e.object({accountLocator:e.string().optional(),searchEntityLocator:e.string().ulid(),productName:e.string().optional(),score:e.number(),searchEntityType:Li,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(Ny)});const To=Jr.merge(e.object({locator:M,reversalOfLocator:M.optional(),elementLocator:et,elementStaticLocator:M,chargeCategory:Wg})),ia=fr.merge(e.object({locator:M,action:Yg})),Iy=ia.merge(e.object({elements:e.array(ln)})),My=ia.merge(e.object({staticLocator:M,setData:J,removeData:J,setCoverageTerms:Ue,removeCoverageTerms:J})),jo=ia.merge(e.object({effectiveTime:P,newPolicyEndTime:P.optional(),preferences:Nt.optional(),triggerBillingChange:e.boolean().optional(),billingModeChange:e.boolean().optional()})),By=ia.merge(e.object({staticElementLocators:e.array(M)})),oa=e.union([Iy,My,jo,By]),_o=e.object({locator:Ze,policyLocator:Ot,termLocator:Vi,effectiveTime:P,transactionState:Va,transactionCategory:za,transactionType:e.string(),createdAt:P,createdBy:ee,aggregateTransactionLocator:Ze.optional(),baseTransactionLocator:Ze.optional(),issuedTime:P.optional(),acceptedTime:P.optional(),preferences:Nt.optional(),underwritingStatus:e.string().optional(),validationResult:sn.optional(),changeInstructions:e.array(oa).optional(),billingTrigger:dr}),Ry=_o.merge(e.object({aggregatedTransactions:e.array(_o)}));tt(Ry),e.array(oa),e.array(oa),e.array(oa);const qy=jo.omit({locator:!0});e.array(qy),Mi.merge(e.object({toTransaction:Ze,reverseTransactions:e.array(Ze),baseLocator:Ze}));const Fy=e.object({locator:M,policyLocator:Ot,effectiveTime:P,transactionState:Va,charges:e.array(To)}),Uy=Fy.extend({aggregatedTransactions:e.lazy(()=>Uy.array().optional())}),Mt=pt.merge(e.object({locator:M,referenceLocator:M,referenceType:rm,level:Si,createdBy:ee,createdTime:P,clearedBy:ee,clearedTime:P,elementLocator:et.optional()})),Zy=e.object({locator:M,policyLocator:Ot,transactionCategory:za,transactionState:Va,effectiveTime:P,underwritingStatus:e.string(),underwritingFlags:e.array(Mt)}),Gy=Zy.extend({aggregatedTransactions:e.lazy(()=>Gy.array().optional())}),Ky=qi.merge(e.object({elementLocator:et,level:Si}));an.merge(e.object({addFlags:e.array(Ky),clearFlags:e.array(M)})),vf.merge(e.object({transactionLocator:Ze,clearedFlags:e.array(Mt),flags:e.array(Mt)}));const zy=Zi.merge(e.object({locator:Ar,quickQuoteLocator:Ar,quoteState:Ya,billingLevel:kt,billingTrigger:dr.optional(),durationBasis:pr.optional(),policyLocator:Ot,preferences:Nt.optional(),validationResult:sn.optional(),static:J,issuedTime:P.optional(),startTime:P.optional(),endTime:P.optional(),acceptedTime:P.optional(),expirationTime:P.optional()}));tt(zy),Bi.merge(e.object({accountLocator:_r,data:J,startTime:P.optional(),endTime:P.optional(),expirationTime:P.optional(),durationBasis:pr.optional(),billingLevel:kt.optional(),preferences:Nt.optional(),static:J.optional(),coverageTerms:Ue.optional(),billingTrigger:dr.optional(),elements:e.array(ln)})),Ii.merge(e.object({startTime:P,endTime:P,expirationTime:P,billingTrigger:dr,billingLevel:kt,preferences:Nt,removeCoverageTerms:J,removeData:J,setCoverageTerms:Ue,setData:J,elements:e.array(Of)})),gf.merge(e.object({tenantLocator:Pt,accountLocator:_r,quoteLocator:Ar,quoteState:Ya,startTime:P,endTime:P,expirationTime:P,durationBasis:pr,items:e.array(To)})),mf.merge(e.object({tenantLocator:Pt,accountLocator:_r,quoteLocator:Ar,quoteState:Ya,startTime:P,endTime:P,expirationTime:P,durationBasis:pr,underwritingFlags:e.array(Mt)})),Ef.merge(e.object({quoteLocator:Ar,flags:e.array(Mt),clearedFlags:e.array(Mt).optional()})),br.merge(e.object({groupLocator:M})),rn.merge(e.object({resetFlagsAction:nm,resetFlags:e.array(M),deleteDocuments:e.array(M)}));const Vy=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 Hy=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 Yy=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 fe=e.object({containerLocator:e.string(),containerType:e.union([e.literal("invoice"),e.literal("account"),e.literal("subpayment")]),amount:e.number().optional()}),fn=e.object({creditLocator:e.string()}),Wy=e.object({"billing.creditdistribution.reverse":fn.optional(),"billing.creditdistribution.create":fn.optional(),"billing.creditdistribution.distribute":fn.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 Qy=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()}),Xy=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 Jy=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 yn=e.object({delinquencyLocator:e.string()}),eh=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 th=e.object({"billing.delinquency.create":yn.optional(),"billing.delinquency.settle":yn.optional(),"billing.delinquency.lapse":yn.optional()});e.object({accountLocator:e.string(),delinquencyLocator:e.string(),listCompleted:e.boolean(),items:e.array(Jy)}),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 sa=e.object({accountLocator:e.string().optional(),type:e.string(),amount:e.number(),data:e.record(e.record(e.unknown())),sources:e.array(fe),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 wr=e.object({disbursementLocator:e.string()}),rh=e.object({"billing.disbursement.create":wr.optional(),"billing.disbursement.reject":wr.optional(),"billing.disbursement.execute":wr.optional(),"billing.disbursement.reverse":wr.optional(),"billing.disbursement.approve":wr.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 ah=e.object({accountLocator:e.string(),installmentsToBeInvoiced:e.array(e.string()),invoiceDueTime:e.string().optional(),timezone:e.string().optional()}),nh=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:ah}),ih=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 oh=e.object({entityLocator:e.string(),type:e.union([e.literal("invoice"),e.literal("installment")])});e.union([e.literal("invoice"),e.literal("installment")]);const sh=e.object({calculationType:e.union([e.literal("none"),e.literal("pastDueInvoices"),e.literal("allInvoices"),e.literal("invoicesAndUnbilledInstallments")]),entitiesUsedInCalculation:e.array(oh),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 Ao=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 lh=e.object({accountLocator:e.string(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")])}),ch=e.object({accountLocator:e.string().optional(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")]).optional()}),uh=e.object({installmentLatticeLocator:e.string()}),dh=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()}),ph=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()}),gh=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 mh=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 fh=e.object({invoiceLocator:e.string(),accountLocator:e.string(),generateTime:e.string()}),wo=e.object({invoiceLocator:e.string(),accountLocator:e.string()}),yh=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()}),Eo=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(yh)}),hh=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())}),bh=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(dh)}),xo=e.object({generateTime:e.string(),dueTime:e.string(),startTime:e.string(),endTime:e.string(),invoiceItems:e.array(hh),totalAmount:e.number()}),vh=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(eh)}),e.object({listCompleted:e.boolean(),items:e.array(nh)});const Th=e.object({accountLocator:e.string().optional(),amount:e.number().optional(),addSources:e.array(fe),removeSources:e.array(e.string()),addTargets:e.array(fe),removeTargets:e.array(e.string()),currency:e.string().optional()}),jh=e.object({graceEndAt:e.string().optional()}),_h=e.object({triggerTime:e.string().optional(),delinquencyEventState:e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]).optional()}),$o=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(fe),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()}),Ah=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(fe),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()}),Lo=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(fe),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()}),la=e.object({paymentLocator:e.string()}),wh=e.object({"billing.payment.post":la.optional(),"billing.payment.reverse":la.optional(),"billing.payment.distribute":la.optional(),"billing.payment.create":la.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("posted"),e.literal("reversed"),e.literal("discarded")]);const Eh=e.object({policyLocator:e.string().optional(),quoteLocator:e.string().optional(),productName:e.string(),invoiceItemSummaries:e.array(bh)}),So=e.object({reversalType:e.string()});e.object({locator:e.string(),installmentSettings:gh,billingSettings:Hy});const hn=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(fe),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 xh=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),Er=e.object({validationItems:e.array(xh),success:e.boolean()}),bn=e.object({writeOffLocator:e.string()}),$h=e.object({"billing.writeoff.reverse":bn.optional(),"billing.writeoff.create":bn.optional(),"billing.writeoff.distribute":bn.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(fe),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(fe),externalCashTransactionLocator:e.string().optional(),validationResult:Er.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:Lo}),e.object({locator:e.string(),requestBody:Ah}),e.object({locator:e.string()});const Co=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(fe),externalCashTransactionLocator:e.string().optional(),validationResult:Er.optional(),disbursementNumber:e.string().optional()});e.object({locator:e.string(),requestBody:sa}),e.object({locator:e.string(),requestBody:$o}),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(fe),targets:e.array(fe),validationResult:Er.optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),shortfallCreditLocators:e.array(e.string())});const ko=e.object({accountLocator:e.string().optional(),amount:e.number(),currency:e.string().optional(),sources:e.array(fe),targets:e.array(fe)});e.object({locator:e.string(),requestBody:Th}),e.object({requestBody:Lo}),e.object({invoiceNumber:e.string(),locator:e.string()});const Lh=e.object({locator:e.string(),accountLocator:e.string(),invoiceState:e.union([e.literal("open"),e.literal("settled")]),invoiceItems:e.array(mh),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:ih}),e.object({requestBody:lh}),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:Er.optional()}),e.object({requestBody:Ao}),e.object({locator:e.string(),value:e.boolean().optional()}),e.object({requestBody:sa}),e.object({disbursementNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({requestBody:ko}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:So}),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:ch}),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:Ao}),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:Qy,timezone:e.string(),references:e.array(Xy),graceStartedAt:e.string().optional(),graceEndAt:e.string().optional(),lapseTransactionEffectiveDate:e.string().optional(),configuredDelinquencyEvents:e.array(Yy)}),e.object({locator:e.string(),requestBody:jh}),e.object({delinquencyEventLocator:e.string()}),e.object({delinquencyEventLocator:e.string(),requestBody:_h}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:So}),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(Eo),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(Eo),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(Eh),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(xo),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(xo),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(Lh),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(ph),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 Sh=e.object({"billing.installmentlattice.create":uh.optional()}),Ch=e.object({"billing.invoice.generate":fh.optional(),"billing.invoice.settle":wo.optional(),"billing.invoice.unsettle":wo.optional()}),kh=e.object({"billing.shortfallcredit.reverse":hn.optional(),"billing.shortfallcredit.distribute":hn.optional(),"billing.shortfallcredit.create":hn.optional()});e.object({disbursementNumber:e.string()}),e.array(Co),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(vh)}),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(Vy)});const Dh=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:Er.optional()});e.object({locator:e.string(),requestBody:ko}),e.object({accountLocator:e.string(),currency:e.string(),accountCreditBalance:e.number(),excludedDebitsAmountResult:sh,thresholdUsed:e.number().optional(),createDisbursementResult:Dh.optional(),errors:e.array(e.string())}),e.object({creditDistributionEvents:Wy.optional(),delinquencyEvents:th.optional(),disbursementEvents:rh.optional(),installmentEvents:Sh.optional(),invoiceEvents:Ch.optional(),paymentEvents:wh.optional(),shortfallCreditEvents:kh.optional(),writeOffEvents:$h.optional()});const ca=fe.merge(e.object({containerType:om})),Ph=Co.merge(e.object({locator:Sf,disbursementState:im,data:J,createdAt:P,createdBy:ee,sources:e.array(ca),accountLocator:_r.optional(),validationResult:sn.optional()}));tt(Ph),sa.merge(e.object({data:J,sources:e.array(ca),accountLocator:M.optional(),transactionMethod:Wa.optional()})),$o.merge(e.object({setData:J,removeData:J,addSources:e.array(ca),removeSources:e.array(e.string()),accountLocator:_r.optional(),transactionMethod:Wa})),sa.merge(e.object({data:J,sources:e.array(ca),transactionMethod:Wa}));const xr=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 Do=e.object({type:e.string(),deadlineTime:e.string().optional(),references:e.array(xr),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 Po=e.object({deadlineTime:e.string().optional(),addReferences:e.array(xr),removeReferences:e.array(xr),addUnderwritingFlags:e.array(e.string()),removeUnderwritingFlags:e.array(e.string())}),Oo=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 No=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()}),Io=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(xr),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(Oo)});const Mo=e.object({removeQualifications:e.record(e.string()),addQualifications:e.record(e.string())});e.object({requestBody:No}),e.object({requestBody:Do}),e.object({userLocator:e.string()}),e.record(e.string()),e.object({requestBody:Mo,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:Po}),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(Io)}),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 ua=xr.merge(e.object({referenceType:um}));Do.merge(e.object({deadlineTime:P,references:e.array(ua),assignedTo:ee})),Po.merge(e.object({deadlineTime:P.optional(),addReferences:e.array(ua),removeReferences:e.array(ua)}));const Oh=Io.merge(e.object({locator:Hi,activityState:dm,references:e.array(ua),deadlineTime:P.optional(),assignedTo:ee.optional(),createdBy:ee,createdAt:P,updatedBy:ee.optional(),updatedAt:P.optional()}));tt(Oh);const Ge=e.object({tenantLocator:Pt});Ge.merge(e.object({userLocator:ee})),Ge.merge(e.object({assignmentLocator:Yi})).merge(e.object({userLocator:ee})),Ge.merge(e.object({userLocator:ee})),Ge.merge(e.object({referenceType:e.string(),referenceLocator:M})),Ge.merge(e.object({activityLocator:Hi})).merge(e.object({userLocator:ee})),Ge.merge(e.object({userLocator:ee})),Ge.merge(e.object({referenceType:e.string(),referenceLocator:M})),Ge.merge(e.object({referenceType:e.string(),referenceLocator:M})),Ge.merge(e.object({diaryLocator:Wi})),No.merge(e.object({userLocator:ee,referenceType:Ci}));const Nh=Oo.merge(e.object({locator:Yi,userLocator:ee,referenceType:Ci,assignmentState:pm,createdBy:ee,createdAt:P,updatedBy:ee.optional(),updatedAt:P.optional()}));tt(Nh),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 Ih=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(Ih)});const Mh=e.object({uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),key:e.string(),value:e.string()}),Bh=e.object({auxDataSettingsName:e.string().optional(),auxData:e.array(Mh)});e.object({dataSizeKb:e.number()});const vn=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 Bo=e.object({category:e.string().optional(),contents:e.string()}),Rh=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:Bh}),e.unknown(),e.object({includeDiscarded:e.boolean().optional(),referenceLocator:e.string(),referenceType:e.string()}),e.array(vn),e.object({referenceLocator:e.string(),referenceType:e.string(),requestBody:Bo}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(vn),e.object({locator:e.string(),requestBody:Rh}),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(),Bo.merge(e.object({}));const qh=vn.merge(e.object({locator:Wi,referenceType:gm,diaryState:mm,createdAt:P,createdBy:ee,updatedAt:P,updatedBy:ee}));e.array(qh),e.record(e.string(),e.array(e.string())),Mo.merge(e.object({addQualifications:Ue,removeQualifications:Ue}));var Ro={exports:{}};(function(r,t){(function(a,n){r.exports=n()})(yt,function(){var a,n,i=1e3,o=6e4,s=36e5,l=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,f=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:l,hours:s,minutes:o,seconds:i,milliseconds:1,weeks:6048e5},g=function(G){return G instanceof ce},_=function(G,k,w){return new ce(G,w,k.$l)},b=function(G){return n.p(G)+"s"},Z=function(G){return G<0},x=function(G){return Z(G)?Math.ceil(G):Math.floor(G)},$=function(G){return Math.abs(G)},C=function(G,k){return G?Z(G)?{negative:!0,format:""+$(G)+k}:{negative:!1,format:""+G+k}:{negative:!1,format:""}},ce=function(){function G(w,H,F){var D=this;if(this.$d={},this.$l=F,w===void 0&&(this.$ms=0,this.parseFromMilliseconds()),H)return _(w*h[b(H)],this);if(typeof w=="number")return this.$ms=w,this.parseFromMilliseconds(),this;if(typeof w=="object")return Object.keys(w).forEach(function(L){D.$d[b(L)]=w[L]}),this.calMilliseconds(),this;if(typeof w=="string"){var re=w.match(f);if(re){var se=re.slice(2).map(function(L){return L!=null?Number(L):0});return this.$d.years=se[0],this.$d.months=se[1],this.$d.weeks=se[2],this.$d.days=se[3],this.$d.hours=se[4],this.$d.minutes=se[5],this.$d.seconds=se[6],this.calMilliseconds(),this}}return this}var k=G.prototype;return k.calMilliseconds=function(){var w=this;this.$ms=Object.keys(this.$d).reduce(function(H,F){return H+(w.$d[F]||0)*h[F]},0)},k.parseFromMilliseconds=function(){var w=this.$ms;this.$d.years=x(w/u),w%=u,this.$d.months=x(w/d),w%=d,this.$d.days=x(w/l),w%=l,this.$d.hours=x(w/s),w%=s,this.$d.minutes=x(w/o),w%=o,this.$d.seconds=x(w/i),w%=i,this.$d.milliseconds=w},k.toISOString=function(){var w=C(this.$d.years,"Y"),H=C(this.$d.months,"M"),F=+this.$d.days||0;this.$d.weeks&&(F+=7*this.$d.weeks);var D=C(F,"D"),re=C(this.$d.hours,"H"),se=C(this.$d.minutes,"M"),L=this.$d.seconds||0;this.$d.milliseconds&&(L+=this.$d.milliseconds/1e3,L=Math.round(1e3*L)/1e3);var m=C(L,"S"),v=w.negative||H.negative||D.negative||re.negative||se.negative||m.negative,E=re.format||se.format||m.format?"T":"",j=(v?"-":"")+"P"+w.format+H.format+D.format+E+re.format+se.format+m.format;return j==="P"||j==="-P"?"P0D":j},k.toJSON=function(){return this.toISOString()},k.format=function(w){var H=w||"YYYY-MM-DDTHH:mm:ss",F={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return H.replace(c,function(D,re){return re||String(F[D])})},k.as=function(w){return this.$ms/h[b(w)]},k.get=function(w){var H=this.$ms,F=b(w);return F==="milliseconds"?H%=1e3:H=F==="weeks"?x(H/h[F]):this.$d[F],H||0},k.add=function(w,H,F){var D;return D=H?w*h[b(H)]:g(w)?w.$ms:_(w,this).$ms,_(this.$ms+D*(F?-1:1),this)},k.subtract=function(w,H){return this.add(w,H,!0)},k.locale=function(w){var H=this.clone();return H.$l=w,H},k.clone=function(){return _(this.$ms,this)},k.humanize=function(w){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!w)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},G}(),ie=function(G,k,w){return G.add(k.years()*w,"y").add(k.months()*w,"M").add(k.days()*w,"d").add(k.hours()*w,"h").add(k.minutes()*w,"m").add(k.seconds()*w,"s").add(k.milliseconds()*w,"ms")};return function(G,k,w){a=w,n=w().$utils(),w.duration=function(D,re){var se=w.locale();return _(D,{$l:se},re)},w.isDuration=g;var H=k.prototype.add,F=k.prototype.subtract;k.prototype.add=function(D,re){return g(D)?ie(this,D,1):H.bind(this)(D,re)},k.prototype.subtract=function(D,re){return g(D)?ie(this,D,-1):F.bind(this)(D,re)}}})})(Ro);var Fh=Ro.exports;const Uh=be(Fh);ve.extend(Uh);const Zh=({startTime:r,endTime:t,expirationTime:a,durationBasis:n,termDuration:i})=>{const o=r?ve(r):ve(),s=a?ve(a):void 0,l=s!=null&&s.isAfter(o)?s.format("YYYY-MM-DD"):o.add(1,"month").format("YYYY-MM-DD");if(t&&ve(t).isAfter(o))return{startTime:o.format("YYYY-MM-DD"),endTime:ve(t).format("YYYY-MM-DD"),expirationTime:l};if(!i||!n)return{startTime:o.format("YYYY-MM-DD"),expirationTime:l};const c=ve(o).add(ve.duration({[n]:i}));return{startTime:o.format("YYYY-MM-DD"),endTime:c.format("YYYY-MM-DD"),expirationTime:l}},Gh=(r,t,a)=>{var o,s,l,c,u;let n;r.durationBasis?n=r.durationBasis:t.defaultDurationBasis?n=Qr.options.includes(t.defaultDurationBasis)?t.defaultDurationBasis:void 0:a.defaultDurationBasis?n=Qr.options.includes(a.defaultDurationBasis)?a.defaultDurationBasis:void 0:n=void 0;const i=Zh({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:ot({coverageTermDataModel:a.coverageTerms,coverageTermOptions:((u=r==null?void 0:r.element)==null?void 0:u.coverageTerms)??{},coverageTerms:t.coverageTerms??[]})}};var Kh=it,zh=function(){try{var r=Kh(Object,"defineProperty");return r({},"",{}),r}catch{}}(),qo=zh,Fo=qo;function Vh(r,t,a){t=="__proto__"&&Fo?Fo(r,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[t]=a}var Tn=Vh,Hh=Tn,Yh=Kt,Wh=Object.prototype,Qh=Wh.hasOwnProperty;function Xh(r,t,a){var n=r[t];(!(Qh.call(r,t)&&Yh(n,a))||a===void 0&&!(t in r))&&Hh(r,t,a)}var jn=Xh,Jh=9007199254740991,eb=/^(?:0|[1-9]\d*)$/;function tb(r,t){var a=typeof r;return t=t??Jh,!!t&&(a=="number"||a!="symbol"&&eb.test(r))&&r>-1&&r%1==0&&r<t}var da=tb,rb=jn,ab=_t,nb=da,Uo=je,ib=At;function ob(r,t,a,n){if(!Uo(r))return r;t=ab(t,r);for(var i=-1,o=t.length,s=o-1,l=r;l!=null&&++i<o;){var c=ib(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=Uo(d)?d:nb(t[i+1])?[]:{})}rb(l,c,u),l=l[c]}return r}var Zo=ob,sb=Br,lb=Zo,cb=_t;function ub(r,t,a){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],l=sb(r,s);a(l,s)&&lb(o,cb(s,r),l)}return o}var db=ub;function pb(r,t){return r!=null&&t in Object(r)}var gb=pb,mb=bt,fb=Be,yb="[object Arguments]";function hb(r){return fb(r)&&mb(r)==yb}var bb=hb,Go=bb,vb=Be,Ko=Object.prototype,Tb=Ko.hasOwnProperty,jb=Ko.propertyIsEnumerable,_b=Go(function(){return arguments}())?Go:function(r){return vb(r)&&Tb.call(r,"callee")&&!jb.call(r,"callee")},$r=_b,Ab=9007199254740991;function wb(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ab}var _n=wb,Eb=_t,xb=$r,$b=ge,Lb=da,Sb=_n,Cb=At;function kb(r,t,a){t=Eb(t,r);for(var n=-1,i=t.length,o=!1;++n<i;){var s=Cb(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&&Sb(i)&&Lb(s,i)&&($b(r)||xb(r)))}var zo=kb,Db=gb,Pb=zo;function Ob(r,t){return r!=null&&Pb(r,t,Db)}var Vo=Ob,Nb=db,Ib=Vo;function Mb(r,t){return Nb(r,t,function(a,n){return Ib(r,n)})}var Bb=Mb;function Rb(r,t){for(var a=-1,n=t.length,i=r.length;++a<n;)r[i+a]=t[a];return r}var An=Rb,Ho=ht,qb=$r,Fb=ge,Yo=Ho?Ho.isConcatSpreadable:void 0;function Ub(r){return Fb(r)||qb(r)||!!(Yo&&r&&r[Yo])}var Zb=Ub,Gb=An,Kb=Zb;function Wo(r,t,a,n,i){var o=-1,s=r.length;for(a||(a=Kb),i||(i=[]);++o<s;){var l=r[o];t>0&&a(l)?t>1?Wo(l,t-1,a,n,i):Gb(i,l):n||(i[i.length]=l)}return i}var zb=Wo,Vb=zb;function Hb(r){var t=r==null?0:r.length;return t?Vb(r,1):[]}var Yb=Hb;function Wb(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 Qb=Wb,Xb=Qb,Qo=Math.max;function Jb(r,t,a){return t=Qo(t===void 0?r.length-1:t,0),function(){for(var n=arguments,i=-1,o=Qo(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),Xb(r,this,l)}}var Xo=Jb;function ev(r){return function(){return r}}var tv=ev;function rv(r){return r}var wn=rv,av=tv,Jo=qo,nv=wn,iv=Jo?function(r,t){return Jo(r,"toString",{configurable:!0,enumerable:!1,value:av(t),writable:!0})}:nv,ov=iv,sv=800,lv=16,cv=Date.now;function uv(r){var t=0,a=0;return function(){var n=cv(),i=lv-(n-a);if(a=n,i>0){if(++t>=sv)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var dv=uv,pv=ov,gv=dv,mv=gv(pv),es=mv,fv=Yb,yv=Xo,hv=es;function bv(r){return hv(yv(r,void 0,fv),r+"")}var ts=bv,vv=Bb,Tv=ts,jv=Tv(function(r,t){return r==null?{}:vv(r,t)}),_v=jv;const pa=be(_v);var Av=Zo;function wv(r,t,a){return r==null?r:Av(r,t,a)}var Ev=wv;const K=be(Ev),xv={Date:!0,RegExp:!0,String:!0,Number:!0};function we(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],f=o?+u:u;if(!(u in t)){i.push({type:"REMOVE",path:[f],oldValue:r[u]});continue}const h=t[u],g=typeof d=="object"&&typeof h=="object"&&Array.isArray(d)===Array.isArray(h);if(d&&h&&g&&!xv[(c=(l=Object.getPrototypeOf(d))==null?void 0:l.constructor)==null?void 0:c.name]&&(!a.cyclesFix||!n.includes(d))){const _=we(d,h,a,a.cyclesFix?n.concat([d]):[]);i.push.apply(i,_.map(b=>(b.path.unshift(f),b)))}else d!==h&&!(Number.isNaN(d)&&Number.isNaN(h))&&!(g&&(isNaN(d)?d+""==h+"":+d==+h))&&i.push({path:[f],type:"CHANGE",value:h,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 $v=r=>{const{data:t,default:a,advanced:n,coverageTerms:i,element:o}=r,s={locator:o.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};we((o==null?void 0:o.data)??{},t).forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":if(g.path.some(_=>!isNaN(Number(_)))){const _=ue(t,g.path[0]);K(s.setData??{},g.path[0],_)}else K(s.setData??{},g.path,g.value);break;case"REMOVE":if(g.path.some(_=>!isNaN(Number(_)))){const _=ue(t,g.path[0]);_.length===0?K(s.removeData??{},g.path[0],!0):K(s.setData??{},g.path[0],_)}else K(s.removeData??{},g.path,!0);break}}),we(o.coverageTerms??{},i??{}).forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":K(s.setCoverageTerms??{},g.path,g.value);break;case"REMOVE":K(s.removeCoverageTerms??{},g.path,!0);break}});const u=pa(o,["startTime","endTime","expirationTime"]),d=pa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName"]),f=we(u??{},a??{}),h=we(d??{},n??{});return f.forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":K(s,g.path,ve(g.value).format());break;case"REMOVE":K(s,g.path,null);break}}),h.forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":K(s,g.path,g.value);break;case"REMOVE":K(s,g.path,null);break}}),s};var Lv=Ir;function Sv(){this.__data__=new Lv,this.size=0}var Cv=Sv;function kv(r){var t=this.__data__,a=t.delete(r);return this.size=t.size,a}var Dv=kv;function Pv(r){return this.__data__.get(r)}var Ov=Pv;function Nv(r){return this.__data__.has(r)}var Iv=Nv,Mv=Ir,Bv=$a,Rv=La,qv=200;function Fv(r,t){var a=this.__data__;if(a instanceof Mv){var n=a.__data__;if(!Bv||n.length<qv-1)return n.push([r,t]),this.size=++a.size,this;a=this.__data__=new Rv(n)}return a.set(r,t),this.size=a.size,this}var Uv=Fv,Zv=Ir,Gv=Cv,Kv=Dv,zv=Ov,Vv=Iv,Hv=Uv;function Bt(r){var t=this.__data__=new Zv(r);this.size=t.size}Bt.prototype.clear=Gv,Bt.prototype.delete=Kv,Bt.prototype.get=zv,Bt.prototype.has=Vv,Bt.prototype.set=Hv;var ga=Bt;function Yv(r,t){for(var a=-1,n=r==null?0:r.length;++a<n&&t(r[a],a,r)!==!1;);return r}var rs=Yv,Wv=jn,Qv=Tn;function Xv(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?Qv(a,l,c):Wv(a,l,c)}return a}var Rt=Xv;function Jv(r,t){for(var a=-1,n=Array(r);++a<r;)n[a]=t(a);return n}var eT=Jv,ma={exports:{}};function tT(){return!1}var rT=tT;ma.exports,function(r,t){var a=ke,n=rT,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}(ma,ma.exports);var qt=ma.exports,aT=bt,nT=_n,iT=Be,oT="[object Arguments]",sT="[object Array]",lT="[object Boolean]",cT="[object Date]",uT="[object Error]",dT="[object Function]",pT="[object Map]",gT="[object Number]",mT="[object Object]",fT="[object RegExp]",yT="[object Set]",hT="[object String]",bT="[object WeakMap]",vT="[object ArrayBuffer]",TT="[object DataView]",jT="[object Float32Array]",_T="[object Float64Array]",AT="[object Int8Array]",wT="[object Int16Array]",ET="[object Int32Array]",xT="[object Uint8Array]",$T="[object Uint8ClampedArray]",LT="[object Uint16Array]",ST="[object Uint32Array]",te={};te[jT]=te[_T]=te[AT]=te[wT]=te[ET]=te[xT]=te[$T]=te[LT]=te[ST]=!0,te[oT]=te[sT]=te[vT]=te[lT]=te[TT]=te[cT]=te[uT]=te[dT]=te[pT]=te[gT]=te[mT]=te[fT]=te[yT]=te[hT]=te[bT]=!1;function CT(r){return iT(r)&&nT(r.length)&&!!te[aT(r)]}var kT=CT;function DT(r){return function(t){return r(t)}}var En=DT,fa={exports:{}};fa.exports,function(r,t){var a=Mn,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}(fa,fa.exports);var xn=fa.exports,PT=kT,OT=En,as=xn,ns=as&&as.isTypedArray,NT=ns?OT(ns):PT,Lr=NT,IT=eT,MT=$r,BT=ge,RT=qt,qT=da,FT=Lr,UT=Object.prototype,ZT=UT.hasOwnProperty;function GT(r,t){var a=BT(r),n=!a&&MT(r),i=!a&&!n&&RT(r),o=!a&&!n&&!i&&FT(r),s=a||n||i||o,l=s?IT(r.length,String):[],c=l.length;for(var u in r)(t||ZT.call(r,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qT(u,c)))&&l.push(u);return l}var is=GT,KT=Object.prototype;function zT(r){var t=r&&r.constructor,a=typeof t=="function"&&t.prototype||KT;return r===a}var ya=zT;function VT(r,t){return function(a){return r(t(a))}}var os=VT,HT=os,YT=HT(Object.keys,Object),WT=YT,QT=ya,XT=WT,JT=Object.prototype,ej=JT.hasOwnProperty;function tj(r){if(!QT(r))return XT(r);var t=[];for(var a in Object(r))ej.call(r,a)&&a!="constructor"&&t.push(a);return t}var ss=tj,rj=Pr,aj=_n;function nj(r){return r!=null&&aj(r.length)&&!rj(r)}var Ft=nj,ij=is,oj=ss,sj=Ft;function lj(r){return sj(r)?ij(r):oj(r)}var Sr=lj,cj=Rt,uj=Sr;function dj(r,t){return r&&cj(t,uj(t),r)}var pj=dj;function gj(r){var t=[];if(r!=null)for(var a in Object(r))t.push(a);return t}var mj=gj,fj=je,yj=ya,hj=mj,bj=Object.prototype,vj=bj.hasOwnProperty;function Tj(r){if(!fj(r))return hj(r);var t=yj(r),a=[];for(var n in r)n=="constructor"&&(t||!vj.call(r,n))||a.push(n);return a}var jj=Tj,_j=is,Aj=jj,wj=Ft;function Ej(r){return wj(r)?_j(r,!0):Aj(r)}var Cr=Ej,xj=Rt,$j=Cr;function Lj(r,t){return r&&xj(t,$j(t),r)}var Sj=Lj,ha={exports:{}};ha.exports,function(r,t){var a=ke,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 f=u.length,h=l?l(f):new u.constructor(f);return u.copy(h),h}r.exports=c}(ha,ha.exports);var ls=ha.exports;function Cj(r,t){var a=-1,n=r.length;for(t||(t=Array(n));++a<n;)t[a]=r[a];return t}var cs=Cj;function kj(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 Dj=kj;function Pj(){return[]}var us=Pj,Oj=Dj,Nj=us,Ij=Object.prototype,Mj=Ij.propertyIsEnumerable,ds=Object.getOwnPropertySymbols,Bj=ds?function(r){return r==null?[]:(r=Object(r),Oj(ds(r),function(t){return Mj.call(r,t)}))}:Nj,$n=Bj,Rj=Rt,qj=$n;function Fj(r,t){return Rj(r,qj(r),t)}var Uj=Fj,Zj=os,Gj=Zj(Object.getPrototypeOf,Object),ba=Gj,Kj=An,zj=ba,Vj=$n,Hj=us,Yj=Object.getOwnPropertySymbols,Wj=Yj?function(r){for(var t=[];r;)Kj(t,Vj(r)),r=zj(r);return t}:Hj,ps=Wj,Qj=Rt,Xj=ps;function Jj(r,t){return Qj(r,Xj(r),t)}var e_=Jj,t_=An,r_=ge;function a_(r,t,a){var n=t(r);return r_(r)?n:t_(n,a(r))}var gs=a_,n_=gs,i_=$n,o_=Sr;function s_(r){return n_(r,o_,i_)}var ms=s_,l_=gs,c_=ps,u_=Cr;function d_(r){return l_(r,u_,c_)}var fs=d_,p_=it,g_=ke,m_=p_(g_,"DataView"),f_=m_,y_=it,h_=ke,b_=y_(h_,"Promise"),v_=b_,T_=it,j_=ke,__=T_(j_,"Set"),A_=__,w_=it,E_=ke,x_=w_(E_,"WeakMap"),$_=x_,Ln=f_,Sn=$a,Cn=v_,kn=A_,Dn=$_,ys=bt,Ut=Zn,hs="[object Map]",L_="[object Object]",bs="[object Promise]",vs="[object Set]",Ts="[object WeakMap]",js="[object DataView]",S_=Ut(Ln),C_=Ut(Sn),k_=Ut(Cn),D_=Ut(kn),P_=Ut(Dn),mt=ys;(Ln&&mt(new Ln(new ArrayBuffer(1)))!=js||Sn&&mt(new Sn)!=hs||Cn&&mt(Cn.resolve())!=bs||kn&&mt(new kn)!=vs||Dn&&mt(new Dn)!=Ts)&&(mt=function(r){var t=ys(r),a=t==L_?r.constructor:void 0,n=a?Ut(a):"";if(n)switch(n){case S_:return js;case C_:return hs;case k_:return bs;case D_:return vs;case P_:return Ts}return t});var kr=mt,O_=Object.prototype,N_=O_.hasOwnProperty;function I_(r){var t=r.length,a=new r.constructor(t);return t&&typeof r[0]=="string"&&N_.call(r,"index")&&(a.index=r.index,a.input=r.input),a}var M_=I_,B_=ke,R_=B_.Uint8Array,_s=R_,As=_s;function q_(r){var t=new r.constructor(r.byteLength);return new As(t).set(new As(r)),t}var Pn=q_,F_=Pn;function U_(r,t){var a=t?F_(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}var Z_=U_,G_=/\w*$/;function K_(r){var t=new r.constructor(r.source,G_.exec(r));return t.lastIndex=r.lastIndex,t}var z_=K_,ws=ht,Es=ws?ws.prototype:void 0,xs=Es?Es.valueOf:void 0;function V_(r){return xs?Object(xs.call(r)):{}}var H_=V_,Y_=Pn;function W_(r,t){var a=t?Y_(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}var $s=W_,Q_=Pn,X_=Z_,J_=z_,eA=H_,tA=$s,rA="[object Boolean]",aA="[object Date]",nA="[object Map]",iA="[object Number]",oA="[object RegExp]",sA="[object Set]",lA="[object String]",cA="[object Symbol]",uA="[object ArrayBuffer]",dA="[object DataView]",pA="[object Float32Array]",gA="[object Float64Array]",mA="[object Int8Array]",fA="[object Int16Array]",yA="[object Int32Array]",hA="[object Uint8Array]",bA="[object Uint8ClampedArray]",vA="[object Uint16Array]",TA="[object Uint32Array]";function jA(r,t,a){var n=r.constructor;switch(t){case uA:return Q_(r);case rA:case aA:return new n(+r);case dA:return X_(r,a);case pA:case gA:case mA:case fA:case yA:case hA:case bA:case vA:case TA:return tA(r,a);case nA:return new n;case iA:case lA:return new n(r);case oA:return J_(r);case sA:return new n;case cA:return eA(r)}}var _A=jA,AA=je,Ls=Object.create,wA=function(){function r(){}return function(t){if(!AA(t))return{};if(Ls)return Ls(t);r.prototype=t;var a=new r;return r.prototype=void 0,a}}(),Ss=wA,EA=Ss,xA=ba,$A=ya;function LA(r){return typeof r.constructor=="function"&&!$A(r)?EA(xA(r)):{}}var Cs=LA,SA=kr,CA=Be,kA="[object Map]";function DA(r){return CA(r)&&SA(r)==kA}var PA=DA,OA=PA,NA=En,ks=xn,Ds=ks&&ks.isMap,IA=Ds?NA(Ds):OA,MA=IA,BA=kr,RA=Be,qA="[object Set]";function FA(r){return RA(r)&&BA(r)==qA}var UA=FA,ZA=UA,GA=En,Ps=xn,Os=Ps&&Ps.isSet,KA=Os?GA(Os):ZA,zA=KA,VA=ga,HA=rs,YA=jn,WA=pj,QA=Sj,XA=ls,JA=cs,ew=Uj,tw=e_,rw=ms,aw=fs,nw=kr,iw=M_,ow=_A,sw=Cs,lw=ge,cw=qt,uw=MA,dw=je,pw=zA,gw=Sr,mw=Cr,fw=1,yw=2,hw=4,Ns="[object Arguments]",bw="[object Array]",vw="[object Boolean]",Tw="[object Date]",jw="[object Error]",Is="[object Function]",_w="[object GeneratorFunction]",Aw="[object Map]",ww="[object Number]",Ms="[object Object]",Ew="[object RegExp]",xw="[object Set]",$w="[object String]",Lw="[object Symbol]",Sw="[object WeakMap]",Cw="[object ArrayBuffer]",kw="[object DataView]",Dw="[object Float32Array]",Pw="[object Float64Array]",Ow="[object Int8Array]",Nw="[object Int16Array]",Iw="[object Int32Array]",Mw="[object Uint8Array]",Bw="[object Uint8ClampedArray]",Rw="[object Uint16Array]",qw="[object Uint32Array]",X={};X[Ns]=X[bw]=X[Cw]=X[kw]=X[vw]=X[Tw]=X[Dw]=X[Pw]=X[Ow]=X[Nw]=X[Iw]=X[Aw]=X[ww]=X[Ms]=X[Ew]=X[xw]=X[$w]=X[Lw]=X[Mw]=X[Bw]=X[Rw]=X[qw]=!0,X[jw]=X[Is]=X[Sw]=!1;function va(r,t,a,n,i,o){var s,l=t&fw,c=t&yw,u=t&hw;if(a&&(s=i?a(r,n,i,o):a(r)),s!==void 0)return s;if(!dw(r))return r;var d=lw(r);if(d){if(s=iw(r),!l)return JA(r,s)}else{var f=nw(r),h=f==Is||f==_w;if(cw(r))return XA(r,l);if(f==Ms||f==Ns||h&&!i){if(s=c||h?{}:sw(r),!l)return c?tw(r,QA(s,r)):ew(r,WA(s,r))}else{if(!X[f])return i?r:{};s=ow(r,f,l)}}o||(o=new VA);var g=o.get(r);if(g)return g;o.set(r,s),pw(r)?r.forEach(function(Z){s.add(va(Z,t,a,Z,r,o))}):uw(r)&&r.forEach(function(Z,x){s.set(x,va(Z,t,a,x,r,o))});var _=u?c?aw:rw:c?mw:gw,b=d?void 0:_(r);return HA(b||r,function(Z,x){b&&(x=Z,Z=r[x]),YA(s,x,va(Z,t,a,x,r,o))}),s}var Fw=va;function Uw(r){var t=r==null?0:r.length;return t?r[t-1]:void 0}var Zw=Uw;function Gw(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 Kw=Gw,zw=Br,Vw=Kw;function Hw(r,t){return t.length<2?r:zw(r,Vw(t,0,-1))}var Yw=Hw,Ww=_t,Qw=Zw,Xw=Yw,Jw=At;function eE(r,t){return t=Ww(t,r),r=Xw(r,t),r==null||delete r[Jw(Qw(t))]}var tE=eE,rE=bt,aE=ba,nE=Be,iE="[object Object]",oE=Function.prototype,sE=Object.prototype,Bs=oE.toString,lE=sE.hasOwnProperty,cE=Bs.call(Object);function uE(r){if(!nE(r)||rE(r)!=iE)return!1;var t=aE(r);if(t===null)return!0;var a=lE.call(t,"constructor")&&t.constructor;return typeof a=="function"&&a instanceof a&&Bs.call(a)==cE}var Rs=uE,dE=Rs;function pE(r){return dE(r)?void 0:r}var gE=pE,mE=Vn,fE=Fw,yE=tE,hE=_t,bE=Rt,vE=gE,TE=ts,jE=fs,_E=1,AE=2,wE=4,EE=TE(function(r,t){var a={};if(r==null)return a;var n=!1;t=mE(t,function(o){return o=hE(o,r),n||(n=o.length>1),o}),bE(r,jE(r),a),n&&(a=fE(a,_E|AE|wE,vE));for(var i=t.length;i--;)yE(a,t[i]);return a}),xE=EE;const $E=be(xE);function LE(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 SE=LE;function CE(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 kE=CE,DE=kE,PE=DE(),qs=PE,OE=qs,NE=Sr;function IE(r,t){return r&&OE(r,t,NE)}var Fs=IE,ME=Ft;function BE(r,t){return function(a,n){if(a==null)return a;if(!ME(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 RE=BE,qE=Fs,FE=RE,UE=FE(qE),ZE=UE,GE=ZE;function KE(r,t){var a=!0;return GE(r,function(n,i,o){return a=!!t(n,i,o),a}),a}var zE=KE,VE="__lodash_hash_undefined__";function HE(r){return this.__data__.set(r,VE),this}var YE=HE;function WE(r){return this.__data__.has(r)}var QE=WE,XE=La,JE=YE,ex=QE;function Ta(r){var t=-1,a=r==null?0:r.length;for(this.__data__=new XE;++t<a;)this.add(r[t])}Ta.prototype.add=Ta.prototype.push=JE,Ta.prototype.has=ex;var tx=Ta;function rx(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 ax=rx;function nx(r,t){return r.has(t)}var ix=nx,ox=tx,sx=ax,lx=ix,cx=1,ux=2;function dx(r,t,a,n,i,o){var s=a&cx,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 f=-1,h=!0,g=a&ux?new ox:void 0;for(o.set(r,t),o.set(t,r);++f<l;){var _=r[f],b=t[f];if(n)var Z=s?n(b,_,f,t,r,o):n(_,b,f,r,t,o);if(Z!==void 0){if(Z)continue;h=!1;break}if(g){if(!sx(t,function(x,$){if(!lx(g,$)&&(_===x||i(_,x,a,n,o)))return g.push($)})){h=!1;break}}else if(!(_===b||i(_,b,a,n,o))){h=!1;break}}return o.delete(r),o.delete(t),h}var Us=dx;function px(r){var t=-1,a=Array(r.size);return r.forEach(function(n,i){a[++t]=[i,n]}),a}var gx=px;function mx(r){var t=-1,a=Array(r.size);return r.forEach(function(n){a[++t]=n}),a}var fx=mx,Zs=ht,Gs=_s,yx=Kt,hx=Us,bx=gx,vx=fx,Tx=1,jx=2,_x="[object Boolean]",Ax="[object Date]",wx="[object Error]",Ex="[object Map]",xx="[object Number]",$x="[object RegExp]",Lx="[object Set]",Sx="[object String]",Cx="[object Symbol]",kx="[object ArrayBuffer]",Dx="[object DataView]",Ks=Zs?Zs.prototype:void 0,On=Ks?Ks.valueOf:void 0;function Px(r,t,a,n,i,o,s){switch(a){case Dx:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case kx:return!(r.byteLength!=t.byteLength||!o(new Gs(r),new Gs(t)));case _x:case Ax:case xx:return yx(+r,+t);case wx:return r.name==t.name&&r.message==t.message;case $x:case Sx:return r==t+"";case Ex:var l=bx;case Lx:var c=n&Tx;if(l||(l=vx),r.size!=t.size&&!c)return!1;var u=s.get(r);if(u)return u==t;n|=jx,s.set(r,t);var d=hx(l(r),l(t),n,i,o,s);return s.delete(r),d;case Cx:if(On)return On.call(r)==On.call(t)}return!1}var Ox=Px,zs=ms,Nx=1,Ix=Object.prototype,Mx=Ix.hasOwnProperty;function Bx(r,t,a,n,i,o){var s=a&Nx,l=zs(r),c=l.length,u=zs(t),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in t:Mx.call(t,h)))return!1}var g=o.get(r),_=o.get(t);if(g&&_)return g==t&&_==r;var b=!0;o.set(r,t),o.set(t,r);for(var Z=s;++f<c;){h=l[f];var x=r[h],$=t[h];if(n)var C=s?n($,x,h,t,r,o):n(x,$,h,r,t,o);if(!(C===void 0?x===$||i(x,$,a,n,o):C)){b=!1;break}Z||(Z=h=="constructor")}if(b&&!Z){var ce=r.constructor,ie=t.constructor;ce!=ie&&"constructor"in r&&"constructor"in t&&!(typeof ce=="function"&&ce instanceof ce&&typeof ie=="function"&&ie instanceof ie)&&(b=!1)}return o.delete(r),o.delete(t),b}var Rx=Bx,Nn=ga,qx=Us,Fx=Ox,Ux=Rx,Vs=kr,Hs=ge,Ys=qt,Zx=Lr,Gx=1,Ws="[object Arguments]",Qs="[object Array]",ja="[object Object]",Kx=Object.prototype,Xs=Kx.hasOwnProperty;function zx(r,t,a,n,i,o){var s=Hs(r),l=Hs(t),c=s?Qs:Vs(r),u=l?Qs:Vs(t);c=c==Ws?ja:c,u=u==Ws?ja:u;var d=c==ja,f=u==ja,h=c==u;if(h&&Ys(r)){if(!Ys(t))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new Nn),s||Zx(r)?qx(r,t,a,n,i,o):Fx(r,t,c,a,n,i,o);if(!(a&Gx)){var g=d&&Xs.call(r,"__wrapped__"),_=f&&Xs.call(t,"__wrapped__");if(g||_){var b=g?r.value():r,Z=_?t.value():t;return o||(o=new Nn),i(b,Z,a,n,o)}}return h?(o||(o=new Nn),Ux(r,t,a,n,i,o)):!1}var Vx=zx,Hx=Vx,Js=Be;function el(r,t,a,n,i){return r===t?!0:r==null||t==null||!Js(r)&&!Js(t)?r!==r&&t!==t:Hx(r,t,a,n,el,i)}var In=el,Yx=ga,Wx=In,Qx=1,Xx=2;function Jx(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 f=new Yx;if(n)var h=n(u,d,c,r,t,f);if(!(h===void 0?Wx(d,u,Qx|Xx,n,f):h))return!1}}return!0}var e$=Jx,t$=je;function r$(r){return r===r&&!t$(r)}var tl=r$,a$=tl,n$=Sr;function i$(r){for(var t=n$(r),a=t.length;a--;){var n=t[a],i=r[n];t[a]=[n,i,a$(i)]}return t}var o$=i$;function s$(r,t){return function(a){return a==null?!1:a[r]===t&&(t!==void 0||r in Object(a))}}var rl=s$,l$=e$,c$=o$,u$=rl;function d$(r){var t=c$(r);return t.length==1&&t[0][2]?u$(t[0][0],t[0][1]):function(a){return a===r||l$(a,r,t)}}var p$=d$,g$=In,m$=Xn,f$=Vo,y$=wa,h$=tl,b$=rl,v$=At,T$=1,j$=2;function _$(r,t){return y$(r)&&h$(t)?b$(v$(r),t):function(a){var n=m$(a,r);return n===void 0&&n===t?f$(a,r):g$(t,n,T$|j$)}}var A$=_$;function w$(r){return function(t){return t==null?void 0:t[r]}}var E$=w$,x$=Br;function $$(r){return function(t){return x$(t,r)}}var L$=$$,S$=E$,C$=L$,k$=wa,D$=At;function P$(r){return k$(r)?S$(D$(r)):C$(r)}var O$=P$,N$=p$,I$=A$,M$=wn,B$=ge,R$=O$;function q$(r){return typeof r=="function"?r:r==null?M$:typeof r=="object"?B$(r)?I$(r[0],r[1]):N$(r):R$(r)}var al=q$,F$=Kt,U$=Ft,Z$=da,G$=je;function K$(r,t,a){if(!G$(a))return!1;var n=typeof t;return(n=="number"?U$(a)&&Z$(t,a.length):n=="string"&&t in a)?F$(a[t],r):!1}var nl=K$,z$=SE,V$=zE,H$=al,Y$=ge,W$=nl;function Q$(r,t,a){var n=Y$(r)?z$:V$;return a&&W$(r,t,a)&&(t=void 0),n(r,H$(t))}var X$=Q$;const J$=be(X$);var eL=Object.prototype,tL=eL.hasOwnProperty;function rL(r,t){return r!=null&&tL.call(r,t)}var aL=rL,nL=aL,iL=zo;function oL(r,t){return r!=null&&iL(r,t,nL)}var sL=oL;const lL=be(sL);var cL=ss,uL=kr,dL=$r,pL=ge,gL=Ft,mL=qt,fL=ya,yL=Lr,hL="[object Map]",bL="[object Set]",vL=Object.prototype,TL=vL.hasOwnProperty;function jL(r){if(r==null)return!0;if(gL(r)&&(pL(r)||typeof r=="string"||typeof r.splice=="function"||mL(r)||yL(r)||dL(r)))return!r.length;var t=uL(r);if(t==hL||t==bL)return!r.size;if(fL(r))return!cL(r).length;for(var a in r)if(TL.call(r,a))return!1;return!0}var _L=jL;const il=be(_L);var AL=rs,wL=Ss,EL=Fs,xL=al,$L=ba,LL=ge,SL=qt,CL=Pr,kL=je,DL=Lr;function PL(r,t,a){var n=LL(r),i=n||SL(r)||DL(r);if(t=xL(t),a==null){var o=r&&r.constructor;i?a=n?new o:[]:kL(r)?a=CL(o)?wL($L(r)):{}:a={}}return(i?AL:EL)(r,function(s,l,c){return t(a,s,l,c)}),a}var OL=PL;const NL=be(OL);function Dr(r,t){return NL(r,(a,n,i)=>{if(!lL(t,i))a[i]=n;else if(Ea(n)&&!_a(n)){const o=Dr(n,t[i]);il(o)||(a[i]=o)}else if(_a(n)&&_a(t[i])){const o=n.map((s,l)=>Dr(s,t[i][l]));J$(o,il)||(a[i]=o)}})}const IL=({data:r,transactionSnapshot:t,staticLocator:a})=>{const n={action:"modify",staticLocator:a},i=structuredClone(r);n.setCoverageTerms=r.coverageTerms,n.removeCoverageTerms=Dr(t.segment.element.coverageTerms??{},r.coverageTerms??{});const o=t.segment.element.data??{},s=$E(i,["coverageTerms","default"]);return n.setData=s,n.removeData=Dr(o,s),n},ML=({data:r})=>{const t={action:"params",effectiveTime:ve(r.default.effectiveTime).format()};return r.default.newPolicyEndDate&&(t.newPolicyEndTime=ve(r.default.newPolicyEndDate).format()),t},BL=he.z.enum(["currency","timezone","billingLevel","billingTrigger","durationBasis","delinquencyPlanName","autoRenewalPlanName","installmentPlanName"]);he.z.record(BL,he.z.string().optional());const RL=r=>{var g,_;const{data:t,default:a,advanced:n,coverageTerms:i,quote:o}=r,s={setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};we(((g=o.element)==null?void 0:g.data)??{},t).forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":if(b.path.some(Z=>!isNaN(Number(Z)))){const Z=ue(t,b.path[0]);K(s.setData??{},b.path[0],Z)}else K(s.setData??{},b.path,b.value);break;case"REMOVE":if(b.path.some(Z=>!isNaN(Number(Z)))){const Z=ue(t,b.path[0]);Z.length===0?K(s.removeData??{},b.path[0],!0):K(s.setData??{},b.path[0],Z)}else K(s.removeData??{},b.path,!0);break}}),we(((_=o.element)==null?void 0:_.coverageTerms)??{},i??{}).forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":K(s.setCoverageTerms??{},b.path,b.value);break;case"REMOVE":K(s.removeCoverageTerms??{},b.path,!0);break}});const u=pa(o,["startTime","endTime","expirationTime"]),d=pa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName","installmentPlanName"]),f=we(u??{},a??{}),h=we(d??{},n??{});return f.forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":K(s,b.path,ve(b.value).format());break;case"REMOVE":K(s,b.path,null);break}}),h.forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":b.path.includes("installmentPlanName")?K(s,["preferences","installmentPreferences",...b.path],b.value):K(s,b.path,b.value);break;case"REMOVE":K(s,b.path,null);break}}),s},qL=r=>{var i,o;const t={locator:r.element.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};return we(((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=ue(r.data,s.path[0]);K(t.setData??{},s.path[0],l)}else K(t.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=ue(r.data,s.path[0]);l.length===0?K(t.removeData??{},s.path[0],!0):K(t.setData??{},s.path[0],l)}else K(t.removeData??{},s.path,!0);break}}),we(((o=r.element)==null?void 0:o.coverageTerms)??{},r.coverageTerms??{}).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":K(t.setCoverageTerms??{},s.path,s.value);break;case"REMOVE":K(t.removeCoverageTerms??{},s.path,!0);break}}),t};function FL(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 UL=({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&&ue(a,l)&&K(o,`${s}`,ue(a,l))}),n[t]?n[t]={...n[t],[i]:o}:n[t]={[i]:o}}),n};var ZL=Tn,GL=Kt;function KL(r,t,a){(a!==void 0&&!GL(r[t],a)||a===void 0&&!(t in r))&&ZL(r,t,a)}var ol=KL,zL=Ft,VL=Be;function HL(r){return VL(r)&&zL(r)}var YL=HL;function WL(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var sl=WL,QL=Rt,XL=Cr;function JL(r){return QL(r,XL(r))}var eS=JL,ll=ol,tS=ls,rS=$s,aS=cs,nS=Cs,cl=$r,ul=ge,iS=YL,oS=qt,sS=Pr,lS=je,cS=Rs,uS=Lr,dl=sl,dS=eS;function pS(r,t,a,n,i,o,s){var l=dl(r,a),c=dl(t,a),u=s.get(c);if(u){ll(r,a,u);return}var d=o?o(l,c,a+"",r,t,s):void 0,f=d===void 0;if(f){var h=ul(c),g=!h&&oS(c),_=!h&&!g&&uS(c);d=c,h||g||_?ul(l)?d=l:iS(l)?d=aS(l):g?(f=!1,d=tS(c,!0)):_?(f=!1,d=rS(c,!0)):d=[]:cS(c)||cl(c)?(d=l,cl(l)?d=dS(l):(!lS(l)||sS(l))&&(d=nS(c))):f=!1}f&&(s.set(c,d),i(d,c,n,o,s),s.delete(c)),ll(r,a,d)}var gS=pS,mS=ga,fS=ol,yS=qs,hS=gS,bS=je,vS=Cr,TS=sl;function pl(r,t,a,n,i){r!==t&&yS(t,function(o,s){if(i||(i=new mS),bS(o))hS(r,t,s,a,pl,n,i);else{var l=n?n(TS(r,s),o,s+"",r,t,i):void 0;l===void 0&&(l=o),fS(r,s,l)}},vS)}var jS=pl,_S=wn,AS=Xo,wS=es;function ES(r,t){return wS(AS(r,t,_S),r+"")}var xS=ES,$S=xS,LS=nl;function SS(r){return $S(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&&LS(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 CS=SS,kS=jS,DS=CS,PS=DS(function(r,t,a){kS(r,t,a)}),OS=PS;const NS=be(OS),IS=({defaultValues:r,accountType:t,account:a})=>{var i,o;const n=NS(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 MS=In;function BS(r,t){return MS(r,t)}var RS=BS;const qS=be(RS),gl=(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]??{},f=gl(u,d,a?[...a,o,`${c}`]:[o,`${c}`]);f.length!==0&&n.push(...f)}else if(Ea(r[o])&&Ea(t[o])){if(qS(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},FS=(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=ue(i,o);l&&(typeof l=="string"&&s.includes(l)||(i[o]=""))}),i};he.z.object({autoRenewalPlanName:he.z.string().optional(),delinquencyPlanName:he.z.string().optional(),excessCreditPlanName:he.z.string().optional(),shortfallTolerancePlanName:he.z.string().optional(),billingLevel:cn.optional(),invoiceDocument:he.z.string().optional(),installmentPlanName:he.z.string().optional()});function US(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 we(((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=ue(r.data,s.path[0]);K(i.setData??{},s.path[0],l)}else K(i.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=ue(r.data,s.path[0]);l.length===0?K(i.removeData??{},s.path[0],!0):K(i.setData??{},s.path[0],l)}else K(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}:{}}}}z.DataFieldTagFeature=Jn,z.compareData=gl,z.dataModelToJSONSchema=ei,z.extractElementByLocator=Da,z.extractElementDataModelFromQuote=Ud,z.extractElementDataModelFromSegment=Zd,z.extractElementDataModelFromType=Pa,z.extractElementsFromQuote=Gd,z.extractElementsFromTransactionSegment=Kd,z.extractProductDataModel=zd,z.extractProductElements=Vd,z.getAccountRequest=US,z.getCoverageTermsDefaultValues=ot,z.getDefaultAccountFormValues=IS,z.getDefaultDraftTransactionValues=Yd,z.getDefaultElementValues=Wd,z.getDefaultInitializedTransactionValues=Qd,z.getDefaultQuoteValues=Gh,z.getElementNameByType=ri,z.getElementRequest=qL,z.getElementTransactionUpdateRequestFromFormData=$v,z.getEvaluatedConstraintsRequest=UL,z.getModifyChangeInstructionCreateRequestFromFormData=IL,z.getParamsChangeInstructionCreateRequestFromFormData=ML,z.getQuoteRequest=RL,z.getRemoveDataFieldValues=Dr,z.getUpdatedDataFromConstraints=FS,z.splitInputAndQuantifier=ai,z.translateError=FL,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
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 Dd=new Cd;Object.assign(p,{hooks:Dd,plugins:new kd(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 Re=r=>new p(r).parse(),Pd=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(p).filter(r=>!Pd.includes(r)&&Re[r]===void 0).forEach(r=>{Re[r]=p[r]}),Re.Jsep=p;const Od="ConditionalExpression";var Nd={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:Od,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 :")}})}};Re.plugins.register(Nd);const ti=47,Id=92;var Md={name:"regex",init(r){r.hooks.add("gobble-token",function(a){if(this.code===ti){const n=++this.index;let i=!1;for(;this.index<this.expr.length;){if(this.code===ti&&!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===Id?2:1}this.throwError("Unclosed Regex")}})}};const Ca=43,wt={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|="]),updateOperators:[Ca,45],assignmentPrecedence:.9,init(r){const t=[r.IDENTIFIER,r.MEMBER_EXP];wt.assignmentOperators.forEach(n=>r.addBinaryOp(n,wt.assignmentPrecedence,!0)),r.hooks.add("gobble-token",function(i){const o=this.code;wt.updateOperators.some(s=>s===o&&s===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:o===Ca?"++":"--",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;wt.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===Ca?"++":"--",argument:i.node,prefix:!1})}}),r.hooks.add("after-expression",function(i){i.node&&a(i.node)});function a(n){wt.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)})}}};Re.plugins.register(Md,wt),Re.addUnaryOp("typeof"),Re.addLiteral("null",null),Re.addLiteral("undefined",void 0);const Q={evalAst(r,t){switch(r.type){case"BinaryExpression":case"LogicalExpression":return Q.evalBinaryExpression(r,t);case"Compound":return Q.evalCompound(r,t);case"ConditionalExpression":return Q.evalConditionalExpression(r,t);case"Identifier":return Q.evalIdentifier(r,t);case"Literal":return Q.evalLiteral(r,t);case"MemberExpression":return Q.evalMemberExpression(r,t);case"UnaryExpression":return Q.evalUnaryExpression(r,t);case"ArrayExpression":return Q.evalArrayExpression(r,t);case"CallExpression":return Q.evalCallExpression(r,t);case"AssignmentExpression":return Q.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](Q.evalAst(r.left,t),()=>Q.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=Q.evalAst(i,t)}return a},evalConditionalExpression(r,t){return Q.evalAst(r.test,t)?Q.evalAst(r.consequent,t):Q.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?Q.evalAst(r.property):r.property.name,n=Q.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=>-Q.evalAst(n,t),"!":n=>!Q.evalAst(n,t),"~":n=>~Q.evalAst(n,t),"+":n=>+Q.evalAst(n,t),typeof:n=>typeof Q.evalAst(n,t)}[r.operator](r.argument)},evalArrayExpression(r,t){return r.elements.map(a=>Q.evalAst(a,t))},evalCallExpression(r,t){const a=r.arguments.map(i=>Q.evalAst(i,t)),n=Q.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=Q.evalAst(r.right,t);return t[a]=n,t[a]}};class Bd{constructor(t){this.code=t,this.ast=Re(this.code)}runInNewContext(t){const a={...t};return Q.evalAst(this.ast,a)}}function ze(r,t){return r=r.slice(),r.push(t),r}function ka(r,t){return t=t.slice(),t.unshift(r),t}class Rd 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 Y(r,t,a,n,i){if(!(this instanceof Y))try{return new Y(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 Rd(l);return l}}Y.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=Y.toPathString(r)),!r&&r!==""||!t)return;const c=Y.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,f)=>{const h=this._getPreferredOutput(f);return s&&Array.isArray(h)?d=d.concat(h):d.push(h),d},[]):l?[]:void 0},Y.prototype._getPreferredOutput=function(r){const t=this.currResultType;switch(t){case"all":{const a=Array.isArray(r.path)?r.path:Y.toPathArray(r.path);return r.pointer=Y.toPointer(a),r.path=typeof r.path=="string"?r.path:Y.toPathString(r.path),r}case"value":case"parent":case"parentProperty":return r[t];case"path":return Y.toPathString(r[t]);case"pointer":return Y.toPointer(r.path);default:throw new TypeError("Unknown result type")}},Y.prototype._handleCallback=function(r,t,a){if(t){const n=this._getPreferredOutput(r);r.path=typeof r.path=="string"?r.path:Y.toPathString(r.path),t(n,a,r)}},Y.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),f=[];function h(g){Array.isArray(g)?g.forEach(_=>{f.push(_)}):f.push(g)}if((typeof u!="string"||l)&&t&&Object.hasOwn(t,u))h(this._trace(d,t[u],ze(a,u),t,u,o,s));else if(u==="*")this._walk(t,g=>{h(this._trace(d,t[g],ze(a,g),t,g,o,!0,!0))});else if(u==="..")h(this._trace(d,t,a,n,i,o,s)),this._walk(t,g=>{typeof t[g]=="object"&&h(this._trace(r.slice(),t[g],ze(a,g),t,g,o,!0))});else{if(u==="^")return this._hasParentSelector=!0,{path:a.slice(0,-1),expr:d,isParentSelector:!0};if(u==="~")return c={path:ze(a,u),value:i,parent:n,parentProperty:null},this._handleCallback(c,o,"property"),c;if(u==="$")h(this._trace(d,t,a,null,null,o,s));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(u))h(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 g=u.replace(/^\?\((.*?)\)$/u,"$1"),_=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(g);_?this._walk(t,b=>{const Z=[_[2]],x=_[1]?t[b][_[1]]:t[b];this._trace(Z,x,a,n,i,o,!0).length>0&&h(this._trace(d,t[b],ze(a,b),t,b,o,!0))}):this._walk(t,b=>{this._eval(g,t[b],b,a,n,i)&&h(this._trace(d,t[b],ze(a,b),t,b,o,!0))})}else if(u[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");h(this._trace(ka(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 g=!1;const _=u.slice(1,-2);switch(_){case"scalar":(!t||!["object","function"].includes(typeof t))&&(g=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===_&&(g=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(g=!0);break;case"number":Number.isFinite(t)&&(g=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(g=!0);break;case"object":t&&typeof t===_&&(g=!0);break;case"array":Array.isArray(t)&&(g=!0);break;case"other":g=this.currOtherTypeCallback(t,a,n,i);break;case"null":t===null&&(g=!0);break;default:throw new TypeError("Unknown value type "+_)}if(g)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 g=u.slice(1);h(this._trace(d,t[g],ze(a,g),t,g,o,s,!0))}else if(u.includes(",")){const g=u.split(",");for(const _ of g)h(this._trace(ka(_,d),t,a,n,i,o,!0))}else!l&&t&&Object.hasOwn(t,u)&&h(this._trace(d,t[u],ze(a,u),t,u,o,s,!0))}if(this._hasParentSelector)for(let g=0;g<f.length;g++){const _=f[g];if(_&&_.isParentSelector){const b=this._trace(_.expr,t,_.path,n,i,o,s);if(Array.isArray(b)){f[g]=b[0];const Z=b.length;for(let x=1;x<Z;x++)g++,f.splice(g,0,b[x])}else f[g]=b}}return f},Y.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)})},Y.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,f=c[1]&&Number.parseInt(c[1])||l;d=d<0?Math.max(0,d+l):Math.min(l,d),f=f<0?Math.max(0,f+l):Math.min(l,f);const h=[];for(let g=d;g<f;g+=u)this._trace(ka(g,t),a,n,i,o,s,!0).forEach(b=>{h.push(b)});return h},Y.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=Y.toPathString(n.concat([a])));const l=this.currEval+"Script:"+r;if(!Y.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)Y.cache[l]=new this.safeVm.Script(c);else if(this.currEval==="native")Y.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;Y.cache[l]=new u(c)}else if(typeof this.currEval=="function")Y.cache[l]={runInNewContext:u=>this.currEval(c,u)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return Y.cache[l].runInNewContext(this.currSandbox)}catch(c){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+c.message+": "+r)}},Y.cache={},Y.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},Y.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},Y.toPathArray=function(r){const{cache:t}=Y;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()},Y.prototype.safeVm={Script:Bd};const qd=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 Fd{constructor(t){this.code=t}runInNewContext(t){let a=this.code;const n=Object.keys(t),i=[];qd(n,i,u=>typeof t[u]=="function");const o=n.map(u=>t[u]);a=i.reduce((u,d)=>{let f=t[d].toString();return/function/u.test(f)||(f="function "+f),"var "+d+"="+f+";"+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)}}Y.prototype.vm={Script:Fd};const Da=(r,t)=>{const a=Y({json:r,path:["$",`[?(@.locator=="${t}")]`]});return a.length?a[0]:null},ri=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)},Pa=({dataModel:r,elementType:t,resultType:a="value"})=>{const n=ri(t),i=Y({path:["$","?(@property === 'exposures' || @property === 'coverages' || @property === 'policyLines'|| @property === 'exposureGroups')",n],json:r,resultType:a});return i.length?i[0]:null},Ud=({dataModel:r,quote:t,elementLocator:a})=>{const n=Da(t,a);return n?Pa({dataModel:r,elementType:n.type}):{}},Zd=({dataModel:r,segment:t,elementLocator:a})=>{const n=Da(t,a);return n?Pa({dataModel:r,elementType:n.type}):{}},Gd=(r,t)=>{const a=t.endsWith("Quote")?t:`${t}Quote`;return r.filter(i=>i.type===a)},Kd=(r,t)=>{const a=t.endsWith("Policy")?t:`${t}Policy`;return r.filter(i=>i.type===a)},zd=({dataModel:r,element:{productName:t}})=>r.products[t]??{},ai=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??""}},Vd=({dataModel:r,contents:t})=>{var g,_,b,Z;const a=r.exposures??{},n=r.coverages??{},i=r.policyLines??{},o=r.exposureGroups??{},l=(t??[]).map(x=>{const{name:$,quantifier:C}=ai(x);return{name:$,quantifier:C}}),c=Object.keys(a).filter(x=>{if(l.find(C=>C.name===x))return!0}),u=Object.keys(n).filter(x=>{if(l.find(C=>C.name===x))return!0}),d=Object.keys(i).filter(x=>{if(l.find(C=>C.name===x))return!0}),f=Object.keys(o).filter(x=>{if(l.find(C=>C.name===x))return!0}),h={coverages:{},exposures:{},policyLines:{},exposureGroups:{}};for(const x of c)h.exposures[x]={...a[x],quantifier:((g=l.find($=>$.name===x))==null?void 0:g.quantifier)??""};for(const x of u)h.coverages[x]={...n[x],quantifier:((_=l.find($=>$.name===x))==null?void 0:_.quantifier)??""};for(const x of d)h.policyLines[x]={...i[x],quantifier:((b=l.find($=>$.name===x))==null?void 0:b.quantifier)??""};for(const x of f)h.exposureGroups[x]={...o[x],quantifier:((Z=l.find($=>$.name===x))==null?void 0:Z.quantifier)??""};return h},ot=({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};var ni={exports:{}};(function(r,t){(function(a,n){r.exports=n()})(yt,function(){var a=1e3,n=6e4,i=36e5,o="millisecond",s="second",l="minute",c="hour",u="day",d="week",f="month",h="quarter",g="year",_="date",b="Invalid Date",Z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(L){var m=["th","st","nd","rd"],v=L%100;return"["+L+(m[(v-20)%10]||m[v]||m[0])+"]"}},C=function(L,m,v){var E=String(L);return!E||E.length>=m?L:""+Array(m+1-E.length).join(v)+L},ce={s:C,z:function(L){var m=-L.utcOffset(),v=Math.abs(m),E=Math.floor(v/60),j=v%60;return(m<=0?"+":"-")+C(E,2,"0")+":"+C(j,2,"0")},m:function L(m,v){if(m.date()<v.date())return-L(v,m);var E=12*(v.year()-m.year())+(v.month()-m.month()),j=m.clone().add(E,f),B=v-j<0,R=m.clone().add(E+(B?-1:1),f);return+(-(E+(v-j)/(B?j-R:R-j))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:f,y:g,w:d,d:u,D:_,h:c,m:l,s,ms:o,Q:h}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},ie="en",G={};G[ie]=$;var k="$isDayjsObject",w=function(L){return L instanceof re||!(!L||!L[k])},H=function L(m,v,E){var j;if(!m)return ie;if(typeof m=="string"){var B=m.toLowerCase();G[B]&&(j=B),v&&(G[B]=v,j=B);var R=m.split("-");if(!j&&R.length>1)return L(R[0])}else{var W=m.name;G[W]=m,j=W}return!E&&j&&(ie=j),j||!E&&ie},F=function(L,m){if(w(L))return L.clone();var v=typeof m=="object"?m:{};return v.date=L,v.args=arguments,new re(v)},D=ce;D.l=H,D.i=w,D.w=function(L,m){return F(L,{locale:m.$L,utc:m.$u,x:m.$x,$offset:m.$offset})};var re=function(){function L(v){this.$L=H(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[k]=!0}var m=L.prototype;return m.parse=function(v){this.$d=function(E){var j=E.date,B=E.utc;if(j===null)return new Date(NaN);if(D.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var R=j.match(Z);if(R){var W=R[2]-1||0,ae=(R[7]||"0").substring(0,3);return B?new Date(Date.UTC(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,ae)):new Date(R[1],W,R[3]||1,R[4]||0,R[5]||0,R[6]||0,ae)}}return new Date(j)}(v),this.init()},m.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},m.$utils=function(){return D},m.isValid=function(){return this.$d.toString()!==b},m.isSame=function(v,E){var j=F(v);return this.startOf(E)<=j&&j<=this.endOf(E)},m.isAfter=function(v,E){return F(v)<this.startOf(E)},m.isBefore=function(v,E){return this.endOf(E)<F(v)},m.$g=function(v,E,j){return D.u(v)?this[E]:this.set(j,v)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(v,E){var j=this,B=!!D.u(E)||E,R=D.p(v),W=function(Me,de){var Se=D.w(j.$u?Date.UTC(j.$y,de,Me):new Date(j.$y,de,Me),j);return B?Se:Se.endOf(u)},ae=function(Me,de){return D.w(j.toDate()[Me].apply(j.toDate("s"),(B?[0,0,0,0]:[23,59,59,999]).slice(de)),j)},oe=this.$W,le=this.$M,ye=this.$D,Ke="set"+(this.$u?"UTC":"");switch(R){case g:return B?W(1,0):W(31,11);case f:return B?W(1,le):W(0,le+1);case d:var Ie=this.$locale().weekStart||0,rt=(oe<Ie?oe+7:oe)-Ie;return W(B?ye-rt:ye+(6-rt),le);case u:case _:return ae(Ke+"Hours",0);case c:return ae(Ke+"Minutes",1);case l:return ae(Ke+"Seconds",2);case s:return ae(Ke+"Milliseconds",3);default:return this.clone()}},m.endOf=function(v){return this.startOf(v,!1)},m.$set=function(v,E){var j,B=D.p(v),R="set"+(this.$u?"UTC":""),W=(j={},j[u]=R+"Date",j[_]=R+"Date",j[f]=R+"Month",j[g]=R+"FullYear",j[c]=R+"Hours",j[l]=R+"Minutes",j[s]=R+"Seconds",j[o]=R+"Milliseconds",j)[B],ae=B===u?this.$D+(E-this.$W):E;if(B===f||B===g){var oe=this.clone().set(_,1);oe.$d[W](ae),oe.init(),this.$d=oe.set(_,Math.min(this.$D,oe.daysInMonth())).$d}else W&&this.$d[W](ae);return this.init(),this},m.set=function(v,E){return this.clone().$set(v,E)},m.get=function(v){return this[D.p(v)]()},m.add=function(v,E){var j,B=this;v=Number(v);var R=D.p(E),W=function(le){var ye=F(B);return D.w(ye.date(ye.date()+Math.round(le*v)),B)};if(R===f)return this.set(f,this.$M+v);if(R===g)return this.set(g,this.$y+v);if(R===u)return W(1);if(R===d)return W(7);var ae=(j={},j[l]=n,j[c]=i,j[s]=a,j)[R]||1,oe=this.$d.getTime()+v*ae;return D.w(oe,this)},m.subtract=function(v,E){return this.add(-1*v,E)},m.format=function(v){var E=this,j=this.$locale();if(!this.isValid())return j.invalidDate||b;var B=v||"YYYY-MM-DDTHH:mm:ssZ",R=D.z(this),W=this.$H,ae=this.$m,oe=this.$M,le=j.weekdays,ye=j.months,Ke=j.meridiem,Ie=function(de,Se,at,ft){return de&&(de[Se]||de(E,B))||at[Se].slice(0,ft)},rt=function(de){return D.s(W%12||12,de,"0")},Me=Ke||function(de,Se,at){var ft=de<12?"AM":"PM";return at?ft.toLowerCase():ft};return B.replace(x,function(de,Se){return Se||function(at){switch(at){case"YY":return String(E.$y).slice(-2);case"YYYY":return D.s(E.$y,4,"0");case"M":return oe+1;case"MM":return D.s(oe+1,2,"0");case"MMM":return Ie(j.monthsShort,oe,ye,3);case"MMMM":return Ie(ye,oe);case"D":return E.$D;case"DD":return D.s(E.$D,2,"0");case"d":return String(E.$W);case"dd":return Ie(j.weekdaysMin,E.$W,le,2);case"ddd":return Ie(j.weekdaysShort,E.$W,le,3);case"dddd":return le[E.$W];case"H":return String(W);case"HH":return D.s(W,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return Me(W,ae,!0);case"A":return Me(W,ae,!1);case"m":return String(ae);case"mm":return D.s(ae,2,"0");case"s":return String(E.$s);case"ss":return D.s(E.$s,2,"0");case"SSS":return D.s(E.$ms,3,"0");case"Z":return R}return null}(de)||R.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(v,E,j){var B,R=this,W=D.p(E),ae=F(v),oe=(ae.utcOffset()-this.utcOffset())*n,le=this-ae,ye=function(){return D.m(R,ae)};switch(W){case g:B=ye()/12;break;case f:B=ye();break;case h:B=ye()/3;break;case d:B=(le-oe)/6048e5;break;case u:B=(le-oe)/864e5;break;case c:B=le/i;break;case l:B=le/n;break;case s:B=le/a;break;default:B=le}return j?B:D.a(B)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return G[this.$L]},m.locale=function(v,E){if(!v)return this.$L;var j=this.clone(),B=H(v,E,!0);return B&&(j.$L=B),j},m.clone=function(){return D.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},L}(),se=re.prototype;return F.prototype=se,[["$ms",o],["$s",s],["$m",l],["$H",c],["$W",u],["$M",f],["$y",g],["$D",_]].forEach(function(L){se[L[1]]=function(m){return this.$g(m,L[0],L[1])}}),F.extend=function(L,m){return L.$i||(L(m,re,F),L.$i=!0),F},F.locale=H,F.isDayjs=w,F.unix=function(L){return F(1e3*L)},F.en=G[ie],F.Ls=G,F.p={},F})})(ni);var Hd=ni.exports;const ve=be(Hd),Yd=({transactionSnapshot:r,paramsChangeInstruction:t,modifyChangeInstruction:a,coverageTerms:n,coverageTermsDataModel:i})=>{const o=a?{...a.setData??{},coverageTermsDataModel:a.setCoverageTerms??{}}:r.segment.element.data??{};return{...o&&{...o},default:{effectiveTime:ve(t.effectiveTime).format("YYYY-MM-DD"),...t.newPolicyEndTime&&{newPolicyEndDate:ve(t.newPolicyEndTime).format("YYYY-MM-DD")}},coverageTerms:ot({coverageTermDataModel:i,coverageTermOptions:o.coverageTermsDataModel??{},coverageTerms:n})}},Wd=(r,t,a)=>{const n=ot({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t});return{data:{...r.data},...Object.keys(n).length>0&&{coverageTerms:ot({coverageTermOptions:r.coverageTerms??{},coverageTermDataModel:a,coverageTerms:t})}}},Qd=({elementResponse:r,coverageTerms:t,coverageTermsDataModel:a})=>{const n=r.data??{},i=ot({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t});return{...n&&{...n},...Object.keys(i).length>0&&{coverageTerms:ot({coverageTermDataModel:a,coverageTermOptions:r.coverageTerms??{},coverageTerms:t})}}};var V;(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})(V||(V={}));var Oa;(function(r){r.mergeShapes=(t,a)=>({...t,...a})})(Oa||(Oa={}));const A=V.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ve=r=>{switch(typeof r){case"undefined":return A.undefined;case"string":return A.string;case"number":return isNaN(r)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(r)?A.array:r===null?A.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?A.promise:typeof Map<"u"&&r instanceof Map?A.map:typeof Set<"u"&&r instanceof Set?A.set:typeof Date<"u"&&r instanceof Date?A.date:A.object;default:return A.unknown}},y=V.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Xd=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Te 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 Te))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,V.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()}}Te.create=r=>new Te(r);const Et=(r,t)=>{let a;switch(r.code){case y.invalid_type:r.received===A.undefined?a="Required":a=`Expected ${r.expected}, received ${r.received}`;break;case y.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(r.expected,V.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:a=`Unrecognized key(s) in object: ${V.joinValues(r.keys,", ")}`;break;case y.invalid_union:a="Invalid input";break;case y.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${V.joinValues(r.options)}`;break;case y.invalid_enum_value:a=`Invalid enum value. Expected ${V.joinValues(r.options)}, received '${r.received}'`;break;case y.invalid_arguments:a="Invalid function arguments";break;case y.invalid_return_type:a="Invalid function return type";break;case y.invalid_date:a="Invalid date";break;case y.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}"`:V.assertNever(r.validation):r.validation!=="regex"?a=`Invalid ${r.validation}`:a="Invalid";break;case y.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 y.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 y.custom:a="Invalid input";break;case y.invalid_intersection_types:a="Intersection results could not be merged";break;case y.not_multiple_of:a=`Number must be a multiple of ${r.multipleOf}`;break;case y.not_finite:a="Number must be finite";break;default:a=t.defaultError,V.assertNever(r)}return{message:a}};let ii=Et;function Jd(r){ii=r}function Rr(){return ii}const qr=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}},ep=[];function T(r,t){const a=Rr(),n=qr({issueData:t,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,a,a===Et?void 0:Et].filter(i=>!!i)});r.common.issues.push(n)}class pe{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 N;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 pe.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 N;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 N=Object.freeze({status:"aborted"}),Fr=r=>({status:"dirty",value:r}),me=r=>({status:"valid",value:r}),Na=r=>r.status==="aborted",Ia=r=>r.status==="dirty",zt=r=>r.status==="valid",Vt=r=>typeof Promise<"u"&&r instanceof Promise;function Ur(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 oi(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 S;(function(r){r.errToObj=t=>typeof t=="string"?{message:t}:t||{},r.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(S||(S={}));var Ht,Yt;class De{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 si=(r,t)=>{if(zt(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 Te(r.common.issues);return this._error=a,this._error}}};function q(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 U{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 Ve(t.data)}_getOrReturnCtx(t,a){return a||{common:t.parent.common,data:t.data,parsedType:Ve(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new pe,ctx:{common:t.parent.common,data:t.data,parsedType:Ve(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const a=this._parse(t);if(Vt(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:Ve(t)},o=this._parseSync({data:t,path:i.path,parent:i});return si(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:Ve(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(Vt(i)?i:Promise.resolve(i));return si(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:y.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 $e({schema:this,typeName:O.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Oe.create(this,this._def)}nullable(){return Xe.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xe.create(this,this._def)}promise(){return St.create(this,this._def)}or(t){return Jt.create([this,t],this._def)}and(t){return er.create(this,t,this._def)}transform(t){return new $e({...q(this._def),schema:this,typeName:O.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const a=typeof t=="function"?t:()=>t;return new ir({...q(this._def),innerType:this,defaultValue:a,typeName:O.ZodDefault})}brand(){return new Ra({typeName:O.ZodBranded,type:this,...q(this._def)})}catch(t){const a=typeof t=="function"?t:()=>t;return new or({...q(this._def),innerType:this,catchValue:a,typeName:O.ZodCatch})}describe(t){const a=this.constructor;return new a({...this._def,description:t})}pipe(t){return sr.create(this,t)}readonly(){return lr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const tp=/^c[^\s-]{8,}$/i,rp=/^[0-9a-z]+$/,ap=/^[0-9A-HJKMNP-TV-Z]{26}$/,np=/^[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,ip=/^[a-z0-9_-]{21}$/i,op=/^[-+]?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)?)??$/,sp=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ma;const cp=/^(?:(?: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])$/,up=/^(([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})))$/,dp=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,li="((\\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])))",pp=new RegExp(`^${li}$`);function ci(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 gp(r){return new RegExp(`^${ci(r)}$`)}function ui(r){let t=`${li}T${ci(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 mp(r,t){return!!((t==="v4"||!t)&&cp.test(r)||(t==="v6"||!t)&&up.test(r))}class Ee extends U{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.string,received:i.parsedType}),N}const a=new pe;let n;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),T(n,{code:y.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),T(n,{code:y.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?T(n,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&T(n,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")sp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"email",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Ma||(Ma=new RegExp(lp,"u")),Ma.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"emoji",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")np.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"uuid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")ip.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"nanoid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")tp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"cuid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")rp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"cuid2",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")ap.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"ulid",code:y.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),T(n,{validation:"url",code:y.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),T(n,{validation:"regex",code:y.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),T(n,{code:y.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),T(n,{code:y.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?ui(i).test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?pp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?gp(i).test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{code:y.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?op.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"duration",code:y.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?mp(t.data,i.version)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"ip",code:y.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?dp.test(t.data)||(n=this._getOrReturnCtx(t,n),T(n,{validation:"base64",code:y.invalid_string,message:i.message}),a.dirty()):V.assertNever(i);return{status:a.value,value:t.data}}_regex(t,a,n){return this.refinement(i=>t.test(i),{validation:a,code:y.invalid_string,...S.errToObj(n)})}_addCheck(t){return new Ee({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...S.errToObj(t)})}url(t){return this._addCheck({kind:"url",...S.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...S.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...S.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...S.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...S.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...S.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...S.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...S.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...S.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,...S.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,...S.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...S.errToObj(t)})}regex(t,a){return this._addCheck({kind:"regex",regex:t,...S.errToObj(a)})}includes(t,a){return this._addCheck({kind:"includes",value:t,position:a==null?void 0:a.position,...S.errToObj(a==null?void 0:a.message)})}startsWith(t,a){return this._addCheck({kind:"startsWith",value:t,...S.errToObj(a)})}endsWith(t,a){return this._addCheck({kind:"endsWith",value:t,...S.errToObj(a)})}min(t,a){return this._addCheck({kind:"min",value:t,...S.errToObj(a)})}max(t,a){return this._addCheck({kind:"max",value:t,...S.errToObj(a)})}length(t,a){return this._addCheck({kind:"length",value:t,...S.errToObj(a)})}nonempty(t){return this.min(1,S.errToObj(t))}trim(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ee({...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}}Ee.create=r=>{var t;return new Ee({checks:[],typeName:O.ZodString,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...q(r)})};function fp(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 He extends U{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)!==A.number){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.number,received:i.parsedType}),N}let a;const n=new pe;for(const i of this._def.checks)i.kind==="int"?V.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),T(a,{code:y.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),T(a,{code:y.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),T(a,{code:y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?fp(t.data,i.value)!==0&&(a=this._getOrReturnCtx(t,a),T(a,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),T(a,{code:y.not_finite,message:i.message}),n.dirty()):V.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,S.toString(a))}gt(t,a){return this.setLimit("min",t,!1,S.toString(a))}lte(t,a){return this.setLimit("max",t,!0,S.toString(a))}lt(t,a){return this.setLimit("max",t,!1,S.toString(a))}setLimit(t,a,n,i){return new He({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:S.toString(i)}]})}_addCheck(t){return new He({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:S.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:S.toString(a)})}finite(t){return this._addCheck({kind:"finite",message:S.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.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"&&V.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)}}He.create=r=>new He({checks:[],typeName:O.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...q(r)});class Ye extends U{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)!==A.bigint){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.bigint,received:i.parsedType}),N}let a;const n=new pe;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),T(a,{code:y.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),T(a,{code:y.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),T(a,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):V.assertNever(i);return{status:n.value,value:t.data}}gte(t,a){return this.setLimit("min",t,!0,S.toString(a))}gt(t,a){return this.setLimit("min",t,!1,S.toString(a))}lte(t,a){return this.setLimit("max",t,!0,S.toString(a))}lt(t,a){return this.setLimit("max",t,!1,S.toString(a))}setLimit(t,a,n,i){return new Ye({...this._def,checks:[...this._def.checks,{kind:t,value:a,inclusive:n,message:S.toString(i)}]})}_addCheck(t){return new Ye({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.toString(t)})}multipleOf(t,a){return this._addCheck({kind:"multipleOf",value:t,message:S.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}}Ye.create=r=>{var t;return new Ye({checks:[],typeName:O.ZodBigInt,coerce:(t=r==null?void 0:r.coerce)!==null&&t!==void 0?t:!1,...q(r)})};class Wt extends U{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.boolean,received:a.parsedType}),N}return me(t.data)}}Wt.create=r=>new Wt({typeName:O.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...q(r)});class st extends U{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_type,expected:A.date,received:i.parsedType}),N}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return T(i,{code:y.invalid_date}),N}const a=new pe;let n;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),T(n,{code:y.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),T(n,{code:y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):V.assertNever(i);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new st({...this._def,checks:[...this._def.checks,t]})}min(t,a){return this._addCheck({kind:"min",value:t.getTime(),message:S.toString(a)})}max(t,a){return this._addCheck({kind:"max",value:t.getTime(),message:S.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}}st.create=r=>new st({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:O.ZodDate,...q(r)});class Zr extends U{_parse(t){if(this._getType(t)!==A.symbol){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.symbol,received:a.parsedType}),N}return me(t.data)}}Zr.create=r=>new Zr({typeName:O.ZodSymbol,...q(r)});class Qt extends U{_parse(t){if(this._getType(t)!==A.undefined){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.undefined,received:a.parsedType}),N}return me(t.data)}}Qt.create=r=>new Qt({typeName:O.ZodUndefined,...q(r)});class Xt extends U{_parse(t){if(this._getType(t)!==A.null){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.null,received:a.parsedType}),N}return me(t.data)}}Xt.create=r=>new Xt({typeName:O.ZodNull,...q(r)});class xt extends U{constructor(){super(...arguments),this._any=!0}_parse(t){return me(t.data)}}xt.create=r=>new xt({typeName:O.ZodAny,...q(r)});class lt extends U{constructor(){super(...arguments),this._unknown=!0}_parse(t){return me(t.data)}}lt.create=r=>new lt({typeName:O.ZodUnknown,...q(r)});class qe extends U{_parse(t){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.never,received:a.parsedType}),N}}qe.create=r=>new qe({typeName:O.ZodNever,...q(r)});class Gr extends U{_parse(t){if(this._getType(t)!==A.undefined){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.void,received:a.parsedType}),N}return me(t.data)}}Gr.create=r=>new Gr({typeName:O.ZodVoid,...q(r)});class xe extends U{_parse(t){const{ctx:a,status:n}=this._processInputParams(t),i=this._def;if(a.parsedType!==A.array)return T(a,{code:y.invalid_type,expected:A.array,received:a.parsedType}),N;if(i.exactLength!==null){const s=a.data.length>i.exactLength.value,l=a.data.length<i.exactLength.value;(s||l)&&(T(a,{code:s?y.too_big:y.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&&(T(a,{code:y.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&&(T(a,{code:y.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 De(a,s,a.path,l)))).then(s=>pe.mergeArray(n,s));const o=[...a.data].map((s,l)=>i.type._parseSync(new De(a,s,a.path,l)));return pe.mergeArray(n,o)}get element(){return this._def.type}min(t,a){return new xe({...this._def,minLength:{value:t,message:S.toString(a)}})}max(t,a){return new xe({...this._def,maxLength:{value:t,message:S.toString(a)}})}length(t,a){return new xe({...this._def,exactLength:{value:t,message:S.toString(a)}})}nonempty(t){return this.min(1,t)}}xe.create=(r,t)=>new xe({type:r,minLength:null,maxLength:null,exactLength:null,typeName:O.ZodArray,...q(t)});function $t(r){if(r instanceof ne){const t={};for(const a in r.shape){const n=r.shape[a];t[a]=Oe.create($t(n))}return new ne({...r._def,shape:()=>t})}else return r instanceof xe?new xe({...r._def,type:$t(r.element)}):r instanceof Oe?Oe.create($t(r.unwrap())):r instanceof Xe?Xe.create($t(r.unwrap())):r instanceof Pe?Pe.create(r.items.map(t=>$t(t))):r}class ne extends U{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=V.objectKeys(t);return this._cached={shape:t,keys:a}}_parse(t){if(this._getType(t)!==A.object){const c=this._getOrReturnCtx(t);return T(c,{code:y.invalid_type,expected:A.object,received:c.parsedType}),N}const{status:a,ctx:n}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof qe&&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 De(n,d,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof qe){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&&(T(n,{code:y.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 De(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,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>pe.mergeObjectSync(a,c)):pe.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(t){return S.errToObj,new ne({...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=S.errToObj(t).message)!==null&&l!==void 0?l:c}:{message:c}}}:{}})}strip(){return new ne({...this._def,unknownKeys:"strip"})}passthrough(){return new ne({...this._def,unknownKeys:"passthrough"})}extend(t){return new ne({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ne({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:O.ZodObject})}setKey(t,a){return this.augment({[t]:a})}catchall(t){return new ne({...this._def,catchall:t})}pick(t){const a={};return V.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(a[n]=this.shape[n])}),new ne({...this._def,shape:()=>a})}omit(t){const a={};return V.objectKeys(this.shape).forEach(n=>{t[n]||(a[n]=this.shape[n])}),new ne({...this._def,shape:()=>a})}deepPartial(){return $t(this)}partial(t){const a={};return V.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?a[n]=i:a[n]=i.optional()}),new ne({...this._def,shape:()=>a})}required(t){const a={};return V.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])a[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Oe;)i=i._def.innerType;a[n]=i}}),new ne({...this._def,shape:()=>a})}keyof(){return di(V.objectKeys(this.shape))}}ne.create=(r,t)=>new ne({shape:()=>r,unknownKeys:"strip",catchall:qe.create(),typeName:O.ZodObject,...q(t)}),ne.strictCreate=(r,t)=>new ne({shape:()=>r,unknownKeys:"strict",catchall:qe.create(),typeName:O.ZodObject,...q(t)}),ne.lazycreate=(r,t)=>new ne({shape:r,unknownKeys:"strip",catchall:qe.create(),typeName:O.ZodObject,...q(t)});class Jt extends U{_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 Te(l.ctx.common.issues));return T(a,{code:y.invalid_union,unionErrors:s}),N}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 Te(c));return T(a,{code:y.invalid_union,unionErrors:l}),N}}get options(){return this._def.options}}Jt.create=(r,t)=>new Jt({options:r,typeName:O.ZodUnion,...q(t)});const We=r=>r instanceof rr?We(r.schema):r instanceof $e?We(r.innerType()):r instanceof ar?[r.value]:r instanceof Qe?r.options:r instanceof nr?V.objectValues(r.enum):r instanceof ir?We(r._def.innerType):r instanceof Qt?[void 0]:r instanceof Xt?[null]:r instanceof Oe?[void 0,...We(r.unwrap())]:r instanceof Xe?[null,...We(r.unwrap())]:r instanceof Ra||r instanceof lr?We(r.unwrap()):r instanceof or?We(r._def.innerType):[];class Kr extends U{_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==A.object)return T(a,{code:y.invalid_type,expected:A.object,received:a.parsedType}),N;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}):(T(a,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),N)}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=We(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 Kr({typeName:O.ZodDiscriminatedUnion,discriminator:t,options:a,optionsMap:i,...q(n)})}}function Ba(r,t){const a=Ve(r),n=Ve(t);if(r===t)return{valid:!0,data:r};if(a===A.object&&n===A.object){const i=V.objectKeys(t),o=V.objectKeys(r).filter(l=>i.indexOf(l)!==-1),s={...r,...t};for(const l of o){const c=Ba(r[l],t[l]);if(!c.valid)return{valid:!1};s[l]=c.data}return{valid:!0,data:s}}else if(a===A.array&&n===A.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=Ba(s,l);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return a===A.date&&n===A.date&&+r==+t?{valid:!0,data:r}:{valid:!1}}class er extends U{_parse(t){const{status:a,ctx:n}=this._processInputParams(t),i=(o,s)=>{if(Na(o)||Na(s))return N;const l=Ba(o.value,s.value);return l.valid?((Ia(o)||Ia(s))&&a.dirty(),{status:a.value,value:l.data}):(T(n,{code:y.invalid_intersection_types}),N)};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}))}}er.create=(r,t,a)=>new er({left:r,right:t,typeName:O.ZodIntersection,...q(a)});class Pe extends U{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==A.array)return T(n,{code:y.invalid_type,expected:A.array,received:n.parsedType}),N;if(n.data.length<this._def.items.length)return T(n,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N;!this._def.rest&&n.data.length>this._def.items.length&&(T(n,{code:y.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 De(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>pe.mergeArray(a,o)):pe.mergeArray(a,i)}get items(){return this._def.items}rest(t){return new Pe({...this._def,rest:t})}}Pe.create=(r,t)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pe({items:r,typeName:O.ZodTuple,rest:null,...q(t)})};class tr extends U{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!==A.object)return T(n,{code:y.invalid_type,expected:A.object,received:n.parsedType}),N;const i=[],o=this._def.keyType,s=this._def.valueType;for(const l in n.data)i.push({key:o._parse(new De(n,l,n.path,l)),value:s._parse(new De(n,n.data[l],n.path,l)),alwaysSet:l in n.data});return n.common.async?pe.mergeObjectAsync(a,i):pe.mergeObjectSync(a,i)}get element(){return this._def.valueType}static create(t,a,n){return a instanceof U?new tr({keyType:t,valueType:a,typeName:O.ZodRecord,...q(n)}):new tr({keyType:Ee.create(),valueType:t,typeName:O.ZodRecord,...q(a)})}}class zr extends U{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!==A.map)return T(n,{code:y.invalid_type,expected:A.map,received:n.parsedType}),N;const i=this._def.keyType,o=this._def.valueType,s=[...n.data.entries()].map(([l,c],u)=>({key:i._parse(new De(n,l,n.path,[u,"key"])),value:o._parse(new De(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 N;(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 N;(u.status==="dirty"||d.status==="dirty")&&a.dirty(),l.set(u.value,d.value)}return{status:a.value,value:l}}}}zr.create=(r,t,a)=>new zr({valueType:t,keyType:r,typeName:O.ZodMap,...q(a)});class ct extends U{_parse(t){const{status:a,ctx:n}=this._processInputParams(t);if(n.parsedType!==A.set)return T(n,{code:y.invalid_type,expected:A.set,received:n.parsedType}),N;const i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(T(n,{code:y.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&&(T(n,{code:y.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 N;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 De(n,c,n.path,u)));return n.common.async?Promise.all(l).then(c=>s(c)):s(l)}min(t,a){return new ct({...this._def,minSize:{value:t,message:S.toString(a)}})}max(t,a){return new ct({...this._def,maxSize:{value:t,message:S.toString(a)}})}size(t,a){return this.min(t,a).max(t,a)}nonempty(t){return this.min(1,t)}}ct.create=(r,t)=>new ct({valueType:r,minSize:null,maxSize:null,typeName:O.ZodSet,...q(t)});class Lt extends U{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==A.function)return T(a,{code:y.invalid_type,expected:A.function,received:a.parsedType}),N;function n(l,c){return qr({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Rr(),Et].filter(u=>!!u),issueData:{code:y.invalid_arguments,argumentsError:c}})}function i(l,c){return qr({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,Rr(),Et].filter(u=>!!u),issueData:{code:y.invalid_return_type,returnTypeError:c}})}const o={errorMap:a.common.contextualErrorMap},s=a.data;if(this._def.returns instanceof St){const l=this;return me(async function(...c){const u=new Te([]),d=await l._def.args.parseAsync(c,o).catch(h=>{throw u.addIssue(n(c,h)),u}),f=await Reflect.apply(s,this,d);return await l._def.returns._def.type.parseAsync(f,o).catch(h=>{throw u.addIssue(i(f,h)),u})})}else{const l=this;return me(function(...c){const u=l._def.args.safeParse(c,o);if(!u.success)throw new Te([n(c,u.error)]);const d=Reflect.apply(s,this,u.data),f=l._def.returns.safeParse(d,o);if(!f.success)throw new Te([i(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Lt({...this._def,args:Pe.create(t).rest(lt.create())})}returns(t){return new Lt({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,a,n){return new Lt({args:t||Pe.create([]).rest(lt.create()),returns:a||lt.create(),typeName:O.ZodFunction,...q(n)})}}class rr extends U{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})}}rr.create=(r,t)=>new rr({getter:r,typeName:O.ZodLazy,...q(t)});class ar extends U{_parse(t){if(t.data!==this._def.value){const a=this._getOrReturnCtx(t);return T(a,{received:a.data,code:y.invalid_literal,expected:this._def.value}),N}return{status:"valid",value:t.data}}get value(){return this._def.value}}ar.create=(r,t)=>new ar({value:r,typeName:O.ZodLiteral,...q(t)});function di(r,t){return new Qe({values:r,typeName:O.ZodEnum,...q(t)})}class Qe extends U{constructor(){super(...arguments),Ht.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const a=this._getOrReturnCtx(t),n=this._def.values;return T(a,{expected:V.joinValues(n),received:a.parsedType,code:y.invalid_type}),N}if(Ur(this,Ht)||oi(this,Ht,new Set(this._def.values)),!Ur(this,Ht).has(t.data)){const a=this._getOrReturnCtx(t),n=this._def.values;return T(a,{received:a.data,code:y.invalid_enum_value,options:n}),N}return me(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 Qe.create(t,{...this._def,...a})}exclude(t,a=this._def){return Qe.create(this.options.filter(n=>!t.includes(n)),{...this._def,...a})}}Ht=new WeakMap,Qe.create=di;class nr extends U{constructor(){super(...arguments),Yt.set(this,void 0)}_parse(t){const a=V.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==A.string&&n.parsedType!==A.number){const i=V.objectValues(a);return T(n,{expected:V.joinValues(i),received:n.parsedType,code:y.invalid_type}),N}if(Ur(this,Yt)||oi(this,Yt,new Set(V.getValidEnumValues(this._def.values))),!Ur(this,Yt).has(t.data)){const i=V.objectValues(a);return T(n,{received:n.data,code:y.invalid_enum_value,options:i}),N}return me(t.data)}get enum(){return this._def.values}}Yt=new WeakMap,nr.create=(r,t)=>new nr({values:r,typeName:O.ZodNativeEnum,...q(t)});class St extends U{unwrap(){return this._def.type}_parse(t){const{ctx:a}=this._processInputParams(t);if(a.parsedType!==A.promise&&a.common.async===!1)return T(a,{code:y.invalid_type,expected:A.promise,received:a.parsedType}),N;const n=a.parsedType===A.promise?a.data:Promise.resolve(a.data);return me(n.then(i=>this._def.type.parseAsync(i,{path:a.path,errorMap:a.common.contextualErrorMap})))}}St.create=(r,t)=>new St({type:r,typeName:O.ZodPromise,...q(t)});class $e extends U{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===O.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=>{T(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 N;const c=await this._def.schema._parseAsync({data:l,path:n.path,parent:n});return c.status==="aborted"?N:c.status==="dirty"||a.value==="dirty"?Fr(c.value):c});{if(a.value==="aborted")return N;const l=this._def.schema._parseSync({data:s,path:n.path,parent:n});return l.status==="aborted"?N:l.status==="dirty"||a.value==="dirty"?Fr(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"?N:(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"?N:(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(!zt(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=>zt(s)?Promise.resolve(i.transform(s.value,o)).then(l=>({status:a.value,value:l})):s);V.assertNever(i)}}$e.create=(r,t,a)=>new $e({schema:r,typeName:O.ZodEffects,effect:t,...q(a)}),$e.createWithPreprocess=(r,t,a)=>new $e({schema:t,effect:{type:"preprocess",transform:r},typeName:O.ZodEffects,...q(a)});class Oe extends U{_parse(t){return this._getType(t)===A.undefined?me(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oe.create=(r,t)=>new Oe({innerType:r,typeName:O.ZodOptional,...q(t)});class Xe extends U{_parse(t){return this._getType(t)===A.null?me(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xe.create=(r,t)=>new Xe({innerType:r,typeName:O.ZodNullable,...q(t)});class ir extends U{_parse(t){const{ctx:a}=this._processInputParams(t);let n=a.data;return a.parsedType===A.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}ir.create=(r,t)=>new ir({innerType:r,typeName:O.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...q(t)});class or extends U{_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 Vt(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Te(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Te(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}or.create=(r,t)=>new or({innerType:r,typeName:O.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...q(t)});class Vr extends U{_parse(t){if(this._getType(t)!==A.nan){const a=this._getOrReturnCtx(t);return T(a,{code:y.invalid_type,expected:A.nan,received:a.parsedType}),N}return{status:"valid",value:t.data}}}Vr.create=r=>new Vr({typeName:O.ZodNaN,...q(r)});const yp=Symbol("zod_brand");class Ra extends U{_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 sr extends U{_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"?N:i.status==="dirty"?(a.dirty(),Fr(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"?N: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 sr({in:t,out:a,typeName:O.ZodPipeline})}}class lr extends U{_parse(t){const a=this._def.innerType._parse(t),n=i=>(zt(i)&&(i.value=Object.freeze(i.value)),i);return Vt(a)?a.then(i=>n(i)):n(a)}unwrap(){return this._def.innerType}}lr.create=(r,t)=>new lr({innerType:r,typeName:O.ZodReadonly,...q(t)});function pi(r,t={},a){return r?xt.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})}}):xt.create()}const hp={object:ne.lazycreate};var O;(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"})(O||(O={}));const bp=(r,t={message:`Input not instance of ${r.name}`})=>pi(a=>a instanceof r,t),gi=Ee.create,mi=He.create,vp=Vr.create,Tp=Ye.create,fi=Wt.create,jp=st.create,_p=Zr.create,Ap=Qt.create,wp=Xt.create,Ep=xt.create,xp=lt.create,$p=qe.create,Lp=Gr.create,Sp=xe.create,Cp=ne.create,kp=ne.strictCreate,Dp=Jt.create,Pp=Kr.create,Op=er.create,Np=Pe.create,Ip=tr.create,Mp=zr.create,Bp=ct.create,Rp=Lt.create,qp=rr.create,Fp=ar.create,Up=Qe.create,Zp=nr.create,Gp=St.create,yi=$e.create,Kp=Oe.create,zp=Xe.create,Vp=$e.createWithPreprocess,Hp=sr.create;var e=Object.freeze({__proto__:null,defaultErrorMap:Et,setErrorMap:Jd,getErrorMap:Rr,makeIssue:qr,EMPTY_PATH:ep,addIssueToContext:T,ParseStatus:pe,INVALID:N,DIRTY:Fr,OK:me,isAborted:Na,isDirty:Ia,isValid:zt,isAsync:Vt,get util(){return V},get objectUtil(){return Oa},ZodParsedType:A,getParsedType:Ve,ZodType:U,datetimeRegex:ui,ZodString:Ee,ZodNumber:He,ZodBigInt:Ye,ZodBoolean:Wt,ZodDate:st,ZodSymbol:Zr,ZodUndefined:Qt,ZodNull:Xt,ZodAny:xt,ZodUnknown:lt,ZodNever:qe,ZodVoid:Gr,ZodArray:xe,ZodObject:ne,ZodUnion:Jt,ZodDiscriminatedUnion:Kr,ZodIntersection:er,ZodTuple:Pe,ZodRecord:tr,ZodMap:zr,ZodSet:ct,ZodFunction:Lt,ZodLazy:rr,ZodLiteral:ar,ZodEnum:Qe,ZodNativeEnum:nr,ZodPromise:St,ZodEffects:$e,ZodTransformer:$e,ZodOptional:Oe,ZodNullable:Xe,ZodDefault:ir,ZodCatch:or,ZodNaN:Vr,BRAND:yp,ZodBranded:Ra,ZodPipeline:sr,ZodReadonly:lr,custom:pi,Schema:U,ZodSchema:U,late:hp,get ZodFirstPartyTypeKind(){return O},coerce:{string:r=>Ee.create({...r,coerce:!0}),number:r=>He.create({...r,coerce:!0}),boolean:r=>Wt.create({...r,coerce:!0}),bigint:r=>Ye.create({...r,coerce:!0}),date:r=>st.create({...r,coerce:!0})},any:Ep,array:Sp,bigint:Tp,boolean:fi,date:jp,discriminatedUnion:Pp,effect:yi,enum:Up,function:Rp,instanceof:bp,intersection:Op,lazy:qp,literal:Fp,map:Mp,nan:vp,nativeEnum:Zp,never:$p,null:wp,nullable:zp,number:mi,object:Cp,oboolean:()=>fi().optional(),onumber:()=>mi().optional(),optional:Kp,ostring:()=>gi().optional(),pipeline:Hp,preprocess:Vp,promise:Gp,record:Ip,set:Bp,strictObject:kp,string:gi,symbol:_p,transformer:yi,tuple:Np,undefined:Ap,union:Dp,unknown:xp,void:Lp,NEVER:N,ZodIssueCode:y,quotelessJson:Xd,ZodError:Te});const cr=e.string(),Yp=e.object({elementType:e.string().optional(),locator:cr.optional(),errors:e.array(e.string()).optional()}),Ct=e.object({validationItems:e.array(Yp).optional(),success:e.boolean().optional()}),Hr=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 Wp=e.enum(["generateDay","termStartDay","dueDay"]),Qp=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),qa=e.enum(["account","inherit","policy"]),Xp=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),Jp=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),eg=e.enum(["none","first","second","third","fourth","fifth"]),hi=e.object({billingPreferences:e.object({billingPlanName:e.string().optional(),billingLevel:qa.optional()}).optional(),installmentPreferences:e.object({installmentPlanName:e.string().optional(),anchorMode:Wp.optional(),anchorTime:e.string().optional(),anchorType:Qp.optional(),cadence:Xp.optional(),dayOfMonth:e.number().optional(),dayOfWeek:Jp.optional(),dueLeadDays:e.number().optional(),generateLeadDays:e.number().optional(),maxInstallmentsPerTerm:e.number().optional(),weekOfMonth:eg.optional()}).optional()}),Fa=e.enum(["quote","policy","invoice","transaction","segment","term"]),Ua=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),bi=e.enum(["info","block","decline","reject","approve"]),ur=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:bi.optional(),note:e.string().optional()}),tg=e.object({elementLocator:e.string(),level:bi,note:e.string().optional()});e.object({addFlags:tg.array(),clearFlags:e.string().array()});const vi=e.enum(["none","blocked","declined","rejected","approved"]),Za=e.enum(["years","months","weeks","days","hours"]),rg=e.object({column:e.string(),table:e.string(),where:e.record(e.object({key:e.string().optional()})).optional()}).optional(),ut=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:rg,tag:e.array(e.string()).optional()});e.record(ut);const ag=e.object({displayName:e.string().optional(),abstract:e.boolean().optional(),extend:e.string().optional(),data:e.record(ut).optional(),defaultSearchable:e.boolean().optional()}),ng=e.record(ag),ig=e.object({defaultDeadlineDays:e.number(),blocksUnderwriting:e.boolean()}),og=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())}),sg=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()}),lg=e.object({displayName:e.string(),expirationPeriod:e.number()}),Yr=e.object({availableAfter:e.string(),availabilityTimeBasis:e.string(),retireAfter:e.string(),retire:e.boolean(),retirementTimeBasis:e.string(),removeOnRenewalAfter:e.string(),removeOnRenewal:e.boolean()}),cg=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 Ti=e.object({status:e.union([e.literal("queued"),e.literal("failed")]),error:e.string()});e.union([e.literal("queued"),e.literal("failed")]);const ug=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 dg=e.object({extend:e.string(),claimCategory:e.string(),abstract:e.boolean()}),pg=e.object({dataType:e.string(),isKey:e.boolean()}),gg=e.object({key:e.string(),values:e.array(e.string())}),Ga=e.object({version1:e.string(),version2:e.string(),plugins:e.record(e.record(e.string())),latestVersion:e.string()}),mg=e.object({activities:e.record(e.record(ig)),assignmentRoles:e.record(og),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 fg=e.object({dataType:e.string(),makeDistinct:e.boolean()}),yg=e.object({columns:e.record(fg),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 hg=e.object({displayName:e.string(),value:e.number(),tag:e.string()});e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]);const bg=e.object({type:e.string()}),ji=e.object({fields:e.array(e.string())}),vg=e.object({enabled:e.boolean(),account:ji,policy:ji,productIndex:e.record(e.number()),regionIndex:e.record(e.number())}),Tg=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 jg=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(Tg)});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:Ga,pluginVersionStatus:e.record(e.record(e.string()))});const Ka=e.object({isSuccess:e.boolean(),errors:e.array(e.string()),metadata:Ga});e.union([e.literal("queued"),e.literal("failed")]);const _g=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 Ag=e.object({disburseExcess:e.boolean(),disbursementType:e.string(),excludeDebits:e.string(),disbursementThresholds:e.record(e.number())}),_i=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 wg=e.object({lossCategory:e.string()}),Eg=e.object({added:e.record(e.record(e.unknown())),modified:e.record(e.record(e.unknown())),removed:e.record(e.record(e.unknown()))}),xg=e.object({displayName:e.string(),initialCoreNumber:e.string(),format:e.string(),copyFromQuote:e.boolean(),termNumberFormat:e.string(),quoteNumberFormat:e.string(),initialQuoteCoreNumber:e.string()}),$g=e.object({dataType:e.string()}),Lg=e.object({table:e.string(),column:e.string(),where:e.record(gg)}),Ne=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:Lg,searchable:e.boolean(),availability:Yr.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 Sg=e.object({displayName:e.string(),numberingString:e.string()}),Cg=e.object({selectionStartTime:e.string(),resourceNames:e.array(e.string())}),kg=e.object({staticName:e.string()}),Dg=e.object({resourceInstances:e.record(kg),resourceGroups:e.record(Cg)}),Pg=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 Og=e.object({items:e.record($g)}),Ng=e.object({currencyTolerances:e.record(e.number())});e.record(e.unknown());const Ig=e.object({columns:e.record(pg),selectionTimeBasis:e.union([e.literal("policyStartTime"),e.literal("termStartTime"),e.literal("transactionEffectiveTime"),e.literal("currentTime")])}),Mg=e.object({locator:e.string(),name:e.string(),deploymentResult:Ka,bootstrapResult:Ti}),Bg=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:Ka,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(Eg),e.object({resolve:e.boolean().optional(),version:e.string()}),e.object({resolve:e.boolean().optional()});const Rg=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(Ne),defaultInvoiceDocument:e.string(),numberingPlan:e.string(),invoiceNumberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),qg=e.object({resources:Dg}),Fg=e.object({displayName:e.string(),extend:e.string(),defaultSearchable:e.boolean(),data:e.record(Ne),abstract:e.boolean()}),Ug=e.object({type:e.union([e.literal("splitLimit"),e.literal("deductible"),e.literal("limit")]),displayName:e.string(),options:e.record(hg),value:Ne,availability:Yr.optional()}),Zg=e.object({displayName:e.string(),extend:e.string(),data:e.record(Ne),defaultSearchable:e.boolean(),abstract:e.boolean()}),Ai=e.object({displayName:e.string(),extend:e.string(),data:e.record(Ne),numberingPlan:e.string(),abstract:e.boolean()}),wi=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:_g.optional()}),Wr=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(Ne),availability:Yr.optional(),abstract:e.boolean()}),Gg=e.object({extend:e.string(),lossType:e.string(),defaultSearchable:e.boolean(),data:e.record(Ne),numberingPlan:e.string(),contacts:e.record(e.array(e.string())),abstract:e.boolean()}),Kg=e.object({displayName:e.string(),extend:e.string(),data:e.record(Ne),abstract:e.boolean()}),zg=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(Ne),staticData:e.record(Ne),defaultSearchable:e.boolean(),pluralType:e.string(),defaultBillingTrigger:e.union([e.literal("accept"),e.literal("issue")]),numberingPlan:e.string().optional(),numberingString:e.string().optional(),availability:Yr.optional(),withPrecommitReapplication:e.boolean().optional(),abstract:e.boolean()}),dt=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(Sg),defaultRegion:e.string(),defaultSearchable:e.boolean(),dataTypes:e.record(Zg),accounts:e.record(Rg),policyLines:e.record(Wr),exposureGroups:e.record(Wr),exposures:e.record(Wr),coverages:e.record(Wr),products:e.record(zg),coverageTerms:e.record(Ug),charges:e.record(ug),transactionTypes:e.record(Bg),installmentPlans:e.record(_i),billingPlans:e.record(cg),payments:e.record(Kg),disbursements:e.record(Ai),tables:e.record(Ig),constraintTables:e.record(yg),secrets:e.record(Og),documents:e.record(wi),auxDataSettings:e.record(lg),customEvents:e.record(bg),delinquencyPlans:e.record(jg),shortfallTolerancePlans:e.record(Ng),autoRenewalPlans:e.record(sg),excessCreditPlans:e.record(Ag),reversalTypes:e.record(Pg),numberingPlans:e.record(xg),fnol:e.record(Gg),claims:e.record(dg),losses:e.record(wg),contacts:e.record(Fg),contactRoles:e.array(e.string()),workManagement:mg,dataAccessControl:vg,bootstrap:qg,defaultInvoiceDocument:e.string()});e.object({formData:dt.optional()}),e.object({formData:dt.optional()}),e.object({formData:dt.optional()}),e.object({formData:dt.optional(),overwrite:e.boolean().optional()}),e.object({description:e.string().optional(),formData:dt.optional(),name:e.string().optional()}),e.object({config:dt}),e.object({formData:dt.optional()});const Vg=e.enum(["none","required","excluded"]),Ei=e.enum(["generateDay","termStartDay","dueDay"]),Hg=e.enum(["none","dayOfMonth","anchorTime","dayOfWeek","weekOfMonth"]),dr=e.enum(["accept","issue"]),kt=e.enum(["account","inherit","policy"]),xi=e.enum(["none","fullPay","weekly","everyOtherWeek","monthly","quarterly","semiannually","annually","thirtyDays","everyNDays"]),Yg=e.enum(["add","delete","modify","params"]),Wg=e.enum(["none","premium","tax","fee","credit","commission","flatPremium","flatTax","flatFee","flatCommission","cededPremium","flatCededPremium","nonFinancial","surcharge"]),pr=e.enum(["none","years","months","monthsE360","weeks","days","hours"]),Qg=e.enum(["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),Xg=e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]),Jg=e.enum(["product","coverage","exposure","exposureGroup","policyLine"]),em=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 Fe=(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))(Fe||{});const $i=e.enum(["quote","policy","invoice","transaction","segment","term"]),Li=e.enum(["unspecified","account","quote","policy"]),tm=e.enum(["coverage","gap"]),za=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),Va=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),rm=e.enum(["quote","transaction"]),Si=e.enum(["none","info","block","decline","reject","approve"]),am=e.enum(["none","first","second","third","fourth","fifth"]);e.enum(["draft","dataReady","ready","dataError","renderError","conversionError"]);const Ha=e.enum(["text","html","pdf","jpg","jpeg","doc","docx","xls","xlsx","csv","txt","zip"]),Ya=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),nm=e.enum(["clear","delete"]),im=e.enum(["draft","validated","approved","executed","reversed","rejected","discarded"]),om=e.enum(["invoice","account"]),Wa=e.enum(["ach","cash","eft","standard","wire"]),sm=e.enum(["transaction","policy","term","segment","policyUnique","termUnique","invoice"]),lm=e.enum(["policyStartTime","termStartTime","transactionEffectiveTime","currentTime"]),cm=e.enum(["validated","priced","accepted","issued","underwritten","generated"]),um=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),dm=e.enum(["active","pastDeadline","completed","cancelled"]),Ci=e.enum(["account","quickQuote","quote","policy","transaction","invoice"]),pm=e.enum(["active","completed","unassigned","discarded"]),gm=e.enum(["quote","policy","transaction","activity","fnol"]),mm=e.enum(["active","discarded","locked"]),fm=Ai.merge(e.object({displayName:e.string().optional(),numberingPlan:e.string().optional(),data:e.record(e.any()).optional(),extend:e.string().optional()})),ym=e.record(fm),hm=wi.merge(e.object({displayName:e.string().optional(),scope:sm,format:Ha.optional(),selectionTimeBasis:lm.optional(),trigger:cm.optional()})),bm=e.record(hm),vm=_i.merge(e.object({displayName:e.string().optional(),cadence:xi,anchorMode:Ei.optional(),generateLeadDays:e.number().optional(),dueLeadDays:e.number().optional(),installmentWeights:e.array(e.number()).optional(),maxInstallmentsPerTerm:e.number().optional()})),Tm=e.record(vm),jm=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()}),_m=e.record(jm),Am=e.object({selectionStartTime:e.string().optional(),resourceNames:e.array(e.string()).optional()}),wm=e.object({staticName:e.string().optional()}),Em=e.object({resourceGroups:e.record(Am).optional(),resourceInstances:e.record(wm).optional()}),xm=e.object({resources:Em.optional()}),$m=e.record(e.object({columns:e.record(e.object({dataType:e.string()})).optional(),selectionTimeBasis:e.string().optional()})),Lm=e.object({displayName:e.string().optional(),value:e.number().optional(),tag:e.string().optional()}),Sm=e.object({type:e.string(),displayName:e.string().optional(),options:e.record(Lm)}),Cm=e.record(Sm),km=e.enum(["policy","invoice"]),Dm=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),Pm=e.object({displayName:e.string().optional(),gracePeriodDays:e.number(),advanceLapseTo:Dm.optional(),delinquencyLevel:km.optional(),lapseTransactionType:e.string().optional(),events:e.record(e.any()).optional()}),Om=e.record(Pm),Nm=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(ut).optional(),charges:e.array(e.string()).optional(),defaultSearchable:e.boolean().optional()}),gr=e.record(Nm),Im=e.object({abstract:e.boolean(),extend:e.string().optional(),data:e.record(ut).optional(),displayName:e.string().optional()}),Mm=e.record(Im),Bm=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()}),Rm=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(ut).optional(),staticData:e.record(ut).optional(),defaultSearchable:e.boolean().optional()}).merge(Bm),qm=e.record(Rm),Fm=e.enum(["any","creditDistribution","payment"]),Um=e.object({creditType:Fm.optional()}),Zm=e.record(Um),Gm=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),Km=e.object({category:Gm,costBearing:e.boolean()}),zm=e.record(Km);e.object({dataTypes:gr.optional(),accounts:ng,products:qm,coverageTerms:Cm.optional(),delinquencyPlans:Om,autoRenewalPlans:_m,transactionTypes:zm.optional(),reversalTypes:Zm.optional(),dataAccessControl:e.any().optional(),bootstrap:xm.optional(),constraintTables:$m.optional(),payments:Mm.optional(),documents:bm.optional(),disbursements:ym.optional(),installmentPlans:Tm.optional(),policyLines:gr.optional(),exposures:gr.optional(),exposureGroups:gr.optional(),coverages:gr.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:Za.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 Vm=e.object({abstract:e.boolean().optional(),extend:e.string().optional(),displayName:e.string().optional(),data:e.record(ut).optional()});e.record(Vm);const Hm=e.enum(["draft","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded"]),ki=e.union([Hm,e.string()]),Qr=Za,Ym=e.enum(["accept","issue"]),Wm=qa;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 Di=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()});Di.extend({elements:e.array(Di).optional()});const Qa=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(Qa).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 mr=e.string().ulid(),Qm=e.object({locator:mr,staticLocator:mr,rootLocator:mr.optional(),tenantLocator:mr.optional(),type:e.string(),data:e.record(e.any()).optional(),parentLocator:mr.optional(),coverageTerms:e.record(e.string()).optional(),originalEffectiveTime:e.string().optional()}),Xa=Qm.extend({elements:e.lazy(()=>Xa.array().optional())});e.object({locator:cr,quoteState:ki,productName:e.string(),accountLocator:cr,startTime:e.string().optional(),endTime:e.string().optional(),timezone:e.string().optional(),currency:e.string().optional(),underwritingStatus:vi.optional(),expirationTime:e.string().optional(),element:Xa.optional(),type:e.string().optional(),duration:e.number().optional(),durationBasis:Qr.optional(),boundTime:e.string().optional(),issuedTime:e.string().optional(),policyLocator:cr.optional(),validationResult:Ct.optional(),preferences:e.any().optional(),delinquencyPlanName:e.string().optional(),autoRenewalPlanName:e.string().optional(),billingLevel:Wm.optional(),billingTrigger:Ym.optional(),coverageTerms:e.record(e.string()).optional(),groupLocator:cr.optional()});const Xm=e.enum(["premium","tax","fee","credit","cededPremium","nonFinancial","surcharge"]),Jm=e.object({locator:e.string(),elementLocator:e.string(),chargeType:e.string(),chargeCategory:Xm,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:ki,productName:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number().optional(),durationBasis:Qr.optional(),items:e.array(Jm).optional()}),e.object({quoteLocator:e.string(),clearedFlags:ur.array().optional(),flags:ur.array().optional()});const ef=e.enum(["clear","delete"]);e.object({deleteAllAutomaticDocuments:e.boolean(),resetAllUnderwritingFlags:e.boolean(),resetFlagsAction:ef,deleteDocuments:e.string().array(),resetFlags:e.string().array()});const Ja=e.object({accountLocator:e.string()});e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]);const Xr=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 fr=e.object({action:e.string()}),_e=e.lazy(()=>e.object({type:e.string(),locator:e.string(),parentLocator:e.string(),elements:e.array(_e),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 Pi=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 Oi=e.object({billingPlanName:e.string().optional(),billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")]).optional()}),Jr=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 tf=e.object({staticLocator:e.string(),fieldName:e.string(),values:e.array(e.string())}),en=e.object({table:e.string(),column:e.string(),where:e.record(tf)}),rf=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),af=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()}),yr=fr.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())})),nf=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 of=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),data:e.record(e.record(e.unknown())),chargeSummaries:e.record(e.number())}),Ni=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 sf=e.object({historyLocator:e.string(),staticData:e.record(e.record(e.unknown())),updatedBy:e.string(),updatedAt:e.string()}),hr=fr.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:Ni.optional(),billingPreferences:Oi.optional()}),lf=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()}),ea=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()))}),cf=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(ea)}),Ii=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(ea),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 tn=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 Mi=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 uf=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(_e),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(Jr),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 Bi=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(_e),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()}),df=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")])}),pf=e.object({quoteLocator:e.string()}),br=e.object({groupLocator:e.string()}),gf=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(Jr),quoteNumber:e.string()});e.union([e.literal("none"),e.literal("info"),e.literal("block"),e.literal("decline"),e.literal("reject"),e.literal("approve")]);const pt=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()}),mf=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(pt)}),rn=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 Dt=e.object({locator:e.string(),transactionLocator:e.string(),segmentType:e.union([e.literal("coverage"),e.literal("gap")]),startTime:e.string(),endTime:e.string(),element:_e,duration:e.number(),basedOn:e.string().optional()});e.union([e.literal("coverage"),e.literal("gap")]);const ff=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(of),documentSummary:e.array(nf)});e.union([e.literal("coverage"),e.literal("gap")]);const yf=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(ff)}),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 I=e.object({policyLocator:e.string(),transactionLocator:e.string()}),vr=e.object({policyLocator:e.string(),transactionLocator:e.string(),underwritingStatus:e.string()}),Tr=e.object({policyLocator:e.string(),transactionLocator:e.string()}),hf=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(Jr),aggregatedTransactions:e.array(hf)})),Ri=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:Dt}),bf=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(pt),aggregatedTransactions:e.array(bf)})),vf=e.object({transactionLocator:e.string(),flags:e.array(pt),clearedFlags:e.array(pt)}),qi=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 an=e.object({addFlags:e.array(qi),clearFlags:e.array(e.string())}),Fi=e.object({autoRenewalPlanName:e.string()}),Tf=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()}),ta=e.object({billingLevel:e.union([e.literal("account"),e.literal("inherit"),e.literal("policy")])}),jf=e.object({billingTrigger:e.union([e.literal("accept"),e.literal("issue")])}),nn=e.object({delinquencyPlanName:e.string()}),Ui=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),Je=e.object({validationItems:e.array(Ui),success:e.boolean()});e.object({locator:e.string(),requestBody:e.array(_e)}),e.array(Dt),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.array(Dt),e.object({locator:e.string(),requestBody:ea}),e.array(Dt);const jr=fr.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(_e).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(_e)})),gt=fr.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()})),_f=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:Je.optional(),changeInstructions:e.array(e.record(e.unknown())),effectiveTime:e.string(),aggregatedTransactions:e.array(_f),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 Zi=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:_e,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:Je.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:tn}),e.object({locator:e.string(),requestBody:e.array(_e)}),e.object({locator:e.string(),requestBody:e.array(e.string())}),e.object({locator:e.string(),requestBody:e.array(_e)}),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:_e,validationResult:Je.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 Gi=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:Je.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:tn}),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:Je.optional()}),e.object({locator:e.string(),requestBody:Tf}),e.object({locator:e.string(),requestBody:lf}),e.object({locator:e.string()});const Af=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:Je.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(Xr),state:e.union([e.literal("draft"),e.literal("validated"),e.literal("discarded")])}),Ki=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(Xr)}),wf=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:Bi}),e.object({locator:e.string(),quoteNumber:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:br.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:uf}),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:_e,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:Je.optional(),quickQuoteLocator:e.string().optional()}),e.object({locator:e.string(),requestBody:br.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:af}),e.object({requestBody:Ki}),e.object({accountNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({accountLocator:e.string()}),e.array(Xr),e.object({accountLocator:e.string(),requestBody:Xr}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:an}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:rn.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([jr,yr,hr,gt])}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:Ii}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string()});const Ef=e.object({quoteLocator:e.string(),flags:e.array(pt),clearedFlags:e.array(pt)});e.object({locator:e.string(),requestBody:an}),e.object({locator:e.string(),stateless:e.boolean().optional()}),e.object({locator:e.string(),requestBody:rn.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:nn}),e.object({locator:e.string(),requestBody:ta}),e.object({locator:e.string(),requestBody:Fi}),e.object({locator:e.string(),requestBody:br}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:cf}),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:br}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([jr,yr,hr,gt])),transactionType:e.string()}),e.object({locator:e.string(),requestBody:Mi}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([jr,yr,hr,gt]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:gt.optional()}),e.object({locator:e.string(),requestBody:nn}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:e.array(e.union([jr,yr,hr,gt]))}),e.object({baseLocator:e.string().optional(),locator:e.string(),requestBody:gt}),e.object({locator:e.string(),requestBody:jf}),e.object({locator:e.string(),requestBody:ta}),e.object({locator:e.string(),requestBody:Fi}),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:ta}),e.object({accountLocator:e.string(),contactLocator:e.string()}),e.object({accountLocator:e.string(),contactLocator:e.string(),requestBody:rf}),e.object({locator:e.string()}),e.object({locator:e.string(),segmentLocator:e.string()}),e.object({locator:e.string()}),e.array(Dt),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.record(e.record(en)),e.object({locator:e.string()}),e.object({locator:e.string()}),e.array(Pi),e.object({locator:e.string()}),e.array(Pi),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(yf),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.object({listCompleted:e.boolean(),items:e.array(sf)}),e.object({locator:e.string()}),e.record(e.record(en)),e.object({quoteNumber:e.string()}),e.array(Zi),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(en)),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 zi=e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),timezone:e.string(),currency:e.string(),region:e.string(),transaction:Ri,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(zi),e.object({policyNumber:e.string()}),e.array(Gi);const xf=e.object({"policy.account.update":Ja.optional(),"policy.account.validate":Ja.optional(),"policy.account.create":Ja.optional()}),$f=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":df.optional(),"policy.quote.manualunderwrite":pf.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()}),Lf=e.object({"policy.renewal.accept":I.optional(),"policy.cancellation.reset":I.optional(),"policy.cancellation.issue":I.optional(),"policy.reversal.accept":I.optional(),"policy.cancellation.accept":I.optional(),"policy.change.discard":I.optional(),"policy.change.issue":I.optional(),"policy.cancellation.validate":I.optional(),"policy.reversal.underwrite":vr.optional(),"policy.cancellation.price":I.optional(),"policy.reversal.update":I.optional(),"policy.cancellation.refuse":I.optional(),"policy.change.accept":I.optional(),"policy.renewal.refuse":I.optional(),"policy.reinstatement.create":I.optional(),"policy.reinstatement.reset":I.optional(),"policy.renewal.underwrite":vr.optional(),"policy.reversal.reset":I.optional(),"policy.change.update":I.optional(),"policy.reversal.validate":I.optional(),"policy.change.refuse":I.optional(),"policy.reversal.issue":I.optional(),"policy.cancellation.update":I.optional(),"policy.change.manualUnderwrite":Tr.optional(),"policy.change.create":I.optional(),"policy.reinstatement.update":I.optional(),"policy.renewal.manualUnderwrite":Tr.optional(),"policy.reinstatement.discard":I.optional(),"policy.renewal.price":I.optional(),"policy.reversal.discard":I.optional(),"policy.reinstatement.price":I.optional(),"policy.change.validate":I.optional(),"policy.cancellation.underwrite":vr.optional(),"policy.change.underwrite":vr.optional(),"policy.renewal.validate":I.optional(),"policy.reinstatement.accept":I.optional(),"policy.reversal.price":I.optional(),"policy.cancellation.create":I.optional(),"policy.reinstatement.refuse":I.optional(),"policy.renewal.create":I.optional(),"policy.renewal.reset":I.optional(),"policy.cancellation.manualUnderwrite":Tr.optional(),"policy.change.price":I.optional(),"policy.cancellation.discard":I.optional(),"policy.renewal.update":I.optional(),"policy.renewal.issue":I.optional(),"policy.reinstatement.issue":I.optional(),"policy.change.reset":I.optional(),"policy.reversal.manualUnderwrite":Tr.optional(),"policy.reinstatement.underwrite":vr.optional(),"policy.reinstatement.validate":I.optional(),"policy.reinstatement.manualUnderwrite":Tr.optional(),"policy.reversal.refuse":I.optional(),"policy.renewal.discard":I.optional(),"policy.reversal.create":I.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(Af),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([jr,yr,hr,gt])}),e.object({locator:e.string(),requestBody:Ki}),e.object({locator:e.string(),requestBody:wf}),e.object({accountEvents:xf.optional(),quoteEvents:$f.optional(),transactionEvents:Lf.optional()});const ra=e.string().uuid(),M=e.string().ulid(),P=e.string().datetime();e.string().datetime({offset:!0});const Ue=e.record(e.string(),e.string()),J=e.record(e.string(),e.any()),Pt=ra,ee=ra,_r=M,et=M,Ot=M,Ze=M,aa=M,on=M,Vi=M,Ar=M,Sf=M,Hi=M,Yi=M,Wi=M;function tt(r){return e.object({listCompleted:e.boolean(),items:e.array(r)})}function Cf(r){return e.array(r)}const kf=Ui.merge(e.object({locator:et})),sn=Je.merge(e.object({validationItems:e.array(kf).optional()}));e.object({offset:e.coerce.number().nonnegative().int().optional(),count:e.coerce.number().nonnegative().int().optional()});const Df=e.object({type:e.string(),locator:et,staticLocator:M,parentLocator:et,originalEffectiveTime:P.optional(),category:Jg.optional(),data:J.optional(),coverageTerms:Ue.optional()}),Qi=Df.extend({elements:e.lazy(()=>Qi.array().optional())}),Pf=e.object({type:e.string(),staticLocator:M.optional(),parentLocator:et,data:J,coverageTerms:Ue}),ln=Pf.extend({elements:e.lazy(()=>ln.array().optional())}),Of=ea.merge(e.object({locator:et,setData:J,removeData:J,setCoverageTerms:Ue,removeCoverageTerms:J})),Nf=Dt.merge(e.object({locator:on,segmentType:tm,startTime:P,endTime:P,element:Qi,basedOn:M.optional()})),Xi=Gi.merge(e.object({locator:M,accountLocator:M,branchHeadTransactionLocators:e.array(M),issuedTransactionLocator:M,durationBasis:pr,createdAt:P,createdBy:ee,startTime:P,endTime:P,billingTrigger:dr,billingLevel:kt,latestSegmentLocator:M,static:J}));tt(Xi),tn.merge(e.object({setData:J,removeData:J}));const Ji=Ni.merge(e.object({cadence:xi.optional(),anchorMode:Ei.optional(),anchorType:Hg.optional(),dayOfWeek:Qg.optional(),weekOfMonth:am.optional(),installmentWeights:e.array(e.number()).optional()})),eo=Oi.merge(e.object({billingLevel:kt})),Nt=Le.merge(e.object({installmentPreferences:Ji.optional(),billingPreferences:eo.optional()})),If=Ri.merge(e.object({locator:M,transactionCategory:za,preferences:Nt,segment:Nf}));zi.merge(e.object({locator:M,accountLocator:M,static:J,transaction:If})),ta.merge(e.object({billing:kt})),nn.merge(e.object({})),Cf(Xi);const to=e.object({installmentPreferences:Ji.optional(),billingPreferences:eo.optional()});e.object({tenantLocator:Pt,policyLocator:Ot});const Mf=e.enum(["draft","validated","discarded"]),cn=e.enum(["account","policy"]),ro=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:cn.optional(),invoiceDocument:e.string().optional(),preferences:to.optional()});ro.extend({data:e.record(e.any()).optional()}),ro.extend({setData:e.record(e.any()).optional(),removeData:e.record(e.any()).optional()}),e.object({locator:e.string().ulid(),type:e.string(),accountState:Mf,data:e.record(e.any()).optional(),autoRenewalPlanName:e.string().optional(),delinquencyPlanName:e.string().optional(),excessCreditPlanName:e.string().optional(),shortfallTolerancePlanName:e.string().optional(),billingLevel:cn.optional(),invoiceDocument:e.string().optional(),validationResult:Ct.optional(),preferences:to.optional()}),e.enum(["","?","+","*","!"]),e.enum(["?","*"]);const un=Za,Bf=qa,Rf=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:un,billingLevel:Bf,billingTrigger:Rf,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:Ct.optional()});const dn=e.enum(["draft","initialized","validated","earlyUnderwritten","priced","underwritten","accepted","issued","underwrittenBlocked","declined","rejected","refused","discarded","invalidated","reversed"]),na=e.enum(["issuance","change","renewal","cancellation","reinstatement","reversal","aggregate"]),qf=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),element:Xa,segmentType:e.enum(["coverage","gap"]),basedOn:e.string().optional()}),Ff=e.object({locator:e.string(),issuedTime:e.string(),effectiveTime:e.string(),preferences:hi.optional(),segment:qf,transactionCategory:na,transactionType:e.string()}),ao=e.object({locator:e.string(),staticName:e.string().optional(),name:e.string().optional(),documentInstanceState:Ua,referenceType:Fa}),Uf=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()).optional(),data:e.record(e.any()).optional()}),Zf=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string().optional(),type:e.enum(["coverage","gap"]),documentSummary:ao.array().optional(),elements:Uf.array()});e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),durationBasis:un,termNumber:e.number().int(),subsegments:Zf.array().optional(),documentSummary:ao.array().optional()});const Gf=e.object({locator:e.string(),staticLocator:e.string(),name:e.string(),state:Ua,referenceType:Fa}),Kf=e.object({locator:e.string(),staticLocator:e.string(),type:e.string(),chargeSummaries:e.record(e.number()),data:e.record(e.any())}),zf=e.object({locator:e.string(),startTime:e.string(),endTime:e.string(),duration:e.number(),basedOn:e.string(),type:e.enum(["coverage","gap"]),documentSummary:Gf.array(),elements:Kf.array()}),no=e.object({locator:e.string(),staticLocator:e.string(),policyLocator:e.string(),startTime:e.string(),endTime:e.string()});no.extend({number:e.number().int(),autoRenewalLocator:e.string().optional(),previousTermLocator:e.string().optional(),supersedesTermLocator:e.string().optional()}),no.extend({duration:e.number(),durationBasis:un,termNumber:e.number().int(),subsegments:zf.array()}),e.object({locator:e.string(),accountLocator:e.string(),productName:e.string(),currency:e.string(),timezone:e.string(),transaction:Ff,static:e.record(e.any()).optional(),delinquencyPlanName:e.string().optional()}),e.object({locator:e.string(),referenceLocator:e.string(),documentInstanceState:Ua,createdAt:e.string(),referenceType:Fa.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 io=e.object({locator:e.string(),policyLocator:e.string(),termLocator:e.string(),transactionState:dn,createdAt:e.string().datetime(),createdBy:e.string().uuid(),effectiveTime:e.string().datetime(),transactionCategory:na,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:hi.optional(),underwritingStatus:vi.optional(),validationResult:Ct.optional()});io.extend({aggregatedTransactions:e.lazy(()=>io.array().optional())}),e.object({action:e.literal("add"),elements:e.array(Qa).optional()}),e.object({locator:e.string(),action:e.literal("add"),elements:e.array(Qa).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 Vf=e.enum(["premium","tax","fee","credit","nonFinancial","surcharge"]),Hf=e.union([Vf,e.string()]),Yf=e.object({locator:e.string(),elementLocator:e.string(),elementStaticLocator:e.string(),amount:e.number(),chargeCategory:Hf,chargeType:e.string(),rate:e.number(),reversalOfLocator:e.string().optional(),rateDifference:e.number().optional(),tag:e.string().optional()}),oo=e.object({locator:e.string(),policyLocator:e.string(),transactionCategory:na,transactionState:dn,effectiveTime:e.string(),termLocator:e.string().optional(),createdAt:e.string().optional(),createdBy:e.string().uuid().optional(),charges:e.array(Yf).optional()});oo.extend({aggregatedTransactions:e.array(oo).optional()});const so=e.object({locator:e.string(),policyLocator:e.string(),transactionState:dn,effectiveTime:e.string(),transactionCategory:na,underwritingStatus:e.string().optional(),underwritingFlags:ur.array().optional()});so.extend({aggregatedTransactions:e.array(so).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:ur.array().optional(),flags:ur.array().optional()});const Wf=e.enum(["open","settled"]),Qf=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:Wf,currency:Hr,dueTime:e.string(),generatedTime:e.string(),timezone:e.string(),invoiceItems:Qf.array(),totalAmount:e.number().optional(),totalRemainingAmount:e.number().optional(),unsettledTime:e.string().optional(),invoiceNumber:e.string().optional()});const Xf=e.enum(["draft","validated","priced","underwritten","accepted","issued"]),Jf=e.enum(["policy","invoice"]),ey=e.enum(["preGrace","inGrace","lapseTriggered","settled"]);e.enum(["policy","quote","invoice"]);const ty=e.object({advanceLapseTo:Xf,gracePeriodDays:e.number(),lapseTransactionType:e.string(),delinquencyLevel:Jf.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:ey,createdAt:e.string(),settings:ty,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 ry=e.enum(["invoice","account"]),It=e.object({containerLocator:e.string(),containerType:ry,amount:e.number().optional()}),ay=e.enum(["ach","cash","eft","standard","wire"]),ny=e.enum(["draft","validated","posted","reversed","discarded"]);e.object({amount:e.number(),type:e.string(),useDefaultFinancialInstrument:e.boolean(),data:e.record(e.any()),targets:It.array(),accountLocator:e.string().optional(),financialInstrumentLocator:e.string().optional(),currency:e.string().optional(),transactionMethod:ay.optional(),transactionNumber:e.string().optional()}),e.object({locator:e.string(),currency:Hr,paymentState:ny,amount:e.number(),type:e.string(),data:e.record(e.any()).optional(),createdAt:e.string(),createdBy:e.string(),targets:It.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:Ct.optional()}),e.object({amount:e.number(),sources:e.array(It),targets:e.array(It),accountLocator:e.string().optional(),currency:e.string().optional()});const iy=e.enum(["draft","validated","executed","reversed","discarded"]);e.object({locator:e.string(),currency:Hr,creditDistributionState:iy,amount:e.number(),createdAt:e.string(),createdBy:e.string(),sources:It.array(),targets:It.array(),shortfallCreditLocators:e.string().array().optional(),accountLocator:e.string().optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),validationResult:Ct.optional()}),e.object({reversalType:e.string()});const oy=e.enum(["accountCreditBalance","cash","charge","credit","installmentItem","invoiceItem","quote","policy","transaction","accountExpenseBalance"]),sy=e.enum(["credit","debit"]),ly=e.object({faTransactionLocator:e.string(),accountingType:sy,amount:e.number(),faTransactionNote:e.string(),faTransactionTime:e.string()});e.object({referenceLocator:e.string(),currency:Hr,balance:e.number(),referenceType:oy,lineItems:ly.array()});const lo=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),expiresAt:e.string()}),pn=e.object({name:e.string(),tenants:e.array(e.string()),permissions:e.array(e.string()),createdAt:e.string(),expiresAt:e.string()}),cy=e.object({id:e.string(),displayName:e.string(),importConfigUrl:e.string(),clientId:e.string(),clientSecret:e.string()}),co=e.object({name:e.string(),permissions:e.array(e.string()),description:e.string()}),gn=e.object({id:e.string(),displayName:e.string(),singleSignOnServiceUrl:e.string()}),uo=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())}),po=e.object({id:e.string(),displayName:e.string(),type:e.string(),acsUrl:e.string(),callbackUrl:e.string(),entityId:e.string(),singleSignOnServiceUrl:e.string()}),uy=e.object({passwordPolicies:e.record(e.number())}),go=e.object({version:e.number(),name:e.string(),addPermissions:e.array(e.string()),removePermissions:e.array(e.string()),description:e.string()}),mo=e.object({name:e.string(),description:e.string()}),fo=e.object({addRoles:e.array(e.string()),removeRoles:e.array(e.string())}),yo=e.object({addTenants:e.array(e.string()),removeTenants:e.array(e.string())}),dy=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()}),py=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 mn=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())}),ho=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 gy=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:uy}),e.unknown(),e.object({requestBody:uo}),e.array(pn),e.object({requestBody:lo}),e.string(),e.object({requestBody:co}),e.object({requestBody:gn}),e.object({requestBody:gn}),e.object({requestBody:cy}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:mn}),e.object({locator:e.string(),requestBody:yo}),e.object({locator:e.string(),requestBody:fo}),e.object({locator:e.string(),requestBody:e.string()}),e.unknown(),e.object({locator:e.string()}),e.array(ho),e.object({locator:e.string(),requestBody:gy}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:mo}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.unknown(),e.object({locator:e.string(),requestBody:go}),e.object({locator:e.string()}),e.array(e.string()),e.object({locator:e.string(),tenantLocator:e.string()}),e.array(ho),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(mn),e.object({locator:e.string()}),e.array(pn),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(po),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(),gn.merge(e.object({})),po.merge(e.object({})),co.merge(e.object({}));const my=dy.merge(e.object({locator:M,createdAt:P,createdBy:ee}));go.merge(e.object({})),tt(my),fo.merge(e.object({})),yo.merge(e.object({}));const fy=e.enum(["test","production","retired","deleted"]),yy=py.merge(e.object({locator:ra,type:fy,createdAt:P,updatedAt:P,createdBy:ee,description:e.string().optional()}));e.object({listCompleted:e.boolean(),items:e.array(yy)});const hy=e.enum(["queued","failed"]),by=Ti.merge(e.object({status:hy})),vy=Ga.merge(e.object({version1:M,version2:M,latestVersion:M,plugins:e.record(e.string(),Ue)})),Ty=Ka.merge(e.object({metadata:vy}));Mg.merge(e.object({locator:ra,bootstrapResult:by,deploymentResult:Ty})),mo.merge(e.object({})),lo.merge(e.object({expiresAt:P})),pn.merge(e.object({createdAt:P})),uo.merge(e.object({userName:e.string().email(),roles:e.array(e.string()).optional(),tenants:e.array(e.string()).optional()})),mn.merge(e.object({locator:ee,tenants:e.array(e.string()).optional(),permissions:e.array(e.string()).optional()}));const jy=e.object({locator:ee,userName:e.string(),firstName:e.string().optional(),lastName:e.string().optional()});e.object({listCompleted:e.boolean(),items:e.array(jy)}),e.object({firstName:e.string(),lastName:e.string(),permissions:e.array(e.string()),roles:e.array(e.string()),tenants:e.array(e.string())});const _y=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 Ay=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(Ay),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 wy=_y.merge(e.object({locator:aa,referenceLocator:aa,referenceType:$i,referenceDocumentLocator:aa.optional(),transactionLocator:Ze.optional(),segmentLocator:on.optional(),termLocator:Vi.optional(),policyLocator:Ot.optional(),documentInstanceState:Xg,documentFormat:Ha.optional(),metadata:J.optional(),createdAt:P,createdBy:ee,readyAt:P.optional(),renderingData:J.optional()}));tt(wy),e.object({tenantLocator:Pt});const Ey=e.object({category:e.string().optional(),documentFormat:Ha,metadata:e.string().optional(),name:e.string(),referenceLocator:aa,referenceType:$i,segmentLocator:on.optional(),staticName:e.string().optional(),transactionLocator:Ze.optional()}),xy=e.object({name:e.string(),filename:e.string(),size:e.number().nonnegative().int(),buffer:e.instanceof(Buffer)}),$y=e.object({mimetype:e.enum([Fe.text,Fe.textHtml,Fe.textCsv,Fe.imageJpg,Fe.applicationPdf,Fe.applicationZip,Fe.applicationZipWindows,Fe.applicationOctetStream])}).merge(xy);e.object({document:$y}),e.object({tenantLocator:Pt}).merge(Ey);const Ly=e.object({name:e.string(),type:e.string(),searchable:e.boolean().optional()}),Sy=e.object({entityName:e.string(),entityType:e.string(),defaultSearchable:e.boolean().optional(),fields:e.array(Ly),contents:e.array(e.string())}),Cy=e.object({defaultSearchable:e.boolean().optional(),objects:e.array(Sy)}),bo=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 vo=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(vo)}),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 ky=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(bo)});e.object({deploymentVersion:e.string(),searchConfiguration:Cy}),e.object({count:e.number().optional(),offset:e.number().optional(),requestBody:ky});const Dy=e.string().uuid();e.object({tenantLocator:Dy});const Py=e.object({offset:e.string().optional(),count:e.string().optional()});e.object({searchToken:e.string()}).merge(Py);const Oy=e.object({fieldName:e.string().optional(),absolute:Vg.optional(),match:em.optional(),searchTerm:e.string().optional()}).merge(bo);e.object({searchEntityType:Li.optional(),searchString:e.string().optional(),searchTerms:e.array(Oy).optional()});const Ny=vo.merge(e.object({accountLocator:e.string().optional(),searchEntityLocator:e.string().ulid(),productName:e.string().optional(),score:e.number(),searchEntityType:Li,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(Ny)});const To=Jr.merge(e.object({locator:M,reversalOfLocator:M.optional(),elementLocator:et,elementStaticLocator:M,chargeCategory:Wg})),ia=fr.merge(e.object({locator:M,action:Yg})),Iy=ia.merge(e.object({elements:e.array(ln)})),My=ia.merge(e.object({staticLocator:M,setData:J,removeData:J,setCoverageTerms:Ue,removeCoverageTerms:J})),jo=ia.merge(e.object({effectiveTime:P,newPolicyEndTime:P.optional(),preferences:Nt.optional(),triggerBillingChange:e.boolean().optional(),billingModeChange:e.boolean().optional()})),By=ia.merge(e.object({staticElementLocators:e.array(M)})),oa=e.union([Iy,My,jo,By]),_o=e.object({locator:Ze,policyLocator:Ot,termLocator:Vi,effectiveTime:P,transactionState:Va,transactionCategory:za,transactionType:e.string(),createdAt:P,createdBy:ee,aggregateTransactionLocator:Ze.optional(),baseTransactionLocator:Ze.optional(),issuedTime:P.optional(),acceptedTime:P.optional(),preferences:Nt.optional(),underwritingStatus:e.string().optional(),validationResult:sn.optional(),changeInstructions:e.array(oa).optional(),billingTrigger:dr}),Ry=_o.merge(e.object({aggregatedTransactions:e.array(_o)}));tt(Ry),e.array(oa),e.array(oa),e.array(oa);const qy=jo.omit({locator:!0});e.array(qy),Mi.merge(e.object({toTransaction:Ze,reverseTransactions:e.array(Ze),baseLocator:Ze}));const Fy=e.object({locator:M,policyLocator:Ot,effectiveTime:P,transactionState:Va,charges:e.array(To)}),Uy=Fy.extend({aggregatedTransactions:e.lazy(()=>Uy.array().optional())}),Mt=pt.merge(e.object({locator:M,referenceLocator:M,referenceType:rm,level:Si,createdBy:ee,createdTime:P,clearedBy:ee,clearedTime:P,elementLocator:et.optional()})),Zy=e.object({locator:M,policyLocator:Ot,transactionCategory:za,transactionState:Va,effectiveTime:P,underwritingStatus:e.string(),underwritingFlags:e.array(Mt)}),Gy=Zy.extend({aggregatedTransactions:e.lazy(()=>Gy.array().optional())}),Ky=qi.merge(e.object({elementLocator:et,level:Si}));an.merge(e.object({addFlags:e.array(Ky),clearFlags:e.array(M)})),vf.merge(e.object({transactionLocator:Ze,clearedFlags:e.array(Mt),flags:e.array(Mt)}));const zy=Zi.merge(e.object({locator:Ar,quickQuoteLocator:Ar,quoteState:Ya,billingLevel:kt,billingTrigger:dr.optional(),durationBasis:pr.optional(),policyLocator:Ot,preferences:Nt.optional(),validationResult:sn.optional(),static:J,issuedTime:P.optional(),startTime:P.optional(),endTime:P.optional(),acceptedTime:P.optional(),expirationTime:P.optional()}));tt(zy),Bi.merge(e.object({accountLocator:_r,data:J,startTime:P.optional(),endTime:P.optional(),expirationTime:P.optional(),durationBasis:pr.optional(),billingLevel:kt.optional(),preferences:Nt.optional(),static:J.optional(),coverageTerms:Ue.optional(),billingTrigger:dr.optional(),elements:e.array(ln)})),Ii.merge(e.object({startTime:P,endTime:P,expirationTime:P,billingTrigger:dr,billingLevel:kt,preferences:Nt,removeCoverageTerms:J,removeData:J,setCoverageTerms:Ue,setData:J,elements:e.array(Of)})),gf.merge(e.object({tenantLocator:Pt,accountLocator:_r,quoteLocator:Ar,quoteState:Ya,startTime:P,endTime:P,expirationTime:P,durationBasis:pr,items:e.array(To)})),mf.merge(e.object({tenantLocator:Pt,accountLocator:_r,quoteLocator:Ar,quoteState:Ya,startTime:P,endTime:P,expirationTime:P,durationBasis:pr,underwritingFlags:e.array(Mt)})),Ef.merge(e.object({quoteLocator:Ar,flags:e.array(Mt),clearedFlags:e.array(Mt).optional()})),br.merge(e.object({groupLocator:M})),rn.merge(e.object({resetFlagsAction:nm,resetFlags:e.array(M),deleteDocuments:e.array(M)}));const Vy=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 Hy=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 Yy=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 fe=e.object({containerLocator:e.string(),containerType:e.union([e.literal("invoice"),e.literal("account"),e.literal("subpayment")]),amount:e.number().optional()}),fn=e.object({creditLocator:e.string()}),Wy=e.object({"billing.creditdistribution.reverse":fn.optional(),"billing.creditdistribution.create":fn.optional(),"billing.creditdistribution.distribute":fn.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 Qy=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()}),Xy=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 Jy=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 yn=e.object({delinquencyLocator:e.string()}),eh=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 th=e.object({"billing.delinquency.create":yn.optional(),"billing.delinquency.settle":yn.optional(),"billing.delinquency.lapse":yn.optional()});e.object({accountLocator:e.string(),delinquencyLocator:e.string(),listCompleted:e.boolean(),items:e.array(Jy)}),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 sa=e.object({accountLocator:e.string().optional(),type:e.string(),amount:e.number(),data:e.record(e.record(e.unknown())),sources:e.array(fe),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 wr=e.object({disbursementLocator:e.string()}),rh=e.object({"billing.disbursement.create":wr.optional(),"billing.disbursement.reject":wr.optional(),"billing.disbursement.execute":wr.optional(),"billing.disbursement.reverse":wr.optional(),"billing.disbursement.approve":wr.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 ah=e.object({accountLocator:e.string(),installmentsToBeInvoiced:e.array(e.string()),invoiceDueTime:e.string().optional(),timezone:e.string().optional()}),nh=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:ah}),ih=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 oh=e.object({entityLocator:e.string(),type:e.union([e.literal("invoice"),e.literal("installment")])});e.union([e.literal("invoice"),e.literal("installment")]);const sh=e.object({calculationType:e.union([e.literal("none"),e.literal("pastDueInvoices"),e.literal("allInvoices"),e.literal("invoicesAndUnbilledInstallments")]),entitiesUsedInCalculation:e.array(oh),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 Ao=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 lh=e.object({accountLocator:e.string(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")])}),ch=e.object({accountLocator:e.string().optional(),targetType:e.union([e.literal("invoicing"),e.literal("delinquency")]).optional()}),uh=e.object({installmentLatticeLocator:e.string()}),dh=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()}),ph=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()}),gh=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 mh=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 fh=e.object({invoiceLocator:e.string(),accountLocator:e.string(),generateTime:e.string()}),wo=e.object({invoiceLocator:e.string(),accountLocator:e.string()}),yh=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()}),Eo=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(yh)}),hh=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())}),bh=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(dh)}),xo=e.object({generateTime:e.string(),dueTime:e.string(),startTime:e.string(),endTime:e.string(),invoiceItems:e.array(hh),totalAmount:e.number()}),vh=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(eh)}),e.object({listCompleted:e.boolean(),items:e.array(nh)});const Th=e.object({accountLocator:e.string().optional(),amount:e.number().optional(),addSources:e.array(fe),removeSources:e.array(e.string()),addTargets:e.array(fe),removeTargets:e.array(e.string()),currency:e.string().optional()}),jh=e.object({graceEndAt:e.string().optional()}),_h=e.object({triggerTime:e.string().optional(),delinquencyEventState:e.union([e.literal("active"),e.literal("triggered"),e.literal("cancelled")]).optional()}),$o=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(fe),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()}),Ah=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(fe),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()}),Lo=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(fe),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()}),la=e.object({paymentLocator:e.string()}),wh=e.object({"billing.payment.post":la.optional(),"billing.payment.reverse":la.optional(),"billing.payment.distribute":la.optional(),"billing.payment.create":la.optional()});e.union([e.literal("draft"),e.literal("validated"),e.literal("posted"),e.literal("reversed"),e.literal("discarded")]);const Eh=e.object({policyLocator:e.string().optional(),quoteLocator:e.string().optional(),productName:e.string(),invoiceItemSummaries:e.array(bh)}),So=e.object({reversalType:e.string()});e.object({locator:e.string(),installmentSettings:gh,billingSettings:Hy});const hn=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(fe),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 xh=e.object({elementType:e.string(),locator:e.string().optional(),errors:e.array(e.string())}),Er=e.object({validationItems:e.array(xh),success:e.boolean()}),bn=e.object({writeOffLocator:e.string()}),$h=e.object({"billing.writeoff.reverse":bn.optional(),"billing.writeoff.create":bn.optional(),"billing.writeoff.distribute":bn.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(fe),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(fe),externalCashTransactionLocator:e.string().optional(),validationResult:Er.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:Lo}),e.object({locator:e.string(),requestBody:Ah}),e.object({locator:e.string()});const Co=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(fe),externalCashTransactionLocator:e.string().optional(),validationResult:Er.optional(),disbursementNumber:e.string().optional()});e.object({locator:e.string(),requestBody:sa}),e.object({locator:e.string(),requestBody:$o}),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(fe),targets:e.array(fe),validationResult:Er.optional(),executedAt:e.string().optional(),reversalReason:e.string().optional(),reversedAt:e.string().optional(),shortfallCreditLocators:e.array(e.string())});const ko=e.object({accountLocator:e.string().optional(),amount:e.number(),currency:e.string().optional(),sources:e.array(fe),targets:e.array(fe)});e.object({locator:e.string(),requestBody:Th}),e.object({requestBody:Lo}),e.object({invoiceNumber:e.string(),locator:e.string()});const Lh=e.object({locator:e.string(),accountLocator:e.string(),invoiceState:e.union([e.literal("open"),e.literal("settled")]),invoiceItems:e.array(mh),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:ih}),e.object({requestBody:lh}),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:Er.optional()}),e.object({requestBody:Ao}),e.object({locator:e.string(),value:e.boolean().optional()}),e.object({requestBody:sa}),e.object({disbursementNumber:e.string(),locator:e.string()}),e.object({locator:e.string()}),e.object({requestBody:ko}),e.object({locator:e.string()}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:So}),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:ch}),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:Ao}),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:Qy,timezone:e.string(),references:e.array(Xy),graceStartedAt:e.string().optional(),graceEndAt:e.string().optional(),lapseTransactionEffectiveDate:e.string().optional(),configuredDelinquencyEvents:e.array(Yy)}),e.object({locator:e.string(),requestBody:jh}),e.object({delinquencyEventLocator:e.string()}),e.object({delinquencyEventLocator:e.string(),requestBody:_h}),e.object({locator:e.string()}),e.object({locator:e.string(),requestBody:So}),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(Eo),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(Eo),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(Eh),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(xo),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(xo),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(Lh),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(ph),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 Sh=e.object({"billing.installmentlattice.create":uh.optional()}),Ch=e.object({"billing.invoice.generate":fh.optional(),"billing.invoice.settle":wo.optional(),"billing.invoice.unsettle":wo.optional()}),kh=e.object({"billing.shortfallcredit.reverse":hn.optional(),"billing.shortfallcredit.distribute":hn.optional(),"billing.shortfallcredit.create":hn.optional()});e.object({disbursementNumber:e.string()}),e.array(Co),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(vh)}),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(Vy)});const Dh=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:Er.optional()});e.object({locator:e.string(),requestBody:ko}),e.object({accountLocator:e.string(),currency:e.string(),accountCreditBalance:e.number(),excludedDebitsAmountResult:sh,thresholdUsed:e.number().optional(),createDisbursementResult:Dh.optional(),errors:e.array(e.string())}),e.object({creditDistributionEvents:Wy.optional(),delinquencyEvents:th.optional(),disbursementEvents:rh.optional(),installmentEvents:Sh.optional(),invoiceEvents:Ch.optional(),paymentEvents:wh.optional(),shortfallCreditEvents:kh.optional(),writeOffEvents:$h.optional()});const ca=fe.merge(e.object({containerType:om})),Ph=Co.merge(e.object({locator:Sf,disbursementState:im,data:J,createdAt:P,createdBy:ee,sources:e.array(ca),accountLocator:_r.optional(),validationResult:sn.optional()}));tt(Ph),sa.merge(e.object({data:J,sources:e.array(ca),accountLocator:M.optional(),transactionMethod:Wa.optional()})),$o.merge(e.object({setData:J,removeData:J,addSources:e.array(ca),removeSources:e.array(e.string()),accountLocator:_r.optional(),transactionMethod:Wa})),sa.merge(e.object({data:J,sources:e.array(ca),transactionMethod:Wa}));const xr=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 Do=e.object({type:e.string(),deadlineTime:e.string().optional(),references:e.array(xr),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 Po=e.object({deadlineTime:e.string().optional(),addReferences:e.array(xr),removeReferences:e.array(xr),addUnderwritingFlags:e.array(e.string()),removeUnderwritingFlags:e.array(e.string())}),Oo=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 No=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()}),Io=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(xr),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(Oo)});const Mo=e.object({removeQualifications:e.record(e.string()),addQualifications:e.record(e.string())});e.object({requestBody:No}),e.object({requestBody:Do}),e.object({userLocator:e.string()}),e.record(e.string()),e.object({requestBody:Mo,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:Po}),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(Io)}),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 ua=xr.merge(e.object({referenceType:um}));Do.merge(e.object({deadlineTime:P,references:e.array(ua),assignedTo:ee})),Po.merge(e.object({deadlineTime:P.optional(),addReferences:e.array(ua),removeReferences:e.array(ua)}));const Oh=Io.merge(e.object({locator:Hi,activityState:dm,references:e.array(ua).optional(),underwritingFlagLocators:e.array(e.string()).optional(),deadlineTime:P.optional(),assignedTo:ee.optional(),createdBy:ee,createdAt:P,updatedBy:ee.optional(),updatedAt:P.optional()}));tt(Oh);const Ge=e.object({tenantLocator:Pt});Ge.merge(e.object({userLocator:ee})),Ge.merge(e.object({assignmentLocator:Yi})).merge(e.object({userLocator:ee})),Ge.merge(e.object({userLocator:ee})),Ge.merge(e.object({referenceType:e.string(),referenceLocator:M})),Ge.merge(e.object({activityLocator:Hi})).merge(e.object({userLocator:ee})),Ge.merge(e.object({userLocator:ee})),Ge.merge(e.object({referenceType:e.string(),referenceLocator:M})),Ge.merge(e.object({referenceType:e.string(),referenceLocator:M})),Ge.merge(e.object({diaryLocator:Wi})),No.merge(e.object({userLocator:ee,referenceType:Ci}));const Nh=Oo.merge(e.object({locator:Yi,userLocator:ee,referenceType:Ci,assignmentState:pm,createdBy:ee,createdAt:P,updatedBy:ee.optional(),updatedAt:P.optional()}));tt(Nh),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 Ih=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(Ih)});const Mh=e.object({uiType:e.union([e.literal("normal"),e.literal("hidden"),e.literal("readonly")]),key:e.string(),value:e.string()}),Bh=e.object({auxDataSettingsName:e.string().optional(),auxData:e.array(Mh)});e.object({dataSizeKb:e.number()});const vn=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 Bo=e.object({category:e.string().optional(),contents:e.string()}),Rh=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:Bh}),e.unknown(),e.object({includeDiscarded:e.boolean().optional(),referenceLocator:e.string(),referenceType:e.string()}),e.array(vn),e.object({referenceLocator:e.string(),referenceType:e.string(),requestBody:Bo}),e.object({count:e.number().optional(),locator:e.string(),offset:e.number().optional()}),e.array(vn),e.object({locator:e.string(),requestBody:Rh}),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(),Bo.merge(e.object({}));const qh=vn.merge(e.object({locator:Wi,referenceType:gm,diaryState:mm,createdAt:P,createdBy:ee,updatedAt:P,updatedBy:ee}));e.array(qh),e.record(e.string(),e.array(e.string())),Mo.merge(e.object({addQualifications:Ue,removeQualifications:Ue}));var Ro={exports:{}};(function(r,t){(function(a,n){r.exports=n()})(yt,function(){var a,n,i=1e3,o=6e4,s=36e5,l=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,f=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:l,hours:s,minutes:o,seconds:i,milliseconds:1,weeks:6048e5},g=function(G){return G instanceof ce},_=function(G,k,w){return new ce(G,w,k.$l)},b=function(G){return n.p(G)+"s"},Z=function(G){return G<0},x=function(G){return Z(G)?Math.ceil(G):Math.floor(G)},$=function(G){return Math.abs(G)},C=function(G,k){return G?Z(G)?{negative:!0,format:""+$(G)+k}:{negative:!1,format:""+G+k}:{negative:!1,format:""}},ce=function(){function G(w,H,F){var D=this;if(this.$d={},this.$l=F,w===void 0&&(this.$ms=0,this.parseFromMilliseconds()),H)return _(w*h[b(H)],this);if(typeof w=="number")return this.$ms=w,this.parseFromMilliseconds(),this;if(typeof w=="object")return Object.keys(w).forEach(function(L){D.$d[b(L)]=w[L]}),this.calMilliseconds(),this;if(typeof w=="string"){var re=w.match(f);if(re){var se=re.slice(2).map(function(L){return L!=null?Number(L):0});return this.$d.years=se[0],this.$d.months=se[1],this.$d.weeks=se[2],this.$d.days=se[3],this.$d.hours=se[4],this.$d.minutes=se[5],this.$d.seconds=se[6],this.calMilliseconds(),this}}return this}var k=G.prototype;return k.calMilliseconds=function(){var w=this;this.$ms=Object.keys(this.$d).reduce(function(H,F){return H+(w.$d[F]||0)*h[F]},0)},k.parseFromMilliseconds=function(){var w=this.$ms;this.$d.years=x(w/u),w%=u,this.$d.months=x(w/d),w%=d,this.$d.days=x(w/l),w%=l,this.$d.hours=x(w/s),w%=s,this.$d.minutes=x(w/o),w%=o,this.$d.seconds=x(w/i),w%=i,this.$d.milliseconds=w},k.toISOString=function(){var w=C(this.$d.years,"Y"),H=C(this.$d.months,"M"),F=+this.$d.days||0;this.$d.weeks&&(F+=7*this.$d.weeks);var D=C(F,"D"),re=C(this.$d.hours,"H"),se=C(this.$d.minutes,"M"),L=this.$d.seconds||0;this.$d.milliseconds&&(L+=this.$d.milliseconds/1e3,L=Math.round(1e3*L)/1e3);var m=C(L,"S"),v=w.negative||H.negative||D.negative||re.negative||se.negative||m.negative,E=re.format||se.format||m.format?"T":"",j=(v?"-":"")+"P"+w.format+H.format+D.format+E+re.format+se.format+m.format;return j==="P"||j==="-P"?"P0D":j},k.toJSON=function(){return this.toISOString()},k.format=function(w){var H=w||"YYYY-MM-DDTHH:mm:ss",F={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return H.replace(c,function(D,re){return re||String(F[D])})},k.as=function(w){return this.$ms/h[b(w)]},k.get=function(w){var H=this.$ms,F=b(w);return F==="milliseconds"?H%=1e3:H=F==="weeks"?x(H/h[F]):this.$d[F],H||0},k.add=function(w,H,F){var D;return D=H?w*h[b(H)]:g(w)?w.$ms:_(w,this).$ms,_(this.$ms+D*(F?-1:1),this)},k.subtract=function(w,H){return this.add(w,H,!0)},k.locale=function(w){var H=this.clone();return H.$l=w,H},k.clone=function(){return _(this.$ms,this)},k.humanize=function(w){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!w)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},G}(),ie=function(G,k,w){return G.add(k.years()*w,"y").add(k.months()*w,"M").add(k.days()*w,"d").add(k.hours()*w,"h").add(k.minutes()*w,"m").add(k.seconds()*w,"s").add(k.milliseconds()*w,"ms")};return function(G,k,w){a=w,n=w().$utils(),w.duration=function(D,re){var se=w.locale();return _(D,{$l:se},re)},w.isDuration=g;var H=k.prototype.add,F=k.prototype.subtract;k.prototype.add=function(D,re){return g(D)?ie(this,D,1):H.bind(this)(D,re)},k.prototype.subtract=function(D,re){return g(D)?ie(this,D,-1):F.bind(this)(D,re)}}})})(Ro);var Fh=Ro.exports;const Uh=be(Fh);ve.extend(Uh);const Zh=({startTime:r,endTime:t,expirationTime:a,durationBasis:n,termDuration:i})=>{const o=r?ve(r):ve(),s=a?ve(a):void 0,l=s!=null&&s.isAfter(o)?s.format("YYYY-MM-DD"):o.add(1,"month").format("YYYY-MM-DD");if(t&&ve(t).isAfter(o))return{startTime:o.format("YYYY-MM-DD"),endTime:ve(t).format("YYYY-MM-DD"),expirationTime:l};if(!i||!n)return{startTime:o.format("YYYY-MM-DD"),expirationTime:l};const c=ve(o).add(ve.duration({[n]:i}));return{startTime:o.format("YYYY-MM-DD"),endTime:c.format("YYYY-MM-DD"),expirationTime:l}},Gh=(r,t,a)=>{var o,s,l,c,u;let n;r.durationBasis?n=r.durationBasis:t.defaultDurationBasis?n=Qr.options.includes(t.defaultDurationBasis)?t.defaultDurationBasis:void 0:a.defaultDurationBasis?n=Qr.options.includes(a.defaultDurationBasis)?a.defaultDurationBasis:void 0:n=void 0;const i=Zh({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:ot({coverageTermDataModel:a.coverageTerms,coverageTermOptions:((u=r==null?void 0:r.element)==null?void 0:u.coverageTerms)??{},coverageTerms:t.coverageTerms??[]})}};var Kh=it,zh=function(){try{var r=Kh(Object,"defineProperty");return r({},"",{}),r}catch{}}(),qo=zh,Fo=qo;function Vh(r,t,a){t=="__proto__"&&Fo?Fo(r,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[t]=a}var Tn=Vh,Hh=Tn,Yh=Kt,Wh=Object.prototype,Qh=Wh.hasOwnProperty;function Xh(r,t,a){var n=r[t];(!(Qh.call(r,t)&&Yh(n,a))||a===void 0&&!(t in r))&&Hh(r,t,a)}var jn=Xh,Jh=9007199254740991,eb=/^(?:0|[1-9]\d*)$/;function tb(r,t){var a=typeof r;return t=t??Jh,!!t&&(a=="number"||a!="symbol"&&eb.test(r))&&r>-1&&r%1==0&&r<t}var da=tb,rb=jn,ab=_t,nb=da,Uo=je,ib=At;function ob(r,t,a,n){if(!Uo(r))return r;t=ab(t,r);for(var i=-1,o=t.length,s=o-1,l=r;l!=null&&++i<o;){var c=ib(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=Uo(d)?d:nb(t[i+1])?[]:{})}rb(l,c,u),l=l[c]}return r}var Zo=ob,sb=Br,lb=Zo,cb=_t;function ub(r,t,a){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],l=sb(r,s);a(l,s)&&lb(o,cb(s,r),l)}return o}var db=ub;function pb(r,t){return r!=null&&t in Object(r)}var gb=pb,mb=bt,fb=Be,yb="[object Arguments]";function hb(r){return fb(r)&&mb(r)==yb}var bb=hb,Go=bb,vb=Be,Ko=Object.prototype,Tb=Ko.hasOwnProperty,jb=Ko.propertyIsEnumerable,_b=Go(function(){return arguments}())?Go:function(r){return vb(r)&&Tb.call(r,"callee")&&!jb.call(r,"callee")},$r=_b,Ab=9007199254740991;function wb(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Ab}var _n=wb,Eb=_t,xb=$r,$b=ge,Lb=da,Sb=_n,Cb=At;function kb(r,t,a){t=Eb(t,r);for(var n=-1,i=t.length,o=!1;++n<i;){var s=Cb(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&&Sb(i)&&Lb(s,i)&&($b(r)||xb(r)))}var zo=kb,Db=gb,Pb=zo;function Ob(r,t){return r!=null&&Pb(r,t,Db)}var Vo=Ob,Nb=db,Ib=Vo;function Mb(r,t){return Nb(r,t,function(a,n){return Ib(r,n)})}var Bb=Mb;function Rb(r,t){for(var a=-1,n=t.length,i=r.length;++a<n;)r[i+a]=t[a];return r}var An=Rb,Ho=ht,qb=$r,Fb=ge,Yo=Ho?Ho.isConcatSpreadable:void 0;function Ub(r){return Fb(r)||qb(r)||!!(Yo&&r&&r[Yo])}var Zb=Ub,Gb=An,Kb=Zb;function Wo(r,t,a,n,i){var o=-1,s=r.length;for(a||(a=Kb),i||(i=[]);++o<s;){var l=r[o];t>0&&a(l)?t>1?Wo(l,t-1,a,n,i):Gb(i,l):n||(i[i.length]=l)}return i}var zb=Wo,Vb=zb;function Hb(r){var t=r==null?0:r.length;return t?Vb(r,1):[]}var Yb=Hb;function Wb(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 Qb=Wb,Xb=Qb,Qo=Math.max;function Jb(r,t,a){return t=Qo(t===void 0?r.length-1:t,0),function(){for(var n=arguments,i=-1,o=Qo(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),Xb(r,this,l)}}var Xo=Jb;function ev(r){return function(){return r}}var tv=ev;function rv(r){return r}var wn=rv,av=tv,Jo=qo,nv=wn,iv=Jo?function(r,t){return Jo(r,"toString",{configurable:!0,enumerable:!1,value:av(t),writable:!0})}:nv,ov=iv,sv=800,lv=16,cv=Date.now;function uv(r){var t=0,a=0;return function(){var n=cv(),i=lv-(n-a);if(a=n,i>0){if(++t>=sv)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var dv=uv,pv=ov,gv=dv,mv=gv(pv),es=mv,fv=Yb,yv=Xo,hv=es;function bv(r){return hv(yv(r,void 0,fv),r+"")}var ts=bv,vv=Bb,Tv=ts,jv=Tv(function(r,t){return r==null?{}:vv(r,t)}),_v=jv;const pa=be(_v);var Av=Zo;function wv(r,t,a){return r==null?r:Av(r,t,a)}var Ev=wv;const K=be(Ev),xv={Date:!0,RegExp:!0,String:!0,Number:!0};function we(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],f=o?+u:u;if(!(u in t)){i.push({type:"REMOVE",path:[f],oldValue:r[u]});continue}const h=t[u],g=typeof d=="object"&&typeof h=="object"&&Array.isArray(d)===Array.isArray(h);if(d&&h&&g&&!xv[(c=(l=Object.getPrototypeOf(d))==null?void 0:l.constructor)==null?void 0:c.name]&&(!a.cyclesFix||!n.includes(d))){const _=we(d,h,a,a.cyclesFix?n.concat([d]):[]);i.push.apply(i,_.map(b=>(b.path.unshift(f),b)))}else d!==h&&!(Number.isNaN(d)&&Number.isNaN(h))&&!(g&&(isNaN(d)?d+""==h+"":+d==+h))&&i.push({path:[f],type:"CHANGE",value:h,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 $v=r=>{const{data:t,default:a,advanced:n,coverageTerms:i,element:o}=r,s={locator:o.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};we((o==null?void 0:o.data)??{},t).forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":if(g.path.some(_=>!isNaN(Number(_)))){const _=ue(t,g.path[0]);K(s.setData??{},g.path[0],_)}else K(s.setData??{},g.path,g.value);break;case"REMOVE":if(g.path.some(_=>!isNaN(Number(_)))){const _=ue(t,g.path[0]);_.length===0?K(s.removeData??{},g.path[0],!0):K(s.setData??{},g.path[0],_)}else K(s.removeData??{},g.path,!0);break}}),we(o.coverageTerms??{},i??{}).forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":K(s.setCoverageTerms??{},g.path,g.value);break;case"REMOVE":K(s.removeCoverageTerms??{},g.path,!0);break}});const u=pa(o,["startTime","endTime","expirationTime"]),d=pa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName"]),f=we(u??{},a??{}),h=we(d??{},n??{});return f.forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":K(s,g.path,ve(g.value).format());break;case"REMOVE":K(s,g.path,null);break}}),h.forEach(g=>{switch(g.type){case"CHANGE":case"CREATE":K(s,g.path,g.value);break;case"REMOVE":K(s,g.path,null);break}}),s};var Lv=Ir;function Sv(){this.__data__=new Lv,this.size=0}var Cv=Sv;function kv(r){var t=this.__data__,a=t.delete(r);return this.size=t.size,a}var Dv=kv;function Pv(r){return this.__data__.get(r)}var Ov=Pv;function Nv(r){return this.__data__.has(r)}var Iv=Nv,Mv=Ir,Bv=$a,Rv=La,qv=200;function Fv(r,t){var a=this.__data__;if(a instanceof Mv){var n=a.__data__;if(!Bv||n.length<qv-1)return n.push([r,t]),this.size=++a.size,this;a=this.__data__=new Rv(n)}return a.set(r,t),this.size=a.size,this}var Uv=Fv,Zv=Ir,Gv=Cv,Kv=Dv,zv=Ov,Vv=Iv,Hv=Uv;function Bt(r){var t=this.__data__=new Zv(r);this.size=t.size}Bt.prototype.clear=Gv,Bt.prototype.delete=Kv,Bt.prototype.get=zv,Bt.prototype.has=Vv,Bt.prototype.set=Hv;var ga=Bt;function Yv(r,t){for(var a=-1,n=r==null?0:r.length;++a<n&&t(r[a],a,r)!==!1;);return r}var rs=Yv,Wv=jn,Qv=Tn;function Xv(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?Qv(a,l,c):Wv(a,l,c)}return a}var Rt=Xv;function Jv(r,t){for(var a=-1,n=Array(r);++a<r;)n[a]=t(a);return n}var eT=Jv,ma={exports:{}};function tT(){return!1}var rT=tT;ma.exports,function(r,t){var a=ke,n=rT,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}(ma,ma.exports);var qt=ma.exports,aT=bt,nT=_n,iT=Be,oT="[object Arguments]",sT="[object Array]",lT="[object Boolean]",cT="[object Date]",uT="[object Error]",dT="[object Function]",pT="[object Map]",gT="[object Number]",mT="[object Object]",fT="[object RegExp]",yT="[object Set]",hT="[object String]",bT="[object WeakMap]",vT="[object ArrayBuffer]",TT="[object DataView]",jT="[object Float32Array]",_T="[object Float64Array]",AT="[object Int8Array]",wT="[object Int16Array]",ET="[object Int32Array]",xT="[object Uint8Array]",$T="[object Uint8ClampedArray]",LT="[object Uint16Array]",ST="[object Uint32Array]",te={};te[jT]=te[_T]=te[AT]=te[wT]=te[ET]=te[xT]=te[$T]=te[LT]=te[ST]=!0,te[oT]=te[sT]=te[vT]=te[lT]=te[TT]=te[cT]=te[uT]=te[dT]=te[pT]=te[gT]=te[mT]=te[fT]=te[yT]=te[hT]=te[bT]=!1;function CT(r){return iT(r)&&nT(r.length)&&!!te[aT(r)]}var kT=CT;function DT(r){return function(t){return r(t)}}var En=DT,fa={exports:{}};fa.exports,function(r,t){var a=Mn,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}(fa,fa.exports);var xn=fa.exports,PT=kT,OT=En,as=xn,ns=as&&as.isTypedArray,NT=ns?OT(ns):PT,Lr=NT,IT=eT,MT=$r,BT=ge,RT=qt,qT=da,FT=Lr,UT=Object.prototype,ZT=UT.hasOwnProperty;function GT(r,t){var a=BT(r),n=!a&&MT(r),i=!a&&!n&&RT(r),o=!a&&!n&&!i&&FT(r),s=a||n||i||o,l=s?IT(r.length,String):[],c=l.length;for(var u in r)(t||ZT.call(r,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||qT(u,c)))&&l.push(u);return l}var is=GT,KT=Object.prototype;function zT(r){var t=r&&r.constructor,a=typeof t=="function"&&t.prototype||KT;return r===a}var ya=zT;function VT(r,t){return function(a){return r(t(a))}}var os=VT,HT=os,YT=HT(Object.keys,Object),WT=YT,QT=ya,XT=WT,JT=Object.prototype,ej=JT.hasOwnProperty;function tj(r){if(!QT(r))return XT(r);var t=[];for(var a in Object(r))ej.call(r,a)&&a!="constructor"&&t.push(a);return t}var ss=tj,rj=Pr,aj=_n;function nj(r){return r!=null&&aj(r.length)&&!rj(r)}var Ft=nj,ij=is,oj=ss,sj=Ft;function lj(r){return sj(r)?ij(r):oj(r)}var Sr=lj,cj=Rt,uj=Sr;function dj(r,t){return r&&cj(t,uj(t),r)}var pj=dj;function gj(r){var t=[];if(r!=null)for(var a in Object(r))t.push(a);return t}var mj=gj,fj=je,yj=ya,hj=mj,bj=Object.prototype,vj=bj.hasOwnProperty;function Tj(r){if(!fj(r))return hj(r);var t=yj(r),a=[];for(var n in r)n=="constructor"&&(t||!vj.call(r,n))||a.push(n);return a}var jj=Tj,_j=is,Aj=jj,wj=Ft;function Ej(r){return wj(r)?_j(r,!0):Aj(r)}var Cr=Ej,xj=Rt,$j=Cr;function Lj(r,t){return r&&xj(t,$j(t),r)}var Sj=Lj,ha={exports:{}};ha.exports,function(r,t){var a=ke,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 f=u.length,h=l?l(f):new u.constructor(f);return u.copy(h),h}r.exports=c}(ha,ha.exports);var ls=ha.exports;function Cj(r,t){var a=-1,n=r.length;for(t||(t=Array(n));++a<n;)t[a]=r[a];return t}var cs=Cj;function kj(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 Dj=kj;function Pj(){return[]}var us=Pj,Oj=Dj,Nj=us,Ij=Object.prototype,Mj=Ij.propertyIsEnumerable,ds=Object.getOwnPropertySymbols,Bj=ds?function(r){return r==null?[]:(r=Object(r),Oj(ds(r),function(t){return Mj.call(r,t)}))}:Nj,$n=Bj,Rj=Rt,qj=$n;function Fj(r,t){return Rj(r,qj(r),t)}var Uj=Fj,Zj=os,Gj=Zj(Object.getPrototypeOf,Object),ba=Gj,Kj=An,zj=ba,Vj=$n,Hj=us,Yj=Object.getOwnPropertySymbols,Wj=Yj?function(r){for(var t=[];r;)Kj(t,Vj(r)),r=zj(r);return t}:Hj,ps=Wj,Qj=Rt,Xj=ps;function Jj(r,t){return Qj(r,Xj(r),t)}var e_=Jj,t_=An,r_=ge;function a_(r,t,a){var n=t(r);return r_(r)?n:t_(n,a(r))}var gs=a_,n_=gs,i_=$n,o_=Sr;function s_(r){return n_(r,o_,i_)}var ms=s_,l_=gs,c_=ps,u_=Cr;function d_(r){return l_(r,u_,c_)}var fs=d_,p_=it,g_=ke,m_=p_(g_,"DataView"),f_=m_,y_=it,h_=ke,b_=y_(h_,"Promise"),v_=b_,T_=it,j_=ke,__=T_(j_,"Set"),A_=__,w_=it,E_=ke,x_=w_(E_,"WeakMap"),$_=x_,Ln=f_,Sn=$a,Cn=v_,kn=A_,Dn=$_,ys=bt,Ut=Zn,hs="[object Map]",L_="[object Object]",bs="[object Promise]",vs="[object Set]",Ts="[object WeakMap]",js="[object DataView]",S_=Ut(Ln),C_=Ut(Sn),k_=Ut(Cn),D_=Ut(kn),P_=Ut(Dn),mt=ys;(Ln&&mt(new Ln(new ArrayBuffer(1)))!=js||Sn&&mt(new Sn)!=hs||Cn&&mt(Cn.resolve())!=bs||kn&&mt(new kn)!=vs||Dn&&mt(new Dn)!=Ts)&&(mt=function(r){var t=ys(r),a=t==L_?r.constructor:void 0,n=a?Ut(a):"";if(n)switch(n){case S_:return js;case C_:return hs;case k_:return bs;case D_:return vs;case P_:return Ts}return t});var kr=mt,O_=Object.prototype,N_=O_.hasOwnProperty;function I_(r){var t=r.length,a=new r.constructor(t);return t&&typeof r[0]=="string"&&N_.call(r,"index")&&(a.index=r.index,a.input=r.input),a}var M_=I_,B_=ke,R_=B_.Uint8Array,_s=R_,As=_s;function q_(r){var t=new r.constructor(r.byteLength);return new As(t).set(new As(r)),t}var Pn=q_,F_=Pn;function U_(r,t){var a=t?F_(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.byteLength)}var Z_=U_,G_=/\w*$/;function K_(r){var t=new r.constructor(r.source,G_.exec(r));return t.lastIndex=r.lastIndex,t}var z_=K_,ws=ht,Es=ws?ws.prototype:void 0,xs=Es?Es.valueOf:void 0;function V_(r){return xs?Object(xs.call(r)):{}}var H_=V_,Y_=Pn;function W_(r,t){var a=t?Y_(r.buffer):r.buffer;return new r.constructor(a,r.byteOffset,r.length)}var $s=W_,Q_=Pn,X_=Z_,J_=z_,eA=H_,tA=$s,rA="[object Boolean]",aA="[object Date]",nA="[object Map]",iA="[object Number]",oA="[object RegExp]",sA="[object Set]",lA="[object String]",cA="[object Symbol]",uA="[object ArrayBuffer]",dA="[object DataView]",pA="[object Float32Array]",gA="[object Float64Array]",mA="[object Int8Array]",fA="[object Int16Array]",yA="[object Int32Array]",hA="[object Uint8Array]",bA="[object Uint8ClampedArray]",vA="[object Uint16Array]",TA="[object Uint32Array]";function jA(r,t,a){var n=r.constructor;switch(t){case uA:return Q_(r);case rA:case aA:return new n(+r);case dA:return X_(r,a);case pA:case gA:case mA:case fA:case yA:case hA:case bA:case vA:case TA:return tA(r,a);case nA:return new n;case iA:case lA:return new n(r);case oA:return J_(r);case sA:return new n;case cA:return eA(r)}}var _A=jA,AA=je,Ls=Object.create,wA=function(){function r(){}return function(t){if(!AA(t))return{};if(Ls)return Ls(t);r.prototype=t;var a=new r;return r.prototype=void 0,a}}(),Ss=wA,EA=Ss,xA=ba,$A=ya;function LA(r){return typeof r.constructor=="function"&&!$A(r)?EA(xA(r)):{}}var Cs=LA,SA=kr,CA=Be,kA="[object Map]";function DA(r){return CA(r)&&SA(r)==kA}var PA=DA,OA=PA,NA=En,ks=xn,Ds=ks&&ks.isMap,IA=Ds?NA(Ds):OA,MA=IA,BA=kr,RA=Be,qA="[object Set]";function FA(r){return RA(r)&&BA(r)==qA}var UA=FA,ZA=UA,GA=En,Ps=xn,Os=Ps&&Ps.isSet,KA=Os?GA(Os):ZA,zA=KA,VA=ga,HA=rs,YA=jn,WA=pj,QA=Sj,XA=ls,JA=cs,ew=Uj,tw=e_,rw=ms,aw=fs,nw=kr,iw=M_,ow=_A,sw=Cs,lw=ge,cw=qt,uw=MA,dw=je,pw=zA,gw=Sr,mw=Cr,fw=1,yw=2,hw=4,Ns="[object Arguments]",bw="[object Array]",vw="[object Boolean]",Tw="[object Date]",jw="[object Error]",Is="[object Function]",_w="[object GeneratorFunction]",Aw="[object Map]",ww="[object Number]",Ms="[object Object]",Ew="[object RegExp]",xw="[object Set]",$w="[object String]",Lw="[object Symbol]",Sw="[object WeakMap]",Cw="[object ArrayBuffer]",kw="[object DataView]",Dw="[object Float32Array]",Pw="[object Float64Array]",Ow="[object Int8Array]",Nw="[object Int16Array]",Iw="[object Int32Array]",Mw="[object Uint8Array]",Bw="[object Uint8ClampedArray]",Rw="[object Uint16Array]",qw="[object Uint32Array]",X={};X[Ns]=X[bw]=X[Cw]=X[kw]=X[vw]=X[Tw]=X[Dw]=X[Pw]=X[Ow]=X[Nw]=X[Iw]=X[Aw]=X[ww]=X[Ms]=X[Ew]=X[xw]=X[$w]=X[Lw]=X[Mw]=X[Bw]=X[Rw]=X[qw]=!0,X[jw]=X[Is]=X[Sw]=!1;function va(r,t,a,n,i,o){var s,l=t&fw,c=t&yw,u=t&hw;if(a&&(s=i?a(r,n,i,o):a(r)),s!==void 0)return s;if(!dw(r))return r;var d=lw(r);if(d){if(s=iw(r),!l)return JA(r,s)}else{var f=nw(r),h=f==Is||f==_w;if(cw(r))return XA(r,l);if(f==Ms||f==Ns||h&&!i){if(s=c||h?{}:sw(r),!l)return c?tw(r,QA(s,r)):ew(r,WA(s,r))}else{if(!X[f])return i?r:{};s=ow(r,f,l)}}o||(o=new VA);var g=o.get(r);if(g)return g;o.set(r,s),pw(r)?r.forEach(function(Z){s.add(va(Z,t,a,Z,r,o))}):uw(r)&&r.forEach(function(Z,x){s.set(x,va(Z,t,a,x,r,o))});var _=u?c?aw:rw:c?mw:gw,b=d?void 0:_(r);return HA(b||r,function(Z,x){b&&(x=Z,Z=r[x]),YA(s,x,va(Z,t,a,x,r,o))}),s}var Fw=va;function Uw(r){var t=r==null?0:r.length;return t?r[t-1]:void 0}var Zw=Uw;function Gw(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 Kw=Gw,zw=Br,Vw=Kw;function Hw(r,t){return t.length<2?r:zw(r,Vw(t,0,-1))}var Yw=Hw,Ww=_t,Qw=Zw,Xw=Yw,Jw=At;function eE(r,t){return t=Ww(t,r),r=Xw(r,t),r==null||delete r[Jw(Qw(t))]}var tE=eE,rE=bt,aE=ba,nE=Be,iE="[object Object]",oE=Function.prototype,sE=Object.prototype,Bs=oE.toString,lE=sE.hasOwnProperty,cE=Bs.call(Object);function uE(r){if(!nE(r)||rE(r)!=iE)return!1;var t=aE(r);if(t===null)return!0;var a=lE.call(t,"constructor")&&t.constructor;return typeof a=="function"&&a instanceof a&&Bs.call(a)==cE}var Rs=uE,dE=Rs;function pE(r){return dE(r)?void 0:r}var gE=pE,mE=Vn,fE=Fw,yE=tE,hE=_t,bE=Rt,vE=gE,TE=ts,jE=fs,_E=1,AE=2,wE=4,EE=TE(function(r,t){var a={};if(r==null)return a;var n=!1;t=mE(t,function(o){return o=hE(o,r),n||(n=o.length>1),o}),bE(r,jE(r),a),n&&(a=fE(a,_E|AE|wE,vE));for(var i=t.length;i--;)yE(a,t[i]);return a}),xE=EE;const $E=be(xE);function LE(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 SE=LE;function CE(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 kE=CE,DE=kE,PE=DE(),qs=PE,OE=qs,NE=Sr;function IE(r,t){return r&&OE(r,t,NE)}var Fs=IE,ME=Ft;function BE(r,t){return function(a,n){if(a==null)return a;if(!ME(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 RE=BE,qE=Fs,FE=RE,UE=FE(qE),ZE=UE,GE=ZE;function KE(r,t){var a=!0;return GE(r,function(n,i,o){return a=!!t(n,i,o),a}),a}var zE=KE,VE="__lodash_hash_undefined__";function HE(r){return this.__data__.set(r,VE),this}var YE=HE;function WE(r){return this.__data__.has(r)}var QE=WE,XE=La,JE=YE,ex=QE;function Ta(r){var t=-1,a=r==null?0:r.length;for(this.__data__=new XE;++t<a;)this.add(r[t])}Ta.prototype.add=Ta.prototype.push=JE,Ta.prototype.has=ex;var tx=Ta;function rx(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 ax=rx;function nx(r,t){return r.has(t)}var ix=nx,ox=tx,sx=ax,lx=ix,cx=1,ux=2;function dx(r,t,a,n,i,o){var s=a&cx,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 f=-1,h=!0,g=a&ux?new ox:void 0;for(o.set(r,t),o.set(t,r);++f<l;){var _=r[f],b=t[f];if(n)var Z=s?n(b,_,f,t,r,o):n(_,b,f,r,t,o);if(Z!==void 0){if(Z)continue;h=!1;break}if(g){if(!sx(t,function(x,$){if(!lx(g,$)&&(_===x||i(_,x,a,n,o)))return g.push($)})){h=!1;break}}else if(!(_===b||i(_,b,a,n,o))){h=!1;break}}return o.delete(r),o.delete(t),h}var Us=dx;function px(r){var t=-1,a=Array(r.size);return r.forEach(function(n,i){a[++t]=[i,n]}),a}var gx=px;function mx(r){var t=-1,a=Array(r.size);return r.forEach(function(n){a[++t]=n}),a}var fx=mx,Zs=ht,Gs=_s,yx=Kt,hx=Us,bx=gx,vx=fx,Tx=1,jx=2,_x="[object Boolean]",Ax="[object Date]",wx="[object Error]",Ex="[object Map]",xx="[object Number]",$x="[object RegExp]",Lx="[object Set]",Sx="[object String]",Cx="[object Symbol]",kx="[object ArrayBuffer]",Dx="[object DataView]",Ks=Zs?Zs.prototype:void 0,On=Ks?Ks.valueOf:void 0;function Px(r,t,a,n,i,o,s){switch(a){case Dx:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case kx:return!(r.byteLength!=t.byteLength||!o(new Gs(r),new Gs(t)));case _x:case Ax:case xx:return yx(+r,+t);case wx:return r.name==t.name&&r.message==t.message;case $x:case Sx:return r==t+"";case Ex:var l=bx;case Lx:var c=n&Tx;if(l||(l=vx),r.size!=t.size&&!c)return!1;var u=s.get(r);if(u)return u==t;n|=jx,s.set(r,t);var d=hx(l(r),l(t),n,i,o,s);return s.delete(r),d;case Cx:if(On)return On.call(r)==On.call(t)}return!1}var Ox=Px,zs=ms,Nx=1,Ix=Object.prototype,Mx=Ix.hasOwnProperty;function Bx(r,t,a,n,i,o){var s=a&Nx,l=zs(r),c=l.length,u=zs(t),d=u.length;if(c!=d&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in t:Mx.call(t,h)))return!1}var g=o.get(r),_=o.get(t);if(g&&_)return g==t&&_==r;var b=!0;o.set(r,t),o.set(t,r);for(var Z=s;++f<c;){h=l[f];var x=r[h],$=t[h];if(n)var C=s?n($,x,h,t,r,o):n(x,$,h,r,t,o);if(!(C===void 0?x===$||i(x,$,a,n,o):C)){b=!1;break}Z||(Z=h=="constructor")}if(b&&!Z){var ce=r.constructor,ie=t.constructor;ce!=ie&&"constructor"in r&&"constructor"in t&&!(typeof ce=="function"&&ce instanceof ce&&typeof ie=="function"&&ie instanceof ie)&&(b=!1)}return o.delete(r),o.delete(t),b}var Rx=Bx,Nn=ga,qx=Us,Fx=Ox,Ux=Rx,Vs=kr,Hs=ge,Ys=qt,Zx=Lr,Gx=1,Ws="[object Arguments]",Qs="[object Array]",ja="[object Object]",Kx=Object.prototype,Xs=Kx.hasOwnProperty;function zx(r,t,a,n,i,o){var s=Hs(r),l=Hs(t),c=s?Qs:Vs(r),u=l?Qs:Vs(t);c=c==Ws?ja:c,u=u==Ws?ja:u;var d=c==ja,f=u==ja,h=c==u;if(h&&Ys(r)){if(!Ys(t))return!1;s=!0,d=!1}if(h&&!d)return o||(o=new Nn),s||Zx(r)?qx(r,t,a,n,i,o):Fx(r,t,c,a,n,i,o);if(!(a&Gx)){var g=d&&Xs.call(r,"__wrapped__"),_=f&&Xs.call(t,"__wrapped__");if(g||_){var b=g?r.value():r,Z=_?t.value():t;return o||(o=new Nn),i(b,Z,a,n,o)}}return h?(o||(o=new Nn),Ux(r,t,a,n,i,o)):!1}var Vx=zx,Hx=Vx,Js=Be;function el(r,t,a,n,i){return r===t?!0:r==null||t==null||!Js(r)&&!Js(t)?r!==r&&t!==t:Hx(r,t,a,n,el,i)}var In=el,Yx=ga,Wx=In,Qx=1,Xx=2;function Jx(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 f=new Yx;if(n)var h=n(u,d,c,r,t,f);if(!(h===void 0?Wx(d,u,Qx|Xx,n,f):h))return!1}}return!0}var e$=Jx,t$=je;function r$(r){return r===r&&!t$(r)}var tl=r$,a$=tl,n$=Sr;function i$(r){for(var t=n$(r),a=t.length;a--;){var n=t[a],i=r[n];t[a]=[n,i,a$(i)]}return t}var o$=i$;function s$(r,t){return function(a){return a==null?!1:a[r]===t&&(t!==void 0||r in Object(a))}}var rl=s$,l$=e$,c$=o$,u$=rl;function d$(r){var t=c$(r);return t.length==1&&t[0][2]?u$(t[0][0],t[0][1]):function(a){return a===r||l$(a,r,t)}}var p$=d$,g$=In,m$=Xn,f$=Vo,y$=wa,h$=tl,b$=rl,v$=At,T$=1,j$=2;function _$(r,t){return y$(r)&&h$(t)?b$(v$(r),t):function(a){var n=m$(a,r);return n===void 0&&n===t?f$(a,r):g$(t,n,T$|j$)}}var A$=_$;function w$(r){return function(t){return t==null?void 0:t[r]}}var E$=w$,x$=Br;function $$(r){return function(t){return x$(t,r)}}var L$=$$,S$=E$,C$=L$,k$=wa,D$=At;function P$(r){return k$(r)?S$(D$(r)):C$(r)}var O$=P$,N$=p$,I$=A$,M$=wn,B$=ge,R$=O$;function q$(r){return typeof r=="function"?r:r==null?M$:typeof r=="object"?B$(r)?I$(r[0],r[1]):N$(r):R$(r)}var al=q$,F$=Kt,U$=Ft,Z$=da,G$=je;function K$(r,t,a){if(!G$(a))return!1;var n=typeof t;return(n=="number"?U$(a)&&Z$(t,a.length):n=="string"&&t in a)?F$(a[t],r):!1}var nl=K$,z$=SE,V$=zE,H$=al,Y$=ge,W$=nl;function Q$(r,t,a){var n=Y$(r)?z$:V$;return a&&W$(r,t,a)&&(t=void 0),n(r,H$(t))}var X$=Q$;const J$=be(X$);var eL=Object.prototype,tL=eL.hasOwnProperty;function rL(r,t){return r!=null&&tL.call(r,t)}var aL=rL,nL=aL,iL=zo;function oL(r,t){return r!=null&&iL(r,t,nL)}var sL=oL;const lL=be(sL);var cL=ss,uL=kr,dL=$r,pL=ge,gL=Ft,mL=qt,fL=ya,yL=Lr,hL="[object Map]",bL="[object Set]",vL=Object.prototype,TL=vL.hasOwnProperty;function jL(r){if(r==null)return!0;if(gL(r)&&(pL(r)||typeof r=="string"||typeof r.splice=="function"||mL(r)||yL(r)||dL(r)))return!r.length;var t=uL(r);if(t==hL||t==bL)return!r.size;if(fL(r))return!cL(r).length;for(var a in r)if(TL.call(r,a))return!1;return!0}var _L=jL;const il=be(_L);var AL=rs,wL=Ss,EL=Fs,xL=al,$L=ba,LL=ge,SL=qt,CL=Pr,kL=je,DL=Lr;function PL(r,t,a){var n=LL(r),i=n||SL(r)||DL(r);if(t=xL(t),a==null){var o=r&&r.constructor;i?a=n?new o:[]:kL(r)?a=CL(o)?wL($L(r)):{}:a={}}return(i?AL:EL)(r,function(s,l,c){return t(a,s,l,c)}),a}var OL=PL;const NL=be(OL);function Dr(r,t){return NL(r,(a,n,i)=>{if(!lL(t,i))a[i]=n;else if(Ea(n)&&!_a(n)){const o=Dr(n,t[i]);il(o)||(a[i]=o)}else if(_a(n)&&_a(t[i])){const o=n.map((s,l)=>Dr(s,t[i][l]));J$(o,il)||(a[i]=o)}})}const IL=({data:r,transactionSnapshot:t,staticLocator:a})=>{const n={action:"modify",staticLocator:a},i=structuredClone(r);n.setCoverageTerms=r.coverageTerms,n.removeCoverageTerms=Dr(t.segment.element.coverageTerms??{},r.coverageTerms??{});const o=t.segment.element.data??{},s=$E(i,["coverageTerms","default"]);return n.setData=s,n.removeData=Dr(o,s),n},ML=({data:r})=>{const t={action:"params",effectiveTime:ve(r.default.effectiveTime).format()};return r.default.newPolicyEndDate&&(t.newPolicyEndTime=ve(r.default.newPolicyEndDate).format()),t},BL=he.z.enum(["currency","timezone","billingLevel","billingTrigger","durationBasis","delinquencyPlanName","autoRenewalPlanName","installmentPlanName"]);he.z.record(BL,he.z.string().optional());const RL=r=>{var g,_;const{data:t,default:a,advanced:n,coverageTerms:i,quote:o}=r,s={setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};we(((g=o.element)==null?void 0:g.data)??{},t).forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":if(b.path.some(Z=>!isNaN(Number(Z)))){const Z=ue(t,b.path[0]);K(s.setData??{},b.path[0],Z)}else K(s.setData??{},b.path,b.value);break;case"REMOVE":if(b.path.some(Z=>!isNaN(Number(Z)))){const Z=ue(t,b.path[0]);Z.length===0?K(s.removeData??{},b.path[0],!0):K(s.setData??{},b.path[0],Z)}else K(s.removeData??{},b.path,!0);break}}),we(((_=o.element)==null?void 0:_.coverageTerms)??{},i??{}).forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":K(s.setCoverageTerms??{},b.path,b.value);break;case"REMOVE":K(s.removeCoverageTerms??{},b.path,!0);break}});const u=pa(o,["startTime","endTime","expirationTime"]),d=pa(o,["currency","timezone","billingPlan","defaultTermDuration","installmentPlan","durationBasis","delinquencyPlanName","installmentPlanName"]),f=we(u??{},a??{}),h=we(d??{},n??{});return f.forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":K(s,b.path,ve(b.value).format());break;case"REMOVE":K(s,b.path,null);break}}),h.forEach(b=>{switch(b.type){case"CHANGE":case"CREATE":b.path.includes("installmentPlanName")?K(s,["preferences","installmentPreferences",...b.path],b.value):K(s,b.path,b.value);break;case"REMOVE":K(s,b.path,null);break}}),s},qL=r=>{var i,o;const t={locator:r.element.locator,setData:{},removeData:{},setCoverageTerms:{},removeCoverageTerms:{}};return we(((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=ue(r.data,s.path[0]);K(t.setData??{},s.path[0],l)}else K(t.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=ue(r.data,s.path[0]);l.length===0?K(t.removeData??{},s.path[0],!0):K(t.setData??{},s.path[0],l)}else K(t.removeData??{},s.path,!0);break}}),we(((o=r.element)==null?void 0:o.coverageTerms)??{},r.coverageTerms??{}).forEach(s=>{switch(s.type){case"CHANGE":case"CREATE":K(t.setCoverageTerms??{},s.path,s.value);break;case"REMOVE":K(t.removeCoverageTerms??{},s.path,!0);break}}),t};function FL(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 UL=({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&&ue(a,l)&&K(o,`${s}`,ue(a,l))}),n[t]?n[t]={...n[t],[i]:o}:n[t]={[i]:o}}),n};var ZL=Tn,GL=Kt;function KL(r,t,a){(a!==void 0&&!GL(r[t],a)||a===void 0&&!(t in r))&&ZL(r,t,a)}var ol=KL,zL=Ft,VL=Be;function HL(r){return VL(r)&&zL(r)}var YL=HL;function WL(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var sl=WL,QL=Rt,XL=Cr;function JL(r){return QL(r,XL(r))}var eS=JL,ll=ol,tS=ls,rS=$s,aS=cs,nS=Cs,cl=$r,ul=ge,iS=YL,oS=qt,sS=Pr,lS=je,cS=Rs,uS=Lr,dl=sl,dS=eS;function pS(r,t,a,n,i,o,s){var l=dl(r,a),c=dl(t,a),u=s.get(c);if(u){ll(r,a,u);return}var d=o?o(l,c,a+"",r,t,s):void 0,f=d===void 0;if(f){var h=ul(c),g=!h&&oS(c),_=!h&&!g&&uS(c);d=c,h||g||_?ul(l)?d=l:iS(l)?d=aS(l):g?(f=!1,d=tS(c,!0)):_?(f=!1,d=rS(c,!0)):d=[]:cS(c)||cl(c)?(d=l,cl(l)?d=dS(l):(!lS(l)||sS(l))&&(d=nS(c))):f=!1}f&&(s.set(c,d),i(d,c,n,o,s),s.delete(c)),ll(r,a,d)}var gS=pS,mS=ga,fS=ol,yS=qs,hS=gS,bS=je,vS=Cr,TS=sl;function pl(r,t,a,n,i){r!==t&&yS(t,function(o,s){if(i||(i=new mS),bS(o))hS(r,t,s,a,pl,n,i);else{var l=n?n(TS(r,s),o,s+"",r,t,i):void 0;l===void 0&&(l=o),fS(r,s,l)}},vS)}var jS=pl,_S=wn,AS=Xo,wS=es;function ES(r,t){return wS(AS(r,t,_S),r+"")}var xS=ES,$S=xS,LS=nl;function SS(r){return $S(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&&LS(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 CS=SS,kS=jS,DS=CS,PS=DS(function(r,t,a){kS(r,t,a)}),OS=PS;const NS=be(OS),IS=({defaultValues:r,accountType:t,account:a})=>{var i,o;const n=NS(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 MS=In;function BS(r,t){return MS(r,t)}var RS=BS;const qS=be(RS),gl=(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]??{},f=gl(u,d,a?[...a,o,`${c}`]:[o,`${c}`]);f.length!==0&&n.push(...f)}else if(Ea(r[o])&&Ea(t[o])){if(qS(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},FS=(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=ue(i,o);l&&(typeof l=="string"&&s.includes(l)||(i[o]=""))}),i};he.z.object({autoRenewalPlanName:he.z.string().optional(),delinquencyPlanName:he.z.string().optional(),excessCreditPlanName:he.z.string().optional(),shortfallTolerancePlanName:he.z.string().optional(),billingLevel:cn.optional(),invoiceDocument:he.z.string().optional(),installmentPlanName:he.z.string().optional()});function US(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 we(((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=ue(r.data,s.path[0]);K(i.setData??{},s.path[0],l)}else K(i.setData??{},s.path,s.value);break;case"REMOVE":if(s.path.some(l=>!isNaN(Number(l)))){const l=ue(r.data,s.path[0]);l.length===0?K(i.removeData??{},s.path[0],!0):K(i.setData??{},s.path[0],l)}else K(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}:{}}}}z.DataFieldTagFeature=Jn,z.compareData=gl,z.dataModelToJSONSchema=ei,z.extractElementByLocator=Da,z.extractElementDataModelFromQuote=Ud,z.extractElementDataModelFromSegment=Zd,z.extractElementDataModelFromType=Pa,z.extractElementsFromQuote=Gd,z.extractElementsFromTransactionSegment=Kd,z.extractProductDataModel=zd,z.extractProductElements=Vd,z.getAccountRequest=US,z.getCoverageTermsDefaultValues=ot,z.getDefaultAccountFormValues=IS,z.getDefaultDraftTransactionValues=Yd,z.getDefaultElementValues=Wd,z.getDefaultInitializedTransactionValues=Qd,z.getDefaultQuoteValues=Gh,z.getElementNameByType=ri,z.getElementRequest=qL,z.getElementTransactionUpdateRequestFromFormData=$v,z.getEvaluatedConstraintsRequest=UL,z.getModifyChangeInstructionCreateRequestFromFormData=IL,z.getParamsChangeInstructionCreateRequestFromFormData=ML,z.getQuoteRequest=RL,z.getRemoveDataFieldValues=Dr,z.getUpdatedDataFromConstraints=FS,z.splitInputAndQuantifier=ai,z.translateError=FL,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
3
3
|
//# sourceMappingURL=index.umd.js.map
|