@akad/design-system 0.1.0-beta.10 → 0.1.0-beta.11
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/package.json +10 -10
- package/react/react-lib.js +5760 -5783
- package/react/react-lib.umd.cjs +11 -11
package/react/react-lib.umd.cjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Z,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],w):(Z=typeof globalThis<"u"?globalThis:Z||self,w(Z["react-lib"]={},Z.jsxRuntime,Z.React))})(this,function(Z,w,F){"use strict";var Sl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ps(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fs={exports:{}},Gr={exports:{}},ge={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var
|
|
8
|
+
*/var ba;function El(){if(ba)return ge;ba=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,T=t?Symbol.for("react.suspense_list"):60120,S=t?Symbol.for("react.memo"):60115,k=t?Symbol.for("react.lazy"):60116,E=t?Symbol.for("react.block"):60121,_=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,I=t?Symbol.for("react.scope"):60119;function N(b){if(typeof b=="object"&&b!==null){var R=b.$$typeof;switch(R){case e:switch(b=b.type,b){case u:case c:case s:case a:case n:case p:return b;default:switch(b=b&&b.$$typeof,b){case o:case d:case k:case S:case i:return b;default:return R}}case r:return R}}}function D(b){return N(b)===c}return ge.AsyncMode=u,ge.ConcurrentMode=c,ge.ContextConsumer=o,ge.ContextProvider=i,ge.Element=e,ge.ForwardRef=d,ge.Fragment=s,ge.Lazy=k,ge.Memo=S,ge.Portal=r,ge.Profiler=a,ge.StrictMode=n,ge.Suspense=p,ge.isAsyncMode=function(b){return D(b)||N(b)===u},ge.isConcurrentMode=D,ge.isContextConsumer=function(b){return N(b)===o},ge.isContextProvider=function(b){return N(b)===i},ge.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ge.isForwardRef=function(b){return N(b)===d},ge.isFragment=function(b){return N(b)===s},ge.isLazy=function(b){return N(b)===k},ge.isMemo=function(b){return N(b)===S},ge.isPortal=function(b){return N(b)===r},ge.isProfiler=function(b){return N(b)===a},ge.isStrictMode=function(b){return N(b)===n},ge.isSuspense=function(b){return N(b)===p},ge.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===s||b===c||b===a||b===n||b===p||b===T||typeof b=="object"&&b!==null&&(b.$$typeof===k||b.$$typeof===S||b.$$typeof===i||b.$$typeof===o||b.$$typeof===d||b.$$typeof===_||b.$$typeof===g||b.$$typeof===I||b.$$typeof===E)},ge.typeOf=N,ge}var ye={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var
|
|
15
|
+
*/var $a;function kl(){return $a||($a=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,u=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,T=t?Symbol.for("react.suspense_list"):60120,S=t?Symbol.for("react.memo"):60115,k=t?Symbol.for("react.lazy"):60116,E=t?Symbol.for("react.block"):60121,_=t?Symbol.for("react.fundamental"):60117,g=t?Symbol.for("react.responder"):60118,I=t?Symbol.for("react.scope"):60119;function N(q){return typeof q=="string"||typeof q=="function"||q===s||q===c||q===a||q===n||q===p||q===T||typeof q=="object"&&q!==null&&(q.$$typeof===k||q.$$typeof===S||q.$$typeof===i||q.$$typeof===o||q.$$typeof===d||q.$$typeof===_||q.$$typeof===g||q.$$typeof===I||q.$$typeof===E)}function D(q){if(typeof q=="object"&&q!==null){var pe=q.$$typeof;switch(pe){case e:var tt=q.type;switch(tt){case u:case c:case s:case a:case n:case p:return tt;default:var ht=tt&&tt.$$typeof;switch(ht){case o:case d:case k:case S:case i:return ht;default:return pe}}case r:return pe}}}var b=u,R=c,L=o,Q=i,K=e,ce=d,U=s,G=k,ne=S,W=r,he=a,me=n,_e=p,Ie=!1;function Fe(q){return Ie||(Ie=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),A(q)||D(q)===u}function A(q){return D(q)===c}function y(q){return D(q)===o}function M(q){return D(q)===i}function O(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function l(q){return D(q)===d}function f(q){return D(q)===s}function v(q){return D(q)===k}function P(q){return D(q)===S}function V(q){return D(q)===r}function B(q){return D(q)===a}function z(q){return D(q)===n}function te(q){return D(q)===p}ye.AsyncMode=b,ye.ConcurrentMode=R,ye.ContextConsumer=L,ye.ContextProvider=Q,ye.Element=K,ye.ForwardRef=ce,ye.Fragment=U,ye.Lazy=G,ye.Memo=ne,ye.Portal=W,ye.Profiler=he,ye.StrictMode=me,ye.Suspense=_e,ye.isAsyncMode=Fe,ye.isConcurrentMode=A,ye.isContextConsumer=y,ye.isContextProvider=M,ye.isElement=O,ye.isForwardRef=l,ye.isFragment=f,ye.isLazy=v,ye.isMemo=P,ye.isPortal=V,ye.isProfiler=B,ye.isStrictMode=z,ye.isSuspense=te,ye.isValidElementType=N,ye.typeOf=D}()),ye}var Sa;function Ea(){return Sa||(Sa=1,process.env.NODE_ENV==="production"?Gr.exports=El():Gr.exports=kl()),Gr.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var k=D(M,H,u,p,$+"."+H,t);if(k)return k}return null}return b(v)}function X(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(X);if(F===null||o(F))return!0;var v=f(F);if(v){var x=v.call(F),P;if(v!==F.entries){for(;!(P=x.next()).done;)if(!X(P.value))return!1}else for(;!(P=x.next()).done;){var u=P.value;if(u&&!X(u[1]))return!1}}else return!1;return!0;default:return!1}}function fe(F,v){return F==="symbol"?!0:v?v["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&v instanceof Symbol:!1}function he(F){var v=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":fe(v,F)?"symbol":v}function ge(F){if(typeof F>"u"||F===null)return""+F;var v=he(F);if(v==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return v}function De(F){var v=ge(F);switch(v){case"array":case"object":return"an "+v;case"boolean":case"date":case"regexp":return"a "+v;default:return v}}function Ne(F){return!F.constructor||!F.constructor.name?w:F.constructor.name}return y.checkPropTypes=n,y.resetWarningCache=n.resetWarningCache,y.PropTypes=y,y},Ds}var Is,ha;function Xo(){if(ha)return Is;ha=1;var r=Ts();function e(){}function t(){}return t.resetWarningCache=e,Is=function(){function s(i,o,l,c,d,f){if(f!==r){var w=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw w.name="Invariant Violation",w}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},Is}if(process.env.NODE_ENV!=="production"){var Jo=oa(),Zo=!0;ks.exports=Yo()(Jo.isElement,Zo)}else ks.exports=Xo()();var Qo=ks.exports;const h=Es(Qo),ma={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},ga={Solid:"solid",Outline:"outline",Text:"text"},ya={Large:"lg",Medium:"md",Small:"sm"},va={Right:"right",Left:"left"},be={name:"Button",class:"ds-button",props:{color:{type:String,default:ma.Primary,options:Object.values(ma)},variant:{type:String,default:ga.Solid,options:Object.values(ga)},size:{type:String,default:ya.Medium,options:Object.values(ya)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:va.Right,options:Object.values(va)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}},_a={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},ba={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},$a={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},Sa={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},Ze={name:"Icon",class:"ds-icon",props:{color:{type:String,default:_a.Neutral90,options:Object.values(_a)},image:{type:String,default:"settings"},variation:{type:String,default:ba.Outlined,options:Object.values(ba)},size:{type:String,default:$a.MD,options:Object.values($a)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},testId:{type:String,default:"ds-icon-test"},weight:{type:String,default:Sa.Semibold,options:Object.values(Sa)},onClick:{type:Function,default:()=>({})}}};var Ea=(r=>(r[r.bold=700]="bold",r[r.semibold=600]="semibold",r[r.medium=500]="medium",r[r.regular=400]="regular",r[r.light=300]="light",r[r.extralight=200]="extralight",r))(Ea||{});const ke=({image:r=Ze.props.image.default,color:e=Ze.props.color.default,className:t,size:s=Ze.props.size.default,fill:n=Ze.props.fill.default,weight:a=Ze.props.weight.default,testId:i=Ze.props.testId.default,onClick:o=Ze.props.onClick.default})=>{const l="material-symbols-rounded",c=e&&Ze.props.color.options.find(f=>f===e)&&`${Ze.class}__color--${e}`,d=j.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ea[a]}, 'opsz' 48`}),[a,n]);return I.jsx("i",{className:[`${Ze.class}--${s}`,Ze.class,l,c,t&&t].filter(f=>f).join(" "),"data-testid":i,onClick:o,style:d,translate:"no",children:r})};ke.propTypes={color:h.oneOf(Ze.props.color.options),image:h.string,fontVariationSettings:h.object,size:h.oneOf(Ze.props.size.options),fill:h.bool,weight:h.oneOf(Ze.props.weight.options),onClick:h.func},ke.displayName="DsIcon";const mr=({children:r,className:e,onClick:t,size:s=be.props.size.default,disabled:n=be.props.disabled.default,icon:a=be.props.icon.default,id:i=be.props.id.default,testId:o=be.props.testId.default,elevation:l,variant:c=be.props.variant.default,color:d=be.props.color.default,iconFill:f=be.props.iconFill.default,iconPosition:w=be.props.iconPosition.default,fullSize:y=be.props.fullSize.default})=>{const S=s&&be.props.size.options.find(q=>q===s)?`${be.class}--${s}`:`${be.class}__${be.props.size.default}`,E=n&&`${be.class}--disabled`,b=`${be.class}__${d}--${c}`,g=l&&`${be.class}--elevation-${l}`,T=a&&`${be.class}--with-icon`,C=y?`${be.class}--full-size`:"",O=w==="right"?`${be.class}__icon`:`${be.class}__icon--left`,_=w==="right"?`${be.class}__text`:`${be.class}__text--reversed`;return I.jsx("button",{className:[be.class,C,E,T,S,b,g,T,e&&e].filter(q=>q).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:t,children:I.jsxs("span",{className:["ds-button__text",_].join(" "),children:[r,a&&I.jsx(ke,{className:["ds-button__icon",O].join(" "),fill:f,image:a,size:s})]})})};mr.propTypes={color:h.oneOf(be.props.color.options),variant:h.oneOf(be.props.variant.options),size:h.oneOf(be.props.size.options),disabled:h.bool,icon:h.string,iconFill:h.bool,iconPosition:h.oneOf(be.props.iconPosition.options),testId:h.string,id:h.string,fullSize:h.bool},mr.displayName="DsButton";const el={name:"Caption",class:"ds-caption"},Ns=({children:r,className:e,testId:t="ds-caption-test"})=>I.jsx("p",{className:[el.class,e&&e].filter(s=>s).join(" "),"data-testid":t,children:r});Ns.propTypes={children:h.node.isRequired,className:h.string,testId:h.string},Ns.displayName="DsCaption";const Br={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},ct={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Br.None,options:Object.values(Br)},borderColor:{type:String,default:Br.None,options:Object.values(Br)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},Ps=({id:r,testId:e=ct.props.testId.default,children:t,className:s,elevation:n=ct.props.elevation.default,backgroundColor:a=ct.props.backgroundColor.default,borderColor:i=ct.props.borderColor.default})=>{const o=n&&`${ct.class}--elevation-${n}`,l=i&&`${ct.class}--border-${i}`,c=a&&`${ct.class}--${a}`;return I.jsx("div",{className:[ct.class,s,o,l,c].filter(d=>d).join(" "),"data-testid":e,id:r,children:t})};Ps.propTypes={id:h.string,testId:h.string,backgroundColor:h.oneOf(ct.props.backgroundColor.options),borderColor:h.oneOf(ct.props.borderColor.options),elevation:h.oneOf(ct.props.elevation.options)},Ps.displayName="DsCard";const Qe={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},changeByChecked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Fs=j.forwardRef(({id:r,className:e,name:t,testId:s=t||"ds-checkbox-test",label:n=Qe.props.label.default,description:a=Qe.props.description.default,checked:i=Qe.props.checked.default,disabled:o=Qe.props.checked.default,changeByChecked:l=Qe.props.changeByChecked.default,onChangeHandler:c},d)=>{const f=l||!1,w=i||!1,[y,S]=j.useState(w),E={image:y?"check_box":"check_box_outline_blank",class:y?`${Qe.class}__icon--checked`:`${Qe.class}__icon--unchecked`},b=o&&`${Qe.class}--disabled`,g=T=>{o||(S(C=>!C),c&&c(T))};return j.useEffect(()=>{f&&S(i)},[i,f]),I.jsxs("label",{className:[Qe.class,b,e&&e].join(" "),htmlFor:r||t,children:[I.jsx("input",{checked:y,className:`${Qe.class}__input`,"data-testid":s,id:r||t,name:t,onChange:g,ref:d,type:"checkbox"}),I.jsx(ke,{className:`${Qe.class}__icon ${E.class}`,"data-testid":`${s}-icon`,fill:!0,image:E.image,size:"xxl"}),(a||n)&&I.jsxs("div",{className:`${Qe.class}__label`,children:[n&&I.jsx("label",{className:`${Qe.class}__label-title`,htmlFor:r||t,children:n}),a&&I.jsx("label",{className:`${Qe.class}__label-description`,htmlFor:r||t,children:a})]})]})});Fs.propTypes={label:h.oneOfType([h.string,h.node]),name:h.string,className:h.string,testId:h.string,description:h.oneOfType([h.string,h.node]),checked:h.bool,disabled:h.bool},Fs.displayName="DsCheckbox";const ka={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},gr={name:"Heading",class:"ds-heading",props:{type:{type:String,default:ka.Heading1,options:Object.values(ka)}}},Ms=({children:r,testId:e="ds-heading-test",type:t=gr.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=gr.props.type.options.find(l=>l===t)&&`${gr.class}--${t}`,o=n[t];return I.jsx(o,{className:[gr.class,a,s&&s].filter(l=>l).join(" "),"data-testid":e,children:r})};Ms.propTypes={className:h.string,testId:h.string,type:h.oneOf(gr.props.type.options)},Ms.displayName="DsHeading";const wa={None:"",Dashed:"dashed",Dotted:"dotted"},Ca={None:"",Small:"small",Large:"large"},Lt={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:wa.None,options:Object.values(wa)},size:{type:String,default:Ca.None,options:Object.values(Ca)}}};function Ta(r,e,t){const s=t.props[r];return s.options&&s.options.some(n=>n===e)?`${t.class}--${e}`:""}const js=({size:r=Lt.props.size.default,borderStyle:e=Lt.props.borderStyle.default})=>{const t=Ta("size",r,Lt),s=Ta("borderStyle",e,Lt);return I.jsx("hr",{className:`${Lt.class} ${t} ${s}`.trim()})};js.propTypes={size:h.oneOf(Lt.props.size.options),borderStyle:h.oneOf(Lt.props.borderStyle.options)},js.displayName="DsHR";function Mt(r){return typeof r=="string"||r instanceof String}function Oa(r){var e;return typeof r=="object"&&r!=null&&(r==null||(e=r.constructor)==null?void 0:e.name)==="Object"}function Aa(r,e){return Array.isArray(e)?Aa(r,(t,s)=>e.includes(s)):Object.entries(r).reduce((t,s)=>{let[n,a]=s;return e(a,n)&&(t[n]=a),t},{})}const te={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function tl(r){switch(r){case te.LEFT:return te.FORCE_LEFT;case te.RIGHT:return te.FORCE_RIGHT;default:return r}}function xs(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Lr(r,e){if(e===r)return!0;const t=Array.isArray(e),s=Array.isArray(r);let n;if(t&&s){if(e.length!=r.length)return!1;for(n=0;n<e.length;n++)if(!Lr(e[n],r[n]))return!1;return!0}if(t!=s)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){const a=e instanceof Date,i=r instanceof Date;if(a&&i)return e.getTime()==r.getTime();if(a!=i)return!1;const o=e instanceof RegExp,l=r instanceof RegExp;if(o&&l)return e.toString()==r.toString();if(o!=l)return!1;const c=Object.keys(e);for(n=0;n<c.length;n++)if(!Object.prototype.hasOwnProperty.call(r,c[n]))return!1;for(n=0;n<c.length;n++)if(!Lr(r[c[n]],e[c[n]]))return!1;return!0}else if(e&&r&&typeof e=="function"&&typeof r=="function")return e.toString()===r.toString();return!1}class rl{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?te.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?te.RIGHT:te.LEFT}}function oe(r,e){return new oe.InputMask(r,e)}function Da(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?oe.MaskedRegExp:Mt(r)?oe.MaskedPattern:r===Date?oe.MaskedDate:r===Number?oe.MaskedNumber:Array.isArray(r)||r===Array?oe.MaskedDynamic:oe.Masked&&r.prototype instanceof oe.Masked?r:oe.Masked&&r instanceof oe.Masked?r.constructor:r instanceof Function?oe.MaskedFunction:(console.warn("Mask not found for mask",r),oe.Masked)}function yr(r){if(!r)throw new Error("Options in not defined");if(oe.Masked){if(r.prototype instanceof oe.Masked)return{mask:r};const{mask:e=void 0,...t}=r instanceof oe.Masked?{mask:r}:Oa(r)&&r.mask instanceof oe.Masked?r:{};if(e){const s=e.mask;return{...Aa(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return Oa(r)?{...r}:{mask:r}}function wt(r){if(oe.Masked&&r instanceof oe.Masked)return r;const e=yr(r),t=Da(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}oe.createMask=wt;class Vs{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}oe.MaskElement=Vs;const Ia=90,sl=89;class Rr extends Vs{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ia&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===sl&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ia&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}oe.HTMLMaskElement=Rr;class nl extends Rr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}oe.HTMLMaskElement=Rr;class Na extends Rr{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,n=t&&t.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}oe.HTMLContenteditableMaskElement=Na;class zr{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>zr.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}zr.MAX_LENGTH=100;class al{constructor(e,t){this.el=e instanceof Vs?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Na(e):new nl(e),this.masked=wt(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new zr,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof oe.Masked)&&this.masked.constructor===Da(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof oe.Masked?e:wt({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(n=>n(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=t,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,n=!this.maskEquals(t),a=this.masked.optionsIsChanged(s);n&&(this.mask=t),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,te.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new rl({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?t.removeDirection:te.NONE;let i=this.masked.nearestInputPos(t.startChangePos+n,a);a!==te.NONE&&(i=this.masked.nearestInputPos(i,te.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}oe.InputMask=al;class ce{static normalize(e){return Array.isArray(e)?e:[e,new ce]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}oe.ChangeDetails=ce;class vt{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class We{constructor(e){this._value="",this._update({...We.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new vt(this.extractInput(e,t),e)}appendTail(e){return Mt(e)&&(e=new vt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new ce({inserted:e,rawInserted:e})):new ce}_appendChar(e,t,s){t===void 0&&(t={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,t),e&&(a=a.aggregate(this._appendCharRaw(e,t)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(t);const l=this._appendCharRaw(e,t);o=o.aggregate(l),l.rawInserted||o.equals(a)?a=o:this.state=i}if(a.inserted){let i,o=this.doValidate(t)!==!1;if(o&&s!=null){const l=this.state;if(this.overwrite===!0){i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.unshift(this.displayValue.length-a.tailShift)}let c=this.appendTail(s);if(o=c.rawInserted.length===s.toString().length,!(o&&c.inserted)&&this.overwrite==="shift"){this.state=l,i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.shift();c=this.appendTail(s),o=c.rawInserted.length===s.toString().length}o&&c.inserted&&(this.state=l)}o||(a=new ce,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new ce}_appendEager(){return new ce}append(e,t,s){if(!Mt(e))throw new Error("value should be string");const n=Mt(s)?new vt(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,t);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],t,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],t,n))break;a.aggregate(o)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new ce}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),ce.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),ce.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,n,a){s===void 0&&(s=""),n===void 0&&(n=te.NONE),a===void 0&&(a={input:!0});const i=e+t,o=this.extractTail(i),l=this.eager===!0||this.eager==="remove";let c;l&&(n=tl(n),c=this.extractInput(0,i,{raw:!0}));let d=e;const f=new ce;if(n!==te.NONE&&(d=this.nearestInputPos(e,t>1&&e!==0&&!l?te.NONE:n),f.tailShift=d-e),f.aggregate(this.remove(d)),l&&n!==te.NONE&&c===this.rawInputValue)if(n===te.FORCE_LEFT){let w;for(;c===this.rawInputValue&&(w=this.displayValue.length);)f.aggregate(new ce({tailShift:-1})).aggregate(this.remove(w-1))}else n===te.FORCE_RIGHT&&o.unshift();return f.aggregate(this.append(s,a,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Lr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||We.EMPTY_VALUES.includes(e)&&We.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new ce}}We.DEFAULTS={skipInvalid:!0},We.EMPTY_VALUES=[void 0,null,""],oe.Masked=We;class Rt{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Mt(e)?new vt(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof vt)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof Rt){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof oe.MaskedPattern))return new vt(this.toString()).appendTo(e);const t=new ce;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!a||a.index<=i)&&((n instanceof Rt||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),o=n instanceof Rt&&e._blocks[i]),o){const l=o.appendTail(n);t.aggregate(l);const c=n.toString().slice(l.rawInserted.length);c&&t.aggregate(e.append(c,{tail:!0}))}else t.aggregate(e.append(n.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(n=>{const a="chunks"in n?new Rt:new vt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(t);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class il{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,te.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,te.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,te.NONE),!0})}}class Pa{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new ce}nearestInputPos(e,t){t===void 0&&(t=te.NONE);const s=0,n=this._value.length;switch(t){case te.LEFT:case te.FORCE_LEFT:return s;case te.NONE:case te.RIGHT:case te.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new ce;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,i=new ce({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ce;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new vt("")}appendTail(e){return Mt(e)&&(e=new vt(String(e))),e.appendTo(this)}append(e,t,s){const n=this._appendChar(e[0],t);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class qr{constructor(e){const{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o,...l}=e;this.masked=wt(l),Object.assign(this,{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new ce}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new ce;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new ce,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ce:(this.isFilled=!0,new ce({inserted:this.placeholderChar}))}_appendEager(){return new ce}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=te.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(t){case te.LEFT:case te.FORCE_LEFT:return this.isComplete?a:s;case te.RIGHT:case te.FORCE_RIGHT:return this.isComplete?a:n;case te.NONE:default:return a}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new ce}}qr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class ol extends We{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}oe.MaskedRegExp=ol;class Ye extends We{constructor(e){super({...Ye.DEFAULTS,...e,definitions:Object.assign({},qr.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,n=!1;for(let a=0;a<t.length;++a){if(this.blocks){const c=t.slice(a),d=Object.keys(this.blocks).filter(w=>c.indexOf(w)===0);d.sort((w,y)=>y.length-w.length);const f=d[0];if(f){const{expose:w,repeat:y,...S}=yr(this.blocks[f]),E={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...S,repeat:y,parent:this},b=y!=null?new oe.RepeatBlock(E):wt(E);b&&(this._blocks.push(b),w&&(this.exposeBlock=b),this._maskedBlocks[f]||(this._maskedBlocks[f]=[]),this._maskedBlocks[f].push(this._blocks.length-1)),a+=f.length-1;continue}}let i=t[a],o=i in e;if(i===Ye.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===Ye.ESCAPE_CHAR){if(++a,i=t[a],!i)break;o=!1}const l=o?new qr({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...yr(e[i]),parent:this}):new Pa({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((n,a)=>n.state=t[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new ce;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;t.aggregate(a)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),n=new ce;if(!s)return n;for(let i=s.index,o;o=this._blocks[i];++i){var a;const l=o._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(l),l.consumed)break}return n}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new Rt;return e===t||this._forEachBlocksInRange(e,t,(n,a,i,o)=>{const l=n.extractTail(i,o);l.stop=this._findStopBefore(a),l.from=this._blockStartPos(a),l instanceof Rt&&(l.blockIndex=a),s.extend(l)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let n="";return this._forEachBlocksInRange(e,t,(a,i,o,l)=>{n+=a.extractInput(o,l,s)}),n}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)t=n;else break}return t}_appendPlaceholder(e){const t=new ce;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var o;t.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=t.length;if(t+=n.displayValue,e<=t.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(t),i=a&&n.index===a.index,o=n.offset,l=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,o,l),a&&!i){for(let c=n.index+1;c<a.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(n,a,i,o)=>{s.aggregate(n.remove(i,o))}),s}nearestInputPos(e,t){if(t===void 0&&(t=te.NONE),!this._blocks.length)return 0;const s=new il(this,e);if(t===te.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===te.LEFT||t===te.FORCE_LEFT){if(t===te.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===te.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===te.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===te.RIGHT||t===te.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===te.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,te.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(n,a,i,o)=>{s+=n.totalInputPositions(i,o)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new ce;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}Ye.DEFAULTS={...We.DEFAULTS,lazy:!0,placeholderChar:"_"},Ye.STOP_CHAR="`",Ye.ESCAPE_CHAR="\\",Ye.InputDefinition=qr,Ye.FixedDefinition=Pa,oe.MaskedPattern=Ye;class Ur extends Ye{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,n),this.autofix=a;const o=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===o[c];)++c;i.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(t="0".repeat(n.length)+a,s="9".repeat(n.length)+a),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],t):Number(a)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(n[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(t);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const t=new ce;if(this.value.length===this.maxLength)return t;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return t}}oe.MaskedRange=Ur;class Ct extends Ye{static extractPatternOptions(e){const{mask:t,pattern:s,...n}=e;return{...n,mask:Mt(t)?t:s}}constructor(e){super(Ct.extractPatternOptions({...Ct.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:n,...a}={...Ct.DEFAULTS,...e},i=Object.assign({},Ct.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Mt(t)?t:s,blocks:i})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Ct.extractPatternOptions(e))}}Ct.GET_DEFAULT_BLOCKS=()=>({d:{mask:Ur,from:1,to:31,maxLength:2},m:{mask:Ur,from:1,to:12,maxLength:2},Y:{mask:Ur,from:1900,to:9999}}),Ct.DEFAULTS={...Ye.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(r,e)=>{if(!r)return"";const t=String(r.getDate()).padStart(2,"0"),s=String(r.getMonth()+1).padStart(2,"0"),n=r.getFullYear();return[t,s,n].join(".")},parse:(r,e)=>{const[t,s,n]=r.split(".").map(Number);return new Date(n,s-1,t)}},oe.MaskedDate=Ct;class Hr extends We{constructor(e){super({...Hr.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...n}=yr(t),a=wt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,a=this.rawInputValue,i=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:a,o=a.slice(i.length),l=this.currentMask,c=new ce,d=l==null?void 0:l.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),o&&(c.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new ce;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,n]=super.doPrepare(e,t);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(t)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,t){t===void 0&&(t={});let[s,n]=super.doPrepareChar(e,t);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(t)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new ce;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:n,...a}=e;t&&this.compiledMasks.forEach((i,o)=>i.state=t[o]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Lr(t,a)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Hr.DEFAULTS={...We.DEFAULTS,dispatch:(r,e,t,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,o)=>{const l=e.currentMask===i,c=l?i.displayValue.length:i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):l||i.remove(c),i.append(r,e.currentMaskFlags(t)),i.appendTail(s),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(c,i.nearestInputPos(i.displayValue.length,te.FORCE_LEFT)))}});return a.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},oe.MaskedDynamic=Hr;class Kr extends Ye{constructor(e){super({...Kr.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const n=t.map(o=>o.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,te.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const l=n[0][o];o>=this.value.length||l===i.value||(i.reset(),i._appendChar(l,t))});const a=super._appendCharRaw(n[0][this.value.length],t);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new ce({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new vt("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new ce;const s=Math.min(super.nearestInputPos(0,te.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,t);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}Kr.DEFAULTS={...Ye.DEFAULTS,matchValue:(r,e,t)=>r.indexOf(e,t)===t},oe.MaskedEnum=Kr;class ll extends We{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}oe.MaskedFunction=ll;var Fa;class rt extends We{constructor(e){super({...rt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+xs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(xs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(xs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),l=!1;if(o){let w;this.min!=null&&this.min<0&&this.number<this.min&&(w=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(w=this.max),w!=null&&(this.autofix?(this._value=this.format(w,this).replace(rt.UNMASKED_RADIX,this.radix),l||(l=a===this._value&&!t.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let c;o?c=new ce({inserted:this._value.slice(a.length),rawInserted:l?"":e,skip:l}):(this._value=a,c=new ce),this._value=this._insertThousandsSeparators(this._value);const d=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,f=this._separatorsCountFromSlice(d);return c.tailShift+=(f-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(t);return n>=0&&(t=n+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),n=this.value.slice(t),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new ce({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case te.NONE:case te.LEFT:case te.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||t===te.FORCE_LEFT)return s}break}case te.RIGHT:case te.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===rt.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,rt.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(rt.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||rt.EMPTY_VALUES.includes(e)&&rt.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Fa=rt,rt.UNMASKED_RADIX=".",rt.EMPTY_VALUES=[...We.EMPTY_VALUES,0],rt.DEFAULTS={...We.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Fa.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:r=>r.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},oe.MaskedNumber=rt;const Bs={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ma(r,e,t){e===void 0&&(e=Bs.MASKED),t===void 0&&(t=Bs.MASKED);const s=wt(r);return n=>s.runIsolated(a=>(a[e]=n,a[t]))}function ul(r,e,t,s){return Ma(e,t,s)(r)}oe.PIPE_TYPE=Bs,oe.createPipe=Ma,oe.pipe=ul;class cl extends Ye{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,n;const{repeat:a,...i}=yr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=wt(this._blockOpts);this.repeat=(t=(s=a??o.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(wt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new ce;for(let l=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),c,d;c=(i=this._blocks[l])!=null?i:d=!d&&this._allocateBlock(l);++l){var n,a,i,o;const f=c._appendChar(e,{...t,_beforeTailState:(o=t._beforeTailState)==null||(o=o._blocks)==null?void 0:o[l]});if(f.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(f),f.consumed)break}return s}_trimEmptyTail(e,t){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;t!=null&&(i=(n=this._mapPosToBlock(t))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let l=i;a<=l&&!this._blocks[l].unmaskedValue;--l,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}oe.RepeatBlock=cl;try{globalThis.IMask=oe}catch{}const ja={mask:h.oneOfType([h.array,h.func,h.string,h.instanceOf(RegExp),h.oneOf([Date,Number,oe.Masked]),h.instanceOf(oe.Masked)]),value:h.any,unmask:h.oneOfType([h.bool,h.oneOf(["typed"])]),prepare:h.func,prepareChar:h.func,validate:h.func,commit:h.func,overwrite:h.oneOfType([h.bool,h.oneOf(["shift"])]),eager:h.oneOfType([h.bool,h.oneOf(["append","remove"])]),skipInvalid:h.bool,onAccept:h.func,onComplete:h.func,placeholderChar:h.string,displayChar:h.string,lazy:h.bool,definitions:h.object,blocks:h.object,enum:h.arrayOf(h.string),maxLength:h.number,from:h.number,to:h.number,pattern:h.string,format:h.func,parse:h.func,autofix:h.oneOfType([h.bool,h.oneOf(["pad"])]),radix:h.string,thousandsSeparator:h.string,mapToRadix:h.arrayOf(h.string),scale:h.number,normalizeZeros:h.bool,padFractionalZeros:h.bool,min:h.oneOfType([h.number,h.instanceOf(Date)]),max:h.oneOfType([h.number,h.instanceOf(Date)]),dispatch:h.func,inputRef:h.oneOfType([h.func,h.shape({current:h.object})])},xa=Object.keys(ja).filter(r=>r!=="value"),dl=["value","unmask","onAccept","onComplete","inputRef"],fl=xa.filter(r=>dl.indexOf(r)<0);function pl(r){var e;const t=(e=class extends j.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=oe(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(o=>fl.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(a){const{...i}=a;return xa.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return j.createElement(r,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=r.displayName||r.name||"Component";return t.displayName="IMask("+s+")",t.propTypes=ja,j.forwardRef((n,a)=>j.createElement(t,{...n,ref:a}))}const hl=pl(r=>{let{inputRef:e,...t}=r;return j.createElement("input",{...t,ref:e})}),ml=(r,e)=>j.createElement(hl,{...r,ref:e});j.forwardRef(ml);function gl(r,e){let{onAccept:t,onComplete:s,ref:n=j.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const l=j.useRef(null),[c,d]=j.useState({}),[f,w]=j.useState(""),[y,S]=j.useState(""),[E,b]=j.useState(),g=j.useCallback(()=>{var _;(_=l.current)==null||_.destroy(),l.current=null},[]),T=j.useCallback(()=>{const _=l.current;_&&(d({value:_.value,unmaskedValue:_.unmaskedValue,typedValue:_.typedValue}),b(_.typedValue),S(_.unmaskedValue),w(_.value))},[]),C=j.useCallback(_=>{const q=l.current;q&&(T(),t==null||t(q.value,q,_))},[t]),O=j.useCallback(_=>l.current&&(s==null?void 0:s(l.current.value,l.current,_)),[s]);return j.useEffect(()=>{const{value:_,...q}=c,z=l.current;!z||f===void 0||(_!==f&&(z.value=f,z.value!==f&&C()),d(q))},[f]),j.useEffect(()=>{const{unmaskedValue:_,...q}=c,z=l.current;!z||y===void 0||(_!==y&&(z.unmaskedValue=y,z.unmaskedValue!==y&&C()),d(q))},[y]),j.useEffect(()=>{const{typedValue:_,...q}=c,z=l.current;!z||E===void 0||(_!==E&&(z.typedValue=E,z.masked.typedValueEquals(E)||C()),d(q))},[E]),j.useEffect(()=>{const _=n.current;if(!_||!(r!=null&&r.mask))return g();const q=l.current;q?q==null||q.updateOptions(r):_&&r!=null&&r.mask&&(l.current=oe(_,r),T(),a!==void 0&&w(a),i!==void 0&&S(i),o!==void 0&&b(o))},[r,g,C]),j.useEffect(()=>{if(!l.current)return;const _=l.current;return _.on("accept",C),_.on("complete",O),()=>{_.off("accept",C),_.off("complete",O)}},[C,O]),j.useEffect(()=>g,[g]),{ref:n,maskRef:l,value:f,setValue:w,unmaskedValue:y,setUnmaskedValue:S,typedValue:E,setTypedValue:b}}const Va={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},Ba={Small:"small",Medium:"medium",Large:"large"},La={Default:"",Error:"error",Success:"success"},Ra={Center:"center",End:"end",Initial:"initial"},za={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Oe={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:Va.Text,options:Object.values(Va)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Ba.Medium,options:Object.values(Ba)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:La.Default,options:Object.values(La)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:Ra.Center,options:Object.values(Ra)},tooltipPosition:{type:String,default:za.Top,options:Object.values(za)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},qa={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(r,e)=>(e.value+r).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}},Ua={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ha={Center:"center",End:"end",Initial:"initial"},Tt={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:Ua.Top,options:Object.values(Ua)},placement:{type:String,default:Ha.Center,options:Object.values(Ha)},text:{type:String,default:""}}},zt=({children:r,position:e=Tt.props.position.default,placement:t=Tt.props.placement.default,text:s=Tt.props.text.default,className:n})=>{const a=j.useRef(null),i=j.useRef(null),[o,l]=j.useState(!1),c=e&&Tt.props.position.options.find(_=>_===e)&&`${Tt.class}--${e}`,d=t&&Tt.props.placement.options.find(_=>_===t)&&`${Tt.class}--${t}`,[f,w]=j.useState(0),[y,S]=j.useState(0),[E,b]=j.useState(0),[g,T]=j.useState(0);let C;switch(j.useEffect(()=>{var _,q,z,J;i.current&&(b((_=i==null?void 0:i.current)==null?void 0:_.offsetHeight),T((q=i==null?void 0:i.current)==null?void 0:q.offsetWidth)),a.current&&(w((z=a==null?void 0:a.current)==null?void 0:z.offsetHeight),S((J=a==null?void 0:a.current)==null?void 0:J.offsetWidth))},[a,o]),j.useEffect(()=>(document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O)}),[]),e){case"top":t==="initial"?C={bottom:f+9,left:y<30?-y/1.5:-y*.01}:t==="end"?C={bottom:f+9,right:y<30?-y/1.5:-y*.01}:C={bottom:f+9,left:-g/2+y/2};break;case"bottom":t==="initial"?C={top:f+9,left:y<30?-y/1.5:-y*.01}:t==="end"?C={top:f+9,right:y<30?-y/1.5:-y*.01}:C={top:f+9,left:-g/2+y/2};break;case"left":t==="initial"?C={right:y+9,top:f<30?-f/1.5:-f*.01}:t==="end"?C={right:y+9,bottom:f<30?-f/1.5:-f*.01}:C={right:y+9,top:-E/2+f/2};break;case"right":t==="initial"?C={left:y+9,top:f<30?-f/1.5:-f*.01}:t==="end"?C={left:y+9,bottom:f<30?-f/1.5:-f*.01}:C={left:y+9,top:-E/2+f/2};break}const O=({target:_})=>{a.current&&a.current.contains(_)||l(!1)};return I.jsxs("span",{className:[Tt.class,n].join(" "),"data-testid":"tooltip",onClick:()=>l(!o),ref:a,children:[r,o&&I.jsx("span",{className:[c,d].filter(_=>_).join(" "),children:I.jsx("span",{className:`${Tt.class}__wrapper`,"data-testid":"tooltip-wrapper",ref:i,style:C,children:s})})]})};zt.propTypes={position:h.string,placement:h.string,text:h.oneOfType([h.string,h.node])},zt.displayName="DsTooltip";const rr=j.forwardRef(({name:r,testId:e=r||"ds-input-test",type:t=Oe.props.type.default,animated:s=Oe.props.animated.default,size:n=Oe.props.size.default,label:a,placeholder:i,value:o,min:l,max:c,tooltip:d=Oe.props.tooltip.default,tooltipPosition:f=Oe.props.tooltipPosition.default,tooltipPlacement:w=Oe.props.tooltipPlacement.default,icon:y=Oe.props.icon.default,status:S=Oe.props.status.default,feedback:E,hasFeedback:b=Oe.props.hasFeedback.default,noMargin:g=Oe.props.noMargin.default,disabled:T=Oe.props.disabled.default,className:C,mask:O,onChangeHandler:_=Oe.props.onChangeHandler.default,onBlurHandler:q,onKeyDownHandler:z,onFocusHandler:J},W)=>{const[ae,G]=j.useState(!1),[Y,ee]=j.useState(!1),X=!!_&&!!O,fe=(U,H,D)=>{if(X&&D){const k={...D,target:{...D.target,name:r,maskedValue:U,value:H.unmaskedValue,type:"text"}};_(k)}},he=j.useMemo(()=>typeof O=="object"?{lazy:!0,...O}:qa[O]?{...qa[O],min:l,max:c,lazy:!0}:{mask:O||"",min:l,max:c,lazy:!0},[O]),{ref:ge,setUnmaskedValue:De}=gl(he,{onAccept:fe}),Ne=U=>{_&&!X&&_(U)},F=U=>{z&&z(U)},v=U=>{G(!1),q&&q(U)},x=U=>{G(!0),J&&J(U)},P=()=>{ee(U=>!U)},u=j.useMemo(()=>Y&&t==="password"?"text":t,[Y,t]),p=()=>{const U=[`${Oe.class}`];return n&&U.push(`${Oe.class}--${n}`),s&&U.push(`${Oe.class}--animated`),g&&U.push(`${Oe.class}--no-margin`),y&&U.push(`${Oe.class}--with-icon`),S&&U.push(`${Oe.class}--${S}`),C&&U.push(C),U.join(" ")},$=j.useMemo(()=>{const U=[`${Oe.class}__label`];return(ae||o)&&U.push(`${Oe.class}__label--active`),U.join(" ")},[o,ae]),M=()=>!s&&i?i:"",L=()=>S&&S==="error"?"info":"check_circle";return j.useEffect(()=>{O&&De(o||"")},[o,O,De]),I.jsxs("div",{className:p(),ref:W,children:[b&&I.jsx("div",{className:"ds-input__feedback",children:E&&I.jsxs(I.Fragment,{children:[I.jsx(ke,{image:L()}),E]})}),I.jsx("input",{className:"ds-input__input","data-testid":e,disabled:T,id:r,max:c,min:l,name:r,onBlur:v,onChange:Ne,onFocus:x,onInput:Ne,onKeyDown:F,placeholder:M(),ref:ge,type:u,...!O&&{value:o||""}}),I.jsxs("label",{className:$,htmlFor:r,children:[a,d&&I.jsx(zt,{className:"ds-input__tooltip",placement:w,position:f,text:d,children:I.jsx(ke,{className:"ds-input__icon",image:"info"})})]}),y&&I.jsx(ke,{className:"ds-input__icon",image:y}),t==="password"&&I.jsx(ke,{className:"ds-input__password-icon",image:Y?"visibility_off":"visibility",onClick:P,size:"xl"})]})});rr.propTypes={name:h.string,testId:h.string,type:h.oneOf(Oe.props.type.options),animated:h.bool,size:h.oneOf(Oe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),min:h.string,max:h.string,tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,icon:h.string,status:h.oneOf(Oe.props.status.options),feedback:h.string,hasFeedback:h.bool,noMargin:h.bool,disabled:h.bool,mask:h.oneOfType([h.string,h.object]),onChangeHandler:h.func,onFocusHandler:h.func},rr.displayName="DsInput";const Ka={Small:"small",Medium:"medium",Large:"large"},Ga={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},st={name:"Loading",class:"ds-loading",props:{size:{type:String,default:Ka.Medium,options:Object.values(Ka)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:Ga.Neutral10,options:Object.values(Ga)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},Gr=({id:r,testId:e=st.props.testId.default,className:t,size:s=st.props.size.default,opacity:n=st.props.opacity.default,fullscreen:a=st.props.fullscreen.default,backgroundColor:i=st.props.backgroundColor.default})=>{const o=!a&&`${st.class}--absolute`,l=s&&`${st.class}__dots--${s}`,c=i&&st.props.backgroundColor.options.find(f=>f===i)&&`${st.class}__background--${i}`,d=n&&`${st.class}__background--opacity`;return I.jsxs("div",{className:[st.class,t,o].filter(f=>f).join(" "),"data-testid":e,id:r,children:[I.jsx("div",{className:[`${st.class}__background`,c,d].filter(f=>f).join(" ")}),I.jsx("div",{className:["ds-loading__dots",l].filter(f=>f).join(" "),role:"status"})]})};Gr.propTypes={id:h.string,testId:h.string,size:h.oneOf(st.props.size.options),opacity:h.bool,fullscreen:h.bool,backgroundColor:h.string},Gr.displayName="DsLoading";const Ot={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Ls=({id:r,label:e,detail:t,name:s,testId:n=s||"ds-option-test",disabled:a=Ot.props.disabled.default,value:i,checked:o=Ot.props.checked.default,onChangeHandler:l=Ot.props.onChangeHandler.default})=>{const[c]=j.useState(Math.random()),d=()=>{const f=[Ot.class];return a&&f.push(`${Ot.class}--disabled`),f.join(" ")};return I.jsxs("div",{className:d(),children:[I.jsx("input",{checked:o,"data-testid":n,disabled:a,id:r||String(c),name:s,onChange:l,type:"radio",value:i}),I.jsx(ke,{className:`${Ot.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),I.jsxs("div",{className:`${Ot.class}__text-container`,children:[e&&I.jsx("label",{className:`${Ot.class}__label`,htmlFor:r||String(c),children:e}),t&&I.jsx("label",{className:`${Ot.class}__detail`,htmlFor:r||String(c),children:t})]})]})};Ls.propTypes={id:h.string,name:h.string,testId:h.string,label:h.oneOfType([h.string,h.node]),value:h.oneOfType([h.string,h.number]),detail:h.string,disabled:h.bool,checked:h.bool,onChangeHandler:h.func},Ls.displayName="DsOption";const Wa={Default:"",Large:"large",Small:"small"},Wr={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:Wa.Default,options:Object.values(Wa)}}},At=({children:r,className:e,testId:t="ds-paragraph-test",type:s=Wr.props.type.default})=>{const n=s&&`${Wr.class}--${s}`;return I.jsx("p",{className:[Wr.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};At.propTypes={className:h.string,testId:h.string,type:h.oneOf(Wr.props.type.options)},At.displayName="DsParagraph";const Ya={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},Xa={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:Ya.Success,options:Object.values(Ya)}}},Rs={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},ze=({children:r,flex:e=Rs.props.flex.default,className:t=Rs.props.className.default})=>{const s=()=>[Rs.class,t].join(" "),n=()=>({flex:e});return I.jsx("div",{className:s(),style:n(),children:r})};ze.propTypes={className:h.string,flex:h.string},ze.displayName="DsFlexElement";const Ja={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},Za={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},Qa={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},ei={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},yl={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},qt={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:Ja.Stretch,required:!0,options:Object.values(Ja)},alignItems:{type:String,default:Za.Stretch,required:!0,options:Object.values(Za)},flexDirection:{type:String,default:Qa.Row,required:!0,options:Object.values(Qa)},flexWrap:{type:String,default:ei.Wrap,required:!1,options:Object.values(ei)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(yl)}}},Dt=({children:r,className:e,justifyContent:t=qt.props.justifyContent.default,alignItems:s=qt.props.alignItems.default,flexDirection:n=qt.props.flexDirection.default,flexWrap:a=qt.props.flexWrap.default,width:i=qt.props.width.default,height:o,gap:l})=>{const c=()=>{const f=[qt.class,e];return l&&f.push(`${qt.class}--gap-${l}`),f.join(" ")},d=()=>({display:"flex",justifyContent:t,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:o,gap:l});return I.jsx("div",{className:c(),style:d(),children:r})};Dt.propTypes={className:h.string,justifyContent:h.string,alignItems:h.string,flexDirection:h.string,flexWrap:h.string,width:h.string,height:h.string,gap:h.string},Dt.displayName="DsFlexLayout";const Yr={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},vr={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:Yr.None,options:Object.values(Yr)},horizontal:{type:String,default:Yr.None,options:Object.values(Yr)}}},dt=({vertical:r=vr.props.vertical.default,horizontal:e=vr.props.horizontal.default})=>{const t=r&&`ds-spacer__vertical--${r}`,s=e&&`ds-spacer__horizontal--${e}`;return I.jsx("div",{className:[vr.class,t,s].filter(n=>n).join(" "),"data-testid":"spacer"})};dt.propTypes={vertical:h.oneOf(vr.props.vertical.options),horizontal:h.oneOf(vr.props.horizontal.options)},dt.displayName="DsSpacer";const zs=({label:r,progress:e=Xa.props.progress.default,color:t=Xa.props.color.default})=>{const s=j.useMemo(()=>e>100?100:e,[e]),n=j.useMemo(()=>`ds-progress__progress--${t}`,[t]),a=j.useMemo(()=>t==="success-dark"?"color__success--dark":t==="warning"?"color__warning--dark":`color__${t}--default`,[t]);return I.jsx("div",{className:"ds-progress",children:I.jsxs(Dt,{flexDirection:"column",children:[I.jsx(ze,{children:I.jsx("div",{className:"ds-progress__container",children:I.jsx("div",{className:`ds-progress__progress ${n}`,style:{width:`${s||0}%`}})})}),I.jsx(ze,{children:I.jsxs(Dt,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[I.jsx(dt,{vertical:"quark"}),I.jsx(At,{className:a,children:r})]})})]})})};zs.propTypes={label:h.string,progress:h.number,color:h.string};const ti={Small:"sm",Medium:"md",Large:"lg"},ri={Default:"",Error:"error",Success:"success"},si={Center:"center",End:"end",Initial:"initial"},ni={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ae={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:"ds-select-test"},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(ti),default:ti.Medium},status:{type:String,default:ri.Default,options:Object.values(ri)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:si.Initial,options:Object.values(si)},tooltipPosition:{type:String,default:ni.Top,options:Object.values(ni)},feedback:{type:String,default:""},options:[]}},qs=j.forwardRef(({label:r,className:e,disabled:t=Ae.props.disabled.default,animated:s=Ae.props.animated.default,multiple:n=Ae.props.multiple.default,testId:a=Ae.props.testId.default,name:i,options:o,value:l,placeholder:c,onChange:d,onChangeHandler:f,size:w=Ae.props.size.default,status:y=Ae.props.status.default,tooltip:S,tooltipPosition:E=Ae.props.tooltipPosition.default,tooltipPlacement:b=Ae.props.tooltipPlacement.default,feedback:g,...T},C)=>{const[O,_]=j.useState(!1),q=W=>{_(!1),d&&d(W,W.target.value),f&&f(W,W.target.value)},z=()=>{const W=[Ae.class,"select-placeholder"];return W.push(`${Ae.class}--${w}`),y&&W.push(`${Ae.class}--${y}`),O&&W.push(`${Ae.class}--active`),t&&W.push(`${Ae.class}--disabled`),e&&W.push(e),W.join(" ")},J=j.useMemo(()=>{const W=[`${Ae.class}__label`];return!s&&W.push(`${Ae.class}__label--not-animated`),l&&W.push(`${Ae.class}__label--has-value`),s&&!l&&!S&&W.push(`${Ae.class}__label--hidden`),W.join(" ")},[l]);return I.jsxs("div",{className:z(),"data-testid":"select-component",children:[I.jsxs("label",{className:J,"data-testid":"label-id",htmlFor:i,children:[r,S&&I.jsx(zt,{className:`${Ae.class}__tooltip`,placement:b,position:E,text:S,children:I.jsx(ke,{className:`${Ae.class}__icon`,image:"info"})})]}),I.jsxs("select",{"data-testid":a,disabled:t,id:i,multiple:n,name:i,onChange:W=>q(W),value:l||"",...T,onBlur:()=>_(!1),onFocus:()=>_(!0),ref:C,required:!0,children:[(c||s)&&I.jsx("option",{disabled:!0,value:"",children:c??r}),o==null?void 0:o.map((W,ae)=>{var G;return"options"in W?I.jsx("optgroup",{label:W.label,children:(G=W.options)==null?void 0:G.map((Y,ee)=>I.jsx("option",{className:`${Ae.class}__option-select`,value:Y.value,children:Y.label||Y.value},ee))},ae):I.jsx("option",{className:`${Ae.class}__option-select`,value:W.value,children:W.label||W.value},ae)})]}),g&&I.jsxs("div",{className:"ds-select__feedback-container",children:[I.jsx(ke,{className:"ds-select__icon",image:y==="success"?"check_circle":"info"}),I.jsx("span",{className:"ds-select__feedback",children:g})]})]})});qs.propTypes={label:h.string.isRequired,className:h.string,disabled:h.bool,animated:h.bool,multiple:h.bool,name:h.string,testId:h.string,options:h.array.isRequired,placeholder:h.string,onChange:h.func,onChangeHandler:h.func,value:h.oneOfType([h.string,h.number]),size:h.oneOf(Ae.props.size.options),status:h.oneOf(Ae.props.status.options),tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,feedback:h.string},qs.displayName="DsSelect";const ai={Large:"large",Small:"small"},Us={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:ai.Large,options:Object.values(ai)}}},ii=({children:r,className:e,testId:t="ds-subtitle-test",type:s})=>{const n=Us.props.type.options.find(a=>a===s)&&`${Us.class}--${s}`;return I.jsx("p",{className:[Us.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};ii.displayName="DsSubtitle";const oi={Small:"small",Medium:"medium",Large:"large"},li={Text:"text"},ui={None:"",Error:"error",Success:"success"},ci={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},Le={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:li.Text,options:Object.values(li)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:oi.Medium,options:Object.values(oi)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:ui.None,options:Object.values(ui)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:ci.None,options:Object.values(ci)},onChangeHandler:{type:Function,default:()=>{}}}},Hs=j.forwardRef(({name:r,testId:e=r||"ds-textarea-test",animated:t=Le.props.animated.default,size:s=Le.props.size.default,label:n,placeholder:a,value:i,minLength:o,maxLength:l,tooltip:c,icon:d,status:f=Le.props.status.default,feedback:w,disabled:y=Le.props.disabled.default,className:S,resize:E=Le.props.resize.default,onChangeHandler:b=Le.props.onChangeHandler.default,onBlurHandler:g,onKeyDownHandler:T,onFocusHandler:C,rows:O=Le.props.rows.default,description:_},q)=>{const[z,J]=j.useState(!1),[W,ae]=j.useState(0),[G,Y]=j.useState(Math.random());j.useEffect(()=>{i==null&&Y(Math.random())},[i]);const ee=v=>{ae(v.target.value.length),b&&b(v)},X=v=>{T&&T(v)},fe=v=>{J(!1),g&&g(v)},he=v=>{J(!0),C&&C(v)},ge=()=>{const v=[`${Le.class}`];return s&&v.push(`${Le.class}--${s}`),t&&v.push(`${Le.class}--animated`),c&&v.push(`${Le.class}--with-icon`),f&&v.push(`${Le.class}--${f}`),S&&v.push(S),v.join(" ")},De=j.useMemo(()=>{const v=[`${Le.class}__label`];return(z||i)&&v.push(`${Le.class}__label--active`),v.join(" ")},[i,z]),Ne=()=>!t&&a?a:"",F=()=>f&&f==="error"?"info":"check_circle";return I.jsxs("div",{className:ge(),children:[_&&I.jsx("span",{className:"ds-textarea__description",children:_}),w&&I.jsxs("div",{className:"ds-textarea__feedback",children:[I.jsx(ke,{image:F()}),w]}),I.jsx("textarea",{className:"ds-textarea__textarea","data-testid":e,defaultValue:i||"",disabled:y,id:r,maxLength:l,minLength:o,name:r,onBlur:fe,onChange:ee,onFocus:he,onInput:ee,onKeyDown:X,placeholder:Ne(),ref:q,rows:O,style:{resize:E||"none"}}),I.jsx("label",{className:De,htmlFor:r,children:n}),l&&I.jsxs("span",{className:"ds-textarea__count",children:[W,"/",l]}),c&&I.jsx(zt,{className:"ds-textarea__tooltip",placement:"end",text:c,children:I.jsx(ke,{className:"ds-textarea__icon",image:d})})]},G)});Hs.propTypes={name:h.string,testId:h.string,type:h.oneOf(Le.props.type.options),animated:h.bool,size:h.oneOf(Le.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),tooltip:h.string,icon:h.string,status:h.oneOf(Le.props.status.options),feedback:h.string,minLength:h.number,maxLength:h.number,rows:h.number,disabled:h.bool,onChangeHandler:h.func,onFocusHandler:h.func,resize:h.oneOf(Le.props.resize.options).isRequired,description:h.string},Hs.displayName="DsTextArea";const Ks={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},Xr=({children:r,fluid:e=Ks.props.fluid.default,className:t,style:s})=>{const n=e?`${Ks.class}--fluid`:Ks.class;return I.jsx("div",{className:[n,t].filter(a=>a).join(" "),style:s,children:r})};Xr.propTypes={children:h.node,fluid:h.bool,className:h.string,style:h.object},Xr.displayName="DsContainer";function di(){const{innerWidth:r,innerHeight:e}=window;return{width:r,height:e}}function vl(){const[r,e]=j.useState(di());return j.useEffect(()=>{function t(){e(di())}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r}const fi=({children:r,grid:e})=>{const{row:t,col:s,mobileRow:n,mobileCol:a}=e,{width:i}=vl(),[o,l]=j.useState(""),[c,d]=j.useState("");return j.useEffect(()=>{i<=768?(l(n||t),d(a||s)):(l(t),d(s))},[i]),I.jsx("div",{style:{gridRow:o,gridColumn:c},children:r})};fi.displayName="DsGridElement";const pi={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},Jr={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Re={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:pi.Small,options:Object.values(pi)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:Jr.Start,options:Object.values(Jr)},verticalAlign:{type:String,default:Jr.Start,options:Object.values(Jr)}}};function hi(){const{innerWidth:r,innerHeight:e}=window;return{width:r,height:e}}function _l(){const[r,e]=j.useState(hi());return j.useEffect(()=>{function t(){e(hi())}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r}const Zr=({children:r,rows:e,gap:t,vGap:s,hGap:n,horizontalAlign:a,verticalAlign:i,width:o,height:l})=>{const c=s&&`${Re.class}__v-gap--${t}`,d=n&&`${Re.class}__h-gap--${t}`,f=a&&Re.props.horizontalAlign.options.find(C=>C===a)?`${Re.class}--h-${a}`:null,w=i&&Re.props.verticalAlign.options.find(C=>C===i)?`${Re.class}--v-${i}`:null,{width:y}=_l(),[S,E]=j.useState("");j.useEffect(()=>{y<=768?E("6"):E("12")},[y]);const b=C=>/^[+-]?\d+$/.test(C),g=()=>e.split(",").map(O=>(O=O.trim(),O==="0"||O==="*"||O==="auto"?"auto":b(O)?O+"fr":O)).join(" "),T=()=>`repeat(${S.split(",").map(O=>(O=O.trim(),O==="0"||O==="*"||O==="auto"?"auto":(b(O),O))).join(" ")}, minmax(0, 1fr))`;return I.jsx("div",{className:[Re.class,f,w,c,d].filter(C=>C).join(" "),style:{width:o,height:l,gridTemplateColumns:T(),gridTemplateRows:g()},children:r})};Zr.propTypes={children:h.oneOfType([h.arrayOf(h.node),h.node,h.func]),rows:h.string,gap:h.oneOf(Re.props.gap.options),vGap:h.bool,hGap:h.bool,width:h.string,height:h.string,horizontalAlign:h.oneOf(Re.props.horizontalAlign.options),verticalAlign:h.oneOf(Re.props.verticalAlign.options)},Zr.defaultProps={rows:Re.props.rows.default,gap:Re.props.gap.default,vGap:Re.props.vGap.default,hGap:Re.props.hGap.default,width:Re.props.width.default,height:Re.props.height.default,horizontalAlign:Re.props.horizontalAlign.default,verticalAlign:Re.props.verticalAlign.default},Zr.displayName="DsGridLayout";const sr={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},at={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:sr.ExtraSmall,options:Object.values(sr)},top:{type:String,options:Object.values(sr)},right:{type:String,options:Object.values(sr)},bottom:{type:String,options:Object.values(sr)},left:{type:String,options:Object.values(sr)}}},Ut=({children:r,space:e=at.props.space.default,top:t,right:s,bottom:n,left:a})=>{const i=t&&`${at.class}__top--${t}`,o=s&&`${at.class}__right--${s}`,l=n&&`${at.class}__bottom--${n}`,c=a&&`${at.class}__left--${a}`,d=e&&`${at.class}--${e}`;return I.jsx("div",{className:[at.class,i,o,l,c,d].filter(f=>f).join(" "),children:r})};Ut.propTypes={space:h.oneOf(at.props.space.options||[]),top:h.oneOf(at.props.top.options||[]),right:h.oneOf(at.props.right.options||[]),bottom:h.oneOf(at.props.bottom.options||[]),left:h.oneOf(at.props.left.options||[])},Ut.displayName="DsWrapper";const Gs={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},nr={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},Ws=({title:r,content:e,className:t,onToggle:s,active:n=nr.props.active.default,disabled:a=nr.props.disabled.default})=>{const i=n&&`${nr.class}--active`;return I.jsxs("li",{className:[nr.class,i,t&&t].filter(o=>o).join(" "),children:[I.jsxs("button",{className:`${nr.class}__button`,disabled:a,onClick:s,children:[r,I.jsx(ke,{className:`${nr.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),n&&I.jsx("div",{className:"ds-accordion-item__content",children:e})]})};Ws.propTypes={active:h.bool,title:h.oneOfType([h.element,h.string]),content:h.oneOfType([h.element,h.string]),className:h.string,disabled:h.bool},Ws.displayName="DsAccordionItem";const Ys=({items:r=Gs.props.items.default,activeItem:e=Gs.props.activeItem.default,onClick:t})=>{const[s,n]=j.useState(-1);j.useEffect(()=>{r.map((i,o)=>{i.active&&n(o)})},[r]),j.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return t&&t(-1),n(-1);n(i),t&&t(i)};return I.jsx("ul",{className:Gs.class,children:r.map((i,o)=>I.jsx(Ws,{active:s===o,content:i.content,disabled:i.disabled,onToggle:()=>{a(o)},title:i.title},o))})};Ys.propTypes={items:h.array,activeItem:h.number},Ys.displayName="DsAccordion";const mi=({title:r,activeTags:e,handleTagClose:t})=>I.jsx("div",{className:"active-tags",children:e.length>0&&I.jsxs(I.Fragment,{children:[I.jsx(At,{className:"active-tags__title",children:r}),I.jsx("div",{className:"active-tags__list","data-testid":"list",children:e.map((s,n)=>I.jsx(zt,{text:`Filtro ${s.text} aplicado`,children:I.jsxs("div",{className:`active-tags__item ${s.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`active-tag-${n}`,children:[I.jsxs(Dt,{alignItems:"center",gap:"nano",children:[I.jsx(ze,{children:I.jsx(ke,{className:"active-tags__icon",color:s.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:s.icon,testId:`icon-${n}`})}),I.jsx(ze,{children:I.jsx(At,{type:"small",children:s.text})})]}),!s.hiddenClose&&I.jsx(ke,{image:"close",onClick:()=>t(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${n}`))})]})});mi.displayName="DsActiveTags";const gi={Small:"small",Medium:"medium",Large:"large"},Se={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},animated:{type:Boolean,default:!0},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:gi.Medium,options:Object.values(gi)},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},loading:{type:Boolean},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}}}},yi=({label:r=Se.props.label.default,name:e=Se.props.name.default,value:t=Se.props.value.default,options:s=Se.props.options.default,size:n=Se.props.size.default,onChangeHandler:a=Se.props.onChangeHandler.default,onSelectHandler:i=Se.props.onSelectHandler.default,icon:o=Se.props.icon.default,noOptionsMessage:l=Se.props.noOptionsMessage.default,disabled:c=Se.props.disabled.default,status:d=Se.props.status.default,onBlurHandler:f=Se.props.onBlurHandler.default,onFocusHandler:w=Se.props.onFocusHandler.default,animated:y=Se.props.animated.default,placeholder:S=Se.props.placeholder.default,loading:E})=>{const[b,g]=j.useState(!1),[T,C]=j.useState(t),O=z=>{a(z),(E==null&&z.currentTarget.value.length||!E&&z.currentTarget.value.length>2)&&g(!0)},_=z=>{i(z),f(),C(Math.random().toString()),g(!1)};j.useEffect(()=>{t.length===0&&g(!1)},[t]);const q=()=>s.length>0?s.map((z,J)=>I.jsx("option",{className:`${Se.class}__option ${Se.class}__option--${n}`,"data-testid":`Option ${z.id||z.label}`,onClick:()=>!c&&_(z),value:J,children:z.label},J)):I.jsx("option",{className:`${Se.class}__option ${Se.class}__option--not-found`,children:l},"no_option");return I.jsxs("div",{className:`${Se.class}__container`,children:[I.jsx(rr,{animated:y,className:`${Se.class}__input`,disabled:c,label:r,name:e,onBlurHandler:f,onChangeHandler:O,onFocusHandler:w,placeholder:S,size:n,status:d,value:t},T),(o||E)&&(E?I.jsx("div",{className:`${Se.class}__loading ${Se.class}__loading--${n}`,style:{width:"18px"},children:I.jsx(Gr,{fullscreen:!1})}):o&&I.jsx(ke,{className:`${Se.class}__icon ${Se.class}__icon--${n}`,image:o})),b&&I.jsx("div",{className:`${Se.class}__list`,"data-testid":"list",children:q()})]})};yi.displayName="DsEditableSelect";const _r={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},bl=({length:r,current:e=_r.props.current.default})=>{const[t,s]=j.useState(e),n=i=>i<t?`${_r.class}__step--older`:i===t?`${_r.class}__step--active`:"";j.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<r;i++)a.push(I.jsx("div",{className:`${_r.class}__step ${n(i)}`,"data-testid":`indicator-step-${i}`},i));return I.jsx("div",{className:_r.class,children:a})},$l={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},Xs=({name:r,value:e,prefix:t,sufix:s,min:n,max:a,onChangeHandler:i})=>{const o=j.useRef(null),[l,c]=j.useState(!1),[d,f]=j.useState("");j.useEffect(()=>{f(e??"")},[e]);const w=b=>{b.key==="Enter"&&y(b)};function y(b){c(!1),i&&(n&&parseInt(n)>=parseInt(d===""?n:d)?(b.currentTarget.value=n,f(n)):a&&parseInt(a)<parseInt(d)?(b.currentTarget.value=a,f(a)):b.currentTarget.value=d,i(b))}const S=b=>{f(b.currentTarget.value)},E=async()=>{var b;await c(!0),(b=o.current)==null||b.focus()};return I.jsx("div",{className:$l.class,children:l?I.jsx("input",{className:"ds-input__input","data-testid":"input",max:a,min:n,name:r,onBlur:y,onChange:S,onKeyDown:w,ref:o,type:"number",value:d}):I.jsx("div",{"data-testid":"inline-editible-div-click",onClick:E,children:I.jsxs(Dt,{alignItems:"center",gap:"nano",children:[I.jsx(ze,{children:I.jsx(At,{children:I.jsxs("b",{children:[t,e,s]})})}),I.jsx(ze,{children:I.jsx(ke,{image:"edit_square"})})]})})})};Xs.propTypes={value:h.string},Xs.displayName="DsInlineEditable";const Sl=[1,2,3,4],vi={Squared:"squared",Rounded:"rounded"},it={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:Sl},variant:{type:String,default:vi.Rounded,options:Object.values(vi)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},Js=({className:r,title:e,content:t,cancelBtnText:s=it.props.cancelBtnText.default,confirmBtnText:n=it.props.confirmBtnText.default,variant:a=it.props.variant.default,elevation:i,isModalOpen:o=it.props.isModalOpen.default,onClose:l,onCancel:c,onConfirm:d,...f})=>{const w=a&&it.props.variant.options.find(b=>b===a)?`${it.class}--${a}`:`${it.class}--${it.props.variant.default}`,y=i&&`${it.class}--elevation-${i}`,S=d||c,E=j.useCallback(b=>{b.keyCode===27&&l()},[l]);return j.useEffect(()=>{if(window)return S||window.addEventListener("keyup",E),()=>{window.removeEventListener("keyup",E)}},[S,E]),o?I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"ds-modal-overlay",...f,onClick:()=>S?()=>{}:l()}),I.jsxs("div",{className:[it.class,w,y,r&&r].filter(b=>b).join(" "),"data-testid":"modal",children:[!S&&I.jsx("button",{className:"ds-modal__closeBtn","data-testid":"modal-close-button",onClick:l,children:I.jsx(ke,{image:"close",size:"lg"})}),I.jsxs("div",{className:"ds-modal__content",children:[I.jsx("div",{className:"ds-modal__content__title",children:e}),e&&I.jsx(dt,{vertical:"xxxs"}),I.jsx("div",{className:"ds-modal__content__content",children:t})]}),S&&I.jsx(dt,{vertical:"sm"}),!S&&I.jsx(dt,{vertical:"xxs"}),I.jsxs("div",{className:"ds-modal__cta",children:[c&&I.jsx(mr,{onClick:()=>{l(),c()},children:s}),d&&I.jsx(mr,{onClick:()=>{l(),d()},children:n})]})]})]}):null};Js.propTypes={firstButtonText:h.string,confirmBtnText:h.string,cancelBtnText:h.string,variant:h.oneOf(it.props.variant.options),elevation:h.oneOf(it.props.elevation.options),isModalOpen:h.bool,title:h.node,content:h.node},Js.displayName="DsModal";const _i={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},bi={Rounded:"rounded",Squared:"squared"},Xe={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:_i.Info,options:Object.values(_i)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:bi.Rounded,options:Object.values(bi)},progressBar:{type:Boolean,default:!0}}},El={success:"check",danger:"error",warning:"warning",info:"info"},Qr=({className:r,type:e=Xe.props.type.default,variant:t=Xe.props.variant.default,id:s,children:n,message:a,autoClose:i=Xe.props.autoClose.default,autoCloseTimer:o=Xe.props.autoCloseTimer.default,dismissible:l=Xe.props.dismissible.default,elevation:c,progressBar:d=Xe.props.progressBar.default,handleClose:f})=>{const[w,y]=j.useState(o),[S,E]=j.useState(!1),[b,g]=j.useState(!0),T=[Xe.class,e&&`${Xe.class}--${e}`,t&&`${Xe.class}--${t}`,c&&`${Xe.class}--elevation-${c}`,r&&r].join(" ");j.useEffect(()=>{!i&&!l&&g(!0);let q;return!S&&i&&(q=setInterval(()=>{y(z=>(z===0&&g(!1),z-100))},100)),()=>{clearInterval(q)}},[S,i,o,b]);const C=()=>{E(!0)},O=()=>{E(!1)},_=q=>{g(!1),f&&f(q)};return b?I.jsxs("div",{className:T,id:s,onMouseEnter:C,onMouseLeave:O,children:[I.jsx(Ut,{bottom:"nano",top:"nano",children:I.jsxs(Dt,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[I.jsx(ze,{children:I.jsx(ke,{color:e,fill:!0,image:El[e]})}),I.jsx(ze,{flex:"1",children:I.jsx(Ut,{left:"none",right:"none",space:"nano",children:n??a})}),I.jsx(ze,{children:l?I.jsx("div",{className:`${Xe.class}__button`,onClick:q=>_(q),children:I.jsx(Ut,{children:I.jsx(ke,{image:"close"})})}):I.jsx(dt,{horizontal:"quark"})})]})}),d&&i&&I.jsx("div",{className:`${Xe.class}__progress-bar ${Xe.class}__progress-bar--${e}`,style:{width:`${w/o*100}%`}})]}):null};Qr.propTypes={type:h.oneOf(Xe.props.type.options),id:h.string,variant:h.oneOf(Xe.props.variant.options),message:h.node,autoClose:h.bool,autoCloseTimer:h.number,dismissible:h.bool,elevation:h.oneOf(Xe.props.elevation.options),progressBar:h.bool,handleClose:h.func},Qr.displayName="DsNotification";const Zs={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:r=>/\d/.test(r)},{title:"Uma letra maiúscula",rule:r=>/[A-Z]/.test(r)},{title:"Um caractere especial. Ex: @#!?",rule:r=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(r)},{title:"Mínimo 8 caracteres",rule:r=>r.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"}}},Qs=({onChange:r=Zs.props.onChange.default,validationList:e=Zs.props.validationList.default,instructionLabel:t=Zs.props.instructionLabel.default})=>{const[s,n]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState([]),[c,d]=j.useState({score:0,color:"danger",label:"Fraca"}),[f,w]=j.useState(!1),y=O=>{const _=e.map(q=>q==null?void 0:q.rule(O));return l(_),_},S=O=>{var z,J,W,ae;n((z=O.currentTarget)==null?void 0:z.value);const _=y((J=O.currentTarget)==null?void 0:J.value),q=T(_);r&&r({password:(W=O.currentTarget)==null?void 0:W.value,confirmationPassword:a,isEqual:a===((ae=O.currentTarget)==null?void 0:ae.value),feedback:q})},E=O=>{var z,J,W;i((z=O.currentTarget)==null?void 0:z.value);const _=y(s),q=T(_);r&&r({password:s,confirmationPassword:(J=O.currentTarget)==null?void 0:J.value,isEqual:s===((W=O.currentTarget)==null?void 0:W.value),feedback:q})},b=j.useMemo(()=>s!==a&&f?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,f]),g=O=>{const _={score:O,color:"danger",label:"Fraco"};return O>30&&O<=75&&(_.color="warning",_.label="Médio"),O>=75&&O<100&&(_.color="success",_.label="Boa"),O===100&&(_.color="success-dark",_.label="Forte"),_},T=O=>{const _=O.reduce((W,ae)=>{let G=W;return ae?(G++,G):W},0),q=O==null?void 0:O.length,z=_*100/q||0,J=g(z);return d(J),J},C=()=>I.jsx("ul",{children:e.map((O,_)=>{const q=o[_]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return I.jsxs("li",{className:q,children:[o[_]?I.jsx(ke,{color:"success-dark",image:"check"}):null,I.jsx(dt,{horizontal:"quark"}),I.jsx(At,{children:O.title})]},_+O.title)})});return I.jsxs(Dt,{className:"ds-password-confirmation",flexDirection:"column",children:[I.jsx(ze,{children:I.jsx(rr,{label:"Senha",name:"password",onChangeHandler:S,type:"password",value:s})}),I.jsx(ze,{children:I.jsx(zs,{color:c==null?void 0:c.color,label:c==null?void 0:c.label,progress:c==null?void 0:c.score})}),I.jsx(ze,{children:I.jsx(At,{children:t})}),I.jsx(ze,{children:C()}),I.jsx(dt,{vertical:"xxxs"}),I.jsx(ze,{children:I.jsx(rr,{feedback:b.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>w(!0),onChangeHandler:E,onFocusHandler:()=>w(!0),status:b.status,type:"password",value:a})})]})};Qs.propTypes={onChange:h.func,validationList:h.array.isRequired,instructionLabel:h.string},Qs.displayName="DsPasswordConfirmation";const ft={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},$i=({steps:r,selectedStep:e=ft.props.selectedStep.default,onChange:t})=>{const[s,n]=j.useState(e),a=(i,o)=>{const l=[`${ft.class}__button`];return o!==i&&l.push(`${ft.class}__button--round`),r[i]&&r[i].disabled&&l.push(`${ft.class}__button--disabled`),l.join(" ")};return j.useEffect(()=>{n(e)},[e]),j.useEffect(()=>{t(s)},[s]),I.jsxs("div",{className:ft.class,children:[I.jsxs("span",{className:`${ft.class}__step-counter`,children:["Etapa ",s+1," de ",r==null?void 0:r.length]}),I.jsx("div",{className:`${ft.class}__step`,children:r.map((i,o)=>I.jsx("div",{className:`${ft.class}__content`,children:I.jsx("button",{className:a(o,s),disabled:i.disabled,onClick:()=>n(o),children:I.jsxs("span",{className:`${ft.class}__text`,children:[s===o?I.jsx(Ut,{bottom:"none",left:"nano",right:"nano",top:"none",children:I.jsx(ke,{className:`${ft.class}__icon`,fill:!0,image:i.icon})}):I.jsx(ke,{className:`${ft.class}__icon`,fill:!0,image:i.icon}),s===o&&i.label]})})},o))})]})};$i.displayName="DsStepper";const _t={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},Si=({item:r,columns:e})=>I.jsx("tr",{className:`${_t.class}__row`,children:e.map((t,s)=>{const n=t.align&&`${_t.class}__cell--align-${t.align}`;return I.jsx("td",{children:I.jsx("div",{className:[`${_t.class}__cell`,n,t.className].filter(a=>a).join(" "),children:r&&r[`${t.name}`]})},s)})});Si.displayName="DsTableRow";const Ei=({columns:r,data:e,className:t})=>I.jsx("div",{className:`${_t.class}__wrapper`,children:I.jsxs("table",{className:[`${_t.class}`,t].filter(s=>s).join(" "),children:[I.jsx("thead",{className:`${_t.class}__head`,children:I.jsx("tr",{className:`${_t.class}__row`,children:r&&r.map((s,n)=>I.jsx("th",{style:{width:s.size},children:I.jsx("div",{className:[`${_t.class}__cell`,s.align&&`${_t.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),I.jsx("tbody",{className:`${_t.class}__body`,children:e&&e.map((s,n)=>I.jsx(Si,{columns:r,item:s},n))})]})});Ei.displayName="DsTable";const ki={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},jt={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:ki.Primary,options:Object.values(ki)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},kl=({active:r,className:e,color:t,disabled:s,name:n,index:a,title:i,onClick:o})=>{const l=[`${jt.class}__tab`,`${jt.class}__tab-color--${t}`,r&&`${jt.class}__tab--active`,s&&`${jt.class}__tab--disabled`,e&&e].join(" "),c=d=>{o&&!s&&o(d)};return I.jsx("div",{className:l,id:n,onClick:()=>c(a),children:i})},wl=({tabs:r,color:e,selectedTab:t=jt.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=j.useState(t),o=l=>{i(l),n&&n(l)};return j.useEffect(()=>i(t),[t]),I.jsxs("div",{className:[jt.class,s&&s].join(" "),children:[I.jsx("div",{className:`${jt.class}__header`,children:r.map((l,c)=>j.createElement(kl,{...l,active:a===c,color:e,index:c,key:c,onClick:()=>o(c)}))}),I.jsx("div",{className:`${jt.class}__content`,children:r[a].content})]})};function wi({library:r,children:e,theme:t}){return I.jsx("div",{"data-library":r,"data-theme":t,children:I.jsx("div",{className:"ds-theme",children:e})})}wi.propTypes={library:h.string,children:h.node.isRequired,theme:h.string};const Ci={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Ht={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:Ci.TopRight,options:Object.values(Ci)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},en=({className:r=Ht.props.className.default,position:e=Ht.props.position.default,fluid:t=Ht.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Ht.class,e?`${Ht.class}--${e}`:"",t?`${Ht.class}--fluid`:"",r&&r].join(" "),i=o=>{n&&n(o)};return I.jsx("div",{className:a,children:s.map(o=>{const l=o.autoClose??!0,c=o.autoCloseTimer??4e3,d=o.dismissible??!0,f=o.elevation??2,w=o.progressBar??!0;return I.jsx(Qr,{autoClose:l,autoCloseTimer:c,dismissible:d,elevation:f,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:w,type:o.type},o.id)})})};en.propTypes={position:h.oneOf(Ht.props.position.options),fluid:h.bool,notifications:h.array,removeNotification:h.func},en.displayName="DsNotificationList";const es={name:"TwoColumns",class:"ds-two-columns",props:{}},tn=({header:r,main:e,sidebar:t,breadcrumb:s})=>I.jsxs(Xr,{children:[I.jsxs("div",{className:"ds-grid",children:[I.jsx("div",{className:"ds-grid__row",children:I.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),I.jsxs("div",{className:`${es.class}__content ds-grid__row`,children:[I.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:I.jsxs(I.Fragment,{children:[I.jsx("div",{className:`${es.class}__header`,children:r}),I.jsx("div",{className:`${es.class}__main`,children:e})]})}),I.jsx("div",{className:`${es.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:t})]})]}),I.jsx(dt,{vertical:"sm"})]});tn.propTypes={breadcrumb:h.node,header:h.node,main:h.node,sidebar:h.node},tn.displayName="DsTwoColumns";const Ti=(r,e)=>{var t;return(t=r==null?void 0:r.errors)==null?void 0:t.reduce((s,n)=>(n.keyword==="errorMessage"||(s={...s,...Cl(n,e)}),s),{})},Cl=(r,e)=>{const{keyword:t,params:s}=r,n=Tl(r==null?void 0:r.instancePath);let a="",i=e?e+"."+n:n;if(t.match(/min/)||t.match(/max/))return a=`Tamanho ${t.match(/min/)?"mínimo":"máximo"} de ${s==null?void 0:s.limit}`,i=rn(i),{[i]:{status:!1,message:a}};switch(t){case"required":a="Campo obrigatório",i=rn(i),i=i+"."+(s==null?void 0:s.missingProperty),i.split("")[0]==="."&&(i=i.replace(".",""));break;case"pattern":a="Insira o valor no formato correto";break;case"format":a=`Formato de ${s==null?void 0:s.format} invalido`;break;default:a="Preencha o dado corretamente";break}return i=rn(i),{[i]:{status:!1,message:a}}},Tl=r=>{let e="";return r.split("")[0]==="/"&&(e=r.replace("/","")),e.replace(/\//g,".")},rn=r=>{const e=r.split("");return e[e.length-1]==="."?(e.pop(),e.join("")):r},Oi=(r,e,t)=>{const s=e.pop(),n=e.reduce((a,i)=>(i in a||(a[i]={}),a[i]),r);s&&(n[s]=t)},Ai=r=>{try{return{isObj:!0,parsedObj:JSON.parse(r)}}catch{return{isObj:!1,parsedObj:void 0}}},Ol=r=>{const e=/^[0-9]+$/.test(r);if(r==="true"||r==="false")return JSON.parse(r);if(e)return Number(r);const{isObj:t,parsedObj:s}=Ai(r);return t&&s?s:r},sn=(r,e)=>{var n;if(!r)return null;if(r.$id===e)return r;const t=a=>{if(a)for(const i of Object.values(a)){const o=sn(i,e);if(o)return o}return null};return t(r.properties)||t(r.definitions)||t((n=r.schemas)==null?void 0:n.definitions)||sn(r.items,e)||null},nn=(r,e)=>{var s;const t=(e==null?void 0:e.definitions)||((s=e==null?void 0:e.schemas)==null?void 0:s.definitions);if(!t)return console.error('No definitions found within the schema root or inside the "schemas" key.'),null;for(const n of Object.values(t)){const a=sn(n,r);if(a)return a}return null},Di=r=>{const e=r.format;return e!=="email"&&e!=="password"?"text":e};function br(r,e,t=new WeakSet){if(typeof r!="object"&&typeof e!="object")return Object.is(r,e);if(r===null&&e===null)return!0;if(typeof r!=typeof e)return!1;if(r===e||t.has(r)&&t.has(e))return!0;if(t.add(r),t.add(e),Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return!1;for(let s=0;s<r.length;s++)if(!br(r[s],e[s],t))return!1;return!0}if(Array.isArray(r)||Array.isArray(e)||Object.keys(r).length!==Object.keys(e).length)return!1;for(const[s,n]of Object.entries(r))if(!Object.prototype.hasOwnProperty.call(e,s)||!br(n,e[s],t))return!1;return!0}var an={exports:{}},Ii={},It={},Kt={},$r={},de={},Sr={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.regexpCode=r.getEsmExportName=r.getProperty=r.safeStringify=r.stringify=r.strConcat=r.addCodeArg=r.str=r._=r.nil=r._Code=r.Name=r.IDENTIFIER=r._CodeOrName=void 0;class e{}r._CodeOrName=e,r.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class t extends e{constructor(T){if(super(),!r.IDENTIFIER.test(T))throw new Error("CodeGen: name must be a valid identifier");this.str=T}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}r.Name=t;class s extends e{constructor(T){super(),this._items=typeof T=="string"?[T]:T}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const T=this._items[0];return T===""||T==='""'}get str(){var T;return(T=this._str)!==null&&T!==void 0?T:this._str=this._items.reduce((C,O)=>`${C}${O}`,"")}get names(){var T;return(T=this._names)!==null&&T!==void 0?T:this._names=this._items.reduce((C,O)=>(O instanceof t&&(C[O.str]=(C[O.str]||0)+1),C),{})}}r._Code=s,r.nil=new s("");function n(g,...T){const C=[g[0]];let O=0;for(;O<T.length;)o(C,T[O]),C.push(g[++O]);return new s(C)}r._=n;const a=new s("+");function i(g,...T){const C=[y(g[0])];let O=0;for(;O<T.length;)C.push(a),o(C,T[O]),C.push(a,y(g[++O]));return l(C),new s(C)}r.str=i;function o(g,T){T instanceof s?g.push(...T._items):T instanceof t?g.push(T):g.push(f(T))}r.addCodeArg=o;function l(g){let T=1;for(;T<g.length-1;){if(g[T]===a){const C=c(g[T-1],g[T+1]);if(C!==void 0){g.splice(T-1,3,C);continue}g[T++]="+"}T++}}function c(g,T){if(T==='""')return g;if(g==='""')return T;if(typeof g=="string")return T instanceof t||g[g.length-1]!=='"'?void 0:typeof T!="string"?`${g.slice(0,-1)}${T}"`:T[0]==='"'?g.slice(0,-1)+T.slice(1):void 0;if(typeof T=="string"&&T[0]==='"'&&!(g instanceof t))return`"${g}${T.slice(1)}`}function d(g,T){return T.emptyStr()?g:g.emptyStr()?T:i`${g}${T}`}r.strConcat=d;function f(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:y(Array.isArray(g)?g.join(","):g)}function w(g){return new s(y(g))}r.stringify=w;function y(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}r.safeStringify=y;function S(g){return typeof g=="string"&&r.IDENTIFIER.test(g)?new s(`.${g}`):n`[${g}]`}r.getProperty=S;function E(g){if(typeof g=="string"&&r.IDENTIFIER.test(g))return new s(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}r.getEsmExportName=E;function b(g){return new s(g.toString())}r.regexpCode=b})(Sr);var on={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.ValueScope=r.ValueScopeName=r.Scope=r.varKinds=r.UsedValueState=void 0;const e=Sr;class t extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var s;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(s||(r.UsedValueState=s={})),r.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,f;if(!((f=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||f===void 0)&&f.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}r.Scope=n;class a extends e.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:f}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(d)}[${f}]`}}r.ValueScopeName=a;const i=(0,e._)`\n`;class o extends n{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?i:e.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,d){var f;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(c),{prefix:y}=w,S=(f=d.key)!==null&&f!==void 0?f:d.ref;let E=this._values[y];if(E){const T=E.get(S);if(T)return T}else E=this._values[y]=new Map;E.set(S,w);const b=this._scope[y]||(this._scope[y]=[]),g=b.length;return b[g]=d.ref,w.setValue(d,{property:y,itemIndex:g}),w}getValue(c,d){const f=this._values[c];if(f)return f.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${c}${f.scopePath}`})}scopeCode(c=this._values,d,f){return this._reduceValues(c,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},d,f)}_reduceValues(c,d,f={},w){let y=e.nil;for(const S in c){const E=c[S];if(!E)continue;const b=f[S]=f[S]||new Map;E.forEach(g=>{if(b.has(g))return;b.set(g,s.Started);let T=d(g);if(T){const C=this.opts.es5?r.varKinds.var:r.varKinds.const;y=(0,e._)`${y}${C} ${g} = ${T};${this.opts._n}`}else if(T=w==null?void 0:w(g))y=(0,e._)`${y}${T}${this.opts._n}`;else throw new t(g);b.set(g,s.Completed)})}return y}}r.ValueScope=o})(on),function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.or=r.and=r.not=r.CodeGen=r.operators=r.varKinds=r.ValueScopeName=r.ValueScope=r.Scope=r.Name=r.regexpCode=r.stringify=r.getProperty=r.nil=r.strConcat=r.str=r._=void 0;const e=Sr,t=on;var s=Sr;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(r,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(r,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(r,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return s.Name}});var n=on;Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(r,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(r,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(r,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),r.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(u,p){return this}}class i extends a{constructor(u,p,$){super(),this.varKind=u,this.name=p,this.rhs=$}render({es5:u,_n:p}){const $=u?t.varKinds.var:this.varKind,M=this.rhs===void 0?"":` = ${this.rhs}`;return`${$} ${this.name}${M};`+p}optimizeNames(u,p){if(u[this.name.str])return this.rhs&&(this.rhs=X(this.rhs,u,p)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(u,p,$){super(),this.lhs=u,this.rhs=p,this.sideEffects=$}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,p){if(!(this.lhs instanceof e.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=X(this.rhs,u,p),this}get names(){const u=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ee(u,this.rhs)}}class l extends o{constructor(u,p,$,M){super(u,$,M),this.op=p}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}}class c extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}}class d extends a{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}}class f extends a{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}}class w extends a{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,p){return this.code=X(this.code,u,p),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class y extends a{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((p,$)=>p+$.render(u),"")}optimizeNodes(){const{nodes:u}=this;let p=u.length;for(;p--;){const $=u[p].optimizeNodes();Array.isArray($)?u.splice(p,1,...$):$?u[p]=$:u.splice(p,1)}return u.length>0?this:void 0}optimizeNames(u,p){const{nodes:$}=this;let M=$.length;for(;M--;){const L=$[M];L.optimizeNames(u,p)||(fe(u,L.names),$.splice(M,1))}return $.length>0?this:void 0}get names(){return this.nodes.reduce((u,p)=>Y(u,p.names),{})}}class S extends y{render(u){return"{"+u._n+super.render(u)+"}"+u._n}}class E extends y{}class b extends S{}b.kind="else";class g extends S{constructor(u,p){super(p),this.condition=u}render(u){let p=`if(${this.condition})`+super.render(u);return this.else&&(p+="else "+this.else.render(u)),p}optimizeNodes(){super.optimizeNodes();const u=this.condition;if(u===!0)return this.nodes;let p=this.else;if(p){const $=p.optimizeNodes();p=this.else=Array.isArray($)?new b($):$}if(p)return u===!1?p instanceof g?p:p.nodes:this.nodes.length?this:new g(he(u),p instanceof g?[p]:p.nodes);if(!(u===!1||!this.nodes.length))return this}optimizeNames(u,p){var $;if(this.else=($=this.else)===null||$===void 0?void 0:$.optimizeNames(u,p),!!(super.optimizeNames(u,p)||this.else))return this.condition=X(this.condition,u,p),this}get names(){const u=super.names;return ee(u,this.condition),this.else&&Y(u,this.else.names),u}}g.kind="if";class T extends S{}T.kind="for";class C extends T{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,p){if(super.optimizeNames(u,p))return this.iteration=X(this.iteration,u,p),this}get names(){return Y(super.names,this.iteration.names)}}class O extends T{constructor(u,p,$,M){super(),this.varKind=u,this.name=p,this.from=$,this.to=M}render(u){const p=u.es5?t.varKinds.var:this.varKind,{name:$,from:M,to:L}=this;return`for(${p} ${$}=${M}; ${$}<${L}; ${$}++)`+super.render(u)}get names(){const u=ee(super.names,this.from);return ee(u,this.to)}}class _ extends T{constructor(u,p,$,M){super(),this.loop=u,this.varKind=p,this.name=$,this.iterable=M}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,p){if(super.optimizeNames(u,p))return this.iterable=X(this.iterable,u,p),this}get names(){return Y(super.names,this.iterable.names)}}class q extends S{constructor(u,p,$){super(),this.name=u,this.args=p,this.async=$}render(u){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(u)}}q.kind="func";class z extends y{render(u){return"return "+super.render(u)}}z.kind="return";class J extends S{render(u){let p="try"+super.render(u);return this.catch&&(p+=this.catch.render(u)),this.finally&&(p+=this.finally.render(u)),p}optimizeNodes(){var u,p;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(p=this.finally)===null||p===void 0||p.optimizeNodes(),this}optimizeNames(u,p){var $,M;return super.optimizeNames(u,p),($=this.catch)===null||$===void 0||$.optimizeNames(u,p),(M=this.finally)===null||M===void 0||M.optimizeNames(u,p),this}get names(){const u=super.names;return this.catch&&Y(u,this.catch.names),this.finally&&Y(u,this.finally.names),u}}class W extends S{constructor(u){super(),this.error=u}render(u){return`catch(${this.error})`+super.render(u)}}W.kind="catch";class ae extends S{render(u){return"finally"+super.render(u)}}ae.kind="finally";class G{constructor(u,p={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...p,_n:p.lines?`
|
|
21
|
-
`:""},this._extScope=u,this._scope=new t.Scope({parent:u}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,p){const $=this._extScope.value(u,p);return(this._values[$.prefix]||(this._values[$.prefix]=new Set)).add($),$}getScopeValue(u,p){return this._extScope.getValue(u,p)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,p,$,M){const L=this._scope.toName(p);return $!==void 0&&M&&(this._constants[L.str]=$),this._leafNode(new i(u,L,$)),L}const(u,p,$){return this._def(t.varKinds.const,u,p,$)}let(u,p,$){return this._def(t.varKinds.let,u,p,$)}var(u,p,$){return this._def(t.varKinds.var,u,p,$)}assign(u,p,$){return this._leafNode(new o(u,p,$))}add(u,p){return this._leafNode(new l(u,r.operators.ADD,p))}code(u){return typeof u=="function"?u():u!==e.nil&&this._leafNode(new w(u)),this}object(...u){const p=["{"];for(const[$,M]of u)p.length>1&&p.push(","),p.push($),($!==M||this.opts.es5)&&(p.push(":"),(0,e.addCodeArg)(p,M));return p.push("}"),new e._Code(p)}if(u,p,$){if(this._blockNode(new g(u)),p&&$)this.code(p).else().code($).endIf();else if(p)this.code(p).endIf();else if($)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new g(u))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(g,b)}_for(u,p){return this._blockNode(u),p&&this.code(p).endFor(),this}for(u,p){return this._for(new C(u),p)}forRange(u,p,$,M,L=this.opts.es5?t.varKinds.var:t.varKinds.let){const U=this._scope.toName(u);return this._for(new O(L,U,p,$),()=>M(U))}forOf(u,p,$,M=t.varKinds.const){const L=this._scope.toName(u);if(this.opts.es5){const U=p instanceof e.Name?p:this.var("_arr",p);return this.forRange("_i",0,(0,e._)`${U}.length`,H=>{this.var(L,(0,e._)`${U}[${H}]`),$(L)})}return this._for(new _("of",M,L,p),()=>$(L))}forIn(u,p,$,M=this.opts.es5?t.varKinds.var:t.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,e._)`Object.keys(${p})`,$);const L=this._scope.toName(u);return this._for(new _("in",M,L,p),()=>$(L))}endFor(){return this._endBlockNode(T)}label(u){return this._leafNode(new c(u))}break(u){return this._leafNode(new d(u))}return(u){const p=new z;if(this._blockNode(p),this.code(u),p.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(z)}try(u,p,$){if(!p&&!$)throw new Error('CodeGen: "try" without "catch" and "finally"');const M=new J;if(this._blockNode(M),this.code(u),p){const L=this.name("e");this._currNode=M.catch=new W(L),p(L)}return $&&(this._currNode=M.finally=new ae,this.code($)),this._endBlockNode(W,ae)}throw(u){return this._leafNode(new f(u))}block(u,p){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(p),this}endBlock(u){const p=this._blockStarts.pop();if(p===void 0)throw new Error("CodeGen: not in self-balancing block");const $=this._nodes.length-p;if($<0||u!==void 0&&$!==u)throw new Error(`CodeGen: wrong number of nodes: ${$} vs ${u} expected`);return this._nodes.length=p,this}func(u,p=e.nil,$,M){return this._blockNode(new q(u,p,$)),M&&this.code(M).endFunc(),this}endFunc(){return this._endBlockNode(q)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,p){const $=this._currNode;if($ instanceof u||p&&$ instanceof p)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${p?`${u.kind}/${p.kind}`:u.kind}"`)}_elseNode(u){const p=this._currNode;if(!(p instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=p.else=u,this}get _root(){return this._nodes[0]}get _currNode(){const u=this._nodes;return u[u.length-1]}set _currNode(u){const p=this._nodes;p[p.length-1]=u}}r.CodeGen=G;function Y(P,u){for(const p in u)P[p]=(P[p]||0)+(u[p]||0);return P}function ee(P,u){return u instanceof e._CodeOrName?Y(P,u.names):P}function X(P,u,p){if(P instanceof e.Name)return $(P);if(!M(P))return P;return new e._Code(P._items.reduce((L,U)=>(U instanceof e.Name&&(U=$(U)),U instanceof e._Code?L.push(...U._items):L.push(U),L),[]));function $(L){const U=p[L.str];return U===void 0||u[L.str]!==1?L:(delete u[L.str],U)}function M(L){return L instanceof e._Code&&L._items.some(U=>U instanceof e.Name&&u[U.str]===1&&p[U.str]!==void 0)}}function fe(P,u){for(const p in u)P[p]=(P[p]||0)-(u[p]||0)}function he(P){return typeof P=="boolean"||typeof P=="number"||P===null?!P:(0,e._)`!${x(P)}`}r.not=he;const ge=v(r.operators.AND);function De(...P){return P.reduce(ge)}r.and=De;const Ne=v(r.operators.OR);function F(...P){return P.reduce(Ne)}r.or=F;function v(P){return(u,p)=>u===e.nil?p:p===e.nil?u:(0,e._)`${x(u)} ${P} ${x(p)}`}function x(P){return P instanceof e.Name?P:(0,e._)`(${P})`}}(de);var Z={};Object.defineProperty(Z,"__esModule",{value:!0}),Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;const $e=de,Al=Sr;function Dl(r){const e={};for(const t of r)e[t]=!0;return e}Z.toHash=Dl;function Il(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Ni(r,e),!Pi(e,r.self.RULES.all))}Z.alwaysValidSchema=Il;function Ni(r,e=r.schema){const{opts:t,self:s}=r;if(!t.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||Vi(r,`unknown keyword: "${a}"`)}Z.checkUnknownRules=Ni;function Pi(r,e){if(typeof r=="boolean")return!r;for(const t in r)if(e[t])return!0;return!1}Z.schemaHasRules=Pi;function Nl(r,e){if(typeof r=="boolean")return!r;for(const t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}Z.schemaHasRulesButRef=Nl;function Pl({topSchemaRef:r,schemaPath:e},t,s,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,$e._)`${t}`}return(0,$e._)`${r}${e}${(0,$e.getProperty)(s)}`}Z.schemaRefOrVal=Pl;function Fl(r){return Fi(decodeURIComponent(r))}Z.unescapeFragment=Fl;function Ml(r){return encodeURIComponent(ln(r))}Z.escapeFragment=Ml;function ln(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=ln;function Fi(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=Fi;function jl(r,e){if(Array.isArray(r))for(const t of r)e(t);else e(r)}Z.eachItem=jl;function Mi({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:s}){return(n,a,i,o)=>{const l=i===void 0?a:i instanceof $e.Name?(a instanceof $e.Name?r(n,a,i):e(n,a,i),i):a instanceof $e.Name?(e(n,i,a),a):t(a,i);return o===$e.Name&&!(l instanceof $e.Name)?s(n,l):l}}Z.mergeEvaluated={props:Mi({mergeNames:(r,e,t)=>r.if((0,$e._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,$e._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,$e._)`${t} || {}`).code((0,$e._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,$e._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,$e._)`${t} || {}`),un(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:ji}),items:Mi({mergeNames:(r,e,t)=>r.if((0,$e._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,$e._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,$e._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,$e._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function ji(r,e){if(e===!0)return r.var("props",!0);const t=r.var("props",(0,$e._)`{}`);return e!==void 0&&un(r,t,e),t}Z.evaluatedPropsToName=ji;function un(r,e,t){Object.keys(t).forEach(s=>r.assign((0,$e._)`${e}${(0,$e.getProperty)(s)}`,!0))}Z.setEvaluated=un;const xi={};function xl(r,e){return r.scopeValue("func",{ref:e,code:xi[e.code]||(xi[e.code]=new Al._Code(e.code))})}Z.useFunc=xl;var cn;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(cn||(Z.Type=cn={}));function Vl(r,e,t){if(r instanceof $e.Name){const s=e===cn.Num;return t?s?(0,$e._)`"[" + ${r} + "]"`:(0,$e._)`"['" + ${r} + "']"`:s?(0,$e._)`"/" + ${r}`:(0,$e._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,$e.getProperty)(r).toString():"/"+ln(r)}Z.getErrorPath=Vl;function Vi(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}Z.checkStrictMode=Vi;var bt={};Object.defineProperty(bt,"__esModule",{value:!0});const Je=de,Bl={data:new Je.Name("data"),valCxt:new Je.Name("valCxt"),instancePath:new Je.Name("instancePath"),parentData:new Je.Name("parentData"),parentDataProperty:new Je.Name("parentDataProperty"),rootData:new Je.Name("rootData"),dynamicAnchors:new Je.Name("dynamicAnchors"),vErrors:new Je.Name("vErrors"),errors:new Je.Name("errors"),this:new Je.Name("this"),self:new Je.Name("self"),scope:new Je.Name("scope"),json:new Je.Name("json"),jsonPos:new Je.Name("jsonPos"),jsonLen:new Je.Name("jsonLen"),jsonPart:new Je.Name("jsonPart")};bt.default=Bl,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.extendErrors=r.resetErrorsCount=r.reportExtraError=r.reportError=r.keyword$DataError=r.keywordError=void 0;const e=de,t=Z,s=bt;r.keywordError={message:({keyword:b})=>(0,e.str)`must pass "${b}" keyword validation`},r.keyword$DataError={message:({keyword:b,schemaType:g})=>g?(0,e.str)`"${b}" keyword must be ${g} ($data)`:(0,e.str)`"${b}" keyword is invalid ($data)`};function n(b,g=r.keywordError,T,C){const{it:O}=b,{gen:_,compositeRule:q,allErrors:z}=O,J=f(b,g,T);C??(q||z)?l(_,J):c(O,(0,e._)`[${J}]`)}r.reportError=n;function a(b,g=r.keywordError,T){const{it:C}=b,{gen:O,compositeRule:_,allErrors:q}=C,z=f(b,g,T);l(O,z),_||q||c(C,s.default.vErrors)}r.reportExtraError=a;function i(b,g){b.assign(s.default.errors,g),b.if((0,e._)`${s.default.vErrors} !== null`,()=>b.if(g,()=>b.assign((0,e._)`${s.default.vErrors}.length`,g),()=>b.assign(s.default.vErrors,null)))}r.resetErrorsCount=i;function o({gen:b,keyword:g,schemaValue:T,data:C,errsCount:O,it:_}){if(O===void 0)throw new Error("ajv implementation error");const q=b.name("err");b.forRange("i",O,s.default.errors,z=>{b.const(q,(0,e._)`${s.default.vErrors}[${z}]`),b.if((0,e._)`${q}.instancePath === undefined`,()=>b.assign((0,e._)`${q}.instancePath`,(0,e.strConcat)(s.default.instancePath,_.errorPath))),b.assign((0,e._)`${q}.schemaPath`,(0,e.str)`${_.errSchemaPath}/${g}`),_.opts.verbose&&(b.assign((0,e._)`${q}.schema`,T),b.assign((0,e._)`${q}.data`,C))})}r.extendErrors=o;function l(b,g){const T=b.const("err",g);b.if((0,e._)`${s.default.vErrors} === null`,()=>b.assign(s.default.vErrors,(0,e._)`[${T}]`),(0,e._)`${s.default.vErrors}.push(${T})`),b.code((0,e._)`${s.default.errors}++`)}function c(b,g){const{gen:T,validateName:C,schemaEnv:O}=b;O.$async?T.throw((0,e._)`new ${b.ValidationError}(${g})`):(T.assign((0,e._)`${C}.errors`,g),T.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function f(b,g,T){const{createErrors:C}=b.it;return C===!1?(0,e._)`{}`:w(b,g,T)}function w(b,g,T={}){const{gen:C,it:O}=b,_=[y(O,T),S(b,T)];return E(b,g,_),C.object(..._)}function y({errorPath:b},{instancePath:g}){const T=g?(0,e.str)`${b}${(0,t.getErrorPath)(g,t.Type.Str)}`:b;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,T)]}function S({keyword:b,it:{errSchemaPath:g}},{schemaPath:T,parentSchema:C}){let O=C?g:(0,e.str)`${g}/${b}`;return T&&(O=(0,e.str)`${O}${(0,t.getErrorPath)(T,t.Type.Str)}`),[d.schemaPath,O]}function E(b,{params:g,message:T},C){const{keyword:O,data:_,schemaValue:q,it:z}=b,{opts:J,propertyName:W,topSchemaRef:ae,schemaPath:G}=z;C.push([d.keyword,O],[d.params,typeof g=="function"?g(b):g||(0,e._)`{}`]),J.messages&&C.push([d.message,typeof T=="function"?T(b):T]),J.verbose&&C.push([d.schema,q],[d.parentSchema,(0,e._)`${ae}${G}`],[s.default.data,_]),W&&C.push([d.propertyName,W])}}($r);var Bi;function Ll(){if(Bi)return Kt;Bi=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.boolOrEmptySchema=Kt.topBoolOrEmptySchema=void 0;const r=$r,e=de,t=bt,s={message:"boolean schema is false"};function n(o){const{gen:l,schema:c,validateName:d}=o;c===!1?i(o,!1):typeof c=="object"&&c.$async===!0?l.return(t.default.data):(l.assign((0,e._)`${d}.errors`,null),l.return(!0))}Kt.topBoolOrEmptySchema=n;function a(o,l){const{gen:c,schema:d}=o;d===!1?(c.var(l,!1),i(o)):c.var(l,!0)}Kt.boolOrEmptySchema=a;function i(o,l){const{gen:c,data:d}=o,f={gen:c,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,r.reportError)(f,s,void 0,l)}return Kt}var Ve={},Gt={};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.getRules=Gt.isJSONType=void 0;const Rl=["string","number","integer","boolean","null","object","array"],zl=new Set(Rl);function ql(r){return typeof r=="string"&&zl.has(r)}Gt.isJSONType=ql;function Ul(){const r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}Gt.getRules=Ul;var Nt={};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.shouldUseRule=Nt.shouldUseGroup=Nt.schemaHasRulesForType=void 0;function Hl({schema:r,self:e},t){const s=e.RULES.types[t];return s&&s!==!0&&Li(r,s)}Nt.schemaHasRulesForType=Hl;function Li(r,e){return e.rules.some(t=>Ri(r,t))}Nt.shouldUseGroup=Li;function Ri(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(s=>r[s]!==void 0))}Nt.shouldUseRule=Ri,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.reportTypeError=Ve.checkDataTypes=Ve.checkDataType=Ve.coerceAndCheckDataType=Ve.getJSONTypes=Ve.getSchemaTypes=Ve.DataType=void 0;const Kl=Gt,Gl=Nt,Wl=$r,ue=de,zi=Z;var ar;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ar||(Ve.DataType=ar={}));function Yl(r){const e=qi(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ve.getSchemaTypes=Yl;function qi(r){const e=Array.isArray(r)?r:r?[r]:[];if(e.every(Kl.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ve.getJSONTypes=qi;function Xl(r,e){const{gen:t,data:s,opts:n}=r,a=Jl(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,Gl.schemaHasRulesForType)(r,e[0]));if(i){const o=fn(e,s,n.strictNumbers,ar.Wrong);t.if(o,()=>{a.length?Zl(r,e,a):pn(r)})}return i}Ve.coerceAndCheckDataType=Xl;const Ui=new Set(["string","number","integer","boolean","null"]);function Jl(r,e){return e?r.filter(t=>Ui.has(t)||e==="array"&&t==="array"):[]}function Zl(r,e,t){const{gen:s,data:n,opts:a}=r,i=s.let("dataType",(0,ue._)`typeof ${n}`),o=s.let("coerced",(0,ue._)`undefined`);a.coerceTypes==="array"&&s.if((0,ue._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,ue._)`${n}[0]`).assign(i,(0,ue._)`typeof ${n}`).if(fn(e,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,ue._)`${o} !== undefined`);for(const c of t)(Ui.has(c)||c==="array"&&a.coerceTypes==="array")&&l(c);s.else(),pn(r),s.endIf(),s.if((0,ue._)`${o} !== undefined`,()=>{s.assign(n,o),Ql(r,o)});function l(c){switch(c){case"string":s.elseIf((0,ue._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,ue._)`"" + ${n}`).elseIf((0,ue._)`${n} === null`).assign(o,(0,ue._)`""`);return;case"number":s.elseIf((0,ue._)`${i} == "boolean" || ${n} === null
|
|
22
|
-
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,
|
|
23
|
-
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,
|
|
24
|
-
|| ${i} === "boolean" || ${n} === null`).assign(o,(0,ue._)`[${n}]`)}}}function Ql({gen:r,parentData:e,parentDataProperty:t},s){r.if((0,ue._)`${e} !== undefined`,()=>r.assign((0,ue._)`${e}[${t}]`,s))}function dn(r,e,t,s=ar.Correct){const n=s===ar.Correct?ue.operators.EQ:ue.operators.NEQ;let a;switch(r){case"null":return(0,ue._)`${e} ${n} null`;case"array":a=(0,ue._)`Array.isArray(${e})`;break;case"object":a=(0,ue._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=i((0,ue._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=i();break;default:return(0,ue._)`typeof ${e} ${n} ${r}`}return s===ar.Correct?a:(0,ue.not)(a);function i(o=ue.nil){return(0,ue.and)((0,ue._)`typeof ${e} == "number"`,o,t?(0,ue._)`isFinite(${e})`:ue.nil)}}Ve.checkDataType=dn;function fn(r,e,t,s){if(r.length===1)return dn(r[0],e,t,s);let n;const a=(0,zi.toHash)(r);if(a.array&&a.object){const i=(0,ue._)`typeof ${e} != "object"`;n=a.null?i:(0,ue._)`!${e} || ${i}`,delete a.null,delete a.array,delete a.object}else n=ue.nil;a.number&&delete a.integer;for(const i in a)n=(0,ue.and)(n,dn(i,e,t,s));return n}Ve.checkDataTypes=fn;const eu={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,ue._)`{type: ${r}}`:(0,ue._)`{type: ${e}}`};function pn(r){const e=tu(r);(0,Wl.reportError)(e,eu)}Ve.reportTypeError=pn;function tu(r){const{gen:e,data:t,schema:s}=r,n=(0,zi.schemaRefOrVal)(r,s,"type");return{gen:e,keyword:"type",data:t,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:r}}var Er={},Hi;function ru(){if(Hi)return Er;Hi=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.assignDefaults=void 0;const r=de,e=Z;function t(n,a){const{properties:i,items:o}=n.schema;if(a==="object"&&i)for(const l in i)s(n,l,i[l].default);else a==="array"&&Array.isArray(o)&&o.forEach((l,c)=>s(n,c,l.default))}Er.assignDefaults=t;function s(n,a,i){const{gen:o,compositeRule:l,data:c,opts:d}=n;if(i===void 0)return;const f=(0,r._)`${c}${(0,r.getProperty)(a)}`;if(l){(0,e.checkStrictMode)(n,`default is ignored for: ${f}`);return}let w=(0,r._)`${f} === undefined`;d.useDefaults==="empty"&&(w=(0,r._)`${w} || ${f} === null || ${f} === ""`),o.if(w,(0,r._)`${f} = ${(0,r.stringify)(i)}`)}return Er}var pt={},_e={},Ki;function ht(){if(Ki)return _e;Ki=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.validateUnion=_e.validateArray=_e.usePattern=_e.callValidateCode=_e.schemaProperties=_e.allSchemaProperties=_e.noPropertyInData=_e.propertyInData=_e.isOwnProperty=_e.hasPropFunc=_e.reportMissingProp=_e.checkMissingProp=_e.checkReportMissingProp=void 0;const r=de,e=Z,t=bt,s=Z;function n(T,C){const{gen:O,data:_,it:q}=T;O.if(d(O,_,C,q.opts.ownProperties),()=>{T.setParams({missingProperty:(0,r._)`${C}`},!0),T.error()})}_e.checkReportMissingProp=n;function a({gen:T,data:C,it:{opts:O}},_,q){return(0,r.or)(..._.map(z=>(0,r.and)(d(T,C,z,O.ownProperties),(0,r._)`${q} = ${z}`)))}_e.checkMissingProp=a;function i(T,C){T.setParams({missingProperty:C},!0),T.error()}_e.reportMissingProp=i;function o(T){return T.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}_e.hasPropFunc=o;function l(T,C,O){return(0,r._)`${o(T)}.call(${C}, ${O})`}_e.isOwnProperty=l;function c(T,C,O,_){const q=(0,r._)`${C}${(0,r.getProperty)(O)} !== undefined`;return _?(0,r._)`${q} && ${l(T,C,O)}`:q}_e.propertyInData=c;function d(T,C,O,_){const q=(0,r._)`${C}${(0,r.getProperty)(O)} === undefined`;return _?(0,r.or)(q,(0,r.not)(l(T,C,O))):q}_e.noPropertyInData=d;function f(T){return T?Object.keys(T).filter(C=>C!=="__proto__"):[]}_e.allSchemaProperties=f;function w(T,C){return f(C).filter(O=>!(0,e.alwaysValidSchema)(T,C[O]))}_e.schemaProperties=w;function y({schemaCode:T,data:C,it:{gen:O,topSchemaRef:_,schemaPath:q,errorPath:z},it:J},W,ae,G){const Y=G?(0,r._)`${T}, ${C}, ${_}${q}`:C,ee=[[t.default.instancePath,(0,r.strConcat)(t.default.instancePath,z)],[t.default.parentData,J.parentData],[t.default.parentDataProperty,J.parentDataProperty],[t.default.rootData,t.default.rootData]];J.opts.dynamicRef&&ee.push([t.default.dynamicAnchors,t.default.dynamicAnchors]);const X=(0,r._)`${Y}, ${O.object(...ee)}`;return ae!==r.nil?(0,r._)`${W}.call(${ae}, ${X})`:(0,r._)`${W}(${X})`}_e.callValidateCode=y;const S=(0,r._)`new RegExp`;function E({gen:T,it:{opts:C}},O){const _=C.unicodeRegExp?"u":"",{regExp:q}=C.code,z=q(O,_);return T.scopeValue("pattern",{key:z.toString(),ref:z,code:(0,r._)`${q.code==="new RegExp"?S:(0,s.useFunc)(T,q)}(${O}, ${_})`})}_e.usePattern=E;function b(T){const{gen:C,data:O,keyword:_,it:q}=T,z=C.name("valid");if(q.allErrors){const W=C.let("valid",!0);return J(()=>C.assign(W,!1)),W}return C.var(z,!0),J(()=>C.break()),z;function J(W){const ae=C.const("len",(0,r._)`${O}.length`);C.forRange("i",0,ae,G=>{T.subschema({keyword:_,dataProp:G,dataPropType:e.Type.Num},z),C.if((0,r.not)(z),W)})}}_e.validateArray=b;function g(T){const{gen:C,schema:O,keyword:_,it:q}=T;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(ae=>(0,e.alwaysValidSchema)(q,ae))&&!q.opts.unevaluated)return;const J=C.let("valid",!1),W=C.name("_valid");C.block(()=>O.forEach((ae,G)=>{const Y=T.subschema({keyword:_,schemaProp:G,compositeRule:!0},W);C.assign(J,(0,r._)`${J} || ${W}`),T.mergeValidEvaluated(Y,W)||C.if((0,r.not)(J))})),T.result(J,()=>T.reset(),()=>T.error(!0))}return _e.validateUnion=g,_e}var Gi;function su(){if(Gi)return pt;Gi=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.validateKeywordUsage=pt.validSchemaType=pt.funcKeywordCode=pt.macroKeywordCode=void 0;const r=de,e=bt,t=ht(),s=$r;function n(w,y){const{gen:S,keyword:E,schema:b,parentSchema:g,it:T}=w,C=y.macro.call(T.self,b,g,T),O=c(S,E,C);T.opts.validateSchema!==!1&&T.self.validateSchema(C,!0);const _=S.name("valid");w.subschema({schema:C,schemaPath:r.nil,errSchemaPath:`${T.errSchemaPath}/${E}`,topSchemaRef:O,compositeRule:!0},_),w.pass(_,()=>w.error(!0))}pt.macroKeywordCode=n;function a(w,y){var S;const{gen:E,keyword:b,schema:g,parentSchema:T,$data:C,it:O}=w;l(O,y);const _=!C&&y.compile?y.compile.call(O.self,g,T,O):y.validate,q=c(E,b,_),z=E.let("valid");w.block$data(z,J),w.ok((S=y.valid)!==null&&S!==void 0?S:z);function J(){if(y.errors===!1)G(),y.modifying&&i(w),Y(()=>w.error());else{const ee=y.async?W():ae();y.modifying&&i(w),Y(()=>o(w,ee))}}function W(){const ee=E.let("ruleErrs",null);return E.try(()=>G((0,r._)`await `),X=>E.assign(z,!1).if((0,r._)`${X} instanceof ${O.ValidationError}`,()=>E.assign(ee,(0,r._)`${X}.errors`),()=>E.throw(X))),ee}function ae(){const ee=(0,r._)`${q}.errors`;return E.assign(ee,null),G(r.nil),ee}function G(ee=y.async?(0,r._)`await `:r.nil){const X=O.opts.passContext?e.default.this:e.default.self,fe=!("compile"in y&&!C||y.schema===!1);E.assign(z,(0,r._)`${ee}${(0,t.callValidateCode)(w,q,X,fe)}`,y.modifying)}function Y(ee){var X;E.if((0,r.not)((X=y.valid)!==null&&X!==void 0?X:z),ee)}}pt.funcKeywordCode=a;function i(w){const{gen:y,data:S,it:E}=w;y.if(E.parentData,()=>y.assign(S,(0,r._)`${E.parentData}[${E.parentDataProperty}]`))}function o(w,y){const{gen:S}=w;S.if((0,r._)`Array.isArray(${y})`,()=>{S.assign(e.default.vErrors,(0,r._)`${e.default.vErrors} === null ? ${y} : ${e.default.vErrors}.concat(${y})`).assign(e.default.errors,(0,r._)`${e.default.vErrors}.length`),(0,s.extendErrors)(w)},()=>w.error())}function l({schemaEnv:w},y){if(y.async&&!w.$async)throw new Error("async keyword in sync schema")}function c(w,y,S){if(S===void 0)throw new Error(`keyword "${y}" failed to compile`);return w.scopeValue("keyword",typeof S=="function"?{ref:S}:{ref:S,code:(0,r.stringify)(S)})}function d(w,y,S=!1){return!y.length||y.some(E=>E==="array"?Array.isArray(w):E==="object"?w&&typeof w=="object"&&!Array.isArray(w):typeof w==E||S&&typeof w>"u")}pt.validSchemaType=d;function f({schema:w,opts:y,self:S,errSchemaPath:E},b,g){if(Array.isArray(b.keyword)?!b.keyword.includes(g):b.keyword!==g)throw new Error("ajv implementation error");const T=b.dependencies;if(T!=null&&T.some(C=>!Object.prototype.hasOwnProperty.call(w,C)))throw new Error(`parent schema must have dependencies of ${g}: ${T.join(",")}`);if(b.validateSchema&&!b.validateSchema(w[g])){const O=`keyword "${g}" value is invalid at path "${E}": `+S.errorsText(b.validateSchema.errors);if(y.validateSchema==="log")S.logger.error(O);else throw new Error(O)}}return pt.validateKeywordUsage=f,pt}var Pt={},Wi;function nu(){if(Wi)return Pt;Wi=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.extendSubschemaMode=Pt.extendSubschemaData=Pt.getSubschema=void 0;const r=de,e=Z;function t(a,{keyword:i,schemaProp:o,schema:l,schemaPath:c,errSchemaPath:d,topSchemaRef:f}){if(i!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(i!==void 0){const w=a.schema[i];return o===void 0?{schema:w,schemaPath:(0,r._)`${a.schemaPath}${(0,r.getProperty)(i)}`,errSchemaPath:`${a.errSchemaPath}/${i}`}:{schema:w[o],schemaPath:(0,r._)`${a.schemaPath}${(0,r.getProperty)(i)}${(0,r.getProperty)(o)}`,errSchemaPath:`${a.errSchemaPath}/${i}/${(0,e.escapeFragment)(o)}`}}if(l!==void 0){if(c===void 0||d===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:c,topSchemaRef:f,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}Pt.getSubschema=t;function s(a,i,{dataProp:o,dataPropType:l,data:c,dataTypes:d,propertyName:f}){if(c!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:w}=i;if(o!==void 0){const{errorPath:S,dataPathArr:E,opts:b}=i,g=w.let("data",(0,r._)`${i.data}${(0,r.getProperty)(o)}`,!0);y(g),a.errorPath=(0,r.str)`${S}${(0,e.getErrorPath)(o,l,b.jsPropertySyntax)}`,a.parentDataProperty=(0,r._)`${o}`,a.dataPathArr=[...E,a.parentDataProperty]}if(c!==void 0){const S=c instanceof r.Name?c:w.let("data",c,!0);y(S),f!==void 0&&(a.propertyName=f)}d&&(a.dataTypes=d);function y(S){a.data=S,a.dataLevel=i.dataLevel+1,a.dataTypes=[],i.definedProperties=new Set,a.parentData=i.data,a.dataNames=[...i.dataNames,S]}}Pt.extendSubschemaData=s;function n(a,{jtdDiscriminator:i,jtdMetadata:o,compositeRule:l,createErrors:c,allErrors:d}){l!==void 0&&(a.compositeRule=l),c!==void 0&&(a.createErrors=c),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=i,a.jtdMetadata=o}return Pt.extendSubschemaMode=n,Pt}var qe={},Yi=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var s,n,a;if(Array.isArray(e)){if(s=e.length,s!=t.length)return!1;for(n=s;n--!==0;)if(!r(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(a=Object.keys(e),s=a.length,s!==Object.keys(t).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t},Xi={exports:{}},xt=Xi.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var s=typeof t=="function"?t:t.pre||function(){},n=t.post||function(){};ts(e,s,n,r,"",r)};xt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},xt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},xt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},xt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ts(r,e,t,s,n,a,i,o,l,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,a,i,o,l,c);for(var d in s){var f=s[d];if(Array.isArray(f)){if(d in xt.arrayKeywords)for(var w=0;w<f.length;w++)ts(r,e,t,f[w],n+"/"+d+"/"+w,a,n,d,s,w)}else if(d in xt.propsKeywords){if(f&&typeof f=="object")for(var y in f)ts(r,e,t,f[y],n+"/"+d+"/"+au(y),a,n,d,s,y)}else(d in xt.keywords||r.allKeys&&!(d in xt.skipKeywords))&&ts(r,e,t,f,n+"/"+d,a,n,d,s)}t(s,n,a,i,o,l,c)}}function au(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}var iu=Xi.exports;Object.defineProperty(qe,"__esModule",{value:!0}),qe.getSchemaRefs=qe.resolveUrl=qe.normalizeId=qe._getFullPath=qe.getFullPath=qe.inlineRef=void 0;const ou=Z,lu=Yi,uu=iu,cu=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function du(r,e=!0){return typeof r=="boolean"?!0:e===!0?!hn(r):e?Ji(r)<=e:!1}qe.inlineRef=du;const fu=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hn(r){for(const e in r){if(fu.has(e))return!0;const t=r[e];if(Array.isArray(t)&&t.some(hn)||typeof t=="object"&&hn(t))return!0}return!1}function Ji(r){let e=0;for(const t in r){if(t==="$ref")return 1/0;if(e++,!cu.has(t)&&(typeof r[t]=="object"&&(0,ou.eachItem)(r[t],s=>e+=Ji(s)),e===1/0))return 1/0}return e}function Zi(r,e="",t){t!==!1&&(e=ir(e));const s=r.parse(e);return Qi(r,s)}qe.getFullPath=Zi;function Qi(r,e){return r.serialize(e).split("#")[0]+"#"}qe._getFullPath=Qi;const pu=/#\/?$/;function ir(r){return r?r.replace(pu,""):""}qe.normalizeId=ir;function hu(r,e,t){return t=ir(t),r.resolve(e,t)}qe.resolveUrl=hu;const mu=/^[a-z_][-a-z0-9._]*$/i;function gu(r,e){if(typeof r=="boolean")return{};const{schemaId:t,uriResolver:s}=this.opts,n=ir(r[t]||e),a={"":n},i=Zi(s,n,!1),o={},l=new Set;return uu(r,{allKeys:!0},(f,w,y,S)=>{if(S===void 0)return;const E=i+w;let b=a[S];typeof f[t]=="string"&&(b=g.call(this,f[t])),T.call(this,f.$anchor),T.call(this,f.$dynamicAnchor),a[w]=b;function g(C){const O=this.opts.uriResolver.resolve;if(C=ir(b?O(b,C):C),l.has(C))throw d(C);l.add(C);let _=this.refs[C];return typeof _=="string"&&(_=this.refs[_]),typeof _=="object"?c(f,_.schema,C):C!==ir(E)&&(C[0]==="#"?(c(f,o[C],C),o[C]=f):this.refs[C]=E),C}function T(C){if(typeof C=="string"){if(!mu.test(C))throw new Error(`invalid anchor "${C}"`);g.call(this,`#${C}`)}}}),o;function c(f,w,y){if(w!==void 0&&!lu(f,w))throw d(y)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}qe.getSchemaRefs=gu;var eo;function rs(){if(eo)return It;eo=1,Object.defineProperty(It,"__esModule",{value:!0}),It.getData=It.KeywordCxt=It.validateFunctionCode=void 0;const r=Ll(),e=Ve,t=Nt,s=Ve,n=ru(),a=su(),i=nu(),o=de,l=bt,c=qe,d=Z,f=$r;function w(D){if(_(D)&&(z(D),O(D))){b(D);return}y(D,()=>(0,r.topBoolOrEmptySchema)(D))}It.validateFunctionCode=w;function y({gen:D,validateName:k,schema:R,schemaEnv:K,opts:Q},ie){Q.code.es5?D.func(k,(0,o._)`${l.default.data}, ${l.default.valCxt}`,K.$async,()=>{D.code((0,o._)`"use strict"; ${T(R,Q)}`),E(D,Q),D.code(ie)}):D.func(k,(0,o._)`${l.default.data}, ${S(Q)}`,K.$async,()=>D.code(T(R,Q)).code(ie))}function S(D){return(0,o._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${D.dynamicRef?(0,o._)`, ${l.default.dynamicAnchors}={}`:o.nil}}={}`}function E(D,k){D.if(l.default.valCxt,()=>{D.var(l.default.instancePath,(0,o._)`${l.default.valCxt}.${l.default.instancePath}`),D.var(l.default.parentData,(0,o._)`${l.default.valCxt}.${l.default.parentData}`),D.var(l.default.parentDataProperty,(0,o._)`${l.default.valCxt}.${l.default.parentDataProperty}`),D.var(l.default.rootData,(0,o._)`${l.default.valCxt}.${l.default.rootData}`),k.dynamicRef&&D.var(l.default.dynamicAnchors,(0,o._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{D.var(l.default.instancePath,(0,o._)`""`),D.var(l.default.parentData,(0,o._)`undefined`),D.var(l.default.parentDataProperty,(0,o._)`undefined`),D.var(l.default.rootData,l.default.data),k.dynamicRef&&D.var(l.default.dynamicAnchors,(0,o._)`{}`)})}function b(D){const{schema:k,opts:R,gen:K}=D;y(D,()=>{R.$comment&&k.$comment&&ee(D),ae(D),K.let(l.default.vErrors,null),K.let(l.default.errors,0),R.unevaluated&&g(D),J(D),X(D)})}function g(D){const{gen:k,validateName:R}=D;D.evaluated=k.const("evaluated",(0,o._)`${R}.evaluated`),k.if((0,o._)`${D.evaluated}.dynamicProps`,()=>k.assign((0,o._)`${D.evaluated}.props`,(0,o._)`undefined`)),k.if((0,o._)`${D.evaluated}.dynamicItems`,()=>k.assign((0,o._)`${D.evaluated}.items`,(0,o._)`undefined`))}function T(D,k){const R=typeof D=="object"&&D[k.schemaId];return R&&(k.code.source||k.code.process)?(0,o._)`/*# sourceURL=${R} */`:o.nil}function C(D,k){if(_(D)&&(z(D),O(D))){q(D,k);return}(0,r.boolOrEmptySchema)(D,k)}function O({schema:D,self:k}){if(typeof D=="boolean")return!D;for(const R in D)if(k.RULES.all[R])return!0;return!1}function _(D){return typeof D.schema!="boolean"}function q(D,k){const{schema:R,gen:K,opts:Q}=D;Q.$comment&&R.$comment&&ee(D),G(D),Y(D);const ie=K.const("_errs",l.default.errors);J(D,ie),K.var(k,(0,o._)`${ie} === ${l.default.errors}`)}function z(D){(0,d.checkUnknownRules)(D),W(D)}function J(D,k){if(D.opts.jtd)return he(D,[],!1,k);const R=(0,e.getSchemaTypes)(D.schema),K=(0,e.coerceAndCheckDataType)(D,R);he(D,R,!K,k)}function W(D){const{schema:k,errSchemaPath:R,opts:K,self:Q}=D;k.$ref&&K.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(k,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${R}"`)}function ae(D){const{schema:k,opts:R}=D;k.default!==void 0&&R.useDefaults&&R.strictSchema&&(0,d.checkStrictMode)(D,"default is ignored in the schema root")}function G(D){const k=D.schema[D.opts.schemaId];k&&(D.baseId=(0,c.resolveUrl)(D.opts.uriResolver,D.baseId,k))}function Y(D){if(D.schema.$async&&!D.schemaEnv.$async)throw new Error("async schema in sync schema")}function ee({gen:D,schemaEnv:k,schema:R,errSchemaPath:K,opts:Q}){const ie=R.$comment;if(Q.$comment===!0)D.code((0,o._)`${l.default.self}.logger.log(${ie})`);else if(typeof Q.$comment=="function"){const Fe=(0,o.str)`${K}/$comment`,He=D.scopeValue("root",{ref:k.root});D.code((0,o._)`${l.default.self}.opts.$comment(${ie}, ${Fe}, ${He}.schema)`)}}function X(D){const{gen:k,schemaEnv:R,validateName:K,ValidationError:Q,opts:ie}=D;R.$async?k.if((0,o._)`${l.default.errors} === 0`,()=>k.return(l.default.data),()=>k.throw((0,o._)`new ${Q}(${l.default.vErrors})`)):(k.assign((0,o._)`${K}.errors`,l.default.vErrors),ie.unevaluated&&fe(D),k.return((0,o._)`${l.default.errors} === 0`))}function fe({gen:D,evaluated:k,props:R,items:K}){R instanceof o.Name&&D.assign((0,o._)`${k}.props`,R),K instanceof o.Name&&D.assign((0,o._)`${k}.items`,K)}function he(D,k,R,K){const{gen:Q,schema:ie,data:Fe,allErrors:He,opts:Ke,self:Ge}=D,{RULES:Be}=Ge;if(ie.$ref&&(Ke.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(ie,Be))){Q.block(()=>M(D,"$ref",Be.all.$ref.definition));return}Ke.jtd||De(D,k),Q.block(()=>{for(const Ie of Be.rules)nt(Ie);nt(Be.post)});function nt(Ie){(0,t.shouldUseGroup)(ie,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,Fe,Ke.strictNumbers)),ge(D,Ie),k.length===1&&k[0]===Ie.type&&R&&(Q.else(),(0,s.reportTypeError)(D)),Q.endIf()):ge(D,Ie),He||Q.if((0,o._)`${l.default.errors} === ${K||0}`))}}function ge(D,k){const{gen:R,schema:K,opts:{useDefaults:Q}}=D;Q&&(0,n.assignDefaults)(D,k.type),R.block(()=>{for(const ie of k.rules)(0,t.shouldUseRule)(K,ie)&&M(D,ie.keyword,ie.definition,k.type)})}function De(D,k){D.schemaEnv.meta||!D.opts.strictTypes||(Ne(D,k),D.opts.allowUnionTypes||F(D,k),v(D,D.dataTypes))}function Ne(D,k){if(k.length){if(!D.dataTypes.length){D.dataTypes=k;return}k.forEach(R=>{P(D.dataTypes,R)||p(D,`type "${R}" not allowed by context "${D.dataTypes.join(",")}"`)}),u(D,k)}}function F(D,k){k.length>1&&!(k.length===2&&k.includes("null"))&&p(D,"use allowUnionTypes to allow union type keyword")}function v(D,k){const R=D.self.RULES.all;for(const K in R){const Q=R[K];if(typeof Q=="object"&&(0,t.shouldUseRule)(D.schema,Q)){const{type:ie}=Q.definition;ie.length&&!ie.some(Fe=>x(k,Fe))&&p(D,`missing type "${ie.join(",")}" for keyword "${K}"`)}}}function x(D,k){return D.includes(k)||k==="number"&&D.includes("integer")}function P(D,k){return D.includes(k)||k==="integer"&&D.includes("number")}function u(D,k){const R=[];for(const K of D.dataTypes)P(k,K)?R.push(K):k.includes("integer")&&K==="number"&&R.push("integer");D.dataTypes=R}function p(D,k){const R=D.schemaEnv.baseId+D.errSchemaPath;k+=` at "${R}" (strictTypes)`,(0,d.checkStrictMode)(D,k,D.opts.strictTypes)}class ${constructor(k,R,K){if((0,a.validateKeywordUsage)(k,R,K),this.gen=k.gen,this.allErrors=k.allErrors,this.keyword=K,this.data=k.data,this.schema=k.schema[K],this.$data=R.$data&&k.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(k,this.schema,K,this.$data),this.schemaType=R.schemaType,this.parentSchema=k.schema,this.params={},this.it=k,this.def=R,this.$data)this.schemaCode=k.gen.const("vSchema",H(this.$data,k));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,R.schemaType,R.allowUndefined))throw new Error(`${K} value must be ${JSON.stringify(R.schemaType)}`);("code"in R?R.trackErrors:R.errors!==!1)&&(this.errsCount=k.gen.const("_errs",l.default.errors))}result(k,R,K){this.failResult((0,o.not)(k),R,K)}failResult(k,R,K){this.gen.if(k),K?K():this.error(),R?(this.gen.else(),R(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(k,R){this.failResult((0,o.not)(k),void 0,R)}fail(k){if(k===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(k),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(k){if(!this.$data)return this.fail(k);const{schemaCode:R}=this;this.fail((0,o._)`${R} !== undefined && (${(0,o.or)(this.invalid$data(),k)})`)}error(k,R,K){if(R){this.setParams(R),this._error(k,K),this.setParams({});return}this._error(k,K)}_error(k,R){(k?f.reportExtraError:f.reportError)(this,this.def.error,R)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(k){this.allErrors||this.gen.if(k)}setParams(k,R){R?Object.assign(this.params,k):this.params=k}block$data(k,R,K=o.nil){this.gen.block(()=>{this.check$data(k,K),R()})}check$data(k=o.nil,R=o.nil){if(!this.$data)return;const{gen:K,schemaCode:Q,schemaType:ie,def:Fe}=this;K.if((0,o.or)((0,o._)`${Q} === undefined`,R)),k!==o.nil&&K.assign(k,!0),(ie.length||Fe.validateSchema)&&(K.elseIf(this.invalid$data()),this.$dataError(),k!==o.nil&&K.assign(k,!1)),K.else()}invalid$data(){const{gen:k,schemaCode:R,schemaType:K,def:Q,it:ie}=this;return(0,o.or)(Fe(),He());function Fe(){if(K.length){if(!(R instanceof o.Name))throw new Error("ajv implementation error");const Ke=Array.isArray(K)?K:[K];return(0,o._)`${(0,s.checkDataTypes)(Ke,R,ie.opts.strictNumbers,s.DataType.Wrong)}`}return o.nil}function He(){if(Q.validateSchema){const Ke=k.scopeValue("validate$data",{ref:Q.validateSchema});return(0,o._)`!${Ke}(${R})`}return o.nil}}subschema(k,R){const K=(0,i.getSubschema)(this.it,k);(0,i.extendSubschemaData)(K,this.it,k),(0,i.extendSubschemaMode)(K,k);const Q={...this.it,...K,items:void 0,props:void 0};return C(Q,R),Q}mergeEvaluated(k,R){const{it:K,gen:Q}=this;K.opts.unevaluated&&(K.props!==!0&&k.props!==void 0&&(K.props=d.mergeEvaluated.props(Q,k.props,K.props,R)),K.items!==!0&&k.items!==void 0&&(K.items=d.mergeEvaluated.items(Q,k.items,K.items,R)))}mergeValidEvaluated(k,R){const{it:K,gen:Q}=this;if(K.opts.unevaluated&&(K.props!==!0||K.items!==!0))return Q.if(R,()=>this.mergeEvaluated(k,o.Name)),!0}}It.KeywordCxt=$;function M(D,k,R,K){const Q=new $(D,R,k);"code"in R?R.code(Q,K):Q.$data&&R.validate?(0,a.funcKeywordCode)(Q,R):"macro"in R?(0,a.macroKeywordCode)(Q,R):(R.compile||R.validate)&&(0,a.funcKeywordCode)(Q,R)}const L=/^\/(?:[^~]|~0|~1)*$/,U=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function H(D,{dataLevel:k,dataNames:R,dataPathArr:K}){let Q,ie;if(D==="")return l.default.rootData;if(D[0]==="/"){if(!L.test(D))throw new Error(`Invalid JSON-pointer: ${D}`);Q=D,ie=l.default.rootData}else{const Ge=U.exec(D);if(!Ge)throw new Error(`Invalid JSON-pointer: ${D}`);const Be=+Ge[1];if(Q=Ge[2],Q==="#"){if(Be>=k)throw new Error(Ke("property/index",Be));return K[k-Be]}if(Be>k)throw new Error(Ke("data",Be));if(ie=R[k-Be],!Q)return ie}let Fe=ie;const He=Q.split("/");for(const Ge of He)Ge&&(ie=(0,o._)`${ie}${(0,o.getProperty)((0,d.unescapeJsonPointer)(Ge))}`,Fe=(0,o._)`${Fe} && ${ie}`);return Fe;function Ke(Ge,Be){return`Cannot access ${Ge} ${Be} levels up, current level is ${k}`}}return It.getData=H,It}var kr={};Object.defineProperty(kr,"__esModule",{value:!0});class yu extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}kr.default=yu;var wr={};Object.defineProperty(wr,"__esModule",{value:!0});const mn=qe;class vu extends Error{constructor(e,t,s,n){super(n||`can't resolve reference ${s} from id ${t}`),this.missingRef=(0,mn.resolveUrl)(e,t,s),this.missingSchema=(0,mn.normalizeId)((0,mn.getFullPath)(e,this.missingRef))}}wr.default=vu;var et={};Object.defineProperty(et,"__esModule",{value:!0}),et.resolveSchema=et.getCompilingSchema=et.resolveRef=et.compileSchema=et.SchemaEnv=void 0;const mt=de,_u=kr,Wt=bt,gt=qe,to=Z,bu=rs();class ss{constructor(e){var t;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,gt.normalizeId)(s==null?void 0:s[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s==null?void 0:s.$async,this.refs={}}}et.SchemaEnv=ss;function gn(r){const e=ro.call(this,r);if(e)return e;const t=(0,gt.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new mt.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a});let o;r.$async&&(o=i.scopeValue("Error",{ref:_u.default,code:(0,mt._)`require("ajv/dist/runtime/validation_error").default`}));const l=i.scopeName("validate");r.validateName=l;const c={gen:i,allErrors:this.opts.allErrors,data:Wt.default.data,parentData:Wt.default.parentData,parentDataProperty:Wt.default.parentDataProperty,dataNames:[Wt.default.data],dataPathArr:[mt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,mt.stringify)(r.schema)}:{ref:r.schema}),validateName:l,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:mt.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,mt._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(r),(0,bu.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);const f=i.toString();d=`${i.scopeRefs(Wt.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,r));const y=new Function(`${Wt.default.self}`,`${Wt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(l,{ref:y}),y.errors=null,y.schema=r.schema,y.schemaEnv=r,r.$async&&(y.$async=!0),this.opts.code.source===!0&&(y.source={validateName:l,validateCode:f,scopeValues:i._values}),this.opts.unevaluated){const{props:S,items:E}=c;y.evaluated={props:S instanceof mt.Name?void 0:S,items:E instanceof mt.Name?void 0:E,dynamicProps:S instanceof mt.Name,dynamicItems:E instanceof mt.Name},y.source&&(y.source.evaluated=(0,mt.stringify)(y.evaluated))}return r.validate=y,r}catch(f){throw delete r.validate,delete r.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(r)}}et.compileSchema=gn;function $u(r,e,t){var s;t=(0,gt.resolveUrl)(this.opts.uriResolver,e,t);const n=r.refs[t];if(n)return n;let a=ku.call(this,r,t);if(a===void 0){const i=(s=r.localRefs)===null||s===void 0?void 0:s[t],{schemaId:o}=this.opts;i&&(a=new ss({schema:i,schemaId:o,root:r,baseId:e}))}if(a!==void 0)return r.refs[t]=Su.call(this,a)}et.resolveRef=$u;function Su(r){return(0,gt.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:gn.call(this,r)}function ro(r){for(const e of this._compilations)if(Eu(e,r))return e}et.getCompilingSchema=ro;function Eu(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function ku(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||ns.call(this,r,e)}function ns(r,e){const t=this.opts.uriResolver.parse(e),s=(0,gt._getFullPath)(this.opts.uriResolver,t);let n=(0,gt.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&s===n)return yn.call(this,t,r);const a=(0,gt.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){const o=ns.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:yn.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||gn.call(this,i),a===(0,gt.normalizeId)(e)){const{schema:o}=i,{schemaId:l}=this.opts,c=o[l];return c&&(n=(0,gt.resolveUrl)(this.opts.uriResolver,n,c)),new ss({schema:o,schemaId:l,root:r,baseId:n})}return yn.call(this,t,i)}}et.resolveSchema=ns;const wu=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yn(r,{baseId:e,schema:t,root:s}){var n;if(((n=r.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;const l=t[(0,to.unescapeFragment)(o)];if(l===void 0)return;t=l;const c=typeof t=="object"&&t[this.opts.schemaId];!wu.has(o)&&c&&(e=(0,gt.resolveUrl)(this.opts.uriResolver,e,c))}let a;if(typeof t!="boolean"&&t.$ref&&!(0,to.schemaHasRulesButRef)(t,this.RULES)){const o=(0,gt.resolveUrl)(this.opts.uriResolver,e,t.$ref);a=ns.call(this,s,o)}const{schemaId:i}=this.opts;if(a=a||new ss({schema:t,schemaId:i,root:s,baseId:e}),a.schema!==a.root.schema)return a}const Cu={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var vn={},_n={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(r,e){(function(t,s){s(e)})(Uo,function(t){function s(){for(var A=arguments.length,m=Array(A),N=0;N<A;N++)m[N]=arguments[N];if(m.length>1){m[0]=m[0].slice(0,-1);for(var B=m.length-1,V=1;V<B;++V)m[V]=m[V].slice(1,-1);return m[B]=m[B].slice(1),m.join("")}else return m[0]}function n(A){return"(?:"+A+")"}function a(A){return A===void 0?"undefined":A===null?"null":Object.prototype.toString.call(A).split(" ").pop().split("]").shift().toLowerCase()}function i(A){return A.toUpperCase()}function o(A){return A!=null?A instanceof Array?A:typeof A.length!="number"||A.split||A.setInterval||A.call?[A]:Array.prototype.slice.call(A):[]}function l(A,m){var N=A;if(m)for(var B in m)N[B]=m[B];return N}function c(A){var m="[A-Za-z]",N="[0-9]",B=s(N,"[A-Fa-f]"),V=n(n("%[EFef]"+B+"%"+B+B+"%"+B+B)+"|"+n("%[89A-Fa-f]"+B+"%"+B+B)+"|"+n("%"+B+B)),re="[\\:\\/\\?\\#\\[\\]\\@]",ne="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",me=s(re,ne),we=A?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Me=A?"[\\uE000-\\uF8FF]":"[]",pe=s(m,N,"[\\-\\.\\_\\~]",we);n(m+s(m,N,"[\\+\\-\\.]")+"*"),n(n(V+"|"+s(pe,ne,"[\\:]"))+"*");var Ee=n(n("25[0-5]")+"|"+n("2[0-4]"+N)+"|"+n("1"+N+N)+"|"+n("0?[1-9]"+N)+"|0?0?"+N),je=n(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),le=n(B+"{1,4}"),Ce=n(n(le+"\\:"+le)+"|"+je),xe=n(n(le+"\\:")+"{6}"+Ce),Te=n("\\:\\:"+n(le+"\\:")+"{5}"+Ce),Bt=n(n(le)+"?\\:\\:"+n(le+"\\:")+"{4}"+Ce),St=n(n(n(le+"\\:")+"{0,1}"+le)+"?\\:\\:"+n(le+"\\:")+"{3}"+Ce),Et=n(n(n(le+"\\:")+"{0,2}"+le)+"?\\:\\:"+n(le+"\\:")+"{2}"+Ce),hr=n(n(n(le+"\\:")+"{0,3}"+le)+"?\\:\\:"+le+"\\:"+Ce),er=n(n(n(le+"\\:")+"{0,4}"+le)+"?\\:\\:"+Ce),ut=n(n(n(le+"\\:")+"{0,5}"+le)+"?\\:\\:"+le),kt=n(n(n(le+"\\:")+"{0,6}"+le)+"?\\:\\:"),tr=n([xe,Te,Bt,St,Et,hr,er,ut,kt].join("|")),Ft=n(n(pe+"|"+V)+"+");n("[vV]"+B+"+\\."+s(pe,ne,"[\\:]")+"+"),n(n(V+"|"+s(pe,ne))+"*");var jr=n(V+"|"+s(pe,ne,"[\\:\\@]"));return n(n(V+"|"+s(pe,ne,"[\\@]"))+"+"),n(n(jr+"|"+s("[\\/\\?]",Me))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,N,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",pe,ne),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",pe,ne),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",pe,ne),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",pe,ne),"g"),NOT_QUERY:new RegExp(s("[^\\%]",pe,ne,"[\\:\\@\\/\\?]",Me),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",pe,ne,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",pe,ne),"g"),UNRESERVED:new RegExp(pe,"g"),OTHER_CHARS:new RegExp(s("[^\\%]",pe,me),"g"),PCT_ENCODED:new RegExp(V,"g"),IPV4ADDRESS:new RegExp("^("+je+")$"),IPV6ADDRESS:new RegExp("^\\[?("+tr+")"+n(n("\\%25|\\%(?!"+B+"{2})")+"("+Ft+")")+"?\\]?$")}}var d=c(!1),f=c(!0),w=function(){function A(m,N){var B=[],V=!0,re=!1,ne=void 0;try{for(var me=m[Symbol.iterator](),we;!(V=(we=me.next()).done)&&(B.push(we.value),!(N&&B.length===N));V=!0);}catch(Me){re=!0,ne=Me}finally{try{!V&&me.return&&me.return()}finally{if(re)throw ne}}return B}return function(m,N){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return A(m,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=function(A){if(Array.isArray(A)){for(var m=0,N=Array(A.length);m<A.length;m++)N[m]=A[m];return N}else return Array.from(A)},S=2147483647,E=36,b=1,g=26,T=38,C=700,O=72,_=128,q="-",z=/^xn--/,J=/[^\0-\x7E]/,W=/[\x2E\u3002\uFF0E\uFF61]/g,ae={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},G=E-b,Y=Math.floor,ee=String.fromCharCode;function X(A){throw new RangeError(ae[A])}function fe(A,m){for(var N=[],B=A.length;B--;)N[B]=m(A[B]);return N}function he(A,m){var N=A.split("@"),B="";N.length>1&&(B=N[0]+"@",A=N[1]),A=A.replace(W,".");var V=A.split("."),re=fe(V,m).join(".");return B+re}function ge(A){for(var m=[],N=0,B=A.length;N<B;){var V=A.charCodeAt(N++);if(V>=55296&&V<=56319&&N<B){var re=A.charCodeAt(N++);(re&64512)==56320?m.push(((V&1023)<<10)+(re&1023)+65536):(m.push(V),N--)}else m.push(V)}return m}var De=function(m){return String.fromCodePoint.apply(String,y(m))},Ne=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:E},F=function(m,N){return m+22+75*(m<26)-((N!=0)<<5)},v=function(m,N,B){var V=0;for(m=B?Y(m/C):m>>1,m+=Y(m/N);m>G*g>>1;V+=E)m=Y(m/G);return Y(V+(G+1)*m/(m+T))},x=function(m){var N=[],B=m.length,V=0,re=_,ne=O,me=m.lastIndexOf(q);me<0&&(me=0);for(var we=0;we<me;++we)m.charCodeAt(we)>=128&&X("not-basic"),N.push(m.charCodeAt(we));for(var Me=me>0?me+1:0;Me<B;){for(var pe=V,Ee=1,je=E;;je+=E){Me>=B&&X("invalid-input");var le=Ne(m.charCodeAt(Me++));(le>=E||le>Y((S-V)/Ee))&&X("overflow"),V+=le*Ee;var Ce=je<=ne?b:je>=ne+g?g:je-ne;if(le<Ce)break;var xe=E-Ce;Ee>Y(S/xe)&&X("overflow"),Ee*=xe}var Te=N.length+1;ne=v(V-pe,Te,pe==0),Y(V/Te)>S-re&&X("overflow"),re+=Y(V/Te),V%=Te,N.splice(V++,0,re)}return String.fromCodePoint.apply(String,N)},P=function(m){var N=[];m=ge(m);var B=m.length,V=_,re=0,ne=O,me=!0,we=!1,Me=void 0;try{for(var pe=m[Symbol.iterator](),Ee;!(me=(Ee=pe.next()).done);me=!0){var je=Ee.value;je<128&&N.push(ee(je))}}catch(xr){we=!0,Me=xr}finally{try{!me&&pe.return&&pe.return()}finally{if(we)throw Me}}var le=N.length,Ce=le;for(le&&N.push(q);Ce<B;){var xe=S,Te=!0,Bt=!1,St=void 0;try{for(var Et=m[Symbol.iterator](),hr;!(Te=(hr=Et.next()).done);Te=!0){var er=hr.value;er>=V&&er<xe&&(xe=er)}}catch(xr){Bt=!0,St=xr}finally{try{!Te&&Et.return&&Et.return()}finally{if(Bt)throw St}}var ut=Ce+1;xe-V>Y((S-re)/ut)&&X("overflow"),re+=(xe-V)*ut,V=xe;var kt=!0,tr=!1,Ft=void 0;try{for(var jr=m[Symbol.iterator](),Lo;!(kt=(Lo=jr.next()).done);kt=!0){var Ro=Lo.value;if(Ro<V&&++re>S&&X("overflow"),Ro==V){for(var bs=re,$s=E;;$s+=E){var Ss=$s<=ne?b:$s>=ne+g?g:$s-ne;if(bs<Ss)break;var zo=bs-Ss,qo=E-Ss;N.push(ee(F(Ss+zo%qo,0))),bs=Y(zo/qo)}N.push(ee(F(bs,0))),ne=v(re,ut,Ce==le),re=0,++Ce}}}catch(xr){tr=!0,Ft=xr}finally{try{!kt&&jr.return&&jr.return()}finally{if(tr)throw Ft}}++re,++V}return N.join("")},u=function(m){return he(m,function(N){return z.test(N)?x(N.slice(4).toLowerCase()):N})},p=function(m){return he(m,function(N){return J.test(N)?"xn--"+P(N):N})},$={version:"2.1.0",ucs2:{decode:ge,encode:De},decode:x,encode:P,toASCII:p,toUnicode:u},M={};function L(A){var m=A.charCodeAt(0),N=void 0;return m<16?N="%0"+m.toString(16).toUpperCase():m<128?N="%"+m.toString(16).toUpperCase():m<2048?N="%"+(m>>6|192).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase():N="%"+(m>>12|224).toString(16).toUpperCase()+"%"+(m>>6&63|128).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase(),N}function U(A){for(var m="",N=0,B=A.length;N<B;){var V=parseInt(A.substr(N+1,2),16);if(V<128)m+=String.fromCharCode(V),N+=3;else if(V>=194&&V<224){if(B-N>=6){var re=parseInt(A.substr(N+4,2),16);m+=String.fromCharCode((V&31)<<6|re&63)}else m+=A.substr(N,6);N+=6}else if(V>=224){if(B-N>=9){var ne=parseInt(A.substr(N+4,2),16),me=parseInt(A.substr(N+7,2),16);m+=String.fromCharCode((V&15)<<12|(ne&63)<<6|me&63)}else m+=A.substr(N,9);N+=9}else m+=A.substr(N,3),N+=3}return m}function H(A,m){function N(B){var V=U(B);return V.match(m.UNRESERVED)?V:B}return A.scheme&&(A.scheme=String(A.scheme).replace(m.PCT_ENCODED,N).toLowerCase().replace(m.NOT_SCHEME,"")),A.userinfo!==void 0&&(A.userinfo=String(A.userinfo).replace(m.PCT_ENCODED,N).replace(m.NOT_USERINFO,L).replace(m.PCT_ENCODED,i)),A.host!==void 0&&(A.host=String(A.host).replace(m.PCT_ENCODED,N).toLowerCase().replace(m.NOT_HOST,L).replace(m.PCT_ENCODED,i)),A.path!==void 0&&(A.path=String(A.path).replace(m.PCT_ENCODED,N).replace(A.scheme?m.NOT_PATH:m.NOT_PATH_NOSCHEME,L).replace(m.PCT_ENCODED,i)),A.query!==void 0&&(A.query=String(A.query).replace(m.PCT_ENCODED,N).replace(m.NOT_QUERY,L).replace(m.PCT_ENCODED,i)),A.fragment!==void 0&&(A.fragment=String(A.fragment).replace(m.PCT_ENCODED,N).replace(m.NOT_FRAGMENT,L).replace(m.PCT_ENCODED,i)),A}function D(A){return A.replace(/^0*(.*)/,"$1")||"0"}function k(A,m){var N=A.match(m.IPV4ADDRESS)||[],B=w(N,2),V=B[1];return V?V.split(".").map(D).join("."):A}function R(A,m){var N=A.match(m.IPV6ADDRESS)||[],B=w(N,3),V=B[1],re=B[2];if(V){for(var ne=V.toLowerCase().split("::").reverse(),me=w(ne,2),we=me[0],Me=me[1],pe=Me?Me.split(":").map(D):[],Ee=we.split(":").map(D),je=m.IPV4ADDRESS.test(Ee[Ee.length-1]),le=je?7:8,Ce=Ee.length-le,xe=Array(le),Te=0;Te<le;++Te)xe[Te]=pe[Te]||Ee[Ce+Te]||"";je&&(xe[le-1]=k(xe[le-1],m));var Bt=xe.reduce(function(ut,kt,tr){if(!kt||kt==="0"){var Ft=ut[ut.length-1];Ft&&Ft.index+Ft.length===tr?Ft.length++:ut.push({index:tr,length:1})}return ut},[]),St=Bt.sort(function(ut,kt){return kt.length-ut.length})[0],Et=void 0;if(St&&St.length>1){var hr=xe.slice(0,St.index),er=xe.slice(St.index+St.length);Et=hr.join(":")+"::"+er.join(":")}else Et=xe.join(":");return re&&(Et+="%"+re),Et}else return A}var K=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Q="".match(/(){0}/)[1]===void 0;function ie(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N={},B=m.iri!==!1?f:d;m.reference==="suffix"&&(A=(m.scheme?m.scheme+":":"")+"//"+A);var V=A.match(K);if(V){Q?(N.scheme=V[1],N.userinfo=V[3],N.host=V[4],N.port=parseInt(V[5],10),N.path=V[6]||"",N.query=V[7],N.fragment=V[8],isNaN(N.port)&&(N.port=V[5])):(N.scheme=V[1]||void 0,N.userinfo=A.indexOf("@")!==-1?V[3]:void 0,N.host=A.indexOf("//")!==-1?V[4]:void 0,N.port=parseInt(V[5],10),N.path=V[6]||"",N.query=A.indexOf("?")!==-1?V[7]:void 0,N.fragment=A.indexOf("#")!==-1?V[8]:void 0,isNaN(N.port)&&(N.port=A.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?V[4]:void 0)),N.host&&(N.host=R(k(N.host,B),B)),N.scheme===void 0&&N.userinfo===void 0&&N.host===void 0&&N.port===void 0&&!N.path&&N.query===void 0?N.reference="same-document":N.scheme===void 0?N.reference="relative":N.fragment===void 0?N.reference="absolute":N.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==N.reference&&(N.error=N.error||"URI is not a "+m.reference+" reference.");var re=M[(m.scheme||N.scheme||"").toLowerCase()];if(!m.unicodeSupport&&(!re||!re.unicodeSupport)){if(N.host&&(m.domainHost||re&&re.domainHost))try{N.host=$.toASCII(N.host.replace(B.PCT_ENCODED,U).toLowerCase())}catch(ne){N.error=N.error||"Host's domain name can not be converted to ASCII via punycode: "+ne}H(N,d)}else H(N,B);re&&re.parse&&re.parse(N,m)}else N.error=N.error||"URI can not be parsed.";return N}function Fe(A,m){var N=m.iri!==!1?f:d,B=[];return A.userinfo!==void 0&&(B.push(A.userinfo),B.push("@")),A.host!==void 0&&B.push(R(k(String(A.host),N),N).replace(N.IPV6ADDRESS,function(V,re,ne){return"["+re+(ne?"%25"+ne:"")+"]"})),(typeof A.port=="number"||typeof A.port=="string")&&(B.push(":"),B.push(String(A.port))),B.length?B.join(""):void 0}var He=/^\.\.?\//,Ke=/^\/\.(\/|$)/,Ge=/^\/\.\.(\/|$)/,Be=/^\/?(?:.|\n)*?(?=\/|$)/;function nt(A){for(var m=[];A.length;)if(A.match(He))A=A.replace(He,"");else if(A.match(Ke))A=A.replace(Ke,"/");else if(A.match(Ge))A=A.replace(Ge,"/"),m.pop();else if(A==="."||A==="..")A="";else{var N=A.match(Be);if(N){var B=N[0];A=A.slice(B.length),m.push(B)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function Ie(A){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},N=m.iri?f:d,B=[],V=M[(m.scheme||A.scheme||"").toLowerCase()];if(V&&V.serialize&&V.serialize(A,m),A.host&&!N.IPV6ADDRESS.test(A.host)){if(m.domainHost||V&&V.domainHost)try{A.host=m.iri?$.toUnicode(A.host):$.toASCII(A.host.replace(N.PCT_ENCODED,U).toLowerCase())}catch(me){A.error=A.error||"Host's domain name can not be converted to "+(m.iri?"Unicode":"ASCII")+" via punycode: "+me}}H(A,N),m.reference!=="suffix"&&A.scheme&&(B.push(A.scheme),B.push(":"));var re=Fe(A,m);if(re!==void 0&&(m.reference!=="suffix"&&B.push("//"),B.push(re),A.path&&A.path.charAt(0)!=="/"&&B.push("/")),A.path!==void 0){var ne=A.path;!m.absolutePath&&(!V||!V.absolutePath)&&(ne=nt(ne)),re===void 0&&(ne=ne.replace(/^\/\//,"/%2F")),B.push(ne)}return A.query!==void 0&&(B.push("?"),B.push(A.query)),A.fragment!==void 0&&(B.push("#"),B.push(A.fragment)),B.join("")}function fr(A,m){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},B=arguments[3],V={};return B||(A=ie(Ie(A,N),N),m=ie(Ie(m,N),N)),N=N||{},!N.tolerant&&m.scheme?(V.scheme=m.scheme,V.userinfo=m.userinfo,V.host=m.host,V.port=m.port,V.path=nt(m.path||""),V.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(V.userinfo=m.userinfo,V.host=m.host,V.port=m.port,V.path=nt(m.path||""),V.query=m.query):(m.path?(m.path.charAt(0)==="/"?V.path=nt(m.path):((A.userinfo!==void 0||A.host!==void 0||A.port!==void 0)&&!A.path?V.path="/"+m.path:A.path?V.path=A.path.slice(0,A.path.lastIndexOf("/")+1)+m.path:V.path=m.path,V.path=nt(V.path)),V.query=m.query):(V.path=A.path,m.query!==void 0?V.query=m.query:V.query=A.query),V.userinfo=A.userinfo,V.host=A.host,V.port=A.port),V.scheme=A.scheme),V.fragment=m.fragment,V}function Pr(A,m,N){var B=l({scheme:"null"},N);return Ie(fr(ie(A,B),ie(m,B),B,!0),B)}function Zt(A,m){return typeof A=="string"?A=Ie(ie(A,m),m):a(A)==="object"&&(A=ie(Ie(A,m),m)),A}function Fr(A,m,N){return typeof A=="string"?A=Ie(ie(A,N),N):a(A)==="object"&&(A=Ie(A,N)),typeof m=="string"?m=Ie(ie(m,N),N):a(m)==="object"&&(m=Ie(m,N)),A===m}function _s(A,m){return A&&A.toString().replace(!m||!m.iri?d.ESCAPE:f.ESCAPE,L)}function lt(A,m){return A&&A.toString().replace(!m||!m.iri?d.PCT_ENCODED:f.PCT_ENCODED,U)}var Qt={scheme:"http",domainHost:!0,parse:function(m,N){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m},serialize:function(m,N){var B=String(m.scheme).toLowerCase()==="https";return(m.port===(B?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}},No={scheme:"https",domainHost:Qt.domainHost,parse:Qt.parse,serialize:Qt.serialize};function Po(A){return typeof A.secure=="boolean"?A.secure:String(A.scheme).toLowerCase()==="wss"}var Mr={scheme:"ws",domainHost:!0,parse:function(m,N){var B=m;return B.secure=Po(B),B.resourceName=(B.path||"/")+(B.query?"?"+B.query:""),B.path=void 0,B.query=void 0,B},serialize:function(m,N){if((m.port===(Po(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){var B=m.resourceName.split("?"),V=w(B,2),re=V[0],ne=V[1];m.path=re&&re!=="/"?re:void 0,m.query=ne,m.resourceName=void 0}return m.fragment=void 0,m}},Fo={scheme:"wss",domainHost:Mr.domainHost,parse:Mr.parse,serialize:Mr.serialize},Ed={},Mo="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$t="[0-9A-Fa-f]",kd=n(n("%[EFef]"+$t+"%"+$t+$t+"%"+$t+$t)+"|"+n("%[89A-Fa-f]"+$t+"%"+$t+$t)+"|"+n("%"+$t+$t)),wd="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Cd="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",Td=s(Cd,'[\\"\\\\]'),Od="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ad=new RegExp(Mo,"g"),pr=new RegExp(kd,"g"),Dd=new RegExp(s("[^]",wd,"[\\.]",'[\\"]',Td),"g"),jo=new RegExp(s("[^]",Mo,Od),"g"),Id=jo;function sa(A){var m=U(A);return m.match(Ad)?m:A}var xo={scheme:"mailto",parse:function(m,N){var B=m,V=B.to=B.path?B.path.split(","):[];if(B.path=void 0,B.query){for(var re=!1,ne={},me=B.query.split("&"),we=0,Me=me.length;we<Me;++we){var pe=me[we].split("=");switch(pe[0]){case"to":for(var Ee=pe[1].split(","),je=0,le=Ee.length;je<le;++je)V.push(Ee[je]);break;case"subject":B.subject=lt(pe[1],N);break;case"body":B.body=lt(pe[1],N);break;default:re=!0,ne[lt(pe[0],N)]=lt(pe[1],N);break}}re&&(B.headers=ne)}B.query=void 0;for(var Ce=0,xe=V.length;Ce<xe;++Ce){var Te=V[Ce].split("@");if(Te[0]=lt(Te[0]),N.unicodeSupport)Te[1]=lt(Te[1],N).toLowerCase();else try{Te[1]=$.toASCII(lt(Te[1],N).toLowerCase())}catch(Bt){B.error=B.error||"Email address's domain name can not be converted to ASCII via punycode: "+Bt}V[Ce]=Te.join("@")}return B},serialize:function(m,N){var B=m,V=o(m.to);if(V){for(var re=0,ne=V.length;re<ne;++re){var me=String(V[re]),we=me.lastIndexOf("@"),Me=me.slice(0,we).replace(pr,sa).replace(pr,i).replace(Dd,L),pe=me.slice(we+1);try{pe=N.iri?$.toUnicode(pe):$.toASCII(lt(pe,N).toLowerCase())}catch(Ce){B.error=B.error||"Email address's domain name can not be converted to "+(N.iri?"Unicode":"ASCII")+" via punycode: "+Ce}V[re]=Me+"@"+pe}B.path=V.join(",")}var Ee=m.headers=m.headers||{};m.subject&&(Ee.subject=m.subject),m.body&&(Ee.body=m.body);var je=[];for(var le in Ee)Ee[le]!==Ed[le]&&je.push(le.replace(pr,sa).replace(pr,i).replace(jo,L)+"="+Ee[le].replace(pr,sa).replace(pr,i).replace(Id,L));return je.length&&(B.query=je.join("&")),B}},Nd=/^([^\:]+)\:(.*)/,Vo={scheme:"urn",parse:function(m,N){var B=m.path&&m.path.match(Nd),V=m;if(B){var re=N.scheme||V.scheme||"urn",ne=B[1].toLowerCase(),me=B[2],we=re+":"+(N.nid||ne),Me=M[we];V.nid=ne,V.nss=me,V.path=void 0,Me&&(V=Me.parse(V,N))}else V.error=V.error||"URN can not be parsed.";return V},serialize:function(m,N){var B=N.scheme||m.scheme||"urn",V=m.nid,re=B+":"+(N.nid||V),ne=M[re];ne&&(m=ne.serialize(m,N));var me=m,we=m.nss;return me.path=(V||N.nid)+":"+we,me}},Pd=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Bo={scheme:"urn:uuid",parse:function(m,N){var B=m;return B.uuid=B.nss,B.nss=void 0,!N.tolerant&&(!B.uuid||!B.uuid.match(Pd))&&(B.error=B.error||"UUID is not valid."),B},serialize:function(m,N){var B=m;return B.nss=(m.uuid||"").toLowerCase(),B}};M[Qt.scheme]=Qt,M[No.scheme]=No,M[Mr.scheme]=Mr,M[Fo.scheme]=Fo,M[xo.scheme]=xo,M[Vo.scheme]=Vo,M[Bo.scheme]=Bo,t.SCHEMES=M,t.pctEncChar=L,t.pctDecChars=U,t.parse=ie,t.removeDotSegments=nt,t.serialize=Ie,t.resolveComponents=fr,t.resolve=Pr,t.normalize=Zt,t.equal=Fr,t.escapeComponent=_s,t.unescapeComponent=lt,Object.defineProperty(t,"__esModule",{value:!0})})})(_n,_n.exports);var Tu=_n.exports;Object.defineProperty(vn,"__esModule",{value:!0});const so=Tu;so.code='require("ajv/dist/runtime/uri").default',vn.default=so,function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.CodeGen=r.Name=r.nil=r.stringify=r.str=r._=r.KeywordCxt=void 0;var e=rs();Object.defineProperty(r,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var t=de;Object.defineProperty(r,"_",{enumerable:!0,get:function(){return t._}}),Object.defineProperty(r,"str",{enumerable:!0,get:function(){return t.str}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return t.stringify}}),Object.defineProperty(r,"nil",{enumerable:!0,get:function(){return t.nil}}),Object.defineProperty(r,"Name",{enumerable:!0,get:function(){return t.Name}}),Object.defineProperty(r,"CodeGen",{enumerable:!0,get:function(){return t.CodeGen}});const s=kr,n=wr,a=Gt,i=et,o=de,l=qe,c=Ve,d=Z,f=Cu,w=vn,y=(F,v)=>new RegExp(F,v);y.code="new RegExp";const S=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},T=200;function C(F){var v,x,P,u,p,$,M,L,U,H,D,k,R,K,Q,ie,Fe,He,Ke,Ge,Be,nt,Ie,fr,Pr;const Zt=F.strict,Fr=(v=F.code)===null||v===void 0?void 0:v.optimize,_s=Fr===!0||Fr===void 0?1:Fr||0,lt=(P=(x=F.code)===null||x===void 0?void 0:x.regExp)!==null&&P!==void 0?P:y,Qt=(u=F.uriResolver)!==null&&u!==void 0?u:w.default;return{strictSchema:($=(p=F.strictSchema)!==null&&p!==void 0?p:Zt)!==null&&$!==void 0?$:!0,strictNumbers:(L=(M=F.strictNumbers)!==null&&M!==void 0?M:Zt)!==null&&L!==void 0?L:!0,strictTypes:(H=(U=F.strictTypes)!==null&&U!==void 0?U:Zt)!==null&&H!==void 0?H:"log",strictTuples:(k=(D=F.strictTuples)!==null&&D!==void 0?D:Zt)!==null&&k!==void 0?k:"log",strictRequired:(K=(R=F.strictRequired)!==null&&R!==void 0?R:Zt)!==null&&K!==void 0?K:!1,code:F.code?{...F.code,optimize:_s,regExp:lt}:{optimize:_s,regExp:lt},loopRequired:(Q=F.loopRequired)!==null&&Q!==void 0?Q:T,loopEnum:(ie=F.loopEnum)!==null&&ie!==void 0?ie:T,meta:(Fe=F.meta)!==null&&Fe!==void 0?Fe:!0,messages:(He=F.messages)!==null&&He!==void 0?He:!0,inlineRefs:(Ke=F.inlineRefs)!==null&&Ke!==void 0?Ke:!0,schemaId:(Ge=F.schemaId)!==null&&Ge!==void 0?Ge:"$id",addUsedSchema:(Be=F.addUsedSchema)!==null&&Be!==void 0?Be:!0,validateSchema:(nt=F.validateSchema)!==null&&nt!==void 0?nt:!0,validateFormats:(Ie=F.validateFormats)!==null&&Ie!==void 0?Ie:!0,unicodeRegExp:(fr=F.unicodeRegExp)!==null&&fr!==void 0?fr:!0,int32range:(Pr=F.int32range)!==null&&Pr!==void 0?Pr:!0,uriResolver:Qt}}class O{constructor(v={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,v=this.opts={...v,...C(v)};const{es5:x,lines:P}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:E,es5:x,lines:P}),this.logger=Y(v.logger);const u=v.validateFormats;v.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,b,v,"NOT SUPPORTED"),_.call(this,g,v,"DEPRECATED","warn"),this._metaOpts=ae.call(this),v.formats&&J.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),v.keywords&&W.call(this,v.keywords),typeof v.meta=="object"&&this.addMetaSchema(v.meta),z.call(this),v.validateFormats=u}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:v,meta:x,schemaId:P}=this.opts;let u=f;P==="id"&&(u={...f},u.id=u.$id,delete u.$id),x&&v&&this.addMetaSchema(u,u[P],!1)}defaultMeta(){const{meta:v,schemaId:x}=this.opts;return this.opts.defaultMeta=typeof v=="object"?v[x]||v:void 0}validate(v,x){let P;if(typeof v=="string"){if(P=this.getSchema(v),!P)throw new Error(`no schema with key or ref "${v}"`)}else P=this.compile(v);const u=P(x);return"$async"in P||(this.errors=P.errors),u}compile(v,x){const P=this._addSchema(v,x);return P.validate||this._compileSchemaEnv(P)}compileAsync(v,x){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:P}=this.opts;return u.call(this,v,x);async function u(H,D){await p.call(this,H.$schema);const k=this._addSchema(H,D);return k.validate||$.call(this,k)}async function p(H){H&&!this.getSchema(H)&&await u.call(this,{$ref:H},!0)}async function $(H){try{return this._compileSchemaEnv(H)}catch(D){if(!(D instanceof n.default))throw D;return M.call(this,D),await L.call(this,D.missingSchema),$.call(this,H)}}function M({missingSchema:H,missingRef:D}){if(this.refs[H])throw new Error(`AnySchema ${H} is loaded but ${D} cannot be resolved`)}async function L(H){const D=await U.call(this,H);this.refs[H]||await p.call(this,D.$schema),this.refs[H]||this.addSchema(D,H,x)}async function U(H){const D=this._loading[H];if(D)return D;try{return await(this._loading[H]=P(H))}finally{delete this._loading[H]}}}addSchema(v,x,P,u=this.opts.validateSchema){if(Array.isArray(v)){for(const $ of v)this.addSchema($,void 0,P,u);return this}let p;if(typeof v=="object"){const{schemaId:$}=this.opts;if(p=v[$],p!==void 0&&typeof p!="string")throw new Error(`schema ${$} must be string`)}return x=(0,l.normalizeId)(x||p),this._checkUnique(x),this.schemas[x]=this._addSchema(v,P,x,u,!0),this}addMetaSchema(v,x,P=this.opts.validateSchema){return this.addSchema(v,x,!0,P),this}validateSchema(v,x){if(typeof v=="boolean")return!0;let P;if(P=v.$schema,P!==void 0&&typeof P!="string")throw new Error("$schema must be a string");if(P=P||this.opts.defaultMeta||this.defaultMeta(),!P)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const u=this.validate(P,v);if(!u&&x){const p="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(p);else throw new Error(p)}return u}getSchema(v){let x;for(;typeof(x=q.call(this,v))=="string";)v=x;if(x===void 0){const{schemaId:P}=this.opts,u=new i.SchemaEnv({schema:{},schemaId:P});if(x=i.resolveSchema.call(this,u,v),!x)return;this.refs[v]=x}return x.validate||this._compileSchemaEnv(x)}removeSchema(v){if(v instanceof RegExp)return this._removeAllSchemas(this.schemas,v),this._removeAllSchemas(this.refs,v),this;switch(typeof v){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const x=q.call(this,v);return typeof x=="object"&&this._cache.delete(x.schema),delete this.schemas[v],delete this.refs[v],this}case"object":{const x=v;this._cache.delete(x);let P=v[this.opts.schemaId];return P&&(P=(0,l.normalizeId)(P),delete this.schemas[P],delete this.refs[P]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(v){for(const x of v)this.addKeyword(x);return this}addKeyword(v,x){let P;if(typeof v=="string")P=v,typeof x=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),x.keyword=P);else if(typeof v=="object"&&x===void 0){if(x=v,P=x.keyword,Array.isArray(P)&&!P.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X.call(this,P,x),!x)return(0,d.eachItem)(P,p=>fe.call(this,p)),this;ge.call(this,x);const u={...x,type:(0,c.getJSONTypes)(x.type),schemaType:(0,c.getJSONTypes)(x.schemaType)};return(0,d.eachItem)(P,u.type.length===0?p=>fe.call(this,p,u):p=>u.type.forEach($=>fe.call(this,p,u,$))),this}getKeyword(v){const x=this.RULES.all[v];return typeof x=="object"?x.definition:!!x}removeKeyword(v){const{RULES:x}=this;delete x.keywords[v],delete x.all[v];for(const P of x.rules){const u=P.rules.findIndex(p=>p.keyword===v);u>=0&&P.rules.splice(u,1)}return this}addFormat(v,x){return typeof x=="string"&&(x=new RegExp(x)),this.formats[v]=x,this}errorsText(v=this.errors,{separator:x=", ",dataVar:P="data"}={}){return!v||v.length===0?"No errors":v.map(u=>`${P}${u.instancePath} ${u.message}`).reduce((u,p)=>u+x+p)}$dataMetaSchema(v,x){const P=this.RULES.all;v=JSON.parse(JSON.stringify(v));for(const u of x){const p=u.split("/").slice(1);let $=v;for(const M of p)$=$[M];for(const M in P){const L=P[M];if(typeof L!="object")continue;const{$data:U}=L.definition,H=$[M];U&&H&&($[M]=Ne(H))}}return v}_removeAllSchemas(v,x){for(const P in v){const u=v[P];(!x||x.test(P))&&(typeof u=="string"?delete v[P]:u&&!u.meta&&(this._cache.delete(u.schema),delete v[P]))}}_addSchema(v,x,P,u=this.opts.validateSchema,p=this.opts.addUsedSchema){let $;const{schemaId:M}=this.opts;if(typeof v=="object")$=v[M];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof v!="boolean")throw new Error("schema must be object or boolean")}let L=this._cache.get(v);if(L!==void 0)return L;P=(0,l.normalizeId)($||P);const U=l.getSchemaRefs.call(this,v,P);return L=new i.SchemaEnv({schema:v,schemaId:M,meta:x,baseId:P,localRefs:U}),this._cache.set(L.schema,L),p&&!P.startsWith("#")&&(P&&this._checkUnique(P),this.refs[P]=L),u&&this.validateSchema(v,!0),L}_checkUnique(v){if(this.schemas[v]||this.refs[v])throw new Error(`schema with key or id "${v}" already exists`)}_compileSchemaEnv(v){if(v.meta?this._compileMetaSchema(v):i.compileSchema.call(this,v),!v.validate)throw new Error("ajv implementation error");return v.validate}_compileMetaSchema(v){const x=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,v)}finally{this.opts=x}}}O.ValidationError=s.default,O.MissingRefError=n.default,r.default=O;function _(F,v,x,P="error"){for(const u in F){const p=u;p in v&&this.logger[P](`${x}: option ${u}. ${F[p]}`)}}function q(F){return F=(0,l.normalizeId)(F),this.schemas[F]||this.refs[F]}function z(){const F=this.opts.schemas;if(F)if(Array.isArray(F))this.addSchema(F);else for(const v in F)this.addSchema(F[v],v)}function J(){for(const F in this.opts.formats){const v=this.opts.formats[F];v&&this.addFormat(F,v)}}function W(F){if(Array.isArray(F)){this.addVocabulary(F);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const v in F){const x=F[v];x.keyword||(x.keyword=v),this.addKeyword(x)}}function ae(){const F={...this.opts};for(const v of S)delete F[v];return F}const G={log(){},warn(){},error(){}};function Y(F){if(F===!1)return G;if(F===void 0)return console;if(F.log&&F.warn&&F.error)return F;throw new Error("logger must implement log, warn and error methods")}const ee=/^[a-z_$][a-z0-9_$:-]*$/i;function X(F,v){const{RULES:x}=this;if((0,d.eachItem)(F,P=>{if(x.keywords[P])throw new Error(`Keyword ${P} is already defined`);if(!ee.test(P))throw new Error(`Keyword ${P} has invalid name`)}),!!v&&v.$data&&!("code"in v||"validate"in v))throw new Error('$data keyword must have "code" or "validate" function')}function fe(F,v,x){var P;const u=v==null?void 0:v.post;if(x&&u)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:p}=this;let $=u?p.post:p.rules.find(({type:L})=>L===x);if($||($={type:x,rules:[]},p.rules.push($)),p.keywords[F]=!0,!v)return;const M={keyword:F,definition:{...v,type:(0,c.getJSONTypes)(v.type),schemaType:(0,c.getJSONTypes)(v.schemaType)}};v.before?he.call(this,$,M,v.before):$.rules.push(M),p.all[F]=M,(P=v.implements)===null||P===void 0||P.forEach(L=>this.addKeyword(L))}function he(F,v,x){const P=F.rules.findIndex(u=>u.keyword===x);P>=0?F.rules.splice(P,0,v):(F.rules.push(v),this.logger.warn(`rule ${x} is not defined`))}function ge(F){let{metaSchema:v}=F;v!==void 0&&(F.$data&&this.opts.$data&&(v=Ne(v)),F.validateSchema=this.compile(v,!0))}const De={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ne(F){return{anyOf:[F,De]}}}(Ii);var bn={},$n={},Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});const Ou={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Sn.default=Ou;var Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.callRef=Yt.getValidate=void 0;const Au=wr,no=ht(),tt=de,or=bt,ao=et,as=Z,Du={keyword:"$ref",schemaType:"string",code(r){const{gen:e,schema:t,it:s}=r,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:l}=s,{root:c}=a;if((t==="#"||t==="#/")&&n===c.baseId)return f();const d=ao.resolveRef.call(l,c,n,t);if(d===void 0)throw new Au.default(s.opts.uriResolver,n,t);if(d instanceof ao.SchemaEnv)return w(d);return y(d);function f(){if(a===c)return is(r,i,a,a.$async);const S=e.scopeValue("root",{ref:c});return is(r,(0,tt._)`${S}.validate`,c,c.$async)}function w(S){const E=io(r,S);is(r,E,S,S.$async)}function y(S){const E=e.scopeValue("schema",o.code.source===!0?{ref:S,code:(0,tt.stringify)(S)}:{ref:S}),b=e.name("valid"),g=r.subschema({schema:S,dataTypes:[],schemaPath:tt.nil,topSchemaRef:E,errSchemaPath:t},b);r.mergeEvaluated(g),r.ok(b)}}};function io(r,e){const{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,tt._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Yt.getValidate=io;function is(r,e,t,s){const{gen:n,it:a}=r,{allErrors:i,schemaEnv:o,opts:l}=a,c=l.passContext?or.default.this:tt.nil;s?d():f();function d(){if(!o.$async)throw new Error("async schema referenced by sync schema");const S=n.let("valid");n.try(()=>{n.code((0,tt._)`await ${(0,no.callValidateCode)(r,e,c)}`),y(e),i||n.assign(S,!0)},E=>{n.if((0,tt._)`!(${E} instanceof ${a.ValidationError})`,()=>n.throw(E)),w(E),i||n.assign(S,!1)}),r.ok(S)}function f(){r.result((0,no.callValidateCode)(r,e,c),()=>y(e),()=>w(e))}function w(S){const E=(0,tt._)`${S}.errors`;n.assign(or.default.vErrors,(0,tt._)`${or.default.vErrors} === null ? ${E} : ${or.default.vErrors}.concat(${E})`),n.assign(or.default.errors,(0,tt._)`${or.default.vErrors}.length`)}function y(S){var E;if(!a.opts.unevaluated)return;const b=(E=t==null?void 0:t.validate)===null||E===void 0?void 0:E.evaluated;if(a.props!==!0)if(b&&!b.dynamicProps)b.props!==void 0&&(a.props=as.mergeEvaluated.props(n,b.props,a.props));else{const g=n.var("props",(0,tt._)`${S}.evaluated.props`);a.props=as.mergeEvaluated.props(n,g,a.props,tt.Name)}if(a.items!==!0)if(b&&!b.dynamicItems)b.items!==void 0&&(a.items=as.mergeEvaluated.items(n,b.items,a.items));else{const g=n.var("items",(0,tt._)`${S}.evaluated.items`);a.items=as.mergeEvaluated.items(n,g,a.items,tt.Name)}}}Yt.callRef=is,Yt.default=Du,Object.defineProperty($n,"__esModule",{value:!0});const Iu=Sn,Nu=Yt,Pu=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Iu.default,Nu.default];$n.default=Pu;var En={},kn={};Object.defineProperty(kn,"__esModule",{value:!0});const os=de,Vt=os.operators,ls={maximum:{okStr:"<=",ok:Vt.LTE,fail:Vt.GT},minimum:{okStr:">=",ok:Vt.GTE,fail:Vt.LT},exclusiveMaximum:{okStr:"<",ok:Vt.LT,fail:Vt.GTE},exclusiveMinimum:{okStr:">",ok:Vt.GT,fail:Vt.LTE}},Fu={message:({keyword:r,schemaCode:e})=>(0,os.str)`must be ${ls[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,os._)`{comparison: ${ls[r].okStr}, limit: ${e}}`},Mu={keyword:Object.keys(ls),type:"number",schemaType:"number",$data:!0,error:Fu,code(r){const{keyword:e,data:t,schemaCode:s}=r;r.fail$data((0,os._)`${t} ${ls[e].fail} ${s} || isNaN(${t})`)}};kn.default=Mu;var wn={};Object.defineProperty(wn,"__esModule",{value:!0});const Cr=de,ju={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,Cr.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,Cr._)`{multipleOf: ${r}}`},code(r){const{gen:e,data:t,schemaCode:s,it:n}=r,a=n.opts.multipleOfPrecision,i=e.let("res"),o=a?(0,Cr._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,Cr._)`${i} !== parseInt(${i})`;r.fail$data((0,Cr._)`(${s} === 0 || (${i} = ${t}/${s}, ${o}))`)}};wn.default=ju;var Cn={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0});function oo(r){const e=r.length;let t=0,s=0,n;for(;s<e;)t++,n=r.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=r.charCodeAt(s),(n&64512)===56320&&s++);return t}Tn.default=oo,oo.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(Cn,"__esModule",{value:!0});const Xt=de,xu=Z,Vu=Tn,Bu={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:e}){const t=r==="maxLength"?"more":"fewer";return(0,Xt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Xt._)`{limit: ${r}}`},code(r){const{keyword:e,data:t,schemaCode:s,it:n}=r,a=e==="maxLength"?Xt.operators.GT:Xt.operators.LT,i=n.opts.unicode===!1?(0,Xt._)`${t}.length`:(0,Xt._)`${(0,xu.useFunc)(r.gen,Vu.default)}(${t})`;r.fail$data((0,Xt._)`${i} ${a} ${s}`)}};Cn.default=Bu;var On={};Object.defineProperty(On,"__esModule",{value:!0});const Lu=ht(),us=de,Ru={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,us.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,us._)`{pattern: ${r}}`},code(r){const{data:e,$data:t,schema:s,schemaCode:n,it:a}=r,i=a.opts.unicodeRegExp?"u":"",o=t?(0,us._)`(new RegExp(${n}, ${i}))`:(0,Lu.usePattern)(r,s);r.fail$data((0,us._)`!${o}.test(${e})`)}};On.default=Ru;var An={};Object.defineProperty(An,"__esModule",{value:!0});const Tr=de,zu={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:e}){const t=r==="maxProperties"?"more":"fewer";return(0,Tr.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,Tr._)`{limit: ${r}}`},code(r){const{keyword:e,data:t,schemaCode:s}=r,n=e==="maxProperties"?Tr.operators.GT:Tr.operators.LT;r.fail$data((0,Tr._)`Object.keys(${t}).length ${n} ${s}`)}};An.default=zu;var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0});const Or=ht(),Ar=de,qu=Z,Uu={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:r}})=>(0,Ar.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,Ar._)`{missingProperty: ${r}}`},code(r){const{gen:e,schema:t,schemaCode:s,data:n,$data:a,it:i}=r,{opts:o}=i;if(!a&&t.length===0)return;const l=t.length>=o.loopRequired;if(i.allErrors?c():d(),o.strictRequired){const y=r.parentSchema.properties,{definedProperties:S}=r.it;for(const E of t)if((y==null?void 0:y[E])===void 0&&!S.has(E)){const b=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${E}" is not defined at "${b}" (strictRequired)`;(0,qu.checkStrictMode)(i,g,i.opts.strictRequired)}}function c(){if(l||a)r.block$data(Ar.nil,f);else for(const y of t)(0,Or.checkReportMissingProp)(r,y)}function d(){const y=e.let("missing");if(l||a){const S=e.let("valid",!0);r.block$data(S,()=>w(y,S)),r.ok(S)}else e.if((0,Or.checkMissingProp)(r,t,y)),(0,Or.reportMissingProp)(r,y),e.else()}function f(){e.forOf("prop",s,y=>{r.setParams({missingProperty:y}),e.if((0,Or.noPropertyInData)(e,n,y,o.ownProperties),()=>r.error())})}function w(y,S){r.setParams({missingProperty:y}),e.forOf(y,s,()=>{e.assign(S,(0,Or.propertyInData)(e,n,y,o.ownProperties)),e.if((0,Ar.not)(S),()=>{r.error(),e.break()})},Ar.nil)}}};Dn.default=Uu;var In={};Object.defineProperty(In,"__esModule",{value:!0});const Dr=de,Hu={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:e}){const t=r==="maxItems"?"more":"fewer";return(0,Dr.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,Dr._)`{limit: ${r}}`},code(r){const{keyword:e,data:t,schemaCode:s}=r,n=e==="maxItems"?Dr.operators.GT:Dr.operators.LT;r.fail$data((0,Dr._)`${t}.length ${n} ${s}`)}};In.default=Hu;var Nn={},Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});const lo=Yi;lo.code='require("ajv/dist/runtime/equal").default',Ir.default=lo,Object.defineProperty(Nn,"__esModule",{value:!0});const Pn=Ve,Ue=de,Ku=Z,Gu=Ir,Wu={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:r,j:e}})=>(0,Ue.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,Ue._)`{i: ${r}, j: ${e}}`},code(r){const{gen:e,data:t,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=r;if(!s&&!n)return;const l=e.let("valid"),c=a.items?(0,Pn.getSchemaTypes)(a.items):[];r.block$data(l,d,(0,Ue._)`${i} === false`),r.ok(l);function d(){const S=e.let("i",(0,Ue._)`${t}.length`),E=e.let("j");r.setParams({i:S,j:E}),e.assign(l,!0),e.if((0,Ue._)`${S} > 1`,()=>(f()?w:y)(S,E))}function f(){return c.length>0&&!c.some(S=>S==="object"||S==="array")}function w(S,E){const b=e.name("item"),g=(0,Pn.checkDataTypes)(c,b,o.opts.strictNumbers,Pn.DataType.Wrong),T=e.const("indices",(0,Ue._)`{}`);e.for((0,Ue._)`;${S}--;`,()=>{e.let(b,(0,Ue._)`${t}[${S}]`),e.if(g,(0,Ue._)`continue`),c.length>1&&e.if((0,Ue._)`typeof ${b} == "string"`,(0,Ue._)`${b} += "_"`),e.if((0,Ue._)`typeof ${T}[${b}] == "number"`,()=>{e.assign(E,(0,Ue._)`${T}[${b}]`),r.error(),e.assign(l,!1).break()}).code((0,Ue._)`${T}[${b}] = ${S}`)})}function y(S,E){const b=(0,Ku.useFunc)(e,Gu.default),g=e.name("outer");e.label(g).for((0,Ue._)`;${S}--;`,()=>e.for((0,Ue._)`${E} = ${S}; ${E}--;`,()=>e.if((0,Ue._)`${b}(${t}[${S}], ${t}[${E}])`,()=>{r.error(),e.assign(l,!1).break(g)})))}}};Nn.default=Wu;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});const Mn=de,Yu=Z,Xu=Ir,Ju={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:r})=>(0,Mn._)`{allowedValue: ${r}}`},code(r){const{gen:e,data:t,$data:s,schemaCode:n,schema:a}=r;s||a&&typeof a=="object"?r.fail$data((0,Mn._)`!${(0,Yu.useFunc)(e,Xu.default)}(${t}, ${n})`):r.fail((0,Mn._)`${a} !== ${t}`)}};Fn.default=Ju;var jn={};Object.defineProperty(jn,"__esModule",{value:!0});const Nr=de,Zu=Z,Qu=Ir,ec={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,Nr._)`{allowedValues: ${r}}`},code(r){const{gen:e,data:t,$data:s,schema:n,schemaCode:a,it:i}=r;if(!s&&n.length===0)throw new Error("enum must have non-empty array");const o=n.length>=i.opts.loopEnum;let l;const c=()=>l??(l=(0,Zu.useFunc)(e,Qu.default));let d;if(o||s)d=e.let("valid"),r.block$data(d,f);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const y=e.const("vSchema",a);d=(0,Nr.or)(...n.map((S,E)=>w(y,E)))}r.pass(d);function f(){e.assign(d,!1),e.forOf("v",a,y=>e.if((0,Nr._)`${c()}(${t}, ${y})`,()=>e.assign(d,!0).break()))}function w(y,S){const E=n[S];return typeof E=="object"&&E!==null?(0,Nr._)`${c()}(${t}, ${y}[${S}])`:(0,Nr._)`${t} === ${E}`}}};jn.default=ec,Object.defineProperty(En,"__esModule",{value:!0});const tc=kn,rc=wn,sc=Cn,nc=On,ac=An,ic=Dn,oc=In,lc=Nn,uc=Fn,cc=jn,dc=[tc.default,rc.default,sc.default,nc.default,ac.default,ic.default,oc.default,lc.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},uc.default,cc.default];En.default=dc;var xn={},lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.validateAdditionalItems=void 0;const Jt=de,Vn=Z,fc={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,Jt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Jt._)`{limit: ${r}}`},code(r){const{parentSchema:e,it:t}=r,{items:s}=e;if(!Array.isArray(s)){(0,Vn.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}uo(r,s)}};function uo(r,e){const{gen:t,schema:s,data:n,keyword:a,it:i}=r;i.items=!0;const o=t.const("len",(0,Jt._)`${n}.length`);if(s===!1)r.setParams({len:e.length}),r.pass((0,Jt._)`${o} <= ${e.length}`);else if(typeof s=="object"&&!(0,Vn.alwaysValidSchema)(i,s)){const c=t.var("valid",(0,Jt._)`${o} <= ${e.length}`);t.if((0,Jt.not)(c),()=>l(c)),r.ok(c)}function l(c){t.forRange("i",e.length,o,d=>{r.subschema({keyword:a,dataProp:d,dataPropType:Vn.Type.Num},c),i.allErrors||t.if((0,Jt.not)(c),()=>t.break())})}}lr.validateAdditionalItems=uo,lr.default=fc;var Bn={},ur={};Object.defineProperty(ur,"__esModule",{value:!0}),ur.validateTuple=void 0;const co=de,cs=Z,pc=ht(),hc={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){const{schema:e,it:t}=r;if(Array.isArray(e))return fo(r,"additionalItems",e);t.items=!0,!(0,cs.alwaysValidSchema)(t,e)&&r.ok((0,pc.validateArray)(r))}};function fo(r,e,t=r.schema){const{gen:s,parentSchema:n,data:a,keyword:i,it:o}=r;d(n),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=cs.mergeEvaluated.items(s,t.length,o.items));const l=s.name("valid"),c=s.const("len",(0,co._)`${a}.length`);t.forEach((f,w)=>{(0,cs.alwaysValidSchema)(o,f)||(s.if((0,co._)`${c} > ${w}`,()=>r.subschema({keyword:i,schemaProp:w,dataProp:w},l)),r.ok(l))});function d(f){const{opts:w,errSchemaPath:y}=o,S=t.length,E=S===f.minItems&&(S===f.maxItems||f[e]===!1);if(w.strictTuples&&!E){const b=`"${i}" is ${S}-tuple, but minItems or maxItems/${e} are not specified or different at path "${y}"`;(0,cs.checkStrictMode)(o,b,w.strictTuples)}}}ur.validateTuple=fo,ur.default=hc,Object.defineProperty(Bn,"__esModule",{value:!0});const mc=ur,gc={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,mc.validateTuple)(r,"items")};Bn.default=gc;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const po=de,yc=Z,vc=ht(),_c=lr,bc={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:r}})=>(0,po.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,po._)`{limit: ${r}}`},code(r){const{schema:e,parentSchema:t,it:s}=r,{prefixItems:n}=t;s.items=!0,!(0,yc.alwaysValidSchema)(s,e)&&(n?(0,_c.validateAdditionalItems)(r,n):r.ok((0,vc.validateArray)(r)))}};Ln.default=bc;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const ot=de,ds=Z,$c={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:r,max:e}})=>e===void 0?(0,ot.str)`must contain at least ${r} valid item(s)`:(0,ot.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,ot._)`{minContains: ${r}}`:(0,ot._)`{minContains: ${r}, maxContains: ${e}}`},code(r){const{gen:e,schema:t,parentSchema:s,data:n,it:a}=r;let i,o;const{minContains:l,maxContains:c}=s;a.opts.next?(i=l===void 0?1:l,o=c):i=1;const d=e.const("len",(0,ot._)`${n}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,ds.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,ds.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,ds.alwaysValidSchema)(a,t)){let E=(0,ot._)`${d} >= ${i}`;o!==void 0&&(E=(0,ot._)`${E} && ${d} <= ${o}`),r.pass(E);return}a.items=!0;const f=e.name("valid");o===void 0&&i===1?y(f,()=>e.if(f,()=>e.break())):i===0?(e.let(f,!0),o!==void 0&&e.if((0,ot._)`${n}.length > 0`,w)):(e.let(f,!1),w()),r.result(f,()=>r.reset());function w(){const E=e.name("_valid"),b=e.let("count",0);y(E,()=>e.if(E,()=>S(b)))}function y(E,b){e.forRange("i",0,d,g=>{r.subschema({keyword:"contains",dataProp:g,dataPropType:ds.Type.Num,compositeRule:!0},E),b()})}function S(E){e.code((0,ot._)`${E}++`),o===void 0?e.if((0,ot._)`${E} >= ${i}`,()=>e.assign(f,!0).break()):(e.if((0,ot._)`${E} > ${o}`,()=>e.assign(f,!1).break()),i===1?e.assign(f,!0):e.if((0,ot._)`${E} >= ${i}`,()=>e.assign(f,!0)))}}};Rn.default=$c;var ho={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.validateSchemaDeps=r.validatePropertyDeps=r.error=void 0;const e=de,t=Z,s=ht();r.error={message:({params:{property:l,depsCount:c,deps:d}})=>{const f=c===1?"property":"properties";return(0,e.str)`must have ${f} ${d} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:d,missingProperty:f}})=>(0,e._)`{property: ${l},
|
|
25
|
-
missingProperty: ${
|
|
19
|
+
*/var Ms,ka;function wl(){if(ka)return Ms;ka=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function s(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function n(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Ms=n()?Object.assign:function(a,i){for(var o,u=s(a),c,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var p in o)e.call(o,p)&&(u[p]=o[p]);if(t){c=t(o);for(var T=0;T<c.length;T++)r.call(o,c[T])&&(u[c[T]]=o[c[T]])}}return u},Ms}var js,wa;function xs(){if(wa)return js;wa=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return js=t,js}var Vs,Ca;function Ta(){return Ca||(Ca=1,Vs=Function.call.bind(Object.prototype.hasOwnProperty)),Vs}var Bs,Oa;function Cl(){if(Oa)return Bs;Oa=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=xs(),r={},s=Ta();t=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(a,i,o,u,c){if(process.env.NODE_ENV!=="production"){for(var d in a)if(s(a,d)){var p;try{if(typeof a[d]!="function"){var T=Error((u||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}p=a[d](i,d,u,o,null,e)}catch(k){p=k}if(p&&!(p instanceof Error)&&t((u||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var S=c?c():"";t("Failed "+o+" type: "+p.message+(S??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Bs=n,Bs}var Ls,Aa;function Tl(){if(Aa)return Ls;Aa=1;var t=Ea(),e=wl(),r=xs(),s=Ta(),n=Cl(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Ls=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function p(A){var y=A&&(c&&A[c]||A[d]);if(typeof y=="function")return y}var T="<<anonymous>>",S={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:I(),arrayOf:N,element:D(),elementType:b(),instanceOf:R,node:ce(),objectOf:Q,oneOf:L,oneOfType:K,shape:G,exact:ne};function k(A,y){return A===y?A!==0||1/A===1/y:A!==A&&y!==y}function E(A,y){this.message=A,this.data=y&&typeof y=="object"?y:{},this.stack=""}E.prototype=Error.prototype;function _(A){if(process.env.NODE_ENV!=="production")var y={},M=0;function O(f,v,P,V,B,z,te){if(V=V||T,z=z||P,te!==r){if(u){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var pe=V+":"+P;!y[pe]&&M<3&&(a("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),y[pe]=!0,M++)}}return v[P]==null?f?v[P]===null?new E("The "+B+" `"+z+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new E("The "+B+" `"+z+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:A(v,P,V,B,z)}var l=O.bind(null,!1);return l.isRequired=O.bind(null,!0),l}function g(A){function y(M,O,l,f,v,P){var V=M[O],B=me(V);if(B!==A){var z=_e(V);return new E("Invalid "+f+" `"+v+"` of type "+("`"+z+"` supplied to `"+l+"`, expected ")+("`"+A+"`."),{expectedType:A})}return null}return _(y)}function I(){return _(i)}function N(A){function y(M,O,l,f,v){if(typeof A!="function")return new E("Property `"+v+"` of component `"+l+"` has invalid PropType notation inside arrayOf.");var P=M[O];if(!Array.isArray(P)){var V=me(P);return new E("Invalid "+f+" `"+v+"` of type "+("`"+V+"` supplied to `"+l+"`, expected an array."))}for(var B=0;B<P.length;B++){var z=A(P,B,l,f,v+"["+B+"]",r);if(z instanceof Error)return z}return null}return _(y)}function D(){function A(y,M,O,l,f){var v=y[M];if(!o(v)){var P=me(v);return new E("Invalid "+l+" `"+f+"` of type "+("`"+P+"` supplied to `"+O+"`, expected a single ReactElement."))}return null}return _(A)}function b(){function A(y,M,O,l,f){var v=y[M];if(!t.isValidElementType(v)){var P=me(v);return new E("Invalid "+l+" `"+f+"` of type "+("`"+P+"` supplied to `"+O+"`, expected a single ReactElement type."))}return null}return _(A)}function R(A){function y(M,O,l,f,v){if(!(M[O]instanceof A)){var P=A.name||T,V=Fe(M[O]);return new E("Invalid "+f+" `"+v+"` of type "+("`"+V+"` supplied to `"+l+"`, expected ")+("instance of `"+P+"`."))}return null}return _(y)}function L(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function y(M,O,l,f,v){for(var P=M[O],V=0;V<A.length;V++)if(k(P,A[V]))return null;var B=JSON.stringify(A,function(te,q){var pe=_e(q);return pe==="symbol"?String(q):q});return new E("Invalid "+f+" `"+v+"` of value `"+String(P)+"` "+("supplied to `"+l+"`, expected one of "+B+"."))}return _(y)}function Q(A){function y(M,O,l,f,v){if(typeof A!="function")return new E("Property `"+v+"` of component `"+l+"` has invalid PropType notation inside objectOf.");var P=M[O],V=me(P);if(V!=="object")return new E("Invalid "+f+" `"+v+"` of type "+("`"+V+"` supplied to `"+l+"`, expected an object."));for(var B in P)if(s(P,B)){var z=A(P,B,l,f,v+"."+B,r);if(z instanceof Error)return z}return null}return _(y)}function K(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var y=0;y<A.length;y++){var M=A[y];if(typeof M!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(M)+" at index "+y+"."),i}function O(l,f,v,P,V){for(var B=[],z=0;z<A.length;z++){var te=A[z],q=te(l,f,v,P,V,r);if(q==null)return null;q.data&&s(q.data,"expectedType")&&B.push(q.data.expectedType)}var pe=B.length>0?", expected one of type ["+B.join(", ")+"]":"";return new E("Invalid "+P+" `"+V+"` supplied to "+("`"+v+"`"+pe+"."))}return _(O)}function ce(){function A(y,M,O,l,f){return W(y[M])?null:new E("Invalid "+l+" `"+f+"` supplied to "+("`"+O+"`, expected a ReactNode."))}return _(A)}function U(A,y,M,O,l){return new E((A||"React class")+": "+y+" type `"+M+"."+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+l+"`.")}function G(A){function y(M,O,l,f,v){var P=M[O],V=me(P);if(V!=="object")return new E("Invalid "+f+" `"+v+"` of type `"+V+"` "+("supplied to `"+l+"`, expected `object`."));for(var B in A){var z=A[B];if(typeof z!="function")return U(l,f,v,B,_e(z));var te=z(P,B,l,f,v+"."+B,r);if(te)return te}return null}return _(y)}function ne(A){function y(M,O,l,f,v){var P=M[O],V=me(P);if(V!=="object")return new E("Invalid "+f+" `"+v+"` of type `"+V+"` "+("supplied to `"+l+"`, expected `object`."));var B=e({},M[O],A);for(var z in B){var te=A[z];if(s(A,z)&&typeof te!="function")return U(l,f,v,z,_e(te));if(!te)return new E("Invalid "+f+" `"+v+"` key `"+z+"` supplied to `"+l+"`.\nBad object: "+JSON.stringify(M[O],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var q=te(P,z,l,f,v+"."+z,r);if(q)return q}return null}return _(y)}function W(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(W);if(A===null||o(A))return!0;var y=p(A);if(y){var M=y.call(A),O;if(y!==A.entries){for(;!(O=M.next()).done;)if(!W(O.value))return!1}else for(;!(O=M.next()).done;){var l=O.value;if(l&&!W(l[1]))return!1}}else return!1;return!0;default:return!1}}function he(A,y){return A==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function me(A){var y=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":he(y,A)?"symbol":y}function _e(A){if(typeof A>"u"||A===null)return""+A;var y=me(A);if(y==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return y}function Ie(A){var y=_e(A);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function Fe(A){return!A.constructor||!A.constructor.name?T:A.constructor.name}return S.checkPropTypes=n,S.resetWarningCache=n.resetWarningCache,S.PropTypes=S,S},Ls}var Rs,Da;function Ol(){if(Da)return Rs;Da=1;var t=xs();function e(){}function r(){}return r.resetWarningCache=e,Rs=function(){function s(i,o,u,c,d,p){if(p!==t){var T=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw T.name="Invariant Violation",T}}s.isRequired=s;function n(){return s}var a={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:n,element:s,elementType:s,instanceOf:n,node:s,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return a.PropTypes=a,a},Rs}if(process.env.NODE_ENV!=="production"){var Al=Ea(),Dl=!0;Fs.exports=Tl()(Al.isElement,Dl)}else Fs.exports=Ol()();var Il=Fs.exports;const h=Ps(Il),Ia={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},Na={Solid:"solid",Outline:"outline",Text:"text"},Pa={Large:"lg",Medium:"md",Small:"sm"},Fa={Right:"right",Left:"left"},ve={name:"Button",class:"ds-button",props:{color:{type:String,default:Ia.Primary,options:Object.values(Ia)},variant:{type:String,default:Na.Solid,options:Object.values(Na)},size:{type:String,default:Pa.Medium,options:Object.values(Pa)},elevation:{type:Number,options:[1,2,3,4]},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},iconFill:{type:Boolean,default:!0},iconPosition:{type:String,default:Fa.Right,options:Object.values(Fa)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}},Ma={Primary:"primary",PrimaryLightest:"primary-lightest",PrimaryLighter:"primary-lighter",PrimaryLight:"primary-light",PrimaryDark:"primary-dark",PrimaryDarker:"primary-darker",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",Secondary:"secondary",SecondaryLightest:"secondary-lightest",SecondaryLighter:"secondary-lighter",SecondaryLight:"secondary-light",SecondaryDark:"secondary-dark",SecondaryDarker:"secondary-darker",Success:"success",SuccessLighter:"success-lighter",SuccessLight:"success-light",SuccessDark:"success-dark",Warning:"warning",WarningLighter:"warning-lighter",WarningLight:"warning-light",WarningDark:"warning-dark",Danger:"danger",DangerLighter:"danger-lighter",DangerLight:"danger-light",DangerDark:"danger-dark",Info:"info",InfoLighter:"info-lighter",InfoLight:"info-light",InfoDark:"info-dark"},ja={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},xa={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},Va={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},We={name:"Icon",class:"ds-icon",props:{color:{type:String,default:Ma.Neutral90,options:Object.values(Ma)},image:{type:String,default:"settings"},variation:{type:String,default:ja.Outlined,options:Object.values(ja)},size:{type:String,default:xa.MD,options:Object.values(xa)},fontVariationSettings:{type:Object,default:{fill:0,grad:0,weight:500,opticalSize:48}},fill:{type:Boolean,default:!1},testId:{type:String,default:"ds-icon-test"},weight:{type:String,default:Va.Semibold,options:Object.values(Va)},onClick:{type:Function,default:()=>({})}}};var Ba=(t=>(t[t.bold=700]="bold",t[t.semibold=600]="semibold",t[t.medium=500]="medium",t[t.regular=400]="regular",t[t.light=300]="light",t[t.extralight=200]="extralight",t))(Ba||{});const Ee=({image:t=We.props.image.default,color:e=We.props.color.default,className:r,size:s=We.props.size.default,fill:n=We.props.fill.default,weight:a=We.props.weight.default,testId:i=We.props.testId.default,onClick:o=We.props.onClick.default})=>{const u="material-symbols-rounded",c=e&&We.props.color.options.find(p=>p===e)&&`${We.class}__color--${e}`,d=F.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Ba[a]}, 'opsz' 48`}),[a,n]);return w.jsx("i",{className:[`${We.class}--${s}`,We.class,u,c,r&&r].filter(p=>p).join(" "),"data-testid":i,onClick:o,style:d,translate:"no",children:t})};Ee.propTypes={color:h.oneOf(We.props.color.options),image:h.string,fontVariationSettings:h.object,size:h.oneOf(We.props.size.options),fill:h.bool,weight:h.oneOf(We.props.weight.options),onClick:h.func},Ee.displayName="DsIcon";const Sr=({children:t,className:e,onClick:r,size:s=ve.props.size.default,disabled:n=ve.props.disabled.default,icon:a=ve.props.icon.default,id:i=ve.props.id.default,testId:o=ve.props.testId.default,elevation:u,variant:c=ve.props.variant.default,color:d=ve.props.color.default,iconFill:p=ve.props.iconFill.default,iconPosition:T=ve.props.iconPosition.default,fullSize:S=ve.props.fullSize.default})=>{const k=s&&ve.props.size.options.find(R=>R===s)?`${ve.class}--${s}`:`${ve.class}__${ve.props.size.default}`,E=n&&`${ve.class}--disabled`,_=`${ve.class}__${d}--${c}`,g=u&&`${ve.class}--elevation-${u}`,I=a&&`${ve.class}--with-icon`,N=S?`${ve.class}--full-size`:"",D=T==="right"?`${ve.class}__icon`:`${ve.class}__icon--left`,b=T==="right"?`${ve.class}__text`:`${ve.class}__text--reversed`;return w.jsx("button",{className:[ve.class,N,E,I,k,_,g,I,e&&e].filter(R=>R).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:r,children:w.jsxs("span",{className:["ds-button__text",b].join(" "),children:[t,a&&w.jsx(Ee,{className:["ds-button__icon",D].join(" "),fill:p,image:a,size:s})]})})};Sr.propTypes={color:h.oneOf(ve.props.color.options),variant:h.oneOf(ve.props.variant.options),size:h.oneOf(ve.props.size.options),disabled:h.bool,icon:h.string,iconFill:h.bool,iconPosition:h.oneOf(ve.props.iconPosition.options),testId:h.string,id:h.string,fullSize:h.bool},Sr.displayName="DsButton";const Nl={name:"Caption",class:"ds-caption"},zs=({children:t,className:e,testId:r="ds-caption-test"})=>w.jsx("p",{className:[Nl.class,e&&e].filter(s=>s).join(" "),"data-testid":r,children:t});zs.propTypes={children:h.node.isRequired,className:h.string,testId:h.string},zs.displayName="DsCaption";const Wr={None:"",PrimaryDarker:"primary-darker",PrimaryDark:"primary-dark",Primary:"primary",PrimaryLight:"primary-light",PrimaryLighter:"primary-lighter",PrimaryLightest:"primary-lightest",SecondaryDarker:"secondary-darker",SecondaryDark:"secondary-dark",Secondary:"secondary",SecondaryLight:"secondary-light",SecondaryLighter:"secondary-lighter",SecondaryLightest:"secondary-lightest",Neutral90:"neutral-90",Neutral80:"neutral-80",Neutral60:"neutral-60",Neutral40:"neutral-40",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00",SuccessDark:"success-dark",Success:"success",SuccessLight:"success-light",SuccessLighter:"success-lighter",WarningDark:"warning-dark",Warning:"warning",WarningLight:"warning-light",WarningLighter:"warning-lighter",DangerDark:"danger-dark",Danger:"danger",DangerLight:"danger-light",DangerLighter:"danger-lighter",InfoDark:"info-dark",Info:"info",InfoLight:"info-light",InfoLighter:"info-lighter"},ot={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Wr.None,options:Object.values(Wr)},borderColor:{type:String,default:Wr.None,options:Object.values(Wr)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},qs=({id:t,testId:e=ot.props.testId.default,children:r,className:s,elevation:n=ot.props.elevation.default,backgroundColor:a=ot.props.backgroundColor.default,borderColor:i=ot.props.borderColor.default})=>{const o=n&&`${ot.class}--elevation-${n}`,u=i&&`${ot.class}--border-${i}`,c=a&&`${ot.class}--${a}`;return w.jsx("div",{className:[ot.class,s,o,u,c].filter(d=>d).join(" "),"data-testid":e,id:t,children:r})};qs.propTypes={id:h.string,testId:h.string,backgroundColor:h.oneOf(ot.props.backgroundColor.options),borderColor:h.oneOf(ot.props.borderColor.options),elevation:h.oneOf(ot.props.elevation.options)},qs.displayName="DsCard";const Ye={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:""},label:{type:String,default:""},description:{type:String,default:""},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},changeByChecked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Us=F.forwardRef(({id:t,className:e,name:r,testId:s=r||"ds-checkbox-test",label:n=Ye.props.label.default,description:a=Ye.props.description.default,checked:i=Ye.props.checked.default,disabled:o=Ye.props.checked.default,changeByChecked:u=Ye.props.changeByChecked.default,onChangeHandler:c},d)=>{const p=u||!1,T=i||!1,[S,k]=F.useState(T),E={image:S?"check_box":"check_box_outline_blank",class:S?`${Ye.class}__icon--checked`:`${Ye.class}__icon--unchecked`},_=o&&`${Ye.class}--disabled`,g=I=>{o||(k(N=>!N),c&&c(I))};return F.useEffect(()=>{p&&k(i)},[i,p]),w.jsxs("label",{className:[Ye.class,_,e&&e].join(" "),htmlFor:t||r,children:[w.jsx("input",{checked:S,className:`${Ye.class}__input`,"data-testid":s,id:t||r,name:r,onChange:g,ref:d,type:"checkbox"}),w.jsx(Ee,{className:`${Ye.class}__icon ${E.class}`,"data-testid":`${s}-icon`,fill:!0,image:E.image,size:"xxl"}),(a||n)&&w.jsxs("div",{className:`${Ye.class}__label`,children:[n&&w.jsx("label",{className:`${Ye.class}__label-title`,htmlFor:t||r,children:n}),a&&w.jsx("label",{className:`${Ye.class}__label-description`,htmlFor:t||r,children:a})]})]})});Us.propTypes={label:h.oneOfType([h.string,h.node]),name:h.string,className:h.string,testId:h.string,description:h.oneOfType([h.string,h.node]),checked:h.bool,disabled:h.bool},Us.displayName="DsCheckbox";const La={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},Er={name:"Heading",class:"ds-heading",props:{type:{type:String,default:La.Heading1,options:Object.values(La)}}},Hs=({children:t,testId:e="ds-heading-test",type:r=Er.props.type.default,className:s})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},a=Er.props.type.options.find(u=>u===r)&&`${Er.class}--${r}`,o=n[r];return w.jsx(o,{className:[Er.class,a,s&&s].filter(u=>u).join(" "),"data-testid":e,children:t})};Hs.propTypes={className:h.string,testId:h.string,type:h.oneOf(Er.props.type.options)},Hs.displayName="DsHeading";const Ra={None:"",Dashed:"dashed",Dotted:"dotted"},za={None:"",Small:"small",Large:"large"},zt={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:Ra.None,options:Object.values(Ra)},size:{type:String,default:za.None,options:Object.values(za)}}};function qa(t,e,r){const s=r.props[t];return s.options&&s.options.some(n=>n===e)?`${r.class}--${e}`:""}const Ks=({size:t=zt.props.size.default,borderStyle:e=zt.props.borderStyle.default})=>{const r=qa("size",t,zt),s=qa("borderStyle",e,zt);return w.jsx("hr",{className:`${zt.class} ${r} ${s}`.trim()})};Ks.propTypes={size:h.oneOf(zt.props.size.options),borderStyle:h.oneOf(zt.props.borderStyle.options)},Ks.displayName="DsHR";function Mt(t){return typeof t=="string"||t instanceof String}function Ua(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ha(t,e){return Array.isArray(e)?Ha(t,(r,s)=>e.includes(s)):Object.entries(t).reduce((r,s)=>{let[n,a]=s;return e(a,n)&&(r[n]=a),r},{})}const X={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Pl(t){switch(t){case X.LEFT:return X.FORCE_LEFT;case X.RIGHT:return X.FORCE_RIGHT;default:return t}}function Gs(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Yr(t,e){if(e===t)return!0;const r=Array.isArray(e),s=Array.isArray(t);let n;if(r&&s){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!Yr(e[n],t[n]))return!1;return!0}if(r!=s)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const a=e instanceof Date,i=t instanceof Date;if(a&&i)return e.getTime()==t.getTime();if(a!=i)return!1;const o=e instanceof RegExp,u=t instanceof RegExp;if(o&&u)return e.toString()==t.toString();if(o!=u)return!1;const c=Object.keys(e);for(n=0;n<c.length;n++)if(!Object.prototype.hasOwnProperty.call(t,c[n]))return!1;for(n=0;n<c.length;n++)if(!Yr(t[c[n]],e[c[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Fl{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?X.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?X.RIGHT:X.LEFT}}function re(t,e){return new re.InputMask(t,e)}function Ka(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?re.MaskedRegExp:Mt(t)?re.MaskedPattern:t===Date?re.MaskedDate:t===Number?re.MaskedNumber:Array.isArray(t)||t===Array?re.MaskedDynamic:re.Masked&&t.prototype instanceof re.Masked?t:re.Masked&&t instanceof re.Masked?t.constructor:t instanceof Function?re.MaskedFunction:(console.warn("Mask not found for mask",t),re.Masked)}function kr(t){if(!t)throw new Error("Options in not defined");if(re.Masked){if(t.prototype instanceof re.Masked)return{mask:t};const{mask:e=void 0,...r}=t instanceof re.Masked?{mask:t}:Ua(t)&&t.mask instanceof re.Masked?t:{};if(e){const s=e.mask;return{...Ha(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...r}}}return Ua(t)?{...t}:{mask:t}}function wt(t){if(re.Masked&&t instanceof re.Masked)return t;const e=kr(t),r=Ka(e.mask);if(!r)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===r&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new r(e)}re.createMask=wt;class Ws{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,r){if(!(e==null||r==null||e===this.selectionStart&&r===this.selectionEnd))try{this._unsafeSelect(e,r)}catch{}}get isActive(){return!1}}re.MaskElement=Ws;const Ga=90,Ml=89;class Xr extends Ws{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,r,s;return(e=(r=(s=this.input).getRootNode)==null?void 0:r.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Ga&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Ml&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Ga&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}re.HTMLMaskElement=Xr;class jl extends Xr{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,r){this.input.setSelectionRange(e,r)}get value(){return this.input.value}set value(e){this.input.value=e}}re.HTMLMaskElement=Xr;class Wa extends Xr{get _unsafeSelectionStart(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s<n?s:n}get _unsafeSelectionEnd(){const e=this.rootElement,r=e.getSelection&&e.getSelection(),s=r&&r.anchorOffset,n=r&&r.focusOffset;return n==null||s==null||s>n?s:n}_unsafeSelect(e,r){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,r);const n=this.rootElement,a=n.getSelection&&n.getSelection();a&&(a.removeAllRanges(),a.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}re.HTMLContenteditableMaskElement=Wa;class Jr{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Jr.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Jr.MAX_LENGTH=100;class xl{constructor(e,r){this.el=e instanceof Ws?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Wa(e):new jl(e),this.masked=wt(r),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Jr,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var r;return e==null||((r=this.masked)==null?void 0:r.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof re.Masked)&&this.masked.constructor===Ka(e)){this.masked.updateOptions({mask:e});return}const r=e instanceof re.Masked?e:wt({mask:e});r.unmaskedValue=this.masked.unmaskedValue,this.masked=r}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,r){const s=this._listeners[e];s&&s.forEach(n=>n(r))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const r=this.masked.unmaskedValue,s=this.masked.value,n=this.masked.rawInputValue,a=this.displayValue,i=this.unmaskedValue!==r||this.value!==s||this._rawInputValue!==n;this._unmaskedValue=r,this._value=s,this._rawInputValue=n,this.el.value!==a&&(this.el.value=a),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:r,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:r,...s}=e,n=!this.maskEquals(r),a=this.masked.optionsIsChanged(s);n&&(this.mask=r),a&&this.masked.updateOptions(s),(n||a)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,X.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,r){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(r),this}off(e,r){if(!this._listeners[e])return this;if(!r)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(r);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const r=new Fl({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,n=this.masked.splice(r.startChangePos,r.removed.length,r.inserted,r.removeDirection,{input:!0,raw:!0}).offset,a=s===this.masked.rawInputValue?r.removeDirection:X.NONE;let i=this.masked.nearestInputPos(r.startChangePos+n,a);a!==X.NONE&&(i=this.masked.nearestInputPos(i,X.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}re.InputMask=xl;class oe{static normalize(e){return Array.isArray(e)?e:[e,new oe]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}re.ChangeDetails=oe;class mt{constructor(e,r,s){e===void 0&&(e=""),r===void 0&&(r=0),this.value=e,this.from=r,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const r=this.value[0];return this.value=this.value.slice(1),r}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ze{constructor(e){this._value="",this._update({...ze.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,r){r===void 0&&(r={input:!0}),this.reset(),this.append(e,r,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,r){return e}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),Math.min(this.displayValue.length,r-e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this.displayValue.slice(e,r)}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new mt(this.extractInput(e,r),e)}appendTail(e){return Mt(e)&&(e=new mt(String(e))),e.appendTo(this)}_appendCharRaw(e,r){return e?(this._value+=e,new oe({inserted:e,rawInserted:e})):new oe}_appendChar(e,r,s){r===void 0&&(r={});const n=this.state;let a;if([e,a]=this.doPrepareChar(e,r),e&&(a=a.aggregate(this._appendCharRaw(e,r)),!a.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(r);const u=this._appendCharRaw(e,r);o=o.aggregate(u),u.rawInserted||o.equals(a)?a=o:this.state=i}if(a.inserted){let i,o=this.doValidate(r)!==!1;if(o&&s!=null){const u=this.state;if(this.overwrite===!0){i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.unshift(this.displayValue.length-a.tailShift)}let c=this.appendTail(s);if(o=c.rawInserted.length===s.toString().length,!(o&&c.inserted)&&this.overwrite==="shift"){this.state=u,i=s.state;for(let d=0;d<a.rawInserted.length;++d)s.shift();c=this.appendTail(s),o=c.rawInserted.length===s.toString().length}o&&c.inserted&&(this.state=u)}o||(a=new oe,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new oe}_appendEager(){return new oe}append(e,r,s){if(!Mt(e))throw new Error("value should be string");const n=Mt(s)?new mt(String(s)):s;r!=null&&r.tail&&(r._beforeTailState=this.state);let a;[e,a]=this.doPrepare(e,r);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],r,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],r,n))break;a.aggregate(o)}return(this.eager===!0||this.eager==="append")&&r!=null&&r.input&&e&&a.aggregate(this._appendEager()),n!=null&&(a.tailShift+=this.appendTail(n).tailShift),a}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(r),new oe}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const r=this.rawInputValue,s=this.value,n=e();return this.rawInputValue=r,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const r=this.state,s=e(this);return this.state=r,delete this._isolated,s}doSkipInvalid(e,r,s){return!!this.skipInvalid}doPrepare(e,r){return r===void 0&&(r={}),oe.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),oe.normalize(this.prepareChar?this.prepareChar(e,this,r):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,r,s,n,a){s===void 0&&(s=""),n===void 0&&(n=X.NONE),a===void 0&&(a={input:!0});const i=e+r,o=this.extractTail(i),u=this.eager===!0||this.eager==="remove";let c;u&&(n=Pl(n),c=this.extractInput(0,i,{raw:!0}));let d=e;const p=new oe;if(n!==X.NONE&&(d=this.nearestInputPos(e,r>1&&e!==0&&!u?X.NONE:n),p.tailShift=d-e),p.aggregate(this.remove(d)),u&&n!==X.NONE&&c===this.rawInputValue)if(n===X.FORCE_LEFT){let T;for(;c===this.rawInputValue&&(T=this.displayValue.length);)p.aggregate(new oe({tailShift:-1})).aggregate(this.remove(T-1))}else n===X.FORCE_RIGHT&&o.unshift();return p.aggregate(this.append(s,a,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Yr(this,e)}typedValueEquals(e){const r=this.typedValue;return e===r||ze.EMPTY_VALUES.includes(e)&&ze.EMPTY_VALUES.includes(r)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new oe}}ze.DEFAULTS={skipInvalid:!0},ze.EMPTY_VALUES=[void 0,null,""],re.Masked=ze;class qt{constructor(e,r){e===void 0&&(e=[]),r===void 0&&(r=0),this.chunks=e,this.from=r}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Mt(e)?new mt(String(e)):e;const r=this.chunks[this.chunks.length-1],s=r&&(r.stop===e.stop||e.stop==null)&&e.from===r.from+r.toString().length;if(e instanceof mt)s?r.extend(e.toString()):this.chunks.push(e);else if(e instanceof qt){if(e.stop==null){let n;for(;e.chunks.length&&e.chunks[0].stop==null;)n=e.chunks.shift(),n.from+=e.from,this.extend(n)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof re.MaskedPattern))return new mt(this.toString()).appendTo(e);const r=new oe;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!a||a.index<=i)&&((n instanceof qt||e._stops.indexOf(i)>=0)&&r.aggregate(e._appendPlaceholder(i)),o=n instanceof qt&&e._blocks[i]),o){const u=o.appendTail(n);r.aggregate(u);const c=n.toString().slice(u.rawInserted.length);c&&r.aggregate(e.append(c,{tail:!0}))}else r.aggregate(e.append(n.toString(),{tail:!0}))}return r}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:r,...s}=e;Object.assign(this,s),this.chunks=r.map(n=>{const a="chunks"in n?new qt:new mt;return a.state=n,a})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const r=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const n=this.chunks[s],a=n.unshift(r);if(n.toString()){if(!a)break;++s}else this.chunks.splice(s,1);if(a)return a}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const r=this.chunks[e],s=r.shift();if(r.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class Vl{constructor(e,r){this.masked=e,this._log=[];const{offset:s,index:n}=e._mapPosToBlock(r)||(r<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=n,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((r=this.block)==null?void 0:r.displayValue.length)||0){var r;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,X.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,X.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,X.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,X.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,X.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,X.NONE),!0})}}class Ya{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(r),this._value||(this._isRawInput=!1),new oe}nearestInputPos(e,r){r===void 0&&(r=X.NONE);const s=0,n=this._value.length;switch(r){case X.LEFT:case X.FORCE_LEFT:return s;case X.NONE:case X.RIGHT:case X.FORCE_RIGHT:default:return n}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),this._isRawInput?r-e:0}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,r)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new oe;const s=this.eager===!0||this.eager==="append",a=this.char===e&&(this.isUnmasking||r.input||r.raw)&&(!r.raw||!s)&&!r.tail,i=new oe({inserted:this.char,rawInserted:a?this.char:""});return this._value=this.char,this._isRawInput=a&&(r.raw||r.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new oe;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new mt("")}appendTail(e){return Mt(e)&&(e=new mt(String(e))),e.appendTo(this)}append(e,r,s){const n=this._appendChar(e[0],r);return s!=null&&(n.tailShift+=this.appendTail(s).tailShift),n}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class Zr{constructor(e){const{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o,...u}=e;this.masked=wt(u),Object.assign(this,{parent:r,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),e===0&&r>=1?(this.isFilled=!1,this.masked.remove(e,r)):new oe}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,r){if(r===void 0&&(r={}),this.isFilled)return new oe;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new oe,this.masked.state=s),!n.inserted&&!this.isOptional&&!this.lazy&&!r.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,r,s){return this.masked.append(e,this.currentMaskFlags(r),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new oe:(this.isFilled=!0,new oe({inserted:this.placeholderChar}))}_appendEager(){return new oe}extractTail(e,r){return this.masked.extractTail(e,r)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.masked.extractInput(e,r,s)}nearestInputPos(e,r){r===void 0&&(r=X.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(r){case X.LEFT:case X.FORCE_LEFT:return this.isComplete?a:s;case X.RIGHT:case X.FORCE_RIGHT:return this.isComplete?a:n;case X.NONE:default:return a}}totalInputPositions(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.value.length),this.value.slice(e,r).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var r;return{...e,_beforeTailState:(e==null||(r=e._beforeTailState)==null?void 0:r.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new oe}}Zr.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class Bl extends ze{updateOptions(e){super.updateOptions(e)}_update(e){const r=e.mask;r&&(e.validate=s=>s.search(r)>=0),super._update(e)}}re.MaskedRegExp=Bl;class qe extends ze{constructor(e){super({...qe.DEFAULTS,...e,definitions:Object.assign({},Zr.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const r=this.mask;if(!r||!e)return;let s=!1,n=!1;for(let a=0;a<r.length;++a){if(this.blocks){const c=r.slice(a),d=Object.keys(this.blocks).filter(T=>c.indexOf(T)===0);d.sort((T,S)=>S.length-T.length);const p=d[0];if(p){const{expose:T,repeat:S,...k}=kr(this.blocks[p]),E={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...k,repeat:S,parent:this},_=S!=null?new re.RepeatBlock(E):wt(E);_&&(this._blocks.push(_),T&&(this.exposeBlock=_),this._maskedBlocks[p]||(this._maskedBlocks[p]=[]),this._maskedBlocks[p].push(this._blocks.length-1)),a+=p.length-1;continue}}let i=r[a],o=i in e;if(i===qe.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===qe.ESCAPE_CHAR){if(++a,i=r[a],!i)break;o=!1}const u=o?new Zr({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...kr(e[i]),parent:this}):new Ya({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(u)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:r,...s}=e;this._blocks.forEach((n,a)=>n.state=r[a]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,r)=>e+=r.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(r),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,r)=>e+=r.value,"")}set value(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(r),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const r=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(r),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,r)=>e+=r.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const r=new oe;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return r;this._blocks[s].isFilled&&++s;for(let n=s;n<this._blocks.length;++n){const a=this._blocks[n]._appendEager();if(!a.inserted)break;r.aggregate(a)}return r}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._mapPosToBlock(this.displayValue.length),n=new oe;if(!s)return n;for(let i=s.index,o;o=this._blocks[i];++i){var a;const u=o._appendChar(e,{...r,_beforeTailState:(a=r._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(u),u.consumed)break}return n}extractTail(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=new qt;return e===r||this._forEachBlocksInRange(e,r,(n,a,i,o)=>{const u=n.extractTail(i,o);u.stop=this._findStopBefore(a),u.from=this._blockStartPos(a),u instanceof qt&&(u.blockIndex=a),s.extend(u)}),s}extractInput(e,r,s){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),s===void 0&&(s={}),e===r)return"";let n="";return this._forEachBlocksInRange(e,r,(a,i,o,u)=>{n+=a.extractInput(o,u,s)}),n}_findStopBefore(e){let r;for(let s=0;s<this._stops.length;++s){const n=this._stops[s];if(n<=e)r=n;else break}return r}_appendPlaceholder(e){const r=new oe;if(this.lazy&&e==null)return r;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return r;const n=s.index,a=e??this._blocks.length;return this._blocks.slice(n,a).forEach(i=>{if(!i.lazy||e!=null){var o;r.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),r}_mapPosToBlock(e){let r="";for(let s=0;s<this._blocks.length;++s){const n=this._blocks[s],a=r.length;if(r+=n.displayValue,e<=r.length)return{index:s,offset:e-a}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((r,s)=>r+=s.displayValue.length,0)}_forEachBlocksInRange(e,r,s){r===void 0&&(r=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const a=this._mapPosToBlock(r),i=a&&n.index===a.index,o=n.offset,u=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,o,u),a&&!i){for(let c=n.index+1;c<a.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[a.index],a.index,0,a.offset)}}}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s.aggregate(n.remove(i,o))}),s}nearestInputPos(e,r){if(r===void 0&&(r=X.NONE),!this._blocks.length)return 0;const s=new Vl(this,e);if(r===X.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(r===X.LEFT||r===X.FORCE_LEFT){if(r===X.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),r===X.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:r===X.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return r===X.RIGHT||r===X.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:r===X.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,X.LEFT))):e}totalInputPositions(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,r,(n,a,i,o)=>{s+=n.totalInputPositions(i,o)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const r=this._maskedBlocks[e];return r?r.map(s=>this._blocks[s]):[]}pad(e){const r=new oe;return this._forEachBlocksInRange(0,this.displayValue.length,s=>r.aggregate(s.pad(e))),r}}qe.DEFAULTS={...ze.DEFAULTS,lazy:!0,placeholderChar:"_"},qe.STOP_CHAR="`",qe.ESCAPE_CHAR="\\",qe.InputDefinition=Zr,qe.FixedDefinition=Ya,re.MaskedPattern=qe;class Qr extends qe{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:r=this.to||0,from:s=this.from||0,maxLength:n=this.maxLength||0,autofix:a=this.autofix,...i}=e;this.to=r,this.from=s,this.maxLength=Math.max(String(r).length,n),this.autofix=a;const o=String(this.from).padStart(this.maxLength,"0"),u=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<u.length&&u[c]===o[c];)++c;i.mask=u.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(i)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let r="",s="";const[,n,a]=e.match(/^(\D*)(\d*)(\D*)/)||[];return a&&(r="0".repeat(n.length)+a,s="9".repeat(n.length)+a),r=r.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[r,s]}doPrepareChar(e,r){r===void 0&&(r={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),r),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,r){if(r===void 0&&(r={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,r);const s=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[a,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(s[this.value.length],r):Number(a)>this.to?!r.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],r).aggregate(this._appendCharRaw(e,r)):super._appendCharRaw(n[this.value.length],r):super._appendCharRaw(e,r)}doValidate(e){const r=this.value;if(r.search(/[^0]/)===-1&&r.length<=this._matchFrom)return!0;const[n,a]=this.boundaries(r);return this.from<=Number(a)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const r=new oe;if(this.value.length===this.maxLength)return r;const s=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let a=0;a<n;++a)r.aggregate(super._appendCharRaw("0",e));s.split("").forEach(a=>this._appendCharRaw(a))}return r}}re.MaskedRange=Qr;class Ct extends qe{static extractPatternOptions(e){const{mask:r,pattern:s,...n}=e;return{...n,mask:Mt(r)?r:s}}constructor(e){super(Ct.extractPatternOptions({...Ct.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:r,pattern:s,blocks:n,...a}={...Ct.DEFAULTS,...e},i=Object.assign({},Ct.GET_DEFAULT_BLOCKS());e.min&&(i.Y.from=e.min.getFullYear()),e.max&&(i.Y.to=e.max.getFullYear()),e.min&&e.max&&i.Y.from===i.Y.to&&(i.m.from=e.min.getMonth()+1,i.m.to=e.max.getMonth()+1,i.m.from===i.m.to&&(i.d.from=e.min.getDate(),i.d.to=e.max.getDate())),Object.assign(i,this.blocks,n),super._update({...a,mask:Mt(r)?r:s,blocks:i})}doValidate(e){const r=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&r!=null&&(this.min==null||this.min<=r)&&(this.max==null||r<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Ct.extractPatternOptions(e))}}Ct.GET_DEFAULT_BLOCKS=()=>({d:{mask:Qr,from:1,to:31,maxLength:2},m:{mask:Qr,from:1,to:12,maxLength:2},Y:{mask:Qr,from:1900,to:9999}}),Ct.DEFAULTS={...qe.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(t,e)=>{if(!t)return"";const r=String(t.getDate()).padStart(2,"0"),s=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[r,s,n].join(".")},parse:(t,e)=>{const[r,s,n]=t.split(".").map(Number);return new Date(n,s-1,r)}},re.MaskedDate=Ct;class es extends ze{constructor(e){super({...es.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(r=>{const{expose:s,...n}=kr(r),a=wt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return s&&(this.exposeMask=a),a}):[])}_appendCharRaw(e,r){r===void 0&&(r={});const s=this._applyDispatch(e,r);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(r))),s}_applyDispatch(e,r,s){e===void 0&&(e=""),r===void 0&&(r={}),s===void 0&&(s="");const n=r.tail&&r._beforeTailState!=null?r._beforeTailState._value:this.value,a=this.rawInputValue,i=r.tail&&r._beforeTailState!=null?r._beforeTailState._rawInputValue:a,o=a.slice(i.length),u=this.currentMask,c=new oe,d=u==null?void 0:u.state;return this.currentMask=this.doDispatch(e,{...r},s),this.currentMask&&(this.currentMask!==u?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),c.tailShift=this.currentMask.value.length-n.length),o&&(c.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):d&&(this.currentMask.state=d)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const r=new oe;return e&&r.aggregate(this._applyDispatch("",{},e)),r.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var r,s;return{...e,_beforeTailState:((r=e._beforeTailState)==null?void 0:r.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,r,s){return r===void 0&&(r={}),s===void 0&&(s=""),this.dispatch(e,this,r,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,r){r===void 0&&(r={});let[s,n]=super.doPrepare(e,r);if(this.currentMask){let a;[s,a]=super.doPrepare(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}doPrepareChar(e,r){r===void 0&&(r={});let[s,n]=super.doPrepareChar(e,r);if(this.currentMask){let a;[s,a]=super.doPrepareChar(s,this.currentMaskFlags(r)),n=n.aggregate(a)}return[s,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(r=>r.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let r=String(e);this.currentMask&&(this.currentMask.typedValue=e,r=this.currentMask.unmaskedValue),this.unmaskedValue=r}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,r){const s=new oe;return this.currentMask&&s.aggregate(this.currentMask.remove(e,r)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(r=>r.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:r,currentMaskRef:s,currentMask:n,...a}=e;r&&this.compiledMasks.forEach((i,o)=>i.state=r[o]),s!=null&&(this.currentMask=s,this.currentMask.state=n),super.state=a}extractInput(e,r,s){return this.currentMask?this.currentMask.extractInput(e,r,s):""}extractTail(e,r){return this.currentMask?this.currentMask.extractTail(e,r):super.extractTail(e,r)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,r){return this.currentMask?this.currentMask.nearestInputPos(e,r):super.nearestInputPos(e,r)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((r,s)=>{if(!e[s])return;const{mask:n,...a}=e[s];return Yr(r,a)&&r.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var r;return!!((r=this.currentMask)!=null&&r.typedValueEquals(e))}}es.DEFAULTS={...ze.DEFAULTS,dispatch:(t,e,r,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,o)=>{const u=e.currentMask===i,c=u?i.displayValue.length:i.nearestInputPos(i.displayValue.length,X.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):u||i.remove(c),i.append(t,e.currentMaskFlags(r)),i.appendTail(s),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(c,i.nearestInputPos(i.displayValue.length,X.FORCE_LEFT)))}});return a.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},re.MaskedDynamic=es;class ts extends qe{constructor(e){super({...ts.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:r,...s}=e;if(r){const n=r.map(o=>o.length),a=Math.min(...n),i=Math.max(...n)-a;s.mask="*".repeat(a),i&&(s.mask+="["+"*".repeat(i)+"]"),this.enum=r}super._update(s)}_appendCharRaw(e,r){r===void 0&&(r={});const s=Math.min(this.nearestInputPos(0,X.FORCE_RIGHT),this.value.length),n=this.enum.filter(a=>this.matchValue(a,this.unmaskedValue+e,s));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const u=n[0][o];o>=this.value.length||u===i.value||(i.reset(),i._appendChar(u,r))});const a=super._appendCharRaw(n[0][this.value.length],r);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>a.aggregate(super._appendCharRaw(i))),a}return new oe({skip:!this.isComplete})}extractTail(e,r){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),new mt("",e)}remove(e,r){if(e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),e===r)return new oe;const s=Math.min(super.nearestInputPos(0,X.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,n),s)).length>1);--n);const a=super.remove(n,r);return a.tailShift+=n-e,a}get isComplete(){return this.enum.indexOf(this.value)>=0}}ts.DEFAULTS={...qe.DEFAULTS,matchValue:(t,e,r)=>t.indexOf(e,r)===r},re.MaskedEnum=ts;class Ll extends ze{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}re.MaskedFunction=Ll;var Xa;class Qe extends ze{constructor(e){super({...Qe.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),r="\\d*",s=(this.scale?"("+Gs(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+r+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Gs).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Gs(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const r=e.split(this.radix);return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),r.join(this.radix)}doPrepareChar(e,r){r===void 0&&(r={});const[s,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(r.input&&r.raw||!r.input&&!r.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),r);return e&&!s&&(n.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&n.aggregate(this._appendChar("-")),[s,n]}_separatorsCount(e,r){r===void 0&&(r=!1);let s=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++s,r&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,r,s){return e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r),this._removeThousandsSeparators(super.extractInput(e,r,s))}_appendCharRaw(e,r){r===void 0&&(r={});const s=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const a=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),u=!1;if(o){let T;this.min!=null&&this.min<0&&this.number<this.min&&(T=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(T=this.max),T!=null&&(this.autofix?(this._value=this.format(T,this).replace(Qe.UNMASKED_RADIX,this.radix),u||(u=a===this._value&&!r.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let c;o?c=new oe({inserted:this._value.slice(a.length),rawInserted:u?"":e,skip:u}):(this._value=a,c=new oe),this._value=this._insertThousandsSeparators(this._value);const d=r.tail&&r._beforeTailState?r._beforeTailState._value:this._value,p=this._separatorsCountFromSlice(d);return c.tailShift+=(p-n)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const r=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,r);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,r){const s=this._findSeparatorAround(e);s>=0&&(e=s);const n=this._findSeparatorAround(r);return n>=0&&(r=n+this.thousandsSeparator.length),[e,r]}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length),[e,r]=this._adjustRangeWithSeparators(e,r);const s=this.value.slice(0,e),n=this.value.slice(r),a=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+n));const i=this._separatorsCountFromSlice(s);return new oe({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,r){if(!this.thousandsSeparator)return e;switch(r){case X.NONE:case X.LEFT:case X.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const n=s+this.thousandsSeparator.length;if(e<n||this.value.length<=n||r===X.FORCE_LEFT)return s}break}case X.RIGHT:case X.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let r=e;this.min!=null&&(r=Math.max(r,this.min)),this.max!=null&&(r=Math.min(r,this.max)),r!==e&&(this.unmaskedValue=this.format(r,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const r=this._removeThousandsSeparators(e).split(this.radix);return r[0]=r[0].replace(/^(\D*)(0*)(\d*)/,(s,n,a,i)=>n+i),e.length&&!/\d$/.test(r[0])&&(r[0]=r[0]+"0"),r.length>1&&(r[1]=r[1].replace(/0*$/,""),r[1].length||(r.length=1)),this._insertThousandsSeparators(r.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const r=e.split(this.radix);return r.length<2&&r.push(""),r[1]=r[1].padEnd(this.scale,"0"),r.join(this.radix)}doSkipInvalid(e,r,s){r===void 0&&(r={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Qe.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,r,s)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Qe.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(Qe.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||Qe.EMPTY_VALUES.includes(e)&&Qe.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Xa=Qe,Qe.UNMASKED_RADIX=".",Qe.EMPTY_VALUES=[...ze.EMPTY_VALUES,0],Qe.DEFAULTS={...ze.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Xa.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},re.MaskedNumber=Qe;const Ys={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Ja(t,e,r){e===void 0&&(e=Ys.MASKED),r===void 0&&(r=Ys.MASKED);const s=wt(t);return n=>s.runIsolated(a=>(a[e]=n,a[r]))}function Rl(t,e,r,s){return Ja(e,r,s)(t)}re.PIPE_TYPE=Ys,re.createPipe=Ja,re.pipe=Rl;class zl extends qe{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var r,s,n;const{repeat:a,...i}=kr(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=wt(this._blockOpts);this.repeat=(r=(s=a??o.repeat)!=null?s:this.repeat)!=null?r:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((n=this._blocks)==null?void 0:n.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(wt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,r){r===void 0&&(r={});const s=new oe;for(let u=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),c,d;c=(i=this._blocks[u])!=null?i:d=!d&&this._allocateBlock(u);++u){var n,a,i,o;const p=c._appendChar(e,{...r,_beforeTailState:(o=r._beforeTailState)==null||(o=o._blocks)==null?void 0:o[u]});if(p.skip&&d){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(p),p.consumed)break}return s}_trimEmptyTail(e,r){var s,n;e===void 0&&(e=0);const a=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let i;r!=null&&(i=(n=this._mapPosToBlock(r))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let u=i;a<=u&&!this._blocks[u].unmaskedValue;--u,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,r){e===void 0&&(e=0),r===void 0&&(r=this.displayValue.length);const s=super.remove(e,r);return this._trimEmptyTail(e,r),s}totalInputPositions(e,r){return e===void 0&&(e=0),r==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,r)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}re.RepeatBlock=zl;try{globalThis.IMask=re}catch{}const Za={mask:h.oneOfType([h.array,h.func,h.string,h.instanceOf(RegExp),h.oneOf([Date,Number,re.Masked]),h.instanceOf(re.Masked)]),value:h.any,unmask:h.oneOfType([h.bool,h.oneOf(["typed"])]),prepare:h.func,prepareChar:h.func,validate:h.func,commit:h.func,overwrite:h.oneOfType([h.bool,h.oneOf(["shift"])]),eager:h.oneOfType([h.bool,h.oneOf(["append","remove"])]),skipInvalid:h.bool,onAccept:h.func,onComplete:h.func,placeholderChar:h.string,displayChar:h.string,lazy:h.bool,definitions:h.object,blocks:h.object,enum:h.arrayOf(h.string),maxLength:h.number,from:h.number,to:h.number,pattern:h.string,format:h.func,parse:h.func,autofix:h.oneOfType([h.bool,h.oneOf(["pad"])]),radix:h.string,thousandsSeparator:h.string,mapToRadix:h.arrayOf(h.string),scale:h.number,normalizeZeros:h.bool,padFractionalZeros:h.bool,min:h.oneOfType([h.number,h.instanceOf(Date)]),max:h.oneOfType([h.number,h.instanceOf(Date)]),dispatch:h.func,inputRef:h.oneOfType([h.func,h.shape({current:h.object})])},Qa=Object.keys(Za).filter(t=>t!=="value"),ql=["value","unmask","onAccept","onComplete","inputRef"],Ul=Qa.filter(t=>ql.indexOf(t)<0);function Hl(t){var e;const r=(e=class extends F.Component{constructor(a){super(a),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const a=this.props,i=this._extractMaskOptionsFromProps(a);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in a&&a.value!==void 0&&(this.maskValue=a.value)):this.initMask(i);else if(this.destroyMask(),"value"in a&&a.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=a.value:this.element.value=a.value}}componentWillUnmount(){this.destroyMask()}_inputRef(a){this.element=a,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=a:this.props.inputRef(a))}initMask(a){a===void 0&&(a=this._extractMaskOptionsFromProps(this.props)),this.maskRef=re(this.element,a).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(a){const{...i}=a;return Object.keys(i).filter(o=>Ul.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(a){const{...i}=a;return Qa.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=a.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(a){this.maskRef&&(a=a==null&&this.props.unmask!=="typed"?"":a,this.props.unmask==="typed"?this.maskRef.typedValue=a:this.props.unmask?this.maskRef.unmaskedValue=a:this.maskRef.value=a)}_onAccept(a){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,a)}_onComplete(a){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,a)}render(){return F.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=t.displayName||t.name||"Component";return r.displayName="IMask("+s+")",r.propTypes=Za,F.forwardRef((n,a)=>F.createElement(r,{...n,ref:a}))}const Kl=Hl(t=>{let{inputRef:e,...r}=t;return F.createElement("input",{...r,ref:e})}),Gl=(t,e)=>F.createElement(Kl,{...t,ref:e});F.forwardRef(Gl);function Wl(t,e){let{onAccept:r,onComplete:s,ref:n=F.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const u=F.useRef(null),[c,d]=F.useState({}),[p,T]=F.useState(""),[S,k]=F.useState(""),[E,_]=F.useState(),g=F.useCallback(()=>{var b;(b=u.current)==null||b.destroy(),u.current=null},[]),I=F.useCallback(()=>{const b=u.current;b&&(d({value:b.value,unmaskedValue:b.unmaskedValue,typedValue:b.typedValue}),_(b.typedValue),k(b.unmaskedValue),T(b.value))},[]),N=F.useCallback(b=>{const R=u.current;R&&(I(),r==null||r(R.value,R,b))},[r]),D=F.useCallback(b=>u.current&&(s==null?void 0:s(u.current.value,u.current,b)),[s]);return F.useEffect(()=>{const{value:b,...R}=c,L=u.current;!L||p===void 0||(b!==p&&(L.value=p,L.value!==p&&N()),d(R))},[p]),F.useEffect(()=>{const{unmaskedValue:b,...R}=c,L=u.current;!L||S===void 0||(b!==S&&(L.unmaskedValue=S,L.unmaskedValue!==S&&N()),d(R))},[S]),F.useEffect(()=>{const{typedValue:b,...R}=c,L=u.current;!L||E===void 0||(b!==E&&(L.typedValue=E,L.masked.typedValueEquals(E)||N()),d(R))},[E]),F.useEffect(()=>{const b=n.current;if(!b||!(t!=null&&t.mask))return g();const R=u.current;R?R==null||R.updateOptions(t):b&&t!=null&&t.mask&&(u.current=re(b,t),I(),a!==void 0&&T(a),i!==void 0&&k(i),o!==void 0&&_(o))},[t,g,N]),F.useEffect(()=>{if(!u.current)return;const b=u.current;return b.on("accept",N),b.on("complete",D),()=>{b.off("accept",N),b.off("complete",D)}},[N,D]),F.useEffect(()=>g,[g]),{ref:n,maskRef:u,value:p,setValue:T,unmaskedValue:S,setUnmaskedValue:k,typedValue:E,setTypedValue:_}}const ei={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},ti={Small:"small",Medium:"medium",Large:"large"},ri={Default:"",Error:"error",Success:"success"},si={Center:"center",End:"end",Initial:"initial"},ni={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Oe={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ei.Text,options:Object.values(ei)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:ti.Medium,options:Object.values(ti)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:ri.Default,options:Object.values(ri)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!0},noMargin:{type:Boolean,default:!1},icon:{type:String,default:""},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:si.Center,options:Object.values(si)},tooltipPosition:{type:String,default:ni.Top,options:Object.values(ni)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},ai={currency:{mask:"currency",blocks:{currency:{mask:"R$ num",lazy:!1,blocks:{num:{mask:Number,scale:2,thousandsSeparator:".",padFractionalZeros:!0,normalizeZeros:!1,radix:",",mapToRadix:[",","."]}}}}},document:{mask:[{mask:"000.000.000-00",startsWith:/[0-9]/,maxLength:14},{mask:"00.000.000/0000-00",startsWith:/[0-9]/,maxLength:18}]},"phone-br":{mask:[{mask:"(00) 0000-0000"},{mask:"(00) 00000-0000"}],dispatch:(t,e)=>(e.value+t).replace(/\D/g,"").length<=10?e.compiledMasks[0]:e.compiledMasks[1]}},ii={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},oi={Center:"center",End:"end",Initial:"initial"},Tt={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:ii.Top,options:Object.values(ii)},placement:{type:String,default:oi.Center,options:Object.values(oi)},text:{type:String,default:""}}},Ut=({children:t,position:e=Tt.props.position.default,placement:r=Tt.props.placement.default,text:s=Tt.props.text.default,className:n})=>{const a=F.useRef(null),i=F.useRef(null),[o,u]=F.useState(!1),c=e&&Tt.props.position.options.find(b=>b===e)&&`${Tt.class}--${e}`,d=r&&Tt.props.placement.options.find(b=>b===r)&&`${Tt.class}--${r}`,[p,T]=F.useState(0),[S,k]=F.useState(0),[E,_]=F.useState(0),[g,I]=F.useState(0);let N;switch(F.useEffect(()=>{var b,R,L,Q;i.current&&(_((b=i==null?void 0:i.current)==null?void 0:b.offsetHeight),I((R=i==null?void 0:i.current)==null?void 0:R.offsetWidth)),a.current&&(T((L=a==null?void 0:a.current)==null?void 0:L.offsetHeight),k((Q=a==null?void 0:a.current)==null?void 0:Q.offsetWidth))},[a,o]),F.useEffect(()=>(document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}),[]),e){case"top":r==="initial"?N={bottom:p+9,left:S<30?-S/1.5:-S*.01}:r==="end"?N={bottom:p+9,right:S<30?-S/1.5:-S*.01}:N={bottom:p+9,left:-g/2+S/2};break;case"bottom":r==="initial"?N={top:p+9,left:S<30?-S/1.5:-S*.01}:r==="end"?N={top:p+9,right:S<30?-S/1.5:-S*.01}:N={top:p+9,left:-g/2+S/2};break;case"left":r==="initial"?N={right:S+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={right:S+9,bottom:p<30?-p/1.5:-p*.01}:N={right:S+9,top:-E/2+p/2};break;case"right":r==="initial"?N={left:S+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={left:S+9,bottom:p<30?-p/1.5:-p*.01}:N={left:S+9,top:-E/2+p/2};break}const D=({target:b})=>{a.current&&a.current.contains(b)||u(!1)};return w.jsxs("span",{className:[Tt.class,n].join(" "),"data-testid":"tooltip",onClick:()=>u(!o),ref:a,children:[t,o&&w.jsx("span",{className:[c,d].filter(b=>b).join(" "),children:w.jsx("span",{className:`${Tt.class}__wrapper`,"data-testid":"tooltip-wrapper",ref:i,style:N,children:s})})]})};Ut.propTypes={position:h.string,placement:h.string,text:h.oneOfType([h.string,h.node])},Ut.displayName="DsTooltip";const ar=F.forwardRef(({name:t,testId:e=t||"ds-input-test",type:r=Oe.props.type.default,animated:s=Oe.props.animated.default,size:n=Oe.props.size.default,label:a,placeholder:i,value:o,min:u,max:c,tooltip:d=Oe.props.tooltip.default,tooltipPosition:p=Oe.props.tooltipPosition.default,tooltipPlacement:T=Oe.props.tooltipPlacement.default,icon:S=Oe.props.icon.default,status:k=Oe.props.status.default,feedback:E,hasFeedback:_=Oe.props.hasFeedback.default,noMargin:g=Oe.props.noMargin.default,disabled:I=Oe.props.disabled.default,className:N,mask:D,onChangeHandler:b=Oe.props.onChangeHandler.default,onBlurHandler:R,onKeyDownHandler:L,onFocusHandler:Q},K)=>{const[ce,U]=F.useState(!1),[G,ne]=F.useState(!1),W=!!b&&!!D,he=(B,z,te)=>{if(W&&te){const q={...te,target:{...te.target,name:t,maskedValue:B,value:z.unmaskedValue,type:"text"}};b(q)}},me=F.useMemo(()=>typeof D=="object"?{lazy:!0,...D}:ai[D]?{...ai[D],min:u,max:c,lazy:!0}:{mask:D||"",min:u,max:c,lazy:!0},[D]),{ref:_e,setUnmaskedValue:Ie}=Wl(me,{onAccept:he}),Fe=B=>{b&&!W&&b(B)},A=B=>{L&&L(B)},y=B=>{U(!1),R&&R(B)},M=B=>{U(!0),Q&&Q(B)},O=()=>{ne(B=>!B)},l=F.useMemo(()=>G&&r==="password"?"text":r,[G,r]),f=()=>{const B=[`${Oe.class}`];return n&&B.push(`${Oe.class}--${n}`),s&&B.push(`${Oe.class}--animated`),g&&B.push(`${Oe.class}--no-margin`),S&&B.push(`${Oe.class}--with-icon`),k&&B.push(`${Oe.class}--${k}`),N&&B.push(N),B.join(" ")},v=F.useMemo(()=>{const B=[`${Oe.class}__label`];return(ce||o)&&B.push(`${Oe.class}__label--active`),B.join(" ")},[o,ce]),P=()=>!s&&i?i:"",V=()=>k&&k==="error"?"info":"check_circle";return F.useEffect(()=>{D&&Ie(o||"")},[o,D,Ie]),w.jsxs("div",{className:f(),ref:K,children:[_&&w.jsx("div",{className:"ds-input__feedback",children:E&&w.jsxs(w.Fragment,{children:[w.jsx(Ee,{image:V()}),E]})}),w.jsx("input",{className:"ds-input__input","data-testid":e,disabled:I,id:t,max:c,min:u,name:t,onBlur:y,onChange:Fe,onFocus:M,onInput:Fe,onKeyDown:A,placeholder:P(),ref:_e,type:l,...!D&&{value:o||""}}),w.jsxs("label",{className:v,htmlFor:t,children:[a,d&&w.jsx(Ut,{className:"ds-input__tooltip",placement:T,position:p,text:d,children:w.jsx(Ee,{className:"ds-input__icon",image:"info"})})]}),S&&w.jsx(Ee,{className:"ds-input__icon",image:S}),r==="password"&&w.jsx(Ee,{className:"ds-input__password-icon",image:G?"visibility_off":"visibility",onClick:O,size:"xl"})]})});ar.propTypes={name:h.string,testId:h.string,type:h.oneOf(Oe.props.type.options),animated:h.bool,size:h.oneOf(Oe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),min:h.string,max:h.string,tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,icon:h.string,status:h.oneOf(Oe.props.status.options),feedback:h.string,hasFeedback:h.bool,noMargin:h.bool,disabled:h.bool,mask:h.oneOfType([h.string,h.object]),onChangeHandler:h.func,onFocusHandler:h.func},ar.displayName="DsInput";const li={Small:"small",Medium:"medium",Large:"large"},ui={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},et={name:"Loading",class:"ds-loading",props:{size:{type:String,default:li.Medium,options:Object.values(li)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:ui.Neutral10,options:Object.values(ui)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},rs=({id:t,testId:e=et.props.testId.default,className:r,size:s=et.props.size.default,opacity:n=et.props.opacity.default,fullscreen:a=et.props.fullscreen.default,backgroundColor:i=et.props.backgroundColor.default})=>{const o=!a&&`${et.class}--absolute`,u=s&&`${et.class}__dots--${s}`,c=i&&et.props.backgroundColor.options.find(p=>p===i)&&`${et.class}__background--${i}`,d=n&&`${et.class}__background--opacity`;return w.jsxs("div",{className:[et.class,r,o].filter(p=>p).join(" "),"data-testid":e,id:t,children:[w.jsx("div",{className:[`${et.class}__background`,c,d].filter(p=>p).join(" ")}),w.jsx("div",{className:["ds-loading__dots",u].filter(p=>p).join(" "),role:"status"})]})};rs.propTypes={id:h.string,testId:h.string,size:h.oneOf(et.props.size.options),opacity:h.bool,fullscreen:h.bool,backgroundColor:h.string},rs.displayName="DsLoading";const Ot={name:"Option",class:"ds-option",props:{id:{type:String,default:""},name:{type:String,default:""},testId:{type:String,default:""},label:{type:String,default:""},value:{type:String,default:""},disabled:{type:Boolean,default:!1},detail:{type:String,default:""},checked:{type:Boolean,default:!1},onChangeHandler:{type:Function,default:()=>({})}}},Xs=({id:t,label:e,detail:r,name:s,testId:n=s||"ds-option-test",disabled:a=Ot.props.disabled.default,value:i,checked:o=Ot.props.checked.default,onChangeHandler:u=Ot.props.onChangeHandler.default})=>{const[c]=F.useState(Math.random()),d=()=>{const p=[Ot.class];return a&&p.push(`${Ot.class}--disabled`),p.join(" ")};return w.jsxs("div",{className:d(),children:[w.jsx("input",{checked:o,"data-testid":n,disabled:a,id:t||String(c),name:s,onChange:u,type:"radio",value:i}),w.jsx(Ee,{className:`${Ot.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),w.jsxs("div",{className:`${Ot.class}__text-container`,children:[e&&w.jsx("label",{className:`${Ot.class}__label`,htmlFor:t||String(c),children:e}),r&&w.jsx("label",{className:`${Ot.class}__detail`,htmlFor:t||String(c),children:r})]})]})};Xs.propTypes={id:h.string,name:h.string,testId:h.string,label:h.oneOfType([h.string,h.node]),value:h.oneOfType([h.string,h.number]),detail:h.string,disabled:h.bool,checked:h.bool,onChangeHandler:h.func},Xs.displayName="DsOption";const ci={Default:"",Large:"large",Small:"small"},ss={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:ci.Default,options:Object.values(ci)}}},At=({children:t,className:e,testId:r="ds-paragraph-test",type:s=ss.props.type.default})=>{const n=s&&`${ss.class}--${s}`;return w.jsx("p",{className:[ss.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};At.propTypes={className:h.string,testId:h.string,type:h.oneOf(ss.props.type.options)},At.displayName="DsParagraph";const di={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},fi={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:di.Success,options:Object.values(di)}}},Js={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},Be=({children:t,flex:e=Js.props.flex.default,className:r=Js.props.className.default})=>{const s=()=>[Js.class,r].join(" "),n=()=>({flex:e});return w.jsx("div",{className:s(),style:n(),children:t})};Be.propTypes={className:h.string,flex:h.string},Be.displayName="DsFlexElement";const pi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},hi={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},mi={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},gi={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},Yl={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},Ht={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:pi.Stretch,required:!0,options:Object.values(pi)},alignItems:{type:String,default:hi.Stretch,required:!0,options:Object.values(hi)},flexDirection:{type:String,default:mi.Row,required:!0,options:Object.values(mi)},flexWrap:{type:String,default:gi.Wrap,required:!1,options:Object.values(gi)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Yl)}}},Dt=({children:t,className:e,justifyContent:r=Ht.props.justifyContent.default,alignItems:s=Ht.props.alignItems.default,flexDirection:n=Ht.props.flexDirection.default,flexWrap:a=Ht.props.flexWrap.default,width:i=Ht.props.width.default,height:o,gap:u})=>{const c=()=>{const p=[Ht.class,e];return u&&p.push(`${Ht.class}--gap-${u}`),p.join(" ")},d=()=>({display:"flex",justifyContent:r,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:o,gap:u});return w.jsx("div",{className:c(),style:d(),children:t})};Dt.propTypes={className:h.string,justifyContent:h.string,alignItems:h.string,flexDirection:h.string,flexWrap:h.string,width:h.string,height:h.string,gap:h.string},Dt.displayName="DsFlexLayout";const ns={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},wr={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:ns.None,options:Object.values(ns)},horizontal:{type:String,default:ns.None,options:Object.values(ns)}}},lt=({vertical:t=wr.props.vertical.default,horizontal:e=wr.props.horizontal.default})=>{const r=t&&`ds-spacer__vertical--${t}`,s=e&&`ds-spacer__horizontal--${e}`;return w.jsx("div",{className:[wr.class,r,s].filter(n=>n).join(" "),"data-testid":"spacer"})};lt.propTypes={vertical:h.oneOf(wr.props.vertical.options),horizontal:h.oneOf(wr.props.horizontal.options)},lt.displayName="DsSpacer";const Zs=({label:t,progress:e=fi.props.progress.default,color:r=fi.props.color.default})=>{const s=F.useMemo(()=>e>100?100:e,[e]),n=F.useMemo(()=>`ds-progress__progress--${r}`,[r]),a=F.useMemo(()=>r==="success-dark"?"color__success--dark":r==="warning"?"color__warning--dark":`color__${r}--default`,[r]);return w.jsx("div",{className:"ds-progress",children:w.jsxs(Dt,{flexDirection:"column",children:[w.jsx(Be,{children:w.jsx("div",{className:"ds-progress__container",children:w.jsx("div",{className:`ds-progress__progress ${n}`,style:{width:`${s||0}%`}})})}),w.jsx(Be,{children:w.jsxs(Dt,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[w.jsx(lt,{vertical:"quark"}),w.jsx(At,{className:a,children:t})]})})]})})};Zs.propTypes={label:h.string,progress:h.number,color:h.string};const yi={Small:"sm",Medium:"md",Large:"lg"},vi={Default:"",Error:"error",Success:"success"},_i={Center:"center",End:"end",Initial:"initial"},bi={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Ae={name:"Select",class:"ds-select",props:{label:{type:String,default:""},className:{type:String,default:""},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},name:{type:String,default:""},testId:{type:String,default:"ds-select-test"},placeholder:{type:String},onChange:{type:Function,default:()=>{}},value:{type:[Boolean,String,Number,void 0]},size:{type:String,options:Object.values(yi),default:yi.Medium},status:{type:String,default:vi.Default,options:Object.values(vi)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:_i.Initial,options:Object.values(_i)},tooltipPosition:{type:String,default:bi.Top,options:Object.values(bi)},feedback:{type:String,default:""},options:[]}},Qs=F.forwardRef(({label:t,className:e,disabled:r=Ae.props.disabled.default,animated:s=Ae.props.animated.default,multiple:n=Ae.props.multiple.default,testId:a=Ae.props.testId.default,name:i,options:o,value:u,placeholder:c,onChange:d,onChangeHandler:p,size:T=Ae.props.size.default,status:S=Ae.props.status.default,tooltip:k,tooltipPosition:E=Ae.props.tooltipPosition.default,tooltipPlacement:_=Ae.props.tooltipPlacement.default,feedback:g,...I},N)=>{const[D,b]=F.useState(!1),R=K=>{b(!1),d&&d(K,K.target.value),p&&p(K,K.target.value)},L=()=>{const K=[Ae.class,"select-placeholder"];return K.push(`${Ae.class}--${T}`),S&&K.push(`${Ae.class}--${S}`),D&&K.push(`${Ae.class}--active`),r&&K.push(`${Ae.class}--disabled`),e&&K.push(e),K.join(" ")},Q=F.useMemo(()=>{const K=[`${Ae.class}__label`];return!s&&K.push(`${Ae.class}__label--not-animated`),u&&K.push(`${Ae.class}__label--has-value`),s&&!u&&!k&&K.push(`${Ae.class}__label--hidden`),K.join(" ")},[u]);return w.jsxs("div",{className:L(),"data-testid":"select-component",children:[w.jsxs("label",{className:Q,"data-testid":"label-id",htmlFor:i,children:[t,k&&w.jsx(Ut,{className:`${Ae.class}__tooltip`,placement:_,position:E,text:k,children:w.jsx(Ee,{className:`${Ae.class}__icon`,image:"info"})})]}),w.jsxs("select",{"data-testid":a,disabled:r,id:i,multiple:n,name:i,onChange:K=>R(K),value:u||"",...I,onBlur:()=>b(!1),onFocus:()=>b(!0),ref:N,required:!0,children:[(c||s)&&w.jsx("option",{disabled:!0,value:"",children:c??t}),o==null?void 0:o.map((K,ce)=>{var U;return"options"in K?w.jsx("optgroup",{label:K.label,children:(U=K.options)==null?void 0:U.map((G,ne)=>w.jsx("option",{className:`${Ae.class}__option-select`,value:G.value,children:G.label||G.value},ne))},ce):w.jsx("option",{className:`${Ae.class}__option-select`,value:K.value,children:K.label||K.value},ce)})]}),g&&w.jsxs("div",{className:"ds-select__feedback-container",children:[w.jsx(Ee,{className:"ds-select__icon",image:S==="success"?"check_circle":"info"}),w.jsx("span",{className:"ds-select__feedback",children:g})]})]})});Qs.propTypes={label:h.string.isRequired,className:h.string,disabled:h.bool,animated:h.bool,multiple:h.bool,name:h.string,testId:h.string,options:h.array.isRequired,placeholder:h.string,onChange:h.func,onChangeHandler:h.func,value:h.oneOfType([h.string,h.number]),size:h.oneOf(Ae.props.size.options),status:h.oneOf(Ae.props.status.options),tooltip:h.string,tooltipPosition:h.string,tooltipPlacement:h.string,feedback:h.string},Qs.displayName="DsSelect";const $i={Large:"large",Small:"small"},en={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:$i.Large,options:Object.values($i)}}},Si=({children:t,className:e,testId:r="ds-subtitle-test",type:s})=>{const n=en.props.type.options.find(a=>a===s)&&`${en.class}--${s}`;return w.jsx("p",{className:[en.class,n,e&&e].filter(a=>a).join(" "),"data-testid":r,children:t})};Si.displayName="DsSubtitle";const Ei={Small:"small",Medium:"medium",Large:"large"},ki={Text:"text"},wi={None:"",Error:"error",Success:"success"},Ci={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},xe={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:""},type:{type:String,default:ki.Text,options:Object.values(ki)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Ei.Medium,options:Object.values(Ei)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},minLength:{type:Number,default:void 0},maxLength:{type:Number,default:void 0},rows:{type:Number,default:1},status:{type:String,default:wi.None,options:Object.values(wi)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:Ci.None,options:Object.values(Ci)},onChangeHandler:{type:Function,default:()=>{}}}},tn=F.forwardRef(({name:t,testId:e=t||"ds-textarea-test",animated:r=xe.props.animated.default,size:s=xe.props.size.default,label:n,placeholder:a,value:i,minLength:o,maxLength:u,tooltip:c,icon:d,status:p=xe.props.status.default,feedback:T,disabled:S=xe.props.disabled.default,className:k,resize:E=xe.props.resize.default,onChangeHandler:_=xe.props.onChangeHandler.default,onBlurHandler:g,onKeyDownHandler:I,onFocusHandler:N,rows:D=xe.props.rows.default,description:b},R)=>{const[L,Q]=F.useState(!1),[K,ce]=F.useState(0),[U,G]=F.useState(Math.random());F.useEffect(()=>{i==null&&G(Math.random())},[i]);const ne=y=>{ce(y.target.value.length),_&&_(y)},W=y=>{I&&I(y)},he=y=>{Q(!1),g&&g(y)},me=y=>{Q(!0),N&&N(y)},_e=()=>{const y=[`${xe.class}`];return s&&y.push(`${xe.class}--${s}`),r&&y.push(`${xe.class}--animated`),c&&y.push(`${xe.class}--with-icon`),p&&y.push(`${xe.class}--${p}`),k&&y.push(k),y.join(" ")},Ie=F.useMemo(()=>{const y=[`${xe.class}__label`];return(L||i)&&y.push(`${xe.class}__label--active`),y.join(" ")},[i,L]),Fe=()=>!r&&a?a:"",A=()=>p&&p==="error"?"info":"check_circle";return w.jsxs("div",{className:_e(),children:[b&&w.jsx("span",{className:"ds-textarea__description",children:b}),T&&w.jsxs("div",{className:"ds-textarea__feedback",children:[w.jsx(Ee,{image:A()}),T]}),w.jsx("textarea",{className:"ds-textarea__textarea","data-testid":e,defaultValue:i||"",disabled:S,id:t,maxLength:u,minLength:o,name:t,onBlur:he,onChange:ne,onFocus:me,onInput:ne,onKeyDown:W,placeholder:Fe(),ref:R,rows:D,style:{resize:E||"none"}}),w.jsx("label",{className:Ie,htmlFor:t,children:n}),u&&w.jsxs("span",{className:"ds-textarea__count",children:[K,"/",u]}),c&&w.jsx(Ut,{className:"ds-textarea__tooltip",placement:"end",text:c,children:w.jsx(Ee,{className:"ds-textarea__icon",image:d})})]},U)});tn.propTypes={name:h.string,testId:h.string,type:h.oneOf(xe.props.type.options),animated:h.bool,size:h.oneOf(xe.props.size.options),label:h.string,placeholder:h.string,value:h.oneOfType([h.string]),tooltip:h.string,icon:h.string,status:h.oneOf(xe.props.status.options),feedback:h.string,minLength:h.number,maxLength:h.number,rows:h.number,disabled:h.bool,onChangeHandler:h.func,onFocusHandler:h.func,resize:h.oneOf(xe.props.resize.options).isRequired,description:h.string},tn.displayName="DsTextArea";const rn={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},as=({children:t,fluid:e=rn.props.fluid.default,className:r,style:s})=>{const n=e?`${rn.class}--fluid`:rn.class;return w.jsx("div",{className:[n,r].filter(a=>a).join(" "),style:s,children:t})};as.propTypes={children:h.node,fluid:h.bool,className:h.string,style:h.object},as.displayName="DsContainer";function Ti(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Xl(){const[t,e]=F.useState(Ti());return F.useEffect(()=>{function r(){e(Ti())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const Oi=({children:t,grid:e})=>{const{row:r,col:s,mobileRow:n,mobileCol:a}=e,{width:i}=Xl(),[o,u]=F.useState(""),[c,d]=F.useState("");return F.useEffect(()=>{i<=768?(u(n||r),d(a||s)):(u(r),d(s))},[i]),w.jsx("div",{style:{gridRow:o,gridColumn:c},children:t})};Oi.displayName="DsGridElement";const Ai={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},is={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Ve={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:Ai.Small,options:Object.values(Ai)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:is.Start,options:Object.values(is)},verticalAlign:{type:String,default:is.Start,options:Object.values(is)}}};function Di(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Jl(){const[t,e]=F.useState(Di());return F.useEffect(()=>{function r(){e(Di())}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[]),t}const os=({children:t,rows:e,gap:r,vGap:s,hGap:n,horizontalAlign:a,verticalAlign:i,width:o,height:u})=>{const c=s&&`${Ve.class}__v-gap--${r}`,d=n&&`${Ve.class}__h-gap--${r}`,p=a&&Ve.props.horizontalAlign.options.find(N=>N===a)?`${Ve.class}--h-${a}`:null,T=i&&Ve.props.verticalAlign.options.find(N=>N===i)?`${Ve.class}--v-${i}`:null,{width:S}=Jl(),[k,E]=F.useState("");F.useEffect(()=>{S<=768?E("6"):E("12")},[S]);const _=N=>/^[+-]?\d+$/.test(N),g=()=>e.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":_(D)?D+"fr":D)).join(" "),I=()=>`repeat(${k.split(",").map(D=>(D=D.trim(),D==="0"||D==="*"||D==="auto"?"auto":(_(D),D))).join(" ")}, minmax(0, 1fr))`;return w.jsx("div",{className:[Ve.class,p,T,c,d].filter(N=>N).join(" "),style:{width:o,height:u,gridTemplateColumns:I(),gridTemplateRows:g()},children:t})};os.propTypes={children:h.oneOfType([h.arrayOf(h.node),h.node,h.func]),rows:h.string,gap:h.oneOf(Ve.props.gap.options),vGap:h.bool,hGap:h.bool,width:h.string,height:h.string,horizontalAlign:h.oneOf(Ve.props.horizontalAlign.options),verticalAlign:h.oneOf(Ve.props.verticalAlign.options)},os.defaultProps={rows:Ve.props.rows.default,gap:Ve.props.gap.default,vGap:Ve.props.vGap.default,hGap:Ve.props.hGap.default,width:Ve.props.width.default,height:Ve.props.height.default,horizontalAlign:Ve.props.horizontalAlign.default,verticalAlign:Ve.props.verticalAlign.default},os.displayName="DsGridLayout";const ir={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},rt={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:ir.ExtraSmall,options:Object.values(ir)},top:{type:String,options:Object.values(ir)},right:{type:String,options:Object.values(ir)},bottom:{type:String,options:Object.values(ir)},left:{type:String,options:Object.values(ir)}}},Kt=({children:t,space:e=rt.props.space.default,top:r,right:s,bottom:n,left:a})=>{const i=r&&`${rt.class}__top--${r}`,o=s&&`${rt.class}__right--${s}`,u=n&&`${rt.class}__bottom--${n}`,c=a&&`${rt.class}__left--${a}`,d=e&&`${rt.class}--${e}`;return w.jsx("div",{className:[rt.class,i,o,u,c,d].filter(p=>p).join(" "),children:t})};Kt.propTypes={space:h.oneOf(rt.props.space.options||[]),top:h.oneOf(rt.props.top.options||[]),right:h.oneOf(rt.props.right.options||[]),bottom:h.oneOf(rt.props.bottom.options||[]),left:h.oneOf(rt.props.left.options||[])},Kt.displayName="DsWrapper";const sn={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},or={name:"AccordionItem",class:"ds-accordion-item",props:{title:{type:String,default:""},content:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1}}},nn=({title:t,content:e,className:r,onToggle:s,active:n=or.props.active.default,disabled:a=or.props.disabled.default})=>{const i=n&&`${or.class}--active`;return w.jsxs("li",{className:[or.class,i,r&&r].filter(o=>o).join(" "),children:[w.jsxs("button",{className:`${or.class}__button`,disabled:a,onClick:s,children:[t,w.jsx(Ee,{className:`${or.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),n&&w.jsx("div",{className:"ds-accordion-item__content",children:e})]})};nn.propTypes={active:h.bool,title:h.oneOfType([h.element,h.string]),content:h.oneOfType([h.element,h.string]),className:h.string,disabled:h.bool},nn.displayName="DsAccordionItem";const an=({items:t=sn.props.items.default,activeItem:e=sn.props.activeItem.default,onClick:r})=>{const[s,n]=F.useState(-1);F.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),F.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return r&&r(-1),n(-1);n(i),r&&r(i)};return w.jsx("ul",{className:sn.class,children:t.map((i,o)=>w.jsx(nn,{active:s===o,content:i.content,disabled:i.disabled,onToggle:()=>{a(o)},title:i.title},o))})};an.propTypes={items:h.array,activeItem:h.number},an.displayName="DsAccordion";const Ii=({title:t,activeTags:e,handleTagClose:r})=>w.jsx("div",{className:"active-tags",children:e.length>0&&w.jsxs(w.Fragment,{children:[w.jsx(At,{className:"active-tags__title",children:t}),w.jsx("div",{className:"active-tags__list","data-testid":"list",children:e.map((s,n)=>w.jsx(Ut,{text:`Filtro ${s.text} aplicado`,children:w.jsxs("div",{className:`active-tags__item ${s.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`active-tag-${n}`,children:[w.jsxs(Dt,{alignItems:"center",gap:"nano",children:[w.jsx(Be,{children:w.jsx(Ee,{className:"active-tags__icon",color:s.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:s.icon,testId:`icon-${n}`})}),w.jsx(Be,{children:w.jsx(At,{type:"small",children:s.text})})]}),!s.hiddenClose&&w.jsx(Ee,{image:"close",onClick:()=>r(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${n}`))})]})});Ii.displayName="DsActiveTags";const Ni={Small:"small",Medium:"medium",Large:"large"},$e={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},animated:{type:Boolean,default:!0},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:Ni.Medium,options:Object.values(Ni)},status:{type:String,default:""},options:{type:Array,default:[]},icon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},loading:{type:Boolean},onChangeHandler:{type:Function,default:()=>{}},onBlurHandler:{type:Function,default:()=>{}},onFocusHandler:{type:Function,default:()=>{}},onSelectHandler:{type:Function,default:()=>{}}}},Pi=({label:t=$e.props.label.default,name:e=$e.props.name.default,value:r=$e.props.value.default,options:s=$e.props.options.default,size:n=$e.props.size.default,onChangeHandler:a=$e.props.onChangeHandler.default,onSelectHandler:i=$e.props.onSelectHandler.default,icon:o=$e.props.icon.default,noOptionsMessage:u=$e.props.noOptionsMessage.default,disabled:c=$e.props.disabled.default,status:d=$e.props.status.default,onBlurHandler:p=$e.props.onBlurHandler.default,onFocusHandler:T=$e.props.onFocusHandler.default,animated:S=$e.props.animated.default,placeholder:k=$e.props.placeholder.default,loading:E})=>{const[_,g]=F.useState(!1),[I,N]=F.useState(r),D=L=>{a(L),(E==null&&L.currentTarget.value.length||!E&&L.currentTarget.value.length>2)&&g(!0)},b=L=>{i(L),p(),N(Math.random().toString()),g(!1)};F.useEffect(()=>{r.length===0&&g(!1)},[r]);const R=()=>s.length>0?s.map((L,Q)=>w.jsx("option",{className:`${$e.class}__option ${$e.class}__option--${n}`,"data-testid":`Option ${L.id||L.label}`,onClick:()=>!c&&b(L),value:Q,children:L.label},Q)):w.jsx("option",{className:`${$e.class}__option ${$e.class}__option--not-found`,children:u},"no_option");return w.jsxs("div",{className:`${$e.class}__container`,children:[w.jsx(ar,{animated:S,className:`${$e.class}__input`,disabled:c,label:t,name:e,onBlurHandler:p,onChangeHandler:D,onFocusHandler:T,placeholder:k,size:n,status:d,value:r},I),(o||E)&&(E?w.jsx("div",{className:`${$e.class}__loading ${$e.class}__loading--${n}`,style:{width:"18px"},children:w.jsx(rs,{fullscreen:!1})}):o&&w.jsx(Ee,{className:`${$e.class}__icon ${$e.class}__icon--${n}`,image:o})),_&&w.jsx("div",{className:`${$e.class}__list`,"data-testid":"list",children:R()})]})};Pi.displayName="DsEditableSelect";const Cr={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Zl=({length:t,current:e=Cr.props.current.default})=>{const[r,s]=F.useState(e),n=i=>i<r?`${Cr.class}__step--older`:i===r?`${Cr.class}__step--active`:"";F.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<t;i++)a.push(w.jsx("div",{className:`${Cr.class}__step ${n(i)}`,"data-testid":`indicator-step-${i}`},i));return w.jsx("div",{className:Cr.class,children:a})},Ql={name:"DsInlineEditable",class:"ds-inline-editable",props:{name:{type:String,required:!0},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},onChangeHandler:{type:Function,default:()=>{}}}},on=({name:t,value:e,prefix:r,sufix:s,min:n,max:a,onChangeHandler:i})=>{const o=F.useRef(null),[u,c]=F.useState(!1),[d,p]=F.useState("");F.useEffect(()=>{p(e??"")},[e]);const T=_=>{_.key==="Enter"&&S(_)};function S(_){c(!1),i&&(n&&parseInt(n)>=parseInt(d===""?n:d)?(_.currentTarget.value=n,p(n)):a&&parseInt(a)<parseInt(d)?(_.currentTarget.value=a,p(a)):_.currentTarget.value=d,i(_))}const k=_=>{p(_.currentTarget.value)},E=async()=>{var _;await c(!0),(_=o.current)==null||_.focus()};return w.jsx("div",{className:Ql.class,children:u?w.jsx("input",{className:"ds-input__input","data-testid":"input",max:a,min:n,name:t,onBlur:S,onChange:k,onKeyDown:T,ref:o,type:"number",value:d}):w.jsx("div",{"data-testid":"inline-editible-div-click",onClick:E,children:w.jsxs(Dt,{alignItems:"center",gap:"nano",children:[w.jsx(Be,{children:w.jsx(At,{children:w.jsxs("b",{children:[r,e,s]})})}),w.jsx(Be,{children:w.jsx(Ee,{image:"edit_square"})})]})})})};on.propTypes={value:h.string},on.displayName="DsInlineEditable";const eu=[1,2,3,4],Fi={Squared:"squared",Rounded:"rounded"},st={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:eu},variant:{type:String,default:Fi.Rounded,options:Object.values(Fi)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},ln=({className:t,title:e,content:r,cancelBtnText:s=st.props.cancelBtnText.default,confirmBtnText:n=st.props.confirmBtnText.default,variant:a=st.props.variant.default,elevation:i,isModalOpen:o=st.props.isModalOpen.default,onClose:u,onCancel:c,onConfirm:d,...p})=>{const T=a&&st.props.variant.options.find(_=>_===a)?`${st.class}--${a}`:`${st.class}--${st.props.variant.default}`,S=i&&`${st.class}--elevation-${i}`,k=d||c,E=F.useCallback(_=>{_.keyCode===27&&u()},[u]);return F.useEffect(()=>{if(window)return k||window.addEventListener("keyup",E),()=>{window.removeEventListener("keyup",E)}},[k,E]),o?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ds-modal-overlay",...p,onClick:()=>k?()=>{}:u()}),w.jsxs("div",{className:[st.class,T,S,t&&t].filter(_=>_).join(" "),"data-testid":"modal",children:[!k&&w.jsx("button",{className:"ds-modal__closeBtn","data-testid":"modal-close-button",onClick:u,children:w.jsx(Ee,{image:"close",size:"lg"})}),w.jsxs("div",{className:"ds-modal__content",children:[w.jsx("div",{className:"ds-modal__content__title",children:e}),e&&w.jsx(lt,{vertical:"xxxs"}),w.jsx("div",{className:"ds-modal__content__content",children:r})]}),k&&w.jsx(lt,{vertical:"sm"}),!k&&w.jsx(lt,{vertical:"xxs"}),w.jsxs("div",{className:"ds-modal__cta",children:[c&&w.jsx(Sr,{onClick:()=>{u(),c()},children:s}),d&&w.jsx(Sr,{onClick:()=>{u(),d()},children:n})]})]})]}):null};ln.propTypes={firstButtonText:h.string,confirmBtnText:h.string,cancelBtnText:h.string,variant:h.oneOf(st.props.variant.options),elevation:h.oneOf(st.props.elevation.options),isModalOpen:h.bool,title:h.node,content:h.node},ln.displayName="DsModal";const Mi={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},ji={Rounded:"rounded",Squared:"squared"},Ue={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:Mi.Info,options:Object.values(Mi)},id:{type:String},autoClose:{type:Boolean,default:!1},autoCloseTimer:{type:Number,default:4e3},dismissible:{type:Boolean,default:!1},elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:ji.Rounded,options:Object.values(ji)},progressBar:{type:Boolean,default:!0}}},tu={success:"check",danger:"error",warning:"warning",info:"info"},ls=({className:t,type:e=Ue.props.type.default,variant:r=Ue.props.variant.default,id:s,children:n,message:a,autoClose:i=Ue.props.autoClose.default,autoCloseTimer:o=Ue.props.autoCloseTimer.default,dismissible:u=Ue.props.dismissible.default,elevation:c,progressBar:d=Ue.props.progressBar.default,handleClose:p})=>{const[T,S]=F.useState(o),[k,E]=F.useState(!1),[_,g]=F.useState(!0),I=[Ue.class,e&&`${Ue.class}--${e}`,r&&`${Ue.class}--${r}`,c&&`${Ue.class}--elevation-${c}`,t&&t].join(" ");F.useEffect(()=>{!i&&!u&&g(!0);let R;return!k&&i&&(R=setInterval(()=>{S(L=>(L===0&&g(!1),L-100))},100)),()=>{clearInterval(R)}},[k,i,o,_]);const N=()=>{E(!0)},D=()=>{E(!1)},b=R=>{g(!1),p&&p(R)};return _?w.jsxs("div",{className:I,id:s,onMouseEnter:N,onMouseLeave:D,children:[w.jsx(Kt,{bottom:"nano",top:"nano",children:w.jsxs(Dt,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[w.jsx(Be,{children:w.jsx(Ee,{color:e,fill:!0,image:tu[e]})}),w.jsx(Be,{flex:"1",children:w.jsx(Kt,{left:"none",right:"none",space:"nano",children:n??a})}),w.jsx(Be,{children:u?w.jsx("div",{className:`${Ue.class}__button`,onClick:R=>b(R),children:w.jsx(Kt,{children:w.jsx(Ee,{image:"close"})})}):w.jsx(lt,{horizontal:"quark"})})]})}),d&&i&&w.jsx("div",{className:`${Ue.class}__progress-bar ${Ue.class}__progress-bar--${e}`,style:{width:`${T/o*100}%`}})]}):null};ls.propTypes={type:h.oneOf(Ue.props.type.options),id:h.string,variant:h.oneOf(Ue.props.variant.options),message:h.node,autoClose:h.bool,autoCloseTimer:h.number,dismissible:h.bool,elevation:h.oneOf(Ue.props.elevation.options),progressBar:h.bool,handleClose:h.func},ls.displayName="DsNotification";const un={name:"DsPasswordConfirmation",class:"ds-password-confirmation",props:{onChange:{type:Function,default:()=>{}},validationList:{type:Array,default:[{title:"Um número",rule:t=>/\d/.test(t)},{title:"Uma letra maiúscula",rule:t=>/[A-Z]/.test(t)},{title:"Um caractere especial. Ex: @#!?",rule:t=>/[!@#$%^&*()+\-=_[\]{};':"\\|,.<>/?]/.test(t)},{title:"Mínimo 8 caracteres",rule:t=>t.length>=8}]},instructionLabel:{type:String,default:"A senha deverá conter:"}}},cn=({onChange:t=un.props.onChange.default,validationList:e=un.props.validationList.default,instructionLabel:r=un.props.instructionLabel.default})=>{const[s,n]=F.useState(""),[a,i]=F.useState(""),[o,u]=F.useState([]),[c,d]=F.useState({score:0,color:"danger",label:"Fraca"}),[p,T]=F.useState(!1),S=D=>{const b=e.map(R=>R==null?void 0:R.rule(D));return u(b),b},k=D=>{var L,Q,K,ce;n((L=D.currentTarget)==null?void 0:L.value);const b=S((Q=D.currentTarget)==null?void 0:Q.value),R=I(b);t&&t({password:(K=D.currentTarget)==null?void 0:K.value,confirmationPassword:a,isEqual:a===((ce=D.currentTarget)==null?void 0:ce.value),feedback:R})},E=D=>{var L,Q,K;i((L=D.currentTarget)==null?void 0:L.value);const b=S(s),R=I(b);t&&t({password:s,confirmationPassword:(Q=D.currentTarget)==null?void 0:Q.value,isEqual:s===((K=D.currentTarget)==null?void 0:K.value),feedback:R})},_=F.useMemo(()=>s!==a&&p?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,p]),g=D=>{const b={score:D,color:"danger",label:"Fraco"};return D>30&&D<=75&&(b.color="warning",b.label="Médio"),D>=75&&D<100&&(b.color="success",b.label="Boa"),D===100&&(b.color="success-dark",b.label="Forte"),b},I=D=>{const b=D.reduce((K,ce)=>{let U=K;return ce?(U++,U):K},0),R=D==null?void 0:D.length,L=b*100/R||0,Q=g(L);return d(Q),Q},N=()=>w.jsx("ul",{children:e.map((D,b)=>{const R=o[b]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return w.jsxs("li",{className:R,children:[o[b]?w.jsx(Ee,{color:"success-dark",image:"check"}):null,w.jsx(lt,{horizontal:"quark"}),w.jsx(At,{children:D.title})]},b+D.title)})});return w.jsxs(Dt,{className:"ds-password-confirmation",flexDirection:"column",children:[w.jsx(Be,{children:w.jsx(ar,{label:"Senha",name:"password",onChangeHandler:k,type:"password",value:s})}),w.jsx(Be,{children:w.jsx(Zs,{color:c==null?void 0:c.color,label:c==null?void 0:c.label,progress:c==null?void 0:c.score})}),w.jsx(Be,{children:w.jsx(At,{children:r})}),w.jsx(Be,{children:N()}),w.jsx(lt,{vertical:"xxxs"}),w.jsx(Be,{children:w.jsx(ar,{feedback:_.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>T(!0),onChangeHandler:E,onFocusHandler:()=>T(!0),status:_.status,type:"password",value:a})})]})};cn.propTypes={onChange:h.func,validationList:h.array.isRequired,instructionLabel:h.string},cn.displayName="DsPasswordConfirmation";const ut={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},xi=({steps:t,selectedStep:e=ut.props.selectedStep.default,onChange:r})=>{const[s,n]=F.useState(e),a=(i,o)=>{const u=[`${ut.class}__button`];return o!==i&&u.push(`${ut.class}__button--round`),t[i]&&t[i].disabled&&u.push(`${ut.class}__button--disabled`),u.join(" ")};return F.useEffect(()=>{n(e)},[e]),F.useEffect(()=>{r(s)},[s]),w.jsxs("div",{className:ut.class,children:[w.jsxs("span",{className:`${ut.class}__step-counter`,children:["Etapa ",s+1," de ",t==null?void 0:t.length]}),w.jsx("div",{className:`${ut.class}__step`,children:t.map((i,o)=>w.jsx("div",{className:`${ut.class}__content`,children:w.jsx("button",{className:a(o,s),disabled:i.disabled,onClick:()=>n(o),children:w.jsxs("span",{className:`${ut.class}__text`,children:[s===o?w.jsx(Kt,{bottom:"none",left:"nano",right:"nano",top:"none",children:w.jsx(Ee,{className:`${ut.class}__icon`,fill:!0,image:i.icon})}):w.jsx(Ee,{className:`${ut.class}__icon`,fill:!0,image:i.icon}),s===o&&i.label]})})},o))})]})};xi.displayName="DsStepper";const gt={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},Vi=({item:t,columns:e})=>w.jsx("tr",{className:`${gt.class}__row`,children:e.map((r,s)=>{const n=r.align&&`${gt.class}__cell--align-${r.align}`;return w.jsx("td",{children:w.jsx("div",{className:[`${gt.class}__cell`,n,r.className].filter(a=>a).join(" "),children:t&&t[`${r.name}`]})},s)})});Vi.displayName="DsTableRow";const Bi=({columns:t,data:e,className:r})=>w.jsx("div",{className:`${gt.class}__wrapper`,children:w.jsxs("table",{className:[`${gt.class}`,r].filter(s=>s).join(" "),children:[w.jsx("thead",{className:`${gt.class}__head`,children:w.jsx("tr",{className:`${gt.class}__row`,children:t&&t.map((s,n)=>w.jsx("th",{style:{width:s.size},children:w.jsx("div",{className:[`${gt.class}__cell`,s.align&&`${gt.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),w.jsx("tbody",{className:`${gt.class}__body`,children:e&&e.map((s,n)=>w.jsx(Vi,{columns:t,item:s},n))})]})});Bi.displayName="DsTable";const Li={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},jt={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:Li.Primary,options:Object.values(Li)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},ru=({active:t,className:e,color:r,disabled:s,name:n,index:a,title:i,onClick:o})=>{const u=[`${jt.class}__tab`,`${jt.class}__tab-color--${r}`,t&&`${jt.class}__tab--active`,s&&`${jt.class}__tab--disabled`,e&&e].join(" "),c=d=>{o&&!s&&o(d)};return w.jsx("div",{className:u,id:n,onClick:()=>c(a),children:i})},su=({tabs:t,color:e,selectedTab:r=jt.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=F.useState(r),o=u=>{i(u),n&&n(u)};return F.useEffect(()=>i(r),[r]),w.jsxs("div",{className:[jt.class,s&&s].join(" "),children:[w.jsx("div",{className:`${jt.class}__header`,children:t.map((u,c)=>F.createElement(ru,{...u,active:a===c,color:e,index:c,key:c,onClick:()=>o(c)}))}),w.jsx("div",{className:`${jt.class}__content`,children:t[a].content})]})};function Ri({library:t,children:e,theme:r}){return w.jsx("div",{"data-library":t,"data-theme":r,children:w.jsx("div",{className:"ds-theme",children:e})})}Ri.propTypes={library:h.string,children:h.node.isRequired,theme:h.string};const zi={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Gt={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:zi.TopRight,options:Object.values(zi)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},dn=({className:t=Gt.props.className.default,position:e=Gt.props.position.default,fluid:r=Gt.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Gt.class,e?`${Gt.class}--${e}`:"",r?`${Gt.class}--fluid`:"",t&&t].join(" "),i=o=>{n&&n(o)};return w.jsx("div",{className:a,children:s.map(o=>{const u=o.autoClose??!0,c=o.autoCloseTimer??4e3,d=o.dismissible??!0,p=o.elevation??2,T=o.progressBar??!0;return w.jsx(ls,{autoClose:u,autoCloseTimer:c,dismissible:d,elevation:p,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:T,type:o.type},o.id)})})};dn.propTypes={position:h.oneOf(Gt.props.position.options),fluid:h.bool,notifications:h.array,removeNotification:h.func},dn.displayName="DsNotificationList";const us={name:"TwoColumns",class:"ds-two-columns",props:{}},fn=({header:t,main:e,sidebar:r,breadcrumb:s})=>w.jsxs(as,{children:[w.jsxs("div",{className:"ds-grid",children:[w.jsx("div",{className:"ds-grid__row",children:w.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),w.jsxs("div",{className:`${us.class}__content ds-grid__row`,children:[w.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${us.class}__header`,children:t}),w.jsx("div",{className:`${us.class}__main`,children:e})]})}),w.jsx("div",{className:`${us.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:r})]})]}),w.jsx(lt,{vertical:"sm"})]});fn.propTypes={breadcrumb:h.node,header:h.node,main:h.node,sidebar:h.node},fn.displayName="DsTwoColumns";const qi=(t,e)=>{var r;return(r=t==null?void 0:t.errors)==null?void 0:r.reduce((s,n)=>(n.keyword==="errorMessage"||(s={...s,...nu(n,e)}),s),{})},nu=(t,e)=>{const{keyword:r,params:s}=t,n=au(t==null?void 0:t.instancePath);let a="",i=e?e+"."+n:n;if(r.match(/min/)||r.match(/max/))return a=`Tamanho ${r.match(/min/)?"mínimo":"máximo"} de ${s==null?void 0:s.limit}`,i=pn(i),{[i]:{status:!1,message:a}};switch(r){case"required":a="Campo obrigatório",i=pn(i),i=i+"."+(s==null?void 0:s.missingProperty),i.split("")[0]==="."&&(i=i.replace(".",""));break;case"pattern":a="Insira o valor no formato correto";break;case"format":a=`Formato de ${s==null?void 0:s.format} invalido`;break;default:a="Preencha o dado corretamente";break}return i=pn(i),{[i]:{status:!1,message:a}}},au=t=>{let e="";return t.split("")[0]==="/"&&(e=t.replace("/","")),e.replace(/\//g,".")},pn=t=>{const e=t.split("");return e[e.length-1]==="."?(e.pop(),e.join("")):t},Ui=(t,e,r)=>{const s=e.pop(),n=e.reduce((a,i)=>(i in a||(a[i]={}),a[i]),t);s&&(n[s]=r)},Hi=t=>{try{return{isObj:!0,parsedObj:JSON.parse(t)}}catch{return{isObj:!1,parsedObj:void 0}}},iu=t=>{const e=/^[0-9]+$/.test(t);if(t==="true"||t==="false")return JSON.parse(t);if(e)return Number(t);const{isObj:r,parsedObj:s}=Hi(t);return r&&s?s:t},hn=(t,e)=>{var n;if(!t)return null;if(t.$id===e)return t;const r=a=>{if(a)for(const i of Object.values(a)){const o=hn(i,e);if(o)return o}return null};return r(t.properties)||r(t.definitions)||r((n=t.schemas)==null?void 0:n.definitions)||hn(t.items,e)||null},mn=(t,e)=>{var s;const r=(e==null?void 0:e.definitions)||((s=e==null?void 0:e.schemas)==null?void 0:s.definitions);if(!r)return console.error('No definitions found within the schema root or inside the "schemas" key.'),null;for(const n of Object.values(r)){const a=hn(n,t);if(a)return a}return null},Ki=t=>{const e=t.format;return e!=="email"&&e!=="password"?"text":e};function Tr(t,e,r=new WeakSet){if(typeof t!="object"&&typeof e!="object")return Object.is(t,e);if(t===null&&e===null)return!0;if(typeof t!=typeof e)return!1;if(t===e||r.has(t)&&r.has(e))return!0;if(r.add(t),r.add(e),Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(!Tr(t[s],e[s],r))return!1;return!0}if(Array.isArray(t)||Array.isArray(e)||Object.keys(t).length!==Object.keys(e).length)return!1;for(const[s,n]of Object.entries(t))if(!Object.prototype.hasOwnProperty.call(e,s)||!Tr(n,e[s],r))return!1;return!0}var gn={exports:{}},Gi={},ct={},lr={},Or={},le={},Ar={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(I){if(super(),!t.IDENTIFIER.test(I))throw new Error("CodeGen: name must be a valid identifier");this.str=I}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends e{constructor(I){super(),this._items=typeof I=="string"?[I]:I}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const I=this._items[0];return I===""||I==='""'}get str(){var I;return(I=this._str)!==null&&I!==void 0?I:this._str=this._items.reduce((N,D)=>`${N}${D}`,"")}get names(){var I;return(I=this._names)!==null&&I!==void 0?I:this._names=this._items.reduce((N,D)=>(D instanceof r&&(N[D.str]=(N[D.str]||0)+1),N),{})}}t._Code=s,t.nil=new s("");function n(g,...I){const N=[g[0]];let D=0;for(;D<I.length;)o(N,I[D]),N.push(g[++D]);return new s(N)}t._=n;const a=new s("+");function i(g,...I){const N=[S(g[0])];let D=0;for(;D<I.length;)N.push(a),o(N,I[D]),N.push(a,S(g[++D]));return u(N),new s(N)}t.str=i;function o(g,I){I instanceof s?g.push(...I._items):I instanceof r?g.push(I):g.push(p(I))}t.addCodeArg=o;function u(g){let I=1;for(;I<g.length-1;){if(g[I]===a){const N=c(g[I-1],g[I+1]);if(N!==void 0){g.splice(I-1,3,N);continue}g[I++]="+"}I++}}function c(g,I){if(I==='""')return g;if(g==='""')return I;if(typeof g=="string")return I instanceof r||g[g.length-1]!=='"'?void 0:typeof I!="string"?`${g.slice(0,-1)}${I}"`:I[0]==='"'?g.slice(0,-1)+I.slice(1):void 0;if(typeof I=="string"&&I[0]==='"'&&!(g instanceof r))return`"${g}${I.slice(1)}`}function d(g,I){return I.emptyStr()?g:g.emptyStr()?I:i`${g}${I}`}t.strConcat=d;function p(g){return typeof g=="number"||typeof g=="boolean"||g===null?g:S(Array.isArray(g)?g.join(","):g)}function T(g){return new s(S(g))}t.stringify=T;function S(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=S;function k(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new s(`.${g}`):n`[${g}]`}t.getProperty=k;function E(g){if(typeof g=="string"&&t.IDENTIFIER.test(g))return new s(`${g}`);throw new Error(`CodeGen: invalid export name: ${g}, use explicit $id name mapping`)}t.getEsmExportName=E;function _(g){return new s(g.toString())}t.regexpCode=_})(Ar);var yn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const e=Ar;class r extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var s;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(s||(t.UsedValueState=s={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class n{constructor({prefixes:c,parent:d}={}){this._names={},this._prefixes=c,this._parent=d}toName(c){return c instanceof e.Name?c:this.name(c)}name(c){return new e.Name(this._newName(c))}_newName(c){const d=this._names[c]||this._nameGroup(c);return`${c}${d.index++}`}_nameGroup(c){var d,p;if(!((p=(d=this._parent)===null||d===void 0?void 0:d._prefixes)===null||p===void 0)&&p.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}t.Scope=n;class a extends e.Name{constructor(c,d){super(d),this.prefix=c}setValue(c,{property:d,itemIndex:p}){this.value=c,this.scopePath=(0,e._)`.${new e.Name(d)}[${p}]`}}t.ValueScopeName=a;const i=(0,e._)`\n`;class o extends n{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?i:e.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,d){var p;if(d.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const T=this.toName(c),{prefix:S}=T,k=(p=d.key)!==null&&p!==void 0?p:d.ref;let E=this._values[S];if(E){const I=E.get(k);if(I)return I}else E=this._values[S]=new Map;E.set(k,T);const _=this._scope[S]||(this._scope[S]=[]),g=_.length;return _[g]=d.ref,T.setValue(d,{property:S,itemIndex:g}),T}getValue(c,d){const p=this._values[c];if(p)return p.get(d)}scopeRefs(c,d=this._values){return this._reduceValues(d,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,e._)`${c}${p.scopePath}`})}scopeCode(c=this._values,d,p){return this._reduceValues(c,T=>{if(T.value===void 0)throw new Error(`CodeGen: name "${T}" has no value`);return T.value.code},d,p)}_reduceValues(c,d,p={},T){let S=e.nil;for(const k in c){const E=c[k];if(!E)continue;const _=p[k]=p[k]||new Map;E.forEach(g=>{if(_.has(g))return;_.set(g,s.Started);let I=d(g);if(I){const N=this.opts.es5?t.varKinds.var:t.varKinds.const;S=(0,e._)`${S}${N} ${g} = ${I};${this.opts._n}`}else if(I=T==null?void 0:T(g))S=(0,e._)`${S}${I}${this.opts._n}`;else throw new r(g);_.set(g,s.Completed)})}return S}}t.ValueScope=o})(yn),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const e=Ar,r=yn;var s=Ar;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var n=yn;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class a{optimizeNodes(){return this}optimizeNames(l,f){return this}}class i extends a{constructor(l,f,v){super(),this.varKind=l,this.name=f,this.rhs=v}render({es5:l,_n:f}){const v=l?r.varKinds.var:this.varKind,P=this.rhs===void 0?"":` = ${this.rhs}`;return`${v} ${this.name}${P};`+f}optimizeNames(l,f){if(l[this.name.str])return this.rhs&&(this.rhs=W(this.rhs,l,f)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class o extends a{constructor(l,f,v){super(),this.lhs=l,this.rhs=f,this.sideEffects=v}render({_n:l}){return`${this.lhs} = ${this.rhs};`+l}optimizeNames(l,f){if(!(this.lhs instanceof e.Name&&!l[this.lhs.str]&&!this.sideEffects))return this.rhs=W(this.rhs,l,f),this}get names(){const l=this.lhs instanceof e.Name?{}:{...this.lhs.names};return ne(l,this.rhs)}}class u extends o{constructor(l,f,v,P){super(l,v,P),this.op=f}render({_n:l}){return`${this.lhs} ${this.op}= ${this.rhs};`+l}}class c extends a{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`${this.label}:`+l}}class d extends a{constructor(l){super(),this.label=l,this.names={}}render({_n:l}){return`break${this.label?` ${this.label}`:""};`+l}}class p extends a{constructor(l){super(),this.error=l}render({_n:l}){return`throw ${this.error};`+l}get names(){return this.error.names}}class T extends a{constructor(l){super(),this.code=l}render({_n:l}){return`${this.code};`+l}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(l,f){return this.code=W(this.code,l,f),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class S extends a{constructor(l=[]){super(),this.nodes=l}render(l){return this.nodes.reduce((f,v)=>f+v.render(l),"")}optimizeNodes(){const{nodes:l}=this;let f=l.length;for(;f--;){const v=l[f].optimizeNodes();Array.isArray(v)?l.splice(f,1,...v):v?l[f]=v:l.splice(f,1)}return l.length>0?this:void 0}optimizeNames(l,f){const{nodes:v}=this;let P=v.length;for(;P--;){const V=v[P];V.optimizeNames(l,f)||(he(l,V.names),v.splice(P,1))}return v.length>0?this:void 0}get names(){return this.nodes.reduce((l,f)=>G(l,f.names),{})}}class k extends S{render(l){return"{"+l._n+super.render(l)+"}"+l._n}}class E extends S{}class _ extends k{}_.kind="else";class g extends k{constructor(l,f){super(f),this.condition=l}render(l){let f=`if(${this.condition})`+super.render(l);return this.else&&(f+="else "+this.else.render(l)),f}optimizeNodes(){super.optimizeNodes();const l=this.condition;if(l===!0)return this.nodes;let f=this.else;if(f){const v=f.optimizeNodes();f=this.else=Array.isArray(v)?new _(v):v}if(f)return l===!1?f instanceof g?f:f.nodes:this.nodes.length?this:new g(me(l),f instanceof g?[f]:f.nodes);if(!(l===!1||!this.nodes.length))return this}optimizeNames(l,f){var v;if(this.else=(v=this.else)===null||v===void 0?void 0:v.optimizeNames(l,f),!!(super.optimizeNames(l,f)||this.else))return this.condition=W(this.condition,l,f),this}get names(){const l=super.names;return ne(l,this.condition),this.else&&G(l,this.else.names),l}}g.kind="if";class I extends k{}I.kind="for";class N extends I{constructor(l){super(),this.iteration=l}render(l){return`for(${this.iteration})`+super.render(l)}optimizeNames(l,f){if(super.optimizeNames(l,f))return this.iteration=W(this.iteration,l,f),this}get names(){return G(super.names,this.iteration.names)}}class D extends I{constructor(l,f,v,P){super(),this.varKind=l,this.name=f,this.from=v,this.to=P}render(l){const f=l.es5?r.varKinds.var:this.varKind,{name:v,from:P,to:V}=this;return`for(${f} ${v}=${P}; ${v}<${V}; ${v}++)`+super.render(l)}get names(){const l=ne(super.names,this.from);return ne(l,this.to)}}class b extends I{constructor(l,f,v,P){super(),this.loop=l,this.varKind=f,this.name=v,this.iterable=P}render(l){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(l)}optimizeNames(l,f){if(super.optimizeNames(l,f))return this.iterable=W(this.iterable,l,f),this}get names(){return G(super.names,this.iterable.names)}}class R extends k{constructor(l,f,v){super(),this.name=l,this.args=f,this.async=v}render(l){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(l)}}R.kind="func";class L extends S{render(l){return"return "+super.render(l)}}L.kind="return";class Q extends k{render(l){let f="try"+super.render(l);return this.catch&&(f+=this.catch.render(l)),this.finally&&(f+=this.finally.render(l)),f}optimizeNodes(){var l,f;return super.optimizeNodes(),(l=this.catch)===null||l===void 0||l.optimizeNodes(),(f=this.finally)===null||f===void 0||f.optimizeNodes(),this}optimizeNames(l,f){var v,P;return super.optimizeNames(l,f),(v=this.catch)===null||v===void 0||v.optimizeNames(l,f),(P=this.finally)===null||P===void 0||P.optimizeNames(l,f),this}get names(){const l=super.names;return this.catch&&G(l,this.catch.names),this.finally&&G(l,this.finally.names),l}}class K extends k{constructor(l){super(),this.error=l}render(l){return`catch(${this.error})`+super.render(l)}}K.kind="catch";class ce extends k{render(l){return"finally"+super.render(l)}}ce.kind="finally";class U{constructor(l,f={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...f,_n:f.lines?`
|
|
21
|
+
`:""},this._extScope=l,this._scope=new r.Scope({parent:l}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(l){return this._scope.name(l)}scopeName(l){return this._extScope.name(l)}scopeValue(l,f){const v=this._extScope.value(l,f);return(this._values[v.prefix]||(this._values[v.prefix]=new Set)).add(v),v}getScopeValue(l,f){return this._extScope.getValue(l,f)}scopeRefs(l){return this._extScope.scopeRefs(l,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(l,f,v,P){const V=this._scope.toName(f);return v!==void 0&&P&&(this._constants[V.str]=v),this._leafNode(new i(l,V,v)),V}const(l,f,v){return this._def(r.varKinds.const,l,f,v)}let(l,f,v){return this._def(r.varKinds.let,l,f,v)}var(l,f,v){return this._def(r.varKinds.var,l,f,v)}assign(l,f,v){return this._leafNode(new o(l,f,v))}add(l,f){return this._leafNode(new u(l,t.operators.ADD,f))}code(l){return typeof l=="function"?l():l!==e.nil&&this._leafNode(new T(l)),this}object(...l){const f=["{"];for(const[v,P]of l)f.length>1&&f.push(","),f.push(v),(v!==P||this.opts.es5)&&(f.push(":"),(0,e.addCodeArg)(f,P));return f.push("}"),new e._Code(f)}if(l,f,v){if(this._blockNode(new g(l)),f&&v)this.code(f).else().code(v).endIf();else if(f)this.code(f).endIf();else if(v)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(l){return this._elseNode(new g(l))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(g,_)}_for(l,f){return this._blockNode(l),f&&this.code(f).endFor(),this}for(l,f){return this._for(new N(l),f)}forRange(l,f,v,P,V=this.opts.es5?r.varKinds.var:r.varKinds.let){const B=this._scope.toName(l);return this._for(new D(V,B,f,v),()=>P(B))}forOf(l,f,v,P=r.varKinds.const){const V=this._scope.toName(l);if(this.opts.es5){const B=f instanceof e.Name?f:this.var("_arr",f);return this.forRange("_i",0,(0,e._)`${B}.length`,z=>{this.var(V,(0,e._)`${B}[${z}]`),v(V)})}return this._for(new b("of",P,V,f),()=>v(V))}forIn(l,f,v,P=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(l,(0,e._)`Object.keys(${f})`,v);const V=this._scope.toName(l);return this._for(new b("in",P,V,f),()=>v(V))}endFor(){return this._endBlockNode(I)}label(l){return this._leafNode(new c(l))}break(l){return this._leafNode(new d(l))}return(l){const f=new L;if(this._blockNode(f),this.code(l),f.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(L)}try(l,f,v){if(!f&&!v)throw new Error('CodeGen: "try" without "catch" and "finally"');const P=new Q;if(this._blockNode(P),this.code(l),f){const V=this.name("e");this._currNode=P.catch=new K(V),f(V)}return v&&(this._currNode=P.finally=new ce,this.code(v)),this._endBlockNode(K,ce)}throw(l){return this._leafNode(new p(l))}block(l,f){return this._blockStarts.push(this._nodes.length),l&&this.code(l).endBlock(f),this}endBlock(l){const f=this._blockStarts.pop();if(f===void 0)throw new Error("CodeGen: not in self-balancing block");const v=this._nodes.length-f;if(v<0||l!==void 0&&v!==l)throw new Error(`CodeGen: wrong number of nodes: ${v} vs ${l} expected`);return this._nodes.length=f,this}func(l,f=e.nil,v,P){return this._blockNode(new R(l,f,v)),P&&this.code(P).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(l=1){for(;l-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(l){return this._currNode.nodes.push(l),this}_blockNode(l){this._currNode.nodes.push(l),this._nodes.push(l)}_endBlockNode(l,f){const v=this._currNode;if(v instanceof l||f&&v instanceof f)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${f?`${l.kind}/${f.kind}`:l.kind}"`)}_elseNode(l){const f=this._currNode;if(!(f instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=f.else=l,this}get _root(){return this._nodes[0]}get _currNode(){const l=this._nodes;return l[l.length-1]}set _currNode(l){const f=this._nodes;f[f.length-1]=l}}t.CodeGen=U;function G(O,l){for(const f in l)O[f]=(O[f]||0)+(l[f]||0);return O}function ne(O,l){return l instanceof e._CodeOrName?G(O,l.names):O}function W(O,l,f){if(O instanceof e.Name)return v(O);if(!P(O))return O;return new e._Code(O._items.reduce((V,B)=>(B instanceof e.Name&&(B=v(B)),B instanceof e._Code?V.push(...B._items):V.push(B),V),[]));function v(V){const B=f[V.str];return B===void 0||l[V.str]!==1?V:(delete l[V.str],B)}function P(V){return V instanceof e._Code&&V._items.some(B=>B instanceof e.Name&&l[B.str]===1&&f[B.str]!==void 0)}}function he(O,l){for(const f in l)O[f]=(O[f]||0)-(l[f]||0)}function me(O){return typeof O=="boolean"||typeof O=="number"||O===null?!O:(0,e._)`!${M(O)}`}t.not=me;const _e=y(t.operators.AND);function Ie(...O){return O.reduce(_e)}t.and=Ie;const Fe=y(t.operators.OR);function A(...O){return O.reduce(Fe)}t.or=A;function y(O){return(l,f)=>l===e.nil?f:f===e.nil?l:(0,e._)`${M(l)} ${O} ${M(f)}`}function M(O){return O instanceof e.Name?O:(0,e._)`(${O})`}}(le);var H={};Object.defineProperty(H,"__esModule",{value:!0}),H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;const be=le,ou=Ar;function lu(t){const e={};for(const r of t)e[r]=!0;return e}H.toHash=lu;function uu(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Wi(t,e),!Yi(e,t.self.RULES.all))}H.alwaysValidSchema=uu;function Wi(t,e=t.schema){const{opts:r,self:s}=t;if(!r.strictSchema||typeof e=="boolean")return;const n=s.RULES.keywords;for(const a in e)n[a]||eo(t,`unknown keyword: "${a}"`)}H.checkUnknownRules=Wi;function Yi(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}H.schemaHasRules=Yi;function cu(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}H.schemaHasRulesButRef=cu;function du({topSchemaRef:t,schemaPath:e},r,s,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,be._)`${r}`}return(0,be._)`${t}${e}${(0,be.getProperty)(s)}`}H.schemaRefOrVal=du;function fu(t){return Xi(decodeURIComponent(t))}H.unescapeFragment=fu;function pu(t){return encodeURIComponent(vn(t))}H.escapeFragment=pu;function vn(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=vn;function Xi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=Xi;function hu(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}H.eachItem=hu;function Ji({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:s}){return(n,a,i,o)=>{const u=i===void 0?a:i instanceof be.Name?(a instanceof be.Name?t(n,a,i):e(n,a,i),i):a instanceof be.Name?(e(n,i,a),a):r(a,i);return o===be.Name&&!(u instanceof be.Name)?s(n,u):u}}H.mergeEvaluated={props:Ji({mergeNames:(t,e,r)=>t.if((0,be._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,be._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,be._)`${r} || {}`).code((0,be._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,be._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,be._)`${r} || {}`),_n(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Zi}),items:Ji({mergeNames:(t,e,r)=>t.if((0,be._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,be._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,be._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,be._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Zi(t,e){if(e===!0)return t.var("props",!0);const r=t.var("props",(0,be._)`{}`);return e!==void 0&&_n(t,r,e),r}H.evaluatedPropsToName=Zi;function _n(t,e,r){Object.keys(r).forEach(s=>t.assign((0,be._)`${e}${(0,be.getProperty)(s)}`,!0))}H.setEvaluated=_n;const Qi={};function mu(t,e){return t.scopeValue("func",{ref:e,code:Qi[e.code]||(Qi[e.code]=new ou._Code(e.code))})}H.useFunc=mu;var bn;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(bn||(H.Type=bn={}));function gu(t,e,r){if(t instanceof be.Name){const s=e===bn.Num;return r?s?(0,be._)`"[" + ${t} + "]"`:(0,be._)`"['" + ${t} + "']"`:s?(0,be._)`"/" + ${t}`:(0,be._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,be.getProperty)(t).toString():"/"+vn(t)}H.getErrorPath=gu;function eo(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}H.checkStrictMode=eo;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});const He=le,yu={data:new He.Name("data"),valCxt:new He.Name("valCxt"),instancePath:new He.Name("instancePath"),parentData:new He.Name("parentData"),parentDataProperty:new He.Name("parentDataProperty"),rootData:new He.Name("rootData"),dynamicAnchors:new He.Name("dynamicAnchors"),vErrors:new He.Name("vErrors"),errors:new He.Name("errors"),this:new He.Name("this"),self:new He.Name("self"),scope:new He.Name("scope"),json:new He.Name("json"),jsonPos:new He.Name("jsonPos"),jsonLen:new He.Name("jsonLen"),jsonPart:new He.Name("jsonPart")};yt.default=yu,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const e=le,r=H,s=yt;t.keywordError={message:({keyword:_})=>(0,e.str)`must pass "${_}" keyword validation`},t.keyword$DataError={message:({keyword:_,schemaType:g})=>g?(0,e.str)`"${_}" keyword must be ${g} ($data)`:(0,e.str)`"${_}" keyword is invalid ($data)`};function n(_,g=t.keywordError,I,N){const{it:D}=_,{gen:b,compositeRule:R,allErrors:L}=D,Q=p(_,g,I);N??(R||L)?u(b,Q):c(D,(0,e._)`[${Q}]`)}t.reportError=n;function a(_,g=t.keywordError,I){const{it:N}=_,{gen:D,compositeRule:b,allErrors:R}=N,L=p(_,g,I);u(D,L),b||R||c(N,s.default.vErrors)}t.reportExtraError=a;function i(_,g){_.assign(s.default.errors,g),_.if((0,e._)`${s.default.vErrors} !== null`,()=>_.if(g,()=>_.assign((0,e._)`${s.default.vErrors}.length`,g),()=>_.assign(s.default.vErrors,null)))}t.resetErrorsCount=i;function o({gen:_,keyword:g,schemaValue:I,data:N,errsCount:D,it:b}){if(D===void 0)throw new Error("ajv implementation error");const R=_.name("err");_.forRange("i",D,s.default.errors,L=>{_.const(R,(0,e._)`${s.default.vErrors}[${L}]`),_.if((0,e._)`${R}.instancePath === undefined`,()=>_.assign((0,e._)`${R}.instancePath`,(0,e.strConcat)(s.default.instancePath,b.errorPath))),_.assign((0,e._)`${R}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${g}`),b.opts.verbose&&(_.assign((0,e._)`${R}.schema`,I),_.assign((0,e._)`${R}.data`,N))})}t.extendErrors=o;function u(_,g){const I=_.const("err",g);_.if((0,e._)`${s.default.vErrors} === null`,()=>_.assign(s.default.vErrors,(0,e._)`[${I}]`),(0,e._)`${s.default.vErrors}.push(${I})`),_.code((0,e._)`${s.default.errors}++`)}function c(_,g){const{gen:I,validateName:N,schemaEnv:D}=_;D.$async?I.throw((0,e._)`new ${_.ValidationError}(${g})`):(I.assign((0,e._)`${N}.errors`,g),I.return(!1))}const d={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function p(_,g,I){const{createErrors:N}=_.it;return N===!1?(0,e._)`{}`:T(_,g,I)}function T(_,g,I={}){const{gen:N,it:D}=_,b=[S(D,I),k(_,I)];return E(_,g,b),N.object(...b)}function S({errorPath:_},{instancePath:g}){const I=g?(0,e.str)`${_}${(0,r.getErrorPath)(g,r.Type.Str)}`:_;return[s.default.instancePath,(0,e.strConcat)(s.default.instancePath,I)]}function k({keyword:_,it:{errSchemaPath:g}},{schemaPath:I,parentSchema:N}){let D=N?g:(0,e.str)`${g}/${_}`;return I&&(D=(0,e.str)`${D}${(0,r.getErrorPath)(I,r.Type.Str)}`),[d.schemaPath,D]}function E(_,{params:g,message:I},N){const{keyword:D,data:b,schemaValue:R,it:L}=_,{opts:Q,propertyName:K,topSchemaRef:ce,schemaPath:U}=L;N.push([d.keyword,D],[d.params,typeof g=="function"?g(_):g||(0,e._)`{}`]),Q.messages&&N.push([d.message,typeof I=="function"?I(_):I]),Q.verbose&&N.push([d.schema,R],[d.parentSchema,(0,e._)`${ce}${U}`],[s.default.data,b]),K&&N.push([d.propertyName,K])}}(Or),Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const vu=Or,_u=le,bu=yt,$u={message:"boolean schema is false"};function Su(t){const{gen:e,schema:r,validateName:s}=t;r===!1?to(t,!1):typeof r=="object"&&r.$async===!0?e.return(bu.default.data):(e.assign((0,_u._)`${s}.errors`,null),e.return(!0))}lr.topBoolOrEmptySchema=Su;function Eu(t,e){const{gen:r,schema:s}=t;s===!1?(r.var(e,!1),to(t)):r.var(e,!0)}lr.boolOrEmptySchema=Eu;function to(t,e){const{gen:r,data:s}=t,n={gen:r,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,vu.reportError)(n,$u,void 0,e)}var je={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getRules=Wt.isJSONType=void 0;const ku=["string","number","integer","boolean","null","object","array"],wu=new Set(ku);function Cu(t){return typeof t=="string"&&wu.has(t)}Wt.isJSONType=Cu;function Tu(){const t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Wt.getRules=Tu;var It={};Object.defineProperty(It,"__esModule",{value:!0}),It.shouldUseRule=It.shouldUseGroup=It.schemaHasRulesForType=void 0;function Ou({schema:t,self:e},r){const s=e.RULES.types[r];return s&&s!==!0&&ro(t,s)}It.schemaHasRulesForType=Ou;function ro(t,e){return e.rules.some(r=>so(t,r))}It.shouldUseGroup=ro;function so(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(s=>t[s]!==void 0))}It.shouldUseRule=so,Object.defineProperty(je,"__esModule",{value:!0}),je.reportTypeError=je.checkDataTypes=je.checkDataType=je.coerceAndCheckDataType=je.getJSONTypes=je.getSchemaTypes=je.DataType=void 0;const Au=Wt,Du=It,Iu=Or,ie=le,no=H;var ur;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ur||(je.DataType=ur={}));function Nu(t){const e=ao(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}je.getSchemaTypes=Nu;function ao(t){const e=Array.isArray(t)?t:t?[t]:[];if(e.every(Au.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}je.getJSONTypes=ao;function Pu(t,e){const{gen:r,data:s,opts:n}=t,a=Fu(e,n.coerceTypes),i=e.length>0&&!(a.length===0&&e.length===1&&(0,Du.schemaHasRulesForType)(t,e[0]));if(i){const o=Sn(e,s,n.strictNumbers,ur.Wrong);r.if(o,()=>{a.length?Mu(t,e,a):En(t)})}return i}je.coerceAndCheckDataType=Pu;const io=new Set(["string","number","integer","boolean","null"]);function Fu(t,e){return e?t.filter(r=>io.has(r)||e==="array"&&r==="array"):[]}function Mu(t,e,r){const{gen:s,data:n,opts:a}=t,i=s.let("dataType",(0,ie._)`typeof ${n}`),o=s.let("coerced",(0,ie._)`undefined`);a.coerceTypes==="array"&&s.if((0,ie._)`${i} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>s.assign(n,(0,ie._)`${n}[0]`).assign(i,(0,ie._)`typeof ${n}`).if(Sn(e,n,a.strictNumbers),()=>s.assign(o,n))),s.if((0,ie._)`${o} !== undefined`);for(const c of r)(io.has(c)||c==="array"&&a.coerceTypes==="array")&&u(c);s.else(),En(t),s.endIf(),s.if((0,ie._)`${o} !== undefined`,()=>{s.assign(n,o),ju(t,o)});function u(c){switch(c){case"string":s.elseIf((0,ie._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,ie._)`"" + ${n}`).elseIf((0,ie._)`${n} === null`).assign(o,(0,ie._)`""`);return;case"number":s.elseIf((0,ie._)`${i} == "boolean" || ${n} === null
|
|
22
|
+
|| (${i} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,ie._)`+${n}`);return;case"integer":s.elseIf((0,ie._)`${i} === "boolean" || ${n} === null
|
|
23
|
+
|| (${i} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,ie._)`+${n}`);return;case"boolean":s.elseIf((0,ie._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,ie._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":s.elseIf((0,ie._)`${n} === "" || ${n} === 0 || ${n} === false`),s.assign(o,null);return;case"array":s.elseIf((0,ie._)`${i} === "string" || ${i} === "number"
|
|
24
|
+
|| ${i} === "boolean" || ${n} === null`).assign(o,(0,ie._)`[${n}]`)}}}function ju({gen:t,parentData:e,parentDataProperty:r},s){t.if((0,ie._)`${e} !== undefined`,()=>t.assign((0,ie._)`${e}[${r}]`,s))}function $n(t,e,r,s=ur.Correct){const n=s===ur.Correct?ie.operators.EQ:ie.operators.NEQ;let a;switch(t){case"null":return(0,ie._)`${e} ${n} null`;case"array":a=(0,ie._)`Array.isArray(${e})`;break;case"object":a=(0,ie._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":a=i((0,ie._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":a=i();break;default:return(0,ie._)`typeof ${e} ${n} ${t}`}return s===ur.Correct?a:(0,ie.not)(a);function i(o=ie.nil){return(0,ie.and)((0,ie._)`typeof ${e} == "number"`,o,r?(0,ie._)`isFinite(${e})`:ie.nil)}}je.checkDataType=$n;function Sn(t,e,r,s){if(t.length===1)return $n(t[0],e,r,s);let n;const a=(0,no.toHash)(t);if(a.array&&a.object){const i=(0,ie._)`typeof ${e} != "object"`;n=a.null?i:(0,ie._)`!${e} || ${i}`,delete a.null,delete a.array,delete a.object}else n=ie.nil;a.number&&delete a.integer;for(const i in a)n=(0,ie.and)(n,$n(i,e,r,s));return n}je.checkDataTypes=Sn;const xu={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ie._)`{type: ${t}}`:(0,ie._)`{type: ${e}}`};function En(t){const e=Vu(t);(0,Iu.reportError)(e,xu)}je.reportTypeError=En;function Vu(t){const{gen:e,data:r,schema:s}=t,n=(0,no.schemaRefOrVal)(t,s,"type");return{gen:e,keyword:"type",data:r,schema:s.type,schemaCode:n,schemaValue:n,parentSchema:s,params:{},it:t}}var cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.assignDefaults=void 0;const cr=le,Bu=H;function Lu(t,e){const{properties:r,items:s}=t.schema;if(e==="object"&&r)for(const n in r)oo(t,n,r[n].default);else e==="array"&&Array.isArray(s)&&s.forEach((n,a)=>oo(t,a,n.default))}cs.assignDefaults=Lu;function oo(t,e,r){const{gen:s,compositeRule:n,data:a,opts:i}=t;if(r===void 0)return;const o=(0,cr._)`${a}${(0,cr.getProperty)(e)}`;if(n){(0,Bu.checkStrictMode)(t,`default is ignored for: ${o}`);return}let u=(0,cr._)`${o} === undefined`;i.useDefaults==="empty"&&(u=(0,cr._)`${u} || ${o} === null || ${o} === ""`),s.if(u,(0,cr._)`${o} = ${(0,cr.stringify)(r)}`)}var vt={},ue={};Object.defineProperty(ue,"__esModule",{value:!0}),ue.validateUnion=ue.validateArray=ue.usePattern=ue.callValidateCode=ue.schemaProperties=ue.allSchemaProperties=ue.noPropertyInData=ue.propertyInData=ue.isOwnProperty=ue.hasPropFunc=ue.reportMissingProp=ue.checkMissingProp=ue.checkReportMissingProp=void 0;const ke=le,kn=H,xt=yt,Ru=H;function zu(t,e){const{gen:r,data:s,it:n}=t;r.if(Cn(r,s,e,n.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ke._)`${e}`},!0),t.error()})}ue.checkReportMissingProp=zu;function qu({gen:t,data:e,it:{opts:r}},s,n){return(0,ke.or)(...s.map(a=>(0,ke.and)(Cn(t,e,a,r.ownProperties),(0,ke._)`${n} = ${a}`)))}ue.checkMissingProp=qu;function Uu(t,e){t.setParams({missingProperty:e},!0),t.error()}ue.reportMissingProp=Uu;function lo(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}ue.hasPropFunc=lo;function wn(t,e,r){return(0,ke._)`${lo(t)}.call(${e}, ${r})`}ue.isOwnProperty=wn;function Hu(t,e,r,s){const n=(0,ke._)`${e}${(0,ke.getProperty)(r)} !== undefined`;return s?(0,ke._)`${n} && ${wn(t,e,r)}`:n}ue.propertyInData=Hu;function Cn(t,e,r,s){const n=(0,ke._)`${e}${(0,ke.getProperty)(r)} === undefined`;return s?(0,ke.or)(n,(0,ke.not)(wn(t,e,r))):n}ue.noPropertyInData=Cn;function uo(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ue.allSchemaProperties=uo;function Ku(t,e){return uo(e).filter(r=>!(0,kn.alwaysValidSchema)(t,e[r]))}ue.schemaProperties=Ku;function Gu({schemaCode:t,data:e,it:{gen:r,topSchemaRef:s,schemaPath:n,errorPath:a},it:i},o,u,c){const d=c?(0,ke._)`${t}, ${e}, ${s}${n}`:e,p=[[xt.default.instancePath,(0,ke.strConcat)(xt.default.instancePath,a)],[xt.default.parentData,i.parentData],[xt.default.parentDataProperty,i.parentDataProperty],[xt.default.rootData,xt.default.rootData]];i.opts.dynamicRef&&p.push([xt.default.dynamicAnchors,xt.default.dynamicAnchors]);const T=(0,ke._)`${d}, ${r.object(...p)}`;return u!==ke.nil?(0,ke._)`${o}.call(${u}, ${T})`:(0,ke._)`${o}(${T})`}ue.callValidateCode=Gu;const Wu=(0,ke._)`new RegExp`;function Yu({gen:t,it:{opts:e}},r){const s=e.unicodeRegExp?"u":"",{regExp:n}=e.code,a=n(r,s);return t.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,ke._)`${n.code==="new RegExp"?Wu:(0,Ru.useFunc)(t,n)}(${r}, ${s})`})}ue.usePattern=Yu;function Xu(t){const{gen:e,data:r,keyword:s,it:n}=t,a=e.name("valid");if(n.allErrors){const o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(a,!0),i(()=>e.break()),a;function i(o){const u=e.const("len",(0,ke._)`${r}.length`);e.forRange("i",0,u,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:kn.Type.Num},a),e.if((0,ke.not)(a),o)})}}ue.validateArray=Xu;function Ju(t){const{gen:e,schema:r,keyword:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(u=>(0,kn.alwaysValidSchema)(n,u))&&!n.opts.unevaluated)return;const i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((u,c)=>{const d=t.subschema({keyword:s,schemaProp:c,compositeRule:!0},o);e.assign(i,(0,ke._)`${i} || ${o}`),t.mergeValidEvaluated(d,o)||e.if((0,ke.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}ue.validateUnion=Ju,Object.defineProperty(vt,"__esModule",{value:!0}),vt.validateKeywordUsage=vt.validSchemaType=vt.funcKeywordCode=vt.macroKeywordCode=void 0;const Ke=le,Yt=yt,Zu=ue,Qu=Or;function ec(t,e){const{gen:r,keyword:s,schema:n,parentSchema:a,it:i}=t,o=e.macro.call(i.self,n,a,i),u=fo(r,s,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);const c=r.name("valid");t.subschema({schema:o,schemaPath:Ke.nil,errSchemaPath:`${i.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}vt.macroKeywordCode=ec;function tc(t,e){var r;const{gen:s,keyword:n,schema:a,parentSchema:i,$data:o,it:u}=t;sc(u,e);const c=!o&&e.compile?e.compile.call(u.self,a,i,u):e.validate,d=fo(s,n,c),p=s.let("valid");t.block$data(p,T),t.ok((r=e.valid)!==null&&r!==void 0?r:p);function T(){if(e.errors===!1)E(),e.modifying&&co(t),_(()=>t.error());else{const g=e.async?S():k();e.modifying&&co(t),_(()=>rc(t,g))}}function S(){const g=s.let("ruleErrs",null);return s.try(()=>E((0,Ke._)`await `),I=>s.assign(p,!1).if((0,Ke._)`${I} instanceof ${u.ValidationError}`,()=>s.assign(g,(0,Ke._)`${I}.errors`),()=>s.throw(I))),g}function k(){const g=(0,Ke._)`${d}.errors`;return s.assign(g,null),E(Ke.nil),g}function E(g=e.async?(0,Ke._)`await `:Ke.nil){const I=u.opts.passContext?Yt.default.this:Yt.default.self,N=!("compile"in e&&!o||e.schema===!1);s.assign(p,(0,Ke._)`${g}${(0,Zu.callValidateCode)(t,d,I,N)}`,e.modifying)}function _(g){var I;s.if((0,Ke.not)((I=e.valid)!==null&&I!==void 0?I:p),g)}}vt.funcKeywordCode=tc;function co(t){const{gen:e,data:r,it:s}=t;e.if(s.parentData,()=>e.assign(r,(0,Ke._)`${s.parentData}[${s.parentDataProperty}]`))}function rc(t,e){const{gen:r}=t;r.if((0,Ke._)`Array.isArray(${e})`,()=>{r.assign(Yt.default.vErrors,(0,Ke._)`${Yt.default.vErrors} === null ? ${e} : ${Yt.default.vErrors}.concat(${e})`).assign(Yt.default.errors,(0,Ke._)`${Yt.default.vErrors}.length`),(0,Qu.extendErrors)(t)},()=>t.error())}function sc({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function fo(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ke.stringify)(r)})}function nc(t,e,r=!1){return!e.length||e.some(s=>s==="array"?Array.isArray(t):s==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==s||r&&typeof t>"u")}vt.validSchemaType=nc;function ac({schema:t,opts:e,self:r,errSchemaPath:s},n,a){if(Array.isArray(n.keyword)?!n.keyword.includes(a):n.keyword!==a)throw new Error("ajv implementation error");const i=n.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(t,o)))throw new Error(`parent schema must have dependencies of ${a}: ${i.join(",")}`);if(n.validateSchema&&!n.validateSchema(t[a])){const u=`keyword "${a}" value is invalid at path "${s}": `+r.errorsText(n.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(u);else throw new Error(u)}}vt.validateKeywordUsage=ac;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.extendSubschemaMode=Vt.extendSubschemaData=Vt.getSubschema=void 0;const _t=le,po=H;function ic(t,{keyword:e,schemaProp:r,schema:s,schemaPath:n,errSchemaPath:a,topSchemaRef:i}){if(e!==void 0&&s!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){const o=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,_t._)`${t.schemaPath}${(0,_t.getProperty)(e)}${(0,_t.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,po.escapeFragment)(r)}`}}if(s!==void 0){if(n===void 0||a===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:n,topSchemaRef:i,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Vt.getSubschema=ic;function oc(t,e,{dataProp:r,dataPropType:s,data:n,dataTypes:a,propertyName:i}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:o}=e;if(r!==void 0){const{errorPath:c,dataPathArr:d,opts:p}=e,T=o.let("data",(0,_t._)`${e.data}${(0,_t.getProperty)(r)}`,!0);u(T),t.errorPath=(0,_t.str)`${c}${(0,po.getErrorPath)(r,s,p.jsPropertySyntax)}`,t.parentDataProperty=(0,_t._)`${r}`,t.dataPathArr=[...d,t.parentDataProperty]}if(n!==void 0){const c=n instanceof _t.Name?n:o.let("data",n,!0);u(c),i!==void 0&&(t.propertyName=i)}a&&(t.dataTypes=a);function u(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Vt.extendSubschemaData=oc;function lc(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:s,createErrors:n,allErrors:a}){s!==void 0&&(t.compositeRule=s),n!==void 0&&(t.createErrors=n),a!==void 0&&(t.allErrors=a),t.jtdDiscriminator=e,t.jtdMetadata=r}Vt.extendSubschemaMode=lc;var Le={},ho=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var s,n,a;if(Array.isArray(e)){if(s=e.length,s!=r.length)return!1;for(n=s;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),s=a.length,s!==Object.keys(r).length)return!1;for(n=s;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[n]))return!1;for(n=s;n--!==0;){var i=a[n];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r},mo={exports:{}},Bt=mo.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var s=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};ds(e,s,n,t,"",t)};Bt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Bt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Bt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Bt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ds(t,e,r,s,n,a,i,o,u,c){if(s&&typeof s=="object"&&!Array.isArray(s)){e(s,n,a,i,o,u,c);for(var d in s){var p=s[d];if(Array.isArray(p)){if(d in Bt.arrayKeywords)for(var T=0;T<p.length;T++)ds(t,e,r,p[T],n+"/"+d+"/"+T,a,n,d,s,T)}else if(d in Bt.propsKeywords){if(p&&typeof p=="object")for(var S in p)ds(t,e,r,p[S],n+"/"+d+"/"+uc(S),a,n,d,s,S)}else(d in Bt.keywords||t.allKeys&&!(d in Bt.skipKeywords))&&ds(t,e,r,p,n+"/"+d,a,n,d,s)}r(s,n,a,i,o,u,c)}}function uc(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var cc=mo.exports;Object.defineProperty(Le,"__esModule",{value:!0}),Le.getSchemaRefs=Le.resolveUrl=Le.normalizeId=Le._getFullPath=Le.getFullPath=Le.inlineRef=void 0;const dc=H,fc=ho,pc=cc,hc=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function mc(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Tn(t):e?go(t)<=e:!1}Le.inlineRef=mc;const gc=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Tn(t){for(const e in t){if(gc.has(e))return!0;const r=t[e];if(Array.isArray(r)&&r.some(Tn)||typeof r=="object"&&Tn(r))return!0}return!1}function go(t){let e=0;for(const r in t){if(r==="$ref")return 1/0;if(e++,!hc.has(r)&&(typeof t[r]=="object"&&(0,dc.eachItem)(t[r],s=>e+=go(s)),e===1/0))return 1/0}return e}function yo(t,e="",r){r!==!1&&(e=dr(e));const s=t.parse(e);return vo(t,s)}Le.getFullPath=yo;function vo(t,e){return t.serialize(e).split("#")[0]+"#"}Le._getFullPath=vo;const yc=/#\/?$/;function dr(t){return t?t.replace(yc,""):""}Le.normalizeId=dr;function vc(t,e,r){return r=dr(r),t.resolve(e,r)}Le.resolveUrl=vc;const _c=/^[a-z_][-a-z0-9._]*$/i;function bc(t,e){if(typeof t=="boolean")return{};const{schemaId:r,uriResolver:s}=this.opts,n=dr(t[r]||e),a={"":n},i=yo(s,n,!1),o={},u=new Set;return pc(t,{allKeys:!0},(p,T,S,k)=>{if(k===void 0)return;const E=i+T;let _=a[k];typeof p[r]=="string"&&(_=g.call(this,p[r])),I.call(this,p.$anchor),I.call(this,p.$dynamicAnchor),a[T]=_;function g(N){const D=this.opts.uriResolver.resolve;if(N=dr(_?D(_,N):N),u.has(N))throw d(N);u.add(N);let b=this.refs[N];return typeof b=="string"&&(b=this.refs[b]),typeof b=="object"?c(p,b.schema,N):N!==dr(E)&&(N[0]==="#"?(c(p,o[N],N),o[N]=p):this.refs[N]=E),N}function I(N){if(typeof N=="string"){if(!_c.test(N))throw new Error(`invalid anchor "${N}"`);g.call(this,`#${N}`)}}}),o;function c(p,T,S){if(T!==void 0&&!fc(p,T))throw d(S)}function d(p){return new Error(`reference "${p}" resolves to more than one schema`)}}Le.getSchemaRefs=bc,Object.defineProperty(ct,"__esModule",{value:!0}),ct.getData=ct.KeywordCxt=ct.validateFunctionCode=void 0;const _o=lr,bo=je,On=It,fs=je,$c=cs,Dr=vt,An=Vt,Y=le,se=yt,Sc=Le,Nt=H,Ir=Or;function Ec(t){if(ko(t)&&(wo(t),Eo(t))){Cc(t);return}$o(t,()=>(0,_o.topBoolOrEmptySchema)(t))}ct.validateFunctionCode=Ec;function $o({gen:t,validateName:e,schema:r,schemaEnv:s,opts:n},a){n.code.es5?t.func(e,(0,Y._)`${se.default.data}, ${se.default.valCxt}`,s.$async,()=>{t.code((0,Y._)`"use strict"; ${So(r,n)}`),wc(t,n),t.code(a)}):t.func(e,(0,Y._)`${se.default.data}, ${kc(n)}`,s.$async,()=>t.code(So(r,n)).code(a))}function kc(t){return(0,Y._)`{${se.default.instancePath}="", ${se.default.parentData}, ${se.default.parentDataProperty}, ${se.default.rootData}=${se.default.data}${t.dynamicRef?(0,Y._)`, ${se.default.dynamicAnchors}={}`:Y.nil}}={}`}function wc(t,e){t.if(se.default.valCxt,()=>{t.var(se.default.instancePath,(0,Y._)`${se.default.valCxt}.${se.default.instancePath}`),t.var(se.default.parentData,(0,Y._)`${se.default.valCxt}.${se.default.parentData}`),t.var(se.default.parentDataProperty,(0,Y._)`${se.default.valCxt}.${se.default.parentDataProperty}`),t.var(se.default.rootData,(0,Y._)`${se.default.valCxt}.${se.default.rootData}`),e.dynamicRef&&t.var(se.default.dynamicAnchors,(0,Y._)`${se.default.valCxt}.${se.default.dynamicAnchors}`)},()=>{t.var(se.default.instancePath,(0,Y._)`""`),t.var(se.default.parentData,(0,Y._)`undefined`),t.var(se.default.parentDataProperty,(0,Y._)`undefined`),t.var(se.default.rootData,se.default.data),e.dynamicRef&&t.var(se.default.dynamicAnchors,(0,Y._)`{}`)})}function Cc(t){const{schema:e,opts:r,gen:s}=t;$o(t,()=>{r.$comment&&e.$comment&&To(t),Ic(t),s.let(se.default.vErrors,null),s.let(se.default.errors,0),r.unevaluated&&Tc(t),Co(t),Fc(t)})}function Tc(t){const{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,Y._)`${r}.evaluated`),e.if((0,Y._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,Y._)`${t.evaluated}.props`,(0,Y._)`undefined`)),e.if((0,Y._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,Y._)`${t.evaluated}.items`,(0,Y._)`undefined`))}function So(t,e){const r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,Y._)`/*# sourceURL=${r} */`:Y.nil}function Oc(t,e){if(ko(t)&&(wo(t),Eo(t))){Ac(t,e);return}(0,_o.boolOrEmptySchema)(t,e)}function Eo({schema:t,self:e}){if(typeof t=="boolean")return!t;for(const r in t)if(e.RULES.all[r])return!0;return!1}function ko(t){return typeof t.schema!="boolean"}function Ac(t,e){const{schema:r,gen:s,opts:n}=t;n.$comment&&r.$comment&&To(t),Nc(t),Pc(t);const a=s.const("_errs",se.default.errors);Co(t,a),s.var(e,(0,Y._)`${a} === ${se.default.errors}`)}function wo(t){(0,Nt.checkUnknownRules)(t),Dc(t)}function Co(t,e){if(t.opts.jtd)return Oo(t,[],!1,e);const r=(0,bo.getSchemaTypes)(t.schema),s=(0,bo.coerceAndCheckDataType)(t,r);Oo(t,r,!s,e)}function Dc(t){const{schema:e,errSchemaPath:r,opts:s,self:n}=t;e.$ref&&s.ignoreKeywordsWithRef&&(0,Nt.schemaHasRulesButRef)(e,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Ic(t){const{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Nt.checkStrictMode)(t,"default is ignored in the schema root")}function Nc(t){const e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Sc.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Pc(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function To({gen:t,schemaEnv:e,schema:r,errSchemaPath:s,opts:n}){const a=r.$comment;if(n.$comment===!0)t.code((0,Y._)`${se.default.self}.logger.log(${a})`);else if(typeof n.$comment=="function"){const i=(0,Y.str)`${s}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,Y._)`${se.default.self}.opts.$comment(${a}, ${i}, ${o}.schema)`)}}function Fc(t){const{gen:e,schemaEnv:r,validateName:s,ValidationError:n,opts:a}=t;r.$async?e.if((0,Y._)`${se.default.errors} === 0`,()=>e.return(se.default.data),()=>e.throw((0,Y._)`new ${n}(${se.default.vErrors})`)):(e.assign((0,Y._)`${s}.errors`,se.default.vErrors),a.unevaluated&&Mc(t),e.return((0,Y._)`${se.default.errors} === 0`))}function Mc({gen:t,evaluated:e,props:r,items:s}){r instanceof Y.Name&&t.assign((0,Y._)`${e}.props`,r),s instanceof Y.Name&&t.assign((0,Y._)`${e}.items`,s)}function Oo(t,e,r,s){const{gen:n,schema:a,data:i,allErrors:o,opts:u,self:c}=t,{RULES:d}=c;if(a.$ref&&(u.ignoreKeywordsWithRef||!(0,Nt.schemaHasRulesButRef)(a,d))){n.block(()=>No(t,"$ref",d.all.$ref.definition));return}u.jtd||jc(t,e),n.block(()=>{for(const T of d.rules)p(T);p(d.post)});function p(T){(0,On.shouldUseGroup)(a,T)&&(T.type?(n.if((0,fs.checkDataType)(T.type,i,u.strictNumbers)),Ao(t,T),e.length===1&&e[0]===T.type&&r&&(n.else(),(0,fs.reportTypeError)(t)),n.endIf()):Ao(t,T),o||n.if((0,Y._)`${se.default.errors} === ${s||0}`))}}function Ao(t,e){const{gen:r,schema:s,opts:{useDefaults:n}}=t;n&&(0,$c.assignDefaults)(t,e.type),r.block(()=>{for(const a of e.rules)(0,On.shouldUseRule)(s,a)&&No(t,a.keyword,a.definition,e.type)})}function jc(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(xc(t,e),t.opts.allowUnionTypes||Vc(t,e),Bc(t,t.dataTypes))}function xc(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Do(t.dataTypes,r)||Dn(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Rc(t,e)}}function Vc(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Dn(t,"use allowUnionTypes to allow union type keyword")}function Bc(t,e){const r=t.self.RULES.all;for(const s in r){const n=r[s];if(typeof n=="object"&&(0,On.shouldUseRule)(t.schema,n)){const{type:a}=n.definition;a.length&&!a.some(i=>Lc(e,i))&&Dn(t,`missing type "${a.join(",")}" for keyword "${s}"`)}}}function Lc(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Do(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Rc(t,e){const r=[];for(const s of t.dataTypes)Do(e,s)?r.push(s):e.includes("integer")&&s==="number"&&r.push("integer");t.dataTypes=r}function Dn(t,e){const r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Nt.checkStrictMode)(t,e,t.opts.strictTypes)}class Io{constructor(e,r,s){if((0,Dr.validateKeywordUsage)(e,r,s),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=s,this.data=e.data,this.schema=e.schema[s],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Nt.schemaRefOrVal)(e,this.schema,s,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Po(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Dr.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${s} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",se.default.errors))}result(e,r,s){this.failResult((0,Y.not)(e),r,s)}failResult(e,r,s){this.gen.if(e),s?s():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,Y.not)(e),void 0,r)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:r}=this;this.fail((0,Y._)`${r} !== undefined && (${(0,Y.or)(this.invalid$data(),e)})`)}error(e,r,s){if(r){this.setParams(r),this._error(e,s),this.setParams({});return}this._error(e,s)}_error(e,r){(e?Ir.reportExtraError:Ir.reportError)(this,this.def.error,r)}$dataError(){(0,Ir.reportError)(this,this.def.$dataError||Ir.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ir.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,s=Y.nil){this.gen.block(()=>{this.check$data(e,s),r()})}check$data(e=Y.nil,r=Y.nil){if(!this.$data)return;const{gen:s,schemaCode:n,schemaType:a,def:i}=this;s.if((0,Y.or)((0,Y._)`${n} === undefined`,r)),e!==Y.nil&&s.assign(e,!0),(a.length||i.validateSchema)&&(s.elseIf(this.invalid$data()),this.$dataError(),e!==Y.nil&&s.assign(e,!1)),s.else()}invalid$data(){const{gen:e,schemaCode:r,schemaType:s,def:n,it:a}=this;return(0,Y.or)(i(),o());function i(){if(s.length){if(!(r instanceof Y.Name))throw new Error("ajv implementation error");const u=Array.isArray(s)?s:[s];return(0,Y._)`${(0,fs.checkDataTypes)(u,r,a.opts.strictNumbers,fs.DataType.Wrong)}`}return Y.nil}function o(){if(n.validateSchema){const u=e.scopeValue("validate$data",{ref:n.validateSchema});return(0,Y._)`!${u}(${r})`}return Y.nil}}subschema(e,r){const s=(0,An.getSubschema)(this.it,e);(0,An.extendSubschemaData)(s,this.it,e),(0,An.extendSubschemaMode)(s,e);const n={...this.it,...s,items:void 0,props:void 0};return Oc(n,r),n}mergeEvaluated(e,r){const{it:s,gen:n}=this;s.opts.unevaluated&&(s.props!==!0&&e.props!==void 0&&(s.props=Nt.mergeEvaluated.props(n,e.props,s.props,r)),s.items!==!0&&e.items!==void 0&&(s.items=Nt.mergeEvaluated.items(n,e.items,s.items,r)))}mergeValidEvaluated(e,r){const{it:s,gen:n}=this;if(s.opts.unevaluated&&(s.props!==!0||s.items!==!0))return n.if(r,()=>this.mergeEvaluated(e,Y.Name)),!0}}ct.KeywordCxt=Io;function No(t,e,r,s){const n=new Io(t,r,e);"code"in r?r.code(n,s):n.$data&&r.validate?(0,Dr.funcKeywordCode)(n,r):"macro"in r?(0,Dr.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,Dr.funcKeywordCode)(n,r)}const zc=/^\/(?:[^~]|~0|~1)*$/,qc=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Po(t,{dataLevel:e,dataNames:r,dataPathArr:s}){let n,a;if(t==="")return se.default.rootData;if(t[0]==="/"){if(!zc.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);n=t,a=se.default.rootData}else{const c=qc.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);const d=+c[1];if(n=c[2],n==="#"){if(d>=e)throw new Error(u("property/index",d));return s[e-d]}if(d>e)throw new Error(u("data",d));if(a=r[e-d],!n)return a}let i=a;const o=n.split("/");for(const c of o)c&&(a=(0,Y._)`${a}${(0,Y.getProperty)((0,Nt.unescapeJsonPointer)(c))}`,i=(0,Y._)`${i} && ${a}`);return i;function u(c,d){return`Cannot access ${c} ${d} levels up, current level is ${e}`}}ct.getData=Po;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});class Uc extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}Nr.default=Uc;var Pr={};Object.defineProperty(Pr,"__esModule",{value:!0});const In=Le;class Hc extends Error{constructor(e,r,s,n){super(n||`can't resolve reference ${s} from id ${r}`),this.missingRef=(0,In.resolveUrl)(e,r,s),this.missingSchema=(0,In.normalizeId)((0,In.getFullPath)(e,this.missingRef))}}Pr.default=Hc;var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.resolveSchema=Xe.getCompilingSchema=Xe.resolveRef=Xe.compileSchema=Xe.SchemaEnv=void 0;const dt=le,Kc=Nr,Xt=yt,ft=Le,Fo=H,Gc=ct;class ps{constructor(e){var r;this.refs={},this.dynamicAnchors={};let s;typeof e.schema=="object"&&(s=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,ft.normalizeId)(s==null?void 0:s[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=s==null?void 0:s.$async,this.refs={}}}Xe.SchemaEnv=ps;function Nn(t){const e=Mo.call(this,t);if(e)return e;const r=(0,ft.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:s,lines:n}=this.opts.code,{ownProperties:a}=this.opts,i=new dt.CodeGen(this.scope,{es5:s,lines:n,ownProperties:a});let o;t.$async&&(o=i.scopeValue("Error",{ref:Kc.default,code:(0,dt._)`require("ajv/dist/runtime/validation_error").default`}));const u=i.scopeName("validate");t.validateName=u;const c={gen:i,allErrors:this.opts.allErrors,data:Xt.default.data,parentData:Xt.default.parentData,parentDataProperty:Xt.default.parentDataProperty,dataNames:[Xt.default.data],dataPathArr:[dt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,dt.stringify)(t.schema)}:{ref:t.schema}),validateName:u,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:dt.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,dt._)`""`,opts:this.opts,self:this};let d;try{this._compilations.add(t),(0,Gc.validateFunctionCode)(c),i.optimize(this.opts.code.optimize);const p=i.toString();d=`${i.scopeRefs(Xt.default.scope)}return ${p}`,this.opts.code.process&&(d=this.opts.code.process(d,t));const S=new Function(`${Xt.default.self}`,`${Xt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(u,{ref:S}),S.errors=null,S.schema=t.schema,S.schemaEnv=t,t.$async&&(S.$async=!0),this.opts.code.source===!0&&(S.source={validateName:u,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){const{props:k,items:E}=c;S.evaluated={props:k instanceof dt.Name?void 0:k,items:E instanceof dt.Name?void 0:E,dynamicProps:k instanceof dt.Name,dynamicItems:E instanceof dt.Name},S.source&&(S.source.evaluated=(0,dt.stringify)(S.evaluated))}return t.validate=S,t}catch(p){throw delete t.validate,delete t.validateName,d&&this.logger.error("Error compiling schema, function code:",d),p}finally{this._compilations.delete(t)}}Xe.compileSchema=Nn;function Wc(t,e,r){var s;r=(0,ft.resolveUrl)(this.opts.uriResolver,e,r);const n=t.refs[r];if(n)return n;let a=Jc.call(this,t,r);if(a===void 0){const i=(s=t.localRefs)===null||s===void 0?void 0:s[r],{schemaId:o}=this.opts;i&&(a=new ps({schema:i,schemaId:o,root:t,baseId:e}))}if(a!==void 0)return t.refs[r]=Yc.call(this,a)}Xe.resolveRef=Wc;function Yc(t){return(0,ft.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Nn.call(this,t)}function Mo(t){for(const e of this._compilations)if(Xc(e,t))return e}Xe.getCompilingSchema=Mo;function Xc(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Jc(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||hs.call(this,t,e)}function hs(t,e){const r=this.opts.uriResolver.parse(e),s=(0,ft._getFullPath)(this.opts.uriResolver,r);let n=(0,ft.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&s===n)return Pn.call(this,r,t);const a=(0,ft.normalizeId)(s),i=this.refs[a]||this.schemas[a];if(typeof i=="string"){const o=hs.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Pn.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Nn.call(this,i),a===(0,ft.normalizeId)(e)){const{schema:o}=i,{schemaId:u}=this.opts,c=o[u];return c&&(n=(0,ft.resolveUrl)(this.opts.uriResolver,n,c)),new ps({schema:o,schemaId:u,root:t,baseId:n})}return Pn.call(this,r,i)}}Xe.resolveSchema=hs;const Zc=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Pn(t,{baseId:e,schema:r,root:s}){var n;if(((n=t.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const u=r[(0,Fo.unescapeFragment)(o)];if(u===void 0)return;r=u;const c=typeof r=="object"&&r[this.opts.schemaId];!Zc.has(o)&&c&&(e=(0,ft.resolveUrl)(this.opts.uriResolver,e,c))}let a;if(typeof r!="boolean"&&r.$ref&&!(0,Fo.schemaHasRulesButRef)(r,this.RULES)){const o=(0,ft.resolveUrl)(this.opts.uriResolver,e,r.$ref);a=hs.call(this,s,o)}const{schemaId:i}=this.opts;if(a=a||new ps({schema:r,schemaId:i,root:s,baseId:e}),a.schema!==a.root.schema)return a}const Qc={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Fn={},Mn={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,s){s(e)})(Sl,function(r){function s(){for(var $=arguments.length,m=Array($),C=0;C<$;C++)m[C]=arguments[C];if(m.length>1){m[0]=m[0].slice(0,-1);for(var x=m.length-1,j=1;j<x;++j)m[j]=m[j].slice(1,-1);return m[x]=m[x].slice(1),m.join("")}else return m[0]}function n($){return"(?:"+$+")"}function a($){return $===void 0?"undefined":$===null?"null":Object.prototype.toString.call($).split(" ").pop().split("]").shift().toLowerCase()}function i($){return $.toUpperCase()}function o($){return $!=null?$ instanceof Array?$:typeof $.length!="number"||$.split||$.setInterval||$.call?[$]:Array.prototype.slice.call($):[]}function u($,m){var C=$;if(m)for(var x in m)C[x]=m[x];return C}function c($){var m="[A-Za-z]",C="[0-9]",x=s(C,"[A-Fa-f]"),j=n(n("%[EFef]"+x+"%"+x+x+"%"+x+x)+"|"+n("%[89A-Fa-f]"+x+"%"+x+x)+"|"+n("%"+x+x)),J="[\\:\\/\\?\\#\\[\\]\\@]",ee="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",fe=s(J,ee),we=$?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ne=$?"[\\uE000-\\uF8FF]":"[]",de=s(m,C,"[\\-\\.\\_\\~]",we);n(m+s(m,C,"[\\+\\-\\.]")+"*"),n(n(j+"|"+s(de,ee,"[\\:]"))+"*");var Se=n(n("25[0-5]")+"|"+n("2[0-4]"+C)+"|"+n("1"+C+C)+"|"+n("0?[1-9]"+C)+"|0?0?"+C),Pe=n(Se+"\\."+Se+"\\."+Se+"\\."+Se),ae=n(x+"{1,4}"),Ce=n(n(ae+"\\:"+ae)+"|"+Pe),Me=n(n(ae+"\\:")+"{6}"+Ce),Te=n("\\:\\:"+n(ae+"\\:")+"{5}"+Ce),Rt=n(n(ae)+"?\\:\\:"+n(ae+"\\:")+"{4}"+Ce),St=n(n(n(ae+"\\:")+"{0,1}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{3}"+Ce),Et=n(n(n(ae+"\\:")+"{0,2}"+ae)+"?\\:\\:"+n(ae+"\\:")+"{2}"+Ce),$r=n(n(n(ae+"\\:")+"{0,3}"+ae)+"?\\:\\:"+ae+"\\:"+Ce),sr=n(n(n(ae+"\\:")+"{0,4}"+ae)+"?\\:\\:"+Ce),it=n(n(n(ae+"\\:")+"{0,5}"+ae)+"?\\:\\:"+ae),kt=n(n(n(ae+"\\:")+"{0,6}"+ae)+"?\\:\\:"),nr=n([Me,Te,Rt,St,Et,$r,sr,it,kt].join("|")),Ft=n(n(de+"|"+j)+"+");n("[vV]"+x+"+\\."+s(de,ee,"[\\:]")+"+"),n(n(j+"|"+s(de,ee))+"*");var Hr=n(j+"|"+s(de,ee,"[\\:\\@]"));return n(n(j+"|"+s(de,ee,"[\\@]"))+"+"),n(n(Hr+"|"+s("[\\/\\?]",Ne))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",de,ee),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",de,ee),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",de,ee),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",de,ee),"g"),NOT_QUERY:new RegExp(s("[^\\%]",de,ee,"[\\:\\@\\/\\?]",Ne),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",de,ee,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",de,ee),"g"),UNRESERVED:new RegExp(de,"g"),OTHER_CHARS:new RegExp(s("[^\\%]",de,fe),"g"),PCT_ENCODED:new RegExp(j,"g"),IPV4ADDRESS:new RegExp("^("+Pe+")$"),IPV6ADDRESS:new RegExp("^\\[?("+nr+")"+n(n("\\%25|\\%(?!"+x+"{2})")+"("+Ft+")")+"?\\]?$")}}var d=c(!1),p=c(!0),T=function(){function $(m,C){var x=[],j=!0,J=!1,ee=void 0;try{for(var fe=m[Symbol.iterator](),we;!(j=(we=fe.next()).done)&&(x.push(we.value),!(C&&x.length===C));j=!0);}catch(Ne){J=!0,ee=Ne}finally{try{!j&&fe.return&&fe.return()}finally{if(J)throw ee}}return x}return function(m,C){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return $(m,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function($){if(Array.isArray($)){for(var m=0,C=Array($.length);m<$.length;m++)C[m]=$[m];return C}else return Array.from($)},k=2147483647,E=36,_=1,g=26,I=38,N=700,D=72,b=128,R="-",L=/^xn--/,Q=/[^\0-\x7E]/,K=/[\x2E\u3002\uFF0E\uFF61]/g,ce={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=E-_,G=Math.floor,ne=String.fromCharCode;function W($){throw new RangeError(ce[$])}function he($,m){for(var C=[],x=$.length;x--;)C[x]=m($[x]);return C}function me($,m){var C=$.split("@"),x="";C.length>1&&(x=C[0]+"@",$=C[1]),$=$.replace(K,".");var j=$.split("."),J=he(j,m).join(".");return x+J}function _e($){for(var m=[],C=0,x=$.length;C<x;){var j=$.charCodeAt(C++);if(j>=55296&&j<=56319&&C<x){var J=$.charCodeAt(C++);(J&64512)==56320?m.push(((j&1023)<<10)+(J&1023)+65536):(m.push(j),C--)}else m.push(j)}return m}var Ie=function(m){return String.fromCodePoint.apply(String,S(m))},Fe=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:E},A=function(m,C){return m+22+75*(m<26)-((C!=0)<<5)},y=function(m,C,x){var j=0;for(m=x?G(m/N):m>>1,m+=G(m/C);m>U*g>>1;j+=E)m=G(m/U);return G(j+(U+1)*m/(m+I))},M=function(m){var C=[],x=m.length,j=0,J=b,ee=D,fe=m.lastIndexOf(R);fe<0&&(fe=0);for(var we=0;we<fe;++we)m.charCodeAt(we)>=128&&W("not-basic"),C.push(m.charCodeAt(we));for(var Ne=fe>0?fe+1:0;Ne<x;){for(var de=j,Se=1,Pe=E;;Pe+=E){Ne>=x&&W("invalid-input");var ae=Fe(m.charCodeAt(Ne++));(ae>=E||ae>G((k-j)/Se))&&W("overflow"),j+=ae*Se;var Ce=Pe<=ee?_:Pe>=ee+g?g:Pe-ee;if(ae<Ce)break;var Me=E-Ce;Se>G(k/Me)&&W("overflow"),Se*=Me}var Te=C.length+1;ee=y(j-de,Te,de==0),G(j/Te)>k-J&&W("overflow"),J+=G(j/Te),j%=Te,C.splice(j++,0,J)}return String.fromCodePoint.apply(String,C)},O=function(m){var C=[];m=_e(m);var x=m.length,j=b,J=0,ee=D,fe=!0,we=!1,Ne=void 0;try{for(var de=m[Symbol.iterator](),Se;!(fe=(Se=de.next()).done);fe=!0){var Pe=Se.value;Pe<128&&C.push(ne(Pe))}}catch(Kr){we=!0,Ne=Kr}finally{try{!fe&&de.return&&de.return()}finally{if(we)throw Ne}}var ae=C.length,Ce=ae;for(ae&&C.push(R);Ce<x;){var Me=k,Te=!0,Rt=!1,St=void 0;try{for(var Et=m[Symbol.iterator](),$r;!(Te=($r=Et.next()).done);Te=!0){var sr=$r.value;sr>=j&&sr<Me&&(Me=sr)}}catch(Kr){Rt=!0,St=Kr}finally{try{!Te&&Et.return&&Et.return()}finally{if(Rt)throw St}}var it=Ce+1;Me-j>G((k-J)/it)&&W("overflow"),J+=(Me-j)*it,j=Me;var kt=!0,nr=!1,Ft=void 0;try{for(var Hr=m[Symbol.iterator](),vl;!(kt=(vl=Hr.next()).done);kt=!0){var _l=vl.value;if(_l<j&&++J>k&&W("overflow"),_l==j){for(var Ds=J,Is=E;;Is+=E){var Ns=Is<=ee?_:Is>=ee+g?g:Is-ee;if(Ds<Ns)break;var bl=Ds-Ns,$l=E-Ns;C.push(ne(A(Ns+bl%$l,0))),Ds=G(bl/$l)}C.push(ne(A(Ds,0))),ee=y(J,it,Ce==ae),J=0,++Ce}}}catch(Kr){nr=!0,Ft=Kr}finally{try{!kt&&Hr.return&&Hr.return()}finally{if(nr)throw Ft}}++J,++j}return C.join("")},l=function(m){return me(m,function(C){return L.test(C)?M(C.slice(4).toLowerCase()):C})},f=function(m){return me(m,function(C){return Q.test(C)?"xn--"+O(C):C})},v={version:"2.1.0",ucs2:{decode:_e,encode:Ie},decode:M,encode:O,toASCII:f,toUnicode:l},P={};function V($){var m=$.charCodeAt(0),C=void 0;return m<16?C="%0"+m.toString(16).toUpperCase():m<128?C="%"+m.toString(16).toUpperCase():m<2048?C="%"+(m>>6|192).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase():C="%"+(m>>12|224).toString(16).toUpperCase()+"%"+(m>>6&63|128).toString(16).toUpperCase()+"%"+(m&63|128).toString(16).toUpperCase(),C}function B($){for(var m="",C=0,x=$.length;C<x;){var j=parseInt($.substr(C+1,2),16);if(j<128)m+=String.fromCharCode(j),C+=3;else if(j>=194&&j<224){if(x-C>=6){var J=parseInt($.substr(C+4,2),16);m+=String.fromCharCode((j&31)<<6|J&63)}else m+=$.substr(C,6);C+=6}else if(j>=224){if(x-C>=9){var ee=parseInt($.substr(C+4,2),16),fe=parseInt($.substr(C+7,2),16);m+=String.fromCharCode((j&15)<<12|(ee&63)<<6|fe&63)}else m+=$.substr(C,9);C+=9}else m+=$.substr(C,3),C+=3}return m}function z($,m){function C(x){var j=B(x);return j.match(m.UNRESERVED)?j:x}return $.scheme&&($.scheme=String($.scheme).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_SCHEME,"")),$.userinfo!==void 0&&($.userinfo=String($.userinfo).replace(m.PCT_ENCODED,C).replace(m.NOT_USERINFO,V).replace(m.PCT_ENCODED,i)),$.host!==void 0&&($.host=String($.host).replace(m.PCT_ENCODED,C).toLowerCase().replace(m.NOT_HOST,V).replace(m.PCT_ENCODED,i)),$.path!==void 0&&($.path=String($.path).replace(m.PCT_ENCODED,C).replace($.scheme?m.NOT_PATH:m.NOT_PATH_NOSCHEME,V).replace(m.PCT_ENCODED,i)),$.query!==void 0&&($.query=String($.query).replace(m.PCT_ENCODED,C).replace(m.NOT_QUERY,V).replace(m.PCT_ENCODED,i)),$.fragment!==void 0&&($.fragment=String($.fragment).replace(m.PCT_ENCODED,C).replace(m.NOT_FRAGMENT,V).replace(m.PCT_ENCODED,i)),$}function te($){return $.replace(/^0*(.*)/,"$1")||"0"}function q($,m){var C=$.match(m.IPV4ADDRESS)||[],x=T(C,2),j=x[1];return j?j.split(".").map(te).join("."):$}function pe($,m){var C=$.match(m.IPV6ADDRESS)||[],x=T(C,3),j=x[1],J=x[2];if(j){for(var ee=j.toLowerCase().split("::").reverse(),fe=T(ee,2),we=fe[0],Ne=fe[1],de=Ne?Ne.split(":").map(te):[],Se=we.split(":").map(te),Pe=m.IPV4ADDRESS.test(Se[Se.length-1]),ae=Pe?7:8,Ce=Se.length-ae,Me=Array(ae),Te=0;Te<ae;++Te)Me[Te]=de[Te]||Se[Ce+Te]||"";Pe&&(Me[ae-1]=q(Me[ae-1],m));var Rt=Me.reduce(function(it,kt,nr){if(!kt||kt==="0"){var Ft=it[it.length-1];Ft&&Ft.index+Ft.length===nr?Ft.length++:it.push({index:nr,length:1})}return it},[]),St=Rt.sort(function(it,kt){return kt.length-it.length})[0],Et=void 0;if(St&&St.length>1){var $r=Me.slice(0,St.index),sr=Me.slice(St.index+St.length);Et=$r.join(":")+"::"+sr.join(":")}else Et=Me.join(":");return J&&(Et+="%"+J),Et}else return $}var tt=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ht="".match(/(){0}/)[1]===void 0;function Ge($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C={},x=m.iri!==!1?p:d;m.reference==="suffix"&&($=(m.scheme?m.scheme+":":"")+"//"+$);var j=$.match(tt);if(j){ht?(C.scheme=j[1],C.userinfo=j[3],C.host=j[4],C.port=parseInt(j[5],10),C.path=j[6]||"",C.query=j[7],C.fragment=j[8],isNaN(C.port)&&(C.port=j[5])):(C.scheme=j[1]||void 0,C.userinfo=$.indexOf("@")!==-1?j[3]:void 0,C.host=$.indexOf("//")!==-1?j[4]:void 0,C.port=parseInt(j[5],10),C.path=j[6]||"",C.query=$.indexOf("?")!==-1?j[7]:void 0,C.fragment=$.indexOf("#")!==-1?j[8]:void 0,isNaN(C.port)&&(C.port=$.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?j[4]:void 0)),C.host&&(C.host=pe(q(C.host,x),x)),C.scheme===void 0&&C.userinfo===void 0&&C.host===void 0&&C.port===void 0&&!C.path&&C.query===void 0?C.reference="same-document":C.scheme===void 0?C.reference="relative":C.fragment===void 0?C.reference="absolute":C.reference="uri",m.reference&&m.reference!=="suffix"&&m.reference!==C.reference&&(C.error=C.error||"URI is not a "+m.reference+" reference.");var J=P[(m.scheme||C.scheme||"").toLowerCase()];if(!m.unicodeSupport&&(!J||!J.unicodeSupport)){if(C.host&&(m.domainHost||J&&J.domainHost))try{C.host=v.toASCII(C.host.replace(x.PCT_ENCODED,B).toLowerCase())}catch(ee){C.error=C.error||"Host's domain name can not be converted to ASCII via punycode: "+ee}z(C,d)}else z(C,x);J&&J.parse&&J.parse(C,m)}else C.error=C.error||"URI can not be parsed.";return C}function er($,m){var C=m.iri!==!1?p:d,x=[];return $.userinfo!==void 0&&(x.push($.userinfo),x.push("@")),$.host!==void 0&&x.push(pe(q(String($.host),C),C).replace(C.IPV6ADDRESS,function(j,J,ee){return"["+J+(ee?"%25"+ee:"")+"]"})),(typeof $.port=="number"||typeof $.port=="string")&&(x.push(":"),x.push(String($.port))),x.length?x.join(""):void 0}var Pt=/^\.\.?\//,yr=/^\/\.(\/|$)/,vr=/^\/\.\.(\/|$)/,Rr=/^\/?(?:.|\n)*?(?=\/|$)/;function bt($){for(var m=[];$.length;)if($.match(Pt))$=$.replace(Pt,"");else if($.match(yr))$=$.replace(yr,"/");else if($.match(vr))$=$.replace(vr,"/"),m.pop();else if($==="."||$==="..")$="";else{var C=$.match(Rr);if(C){var x=C[0];$=$.slice(x.length),m.push(x)}else throw new Error("Unexpected dot segment condition")}return m.join("")}function Ze($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=m.iri?p:d,x=[],j=P[(m.scheme||$.scheme||"").toLowerCase()];if(j&&j.serialize&&j.serialize($,m),$.host&&!C.IPV6ADDRESS.test($.host)){if(m.domainHost||j&&j.domainHost)try{$.host=m.iri?v.toUnicode($.host):v.toASCII($.host.replace(C.PCT_ENCODED,B).toLowerCase())}catch(fe){$.error=$.error||"Host's domain name can not be converted to "+(m.iri?"Unicode":"ASCII")+" via punycode: "+fe}}z($,C),m.reference!=="suffix"&&$.scheme&&(x.push($.scheme),x.push(":"));var J=er($,m);if(J!==void 0&&(m.reference!=="suffix"&&x.push("//"),x.push(J),$.path&&$.path.charAt(0)!=="/"&&x.push("/")),$.path!==void 0){var ee=$.path;!m.absolutePath&&(!j||!j.absolutePath)&&(ee=bt(ee)),J===void 0&&(ee=ee.replace(/^\/\//,"/%2F")),x.push(ee)}return $.query!==void 0&&(x.push("?"),x.push($.query)),$.fragment!==void 0&&(x.push("#"),x.push($.fragment)),x.join("")}function _r($,m){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=arguments[3],j={};return x||($=Ge(Ze($,C),C),m=Ge(Ze(m,C),C)),C=C||{},!C.tolerant&&m.scheme?(j.scheme=m.scheme,j.userinfo=m.userinfo,j.host=m.host,j.port=m.port,j.path=bt(m.path||""),j.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(j.userinfo=m.userinfo,j.host=m.host,j.port=m.port,j.path=bt(m.path||""),j.query=m.query):(m.path?(m.path.charAt(0)==="/"?j.path=bt(m.path):(($.userinfo!==void 0||$.host!==void 0||$.port!==void 0)&&!$.path?j.path="/"+m.path:$.path?j.path=$.path.slice(0,$.path.lastIndexOf("/")+1)+m.path:j.path=m.path,j.path=bt(j.path)),j.query=m.query):(j.path=$.path,m.query!==void 0?j.query=m.query:j.query=$.query),j.userinfo=$.userinfo,j.host=$.host,j.port=$.port),j.scheme=$.scheme),j.fragment=m.fragment,j}function zr($,m,C){var x=u({scheme:"null"},C);return Ze(_r(Ge($,x),Ge(m,x),x,!0),x)}function tr($,m){return typeof $=="string"?$=Ze(Ge($,m),m):a($)==="object"&&($=Ge(Ze($,m),m)),$}function qr($,m,C){return typeof $=="string"?$=Ze(Ge($,C),C):a($)==="object"&&($=Ze($,C)),typeof m=="string"?m=Ze(Ge(m,C),C):a(m)==="object"&&(m=Ze(m,C)),$===m}function As($,m){return $&&$.toString().replace(!m||!m.iri?d.ESCAPE:p.ESCAPE,V)}function at($,m){return $&&$.toString().replace(!m||!m.iri?d.PCT_ENCODED:p.PCT_ENCODED,B)}var rr={scheme:"http",domainHost:!0,parse:function(m,C){return m.host||(m.error=m.error||"HTTP URIs must have a host."),m},serialize:function(m,C){var x=String(m.scheme).toLowerCase()==="https";return(m.port===(x?443:80)||m.port==="")&&(m.port=void 0),m.path||(m.path="/"),m}},cl={scheme:"https",domainHost:rr.domainHost,parse:rr.parse,serialize:rr.serialize};function dl($){return typeof $.secure=="boolean"?$.secure:String($.scheme).toLowerCase()==="wss"}var Ur={scheme:"ws",domainHost:!0,parse:function(m,C){var x=m;return x.secure=dl(x),x.resourceName=(x.path||"/")+(x.query?"?"+x.query:""),x.path=void 0,x.query=void 0,x},serialize:function(m,C){if((m.port===(dl(m)?443:80)||m.port==="")&&(m.port=void 0),typeof m.secure=="boolean"&&(m.scheme=m.secure?"wss":"ws",m.secure=void 0),m.resourceName){var x=m.resourceName.split("?"),j=T(x,2),J=j[0],ee=j[1];m.path=J&&J!=="/"?J:void 0,m.query=ee,m.resourceName=void 0}return m.fragment=void 0,m}},fl={scheme:"wss",domainHost:Ur.domainHost,parse:Ur.parse,serialize:Ur.serialize},Jf={},pl="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$t="[0-9A-Fa-f]",Zf=n(n("%[EFef]"+$t+"%"+$t+$t+"%"+$t+$t)+"|"+n("%[89A-Fa-f]"+$t+"%"+$t+$t)+"|"+n("%"+$t+$t)),Qf="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ep="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",tp=s(ep,'[\\"\\\\]'),rp="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",sp=new RegExp(pl,"g"),br=new RegExp(Zf,"g"),np=new RegExp(s("[^]",Qf,"[\\.]",'[\\"]',tp),"g"),hl=new RegExp(s("[^]",pl,rp),"g"),ap=hl;function _a($){var m=B($);return m.match(sp)?m:$}var ml={scheme:"mailto",parse:function(m,C){var x=m,j=x.to=x.path?x.path.split(","):[];if(x.path=void 0,x.query){for(var J=!1,ee={},fe=x.query.split("&"),we=0,Ne=fe.length;we<Ne;++we){var de=fe[we].split("=");switch(de[0]){case"to":for(var Se=de[1].split(","),Pe=0,ae=Se.length;Pe<ae;++Pe)j.push(Se[Pe]);break;case"subject":x.subject=at(de[1],C);break;case"body":x.body=at(de[1],C);break;default:J=!0,ee[at(de[0],C)]=at(de[1],C);break}}J&&(x.headers=ee)}x.query=void 0;for(var Ce=0,Me=j.length;Ce<Me;++Ce){var Te=j[Ce].split("@");if(Te[0]=at(Te[0]),C.unicodeSupport)Te[1]=at(Te[1],C).toLowerCase();else try{Te[1]=v.toASCII(at(Te[1],C).toLowerCase())}catch(Rt){x.error=x.error||"Email address's domain name can not be converted to ASCII via punycode: "+Rt}j[Ce]=Te.join("@")}return x},serialize:function(m,C){var x=m,j=o(m.to);if(j){for(var J=0,ee=j.length;J<ee;++J){var fe=String(j[J]),we=fe.lastIndexOf("@"),Ne=fe.slice(0,we).replace(br,_a).replace(br,i).replace(np,V),de=fe.slice(we+1);try{de=C.iri?v.toUnicode(de):v.toASCII(at(de,C).toLowerCase())}catch(Ce){x.error=x.error||"Email address's domain name can not be converted to "+(C.iri?"Unicode":"ASCII")+" via punycode: "+Ce}j[J]=Ne+"@"+de}x.path=j.join(",")}var Se=m.headers=m.headers||{};m.subject&&(Se.subject=m.subject),m.body&&(Se.body=m.body);var Pe=[];for(var ae in Se)Se[ae]!==Jf[ae]&&Pe.push(ae.replace(br,_a).replace(br,i).replace(hl,V)+"="+Se[ae].replace(br,_a).replace(br,i).replace(ap,V));return Pe.length&&(x.query=Pe.join("&")),x}},ip=/^([^\:]+)\:(.*)/,gl={scheme:"urn",parse:function(m,C){var x=m.path&&m.path.match(ip),j=m;if(x){var J=C.scheme||j.scheme||"urn",ee=x[1].toLowerCase(),fe=x[2],we=J+":"+(C.nid||ee),Ne=P[we];j.nid=ee,j.nss=fe,j.path=void 0,Ne&&(j=Ne.parse(j,C))}else j.error=j.error||"URN can not be parsed.";return j},serialize:function(m,C){var x=C.scheme||m.scheme||"urn",j=m.nid,J=x+":"+(C.nid||j),ee=P[J];ee&&(m=ee.serialize(m,C));var fe=m,we=m.nss;return fe.path=(j||C.nid)+":"+we,fe}},op=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,yl={scheme:"urn:uuid",parse:function(m,C){var x=m;return x.uuid=x.nss,x.nss=void 0,!C.tolerant&&(!x.uuid||!x.uuid.match(op))&&(x.error=x.error||"UUID is not valid."),x},serialize:function(m,C){var x=m;return x.nss=(m.uuid||"").toLowerCase(),x}};P[rr.scheme]=rr,P[cl.scheme]=cl,P[Ur.scheme]=Ur,P[fl.scheme]=fl,P[ml.scheme]=ml,P[gl.scheme]=gl,P[yl.scheme]=yl,r.SCHEMES=P,r.pctEncChar=V,r.pctDecChars=B,r.parse=Ge,r.removeDotSegments=bt,r.serialize=Ze,r.resolveComponents=_r,r.resolve=zr,r.normalize=tr,r.equal=qr,r.escapeComponent=As,r.unescapeComponent=at,Object.defineProperty(r,"__esModule",{value:!0})})})(Mn,Mn.exports);var ed=Mn.exports;Object.defineProperty(Fn,"__esModule",{value:!0});const jo=ed;jo.code='require("ajv/dist/runtime/uri").default',Fn.default=jo,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ct;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=le;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=Nr,n=Pr,a=Wt,i=Xe,o=le,u=Le,c=je,d=H,p=Qc,T=Fn,S=(A,y)=>new RegExp(A,y);S.code="new RegExp";const k=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},I=200;function N(A){var y,M,O,l,f,v,P,V,B,z,te,q,pe,tt,ht,Ge,er,Pt,yr,vr,Rr,bt,Ze,_r,zr;const tr=A.strict,qr=(y=A.code)===null||y===void 0?void 0:y.optimize,As=qr===!0||qr===void 0?1:qr||0,at=(O=(M=A.code)===null||M===void 0?void 0:M.regExp)!==null&&O!==void 0?O:S,rr=(l=A.uriResolver)!==null&&l!==void 0?l:T.default;return{strictSchema:(v=(f=A.strictSchema)!==null&&f!==void 0?f:tr)!==null&&v!==void 0?v:!0,strictNumbers:(V=(P=A.strictNumbers)!==null&&P!==void 0?P:tr)!==null&&V!==void 0?V:!0,strictTypes:(z=(B=A.strictTypes)!==null&&B!==void 0?B:tr)!==null&&z!==void 0?z:"log",strictTuples:(q=(te=A.strictTuples)!==null&&te!==void 0?te:tr)!==null&&q!==void 0?q:"log",strictRequired:(tt=(pe=A.strictRequired)!==null&&pe!==void 0?pe:tr)!==null&&tt!==void 0?tt:!1,code:A.code?{...A.code,optimize:As,regExp:at}:{optimize:As,regExp:at},loopRequired:(ht=A.loopRequired)!==null&&ht!==void 0?ht:I,loopEnum:(Ge=A.loopEnum)!==null&&Ge!==void 0?Ge:I,meta:(er=A.meta)!==null&&er!==void 0?er:!0,messages:(Pt=A.messages)!==null&&Pt!==void 0?Pt:!0,inlineRefs:(yr=A.inlineRefs)!==null&&yr!==void 0?yr:!0,schemaId:(vr=A.schemaId)!==null&&vr!==void 0?vr:"$id",addUsedSchema:(Rr=A.addUsedSchema)!==null&&Rr!==void 0?Rr:!0,validateSchema:(bt=A.validateSchema)!==null&&bt!==void 0?bt:!0,validateFormats:(Ze=A.validateFormats)!==null&&Ze!==void 0?Ze:!0,unicodeRegExp:(_r=A.unicodeRegExp)!==null&&_r!==void 0?_r:!0,int32range:(zr=A.int32range)!==null&&zr!==void 0?zr:!0,uriResolver:rr}}class D{constructor(y={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,y=this.opts={...y,...N(y)};const{es5:M,lines:O}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:E,es5:M,lines:O}),this.logger=G(y.logger);const l=y.validateFormats;y.validateFormats=!1,this.RULES=(0,a.getRules)(),b.call(this,_,y,"NOT SUPPORTED"),b.call(this,g,y,"DEPRECATED","warn"),this._metaOpts=ce.call(this),y.formats&&Q.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),y.keywords&&K.call(this,y.keywords),typeof y.meta=="object"&&this.addMetaSchema(y.meta),L.call(this),y.validateFormats=l}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:y,meta:M,schemaId:O}=this.opts;let l=p;O==="id"&&(l={...p},l.id=l.$id,delete l.$id),M&&y&&this.addMetaSchema(l,l[O],!1)}defaultMeta(){const{meta:y,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof y=="object"?y[M]||y:void 0}validate(y,M){let O;if(typeof y=="string"){if(O=this.getSchema(y),!O)throw new Error(`no schema with key or ref "${y}"`)}else O=this.compile(y);const l=O(M);return"$async"in O||(this.errors=O.errors),l}compile(y,M){const O=this._addSchema(y,M);return O.validate||this._compileSchemaEnv(O)}compileAsync(y,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:O}=this.opts;return l.call(this,y,M);async function l(z,te){await f.call(this,z.$schema);const q=this._addSchema(z,te);return q.validate||v.call(this,q)}async function f(z){z&&!this.getSchema(z)&&await l.call(this,{$ref:z},!0)}async function v(z){try{return this._compileSchemaEnv(z)}catch(te){if(!(te instanceof n.default))throw te;return P.call(this,te),await V.call(this,te.missingSchema),v.call(this,z)}}function P({missingSchema:z,missingRef:te}){if(this.refs[z])throw new Error(`AnySchema ${z} is loaded but ${te} cannot be resolved`)}async function V(z){const te=await B.call(this,z);this.refs[z]||await f.call(this,te.$schema),this.refs[z]||this.addSchema(te,z,M)}async function B(z){const te=this._loading[z];if(te)return te;try{return await(this._loading[z]=O(z))}finally{delete this._loading[z]}}}addSchema(y,M,O,l=this.opts.validateSchema){if(Array.isArray(y)){for(const v of y)this.addSchema(v,void 0,O,l);return this}let f;if(typeof y=="object"){const{schemaId:v}=this.opts;if(f=y[v],f!==void 0&&typeof f!="string")throw new Error(`schema ${v} must be string`)}return M=(0,u.normalizeId)(M||f),this._checkUnique(M),this.schemas[M]=this._addSchema(y,O,M,l,!0),this}addMetaSchema(y,M,O=this.opts.validateSchema){return this.addSchema(y,M,!0,O),this}validateSchema(y,M){if(typeof y=="boolean")return!0;let O;if(O=y.$schema,O!==void 0&&typeof O!="string")throw new Error("$schema must be a string");if(O=O||this.opts.defaultMeta||this.defaultMeta(),!O)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const l=this.validate(O,y);if(!l&&M){const f="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(f);else throw new Error(f)}return l}getSchema(y){let M;for(;typeof(M=R.call(this,y))=="string";)y=M;if(M===void 0){const{schemaId:O}=this.opts,l=new i.SchemaEnv({schema:{},schemaId:O});if(M=i.resolveSchema.call(this,l,y),!M)return;this.refs[y]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(y){if(y instanceof RegExp)return this._removeAllSchemas(this.schemas,y),this._removeAllSchemas(this.refs,y),this;switch(typeof y){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=R.call(this,y);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[y],delete this.refs[y],this}case"object":{const M=y;this._cache.delete(M);let O=y[this.opts.schemaId];return O&&(O=(0,u.normalizeId)(O),delete this.schemas[O],delete this.refs[O]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(y){for(const M of y)this.addKeyword(M);return this}addKeyword(y,M){let O;if(typeof y=="string")O=y,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=O);else if(typeof y=="object"&&M===void 0){if(M=y,O=M.keyword,Array.isArray(O)&&!O.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(W.call(this,O,M),!M)return(0,d.eachItem)(O,f=>he.call(this,f)),this;_e.call(this,M);const l={...M,type:(0,c.getJSONTypes)(M.type),schemaType:(0,c.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(O,l.type.length===0?f=>he.call(this,f,l):f=>l.type.forEach(v=>he.call(this,f,l,v))),this}getKeyword(y){const M=this.RULES.all[y];return typeof M=="object"?M.definition:!!M}removeKeyword(y){const{RULES:M}=this;delete M.keywords[y],delete M.all[y];for(const O of M.rules){const l=O.rules.findIndex(f=>f.keyword===y);l>=0&&O.rules.splice(l,1)}return this}addFormat(y,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[y]=M,this}errorsText(y=this.errors,{separator:M=", ",dataVar:O="data"}={}){return!y||y.length===0?"No errors":y.map(l=>`${O}${l.instancePath} ${l.message}`).reduce((l,f)=>l+M+f)}$dataMetaSchema(y,M){const O=this.RULES.all;y=JSON.parse(JSON.stringify(y));for(const l of M){const f=l.split("/").slice(1);let v=y;for(const P of f)v=v[P];for(const P in O){const V=O[P];if(typeof V!="object")continue;const{$data:B}=V.definition,z=v[P];B&&z&&(v[P]=Fe(z))}}return y}_removeAllSchemas(y,M){for(const O in y){const l=y[O];(!M||M.test(O))&&(typeof l=="string"?delete y[O]:l&&!l.meta&&(this._cache.delete(l.schema),delete y[O]))}}_addSchema(y,M,O,l=this.opts.validateSchema,f=this.opts.addUsedSchema){let v;const{schemaId:P}=this.opts;if(typeof y=="object")v=y[P];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof y!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(y);if(V!==void 0)return V;O=(0,u.normalizeId)(v||O);const B=u.getSchemaRefs.call(this,y,O);return V=new i.SchemaEnv({schema:y,schemaId:P,meta:M,baseId:O,localRefs:B}),this._cache.set(V.schema,V),f&&!O.startsWith("#")&&(O&&this._checkUnique(O),this.refs[O]=V),l&&this.validateSchema(y,!0),V}_checkUnique(y){if(this.schemas[y]||this.refs[y])throw new Error(`schema with key or id "${y}" already exists`)}_compileSchemaEnv(y){if(y.meta?this._compileMetaSchema(y):i.compileSchema.call(this,y),!y.validate)throw new Error("ajv implementation error");return y.validate}_compileMetaSchema(y){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,y)}finally{this.opts=M}}}D.ValidationError=s.default,D.MissingRefError=n.default,t.default=D;function b(A,y,M,O="error"){for(const l in A){const f=l;f in y&&this.logger[O](`${M}: option ${l}. ${A[f]}`)}}function R(A){return A=(0,u.normalizeId)(A),this.schemas[A]||this.refs[A]}function L(){const A=this.opts.schemas;if(A)if(Array.isArray(A))this.addSchema(A);else for(const y in A)this.addSchema(A[y],y)}function Q(){for(const A in this.opts.formats){const y=this.opts.formats[A];y&&this.addFormat(A,y)}}function K(A){if(Array.isArray(A)){this.addVocabulary(A);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const y in A){const M=A[y];M.keyword||(M.keyword=y),this.addKeyword(M)}}function ce(){const A={...this.opts};for(const y of k)delete A[y];return A}const U={log(){},warn(){},error(){}};function G(A){if(A===!1)return U;if(A===void 0)return console;if(A.log&&A.warn&&A.error)return A;throw new Error("logger must implement log, warn and error methods")}const ne=/^[a-z_$][a-z0-9_$:-]*$/i;function W(A,y){const{RULES:M}=this;if((0,d.eachItem)(A,O=>{if(M.keywords[O])throw new Error(`Keyword ${O} is already defined`);if(!ne.test(O))throw new Error(`Keyword ${O} has invalid name`)}),!!y&&y.$data&&!("code"in y||"validate"in y))throw new Error('$data keyword must have "code" or "validate" function')}function he(A,y,M){var O;const l=y==null?void 0:y.post;if(M&&l)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:f}=this;let v=l?f.post:f.rules.find(({type:V})=>V===M);if(v||(v={type:M,rules:[]},f.rules.push(v)),f.keywords[A]=!0,!y)return;const P={keyword:A,definition:{...y,type:(0,c.getJSONTypes)(y.type),schemaType:(0,c.getJSONTypes)(y.schemaType)}};y.before?me.call(this,v,P,y.before):v.rules.push(P),f.all[A]=P,(O=y.implements)===null||O===void 0||O.forEach(V=>this.addKeyword(V))}function me(A,y,M){const O=A.rules.findIndex(l=>l.keyword===M);O>=0?A.rules.splice(O,0,y):(A.rules.push(y),this.logger.warn(`rule ${M} is not defined`))}function _e(A){let{metaSchema:y}=A;y!==void 0&&(A.$data&&this.opts.$data&&(y=Fe(y)),A.validateSchema=this.compile(y,!0))}const Ie={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Fe(A){return{anyOf:[A,Ie]}}}(Gi);var jn={},xn={},Vn={};Object.defineProperty(Vn,"__esModule",{value:!0});const td={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Vn.default=td;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.callRef=Jt.getValidate=void 0;const rd=Pr,xo=ue,Je=le,fr=yt,Vo=Xe,ms=H,sd={keyword:"$ref",schemaType:"string",code(t){const{gen:e,schema:r,it:s}=t,{baseId:n,schemaEnv:a,validateName:i,opts:o,self:u}=s,{root:c}=a;if((r==="#"||r==="#/")&&n===c.baseId)return p();const d=Vo.resolveRef.call(u,c,n,r);if(d===void 0)throw new rd.default(s.opts.uriResolver,n,r);if(d instanceof Vo.SchemaEnv)return T(d);return S(d);function p(){if(a===c)return gs(t,i,a,a.$async);const k=e.scopeValue("root",{ref:c});return gs(t,(0,Je._)`${k}.validate`,c,c.$async)}function T(k){const E=Bo(t,k);gs(t,E,k,k.$async)}function S(k){const E=e.scopeValue("schema",o.code.source===!0?{ref:k,code:(0,Je.stringify)(k)}:{ref:k}),_=e.name("valid"),g=t.subschema({schema:k,dataTypes:[],schemaPath:Je.nil,topSchemaRef:E,errSchemaPath:r},_);t.mergeEvaluated(g),t.ok(_)}}};function Bo(t,e){const{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,Je._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Jt.getValidate=Bo;function gs(t,e,r,s){const{gen:n,it:a}=t,{allErrors:i,schemaEnv:o,opts:u}=a,c=u.passContext?fr.default.this:Je.nil;s?d():p();function d(){if(!o.$async)throw new Error("async schema referenced by sync schema");const k=n.let("valid");n.try(()=>{n.code((0,Je._)`await ${(0,xo.callValidateCode)(t,e,c)}`),S(e),i||n.assign(k,!0)},E=>{n.if((0,Je._)`!(${E} instanceof ${a.ValidationError})`,()=>n.throw(E)),T(E),i||n.assign(k,!1)}),t.ok(k)}function p(){t.result((0,xo.callValidateCode)(t,e,c),()=>S(e),()=>T(e))}function T(k){const E=(0,Je._)`${k}.errors`;n.assign(fr.default.vErrors,(0,Je._)`${fr.default.vErrors} === null ? ${E} : ${fr.default.vErrors}.concat(${E})`),n.assign(fr.default.errors,(0,Je._)`${fr.default.vErrors}.length`)}function S(k){var E;if(!a.opts.unevaluated)return;const _=(E=r==null?void 0:r.validate)===null||E===void 0?void 0:E.evaluated;if(a.props!==!0)if(_&&!_.dynamicProps)_.props!==void 0&&(a.props=ms.mergeEvaluated.props(n,_.props,a.props));else{const g=n.var("props",(0,Je._)`${k}.evaluated.props`);a.props=ms.mergeEvaluated.props(n,g,a.props,Je.Name)}if(a.items!==!0)if(_&&!_.dynamicItems)_.items!==void 0&&(a.items=ms.mergeEvaluated.items(n,_.items,a.items));else{const g=n.var("items",(0,Je._)`${k}.evaluated.items`);a.items=ms.mergeEvaluated.items(n,g,a.items,Je.Name)}}}Jt.callRef=gs,Jt.default=sd,Object.defineProperty(xn,"__esModule",{value:!0});const nd=Vn,ad=Jt,id=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",nd.default,ad.default];xn.default=id;var Bn={},Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});const ys=le,Lt=ys.operators,vs={maximum:{okStr:"<=",ok:Lt.LTE,fail:Lt.GT},minimum:{okStr:">=",ok:Lt.GTE,fail:Lt.LT},exclusiveMaximum:{okStr:"<",ok:Lt.LT,fail:Lt.GTE},exclusiveMinimum:{okStr:">",ok:Lt.GT,fail:Lt.LTE}},od={message:({keyword:t,schemaCode:e})=>(0,ys.str)`must be ${vs[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,ys._)`{comparison: ${vs[t].okStr}, limit: ${e}}`},ld={keyword:Object.keys(vs),type:"number",schemaType:"number",$data:!0,error:od,code(t){const{keyword:e,data:r,schemaCode:s}=t;t.fail$data((0,ys._)`${r} ${vs[e].fail} ${s} || isNaN(${r})`)}};Ln.default=ld;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});const Fr=le,ud={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:t})=>(0,Fr.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Fr._)`{multipleOf: ${t}}`},code(t){const{gen:e,data:r,schemaCode:s,it:n}=t,a=n.opts.multipleOfPrecision,i=e.let("res"),o=a?(0,Fr._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:(0,Fr._)`${i} !== parseInt(${i})`;t.fail$data((0,Fr._)`(${s} === 0 || (${i} = ${r}/${s}, ${o}))`)}};Rn.default=ud;var zn={},qn={};Object.defineProperty(qn,"__esModule",{value:!0});function Lo(t){const e=t.length;let r=0,s=0,n;for(;s<e;)r++,n=t.charCodeAt(s++),n>=55296&&n<=56319&&s<e&&(n=t.charCodeAt(s),(n&64512)===56320&&s++);return r}qn.default=Lo,Lo.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(zn,"__esModule",{value:!0});const Zt=le,cd=H,dd=qn,fd={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxLength"?"more":"fewer";return(0,Zt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Zt._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s,it:n}=t,a=e==="maxLength"?Zt.operators.GT:Zt.operators.LT,i=n.opts.unicode===!1?(0,Zt._)`${r}.length`:(0,Zt._)`${(0,cd.useFunc)(t.gen,dd.default)}(${r})`;t.fail$data((0,Zt._)`${i} ${a} ${s}`)}};zn.default=fd;var Un={};Object.defineProperty(Un,"__esModule",{value:!0});const pd=ue,_s=le,hd={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,_s.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,_s._)`{pattern: ${t}}`},code(t){const{data:e,$data:r,schema:s,schemaCode:n,it:a}=t,i=a.opts.unicodeRegExp?"u":"",o=r?(0,_s._)`(new RegExp(${n}, ${i}))`:(0,pd.usePattern)(t,s);t.fail$data((0,_s._)`!${o}.test(${e})`)}};Un.default=hd;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const Mr=le,md={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxProperties"?"more":"fewer";return(0,Mr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Mr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxProperties"?Mr.operators.GT:Mr.operators.LT;t.fail$data((0,Mr._)`Object.keys(${r}).length ${n} ${s}`)}};Hn.default=md;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const jr=ue,xr=le,gd=H,yd={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:t}})=>(0,xr.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,xr._)`{missingProperty: ${t}}`},code(t){const{gen:e,schema:r,schemaCode:s,data:n,$data:a,it:i}=t,{opts:o}=i;if(!a&&r.length===0)return;const u=r.length>=o.loopRequired;if(i.allErrors?c():d(),o.strictRequired){const S=t.parentSchema.properties,{definedProperties:k}=t.it;for(const E of r)if((S==null?void 0:S[E])===void 0&&!k.has(E)){const _=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${E}" is not defined at "${_}" (strictRequired)`;(0,gd.checkStrictMode)(i,g,i.opts.strictRequired)}}function c(){if(u||a)t.block$data(xr.nil,p);else for(const S of r)(0,jr.checkReportMissingProp)(t,S)}function d(){const S=e.let("missing");if(u||a){const k=e.let("valid",!0);t.block$data(k,()=>T(S,k)),t.ok(k)}else e.if((0,jr.checkMissingProp)(t,r,S)),(0,jr.reportMissingProp)(t,S),e.else()}function p(){e.forOf("prop",s,S=>{t.setParams({missingProperty:S}),e.if((0,jr.noPropertyInData)(e,n,S,o.ownProperties),()=>t.error())})}function T(S,k){t.setParams({missingProperty:S}),e.forOf(S,s,()=>{e.assign(k,(0,jr.propertyInData)(e,n,S,o.ownProperties)),e.if((0,xr.not)(k),()=>{t.error(),e.break()})},xr.nil)}}};Kn.default=yd;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const Vr=le,vd={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:t,schemaCode:e}){const r=t==="maxItems"?"more":"fewer";return(0,Vr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,Vr._)`{limit: ${t}}`},code(t){const{keyword:e,data:r,schemaCode:s}=t,n=e==="maxItems"?Vr.operators.GT:Vr.operators.LT;t.fail$data((0,Vr._)`${r}.length ${n} ${s}`)}};Gn.default=vd;var Wn={},Br={};Object.defineProperty(Br,"__esModule",{value:!0});const Ro=ho;Ro.code='require("ajv/dist/runtime/equal").default',Br.default=Ro,Object.defineProperty(Wn,"__esModule",{value:!0});const Yn=je,Re=le,_d=H,bd=Br,$d={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:t,j:e}})=>(0,Re.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Re._)`{i: ${t}, j: ${e}}`},code(t){const{gen:e,data:r,$data:s,schema:n,parentSchema:a,schemaCode:i,it:o}=t;if(!s&&!n)return;const u=e.let("valid"),c=a.items?(0,Yn.getSchemaTypes)(a.items):[];t.block$data(u,d,(0,Re._)`${i} === false`),t.ok(u);function d(){const k=e.let("i",(0,Re._)`${r}.length`),E=e.let("j");t.setParams({i:k,j:E}),e.assign(u,!0),e.if((0,Re._)`${k} > 1`,()=>(p()?T:S)(k,E))}function p(){return c.length>0&&!c.some(k=>k==="object"||k==="array")}function T(k,E){const _=e.name("item"),g=(0,Yn.checkDataTypes)(c,_,o.opts.strictNumbers,Yn.DataType.Wrong),I=e.const("indices",(0,Re._)`{}`);e.for((0,Re._)`;${k}--;`,()=>{e.let(_,(0,Re._)`${r}[${k}]`),e.if(g,(0,Re._)`continue`),c.length>1&&e.if((0,Re._)`typeof ${_} == "string"`,(0,Re._)`${_} += "_"`),e.if((0,Re._)`typeof ${I}[${_}] == "number"`,()=>{e.assign(E,(0,Re._)`${I}[${_}]`),t.error(),e.assign(u,!1).break()}).code((0,Re._)`${I}[${_}] = ${k}`)})}function S(k,E){const _=(0,_d.useFunc)(e,bd.default),g=e.name("outer");e.label(g).for((0,Re._)`;${k}--;`,()=>e.for((0,Re._)`${E} = ${k}; ${E}--;`,()=>e.if((0,Re._)`${_}(${r}[${k}], ${r}[${E}])`,()=>{t.error(),e.assign(u,!1).break(g)})))}}};Wn.default=$d;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Jn=le,Sd=H,Ed=Br,kd={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:t})=>(0,Jn._)`{allowedValue: ${t}}`},code(t){const{gen:e,data:r,$data:s,schemaCode:n,schema:a}=t;s||a&&typeof a=="object"?t.fail$data((0,Jn._)`!${(0,Sd.useFunc)(e,Ed.default)}(${r}, ${n})`):t.fail((0,Jn._)`${a} !== ${r}`)}};Xn.default=kd;var Zn={};Object.defineProperty(Zn,"__esModule",{value:!0});const Lr=le,wd=H,Cd=Br,Td={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Lr._)`{allowedValues: ${t}}`},code(t){const{gen:e,data:r,$data:s,schema:n,schemaCode:a,it:i}=t;if(!s&&n.length===0)throw new Error("enum must have non-empty array");const o=n.length>=i.opts.loopEnum;let u;const c=()=>u??(u=(0,wd.useFunc)(e,Cd.default));let d;if(o||s)d=e.let("valid"),t.block$data(d,p);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const S=e.const("vSchema",a);d=(0,Lr.or)(...n.map((k,E)=>T(S,E)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",a,S=>e.if((0,Lr._)`${c()}(${r}, ${S})`,()=>e.assign(d,!0).break()))}function T(S,k){const E=n[k];return typeof E=="object"&&E!==null?(0,Lr._)`${c()}(${r}, ${S}[${k}])`:(0,Lr._)`${r} === ${E}`}}};Zn.default=Td,Object.defineProperty(Bn,"__esModule",{value:!0});const Od=Ln,Ad=Rn,Dd=zn,Id=Un,Nd=Hn,Pd=Kn,Fd=Gn,Md=Wn,jd=Xn,xd=Zn,Vd=[Od.default,Ad.default,Dd.default,Id.default,Nd.default,Pd.default,Fd.default,Md.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},jd.default,xd.default];Bn.default=Vd;var Qn={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.validateAdditionalItems=void 0;const Qt=le,ea=H,Bd={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,Qt.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Qt._)`{limit: ${t}}`},code(t){const{parentSchema:e,it:r}=t,{items:s}=e;if(!Array.isArray(s)){(0,ea.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}zo(t,s)}};function zo(t,e){const{gen:r,schema:s,data:n,keyword:a,it:i}=t;i.items=!0;const o=r.const("len",(0,Qt._)`${n}.length`);if(s===!1)t.setParams({len:e.length}),t.pass((0,Qt._)`${o} <= ${e.length}`);else if(typeof s=="object"&&!(0,ea.alwaysValidSchema)(i,s)){const c=r.var("valid",(0,Qt._)`${o} <= ${e.length}`);r.if((0,Qt.not)(c),()=>u(c)),t.ok(c)}function u(c){r.forRange("i",e.length,o,d=>{t.subschema({keyword:a,dataProp:d,dataPropType:ea.Type.Num},c),i.allErrors||r.if((0,Qt.not)(c),()=>r.break())})}}pr.validateAdditionalItems=zo,pr.default=Bd;var ta={},hr={};Object.defineProperty(hr,"__esModule",{value:!0}),hr.validateTuple=void 0;const qo=le,bs=H,Ld=ue,Rd={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){const{schema:e,it:r}=t;if(Array.isArray(e))return Uo(t,"additionalItems",e);r.items=!0,!(0,bs.alwaysValidSchema)(r,e)&&t.ok((0,Ld.validateArray)(t))}};function Uo(t,e,r=t.schema){const{gen:s,parentSchema:n,data:a,keyword:i,it:o}=t;d(n),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=bs.mergeEvaluated.items(s,r.length,o.items));const u=s.name("valid"),c=s.const("len",(0,qo._)`${a}.length`);r.forEach((p,T)=>{(0,bs.alwaysValidSchema)(o,p)||(s.if((0,qo._)`${c} > ${T}`,()=>t.subschema({keyword:i,schemaProp:T,dataProp:T},u)),t.ok(u))});function d(p){const{opts:T,errSchemaPath:S}=o,k=r.length,E=k===p.minItems&&(k===p.maxItems||p[e]===!1);if(T.strictTuples&&!E){const _=`"${i}" is ${k}-tuple, but minItems or maxItems/${e} are not specified or different at path "${S}"`;(0,bs.checkStrictMode)(o,_,T.strictTuples)}}}hr.validateTuple=Uo,hr.default=Rd,Object.defineProperty(ta,"__esModule",{value:!0});const zd=hr,qd={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,zd.validateTuple)(t,"items")};ta.default=qd;var ra={};Object.defineProperty(ra,"__esModule",{value:!0});const Ho=le,Ud=H,Hd=ue,Kd=pr,Gd={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:t}})=>(0,Ho.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Ho._)`{limit: ${t}}`},code(t){const{schema:e,parentSchema:r,it:s}=t,{prefixItems:n}=r;s.items=!0,!(0,Ud.alwaysValidSchema)(s,e)&&(n?(0,Kd.validateAdditionalItems)(t,n):t.ok((0,Hd.validateArray)(t)))}};ra.default=Gd;var sa={};Object.defineProperty(sa,"__esModule",{value:!0});const nt=le,$s=H,Wd={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:t,max:e}})=>e===void 0?(0,nt.str)`must contain at least ${t} valid item(s)`:(0,nt.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,nt._)`{minContains: ${t}}`:(0,nt._)`{minContains: ${t}, maxContains: ${e}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;let i,o;const{minContains:u,maxContains:c}=s;a.opts.next?(i=u===void 0?1:u,o=c):i=1;const d=e.const("len",(0,nt._)`${n}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,$s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,$s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,$s.alwaysValidSchema)(a,r)){let E=(0,nt._)`${d} >= ${i}`;o!==void 0&&(E=(0,nt._)`${E} && ${d} <= ${o}`),t.pass(E);return}a.items=!0;const p=e.name("valid");o===void 0&&i===1?S(p,()=>e.if(p,()=>e.break())):i===0?(e.let(p,!0),o!==void 0&&e.if((0,nt._)`${n}.length > 0`,T)):(e.let(p,!1),T()),t.result(p,()=>t.reset());function T(){const E=e.name("_valid"),_=e.let("count",0);S(E,()=>e.if(E,()=>k(_)))}function S(E,_){e.forRange("i",0,d,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:$s.Type.Num,compositeRule:!0},E),_()})}function k(E){e.code((0,nt._)`${E}++`),o===void 0?e.if((0,nt._)`${E} >= ${i}`,()=>e.assign(p,!0).break()):(e.if((0,nt._)`${E} > ${o}`,()=>e.assign(p,!1).break()),i===1?e.assign(p,!0):e.if((0,nt._)`${E} >= ${i}`,()=>e.assign(p,!0)))}}};sa.default=Wd;var Ko={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const e=le,r=H,s=ue;t.error={message:({params:{property:u,depsCount:c,deps:d}})=>{const p=c===1?"property":"properties";return(0,e.str)`must have ${p} ${d} when property ${u} is present`},params:({params:{property:u,depsCount:c,deps:d,missingProperty:p}})=>(0,e._)`{property: ${u},
|
|
25
|
+
missingProperty: ${p},
|
|
26
26
|
depsCount: ${c},
|
|
27
|
-
deps: ${d}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:r.error,code(l){const[c,d]=a(l);i(l,c),o(l,d)}};function a({schema:l}){const c={},d={};for(const f in l){if(f==="__proto__")continue;const w=Array.isArray(l[f])?c:d;w[f]=l[f]}return[c,d]}function i(l,c=l.schema){const{gen:d,data:f,it:w}=l;if(Object.keys(c).length===0)return;const y=d.let("missing");for(const S in c){const E=c[S];if(E.length===0)continue;const b=(0,s.propertyInData)(d,f,S,w.opts.ownProperties);l.setParams({property:S,depsCount:E.length,deps:E.join(", ")}),w.allErrors?d.if(b,()=>{for(const g of E)(0,s.checkReportMissingProp)(l,g)}):(d.if((0,e._)`${b} && (${(0,s.checkMissingProp)(l,E,y)})`),(0,s.reportMissingProp)(l,y),d.else())}}r.validatePropertyDeps=i;function o(l,c=l.schema){const{gen:d,data:f,keyword:w,it:y}=l,S=d.name("valid");for(const E in c)(0,t.alwaysValidSchema)(y,c[E])||(d.if((0,s.propertyInData)(d,f,E,y.opts.ownProperties),()=>{const b=l.subschema({keyword:w,schemaProp:E},S);l.mergeValidEvaluated(b,S)},()=>d.var(S,!0)),l.ok(S))}r.validateSchemaDeps=o,r.default=n})(ho);var zn={};Object.defineProperty(zn,"__esModule",{value:!0});const mo=de,Sc=Z,Ec={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:r})=>(0,mo._)`{propertyName: ${r.propertyName}}`},code(r){const{gen:e,schema:t,data:s,it:n}=r;if((0,Sc.alwaysValidSchema)(n,t))return;const a=e.name("valid");e.forIn("key",s,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),e.if((0,mo.not)(a),()=>{r.error(!0),n.allErrors||e.break()})}),r.ok(a)}};zn.default=Ec;var fs={};Object.defineProperty(fs,"__esModule",{value:!0});const ps=ht(),yt=de,kc=bt,hs=Z,wc={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:r})=>(0,yt._)`{additionalProperty: ${r.additionalProperty}}`},code(r){const{gen:e,schema:t,parentSchema:s,data:n,errsCount:a,it:i}=r;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:l}=i;if(i.props=!0,l.removeAdditional!=="all"&&(0,hs.alwaysValidSchema)(i,t))return;const c=(0,ps.allSchemaProperties)(s.properties),d=(0,ps.allSchemaProperties)(s.patternProperties);f(),r.ok((0,yt._)`${a} === ${kc.default.errors}`);function f(){e.forIn("key",n,b=>{!c.length&&!d.length?S(b):e.if(w(b),()=>S(b))})}function w(b){let g;if(c.length>8){const T=(0,hs.schemaRefOrVal)(i,s.properties,"properties");g=(0,ps.isOwnProperty)(e,T,b)}else c.length?g=(0,yt.or)(...c.map(T=>(0,yt._)`${b} === ${T}`)):g=yt.nil;return d.length&&(g=(0,yt.or)(g,...d.map(T=>(0,yt._)`${(0,ps.usePattern)(r,T)}.test(${b})`))),(0,yt.not)(g)}function y(b){e.code((0,yt._)`delete ${n}[${b}]`)}function S(b){if(l.removeAdditional==="all"||l.removeAdditional&&t===!1){y(b);return}if(t===!1){r.setParams({additionalProperty:b}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,hs.alwaysValidSchema)(i,t)){const g=e.name("valid");l.removeAdditional==="failing"?(E(b,g,!1),e.if((0,yt.not)(g),()=>{r.reset(),y(b)})):(E(b,g),o||e.if((0,yt.not)(g),()=>e.break()))}}function E(b,g,T){const C={keyword:"additionalProperties",dataProp:b,dataPropType:hs.Type.Str};T===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(C,g)}}};fs.default=wc;var qn={};Object.defineProperty(qn,"__esModule",{value:!0});const Cc=rs(),go=ht(),Un=Z,yo=fs,Tc={keyword:"properties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,parentSchema:s,data:n,it:a}=r;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&yo.default.code(new Cc.KeywordCxt(a,yo.default,"additionalProperties"));const i=(0,go.allSchemaProperties)(t);for(const f of i)a.definedProperties.add(f);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=Un.mergeEvaluated.props(e,(0,Un.toHash)(i),a.props));const o=i.filter(f=>!(0,Un.alwaysValidSchema)(a,t[f]));if(o.length===0)return;const l=e.name("valid");for(const f of o)c(f)?d(f):(e.if((0,go.propertyInData)(e,n,f,a.opts.ownProperties)),d(f),a.allErrors||e.else().var(l,!0),e.endIf()),r.it.definedProperties.add(f),r.ok(l);function c(f){return a.opts.useDefaults&&!a.compositeRule&&t[f].default!==void 0}function d(f){r.subschema({keyword:"properties",schemaProp:f,dataProp:f},l)}}};qn.default=Tc;var Hn={};Object.defineProperty(Hn,"__esModule",{value:!0});const vo=ht(),ms=de,_o=Z,bo=Z,Oc={keyword:"patternProperties",type:"object",schemaType:"object",code(r){const{gen:e,schema:t,data:s,parentSchema:n,it:a}=r,{opts:i}=a,o=(0,vo.allSchemaProperties)(t),l=o.filter(E=>(0,_o.alwaysValidSchema)(a,t[E]));if(o.length===0||l.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const c=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");a.props!==!0&&!(a.props instanceof ms.Name)&&(a.props=(0,bo.evaluatedPropsToName)(e,a.props));const{props:f}=a;w();function w(){for(const E of o)c&&y(E),a.allErrors?S(E):(e.var(d,!0),S(E),e.if(d))}function y(E){for(const b in c)new RegExp(E).test(b)&&(0,_o.checkStrictMode)(a,`property ${b} matches pattern ${E} (use allowMatchingProperties)`)}function S(E){e.forIn("key",s,b=>{e.if((0,ms._)`${(0,vo.usePattern)(r,E)}.test(${b})`,()=>{const g=l.includes(E);g||r.subschema({keyword:"patternProperties",schemaProp:E,dataProp:b,dataPropType:bo.Type.Str},d),a.opts.unevaluated&&f!==!0?e.assign((0,ms._)`${f}[${b}]`,!0):!g&&!a.allErrors&&e.if((0,ms.not)(d),()=>e.break())})})}}};Hn.default=Oc;var Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});const Ac=Z,Dc={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:e,schema:t,it:s}=r;if((0,Ac.alwaysValidSchema)(s,t)){r.fail();return}const n=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),r.failResult(n,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};Kn.default=Dc;var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});const Ic={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ht().validateUnion,error:{message:"must match a schema in anyOf"}};Gn.default=Ic;var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});const gs=de,Nc=Z,Pc={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0,gs._)`{passingSchemas: ${r.passing}}`},code(r){const{gen:e,schema:t,parentSchema:s,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;const a=t,i=e.let("valid",!1),o=e.let("passing",null),l=e.name("_valid");r.setParams({passing:o}),e.block(c),r.result(i,()=>r.reset(),()=>r.error(!0));function c(){a.forEach((d,f)=>{let w;(0,Nc.alwaysValidSchema)(n,d)?e.var(l,!0):w=r.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},l),f>0&&e.if((0,gs._)`${l} && ${i}`).assign(i,!1).assign(o,(0,gs._)`[${o}, ${f}]`).else(),e.if(l,()=>{e.assign(i,!0),e.assign(o,f),w&&r.mergeEvaluated(w,gs.Name)})})}}};Wn.default=Pc;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});const Fc=Z,Mc={keyword:"allOf",schemaType:"array",code(r){const{gen:e,schema:t,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");const n=e.name("valid");t.forEach((a,i)=>{if((0,Fc.alwaysValidSchema)(s,a))return;const o=r.subschema({keyword:"allOf",schemaProp:i},n);r.ok(n),r.mergeEvaluated(o)})}};Yn.default=Mc;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const ys=de,$o=Z,jc={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:r})=>(0,ys.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,ys._)`{failingKeyword: ${r.ifClause}}`},code(r){const{gen:e,parentSchema:t,it:s}=r;t.then===void 0&&t.else===void 0&&(0,$o.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const n=So(s,"then"),a=So(s,"else");if(!n&&!a)return;const i=e.let("valid",!0),o=e.name("_valid");if(l(),r.reset(),n&&a){const d=e.let("ifClause");r.setParams({ifClause:d}),e.if(o,c("then",d),c("else",d))}else n?e.if(o,c("then")):e.if((0,ys.not)(o),c("else"));r.pass(i,()=>r.error(!0));function l(){const d=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(d)}function c(d,f){return()=>{const w=r.subschema({keyword:d},o);e.assign(i,o),r.mergeValidEvaluated(w,i),f?e.assign(f,(0,ys._)`${d}`):r.setParams({ifClause:d})}}}};function So(r,e){const t=r.schema[e];return t!==void 0&&!(0,$o.alwaysValidSchema)(r,t)}Xn.default=jc;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});const xc=Z,Vc={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,xc.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};Jn.default=Vc,Object.defineProperty(xn,"__esModule",{value:!0});const Bc=lr,Lc=Bn,Rc=ur,zc=Ln,qc=Rn,Uc=ho,Hc=zn,Kc=fs,Gc=qn,Wc=Hn,Yc=Kn,Xc=Gn,Jc=Wn,Zc=Yn,Qc=Xn,ed=Jn;function td(r=!1){const e=[Yc.default,Xc.default,Jc.default,Zc.default,Qc.default,ed.default,Hc.default,Kc.default,Uc.default,Gc.default,Wc.default];return r?e.push(Lc.default,zc.default):e.push(Bc.default,Rc.default),e.push(qc.default),e}xn.default=td;var Zn={},Qn={};Object.defineProperty(Qn,"__esModule",{value:!0});const Pe=de,rd={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,Pe.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,Pe._)`{format: ${r}}`},code(r,e){const{gen:t,data:s,$data:n,schema:a,schemaCode:i,it:o}=r,{opts:l,errSchemaPath:c,schemaEnv:d,self:f}=o;if(!l.validateFormats)return;n?w():y();function w(){const S=t.scopeValue("formats",{ref:f.formats,code:l.code.formats}),E=t.const("fDef",(0,Pe._)`${S}[${i}]`),b=t.let("fType"),g=t.let("format");t.if((0,Pe._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>t.assign(b,(0,Pe._)`${E}.type || "string"`).assign(g,(0,Pe._)`${E}.validate`),()=>t.assign(b,(0,Pe._)`"string"`).assign(g,E)),r.fail$data((0,Pe.or)(T(),C()));function T(){return l.strictSchema===!1?Pe.nil:(0,Pe._)`${i} && !${g}`}function C(){const O=d.$async?(0,Pe._)`(${E}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,Pe._)`${g}(${s})`,_=(0,Pe._)`(typeof ${g} == "function" ? ${O} : ${g}.test(${s}))`;return(0,Pe._)`${g} && ${g} !== true && ${b} === ${e} && !${_}`}}function y(){const S=f.formats[a];if(!S){T();return}if(S===!0)return;const[E,b,g]=C(S);E===e&&r.pass(O());function T(){if(l.strictSchema===!1){f.logger.warn(_());return}throw new Error(_());function _(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function C(_){const q=_ instanceof RegExp?(0,Pe.regexpCode)(_):l.code.formats?(0,Pe._)`${l.code.formats}${(0,Pe.getProperty)(a)}`:void 0,z=t.scopeValue("formats",{key:a,ref:_,code:q});return typeof _=="object"&&!(_ instanceof RegExp)?[_.type||"string",_.validate,(0,Pe._)`${z}.validate`]:["string",_,z]}function O(){if(typeof S=="object"&&!(S instanceof RegExp)&&S.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Pe._)`await ${g}(${s})`}return typeof b=="function"?(0,Pe._)`${g}(${s})`:(0,Pe._)`${g}.test(${s})`}}}};Qn.default=rd,Object.defineProperty(Zn,"__esModule",{value:!0});const sd=[Qn.default];Zn.default=sd;var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),cr.contentVocabulary=cr.metadataVocabulary=void 0,cr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],cr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(bn,"__esModule",{value:!0});const nd=$n,ad=En,id=xn,od=Zn,Eo=cr,ld=[nd.default,ad.default,(0,id.default)(),od.default,Eo.metadataVocabulary,Eo.contentVocabulary];bn.default=ld;var ea={},vs={};Object.defineProperty(vs,"__esModule",{value:!0}),vs.DiscrError=void 0;var ko;(function(r){r.Tag="tag",r.Mapping="mapping"})(ko||(vs.DiscrError=ko={})),Object.defineProperty(ea,"__esModule",{value:!0});const dr=de,ta=vs,wo=et,ud=Z,cd={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:r,tagName:e}})=>r===ta.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,dr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},code(r){const{gen:e,data:t,schema:s,parentSchema:n,it:a}=r,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const l=e.let("valid",!1),c=e.const("tag",(0,dr._)`${t}${(0,dr.getProperty)(o)}`);e.if((0,dr._)`typeof ${c} == "string"`,()=>d(),()=>r.error(!1,{discrError:ta.DiscrError.Tag,tag:c,tagName:o})),r.ok(l);function d(){const y=w();e.if(!1);for(const S in y)e.elseIf((0,dr._)`${c} === ${S}`),e.assign(l,f(y[S]));e.else(),r.error(!1,{discrError:ta.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function f(y){const S=e.name("valid"),E=r.subschema({keyword:"oneOf",schemaProp:y},S);return r.mergeEvaluated(E,dr.Name),S}function w(){var y;const S={},E=g(n);let b=!0;for(let O=0;O<i.length;O++){let _=i[O];_!=null&&_.$ref&&!(0,ud.schemaHasRulesButRef)(_,a.self.RULES)&&(_=wo.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,_==null?void 0:_.$ref),_ instanceof wo.SchemaEnv&&(_=_.schema));const q=(y=_==null?void 0:_.properties)===null||y===void 0?void 0:y[o];if(typeof q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);b=b&&(E||g(_)),T(q,O)}if(!b)throw new Error(`discriminator: "${o}" must be required`);return S;function g({required:O}){return Array.isArray(O)&&O.includes(o)}function T(O,_){if(O.const)C(O.const,_);else if(O.enum)for(const q of O.enum)C(q,_);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function C(O,_){if(typeof O!="string"||O in S)throw new Error(`discriminator: "${o}" values must be unique strings`);S[O]=_}}}};ea.default=cd;const dd={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const t=Ii,s=bn,n=ea,a=dd,i=["/properties"],o="http://json-schema.org/draft-07/schema";class l extends t.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(S=>this.addVocabulary(S)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const S=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(S,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=l,r.exports=e=l,r.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var c=rs();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=de;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=kr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return f.default}});var w=wr;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return w.default}})})(an,an.exports);var Co=an.exports;const fd=Es(Co);var ra={exports:{}},To={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatNames=r.fastFormats=r.fullFormats=void 0;function e(G,Y){return{validate:G,compare:Y}}r.fullFormats={date:e(a,i),time:e(l(!0),c),"date-time":e(w(!0),y),"iso-time":e(l(),d),"iso-date-time":e(w(),S),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ae,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:C,int32:{type:"number",validate:q},int64:{type:"number",validate:z},float:{type:"number",validate:J},double:{type:"number",validate:J},password:!0,binary:!0},r.fastFormats={...r.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,S),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},r.formatNames=Object.keys(r.fullFormats);function t(G){return G%4===0&&(G%100!==0||G%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(G){const Y=s.exec(G);if(!Y)return!1;const ee=+Y[1],X=+Y[2],fe=+Y[3];return X>=1&&X<=12&&fe>=1&&fe<=(X===2&&t(ee)?29:n[X])}function i(G,Y){if(G&&Y)return G>Y?1:G<Y?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function l(G){return function(ee){const X=o.exec(ee);if(!X)return!1;const fe=+X[1],he=+X[2],ge=+X[3],De=X[4],Ne=X[5]==="-"?-1:1,F=+(X[6]||0),v=+(X[7]||0);if(F>23||v>59||G&&!De)return!1;if(fe<=23&&he<=59&&ge<60)return!0;const x=he-v*Ne,P=fe-F*Ne-(x<0?1:0);return(P===23||P===-1)&&(x===59||x===-1)&&ge<61}}function c(G,Y){if(!(G&&Y))return;const ee=new Date("2020-01-01T"+G).valueOf(),X=new Date("2020-01-01T"+Y).valueOf();if(ee&&X)return ee-X}function d(G,Y){if(!(G&&Y))return;const ee=o.exec(G),X=o.exec(Y);if(ee&&X)return G=ee[1]+ee[2]+ee[3],Y=X[1]+X[2]+X[3],G>Y?1:G<Y?-1:0}const f=/t|\s/i;function w(G){const Y=l(G);return function(X){const fe=X.split(f);return fe.length===2&&a(fe[0])&&Y(fe[1])}}function y(G,Y){if(!(G&&Y))return;const ee=new Date(G).valueOf(),X=new Date(Y).valueOf();if(ee&&X)return ee-X}function S(G,Y){if(!(G&&Y))return;const[ee,X]=G.split(f),[fe,he]=Y.split(f),ge=i(ee,fe);if(ge!==void 0)return ge||c(X,he)}const E=/\/|:/,b=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(G){return E.test(G)&&b.test(G)}const T=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function C(G){return T.lastIndex=0,T.test(G)}const O=-(2**31),_=2**31-1;function q(G){return Number.isInteger(G)&&G<=_&&G>=O}function z(G){return Number.isInteger(G)}function J(){return!0}const W=/[^\\]\\Z/;function ae(G){if(W.test(G))return!1;try{return new RegExp(G),!0}catch{return!1}}})(To);var Oo={};(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.formatLimitDefinition=void 0;const e=Co,t=de,s=t.operators,n={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:o,schemaCode:l})=>(0,t.str)`should be ${n[o].okStr} ${l}`,params:({keyword:o,schemaCode:l})=>(0,t._)`{comparison: ${n[o].okStr}, limit: ${l}}`};r.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:a,code(o){const{gen:l,data:c,schemaCode:d,keyword:f,it:w}=o,{opts:y,self:S}=w;if(!y.validateFormats)return;const E=new e.KeywordCxt(w,S.RULES.all.format.definition,"format");E.$data?b():g();function b(){const C=l.scopeValue("formats",{ref:S.formats,code:y.code.formats}),O=l.const("fmt",(0,t._)`${C}[${E.schemaCode}]`);o.fail$data((0,t.or)((0,t._)`typeof ${O} != "object"`,(0,t._)`${O} instanceof RegExp`,(0,t._)`typeof ${O}.compare != "function"`,T(O)))}function g(){const C=E.schema,O=S.formats[C];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${f}": format "${C}" does not define "compare" function`);const _=l.scopeValue("formats",{key:C,ref:O,code:y.code.formats?(0,t._)`${y.code.formats}${(0,t.getProperty)(C)}`:void 0});o.fail$data(T(_))}function T(C){return(0,t._)`${C}.compare(${c}, ${d}) ${n[f].fail} 0`}},dependencies:["format"]};const i=o=>(o.addKeyword(r.formatLimitDefinition),o);r.default=i})(Oo),function(r,e){Object.defineProperty(e,"__esModule",{value:!0});const t=To,s=Oo,n=de,a=new n.Name("fullFormats"),i=new n.Name("fastFormats"),o=(c,d={keywords:!0})=>{if(Array.isArray(d))return l(c,d,t.fullFormats,a),c;const[f,w]=d.mode==="fast"?[t.fastFormats,i]:[t.fullFormats,a],y=d.formats||t.formatNames;return l(c,y,f,w),d.keywords&&(0,s.default)(c),c};o.get=(c,d="full")=>{const w=(d==="fast"?t.fastFormats:t.fullFormats)[c];if(!w)throw new Error(`Unknown format "${c}"`);return w};function l(c,d,f,w){var y,S;(y=(S=c.opts.code).formats)!==null&&y!==void 0||(S.formats=(0,n._)`require("ajv-formats/dist/formats").${w}`);for(const E of d)c.addFormat(E,f[E])}r.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}(ra,ra.exports);var pd=ra.exports;const hd=Es(pd),Ao={"zip-code":{type:"string",validate:"/^[0-9]{5}[0-9]{3}$/"},cnpj:{type:"string",validate:Io},email:{type:"string",validate:gd},"phone-br":{type:"string",validate:vd},cpf:{type:"string",validate:Do},"cpf-cnpj":{type:"string",validate:yd}},md=()=>{const r=new fd({allErrors:!0,strict:!1,useDefaults:"empty"});return hd(r),Object.keys(Ao).forEach(e=>r.addFormat(e,Ao[e])),r};function gd(r){if(r.length>254)return!1;const[e,t]=r.split("@");return!e||!t||e.length>64||e.startsWith(".")||e.endsWith(".")||e.includes("..")||!/^[a-zA-Z0-9!#$%&'+-/=?^_{|}~.]+$/.test(e)?!1:/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(t)}function yd(r){return r=r.replace(/[^\d]+/g,""),r.length==11?Do(r):r.length==14?Io(r):!1}function Do(r){const e=r.replace(/[^\d]+/g,"");if(e.length!==11||e.match(/(\d)\1{10}/))return!1;const t=e.split("").map(n=>+n),s=n=>t.slice(0,n-12).reduce((a,i,o)=>a+i*(n-o),0)*10%11%10;return String(s(10))===r[9]&&String(s(11))===r[10]}function Io(r){const e=r.replace(/[^\d]+/g,"");if(e.length!==14||/^(\d)\1+$/.test(e))return!1;let t=e.length-2,s=e.substring(0,t);const n=e.substring(t);let a=0,i=t-7;for(let l=t;l>=1;l--)a+=Number(s.charAt(t-l))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(String(o)!=n.charAt(0))return!1;t=t+1,s=r.substring(0,t),a=0,i=t-7;for(let l=t;l>=1;l--)a+=Number(s.charAt(t-l))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,String(o)==n.charAt(1)}function vd(r){if(!r)return!1;const e=r.replace(/\D/g,""),t=e.slice(0,2),s=e.slice(2),n=/^[1-9]\d$/.test(t),i=!/^(\d)\1*$/.test(s)&&(s.startsWith("9")&&s.length===9||!s.startsWith("9")&&s.length===8&&/^[23457]/.test(s));return n&&i}const _d=({formSchema:r,initialValue:e={}})=>{const[t,s]=j.useState({}),[n,a]=j.useState({status:void 0,fields:{}}),[i,o]=j.useState({}),[l,c]=j.useState({}),[d,f]=j.useState([]),[w,y]=j.useState({}),[S,E]=j.useState(void 0);j.useEffect(()=>{T()},[]),j.useEffect(()=>{const u=md();u.compile(r),E(u)},[r]);const b=j.useCallback(u=>{const p=d.includes(String(u));return e!=null&&e[u]?l[u]!==(e==null?void 0:e[u])||p:l[u]!==void 0||p},[d,l,e]),g=j.useMemo(()=>Object.keys(n.fields).map(p=>{var $,M;return(M=($=n.fields)==null?void 0:$[p])==null?void 0:M.touched}).some(p=>p),[n]),T=j.useCallback(()=>{Object.keys(e||[]).forEach(u=>{c(p=>({...p,[u]:e[u]}))})},[e]),C=j.useCallback(u=>{var M,L,U,H;const p=((M=u==null?void 0:u.target)==null?void 0:M.type)==="checkbox"?(L=u==null?void 0:u.target)==null?void 0:L.checked:(U=u==null?void 0:u.target)==null?void 0:U.value,$=nn((H=u==null?void 0:u.target)==null?void 0:H.name,r);return($==null?void 0:$.type)==="number"?Number(p):($==null?void 0:$.type)==="boolean"?JSON.parse(String(p)):($==null?void 0:$.type)==="string"?String(p):p},[r]),O=j.useCallback(()=>{const u={};return Object.keys(l).forEach(p=>{const $=String(p).split(".");Oi(u,$,l[p])}),{...u,toJson:()=>JSON.stringify(u)}},[l]),_=j.useCallback(()=>{if(!S)return{result:null,errors:void 0};const{...u}=O(),p=S.compile(r),$=p(u),M=Ti(p);return{result:$,errors:M}},[S,O,r]),q=j.useCallback((u,p)=>{if(!S)return{result:null,errors:void 0};const $=S.getSchema(u);if(!$)return{result:null};const M=$(p);if(!($!=null&&$.errors))return{status:M,errors:{}};const L=Ti($,u);return{status:M,errors:L}},[S]),z=j.useCallback(u=>{const p={[u.target.name]:u},$={...n};$==null||delete $.fields[u.target.name],a($),s(U=>({...U,...p}));const M=C(u),L={[u.target.name]:M};c(U=>({...U,...L}))},[n,C]),J=j.useCallback((u,p)=>{const $={[u]:p};o(M=>({...M,...$}))},[]),W=j.useCallback((u,p)=>{const $={[u]:p};c(M=>({...M,...$}))},[]),ae=j.useCallback(({touched:u})=>{const{errors:p}=_(),$=Object.keys(l).reduce((L,U)=>({...L,[U]:{status:!0}}),{}),M={status:!p,fields:{...$,...p}};return Object.keys(M==null?void 0:M.fields).forEach(L=>{if(u!=null)return M.fields[L].touched=u;M.fields[L].touched=!0}),a(M),M},[l,_]),G=j.useCallback(u=>Object.keys(l).filter(p=>p.split(".").includes(u)||p===u).reduce((p,$)=>({...p,[$]:{status:!0}}),{}),[l]),Y=j.useCallback((u,p)=>{Object.keys(n.fields).forEach(L=>{new RegExp(`(\\.|^)${p}(\\.|$)`).test(L)&&delete n.fields[L]});const $={...n.fields,...u.fields},M=Object.keys($).map(L=>$[L].status).every(L=>L);a(L=>({status:M,fields:{...L.fields,...u.fields}}))},[n.fields]),ee=j.useCallback((u,p,$={})=>{const{touched:M}=$,L=q(u,p),U=G(u);if(L.status===null)return console.warn(`Cannot find schemaID: ${u}`),L;const H={status:!!L.status,fields:{...U,...L.errors}};return Object.keys(H.fields).forEach(D=>{if(M!=null)return H.fields[D].touched=M;H.fields[D].touched=b(D)}),Y(H,u),H},[q,b,Y,G]),X=j.useCallback(u=>{f(p=>[...p,u])},[]),fe=j.useCallback(u=>{var p,$,M,L,U;return(p=n==null?void 0:n.fields[u])!=null&&p.touched&&(($=n==null?void 0:n.fields[u])!=null&&$.status)?{status:"",message:""}:(M=n==null?void 0:n.fields[u])!=null&&M.touched&&!((L=n==null?void 0:n.fields[u])!=null&&L.status)?{status:"error",message:(U=n==null?void 0:n.fields[u])==null?void 0:U.message}:{status:"",message:""}},[n==null?void 0:n.fields]),he=j.useCallback(u=>{const{status:p}=fe(u);return p},[fe]),ge=j.useCallback(u=>{const{message:p}=fe(u);return p},[fe]),De=j.useCallback(u=>nn(u,r),[r]),Ne=j.useCallback(()=>{s({}),o({}),a({status:void 0,fields:{}}),c({})},[]),F=j.useCallback((u,p)=>({...u,onBlurHandler:()=>ee(p,l[p]),onChangeHandler:z,onFocusHandler:()=>X(p)}),[l,X,z,ee]),v=j.useCallback(u=>{if(!u)return;const p=u.value?u:u.querySelectorAll("input,select,textarea")[0]||u;w[p==null?void 0:p.name]||y($=>({...$,[p.name]:p}))},[w]),x=j.useCallback(u=>{var K,Q;const p=["text","email","password","radio","number"],$=De(u);if($===null)return console.error(`Cannot find schemaID: ${u}`),{};const M=$["x-label"]||"",L=$["x-placeholder"]||"",U=$["x-tooltip"]||"",H=w[u],D=((K=H==null?void 0:H.tagName)==null?void 0:K.toLowerCase())||"",k=((Q=H==null?void 0:H.type)==null?void 0:Q.toLowerCase())||"",R={name:u,feedback:ge(u),...M&&{label:M},...L&&{placeholder:L},...U&&{tooltip:U},status:he(u),value:l[u],ref:v,animated:!1};if(D==="input"&&k==="checkbox")return R.checked=l[u],F(R,u);if(D==="input"&&($==null?void 0:$.format)==="date")return R.type="date",R.value=String(l[u]||""),$!=null&&$.formatMinimum&&(R.min=$==null?void 0:$.formatMinimum),$!=null&&$.formatMaximum&&(R.max=$==null?void 0:$.formatMaximum),F(R,u);if(D==="input"&&p.includes(k)||D==="textarea")return R.type=Di($),R.value=String(l[u]||""),F(R,u);if(D==="select"){const ie=$["x-options"]||[];return R.value=l[u],R.onChangeHandler=Fe=>{const He=C(Fe);W(u,He),ee(u,He,{touched:!0})},R.options=ie,R}return R},[v,w,l,De,ge,he,C,W,ee,F]),P=j.useCallback(u=>{const p=(M,L)=>{const U={...M};return Object.keys(U).forEach(H=>{L.test(H)&&delete U[H]}),U},$=new RegExp(`(\\.|^)${u}(\\.|$)`);c(M=>p(M,$)),a(M=>({...M,fields:p(M.fields,$)}))},[]);return{getFormSchema:r,getFormEvent:t,setFormData:s,getFormData:l,getInputValidateStatus:he,getInputValidateMessage:ge,getInputSchema:De,isFormDirty:g,handleFocused:X,handleFormInput:z,handleFormFlagFields:J,handleCustomValue:W,clearFormDataKey:P,getFormValidated:n,getFormFlagFields:i,validateForm:ae,validateFormSchema:ee,parseFormToObject:O,clearFormData:Ne,register:x,ajv:S}};function bd(r){const e=n=>typeof window<"u"?window.matchMedia(n).matches:!1,[t,s]=j.useState(e(r));return j.useEffect(()=>{const n=window.matchMedia(r);function a(){s(e(r))}return a(),n.addListener?n.addListener(a):n.addEventListener("change",a),()=>{n.removeListener?n.removeListener(a):n.removeEventListener("change",a)}},[r]),t}const $d=()=>{const[r,e]=j.useState([]);function t(n){const a={...n,id:Date.now().toString()};e([...r,a])}function s(n){e(r.filter(a=>a.id!==n))}return{notifications:r,setNotifications:e,addNotification:t,removeNotification:s}},Sd=(r=[],e=0)=>{const[t,s]=j.useState(e),[n,a]=j.useState(r),i=j.useMemo(()=>n.length-1,[n]),o=j.useMemo(()=>t+1<=i&&!n[t+1].disabled,[t,i,n]),l=j.useMemo(()=>t-1>=0&&!n[t-1].disabled,[t,n]),c=j.useCallback(()=>{o&&s(z=>z+1)},[o]),d=j.useCallback(()=>{l&&s(z=>z-1)},[l]);function f(z){br(z,n)||a(z)}const w=j.useCallback(z=>n[z],[n]),y=j.useMemo(()=>({index:t,...w(t)}),[t,w]),S=j.useMemo(()=>t===i,[t,i]),E=j.useCallback(z=>n.findIndex(W=>br(W,z)),[n]),b=j.useCallback(z=>n.findIndex(W=>W.name===z),[n]),g=j.useCallback(z=>typeof z=="object"?E(z):typeof z=="string"?b(z):z,[E,b]),T=j.useCallback(z=>{const J=g(z);J!==t&&s(J)},[g,t]),C=j.useCallback(z=>{const J=g(z);return{index:J,...w(J)}},[g,w]),O=j.useCallback(z=>t===g(z),[t,g]),_=j.useCallback(z=>{const W=[...n].map((ae,G)=>(ae.disabled=G>g(z),ae));a(W)},[n,g]);function q(z){const J=[...n],W=Array.isArray(z)?z.map(ae=>g(ae)):[g(z)];return J.map((ae,G)=>(ae.disabled=!!W.includes(G),ae))}return[{getSteps:n,getStep:C,getStepSelected:y,getStepIndexByName:b,setSteps:f,setStepSelected:T,goToNextStep:c,goToPrevStep:d,canGoToNextStep:o,canGoToPrevStep:l,isStep:O,isLastStep:S,disableSteps:q,disableStepsAfter:_}]};se.DsAccordion=Ys,se.DsActiveTags=mi,se.DsButton=mr,se.DsCaption=Ns,se.DsCard=Ps,se.DsCheckbox=Fs,se.DsContainer=Xr,se.DsEditableSelect=yi,se.DsFlexElement=ze,se.DsFlexLayout=Dt,se.DsGridElement=fi,se.DsGridLayout=Zr,se.DsHR=js,se.DsHeading=Ms,se.DsIcon=ke,se.DsIndicator=bl,se.DsInlineEditable=Xs,se.DsInput=rr,se.DsLoading=Gr,se.DsModal=Js,se.DsNotification=Qr,se.DsNotificationList=en,se.DsOption=Ls,se.DsParagraph=At,se.DsPasswordConfirmation=Qs,se.DsProgress=zs,se.DsSelect=qs,se.DsSpacer=dt,se.DsStepper=$i,se.DsSubtitle=ii,se.DsTable=Ei,se.DsTabs=wl,se.DsTextArea=Hs,se.DsTooltip=zt,se.DsTwoColumns=tn,se.DsWrapper=Ut,se.ThemeProvider=wi,se.customAssign=Oi,se.getInputTypeByFormat=Di,se.getSchemaProperties=nn,se.isEqual=br,se.isValidObject=Ai,se.parseOptionValue=Ol,se.useForm=_d,se.useMediaQuery=bd,se.useNotification=$d,se.useStepper=Sd,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
deps: ${d}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(u){const[c,d]=a(u);i(u,c),o(u,d)}};function a({schema:u}){const c={},d={};for(const p in u){if(p==="__proto__")continue;const T=Array.isArray(u[p])?c:d;T[p]=u[p]}return[c,d]}function i(u,c=u.schema){const{gen:d,data:p,it:T}=u;if(Object.keys(c).length===0)return;const S=d.let("missing");for(const k in c){const E=c[k];if(E.length===0)continue;const _=(0,s.propertyInData)(d,p,k,T.opts.ownProperties);u.setParams({property:k,depsCount:E.length,deps:E.join(", ")}),T.allErrors?d.if(_,()=>{for(const g of E)(0,s.checkReportMissingProp)(u,g)}):(d.if((0,e._)`${_} && (${(0,s.checkMissingProp)(u,E,S)})`),(0,s.reportMissingProp)(u,S),d.else())}}t.validatePropertyDeps=i;function o(u,c=u.schema){const{gen:d,data:p,keyword:T,it:S}=u,k=d.name("valid");for(const E in c)(0,r.alwaysValidSchema)(S,c[E])||(d.if((0,s.propertyInData)(d,p,E,S.opts.ownProperties),()=>{const _=u.subschema({keyword:T,schemaProp:E},k);u.mergeValidEvaluated(_,k)},()=>d.var(k,!0)),u.ok(k))}t.validateSchemaDeps=o,t.default=n})(Ko);var na={};Object.defineProperty(na,"__esModule",{value:!0});const Go=le,Yd=H,Xd={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:t})=>(0,Go._)`{propertyName: ${t.propertyName}}`},code(t){const{gen:e,schema:r,data:s,it:n}=t;if((0,Yd.alwaysValidSchema)(n,r))return;const a=e.name("valid");e.forIn("key",s,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},a),e.if((0,Go.not)(a),()=>{t.error(!0),n.allErrors||e.break()})}),t.ok(a)}};na.default=Xd;var Ss={};Object.defineProperty(Ss,"__esModule",{value:!0});const Es=ue,pt=le,Jd=yt,ks=H,Zd={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:t})=>(0,pt._)`{additionalProperty: ${t.additionalProperty}}`},code(t){const{gen:e,schema:r,parentSchema:s,data:n,errsCount:a,it:i}=t;if(!a)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=i;if(i.props=!0,u.removeAdditional!=="all"&&(0,ks.alwaysValidSchema)(i,r))return;const c=(0,Es.allSchemaProperties)(s.properties),d=(0,Es.allSchemaProperties)(s.patternProperties);p(),t.ok((0,pt._)`${a} === ${Jd.default.errors}`);function p(){e.forIn("key",n,_=>{!c.length&&!d.length?k(_):e.if(T(_),()=>k(_))})}function T(_){let g;if(c.length>8){const I=(0,ks.schemaRefOrVal)(i,s.properties,"properties");g=(0,Es.isOwnProperty)(e,I,_)}else c.length?g=(0,pt.or)(...c.map(I=>(0,pt._)`${_} === ${I}`)):g=pt.nil;return d.length&&(g=(0,pt.or)(g,...d.map(I=>(0,pt._)`${(0,Es.usePattern)(t,I)}.test(${_})`))),(0,pt.not)(g)}function S(_){e.code((0,pt._)`delete ${n}[${_}]`)}function k(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){S(_);return}if(r===!1){t.setParams({additionalProperty:_}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,ks.alwaysValidSchema)(i,r)){const g=e.name("valid");u.removeAdditional==="failing"?(E(_,g,!1),e.if((0,pt.not)(g),()=>{t.reset(),S(_)})):(E(_,g),o||e.if((0,pt.not)(g),()=>e.break()))}}function E(_,g,I){const N={keyword:"additionalProperties",dataProp:_,dataPropType:ks.Type.Str};I===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,g)}}};Ss.default=Zd;var aa={};Object.defineProperty(aa,"__esModule",{value:!0});const Qd=ct,Wo=ue,ia=H,Yo=Ss,ef={keyword:"properties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,parentSchema:s,data:n,it:a}=t;a.opts.removeAdditional==="all"&&s.additionalProperties===void 0&&Yo.default.code(new Qd.KeywordCxt(a,Yo.default,"additionalProperties"));const i=(0,Wo.allSchemaProperties)(r);for(const p of i)a.definedProperties.add(p);a.opts.unevaluated&&i.length&&a.props!==!0&&(a.props=ia.mergeEvaluated.props(e,(0,ia.toHash)(i),a.props));const o=i.filter(p=>!(0,ia.alwaysValidSchema)(a,r[p]));if(o.length===0)return;const u=e.name("valid");for(const p of o)c(p)?d(p):(e.if((0,Wo.propertyInData)(e,n,p,a.opts.ownProperties)),d(p),a.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(u);function c(p){return a.opts.useDefaults&&!a.compositeRule&&r[p].default!==void 0}function d(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},u)}}};aa.default=ef;var oa={};Object.defineProperty(oa,"__esModule",{value:!0});const Xo=ue,ws=le,Jo=H,Zo=H,tf={keyword:"patternProperties",type:"object",schemaType:"object",code(t){const{gen:e,schema:r,data:s,parentSchema:n,it:a}=t,{opts:i}=a,o=(0,Xo.allSchemaProperties)(r),u=o.filter(E=>(0,Jo.alwaysValidSchema)(a,r[E]));if(o.length===0||u.length===o.length&&(!a.opts.unevaluated||a.props===!0))return;const c=i.strictSchema&&!i.allowMatchingProperties&&n.properties,d=e.name("valid");a.props!==!0&&!(a.props instanceof ws.Name)&&(a.props=(0,Zo.evaluatedPropsToName)(e,a.props));const{props:p}=a;T();function T(){for(const E of o)c&&S(E),a.allErrors?k(E):(e.var(d,!0),k(E),e.if(d))}function S(E){for(const _ in c)new RegExp(E).test(_)&&(0,Jo.checkStrictMode)(a,`property ${_} matches pattern ${E} (use allowMatchingProperties)`)}function k(E){e.forIn("key",s,_=>{e.if((0,ws._)`${(0,Xo.usePattern)(t,E)}.test(${_})`,()=>{const g=u.includes(E);g||t.subschema({keyword:"patternProperties",schemaProp:E,dataProp:_,dataPropType:Zo.Type.Str},d),a.opts.unevaluated&&p!==!0?e.assign((0,ws._)`${p}[${_}]`,!0):!g&&!a.allErrors&&e.if((0,ws.not)(d),()=>e.break())})})}}};oa.default=tf;var la={};Object.defineProperty(la,"__esModule",{value:!0});const rf=H,sf={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:e,schema:r,it:s}=t;if((0,rf.alwaysValidSchema)(s,r)){t.fail();return}const n=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),t.failResult(n,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};la.default=sf;var ua={};Object.defineProperty(ua,"__esModule",{value:!0});const nf={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ue.validateUnion,error:{message:"must match a schema in anyOf"}};ua.default=nf;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});const Cs=le,af=H,of={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Cs._)`{passingSchemas: ${t.passing}}`},code(t){const{gen:e,schema:r,parentSchema:s,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&s.discriminator)return;const a=r,i=e.let("valid",!1),o=e.let("passing",null),u=e.name("_valid");t.setParams({passing:o}),e.block(c),t.result(i,()=>t.reset(),()=>t.error(!0));function c(){a.forEach((d,p)=>{let T;(0,af.alwaysValidSchema)(n,d)?e.var(u,!0):T=t.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},u),p>0&&e.if((0,Cs._)`${u} && ${i}`).assign(i,!1).assign(o,(0,Cs._)`[${o}, ${p}]`).else(),e.if(u,()=>{e.assign(i,!0),e.assign(o,p),T&&t.mergeEvaluated(T,Cs.Name)})})}}};ca.default=of;var da={};Object.defineProperty(da,"__esModule",{value:!0});const lf=H,uf={keyword:"allOf",schemaType:"array",code(t){const{gen:e,schema:r,it:s}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=e.name("valid");r.forEach((a,i)=>{if((0,lf.alwaysValidSchema)(s,a))return;const o=t.subschema({keyword:"allOf",schemaProp:i},n);t.ok(n),t.mergeEvaluated(o)})}};da.default=uf;var fa={};Object.defineProperty(fa,"__esModule",{value:!0});const Ts=le,Qo=H,cf={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:t})=>(0,Ts.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Ts._)`{failingKeyword: ${t.ifClause}}`},code(t){const{gen:e,parentSchema:r,it:s}=t;r.then===void 0&&r.else===void 0&&(0,Qo.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const n=el(s,"then"),a=el(s,"else");if(!n&&!a)return;const i=e.let("valid",!0),o=e.name("_valid");if(u(),t.reset(),n&&a){const d=e.let("ifClause");t.setParams({ifClause:d}),e.if(o,c("then",d),c("else",d))}else n?e.if(o,c("then")):e.if((0,Ts.not)(o),c("else"));t.pass(i,()=>t.error(!0));function u(){const d=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(d)}function c(d,p){return()=>{const T=t.subschema({keyword:d},o);e.assign(i,o),t.mergeValidEvaluated(T,i),p?e.assign(p,(0,Ts._)`${d}`):t.setParams({ifClause:d})}}}};function el(t,e){const r=t.schema[e];return r!==void 0&&!(0,Qo.alwaysValidSchema)(t,r)}fa.default=cf;var pa={};Object.defineProperty(pa,"__esModule",{value:!0});const df=H,ff={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,df.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};pa.default=ff,Object.defineProperty(Qn,"__esModule",{value:!0});const pf=pr,hf=ta,mf=hr,gf=ra,yf=sa,vf=Ko,_f=na,bf=Ss,$f=aa,Sf=oa,Ef=la,kf=ua,wf=ca,Cf=da,Tf=fa,Of=pa;function Af(t=!1){const e=[Ef.default,kf.default,wf.default,Cf.default,Tf.default,Of.default,_f.default,bf.default,vf.default,$f.default,Sf.default];return t?e.push(hf.default,gf.default):e.push(pf.default,mf.default),e.push(yf.default),e}Qn.default=Af;var ha={},ma={};Object.defineProperty(ma,"__esModule",{value:!0});const De=le,Df={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:t})=>(0,De.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,De._)`{format: ${t}}`},code(t,e){const{gen:r,data:s,$data:n,schema:a,schemaCode:i,it:o}=t,{opts:u,errSchemaPath:c,schemaEnv:d,self:p}=o;if(!u.validateFormats)return;n?T():S();function T(){const k=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),E=r.const("fDef",(0,De._)`${k}[${i}]`),_=r.let("fType"),g=r.let("format");r.if((0,De._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>r.assign(_,(0,De._)`${E}.type || "string"`).assign(g,(0,De._)`${E}.validate`),()=>r.assign(_,(0,De._)`"string"`).assign(g,E)),t.fail$data((0,De.or)(I(),N()));function I(){return u.strictSchema===!1?De.nil:(0,De._)`${i} && !${g}`}function N(){const D=d.$async?(0,De._)`(${E}.async ? await ${g}(${s}) : ${g}(${s}))`:(0,De._)`${g}(${s})`,b=(0,De._)`(typeof ${g} == "function" ? ${D} : ${g}.test(${s}))`;return(0,De._)`${g} && ${g} !== true && ${_} === ${e} && !${b}`}}function S(){const k=p.formats[a];if(!k){I();return}if(k===!0)return;const[E,_,g]=N(k);E===e&&t.pass(D());function I(){if(u.strictSchema===!1){p.logger.warn(b());return}throw new Error(b());function b(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function N(b){const R=b instanceof RegExp?(0,De.regexpCode)(b):u.code.formats?(0,De._)`${u.code.formats}${(0,De.getProperty)(a)}`:void 0,L=r.scopeValue("formats",{key:a,ref:b,code:R});return typeof b=="object"&&!(b instanceof RegExp)?[b.type||"string",b.validate,(0,De._)`${L}.validate`]:["string",b,L]}function D(){if(typeof k=="object"&&!(k instanceof RegExp)&&k.async){if(!d.$async)throw new Error("async format in sync schema");return(0,De._)`await ${g}(${s})`}return typeof _=="function"?(0,De._)`${g}(${s})`:(0,De._)`${g}.test(${s})`}}}};ma.default=Df,Object.defineProperty(ha,"__esModule",{value:!0});const If=[ma.default];ha.default=If;var mr={};Object.defineProperty(mr,"__esModule",{value:!0}),mr.contentVocabulary=mr.metadataVocabulary=void 0,mr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],mr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(jn,"__esModule",{value:!0});const Nf=xn,Pf=Bn,Ff=Qn,Mf=ha,tl=mr,jf=[Nf.default,Pf.default,(0,Ff.default)(),Mf.default,tl.metadataVocabulary,tl.contentVocabulary];jn.default=jf;var ga={},Os={};Object.defineProperty(Os,"__esModule",{value:!0}),Os.DiscrError=void 0;var rl;(function(t){t.Tag="tag",t.Mapping="mapping"})(rl||(Os.DiscrError=rl={})),Object.defineProperty(ga,"__esModule",{value:!0});const gr=le,ya=Os,sl=Xe,xf=H,Vf={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:t,tagName:e}})=>t===ya.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,gr._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},code(t){const{gen:e,data:r,schema:s,parentSchema:n,it:a}=t,{oneOf:i}=n;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=s.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");const u=e.let("valid",!1),c=e.const("tag",(0,gr._)`${r}${(0,gr.getProperty)(o)}`);e.if((0,gr._)`typeof ${c} == "string"`,()=>d(),()=>t.error(!1,{discrError:ya.DiscrError.Tag,tag:c,tagName:o})),t.ok(u);function d(){const S=T();e.if(!1);for(const k in S)e.elseIf((0,gr._)`${c} === ${k}`),e.assign(u,p(S[k]));e.else(),t.error(!1,{discrError:ya.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function p(S){const k=e.name("valid"),E=t.subschema({keyword:"oneOf",schemaProp:S},k);return t.mergeEvaluated(E,gr.Name),k}function T(){var S;const k={},E=g(n);let _=!0;for(let D=0;D<i.length;D++){let b=i[D];b!=null&&b.$ref&&!(0,xf.schemaHasRulesButRef)(b,a.self.RULES)&&(b=sl.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,b==null?void 0:b.$ref),b instanceof sl.SchemaEnv&&(b=b.schema));const R=(S=b==null?void 0:b.properties)===null||S===void 0?void 0:S[o];if(typeof R!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(E||g(b)),I(R,D)}if(!_)throw new Error(`discriminator: "${o}" must be required`);return k;function g({required:D}){return Array.isArray(D)&&D.includes(o)}function I(D,b){if(D.const)N(D.const,b);else if(D.enum)for(const R of D.enum)N(R,b);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function N(D,b){if(typeof D!="string"||D in k)throw new Error(`discriminator: "${o}" values must be unique strings`);k[D]=b}}}};ga.default=Vf;const Bf={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;const r=Gi,s=jn,n=ga,a=Bf,i=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),s.default.forEach(k=>this.addVocabulary(k)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const k=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(k,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.Ajv=u,t.exports=e=u,t.exports.Ajv=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var c=ct;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var d=le;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=Nr;Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var T=Pr;Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return T.default}})})(gn,gn.exports);var nl=gn.exports;const Lf=Ps(nl);var va={exports:{}},al={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(U,G){return{validate:U,compare:G}}t.fullFormats={date:e(a,i),time:e(u(!0),c),"date-time":e(T(!0),S),"iso-time":e(u(),d),"iso-date-time":e(T(),k),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:g,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:ce,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:N,int32:{type:"number",validate:R},int64:{type:"number",validate:L},float:{type:"number",validate:Q},double:{type:"number",validate:Q},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,c),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,S),"iso-time":e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"iso-date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,k),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(U){return U%4===0&&(U%100!==0||U%400===0)}const s=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function a(U){const G=s.exec(U);if(!G)return!1;const ne=+G[1],W=+G[2],he=+G[3];return W>=1&&W<=12&&he>=1&&he<=(W===2&&r(ne)?29:n[W])}function i(U,G){if(U&&G)return U>G?1:U<G?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(U){return function(ne){const W=o.exec(ne);if(!W)return!1;const he=+W[1],me=+W[2],_e=+W[3],Ie=W[4],Fe=W[5]==="-"?-1:1,A=+(W[6]||0),y=+(W[7]||0);if(A>23||y>59||U&&!Ie)return!1;if(he<=23&&me<=59&&_e<60)return!0;const M=me-y*Fe,O=he-A*Fe-(M<0?1:0);return(O===23||O===-1)&&(M===59||M===-1)&&_e<61}}function c(U,G){if(!(U&&G))return;const ne=new Date("2020-01-01T"+U).valueOf(),W=new Date("2020-01-01T"+G).valueOf();if(ne&&W)return ne-W}function d(U,G){if(!(U&&G))return;const ne=o.exec(U),W=o.exec(G);if(ne&&W)return U=ne[1]+ne[2]+ne[3],G=W[1]+W[2]+W[3],U>G?1:U<G?-1:0}const p=/t|\s/i;function T(U){const G=u(U);return function(W){const he=W.split(p);return he.length===2&&a(he[0])&&G(he[1])}}function S(U,G){if(!(U&&G))return;const ne=new Date(U).valueOf(),W=new Date(G).valueOf();if(ne&&W)return ne-W}function k(U,G){if(!(U&&G))return;const[ne,W]=U.split(p),[he,me]=G.split(p),_e=i(ne,he);if(_e!==void 0)return _e||c(W,me)}const E=/\/|:/,_=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function g(U){return E.test(U)&&_.test(U)}const I=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(U){return I.lastIndex=0,I.test(U)}const D=-(2**31),b=2**31-1;function R(U){return Number.isInteger(U)&&U<=b&&U>=D}function L(U){return Number.isInteger(U)}function Q(){return!0}const K=/[^\\]\\Z/;function ce(U){if(K.test(U))return!1;try{return new RegExp(U),!0}catch{return!1}}})(al);var il={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=nl,r=le,s=r.operators,n={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},a={message:({keyword:o,schemaCode:u})=>(0,r.str)`should be ${n[o].okStr} ${u}`,params:({keyword:o,schemaCode:u})=>(0,r._)`{comparison: ${n[o].okStr}, limit: ${u}}`};t.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:a,code(o){const{gen:u,data:c,schemaCode:d,keyword:p,it:T}=o,{opts:S,self:k}=T;if(!S.validateFormats)return;const E=new e.KeywordCxt(T,k.RULES.all.format.definition,"format");E.$data?_():g();function _(){const N=u.scopeValue("formats",{ref:k.formats,code:S.code.formats}),D=u.const("fmt",(0,r._)`${N}[${E.schemaCode}]`);o.fail$data((0,r.or)((0,r._)`typeof ${D} != "object"`,(0,r._)`${D} instanceof RegExp`,(0,r._)`typeof ${D}.compare != "function"`,I(D)))}function g(){const N=E.schema,D=k.formats[N];if(!D||D===!0)return;if(typeof D!="object"||D instanceof RegExp||typeof D.compare!="function")throw new Error(`"${p}": format "${N}" does not define "compare" function`);const b=u.scopeValue("formats",{key:N,ref:D,code:S.code.formats?(0,r._)`${S.code.formats}${(0,r.getProperty)(N)}`:void 0});o.fail$data(I(b))}function I(N){return(0,r._)`${N}.compare(${c}, ${d}) ${n[p].fail} 0`}},dependencies:["format"]};const i=o=>(o.addKeyword(t.formatLimitDefinition),o);t.default=i})(il),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const r=al,s=il,n=le,a=new n.Name("fullFormats"),i=new n.Name("fastFormats"),o=(c,d={keywords:!0})=>{if(Array.isArray(d))return u(c,d,r.fullFormats,a),c;const[p,T]=d.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,a],S=d.formats||r.formatNames;return u(c,S,p,T),d.keywords&&(0,s.default)(c),c};o.get=(c,d="full")=>{const T=(d==="fast"?r.fastFormats:r.fullFormats)[c];if(!T)throw new Error(`Unknown format "${c}"`);return T};function u(c,d,p,T){var S,k;(S=(k=c.opts.code).formats)!==null&&S!==void 0||(k.formats=(0,n._)`require("ajv-formats/dist/formats").${T}`);for(const E of d)c.addFormat(E,p[E])}t.exports=e=o,Object.defineProperty(e,"__esModule",{value:!0}),e.default=o}(va,va.exports);var Rf=va.exports;const zf=Ps(Rf),ol={"zip-code":{type:"string",validate:"/^[0-9]{5}[0-9]{3}$/"},cnpj:{type:"string",validate:ul},email:{type:"string",validate:Uf},"phone-br":{type:"string",validate:Kf},cpf:{type:"string",validate:ll},"cpf-cnpj":{type:"string",validate:Hf}},qf=()=>{const t=new Lf({allErrors:!0,strict:!1,useDefaults:"empty"});return zf(t),Object.keys(ol).forEach(e=>t.addFormat(e,ol[e])),t};function Uf(t){if(t.length>254)return!1;const[e,r]=t.split("@");return!e||!r||e.length>64||e.startsWith(".")||e.endsWith(".")||e.includes("..")||!/^[a-zA-Z0-9!#$%&'+-/=?^_{|}~.]+$/.test(e)?!1:/^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/.test(r)}function Hf(t){return t=t.replace(/[^\d]+/g,""),t.length==11?ll(t):t.length==14?ul(t):!1}function ll(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==11||e.match(/(\d)\1{10}/))return!1;const r=e.split("").map(n=>+n),s=n=>r.slice(0,n-12).reduce((a,i,o)=>a+i*(n-o),0)*10%11%10;return String(s(10))===t[9]&&String(s(11))===t[10]}function ul(t){const e=t.replace(/[^\d]+/g,"");if(e.length!==14||/^(\d)\1+$/.test(e))return!1;let r=e.length-2,s=e.substring(0,r);const n=e.substring(r);let a=0,i=r-7;for(let u=r;u>=1;u--)a+=Number(s.charAt(r-u))*i--,i<2&&(i=9);let o=a%11<2?0:11-a%11;if(String(o)!=n.charAt(0))return!1;r=r+1,s=t.substring(0,r),a=0,i=r-7;for(let u=r;u>=1;u--)a+=Number(s.charAt(r-u))*i--,i<2&&(i=9);return o=a%11<2?0:11-a%11,String(o)==n.charAt(1)}function Kf(t){if(!t)return!1;const e=t.replace(/\D/g,""),r=e.slice(0,2),s=e.slice(2),n=/^[1-9]\d$/.test(r),i=!/^(\d)\1*$/.test(s)&&(s.startsWith("9")&&s.length===9||!s.startsWith("9")&&s.length===8&&/^[23457]/.test(s));return n&&i}const Gf=({formSchema:t,initialValue:e={}})=>{const[r,s]=F.useState({}),[n,a]=F.useState({status:void 0,fields:{}}),[i,o]=F.useState({}),[u,c]=F.useState({}),[d,p]=F.useState([]),[T,S]=F.useState({}),[k,E]=F.useState(void 0);F.useEffect(()=>{I()},[]),F.useEffect(()=>{const l=qf();l.compile(t),E(l)},[t]);const _=F.useCallback(l=>{const f=d.includes(String(l));return e!=null&&e[l]?u[l]!==(e==null?void 0:e[l])||f:u[l]!==void 0||f},[d,u,e]),g=F.useMemo(()=>Object.keys(n.fields).map(f=>{var v,P;return(P=(v=n.fields)==null?void 0:v[f])==null?void 0:P.touched}).some(f=>f),[n]),I=F.useCallback(()=>{Object.keys(e||[]).forEach(l=>{c(f=>({...f,[l]:e[l]}))})},[e]),N=F.useCallback(l=>{var P,V,B,z;const f=((P=l==null?void 0:l.target)==null?void 0:P.type)==="checkbox"?(V=l==null?void 0:l.target)==null?void 0:V.checked:(B=l==null?void 0:l.target)==null?void 0:B.value,v=mn((z=l==null?void 0:l.target)==null?void 0:z.name,t);return(v==null?void 0:v.type)==="number"?Number(f):(v==null?void 0:v.type)==="boolean"?JSON.parse(String(f)):(v==null?void 0:v.type)==="string"?String(f):f},[t]),D=F.useCallback(()=>{const l={};return Object.keys(u).forEach(f=>{const v=String(f).split(".");Ui(l,v,u[f])}),{...l,toJson:()=>JSON.stringify(l)}},[u]),b=F.useCallback(()=>{if(!k)return{result:null,errors:void 0};const{...l}=D(),f=k.compile(t),v=f(l),P=qi(f);return{result:v,errors:P}},[k,D,t]),R=F.useCallback((l,f)=>{if(!k)return{result:null,errors:void 0};const v=k.getSchema(l);if(!v)return{result:null};const P=v(f);if(!(v!=null&&v.errors))return{status:P,errors:{}};const V=qi(v,l);return{status:P,errors:V}},[k]),L=F.useCallback(l=>{const f={[l.target.name]:l},v={...n};v==null||delete v.fields[l.target.name],a(v),s(B=>({...B,...f}));const P=N(l),V={[l.target.name]:P};c(B=>({...B,...V}))},[n,N]),Q=F.useCallback((l,f)=>{const v={[l]:f};o(P=>({...P,...v}))},[]),K=F.useCallback((l,f)=>{const v={[l]:f};c(P=>({...P,...v}))},[]),ce=F.useCallback(({touched:l})=>{const{errors:f}=b(),v=Object.keys(u).reduce((V,B)=>({...V,[B]:{status:!0}}),{}),P={status:!f,fields:{...v,...f}};return Object.keys(P==null?void 0:P.fields).forEach(V=>{if(l!=null)return P.fields[V].touched=l;P.fields[V].touched=!0}),a(P),P},[u,b]),U=F.useCallback(l=>Object.keys(u).filter(f=>f.split(".").includes(l)||f===l).reduce((f,v)=>({...f,[v]:{status:!0}}),{}),[u]),G=F.useCallback((l,f)=>{Object.keys(n.fields).forEach(V=>{new RegExp(`(\\.|^)${f}(\\.|$)`).test(V)&&delete n.fields[V]});const v={...n.fields,...l.fields},P=Object.keys(v).map(V=>v[V].status).every(V=>V);a(V=>({status:P,fields:{...V.fields,...l.fields}}))},[n.fields]),ne=F.useCallback((l,f,v={})=>{const{touched:P}=v,V=R(l,f),B=U(l);if(V.status===null)return console.warn(`Cannot find schemaID: ${l}`),V;const z={status:!!V.status,fields:{...B,...V.errors}};return Object.keys(z.fields).forEach(te=>{if(P!=null)return z.fields[te].touched=P;z.fields[te].touched=_(te)}),G(z,l),z},[R,_,G,U]),W=F.useCallback(l=>{p(f=>[...f,l])},[]),he=F.useCallback(l=>{var f,v,P,V,B;return(f=n==null?void 0:n.fields[l])!=null&&f.touched&&((v=n==null?void 0:n.fields[l])!=null&&v.status)?{status:"",message:""}:(P=n==null?void 0:n.fields[l])!=null&&P.touched&&!((V=n==null?void 0:n.fields[l])!=null&&V.status)?{status:"error",message:(B=n==null?void 0:n.fields[l])==null?void 0:B.message}:{status:"",message:""}},[n==null?void 0:n.fields]),me=F.useCallback(l=>{const{status:f}=he(l);return f},[he]),_e=F.useCallback(l=>{const{message:f}=he(l);return f},[he]),Ie=F.useCallback(l=>mn(l,t),[t]),Fe=F.useCallback(()=>{s({}),o({}),a({status:void 0,fields:{}}),c({})},[]),A=F.useCallback((l,f)=>({...l,onBlurHandler:()=>ne(f,u[f]),onChangeHandler:L,onFocusHandler:()=>W(f)}),[u,W,L,ne]),y=F.useCallback(l=>{if(!l)return;const f=l.value?l:l.querySelectorAll("input,select,textarea")[0]||l;T[f==null?void 0:f.name]||S(v=>({...v,[f.name]:f}))},[T]),M=F.useCallback(l=>{var tt,ht;const f=["text","email","password","radio","number"],v=Ie(l);if(v===null)return console.error(`Cannot find schemaID: ${l}`),{};const P=v["x-label"]||"",V=v["x-placeholder"]||"",B=v["x-tooltip"]||"",z=T[l],te=((tt=z==null?void 0:z.tagName)==null?void 0:tt.toLowerCase())||"",q=((ht=z==null?void 0:z.type)==null?void 0:ht.toLowerCase())||"",pe={name:l,feedback:_e(l),...P&&{label:P},...V&&{placeholder:V},...B&&{tooltip:B},status:me(l),value:u[l],ref:y,animated:!1};if(te==="input"&&q==="checkbox")return pe.checked=u[l],A(pe,l);if(te==="input"&&(v==null?void 0:v.format)==="date")return pe.type="date",pe.value=String(u[l]||""),v!=null&&v.formatMinimum&&(pe.min=v==null?void 0:v.formatMinimum),v!=null&&v.formatMaximum&&(pe.max=v==null?void 0:v.formatMaximum),A(pe,l);if(te==="input"&&f.includes(q)||te==="textarea")return pe.type=Ki(v),pe.value=String(u[l]||""),A(pe,l);if(te==="select"){const Ge=v["x-options"]||[];return pe.value=u[l],pe.onChangeHandler=er=>{const Pt=N(er);K(l,Pt),ne(l,Pt,{touched:!0})},pe.options=Ge,pe}return pe},[y,T,u,Ie,_e,me,N,K,ne,A]),O=F.useCallback(l=>{const f=(P,V)=>{const B={...P};return Object.keys(B).forEach(z=>{V.test(z)&&delete B[z]}),B},v=new RegExp(`(\\.|^)${l}(\\.|$)`);c(P=>f(P,v)),a(P=>({...P,fields:f(P.fields,v)}))},[]);return{getFormSchema:t,getFormEvent:r,setFormData:s,getFormData:u,getInputValidateStatus:me,getInputValidateMessage:_e,getInputSchema:Ie,isFormDirty:g,handleFocused:W,handleFormInput:L,handleFormFlagFields:Q,handleCustomValue:K,clearFormDataKey:O,getFormValidated:n,getFormFlagFields:i,validateForm:ce,validateFormSchema:ne,parseFormToObject:D,clearFormData:Fe,register:M,ajv:k}};function Wf(t){const e=n=>typeof window<"u"?window.matchMedia(n).matches:!1,[r,s]=F.useState(e(t));return F.useEffect(()=>{const n=window.matchMedia(t);function a(){s(e(t))}return a(),n.addListener?n.addListener(a):n.addEventListener("change",a),()=>{n.removeListener?n.removeListener(a):n.removeEventListener("change",a)}},[t]),r}const Yf=()=>{const[t,e]=F.useState([]);function r(n){const a={...n,id:Date.now().toString()};e([...t,a])}function s(n){e(t.filter(a=>a.id!==n))}return{notifications:t,setNotifications:e,addNotification:r,removeNotification:s}},Xf=(t=[],e=0)=>{const[r,s]=F.useState(e),[n,a]=F.useState(t),i=F.useMemo(()=>n.length-1,[n]),o=F.useMemo(()=>r+1<=i&&!n[r+1].disabled,[r,i,n]),u=F.useMemo(()=>r-1>=0&&!n[r-1].disabled,[r,n]),c=F.useCallback(()=>{o&&s(L=>L+1)},[o]),d=F.useCallback(()=>{u&&s(L=>L-1)},[u]);function p(L){Tr(L,n)||a(L)}const T=F.useCallback(L=>n[L],[n]),S=F.useMemo(()=>({index:r,...T(r)}),[r,T]),k=F.useMemo(()=>r===i,[r,i]),E=F.useCallback(L=>n.findIndex(K=>Tr(K,L)),[n]),_=F.useCallback(L=>n.findIndex(K=>K.name===L),[n]),g=F.useCallback(L=>typeof L=="object"?E(L):typeof L=="string"?_(L):L,[E,_]),I=F.useCallback(L=>{const Q=g(L);Q!==r&&s(Q)},[g,r]),N=F.useCallback(L=>{const Q=g(L);return{index:Q,...T(Q)}},[g,T]),D=F.useCallback(L=>r===g(L),[r,g]),b=F.useCallback(L=>{const K=[...n].map((ce,U)=>(ce.disabled=U>g(L),ce));a(K)},[n,g]);function R(L){const Q=[...n],K=Array.isArray(L)?L.map(ce=>g(ce)):[g(L)];return Q.map((ce,U)=>(ce.disabled=!!K.includes(U),ce))}return[{getSteps:n,getStep:N,getStepSelected:S,getStepIndexByName:_,setSteps:p,setStepSelected:I,goToNextStep:c,goToPrevStep:d,canGoToNextStep:o,canGoToPrevStep:u,isStep:D,isLastStep:k,disableSteps:R,disableStepsAfter:b}]};Z.DsAccordion=an,Z.DsActiveTags=Ii,Z.DsButton=Sr,Z.DsCaption=zs,Z.DsCard=qs,Z.DsCheckbox=Us,Z.DsContainer=as,Z.DsEditableSelect=Pi,Z.DsFlexElement=Be,Z.DsFlexLayout=Dt,Z.DsGridElement=Oi,Z.DsGridLayout=os,Z.DsHR=Ks,Z.DsHeading=Hs,Z.DsIcon=Ee,Z.DsIndicator=Zl,Z.DsInlineEditable=on,Z.DsInput=ar,Z.DsLoading=rs,Z.DsModal=ln,Z.DsNotification=ls,Z.DsNotificationList=dn,Z.DsOption=Xs,Z.DsParagraph=At,Z.DsPasswordConfirmation=cn,Z.DsProgress=Zs,Z.DsSelect=Qs,Z.DsSpacer=lt,Z.DsStepper=xi,Z.DsSubtitle=Si,Z.DsTable=Bi,Z.DsTabs=su,Z.DsTextArea=tn,Z.DsTooltip=Ut,Z.DsTwoColumns=fn,Z.DsWrapper=Kt,Z.ThemeProvider=Ri,Z.customAssign=Ui,Z.getInputTypeByFormat=Ki,Z.getSchemaProperties=mn,Z.isEqual=Tr,Z.isValidObject=Hi,Z.parseOptionValue=iu,Z.useForm=Gf,Z.useMediaQuery=Wf,Z.useNotification=Yf,Z.useStepper=Xf,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|