@akad/design-system 0.1.0-beta.9 → 0.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/css/aon-theme.css +1 -1
  2. package/css/bees-theme.css +1 -1
  3. package/css/bmc-theme.css +1 -1
  4. package/css/default-theme.css +1 -1
  5. package/css/linker-theme.css +1 -1
  6. package/css/oggi-theme.css +1 -1
  7. package/css/streetgo-theme.css +1 -1
  8. package/package.json +10 -10
  9. package/react/components/atoms/Checkbox/Checkbox.config.d.ts +14 -0
  10. package/react/components/atoms/Checkbox/Checkbox.d.ts +2 -13
  11. package/react/components/atoms/Checkbox/index.d.ts +2 -1
  12. package/react/components/atoms/Select/Select.stories.d.ts +8 -0
  13. package/react/components/atoms/TextArea/TextArea.d.ts +5 -2
  14. package/react/components/bosons/GridLayout/GridElement.d.ts +1 -4
  15. package/react/components/bosons/GridLayout/GridElement.test.d.ts +1 -0
  16. package/react/components/bosons/GridLayout/GridLayout.config.d.ts +11 -0
  17. package/react/components/bosons/GridLayout/GridLayout.d.ts +8 -18
  18. package/react/components/bosons/Wrapper/Wrapper.d.ts +0 -8
  19. package/react/components/molecules/Accordion/Accordion.d.ts +1 -1
  20. package/react/components/molecules/Accordion/AccordionItem.d.ts +1 -2
  21. package/react/components/molecules/ActiveTags/ActiveTags.d.ts +2 -2
  22. package/react/components/molecules/EditableSelect/EditableSelect.config.d.ts +5 -0
  23. package/react/components/molecules/EditableSelect/EditableSelect.d.ts +2 -1
  24. package/react/components/molecules/Notification/Notification.config.d.ts +16 -0
  25. package/react/components/molecules/Notification/Notification.d.ts +1 -28
  26. package/react/components/molecules/Notification/Notification.stories.d.ts +5 -5
  27. package/react/components/molecules/Notification/index.d.ts +2 -1
  28. package/react/components/molecules/PasswordConfirmation/PasswordConfirmartion.test.d.ts +1 -0
  29. package/react/components/molecules/PasswordConfirmation/PasswordConfirmation.d.ts +1 -1
  30. package/react/components/molecules/Tabs/Tab.test.d.ts +1 -0
  31. package/react/components/molecules/Tabs/Tabs.test.d.ts +1 -0
  32. package/react/components/molecules/ThemeProvider/ThemeProvider.test.d.ts +1 -0
  33. package/react/components/organisms/NotificationList/NotificationList.d.ts +2 -2
  34. package/react/components/organisms/NotificationList/NotificationList.test.d.ts +1 -0
  35. package/react/components/templates/TwoColumns/TwoColumns.test.d.ts +1 -0
  36. package/react/decorators/storybook.test.d.ts +1 -0
  37. package/react/main.d.ts +0 -2
  38. package/react/react-lib.js +2991 -8442
  39. package/react/react-lib.umd.cjs +5 -12
  40. package/react/helpers/messageParser.d.ts +0 -11
  41. package/react/helpers/utils.d.ts +0 -80
  42. package/react/helpers/validator.d.ts +0 -5
  43. package/react/hooks/index.d.ts +0 -6
  44. package/react/hooks/useForm.d.ts +0 -36
  45. package/react/hooks/useMediaQuery.d.ts +0 -1
  46. package/react/hooks/useNotification.d.ts +0 -8
  47. package/react/hooks/useStepper.d.ts +0 -31
  48. /package/react/{helpers/utils.test.d.ts → components/bosons/GridLayout/GridLayout.test.d.ts} +0 -0
  49. /package/react/{helpers/validator.test.d.ts → components/molecules/Notification/Notification.test.d.ts} +0 -0
@@ -1,27 +1,20 @@
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
1
+ (function(I,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],u):(I=typeof globalThis<"u"?globalThis:I||self,u(I["react-lib"]={},I.jsxRuntime,I.React))})(this,function(I,u,g){"use strict";function mn(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var pt={exports:{}},Xe={exports:{}},H={};/** @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 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,E=t?Symbol.for("react.memo"):60115,k=t?Symbol.for("react.lazy"):60116,S=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 E: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=E,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)===E},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===E||b.$$typeof===i||b.$$typeof===o||b.$$typeof===d||b.$$typeof===_||b.$$typeof===g||b.$$typeof===I||b.$$typeof===S)},ge.typeOf=N,ge}var ye={};/** @license React v16.13.1
8
+ */var Wt;function yn(){if(Wt)return H;Wt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,k=r?Symbol.for("react.suspense_list"):60120,C=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,E=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,B=r?Symbol.for("react.responder"):60118,U=r?Symbol.for("react.scope"):60119;function x(p){if(typeof p=="object"&&p!==null){var D=p.$$typeof;switch(D){case e:switch(p=p.type,p){case c:case d:case s:case a:case n:case h:return p;default:switch(p=p&&p.$$typeof,p){case l:case f:case b:case C:case i:return p;default:return D}}case t:return D}}}function _(p){return x(p)===d}return H.AsyncMode=c,H.ConcurrentMode=d,H.ContextConsumer=l,H.ContextProvider=i,H.Element=e,H.ForwardRef=f,H.Fragment=s,H.Lazy=b,H.Memo=C,H.Portal=t,H.Profiler=a,H.StrictMode=n,H.Suspense=h,H.isAsyncMode=function(p){return _(p)||x(p)===c},H.isConcurrentMode=_,H.isContextConsumer=function(p){return x(p)===l},H.isContextProvider=function(p){return x(p)===i},H.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},H.isForwardRef=function(p){return x(p)===f},H.isFragment=function(p){return x(p)===s},H.isLazy=function(p){return x(p)===b},H.isMemo=function(p){return x(p)===C},H.isPortal=function(p){return x(p)===t},H.isProfiler=function(p){return x(p)===a},H.isStrictMode=function(p){return x(p)===n},H.isSuspense=function(p){return x(p)===h},H.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===s||p===d||p===a||p===n||p===h||p===k||typeof p=="object"&&p!==null&&(p.$$typeof===b||p.$$typeof===C||p.$$typeof===i||p.$$typeof===l||p.$$typeof===f||p.$$typeof===y||p.$$typeof===B||p.$$typeof===U||p.$$typeof===E)},H.typeOf=x,H}var W={};/** @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 $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,E=t?Symbol.for("react.memo"):60115,k=t?Symbol.for("react.lazy"):60116,S=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===E||q.$$typeof===i||q.$$typeof===o||q.$$typeof===d||q.$$typeof===_||q.$$typeof===g||q.$$typeof===I||q.$$typeof===S)}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 E:case i:return ht;default:return pe}}case r:return pe}}}var b=u,R=c,L=o,ee=i,U=e,oe=d,H=s,G=k,ne=E,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)===E}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=ee,ye.Element=U,ye.ForwardRef=oe,ye.Fragment=H,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}/*
15
+ */var Rt;function _n(){return Rt||(Rt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,s=r?Symbol.for("react.fragment"):60107,n=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,k=r?Symbol.for("react.suspense_list"):60120,C=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,E=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,B=r?Symbol.for("react.responder"):60118,U=r?Symbol.for("react.scope"):60119;function x(v){return typeof v=="string"||typeof v=="function"||v===s||v===d||v===a||v===n||v===h||v===k||typeof v=="object"&&v!==null&&(v.$$typeof===b||v.$$typeof===C||v.$$typeof===i||v.$$typeof===l||v.$$typeof===f||v.$$typeof===y||v.$$typeof===B||v.$$typeof===U||v.$$typeof===E)}function _(v){if(typeof v=="object"&&v!==null){var Ce=v.$$typeof;switch(Ce){case e:var dt=v.type;switch(dt){case c:case d:case s:case a:case n:case h:return dt;default:var gn=dt&&dt.$$typeof;switch(gn){case l:case f:case b:case C:case i:return gn;default:return Ce}}case t:return Ce}}}var p=c,D=d,P=l,Z=i,$=e,he=f,ce=s,de=b,Fe=C,_e=t,je=a,ie=n,ve=h,Ie=!1;function Ne(v){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.")),m(v)||_(v)===c}function m(v){return _(v)===d}function S(v){return _(v)===l}function L(v){return _(v)===i}function M(v){return typeof v=="object"&&v!==null&&v.$$typeof===e}function O(v){return _(v)===f}function A(v){return _(v)===s}function V(v){return _(v)===b}function j(v){return _(v)===C}function q(v){return _(v)===t}function w(v){return _(v)===a}function z(v){return _(v)===n}function ee(v){return _(v)===h}W.AsyncMode=p,W.ConcurrentMode=D,W.ContextConsumer=P,W.ContextProvider=Z,W.Element=$,W.ForwardRef=he,W.Fragment=ce,W.Lazy=de,W.Memo=Fe,W.Portal=_e,W.Profiler=je,W.StrictMode=ie,W.Suspense=ve,W.isAsyncMode=Ne,W.isConcurrentMode=m,W.isContextConsumer=S,W.isContextProvider=L,W.isElement=M,W.isForwardRef=O,W.isFragment=A,W.isLazy=V,W.isMemo=j,W.isPortal=q,W.isProfiler=w,W.isStrictMode=z,W.isSuspense=ee,W.isValidElementType=x,W.typeOf=_}()),W}var Gt;function Yt(){return Gt||(Gt=1,process.env.NODE_ENV==="production"?Xe.exports=yn():Xe.exports=_n()),Xe.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
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 E=c?c():"";t("Failed "+o+" type: "+p.message+(E??""))}}}}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>>",E={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:oe(),objectOf:ee,oneOf:L,oneOfType:U,shape:G,exact:ne};function k(A,y){return A===y?A!==0||1/A===1/y:A!==A&&y!==y}function S(A,y){this.message=A,this.data=y&&typeof y=="object"?y:{},this.stack=""}S.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 S("The "+B+" `"+z+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new S("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 S("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 S("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 S("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 S("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 S("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 S("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 S("Invalid "+f+" `"+v+"` of value `"+String(P)+"` "+("supplied to `"+l+"`, expected one of "+B+"."))}return _(y)}function ee(A){function y(M,O,l,f,v){if(typeof A!="function")return new S("Property `"+v+"` of component `"+l+"` has invalid PropType notation inside objectOf.");var P=M[O],V=me(P);if(V!=="object")return new S("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 U(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 S("Invalid "+P+" `"+V+"` supplied to "+("`"+v+"`"+pe+"."))}return _(O)}function oe(){function A(y,M,O,l,f){return W(y[M])?null:new S("Invalid "+l+" `"+f+"` supplied to "+("`"+O+"`, expected a ReactNode."))}return _(A)}function H(A,y,M,O,l){return new S((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 S("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 H(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 S("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 H(l,f,v,z,_e(te));if(!te)return new S("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 E.checkPropTypes=n,E.resetWarningCache=n.resetWarningCache,E.PropTypes=E,E},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:E=ve.props.fullSize.default})=>{const k=s&&ve.props.size.options.find(R=>R===s)?`${ve.class}--${s}`:`${ve.class}__${ve.props.size.default}`,S=n&&`${ve.class}--disabled`,_=`${ve.class}__${d}--${c}`,g=u&&`${ve.class}--elevation-${u}`,I=a&&`${ve.class}--with-icon`,N=E?`${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,S,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,[E,k]=F.useState(T),S={image:E?"check_box":"check_box_outline_blank",class:E?`${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:E,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 ${S.class}`,"data-testid":`${s}-icon`,fill:!0,image:S.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 le{static normalize(e){return Array.isArray(e)?e:[e,new le]}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=le;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 le({inserted:e,rawInserted:e})):new le}_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 le,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new le}_appendEager(){return new le}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 le}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={}),le.normalize(this.prepare?this.prepare(e,this,r):e)}doPrepareChar(e,r){return r===void 0&&(r={}),le.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 le;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 le({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 le}}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 le;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 le}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 le;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 le({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 le;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 le}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 le;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(r));return n.inserted&&this.doValidate(r)===!1&&(n=new le,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 le:(this.isFilled=!0,new le({inserted:this.placeholderChar}))}_appendEager(){return new le}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 le}}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,E)=>E.length-T.length);const p=d[0];if(p){const{expose:T,repeat:E,...k}=kr(this.blocks[p]),S={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...k,repeat:E,parent:this},_=E!=null?new re.RepeatBlock(S):wt(S);_&&(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 le;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 le;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 le;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 le;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 le;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 le,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 le;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 le;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 le({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 le;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 le({inserted:this._value.slice(a.length),rawInserted:u?"":e,skip:u}):(this._value=a,c=new le),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 le({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 le;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(""),[E,k]=F.useState(""),[S,_]=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||E===void 0||(b!==E&&(L.unmaskedValue=E,L.unmaskedValue!==E&&N()),d(R))},[E]),F.useEffect(()=>{const{typedValue:b,...R}=c,L=u.current;!L||S===void 0||(b!==S&&(L.typedValue=S,L.masked.typedValueEquals(S)||N()),d(R))},[S]),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:E,setUnmaskedValue:k,typedValue:S,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),[E,k]=F.useState(0),[S,_]=F.useState(0),[g,I]=F.useState(0);let N;switch(F.useEffect(()=>{var b,R,L,ee;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((ee=a==null?void 0:a.current)==null?void 0:ee.offsetWidth))},[a,o]),F.useEffect(()=>(document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}),[]),e){case"top":r==="initial"?N={bottom:p+9,left:E<30?-E/1.5:-E*.01}:r==="end"?N={bottom:p+9,right:E<30?-E/1.5:-E*.01}:N={bottom:p+9,left:-g/2+E/2};break;case"bottom":r==="initial"?N={top:p+9,left:E<30?-E/1.5:-E*.01}:r==="end"?N={top:p+9,right:E<30?-E/1.5:-E*.01}:N={top:p+9,left:-g/2+E/2};break;case"left":r==="initial"?N={right:E+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={right:E+9,bottom:p<30?-p/1.5:-p*.01}:N={right:E+9,top:-S/2+p/2};break;case"right":r==="initial"?N={left:E+9,top:p<30?-p/1.5:-p*.01}:r==="end"?N={left:E+9,bottom:p<30?-p/1.5:-p*.01}:N={left:E+9,top:-S/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:E=Oe.props.icon.default,status:k=Oe.props.status.default,feedback:S,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:ee},U)=>{const[oe,H]=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=>{H(!1),R&&R(B)},M=B=>{H(!0),ee&&ee(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`),E&&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(oe||o)&&B.push(`${Oe.class}__label--active`),B.join(" ")},[o,oe]),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:U,children:[_&&w.jsx("div",{className:"ds-input__feedback",children:S&&w.jsxs(w.Fragment,{children:[w.jsx(Ee,{image:V()}),S]})}),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"})})]}),E&&w.jsx(Ee,{className:"ds-input__icon",image:E}),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:E=Ae.props.status.default,tooltip:k,tooltipPosition:S=Ae.props.tooltipPosition.default,tooltipPlacement:_=Ae.props.tooltipPlacement.default,feedback:g,...I},N)=>{const[D,b]=F.useState(!1),R=U=>{b(!1),d&&d(U,U.target.value),p&&p(U,U.target.value)},L=()=>{const U=[Ae.class,"select-placeholder"];return U.push(`${Ae.class}--${T}`),E&&U.push(`${Ae.class}--${E}`),D&&U.push(`${Ae.class}--active`),r&&U.push(`${Ae.class}--disabled`),e&&U.push(e),U.join(" ")},ee=F.useMemo(()=>{const U=[`${Ae.class}__label`];return!s&&U.push(`${Ae.class}__label--not-animated`),u&&U.push(`${Ae.class}__label--has-value`),s&&!u&&!k&&U.push(`${Ae.class}__label--hidden`),U.join(" ")},[u]);return w.jsxs("div",{className:L(),"data-testid":"select-component",children:[w.jsxs("label",{className:ee,"data-testid":"label-id",htmlFor:i,children:[t,k&&w.jsx(Ut,{className:`${Ae.class}__tooltip`,placement:_,position:S,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:U=>R(U),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((U,oe)=>{var H;return"options"in U?w.jsx("optgroup",{label:U.label,children:(H=U.options)==null?void 0:H.map((G,ne)=>w.jsx("option",{className:`${Ae.class}__option-select`,value:G.value,children:G.label||G.value},ne))},oe):w.jsx("option",{className:`${Ae.class}__option-select`,value:U.value,children:U.label||U.value},oe)})]}),g&&w.jsxs("div",{className:"ds-select__feedback-container",children:[w.jsx(Ee,{className:"ds-select__icon",image:E==="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:E=xe.props.disabled.default,className:k,resize:S=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,ee]=F.useState(!1),[U,oe]=F.useState(0),[H,G]=F.useState(Math.random());F.useEffect(()=>{i==null&&G(Math.random())},[i]);const ne=y=>{oe(y.target.value.length),_&&_(y)},W=y=>{I&&I(y)},he=y=>{ee(!1),g&&g(y)},me=y=>{ee(!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:E,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:S||"none"}}),w.jsx("label",{className:Ie,htmlFor:t,children:n}),u&&w.jsxs("span",{className:"ds-textarea__count",children:[U,"/",u]}),c&&w.jsx(Ut,{className:"ds-textarea__tooltip",placement:"end",text:c,children:w.jsx(Ee,{className:"ds-textarea__icon",image:d})})]},H)});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:E}=Jl(),[k,S]=F.useState("");F.useEffect(()=>{E<=768?S("6"):S("12")},[E]);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:E=$e.props.animated.default,placeholder:k=$e.props.placeholder.default,loading:S})=>{const[_,g]=F.useState(r),[I,N]=F.useState(!1),[D,b]=F.useState(r),R=U=>{g(U.currentTarget.value),a(U),S==null?U.currentTarget.value?N(!0):N(!1):!S&&U.currentTarget.value.length>3&&N(!0)},L=U=>{g(U.label),i(U),p(),b(Math.random().toString()),N(!1)};F.useEffect(()=>{_.length===0&&N(!1)},[S,I,_]);const ee=()=>s.length>0?s.map((U,oe)=>w.jsx("option",{className:`${$e.class}__option ${$e.class}__option--${n}`,"data-testid":`Option ${U.id||U.label}`,onClick:()=>!c&&L(U),value:oe,children:U.label},oe)):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:E,className:`${$e.class}__input`,disabled:c,label:t,name:e,onBlurHandler:p,onChangeHandler:R,onFocusHandler:T,placeholder:k,size:n,status:d,value:_},D),(o||S)&&(S?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})),I&&w.jsx("div",{className:`${$e.class}__list`,"data-testid":"list",children:ee()})]})};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"&&E(_)};function E(_){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)},S=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:E,onChange:k,onKeyDown:T,ref:o,type:"number",value:d}):w.jsx("div",{"data-testid":"inline-editible-div-click",onClick:S,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}`,E=i&&`${st.class}--elevation-${i}`,k=d||c,S=F.useCallback(_=>{_.keyCode===27&&u()},[u]);return F.useEffect(()=>{if(window)return k||window.addEventListener("keyup",S),()=>{window.removeEventListener("keyup",S)}},[k,S]),o?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"ds-modal-overlay",...p,onClick:()=>k?()=>{}:u()}),w.jsxs("div",{className:[st.class,T,E,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,E]=F.useState(o),[k,S]=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(()=>{E(L=>(L===0&&g(!1),L-100))},100)),()=>{clearInterval(R)}},[k,i,o,_]);const N=()=>{S(!0)},D=()=>{S(!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),E=D=>{const b=e.map(R=>R==null?void 0:R.rule(D));return u(b),b},k=D=>{var L,ee,U,oe;n((L=D.currentTarget)==null?void 0:L.value);const b=E((ee=D.currentTarget)==null?void 0:ee.value),R=I(b);t&&t({password:(U=D.currentTarget)==null?void 0:U.value,confirmationPassword:a,isEqual:a===((oe=D.currentTarget)==null?void 0:oe.value),feedback:R})},S=D=>{var L,ee,U;i((L=D.currentTarget)==null?void 0:L.value);const b=E(s),R=I(b);t&&t({password:s,confirmationPassword:(ee=D.currentTarget)==null?void 0:ee.value,isEqual:s===((U=D.currentTarget)==null?void 0:U.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((U,oe)=>{let H=U;return oe?(H++,H):U},0),R=D==null?void 0:D.length,L=b*100/R||0,ee=g(L);return d(ee),ee},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:S,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={},ue={},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=[E(g[0])];let D=0;for(;D<I.length;)N.push(a),o(N,I[D]),N.push(a,E(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:E(Array.isArray(g)?g.join(","):g)}function T(g){return new s(E(g))}t.stringify=T;function E(g){return JSON.stringify(g).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=E;function k(g){return typeof g=="string"&&t.IDENTIFIER.test(g)?new s(`.${g}`):n`[${g}]`}t.getProperty=k;function S(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=S;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:E}=T,k=(p=d.key)!==null&&p!==void 0?p:d.ref;let S=this._values[E];if(S){const I=S.get(k);if(I)return I}else S=this._values[E]=new Map;S.set(k,T);const _=this._scope[E]||(this._scope[E]=[]),g=_.length;return _[g]=d.ref,T.setValue(d,{property:E,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 E=e.nil;for(const k in c){const S=c[k];if(!S)continue;const _=p[k]=p[k]||new Map;S.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;E=(0,e._)`${E}${N} ${g} = ${I};${this.opts._n}`}else if(I=T==null?void 0:T(g))E=(0,e._)`${E}${I}${this.opts._n}`;else throw new r(g);_.set(g,s.Completed)})}return E}}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 E 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 E{render(l){return"{"+l._n+super.render(l)+"}"+l._n}}class S extends E{}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 E{render(l){return"return "+super.render(l)}}L.kind="return";class ee 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 U extends k{constructor(l){super(),this.error=l}render(l){return`catch(${this.error})`+super.render(l)}}U.kind="catch";class oe extends k{render(l){return"finally"+super.render(l)}}oe.kind="finally";class H{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 S]}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 ee;if(this._blockNode(P),this.code(l),f){const V=this.name("e");this._currNode=P.catch=new U(V),f(V)}return v&&(this._currNode=P.finally=new oe,this.code(v)),this._endBlockNode(U,oe)}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=H;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})`}}(ue);var K={};Object.defineProperty(K,"__esModule",{value:!0}),K.checkStrictMode=K.getErrorPath=K.Type=K.useFunc=K.setEvaluated=K.evaluatedPropsToName=K.mergeEvaluated=K.eachItem=K.unescapeJsonPointer=K.escapeJsonPointer=K.escapeFragment=K.unescapeFragment=K.schemaRefOrVal=K.schemaHasRulesButRef=K.schemaHasRules=K.checkUnknownRules=K.alwaysValidSchema=K.toHash=void 0;const be=ue,ou=Ar;function lu(t){const e={};for(const r of t)e[r]=!0;return e}K.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))}K.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}"`)}K.checkUnknownRules=Wi;function Yi(t,e){if(typeof t=="boolean")return!t;for(const r in t)if(e[r])return!0;return!1}K.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}K.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)}`}K.schemaRefOrVal=du;function fu(t){return Xi(decodeURIComponent(t))}K.unescapeFragment=fu;function pu(t){return encodeURIComponent(vn(t))}K.escapeFragment=pu;function vn(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}K.escapeJsonPointer=vn;function Xi(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}K.unescapeJsonPointer=Xi;function hu(t,e){if(Array.isArray(t))for(const r of t)e(r);else e(t)}K.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}}K.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}K.evaluatedPropsToName=Zi;function _n(t,e,r){Object.keys(r).forEach(s=>t.assign((0,be._)`${e}${(0,be.getProperty)(s)}`,!0))}K.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))})}K.useFunc=mu;var bn;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(bn||(K.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)}K.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)}}K.checkStrictMode=eo;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});const He=ue,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=ue,r=K,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,ee=p(_,g,I);N??(R||L)?u(b,ee):c(D,(0,e._)`[${ee}]`)}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=[E(D,I),k(_,I)];return S(_,g,b),N.object(...b)}function E({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 S(_,{params:g,message:I},N){const{keyword:D,data:b,schemaValue:R,it:L}=_,{opts:ee,propertyName:U,topSchemaRef:oe,schemaPath:H}=L;N.push([d.keyword,D],[d.params,typeof g=="function"?g(_):g||(0,e._)`{}`]),ee.messages&&N.push([d.message,typeof I=="function"?I(_):I]),ee.verbose&&N.push([d.schema,R],[d.parentSchema,(0,e._)`${oe}${H}`],[s.default.data,b]),U&&N.push([d.propertyName,U])}}(Or),Object.defineProperty(lr,"__esModule",{value:!0}),lr.boolOrEmptySchema=lr.topBoolOrEmptySchema=void 0;const vu=Or,_u=ue,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=ue,no=K;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=ue,Bu=K;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={},ce={};Object.defineProperty(ce,"__esModule",{value:!0}),ce.validateUnion=ce.validateArray=ce.usePattern=ce.callValidateCode=ce.schemaProperties=ce.allSchemaProperties=ce.noPropertyInData=ce.propertyInData=ce.isOwnProperty=ce.hasPropFunc=ce.reportMissingProp=ce.checkMissingProp=ce.checkReportMissingProp=void 0;const ke=ue,kn=K,xt=yt,Ru=K;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()})}ce.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}`)))}ce.checkMissingProp=qu;function Uu(t,e){t.setParams({missingProperty:e},!0),t.error()}ce.reportMissingProp=Uu;function lo(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ke._)`Object.prototype.hasOwnProperty`})}ce.hasPropFunc=lo;function wn(t,e,r){return(0,ke._)`${lo(t)}.call(${e}, ${r})`}ce.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}ce.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}ce.noPropertyInData=Cn;function uo(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}ce.allSchemaProperties=uo;function Ku(t,e){return uo(e).filter(r=>!(0,kn.alwaysValidSchema)(t,e[r]))}ce.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})`}ce.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})`})}ce.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)})}}ce.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))}ce.validateUnion=Ju,Object.defineProperty(vt,"__esModule",{value:!0}),vt.validateKeywordUsage=vt.validSchemaType=vt.funcKeywordCode=vt.macroKeywordCode=void 0;const Ke=ue,Yt=yt,Zu=ce,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)S(),e.modifying&&co(t),_(()=>t.error());else{const g=e.async?E():k();e.modifying&&co(t),_(()=>rc(t,g))}}function E(){const g=s.let("ruleErrs",null);return s.try(()=>S((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),S(Ke.nil),g}function S(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=ue,po=K;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 E in p)ds(t,e,r,p[E],n+"/"+d+"/"+uc(E),a,n,d,s,E)}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=K,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,E,k)=>{if(k===void 0)return;const S=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(S)&&(N[0]==="#"?(c(p,o[N],N),o[N]=p):this.refs[N]=S),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,E){if(T!==void 0&&!fc(p,T))throw d(E)}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=ue,se=yt,Sc=Le,Nt=K,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=ue,Kc=Nr,Xt=yt,ft=Le,Fo=K,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 E=new Function(`${Xt.default.self}`,`${Xt.default.scope}`,d)(this,this.scope.get());if(this.scope.value(u,{ref:E}),E.errors=null,E.schema=t.schema,E.schemaEnv=t,t.$async&&(E.$async=!0),this.opts.code.source===!0&&(E.source={validateName:u,validateCode:p,scopeValues:i._values}),this.opts.unevaluated){const{props:k,items:S}=c;E.evaluated={props:k instanceof dt.Name?void 0:k,items:S instanceof dt.Name?void 0:S,dynamicProps:k instanceof dt.Name,dynamicItems:S instanceof dt.Name},E.source&&(E.source.evaluated=(0,dt.stringify)(E.evaluated))}return t.validate=E,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="[\\:\\/\\?\\#\\[\\]\\@]",Q="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",fe=s(J,Q),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,Q,"[\\:]"))+"*");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,Q,"[\\:]")+"+"),n(n(j+"|"+s(de,Q))+"*");var Hr=n(j+"|"+s(de,Q,"[\\:\\@]"));return n(n(j+"|"+s(de,Q,"[\\@]"))+"+"),n(n(Hr+"|"+s("[\\/\\?]",Ne))+"*"),{NOT_SCHEME:new RegExp(s("[^]",m,C,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(s("[^\\%\\:]",de,Q),"g"),NOT_HOST:new RegExp(s("[^\\%\\[\\]\\:]",de,Q),"g"),NOT_PATH:new RegExp(s("[^\\%\\/\\:\\@]",de,Q),"g"),NOT_PATH_NOSCHEME:new RegExp(s("[^\\%\\/\\@]",de,Q),"g"),NOT_QUERY:new RegExp(s("[^\\%]",de,Q,"[\\:\\@\\/\\?]",Ne),"g"),NOT_FRAGMENT:new RegExp(s("[^\\%]",de,Q,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(s("[^]",de,Q),"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,Q=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,Q=Ne}finally{try{!j&&fe.return&&fe.return()}finally{if(J)throw Q}}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")}}(),E=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,S=36,_=1,g=26,I=38,N=700,D=72,b=128,R="-",L=/^xn--/,ee=/[^\0-\x7E]/,U=/[\x2E\u3002\uFF0E\uFF61]/g,oe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},H=S-_,G=Math.floor,ne=String.fromCharCode;function W($){throw new RangeError(oe[$])}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(U,".");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,E(m))},Fe=function(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:S},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>H*g>>1;j+=S)m=G(m/H);return G(j+(H+1)*m/(m+I))},M=function(m){var C=[],x=m.length,j=0,J=b,Q=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=S;;Pe+=S){Ne>=x&&W("invalid-input");var ae=Fe(m.charCodeAt(Ne++));(ae>=S||ae>G((k-j)/Se))&&W("overflow"),j+=ae*Se;var Ce=Pe<=Q?_:Pe>=Q+g?g:Pe-Q;if(ae<Ce)break;var Me=S-Ce;Se>G(k/Me)&&W("overflow"),Se*=Me}var Te=C.length+1;Q=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,Q=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=S;;Is+=S){var Ns=Is<=Q?_:Is>=Q+g?g:Is-Q;if(Ds<Ns)break;var bl=Ds-Ns,$l=S-Ns;C.push(ne(A(Ns+bl%$l,0))),Ds=G(bl/$l)}C.push(ne(A(Ds,0))),Q=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 ee.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 Q=parseInt($.substr(C+4,2),16),fe=parseInt($.substr(C+7,2),16);m+=String.fromCharCode((j&15)<<12|(Q&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 Q=j.toLowerCase().split("::").reverse(),fe=T(Q,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(Q){C.error=C.error||"Host's domain name can not be converted to ASCII via punycode: "+Q}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,Q){return"["+J+(Q?"%25"+Q:"")+"]"})),(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 Q=$.path;!m.absolutePath&&(!j||!j.absolutePath)&&(Q=bt(Q)),J===void 0&&(Q=Q.replace(/^\/\//,"/%2F")),x.push(Q)}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],Q=j[1];m.path=J&&J!=="/"?J:void 0,m.query=Q,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,Q={},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,Q[at(de[0],C)]=at(de[1],C);break}}J&&(x.headers=Q)}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,Q=j.length;J<Q;++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",Q=x[1].toLowerCase(),fe=x[2],we=J+":"+(C.nid||Q),Ne=P[we];j.nid=Q,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),Q=P[J];Q&&(m=Q.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=ue;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=ue,u=Le,c=je,d=K,p=Qc,T=Fn,E=(A,y)=>new RegExp(A,y);E.code="new RegExp";const k=["removeAdditional","useDefaults","coerceTypes"],S=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:E,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:S,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=oe.call(this),y.formats&&ee.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),y.keywords&&U.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 ee(){for(const A in this.opts.formats){const y=this.opts.formats[A];y&&this.addFormat(A,y)}}function U(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 oe(){const A={...this.opts};for(const y of k)delete A[y];return A}const H={log(){},warn(){},error(){}};function G(A){if(A===!1)return H;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=ce,Je=ue,fr=yt,Vo=Xe,ms=K,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 E(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 S=Bo(t,k);gs(t,S,k,k.$async)}function E(k){const S=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:S,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)}`),E(e),i||n.assign(k,!0)},S=>{n.if((0,Je._)`!(${S} instanceof ${a.ValidationError})`,()=>n.throw(S)),T(S),i||n.assign(k,!1)}),t.ok(k)}function p(){t.result((0,xo.callValidateCode)(t,e,c),()=>E(e),()=>T(e))}function T(k){const S=(0,Je._)`${k}.errors`;n.assign(fr.default.vErrors,(0,Je._)`${fr.default.vErrors} === null ? ${S} : ${fr.default.vErrors}.concat(${S})`),n.assign(fr.default.errors,(0,Je._)`${fr.default.vErrors}.length`)}function E(k){var S;if(!a.opts.unevaluated)return;const _=(S=r==null?void 0:r.validate)===null||S===void 0?void 0:S.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=ue,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=ue,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=ue,cd=K,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=ce,_s=ue,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=ue,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=ce,xr=ue,gd=K,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 E=t.parentSchema.properties,{definedProperties:k}=t.it;for(const S of r)if((E==null?void 0:E[S])===void 0&&!k.has(S)){const _=i.schemaEnv.baseId+i.errSchemaPath,g=`required property "${S}" 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 E of r)(0,jr.checkReportMissingProp)(t,E)}function d(){const E=e.let("missing");if(u||a){const k=e.let("valid",!0);t.block$data(k,()=>T(E,k)),t.ok(k)}else e.if((0,jr.checkMissingProp)(t,r,E)),(0,jr.reportMissingProp)(t,E),e.else()}function p(){e.forOf("prop",s,E=>{t.setParams({missingProperty:E}),e.if((0,jr.noPropertyInData)(e,n,E,o.ownProperties),()=>t.error())})}function T(E,k){t.setParams({missingProperty:E}),e.forOf(E,s,()=>{e.assign(k,(0,jr.propertyInData)(e,n,E,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=ue,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=ue,_d=K,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`),S=e.let("j");t.setParams({i:k,j:S}),e.assign(u,!0),e.if((0,Re._)`${k} > 1`,()=>(p()?T:E)(k,S))}function p(){return c.length>0&&!c.some(k=>k==="object"||k==="array")}function T(k,S){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(S,(0,Re._)`${I}[${_}]`),t.error(),e.assign(u,!1).break()}).code((0,Re._)`${I}[${_}] = ${k}`)})}function E(k,S){const _=(0,_d.useFunc)(e,bd.default),g=e.name("outer");e.label(g).for((0,Re._)`;${k}--;`,()=>e.for((0,Re._)`${S} = ${k}; ${S}--;`,()=>e.if((0,Re._)`${_}(${r}[${k}], ${r}[${S}])`,()=>{t.error(),e.assign(u,!1).break(g)})))}}};Wn.default=$d;var Xn={};Object.defineProperty(Xn,"__esModule",{value:!0});const Jn=ue,Sd=K,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=ue,wd=K,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 E=e.const("vSchema",a);d=(0,Lr.or)(...n.map((k,S)=>T(E,S)))}t.pass(d);function p(){e.assign(d,!1),e.forOf("v",a,E=>e.if((0,Lr._)`${c()}(${r}, ${E})`,()=>e.assign(d,!0).break()))}function T(E,k){const S=n[k];return typeof S=="object"&&S!==null?(0,Lr._)`${c()}(${r}, ${E}[${k}])`:(0,Lr._)`${r} === ${S}`}}};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=ue,ea=K,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=ue,bs=K,Ld=ce,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:E}=o,k=r.length,S=k===p.minItems&&(k===p.maxItems||p[e]===!1);if(T.strictTuples&&!S){const _=`"${i}" is ${k}-tuple, but minItems or maxItems/${e} are not specified or different at path "${E}"`;(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=ue,Ud=K,Hd=ce,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=ue,$s=K,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 S=(0,nt._)`${d} >= ${i}`;o!==void 0&&(S=(0,nt._)`${S} && ${d} <= ${o}`),t.pass(S);return}a.items=!0;const p=e.name("valid");o===void 0&&i===1?E(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 S=e.name("_valid"),_=e.let("count",0);E(S,()=>e.if(S,()=>k(_)))}function E(S,_){e.forRange("i",0,d,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:$s.Type.Num,compositeRule:!0},S),_()})}function k(S){e.code((0,nt._)`${S}++`),o===void 0?e.if((0,nt._)`${S} >= ${i}`,()=>e.assign(p,!0).break()):(e.if((0,nt._)`${S} > ${o}`,()=>e.assign(p,!1).break()),i===1?e.assign(p,!0):e.if((0,nt._)`${S} >= ${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=ue,r=K,s=ce;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
- depsCount: ${c},
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 E=d.let("missing");for(const k in c){const S=c[k];if(S.length===0)continue;const _=(0,s.propertyInData)(d,p,k,T.opts.ownProperties);u.setParams({property:k,depsCount:S.length,deps:S.join(", ")}),T.allErrors?d.if(_,()=>{for(const g of S)(0,s.checkReportMissingProp)(u,g)}):(d.if((0,e._)`${_} && (${(0,s.checkMissingProp)(u,S,E)})`),(0,s.reportMissingProp)(u,E),d.else())}}t.validatePropertyDeps=i;function o(u,c=u.schema){const{gen:d,data:p,keyword:T,it:E}=u,k=d.name("valid");for(const S in c)(0,r.alwaysValidSchema)(E,c[S])||(d.if((0,s.propertyInData)(d,p,S,E.opts.ownProperties),()=>{const _=u.subschema({keyword:T,schemaProp:S},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=ue,Yd=K,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=ce,pt=ue,Jd=yt,ks=K,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 E(_){e.code((0,pt._)`delete ${n}[${_}]`)}function k(_){if(u.removeAdditional==="all"||u.removeAdditional&&r===!1){E(_);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"?(S(_,g,!1),e.if((0,pt.not)(g),()=>{t.reset(),E(_)})):(S(_,g),o||e.if((0,pt.not)(g),()=>e.break()))}}function S(_,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=ce,ia=K,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=ce,ws=ue,Jo=K,Zo=K,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(S=>(0,Jo.alwaysValidSchema)(a,r[S]));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 S of o)c&&E(S),a.allErrors?k(S):(e.var(d,!0),k(S),e.if(d))}function E(S){for(const _ in c)new RegExp(S).test(_)&&(0,Jo.checkStrictMode)(a,`property ${_} matches pattern ${S} (use allowMatchingProperties)`)}function k(S){e.forIn("key",s,_=>{e.if((0,ws._)`${(0,Xo.usePattern)(t,S)}.test(${_})`,()=>{const g=u.includes(S);g||t.subschema({keyword:"patternProperties",schemaProp:S,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=K,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:ce.validateUnion,error:{message:"must match a schema in anyOf"}};ua.default=nf;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});const Cs=ue,af=K,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=K,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=ue,Qo=K,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=K,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=ue,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():E();function T(){const k=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),S=r.const("fDef",(0,De._)`${k}[${i}]`),_=r.let("fType"),g=r.let("format");r.if((0,De._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>r.assign(_,(0,De._)`${S}.type || "string"`).assign(g,(0,De._)`${S}.validate`),()=>r.assign(_,(0,De._)`"string"`).assign(g,S)),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._)`(${S}.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 E(){const k=p.formats[a];if(!k){I();return}if(k===!0)return;const[S,_,g]=N(k);S===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=ue,ya=Os,sl=Xe,xf=K,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 E=T();e.if(!1);for(const k in E)e.elseIf((0,gr._)`${c} === ${k}`),e.assign(u,p(E[k]));e.else(),t.error(!1,{discrError:ya.DiscrError.Mapping,tag:c,tagName:o}),e.endIf()}function p(E){const k=e.name("valid"),S=t.subschema({keyword:"oneOf",schemaProp:E},k);return t.mergeEvaluated(S,gr.Name),k}function T(){var E;const k={},S=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=(E=b==null?void 0:b.properties)===null||E===void 0?void 0:E[o];if(typeof R!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);_=_&&(S||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=ue;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(H,G){return{validate:H,compare:G}}t.fullFormats={date:e(a,i),time:e(u(!0),c),"date-time":e(T(!0),E),"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:oe,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:ee},double:{type:"number",validate:ee},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,E),"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(H){return H%4===0&&(H%100!==0||H%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(H){const G=s.exec(H);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(H,G){if(H&&G)return H>G?1:H<G?-1:0}const o=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(H){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||H&&!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(H,G){if(!(H&&G))return;const ne=new Date("2020-01-01T"+H).valueOf(),W=new Date("2020-01-01T"+G).valueOf();if(ne&&W)return ne-W}function d(H,G){if(!(H&&G))return;const ne=o.exec(H),W=o.exec(G);if(ne&&W)return H=ne[1]+ne[2]+ne[3],G=W[1]+W[2]+W[3],H>G?1:H<G?-1:0}const p=/t|\s/i;function T(H){const G=u(H);return function(W){const he=W.split(p);return he.length===2&&a(he[0])&&G(he[1])}}function E(H,G){if(!(H&&G))return;const ne=new Date(H).valueOf(),W=new Date(G).valueOf();if(ne&&W)return ne-W}function k(H,G){if(!(H&&G))return;const[ne,W]=H.split(p),[he,me]=G.split(p),_e=i(ne,he);if(_e!==void 0)return _e||c(W,me)}const S=/\/|:/,_=/^(?:[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(H){return S.test(H)&&_.test(H)}const I=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function N(H){return I.lastIndex=0,I.test(H)}const D=-(2**31),b=2**31-1;function R(H){return Number.isInteger(H)&&H<=b&&H>=D}function L(H){return Number.isInteger(H)}function ee(){return!0}const U=/[^\\]\\Z/;function oe(H){if(U.test(H))return!1;try{return new RegExp(H),!0}catch{return!1}}})(al);var il={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=nl,r=ue,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:E,self:k}=T;if(!E.validateFormats)return;const S=new e.KeywordCxt(T,k.RULES.all.format.definition,"format");S.$data?_():g();function _(){const N=u.scopeValue("formats",{ref:k.formats,code:E.code.formats}),D=u.const("fmt",(0,r._)`${N}[${S.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=S.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:E.code.formats?(0,r._)`${E.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=ue,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],E=d.formats||r.formatNames;return u(c,E,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 E,k;(E=(k=c.opts.code).formats)!==null&&E!==void 0||(k.formats=(0,n._)`require("ajv-formats/dist/formats").${T}`);for(const S of d)c.addFormat(S,p[S])}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,E]=F.useState({}),[k,S]=F.useState(void 0);F.useEffect(()=>{I()},[]),F.useEffect(()=>{const l=qf();l.compile(t),S(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]),ee=F.useCallback((l,f)=>{const v={[l]:f};o(P=>({...P,...v}))},[]),U=F.useCallback((l,f)=>{const v={[l]:f};c(P=>({...P,...v}))},[]),oe=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]),H=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=H(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,H]),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]||E(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);U(l,Pt),ne(l,Pt,{touched:!0})},pe.options=Ge,pe}return pe},[y,T,u,Ie,_e,me,N,U,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:ee,handleCustomValue:U,clearFormDataKey:O,getFormValidated:n,getFormFlagFields:i,validateForm:oe,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]),E=F.useMemo(()=>({index:r,...T(r)}),[r,T]),k=F.useMemo(()=>r===i,[r,i]),S=F.useCallback(L=>n.findIndex(U=>Tr(U,L)),[n]),_=F.useCallback(L=>n.findIndex(U=>U.name===L),[n]),g=F.useCallback(L=>typeof L=="object"?S(L):typeof L=="string"?_(L):L,[S,_]),I=F.useCallback(L=>{const ee=g(L);ee!==r&&s(ee)},[g,r]),N=F.useCallback(L=>{const ee=g(L);return{index:ee,...T(ee)}},[g,T]),D=F.useCallback(L=>r===g(L),[r,g]),b=F.useCallback(L=>{const U=[...n].map((oe,H)=>(oe.disabled=H>g(L),oe));a(U)},[n,g]);function R(L){const ee=[...n],U=Array.isArray(L)?L.map(oe=>g(oe)):[g(L)];return ee.map((oe,H)=>(oe.disabled=!!U.includes(H),oe))}return[{getSteps:n,getStep:N,getStepSelected:E,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"})});
19
+ */var ht,Xt;function vn(){if(Xt)return ht;Xt=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=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={},l=0;l<10;l++)i["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(c.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ht=n()?Object.assign:function(a,i){for(var l,c=s(a),d,f=1;f<arguments.length;f++){l=Object(arguments[f]);for(var h in l)e.call(l,h)&&(c[h]=l[h]);if(r){d=r(l);for(var k=0;k<d.length;k++)t.call(l,d[k])&&(c[d[k]]=l[d[k]])}}return c},ht}var ft,Kt;function gt(){if(Kt)return ft;Kt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ft=r,ft}var mt,Zt;function Jt(){return Zt||(Zt=1,mt=Function.call.bind(Object.prototype.hasOwnProperty)),mt}var yt,Qt;function kn(){if(Qt)return yt;Qt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=gt(),t={},s=Jt();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(a,i,l,c,d){if(process.env.NODE_ENV!=="production"){for(var f in a)if(s(a,f)){var h;try{if(typeof a[f]!="function"){var k=Error((c||"React class")+": "+l+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}h=a[f](i,f,c,l,null,e)}catch(b){h=b}if(h&&!(h instanceof Error)&&r((c||"React class")+": type specification of "+l+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in t)){t[h.message]=!0;var C=d?d():"";r("Failed "+l+" type: "+h.message+(C??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},yt=n,yt}var _t,es;function bn(){if(es)return _t;es=1;var r=Yt(),e=vn(),t=gt(),s=Jt(),n=kn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return _t=function(l,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(m){var S=m&&(d&&m[d]||m[f]);if(typeof S=="function")return S}var k="<<anonymous>>",C={array:B("array"),bigint:B("bigint"),bool:B("boolean"),func:B("function"),number:B("number"),object:B("object"),string:B("string"),symbol:B("symbol"),any:U(),arrayOf:x,element:_(),elementType:p(),instanceOf:D,node:he(),objectOf:Z,oneOf:P,oneOfType:$,shape:de,exact:Fe};function b(m,S){return m===S?m!==0||1/m===1/S:m!==m&&S!==S}function E(m,S){this.message=m,this.data=S&&typeof S=="object"?S:{},this.stack=""}E.prototype=Error.prototype;function y(m){if(process.env.NODE_ENV!=="production")var S={},L=0;function M(A,V,j,q,w,z,ee){if(q=q||k,z=z||j,ee!==t){if(c){var v=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 v.name="Invariant Violation",v}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=q+":"+j;!S[Ce]&&L<3&&(a("You are manually calling a React.PropTypes validation function for the `"+z+"` prop on `"+q+"`. 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."),S[Ce]=!0,L++)}}return V[j]==null?A?V[j]===null?new E("The "+w+" `"+z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new E("The "+w+" `"+z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:m(V,j,q,w,z)}var O=M.bind(null,!1);return O.isRequired=M.bind(null,!0),O}function B(m){function S(L,M,O,A,V,j){var q=L[M],w=ie(q);if(w!==m){var z=ve(q);return new E("Invalid "+A+" `"+V+"` of type "+("`"+z+"` supplied to `"+O+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return y(S)}function U(){return y(i)}function x(m){function S(L,M,O,A,V){if(typeof m!="function")return new E("Property `"+V+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var j=L[M];if(!Array.isArray(j)){var q=ie(j);return new E("Invalid "+A+" `"+V+"` of type "+("`"+q+"` supplied to `"+O+"`, expected an array."))}for(var w=0;w<j.length;w++){var z=m(j,w,O,A,V+"["+w+"]",t);if(z instanceof Error)return z}return null}return y(S)}function _(){function m(S,L,M,O,A){var V=S[L];if(!l(V)){var j=ie(V);return new E("Invalid "+O+" `"+A+"` of type "+("`"+j+"` supplied to `"+M+"`, expected a single ReactElement."))}return null}return y(m)}function p(){function m(S,L,M,O,A){var V=S[L];if(!r.isValidElementType(V)){var j=ie(V);return new E("Invalid "+O+" `"+A+"` of type "+("`"+j+"` supplied to `"+M+"`, expected a single ReactElement type."))}return null}return y(m)}function D(m){function S(L,M,O,A,V){if(!(L[M]instanceof m)){var j=m.name||k,q=Ne(L[M]);return new E("Invalid "+A+" `"+V+"` of type "+("`"+q+"` supplied to `"+O+"`, expected ")+("instance of `"+j+"`."))}return null}return y(S)}function P(m){if(!Array.isArray(m))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 S(L,M,O,A,V){for(var j=L[M],q=0;q<m.length;q++)if(b(j,m[q]))return null;var w=JSON.stringify(m,function(ee,v){var Ce=ve(v);return Ce==="symbol"?String(v):v});return new E("Invalid "+A+" `"+V+"` of value `"+String(j)+"` "+("supplied to `"+O+"`, expected one of "+w+"."))}return y(S)}function Z(m){function S(L,M,O,A,V){if(typeof m!="function")return new E("Property `"+V+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var j=L[M],q=ie(j);if(q!=="object")return new E("Invalid "+A+" `"+V+"` of type "+("`"+q+"` supplied to `"+O+"`, expected an object."));for(var w in j)if(s(j,w)){var z=m(j,w,O,A,V+"."+w,t);if(z instanceof Error)return z}return null}return y(S)}function $(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var S=0;S<m.length;S++){var L=m[S];if(typeof L!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Ie(L)+" at index "+S+"."),i}function M(O,A,V,j,q){for(var w=[],z=0;z<m.length;z++){var ee=m[z],v=ee(O,A,V,j,q,t);if(v==null)return null;v.data&&s(v.data,"expectedType")&&w.push(v.data.expectedType)}var Ce=w.length>0?", expected one of type ["+w.join(", ")+"]":"";return new E("Invalid "+j+" `"+q+"` supplied to "+("`"+V+"`"+Ce+"."))}return y(M)}function he(){function m(S,L,M,O,A){return _e(S[L])?null:new E("Invalid "+O+" `"+A+"` supplied to "+("`"+M+"`, expected a ReactNode."))}return y(m)}function ce(m,S,L,M,O){return new E((m||"React class")+": "+S+" type `"+L+"."+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function de(m){function S(L,M,O,A,V){var j=L[M],q=ie(j);if(q!=="object")return new E("Invalid "+A+" `"+V+"` of type `"+q+"` "+("supplied to `"+O+"`, expected `object`."));for(var w in m){var z=m[w];if(typeof z!="function")return ce(O,A,V,w,ve(z));var ee=z(j,w,O,A,V+"."+w,t);if(ee)return ee}return null}return y(S)}function Fe(m){function S(L,M,O,A,V){var j=L[M],q=ie(j);if(q!=="object")return new E("Invalid "+A+" `"+V+"` of type `"+q+"` "+("supplied to `"+O+"`, expected `object`."));var w=e({},L[M],m);for(var z in w){var ee=m[z];if(s(m,z)&&typeof ee!="function")return ce(O,A,V,z,ve(ee));if(!ee)return new E("Invalid "+A+" `"+V+"` key `"+z+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(L[M],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(m),null," "));var v=ee(j,z,O,A,V+"."+z,t);if(v)return v}return null}return y(S)}function _e(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(_e);if(m===null||l(m))return!0;var S=h(m);if(S){var L=S.call(m),M;if(S!==m.entries){for(;!(M=L.next()).done;)if(!_e(M.value))return!1}else for(;!(M=L.next()).done;){var O=M.value;if(O&&!_e(O[1]))return!1}}else return!1;return!0;default:return!1}}function je(m,S){return m==="symbol"?!0:S?S["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&S instanceof Symbol:!1}function ie(m){var S=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":je(S,m)?"symbol":S}function ve(m){if(typeof m>"u"||m===null)return""+m;var S=ie(m);if(S==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return S}function Ie(m){var S=ve(m);switch(S){case"array":case"object":return"an "+S;case"boolean":case"date":case"regexp":return"a "+S;default:return S}}function Ne(m){return!m.constructor||!m.constructor.name?k:m.constructor.name}return C.checkPropTypes=n,C.resetWarningCache=n.resetWarningCache,C.PropTypes=C,C},_t}var vt,ts;function Sn(){if(ts)return vt;ts=1;var r=gt();function e(){}function t(){}return t.resetWarningCache=e,vt=function(){function s(i,l,c,d,f,h){if(h!==r){var k=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 k.name="Invariant Violation",k}}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},vt}if(process.env.NODE_ENV!=="production"){var Cn=Yt(),En=!0;pt.exports=bn()(Cn.isElement,En)}else pt.exports=Sn()();var Tn=pt.exports;const o=mn(Tn),ss={Primary:"primary",Secondary:"secondary",Info:"info",Success:"success",Danger:"danger",Warning:"warning",Neutral:"neutral"},ns={Solid:"solid",Outline:"outline",Text:"text"},as={Large:"lg",Medium:"md",Small:"sm"},rs={Right:"right",Left:"left"},R={name:"Button",class:"ds-button",props:{color:{type:String,default:ss.Primary,options:Object.values(ss)},variant:{type:String,default:ns.Solid,options:Object.values(ns)},size:{type:String,default:as.Medium,options:Object.values(as)},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:rs.Right,options:Object.values(rs)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}},is={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"},os={Outlined:"outlined",Rounded:"rounded",Sharp:"sharp"},ls={XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl",Huge:"huge"},us={Bold:"bold",Semibold:"semibold",Medium:"medium",Regular:"regular",Light:"light",Extralight:"extralight"},re={name:"Icon",class:"ds-icon",props:{color:{type:String,default:is.Neutral90,options:Object.values(is)},image:{type:String,default:"settings"},variation:{type:String,default:os.Outlined,options:Object.values(os)},size:{type:String,default:ls.MD,options:Object.values(ls)},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:us.Semibold,options:Object.values(us)},onClick:{type:Function,default:()=>({})}}},An={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},Y=({image:r=re.props.image.default,color:e=re.props.color.default,className:t,size:s=re.props.size.default,fill:n=re.props.fill.default,weight:a=re.props.weight.default,testId:i=re.props.testId.default,onClick:l=re.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&re.props.color.options.find(h=>h===e)&&`${re.class}__color--${e}`,f=g.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${An[a]}, 'opsz' 48`}),[a,n]);return u.jsx("i",{className:[`${re.class}--${s}`,re.class,c,d,t&&t].filter(h=>h).join(" "),"data-testid":i,onClick:l,style:f,translate:"no",children:r})};Y.propTypes={color:o.oneOf(re.props.color.options),image:o.string,fontVariationSettings:o.object,size:o.oneOf(re.props.size.options),fill:o.bool,weight:o.oneOf(re.props.weight.options),onClick:o.func},Y.displayName="DsIcon";const He=({children:r,className:e,onClick:t,size:s=R.props.size.default,disabled:n=R.props.disabled.default,icon:a=R.props.icon.default,id:i=R.props.id.default,testId:l=R.props.testId.default,elevation:c,variant:d=R.props.variant.default,color:f=R.props.color.default,iconFill:h=R.props.iconFill.default,iconPosition:k=R.props.iconPosition.default,fullSize:C=R.props.fullSize.default})=>{const b=s&&R.props.size.options.find(D=>D===s)?`${R.class}--${s}`:`${R.class}__${R.props.size.default}`,E=n&&`${R.class}--disabled`,y=`${R.class}__${f}--${d}`,B=c&&`${R.class}--elevation-${c}`,U=a&&`${R.class}--with-icon`,x=C?`${R.class}--full-size`:"",_=k==="right"?`${R.class}__icon`:`${R.class}__icon--left`,p=k==="right"?`${R.class}__text`:`${R.class}__text--reversed`;return u.jsx("button",{className:[R.class,x,E,U,b,y,B,U,e&&e].filter(D=>D).join(" "),"data-testid":l,disabled:n,id:i,onClick:n?void 0:t,children:u.jsxs("span",{className:["ds-button__text",p].join(" "),children:[r,a&&u.jsx(Y,{className:["ds-button__icon",_].join(" "),fill:h,image:a,size:s})]})})};He.propTypes={color:o.oneOf(R.props.color.options),variant:o.oneOf(R.props.variant.options),size:o.oneOf(R.props.size.options),disabled:o.bool,icon:o.string,iconFill:o.bool,iconPosition:o.oneOf(R.props.iconPosition.options),testId:o.string,id:o.string,fullSize:o.bool},He.displayName="DsButton";const xn={name:"Caption",class:"ds-caption"},kt=({children:r,className:e,testId:t="ds-caption-test"})=>u.jsx("p",{className:[xn.class,e&&e].filter(s=>s).join(" "),"data-testid":t,children:r});kt.propTypes={children:o.node.isRequired,className:o.string,testId:o.string},kt.displayName="DsCaption";const Ke={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"},fe={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:Ke.None,options:Object.values(Ke)},borderColor:{type:String,default:Ke.None,options:Object.values(Ke)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},bt=({id:r,testId:e=fe.props.testId.default,children:t,className:s,elevation:n=fe.props.elevation.default,backgroundColor:a=fe.props.backgroundColor.default,borderColor:i=fe.props.borderColor.default})=>{const l=n&&`${fe.class}--elevation-${n}`,c=i&&`${fe.class}--border-${i}`,d=a&&`${fe.class}--${a}`;return u.jsx("div",{className:[fe.class,s,l,c,d].filter(f=>f).join(" "),"data-testid":e,id:r,children:t})};bt.propTypes={id:o.string,testId:o.string,backgroundColor:o.oneOf(fe.props.backgroundColor.options),borderColor:o.oneOf(fe.props.borderColor.options),elevation:o.oneOf(fe.props.elevation.options)},bt.displayName="DsCard";const ae={name:"Checkbox",class:"ds-checkbox",props:{name:{type:String,required:!1},testId:{type:String,default:"ds-checkbox-test"},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:()=>({})}}},St=g.forwardRef(({id:r,className:e,name:t,testId:s=ae.props.testId.default,label:n=ae.props.label.default,description:a=ae.props.description.default,checked:i=ae.props.checked.default,disabled:l=ae.props.checked.default,changeByChecked:c=ae.props.changeByChecked.default,onChangeHandler:d},f)=>{const h=c||!1,k=i||!1,[C,b]=g.useState(k),E={image:C?"check_box":"check_box_outline_blank",class:C?`${ae.class}__icon--checked`:`${ae.class}__icon--unchecked`},y=l&&`${ae.class}--disabled`,B=U=>{l||(b(x=>!x),d&&d(U))};return g.useEffect(()=>{h&&b(i)},[i,h]),u.jsxs("label",{className:[ae.class,y,e&&e].join(" "),htmlFor:r||t,children:[u.jsx("input",{checked:C,className:`${ae.class}__input`,"data-testid":s,id:r||t,name:t,onChange:B,ref:f,type:"checkbox"}),u.jsx(Y,{className:`${ae.class}__icon ${E.class}`,fill:!0,image:E.image,size:"xxl",testId:`${s}-icon`}),(a||n)&&u.jsxs("div",{className:`${ae.class}__label`,children:[n&&u.jsx("label",{className:`${ae.class}__label-title`,htmlFor:r||t,children:n}),a&&u.jsx("label",{className:`${ae.class}__label-description`,htmlFor:r||t,children:a})]})]})});St.propTypes={label:o.oneOfType([o.string,o.node]),name:o.string,className:o.string,testId:o.string,description:o.oneOfType([o.string,o.node]),checked:o.bool,disabled:o.bool},St.displayName="DsCheckbox";const cs={Heading1:"heading-1",Heading2:"heading-2",Heading3:"heading-3",Heading4:"heading-4",Heading5:"heading-5",Heading6:"heading-6"},We={name:"Heading",class:"ds-heading",props:{type:{type:String,default:cs.Heading1,options:Object.values(cs)}}},Ct=({children:r,testId:e="ds-heading-test",type:t=We.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=We.props.type.options.find(c=>c===t)&&`${We.class}--${t}`,l=n[t];return u.jsx(l,{className:[We.class,a,s&&s].filter(c=>c).join(" "),"data-testid":e,children:r})};Ct.propTypes={className:o.string,testId:o.string,type:o.oneOf(We.props.type.options)},Ct.displayName="DsHeading";const ds={None:"",Dashed:"dashed",Dotted:"dotted"},ps={None:"",Small:"small",Large:"large"},Me={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:ds.None,options:Object.values(ds)},size:{type:String,default:ps.None,options:Object.values(ps)}}};function hs(r,e,t){const s=t.props[r];return s.options&&s.options.some(n=>n===e)?`${t.class}--${e}`:""}const Et=({size:r=Me.props.size.default,borderStyle:e=Me.props.borderStyle.default})=>{const t=hs("size",r,Me),s=hs("borderStyle",e,Me);return u.jsx("hr",{className:`${Me.class} ${t} ${s}`.trim()})};Et.propTypes={size:o.oneOf(Me.props.size.options),borderStyle:o.oneOf(Me.props.borderStyle.options)},Et.displayName="DsHR";function Oe(r){return typeof r=="string"||r instanceof String}function fs(r){var e;return typeof r=="object"&&r!=null&&(r==null||(e=r.constructor)==null?void 0:e.name)==="Object"}function gs(r,e){return Array.isArray(e)?gs(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 T={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function wn(r){switch(r){case T.LEFT:return T.FORCE_LEFT;case T.RIGHT:return T.FORCE_RIGHT;default:return r}}function Tt(r){return r.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Ze(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(!Ze(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 l=e instanceof RegExp,c=r instanceof RegExp;if(l&&c)return e.toString()==r.toString();if(l!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(r,d[n]))return!1;for(n=0;n<d.length;n++)if(!Ze(r[d[n]],e[d[n]]))return!1;return!0}else if(e&&r&&typeof e=="function"&&typeof r=="function")return e.toString()===r.toString();return!1}class Dn{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?T.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?T.RIGHT:T.LEFT}}function F(r,e){return new F.InputMask(r,e)}function ms(r){if(r==null)throw new Error("mask property should be defined");return r instanceof RegExp?F.MaskedRegExp:Oe(r)?F.MaskedPattern:r===Date?F.MaskedDate:r===Number?F.MaskedNumber:Array.isArray(r)||r===Array?F.MaskedDynamic:F.Masked&&r.prototype instanceof F.Masked?r:F.Masked&&r instanceof F.Masked?r.constructor:r instanceof Function?F.MaskedFunction:(console.warn("Mask not found for mask",r),F.Masked)}function Re(r){if(!r)throw new Error("Options in not defined");if(F.Masked){if(r.prototype instanceof F.Masked)return{mask:r};const{mask:e=void 0,...t}=r instanceof F.Masked?{mask:r}:fs(r)&&r.mask instanceof F.Masked?r:{};if(e){const s=e.mask;return{...gs(e,(n,a)=>!a.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return fs(r)?{...r}:{mask:r}}function Ee(r){if(F.Masked&&r instanceof F.Masked)return r;const e=Re(r),t=ms(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)}F.createMask=Ee;class At{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}}F.MaskElement=At;const ys=90,Fn=89;class Je extends At{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===ys&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===Fn&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===ys&&(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={}}}F.HTMLMaskElement=Je;class In extends Je{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}}F.HTMLMaskElement=Je;class _s extends Je{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}}F.HTMLContenteditableMaskElement=_s;class Qe{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>Qe.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}}Qe.MAX_LENGTH=100;class On{constructor(e,t){this.el=e instanceof At?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new _s(e):new In(e),this.masked=Ee(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Qe,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 F.Masked)&&this.masked.constructor===ms(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof F.Masked?e:Ee({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,T.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 Dn({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:T.NONE;let i=this.masked.nearestInputPos(t.startChangePos+n,a);a!==T.NONE&&(i=this.masked.nearestInputPos(i,T.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}}F.InputMask=On;class N{static normalize(e){return Array.isArray(e)?e:[e,new N]}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}}F.ChangeDetails=N;class ke{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 se{constructor(e){this._value="",this._update({...se.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 ke(this.extractInput(e,t),e)}appendTail(e){return Oe(e)&&(e=new ke(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new N({inserted:e,rawInserted:e})):new N}_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 l=this.pad(t);const c=this._appendCharRaw(e,t);l=l.aggregate(c),c.rawInserted||l.equals(a)?a=l:this.state=i}if(a.inserted){let i,l=this.doValidate(t)!==!1;if(l&&s!=null){const c=this.state;if(this.overwrite===!0){i=s.state;for(let f=0;f<a.rawInserted.length;++f)s.unshift(this.displayValue.length-a.tailShift)}let d=this.appendTail(s);if(l=d.rawInserted.length===s.toString().length,!(l&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=s.state;for(let f=0;f<a.rawInserted.length;++f)s.shift();d=this.appendTail(s),l=d.rawInserted.length===s.toString().length}l&&d.inserted&&(this.state=c)}l||(a=new N,this.state=n,s&&i&&(s.state=i))}return a}_appendPlaceholder(){return new N}_appendEager(){return new N}append(e,t,s){if(!Oe(e))throw new Error("value should be string");const n=Oe(s)?new ke(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 l=this._appendChar(e[i],t,n);if(!l.rawInserted&&!this.doSkipInvalid(e[i],t,n))break;a.aggregate(l)}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 N}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={}),N.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),N.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=T.NONE),a===void 0&&(a={input:!0});const i=e+t,l=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=wn(n),d=this.extractInput(0,i,{raw:!0}));let f=e;const h=new N;if(n!==T.NONE&&(f=this.nearestInputPos(e,t>1&&e!==0&&!c?T.NONE:n),h.tailShift=f-e),h.aggregate(this.remove(f)),c&&n!==T.NONE&&d===this.rawInputValue)if(n===T.FORCE_LEFT){let k;for(;d===this.rawInputValue&&(k=this.displayValue.length);)h.aggregate(new N({tailShift:-1})).aggregate(this.remove(k-1))}else n===T.FORCE_RIGHT&&l.unshift();return h.aggregate(this.append(s,a,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Ze(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||se.EMPTY_VALUES.includes(e)&&se.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new N}}se.DEFAULTS={skipInvalid:!0},se.EMPTY_VALUES=[void 0,null,""],F.Masked=se;class Ve{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=Oe(e)?new ke(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 ke)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof Ve){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 F.MaskedPattern))return new ke(this.toString()).appendTo(e);const t=new N;for(let s=0;s<this.chunks.length;++s){const n=this.chunks[s],a=e._mapPosToBlock(e.displayValue.length),i=n.stop;let l;if(i!=null&&(!a||a.index<=i)&&((n instanceof Ve||e._stops.indexOf(i)>=0)&&t.aggregate(e._appendPlaceholder(i)),l=n instanceof Ve&&e._blocks[i]),l){const c=l.appendTail(n);t.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&t.aggregate(e.append(d,{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 Ve:new ke;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 Bn{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,T.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,T.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,T.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,T.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,T.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,T.NONE),!0})}}class vs{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 N}nearestInputPos(e,t){t===void 0&&(t=T.NONE);const s=0,n=this._value.length;switch(t){case T.LEFT:case T.FORCE_LEFT:return s;case T.NONE:case T.RIGHT:case T.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 N;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 N({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 N;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new ke("")}appendTail(e){return Oe(e)&&(e=new ke(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 et{constructor(e){const{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l,...c}=e;this.masked=Ee(c),Object.assign(this,{parent:t,isOptional:s,placeholderChar:n,displayChar:a,lazy:i,eager:l})}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 N}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 N;const s=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(t));return n.inserted&&this.doValidate(t)===!1&&(n=new N,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 N:(this.isFilled=!0,new N({inserted:this.placeholderChar}))}_appendEager(){return new N}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=T.NONE);const s=0,n=this.value.length,a=Math.min(Math.max(e,s),n);switch(t){case T.LEFT:case T.FORCE_LEFT:return this.isComplete?a:s;case T.RIGHT:case T.FORCE_RIGHT:return this.isComplete?a:n;case T.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 N}}et.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 Nn extends se{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}F.MaskedRegExp=Nn;class ne extends se{constructor(e){super({...ne.DEFAULTS,...e,definitions:Object.assign({},et.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 d=t.slice(a),f=Object.keys(this.blocks).filter(k=>d.indexOf(k)===0);f.sort((k,C)=>C.length-k.length);const h=f[0];if(h){const{expose:k,repeat:C,...b}=Re(this.blocks[h]),E={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...b,repeat:C,parent:this},y=C!=null?new F.RepeatBlock(E):Ee(E);y&&(this._blocks.push(y),k&&(this.exposeBlock=y),this._maskedBlocks[h]||(this._maskedBlocks[h]=[]),this._maskedBlocks[h].push(this._blocks.length-1)),a+=h.length-1;continue}}let i=t[a],l=i in e;if(i===ne.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){s=!s;continue}if(i==="["||i==="]"){n=!n;continue}if(i===ne.ESCAPE_CHAR){if(++a,i=t[a],!i)break;l=!1}const c=l?new et({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Re(e[i]),parent:this}):new vs({char:i,eager:this.eager,isUnmasking:s});this._blocks.push(c)}}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 N;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 N;if(!s)return n;for(let i=s.index,l;l=this._blocks[i];++i){var a;const c=l._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new Ve;return e===t||this._forEachBlocksInRange(e,t,(n,a,i,l)=>{const c=n.extractTail(i,l);c.stop=this._findStopBefore(a),c.from=this._blockStartPos(a),c instanceof Ve&&(c.blockIndex=a),s.extend(c)}),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,l,c)=>{n+=a.extractInput(l,c,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 N;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 l;t.aggregate(i._appendPlaceholder((l=i._blocks)==null?void 0:l.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,l=n.offset,c=a&&i?a.offset:this._blocks[n.index].displayValue.length;if(s(this._blocks[n.index],n.index,l,c),a&&!i){for(let d=n.index+1;d<a.index;++d)s(this._blocks[d],d,0,this._blocks[d].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,l)=>{s.aggregate(n.remove(i,l))}),s}nearestInputPos(e,t){if(t===void 0&&(t=T.NONE),!this._blocks.length)return 0;const s=new Bn(this,e);if(t===T.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===T.LEFT||t===T.FORCE_LEFT){if(t===T.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===T.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===T.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===T.RIGHT||t===T.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===T.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,T.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,l)=>{s+=n.totalInputPositions(i,l)}),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 N;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}ne.DEFAULTS={...se.DEFAULTS,lazy:!0,placeholderChar:"_"},ne.STOP_CHAR="`",ne.ESCAPE_CHAR="\\",ne.InputDefinition=et,ne.FixedDefinition=vs,F.MaskedPattern=ne;class tt extends ne{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 l=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===l[d];)++d;i.mask=c.slice(0,d).replace(/0/g,"\\0")+"0".repeat(this.maxLength-d),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 N;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}}F.MaskedRange=tt;class Te extends ne{static extractPatternOptions(e){const{mask:t,pattern:s,...n}=e;return{...n,mask:Oe(t)?t:s}}constructor(e){super(Te.extractPatternOptions({...Te.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:n,...a}={...Te.DEFAULTS,...e},i=Object.assign({},Te.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:Oe(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(Te.extractPatternOptions(e))}}Te.GET_DEFAULT_BLOCKS=()=>({d:{mask:tt,from:1,to:31,maxLength:2},m:{mask:tt,from:1,to:12,maxLength:2},Y:{mask:tt,from:1900,to:9999}}),Te.DEFAULTS={...ne.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)}},F.MaskedDate=Te;class st extends se{constructor(e){super({...st.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}=Re(t),a=Ee({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,l=a.slice(i.length),c=this.currentMask,d=new N,f=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),l&&(d.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):f&&(this.currentMask.state=f)),d}_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 N;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 N;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,l)=>i.state=t[l]),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 Ze(t,a)&&t.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}st.DEFAULTS={...se.DEFAULTS,dispatch:(r,e,t,s)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map((i,l)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,T.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(r,e.currentMaskFlags(t)),i.appendTail(s),{index:l,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,T.FORCE_LEFT)))}});return a.sort((i,l)=>l.weight-i.weight||l.totalInputPositions-i.totalInputPositions),e.compiledMasks[a[0].index]}},F.MaskedDynamic=st;class nt extends ne{constructor(e){super({...nt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const n=t.map(l=>l.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,T.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,l)=>{const c=n[0][l];l>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,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 N({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new ke("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new N;const s=Math.min(super.nearestInputPos(0,T.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(l=>this.matchValue(l,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}}nt.DEFAULTS={...ne.DEFAULTS,matchValue:(r,e,t)=>r.indexOf(e,t)===t},F.MaskedEnum=nt;class Mn extends se{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}F.MaskedFunction=Mn;var ks;class oe extends se{constructor(e){super({...oe.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+Tt(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Tt).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Tt(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 l=!isNaN(i),c=!1;if(l){let k;this.min!=null&&this.min<0&&this.number<this.min&&(k=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(k=this.max),k!=null&&(this.autofix?(this._value=this.format(k,this).replace(oe.UNMASKED_RADIX,this.radix),c||(c=a===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let d;l?d=new N({inserted:this._value.slice(a.length),rawInserted:c?"":e,skip:c}):(this._value=a,d=new N),this._value=this._insertThousandsSeparators(this._value);const f=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(f);return d.tailShift+=(h-n)*this.thousandsSeparator.length,d}_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 N({tailShift:(i-a)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case T.NONE:case T.LEFT:case T.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===T.FORCE_LEFT)return s}break}case T.RIGHT:case T.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===oe.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,oe.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(oe.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)||oe.EMPTY_VALUES.includes(e)&&oe.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}ks=oe,oe.UNMASKED_RADIX=".",oe.EMPTY_VALUES=[...se.EMPTY_VALUES,0],oe.DEFAULTS={...se.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[ks.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})},F.MaskedNumber=oe;const xt={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function bs(r,e,t){e===void 0&&(e=xt.MASKED),t===void 0&&(t=xt.MASKED);const s=Ee(r);return n=>s.runIsolated(a=>(a[e]=n,a[t]))}function Vn(r,e,t,s){return bs(e,t,s)(r)}F.PIPE_TYPE=xt,F.createPipe=bs,F.pipe=Vn;class $n extends ne{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}=Re(e);this._blockOpts=Object.assign({},this._blockOpts,i);const l=Ee(this._blockOpts);this.repeat=(t=(s=a??l.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:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.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(Ee(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new N;for(let c=(n=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?n:Math.max(this._blocks.length-1,0),d,f;d=(i=this._blocks[c])!=null?i:f=!f&&this._allocateBlock(c);++c){var n,a,i,l;const h=d._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[c]});if(h.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(h),h.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 l=0;for(let c=i;a<=c&&!this._blocks[c].unmaskedValue;--c,++l);l&&(this._blocks.splice(i-l+1,l),this.mask=this.mask.slice(l))}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}}F.RepeatBlock=$n;try{globalThis.IMask=F}catch{}const Ss={mask:o.oneOfType([o.array,o.func,o.string,o.instanceOf(RegExp),o.oneOf([Date,Number,F.Masked]),o.instanceOf(F.Masked)]),value:o.any,unmask:o.oneOfType([o.bool,o.oneOf(["typed"])]),prepare:o.func,prepareChar:o.func,validate:o.func,commit:o.func,overwrite:o.oneOfType([o.bool,o.oneOf(["shift"])]),eager:o.oneOfType([o.bool,o.oneOf(["append","remove"])]),skipInvalid:o.bool,onAccept:o.func,onComplete:o.func,placeholderChar:o.string,displayChar:o.string,lazy:o.bool,definitions:o.object,blocks:o.object,enum:o.arrayOf(o.string),maxLength:o.number,from:o.number,to:o.number,pattern:o.string,format:o.func,parse:o.func,autofix:o.oneOfType([o.bool,o.oneOf(["pad"])]),radix:o.string,thousandsSeparator:o.string,mapToRadix:o.arrayOf(o.string),scale:o.number,normalizeZeros:o.bool,padFractionalZeros:o.bool,min:o.oneOfType([o.number,o.instanceOf(Date)]),max:o.oneOfType([o.number,o.instanceOf(Date)]),dispatch:o.func,inputRef:o.oneOfType([o.func,o.shape({current:o.object})])},Cs=Object.keys(Ss).filter(r=>r!=="value"),Ln=["value","unmask","onAccept","onComplete","inputRef"],Pn=Cs.filter(r=>Ln.indexOf(r)<0);function jn(r){var e;const t=(e=class extends g.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 l;(l=this.element)!=null&&l.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=F(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(l=>Pn.indexOf(l)<0).forEach(l=>{delete i[l]}),i}_extractNonMaskProps(a){const{...i}=a;return Cs.forEach(l=>{l!=="maxLength"&&delete i[l]}),"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 g.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=Ss,g.forwardRef((n,a)=>g.createElement(t,{...n,ref:a}))}const zn=jn(r=>{let{inputRef:e,...t}=r;return g.createElement("input",{...t,ref:e})}),qn=(r,e)=>g.createElement(zn,{...r,ref:e});g.forwardRef(qn);function Un(r,e){let{onAccept:t,onComplete:s,ref:n=g.useRef(null),defaultValue:a,defaultUnmaskedValue:i,defaultTypedValue:l}=e===void 0?{}:e;const c=g.useRef(null),[d,f]=g.useState({}),[h,k]=g.useState(""),[C,b]=g.useState(""),[E,y]=g.useState(),B=g.useCallback(()=>{var p;(p=c.current)==null||p.destroy(),c.current=null},[]),U=g.useCallback(()=>{const p=c.current;p&&(f({value:p.value,unmaskedValue:p.unmaskedValue,typedValue:p.typedValue}),y(p.typedValue),b(p.unmaskedValue),k(p.value))},[]),x=g.useCallback(p=>{const D=c.current;D&&(U(),t==null||t(D.value,D,p))},[t]),_=g.useCallback(p=>c.current&&(s==null?void 0:s(c.current.value,c.current,p)),[s]);return g.useEffect(()=>{const{value:p,...D}=d,P=c.current;!P||h===void 0||(p!==h&&(P.value=h,P.value!==h&&x()),f(D))},[h]),g.useEffect(()=>{const{unmaskedValue:p,...D}=d,P=c.current;!P||C===void 0||(p!==C&&(P.unmaskedValue=C,P.unmaskedValue!==C&&x()),f(D))},[C]),g.useEffect(()=>{const{typedValue:p,...D}=d,P=c.current;!P||E===void 0||(p!==E&&(P.typedValue=E,P.masked.typedValueEquals(E)||x()),f(D))},[E]),g.useEffect(()=>{const p=n.current;if(!p||!(r!=null&&r.mask))return B();const D=c.current;D?D==null||D.updateOptions(r):p&&r!=null&&r.mask&&(c.current=F(p,r),U(),a!==void 0&&k(a),i!==void 0&&b(i),l!==void 0&&y(l))},[r,B,x]),g.useEffect(()=>{if(!c.current)return;const p=c.current;return p.on("accept",x),p.on("complete",_),()=>{p.off("accept",x),p.off("complete",_)}},[x,_]),g.useEffect(()=>B,[B]),{ref:n,maskRef:c,value:h,setValue:k,unmaskedValue:C,setUnmaskedValue:b,typedValue:E,setTypedValue:y}}const Es={Text:"text",Password:"password",Email:"email",Date:"date",Number:"number"},Ts={Small:"small",Medium:"medium",Large:"large"},As={Default:"",Error:"error",Success:"success"},xs={Center:"center",End:"end",Initial:"initial"},ws={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},X={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:Es.Text,options:Object.values(Es)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Ts.Medium,options:Object.values(Ts)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:As.Default,options:Object.values(As)},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:xs.Center,options:Object.values(xs)},tooltipPosition:{type:String,default:ws.Top,options:Object.values(ws)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},Ds={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]}},Fs={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},Is={Center:"center",End:"end",Initial:"initial"},Ae={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:Fs.Top,options:Object.values(Fs)},placement:{type:String,default:Is.Center,options:Object.values(Is)},text:{type:String,default:""}}},$e=({children:r,position:e=Ae.props.position.default,placement:t=Ae.props.placement.default,text:s=Ae.props.text.default,className:n})=>{const a=g.useRef(null),[i,l]=g.useState(0),[c,d]=g.useState(0),[f,h]=g.useState(!1),k=e&&Ae.props.position.options.find(y=>y===e)&&`${Ae.class}--${e}`,C=t&&Ae.props.placement.options.find(y=>y===t)&&`${Ae.class}--${t}`;let b;switch(g.useLayoutEffect(()=>{var y,B;a.current&&(l((y=a==null?void 0:a.current)==null?void 0:y.offsetHeight),d((B=a==null?void 0:a.current)==null?void 0:B.offsetWidth))},[]),g.useEffect(()=>(document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}),[]),e){case"top":t==="initial"?b={bottom:i+9,left:c<30?-c/1.5:-c*.01}:t==="end"?b={bottom:i+9,right:c<30?-c/1.5:-c*.01}:b={bottom:i+9,left:c/2};break;case"bottom":t==="initial"?b={top:i+9,left:c<30?-c/1.5:-c*.01}:t==="end"?b={top:i+9,right:c<30?-c/1.5:-c*.01}:b={top:i+9,left:c/2};break;case"left":t==="initial"?b={right:c+9,top:i<30?-i/1.5:-i*.01}:t==="end"?b={right:c+9,bottom:i<30?-i/1.5:-i*.01}:b={right:c+9,top:i/2};break;case"right":t==="initial"?b={left:c+9,top:i<30?-i/1.5:-i*.01}:t==="end"?b={left:c+9,bottom:i<30?-i/1.5:-i*.01}:b={left:c+9,top:i/2};break}const E=({target:y})=>{a.current&&a.current.contains(y)||h(!1)};return u.jsxs("span",{className:[Ae.class,n].join(" "),"data-testid":"ds-tooltip",onClick:()=>h(!f),ref:a,children:[r,f&&u.jsx("span",{className:[k,C].filter(y=>y).join(" "),children:u.jsx("span",{className:`${Ae.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:b,children:s})})]})};$e.propTypes={position:o.string,placement:o.string,text:o.oneOfType([o.string,o.node])},$e.displayName="DsTooltip";const ze=g.forwardRef(({name:r,testId:e=X.props.testId.default,type:t=X.props.type.default,animated:s=X.props.animated.default,size:n=X.props.size.default,label:a,placeholder:i,value:l,min:c,max:d,tooltip:f=X.props.tooltip.default,tooltipPosition:h=X.props.tooltipPosition.default,tooltipPlacement:k=X.props.tooltipPlacement.default,icon:C=X.props.icon.default,status:b=X.props.status.default,feedback:E,hasFeedback:y=X.props.hasFeedback.default,noMargin:B=X.props.noMargin.default,disabled:U=X.props.disabled.default,className:x,mask:_,onChangeHandler:p=X.props.onChangeHandler.default,onBlurHandler:D,onKeyDownHandler:P,onFocusHandler:Z},$)=>{const[he,ce]=g.useState(!1),[de,Fe]=g.useState(!1),_e=!!p&&!!_,je=(w,z,ee)=>{if(_e&&ee){const v={...ee,target:{...ee.target,name:r,maskedValue:w,value:z.unmaskedValue,type:"text"}};p(v)}},ie=g.useMemo(()=>typeof _=="object"?{lazy:!0,..._}:Ds[_]?{...Ds[_],min:c,max:d,lazy:!0}:{mask:_||"",min:c,max:d,lazy:!0},[_]),{ref:ve,setUnmaskedValue:Ie}=Un(ie,{onAccept:je}),Ne=w=>{p&&!_e&&p(w)},m=w=>{P&&P(w)},S=w=>{ce(!1),D&&D(w)},L=w=>{ce(!0),Z&&Z(w)},M=()=>{Fe(w=>!w)},O=g.useMemo(()=>de&&t==="password"?"text":t,[de,t]),A=()=>{const w=[`${X.class}`];return n&&w.push(`${X.class}--${n}`),s&&w.push(`${X.class}--animated`),B&&w.push(`${X.class}--no-margin`),C&&w.push(`${X.class}--with-icon`),b&&w.push(`${X.class}--${b}`),x&&w.push(x),w.join(" ")},V=g.useMemo(()=>{const w=[`${X.class}__label`];return(he||l)&&w.push(`${X.class}__label--active`),w.join(" ")},[l,he]),j=()=>!s&&i?i:"",q=()=>b&&b==="error"?"info":"check_circle";return g.useEffect(()=>{_&&Ie(l||"")},[l,_,Ie]),u.jsxs("div",{className:A(),ref:$,children:[y&&u.jsx("div",{className:"ds-input__feedback",children:E&&u.jsxs(u.Fragment,{children:[u.jsx(Y,{image:q()}),E]})}),u.jsx("input",{className:"ds-input__input","data-testid":e,disabled:U,id:r,max:d,min:c,name:r,onBlur:S,onChange:Ne,onFocus:L,onInput:Ne,onKeyDown:m,placeholder:j(),ref:ve,type:O,...!_&&{value:l||""}}),u.jsxs("label",{className:V,htmlFor:r,children:[a,f&&u.jsx($e,{className:"ds-input__tooltip",placement:k,position:h,text:f,children:u.jsx(Y,{className:"ds-input__icon",image:"info"})})]}),C&&u.jsx(Y,{className:"ds-input__icon",image:C}),t==="password"&&u.jsx(Y,{className:"ds-input__password-icon",image:de?"visibility_off":"visibility",onClick:M,size:"xl"})]})});ze.propTypes={name:o.string,testId:o.string,type:o.oneOf(X.props.type.options),animated:o.bool,size:o.oneOf(X.props.size.options),label:o.string,placeholder:o.string,value:o.oneOfType([o.string]),min:o.string,max:o.string,tooltip:o.string,tooltipPosition:o.string,tooltipPlacement:o.string,icon:o.string,status:o.oneOf(X.props.status.options),feedback:o.string,hasFeedback:o.bool,noMargin:o.bool,disabled:o.bool,mask:o.oneOfType([o.string,o.object]),onChangeHandler:o.func,onFocusHandler:o.func},ze.displayName="DsInput";const Os={Small:"small",Medium:"medium",Large:"large"},Bs={None:"",Neutral20:"neutral-20",Neutral10:"neutral-10",Neutral05:"neutral-05",Neutral00:"neutral-00"},le={name:"Loading",class:"ds-loading",props:{size:{type:String,default:Os.Medium,options:Object.values(Os)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:Bs.Neutral10,options:Object.values(Bs)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},at=({id:r,testId:e=le.props.testId.default,className:t,size:s=le.props.size.default,opacity:n=le.props.opacity.default,fullscreen:a=le.props.fullscreen.default,backgroundColor:i=le.props.backgroundColor.default})=>{const l=!a&&`${le.class}--absolute`,c=s&&`${le.class}__dots--${s}`,d=i&&le.props.backgroundColor.options.find(h=>h===i)&&`${le.class}__background--${i}`,f=n&&`${le.class}__background--opacity`;return u.jsxs("div",{className:[le.class,t,l].filter(h=>h).join(" "),"data-testid":e,id:r,children:[u.jsx("div",{className:[`${le.class}__background`,d,f].filter(h=>h).join(" ")}),u.jsx("div",{className:["ds-loading__dots",c].filter(h=>h).join(" "),role:"status"})]})};at.propTypes={id:o.string,testId:o.string,size:o.oneOf(le.props.size.options),opacity:o.bool,fullscreen:o.bool,backgroundColor:o.string},at.displayName="DsLoading";const xe={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:()=>({})}}},wt=({id:r,label:e,detail:t,name:s,testId:n=s||"ds-option-test",disabled:a=xe.props.disabled.default,value:i,checked:l=xe.props.checked.default,onChangeHandler:c=xe.props.onChangeHandler.default})=>{const[d]=g.useState(Math.random()),f=()=>{const h=[xe.class];return a&&h.push(`${xe.class}--disabled`),h.join(" ")};return u.jsxs("div",{className:f(),children:[u.jsx("input",{checked:l,"data-testid":n,disabled:a,id:r||String(d),name:s,onChange:c,type:"radio",value:i}),u.jsx(Y,{className:`${xe.class}__icon`,image:l?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),u.jsxs("div",{className:`${xe.class}__text-container`,children:[e&&u.jsx("label",{className:`${xe.class}__label`,htmlFor:r||String(d),children:e}),t&&u.jsx("label",{className:`${xe.class}__detail`,htmlFor:r||String(d),children:t})]})]})};wt.propTypes={id:o.string,name:o.string,testId:o.string,label:o.oneOfType([o.string,o.node]),value:o.oneOfType([o.string,o.number]),detail:o.string,disabled:o.bool,checked:o.bool,onChangeHandler:o.func},wt.displayName="DsOption";const Ns={Default:"",Large:"large",Small:"small"},rt={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:Ns.Default,options:Object.values(Ns)}}},we=({children:r,className:e,testId:t="ds-paragraph-test",type:s=rt.props.type.default})=>{const n=s&&`${rt.class}--${s}`;return u.jsx("p",{className:[rt.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};we.propTypes={className:o.string,testId:o.string,type:o.oneOf(rt.props.type.options)},we.displayName="DsParagraph";const Ms={Success:"success",SuccessDark:"success-dark",Warning:"warning",Danger:"danger"},Vs={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:Ms.Success,options:Object.values(Ms)}}},Dt={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},te=({children:r,flex:e=Dt.props.flex.default,className:t=Dt.props.className.default})=>{const s=()=>[Dt.class,t].join(" "),n=()=>({flex:e});return u.jsx("div",{className:s(),style:n(),children:r})};te.propTypes={className:o.string,flex:o.string},te.displayName="DsFlexElement";const $s={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center",SpaceAround:"space-around",SpaceBetween:"space-between"},Ls={Stretch:"stretch",FlexStart:"flex-start",FlexEnd:"flex-end",Center:"center"},Ps={Row:"row",Column:"column",RowReverse:"row-reverse",ColumnReverse:"column-reverse"},js={NoWrap:"nowrap",Wrap:"wrap",WrapReverse:"wrap-reverse"},Hn={Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm",MD:"md",LG:"lg",XL:"xl",XXL:"xxl",XXXL:"xxxl"},Le={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:$s.Stretch,required:!0,options:Object.values($s)},alignItems:{type:String,default:Ls.Stretch,required:!0,options:Object.values(Ls)},flexDirection:{type:String,default:Ps.Row,required:!0,options:Object.values(Ps)},flexWrap:{type:String,default:js.Wrap,required:!1,options:Object.values(js)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Hn)}}},De=({children:r,className:e,justifyContent:t=Le.props.justifyContent.default,alignItems:s=Le.props.alignItems.default,flexDirection:n=Le.props.flexDirection.default,flexWrap:a=Le.props.flexWrap.default,width:i=Le.props.width.default,height:l,gap:c})=>{const d=()=>{const h=[Le.class,e];return c&&h.push(`${Le.class}--gap-${c}`),h.join(" ")},f=()=>({display:"flex",justifyContent:t,alignItems:s,flexDirection:n,flexWrap:a,width:i,height:l,gap:c});return u.jsx("div",{className:d(),style:f(),children:r})};De.propTypes={className:o.string,justifyContent:o.string,alignItems:o.string,flexDirection:o.string,flexWrap:o.string,width:o.string,height:o.string,gap:o.string},De.displayName="DsFlexLayout";const it={None:"none",Quark:"quark",Nano:"nano",XXXS:"xxxs",XXS:"xxs",XS:"xs",SM:"sm"},Ge={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:it.None,options:Object.values(it)},horizontal:{type:String,default:it.None,options:Object.values(it)}}},ge=({vertical:r=Ge.props.vertical.default,horizontal:e=Ge.props.horizontal.default})=>{const t=r&&`ds-spacer__vertical--${r}`,s=e&&`ds-spacer__horizontal--${e}`;return u.jsx("div",{className:[Ge.class,t,s].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};ge.propTypes={vertical:o.oneOf(Ge.props.vertical.options),horizontal:o.oneOf(Ge.props.horizontal.options)},ge.displayName="DsSpacer";const Ft=({label:r,progress:e=Vs.props.progress.default,color:t=Vs.props.color.default})=>{const s=g.useMemo(()=>e>100?100:e<0?0:e,[e]),n=g.useMemo(()=>`ds-progress__progress--${t}`,[t]),a=g.useMemo(()=>t==="success-dark"?"color__success--dark":t==="warning"?"color__warning--dark":`color__${t}--default`,[t]);return u.jsx("div",{className:"ds-progress",children:u.jsxs(De,{flexDirection:"column",children:[u.jsx(te,{children:u.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,className:"ds-progress__container",role:"progressbar",children:u.jsx("div",{className:`ds-progress__progress ${n}`,"data-testid":"ds-progress-bar",style:{width:`${s}%`}})})}),u.jsx(te,{children:u.jsxs(De,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[u.jsx(ge,{vertical:"quark"}),u.jsx(u.Fragment,{children:r&&u.jsx(we,{className:a,children:r})})]})})]})})};Ft.propTypes={label:o.string,progress:o.number,color:o.string};const zs={Small:"sm",Medium:"md",Large:"lg"},qs={Default:"",Error:"error",Success:"success"},Us={Center:"center",End:"end",Initial:"initial"},Hs={Top:"top",Right:"right",Bottom:"bottom",Left:"left"},K={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(zs),default:zs.Medium},status:{type:String,default:qs.Default,options:Object.values(qs)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:Us.Initial,options:Object.values(Us)},tooltipPosition:{type:String,default:Hs.Top,options:Object.values(Hs)},feedback:{type:String,default:""},options:[]}},It=g.forwardRef(({label:r,className:e,disabled:t=K.props.disabled.default,animated:s=K.props.animated.default,multiple:n=K.props.multiple.default,testId:a=K.props.testId.default,name:i,options:l,value:c,placeholder:d,onChange:f,onChangeHandler:h,size:k=K.props.size.default,status:C=K.props.status.default,tooltip:b,tooltipPosition:E=K.props.tooltipPosition.default,tooltipPlacement:y=K.props.tooltipPlacement.default,feedback:B,...U},x)=>{const[_,p]=g.useState(!1),D=$=>{p(!1),f&&f($,$.target.value),h&&h($,$.target.value)},P=()=>{const $=[K.class,"select-placeholder"];return $.push(`${K.class}--${k}`),C&&$.push(`${K.class}--${C}`),_&&$.push(`${K.class}--active`),t&&$.push(`${K.class}--disabled`),e&&$.push(e),$.join(" ")},Z=g.useMemo(()=>{const $=[`${K.class}__label`];return!s&&$.push(`${K.class}__label--not-animated`),c&&$.push(`${K.class}__label--has-value`),s&&!c&&!b&&$.push(`${K.class}__label--hidden`),$.join(" ")},[c]);return u.jsxs("div",{className:P(),"data-testid":"ds-select-component",children:[u.jsxs("label",{className:Z,"data-testid":"ds-label-id",htmlFor:i,children:[r,b&&u.jsx($e,{className:`${K.class}__tooltip`,placement:y,position:E,text:b,children:u.jsx(Y,{className:`${K.class}__icon`,image:"info"})})]}),u.jsxs("select",{"data-testid":a,disabled:t,id:i,multiple:n,name:i,onChange:$=>D($),value:c||"",...U,onBlur:()=>p(!1),onFocus:()=>p(!0),ref:x,required:!0,children:[(d||s)&&u.jsx("option",{disabled:!0,value:"",children:d??r}),l==null?void 0:l.map(($,he)=>{var ce;return"options"in $?u.jsx("optgroup",{label:$.label,children:(ce=$.options)==null?void 0:ce.map((de,Fe)=>u.jsx("option",{className:`${K.class}__option-select`,value:de.value,children:de.label||de.value},Fe))},he):u.jsx("option",{className:`${K.class}__option-select`,value:$.value,children:$.label||$.value},he)})]}),B&&u.jsxs("div",{className:"ds-select__feedback-container",children:[u.jsx(Y,{className:"ds-select__icon",image:C==="success"?"check_circle":"info"}),u.jsx("span",{className:"ds-select__feedback",children:B})]})]})});It.propTypes={label:o.string.isRequired,className:o.string,disabled:o.bool,animated:o.bool,multiple:o.bool,name:o.string,testId:o.string,options:o.array.isRequired,placeholder:o.string,onChange:o.func,onChangeHandler:o.func,value:o.oneOfType([o.string,o.number]),size:o.oneOf(K.props.size.options),status:o.oneOf(K.props.status.options),tooltip:o.string,tooltipPosition:o.string,tooltipPlacement:o.string,feedback:o.string},It.displayName="DsSelect";const Ws={Large:"large",Small:"small"},Ot={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:Ws.Large,options:Object.values(Ws)}}},Rs=({children:r,className:e,testId:t="ds-subtitle-test",type:s})=>{const n=Ot.props.type.options.find(a=>a===s)&&`${Ot.class}--${s}`;return u.jsx("p",{className:[Ot.class,n,e&&e].filter(a=>a).join(" "),"data-testid":t,children:r})};Rs.displayName="DsSubtitle";const Gs={Small:"small",Medium:"medium",Large:"large"},Ys={Text:"text"},Xs={None:"",Error:"error",Success:"success"},Ks={None:"none",Both:"both",Horizontal:"horizontal",Vertical:"vertical",Block:"block",Inline:"inline"},J={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:Ys.Text,options:Object.values(Ys)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:Gs.Medium,options:Object.values(Gs)},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:Xs.None,options:Object.values(Xs)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:Ks.None,options:Object.values(Ks)},onChangeHandler:{type:Function,default:()=>{}}}},Bt=g.forwardRef(({name:r,testId:e=J.props.testId.default,animated:t=J.props.animated.default,size:s=J.props.size.default,label:n,placeholder:a,value:i,minLength:l,maxLength:c,tooltip:d,icon:f,status:h=J.props.status.default,feedback:k,disabled:C=J.props.disabled.default,required:b,className:E,resize:y=J.props.resize.default,onChangeHandler:B,onBlurHandler:U,onKeyDownHandler:x,onFocusHandler:_,rows:p=J.props.rows.default,cols:D,description:P,style:Z},$)=>{const[he,ce]=g.useState(!1),[de,Fe]=g.useState(0),[_e,je]=g.useState(Math.random());g.useEffect(()=>{i==null&&je(Math.random())},[i]);const ie=A=>{Fe(A.target.value.length),B&&B(A)},ve=A=>{x&&x(A)},Ie=A=>{ce(!1),U&&U(A)},Ne=A=>{ce(!0),_&&_(A)},m=()=>{const A=[`${J.class}`];return s&&A.push(`${J.class}--${s}`),t&&A.push(`${J.class}--animated`),d&&A.push(`${J.class}--with-icon`),h&&A.push(`${J.class}--${h}`),E&&A.push(E),A.join(" ")},S=g.useMemo(()=>{const A=[`${J.class}__label`];return(he||i)&&A.push(`${J.class}__label--active`),A.join(" ")},[i,he]),L=()=>!t&&a?a:"",M=()=>h&&h==="error"?"info":"check_circle",O={resize:y,...Z||{}};return u.jsxs("div",{className:m(),children:[P&&u.jsx("span",{className:"ds-textarea__description",children:P}),k&&u.jsxs("div",{className:"ds-textarea__feedback",children:[u.jsx(Y,{image:M()}),k]}),u.jsx("textarea",{className:"ds-textarea__textarea",cols:D,"data-testid":e,defaultValue:i||"",disabled:C,id:r,maxLength:c,minLength:l,name:r,onBlur:Ie,onChange:ie,onFocus:Ne,onKeyDown:ve,placeholder:L(),ref:$,required:b,rows:p,style:O}),u.jsx("label",{className:S,htmlFor:r,children:n}),c&&u.jsxs("span",{className:"ds-textarea__count",children:[de,"/",c]}),d&&u.jsx($e,{className:"ds-textarea__tooltip",placement:"end",text:d,children:u.jsx(Y,{className:"ds-textarea__icon",image:f})})]},_e)});Bt.propTypes={name:o.string,testId:o.string,type:o.oneOf(J.props.type.options),animated:o.bool,size:o.oneOf(J.props.size.options),label:o.string,placeholder:o.string,value:o.oneOfType([o.string]),tooltip:o.string,icon:o.string,status:o.oneOf(J.props.status.options),feedback:o.string,minLength:o.number,maxLength:o.number,rows:o.number,cols:o.number,disabled:o.bool,required:o.bool,onChangeHandler:o.func,onBlur:o.func,onKeyDown:o.func,onFocus:o.func,resize:o.oneOf(J.props.resize.options).isRequired,description:o.string,style:o.object},Bt.displayName="DsTextArea";const Nt={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1}}},ot=({children:r,fluid:e=Nt.props.fluid.default,className:t,style:s})=>{const n=e?`${Nt.class}--fluid`:Nt.class;return u.jsx("div",{className:[n,t].filter(a=>a).join(" "),style:s,children:r})};ot.propTypes={children:o.node,fluid:o.bool,className:o.string,style:o.object},ot.displayName="DsContainer";const Zs=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,Js=({children:r,grid:e})=>{const{row:t,col:s,mobileRow:n,mobileCol:a}=e,[i,l]=g.useState(Zs());g.useEffect(()=>{const d=()=>{l(Zs())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=g.useMemo(()=>i<=768?{gridRow:n||t,gridColumn:a||s}:{gridRow:t,gridColumn:s},[i,t,s,n,a]);return u.jsx("div",{style:c,children:r})};Js.displayName="DsGridElement";const Qs={Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},lt={Start:"start",End:"end",Center:"center",Stretch:"stretch",SpaceAround:"space-around",SpaceBetween:"space-between",SpaceEvenly:"space-evenly"},Q={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:Qs.Small,options:Object.values(Qs)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:lt.Start,options:Object.values(lt)},verticalAlign:{type:String,default:lt.Start,options:Object.values(lt)}}};function en(){const{innerWidth:r,innerHeight:e}=window;return{width:r,height:e}}function Wn(){const[r,e]=g.useState(en());return g.useEffect(()=>{function t(){e(en())}return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),r}const Mt=({children:r,rows:e=Q.props.rows.default,gap:t=Q.props.gap.default,vGap:s=Q.props.vGap.default,hGap:n=Q.props.hGap.default,horizontalAlign:a=Q.props.horizontalAlign.default,verticalAlign:i=Q.props.verticalAlign.default,width:l=Q.props.width.default,height:c=Q.props.height.default})=>{const d=s&&`${Q.class}__v-gap--${t}`,f=n&&`${Q.class}__h-gap--${t}`,h=a&&Q.props.horizontalAlign.options.find(x=>x===a)?`${Q.class}--h-${a}`:null,k=i&&Q.props.verticalAlign.options.find(x=>x===i)?`${Q.class}--v-${i}`:null,{width:C}=Wn(),[b,E]=g.useState("auto");g.useEffect(()=>{C<=768?E("6"):E("12")},[C]);const y=x=>/^[+-]?\d+$/.test(x),B=()=>e.split(",").map(_=>(_=_.trim(),_==="0"||_==="*"||_==="auto"?"auto":y(_)?_+"fr":_)).join(" "),U=()=>`repeat(${b}, minmax(0, 1fr))`;return u.jsx("div",{className:[Q.class,h,k,d,f].filter(x=>x).join(" "),style:{width:l,height:c,gridTemplateColumns:U(),gridTemplateRows:B()},children:r})};Mt.propTypes={children:o.oneOfType([o.arrayOf(o.node),o.node,o.func]),rows:o.string,gap:o.oneOf(Q.props.gap.options),vGap:o.bool,hGap:o.bool,width:o.string,height:o.string,horizontalAlign:o.oneOf(Q.props.horizontalAlign.options),verticalAlign:o.oneOf(Q.props.verticalAlign.options)},Mt.displayName="DsGridLayout";const be={None:"none",Quark:"quark",Nano:"nano",ExtraSmall:"xs",Small:"sm",Medium:"md",Large:"lg"},me={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:be.ExtraSmall,options:Object.values(be)},top:{type:String,default:be.None,options:Object.values(be)},right:{type:String,default:be.None,options:Object.values(be)},bottom:{type:String,default:be.None,options:Object.values(be)},left:{type:String,default:be.None,options:Object.values(be)}}},qe=({children:r,space:e=me.props.space.default,top:t=me.props.top.default,right:s=me.props.right.default,bottom:n=me.props.bottom.default,left:a=me.props.left.default})=>{const i=t&&`${me.class}__top--${t}`,l=s&&`${me.class}__right--${s}`,c=n&&`${me.class}__bottom--${n}`,d=a&&`${me.class}__left--${a}`,f=e&&`${me.class}--${e}`;return u.jsx("div",{className:[me.class,i,l,c,d,f].filter(h=>h).join(" "),children:r})};qe.displayName="DsWrapper";const Vt={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},Ue={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}}},$t=({title:r,content:e,onToggle:t,active:s=Ue.props.active.default,disabled:n=Ue.props.disabled.default})=>{const a=s&&`${Ue.class}--active`;return u.jsxs("li",{className:[Ue.class,a].filter(i=>i).join(" "),children:[u.jsxs("button",{className:`${Ue.class}__button`,disabled:n,onClick:t,children:[r,u.jsx(Y,{className:`${Ue.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),s&&u.jsx("div",{className:"ds-accordion-item__content",children:e})]})};$t.propTypes={active:o.bool,title:o.oneOfType([o.element,o.string]),content:o.oneOfType([o.element,o.string]),disabled:o.bool},$t.displayName="DsAccordionItem";const Lt=({items:r=Vt.props.items.default,activeItem:e=Vt.props.activeItem.default,onClick:t})=>{const[s,n]=g.useState(-1);g.useEffect(()=>{r.map((i,l)=>{i.active&&n(l)})},[r]),g.useEffect(()=>{e!=null&&n(e)},[e]);const a=i=>{if(s===i)return t&&t(-1),n(-1);n(i),t&&t(i)};return u.jsx("ul",{className:Vt.class,children:r.map((i,l)=>u.jsx($t,{active:s===l,content:i.content,disabled:i.disabled,onToggle:()=>{a(l)},title:i.title},l))})};Lt.propTypes={items:o.array,activeItem:o.number},Lt.displayName="DsAccordion";const tn=({title:r,activeTags:e,handleTagClose:t})=>u.jsx("div",{className:"active-tags",children:e.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(we,{className:"active-tags__title",children:r}),u.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((s,n)=>u.jsx($e,{text:`Filtro ${s.text} aplicado`,children:u.jsxs("div",{className:`active-tags__item ${s.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[u.jsxs(De,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(Y,{className:"active-tags__icon",color:s.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:s.icon,testId:`icon-${n}`})}),u.jsx(te,{children:u.jsx(we,{type:"small",children:s.text})})]}),!s.hiddenClose&&u.jsx(Y,{image:"close",onClick:()=>t(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${s.id}`))})]})});tn.displayName="DsActiveTags";const sn={Small:"small",Medium:"medium",Large:"large"},G={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},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:sn.Medium,options:Object.values(sn)},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:()=>{}}}},nn=({label:r=G.props.label.default,name:e=G.props.name.default,testId:t=G.props.testId.default,value:s=G.props.value.default,options:n=G.props.options.default,size:a=G.props.size.default,onChangeHandler:i=G.props.onChangeHandler.default,onSelectHandler:l=G.props.onSelectHandler.default,icon:c=G.props.icon.default,noOptionsMessage:d=G.props.noOptionsMessage.default,disabled:f=G.props.disabled.default,status:h=G.props.status.default,onBlurHandler:k=G.props.onBlurHandler.default,onFocusHandler:C=G.props.onFocusHandler.default,animated:b=G.props.animated.default,placeholder:E=G.props.placeholder.default,loading:y})=>{const[B,U]=g.useState(!1),[x,_]=g.useState(s),p=Z=>{i(Z),(y==null&&Z.currentTarget.value.length||!y&&Z.currentTarget.value.length>2)&&U(!0)},D=Z=>{l(Z),k(),_(Math.random().toString()),U(!1)};g.useEffect(()=>{s.length===0&&U(!1)},[s]);const P=()=>n.length>0?n.map((Z,$)=>u.jsx("option",{className:`${G.class}__option ${G.class}__option--${a}`,"data-testid":`ds-option-${Z.id||Z.label}`,onClick:()=>!f&&D(Z),value:$,children:Z.label},$)):u.jsx("option",{className:`${G.class}__option ${G.class}__option--not-found`,children:d},"no_option");return u.jsxs("div",{className:`${G.class}__container`,children:[u.jsx(ze,{animated:b,className:`${G.class}__input`,disabled:f,label:r,name:e,onBlurHandler:k,onChangeHandler:p,onFocusHandler:C,placeholder:E,size:a,status:h,testId:t,value:s},x),(c||y)&&(y?u.jsx("div",{className:`${G.class}__loading ${G.class}__loading--${a}`,style:{width:"18px"},children:u.jsx(at,{fullscreen:!1})}):c&&u.jsx(Y,{className:`${G.class}__icon ${G.class}__icon--${a}`,image:c})),B&&u.jsx("div",{className:`${G.class}__list`,"data-testid":"ds-list",children:P()})]})};nn.displayName="DsEditableSelect";const Ye={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Rn=({length:r,current:e=Ye.props.current.default})=>{const[t,s]=g.useState(e),n=i=>i<t?`${Ye.class}__step--older`:i===t?`${Ye.class}__step--active`:"";g.useEffect(()=>{s(e)},[e]);const a=[];for(let i=0;i<r;i++)a.push(u.jsx("div",{className:`${Ye.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return u.jsx("div",{className:Ye.class,children:a})},Gn={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:()=>{}}}},Pt=({name:r,value:e,prefix:t,sufix:s,min:n,max:a,onChangeHandler:i})=>{const l=g.useRef(null),[c,d]=g.useState(!1),[f,h]=g.useState("");g.useEffect(()=>{h(e??"")},[e]);const k=y=>{y.key==="Enter"&&C(y)};function C(y){d(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(y.currentTarget.value=n,h(n)):a&&parseInt(a)<parseInt(f)?(y.currentTarget.value=a,h(a)):y.currentTarget.value=f,i(y))}const b=y=>{h(y.currentTarget.value)},E=async()=>{var y;await d(!0),(y=l.current)==null||y.focus()};return u.jsx("div",{className:Gn.class,children:c?u.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:a,min:n,name:r,onBlur:C,onChange:b,onKeyDown:k,ref:l,type:"number",value:f}):u.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:E,children:u.jsxs(De,{alignItems:"center",gap:"nano",children:[u.jsx(te,{children:u.jsx(we,{children:u.jsxs("b",{children:[t,e,s]})})}),u.jsx(te,{children:u.jsx(Y,{image:"edit_square"})})]})})})};Pt.propTypes={value:o.string},Pt.displayName="DsInlineEditable";const Yn=[1,2,3,4],an={Squared:"squared",Rounded:"rounded"},pe={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:Yn},variant:{type:String,default:an.Rounded,options:Object.values(an)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},jt=({className:r,title:e,content:t,cancelBtnText:s=pe.props.cancelBtnText.default,confirmBtnText:n=pe.props.confirmBtnText.default,variant:a=pe.props.variant.default,elevation:i,isModalOpen:l=pe.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:f,...h})=>{const k=a&&pe.props.variant.options.find(y=>y===a)?`${pe.class}--${a}`:`${pe.class}--${pe.props.variant.default}`,C=i&&`${pe.class}--elevation-${i}`,b=f||d,E=g.useCallback(y=>{y.keyCode===27&&c()},[c]);return g.useEffect(()=>(l&&window&&!b&&window.addEventListener("keyup",E),()=>{window.removeEventListener("keyup",E)}),[b,E]),l?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...h,onClick:()=>b?()=>{}:c()}),u.jsxs("div",{className:[pe.class,k,C,r&&r].filter(y=>y).join(" "),"data-testid":"ds-modal",children:[!b&&u.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:u.jsx(Y,{image:"close",size:"lg"})}),u.jsxs("div",{className:"ds-modal__content",children:[u.jsx("div",{className:"ds-modal__content__title",children:e}),e&&u.jsx(ge,{vertical:"xxxs"}),u.jsx("div",{className:"ds-modal__content__content",children:t})]}),b&&u.jsx(ge,{vertical:"sm"}),!b&&u.jsx(ge,{vertical:"xxs"}),u.jsxs("div",{className:"ds-modal__cta",children:[d&&u.jsx(He,{onClick:()=>{c(),d()},children:s}),f&&u.jsx(He,{onClick:()=>{c(),f()},children:n})]})]})]}):null};jt.propTypes={firstButtonText:o.string,confirmBtnText:o.string,cancelBtnText:o.string,variant:o.oneOf(pe.props.variant.options),elevation:o.oneOf(pe.props.elevation.options),isModalOpen:o.bool,title:o.node,content:o.node},jt.displayName="DsModal";const rn={Success:"success",Danger:"danger",Warning:"warning",Info:"info"},on={Rounded:"rounded",Squared:"squared"},ue={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:rn.Info,options:Object.values(rn)},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:on.Rounded,options:Object.values(on)},progressBar:{type:Boolean,default:!0}}},Xn={success:"check",danger:"error",warning:"warning",info:"info"},zt=({className:r,type:e=ue.props.type.default,variant:t=ue.props.variant.default,id:s,children:n,message:a,autoClose:i=ue.props.autoClose.default,autoCloseTimer:l=ue.props.autoCloseTimer.default,dismissible:c=ue.props.dismissible.default,elevation:d,progressBar:f=ue.props.progressBar.default,handleClose:h})=>{const[k,C]=g.useState(l),[b,E]=g.useState(!1),[y,B]=g.useState(!0),U=[ue.class,e&&`${ue.class}--${e}`,t&&`${ue.class}--${t}`,d&&`${ue.class}--elevation-${d}`,r&&r].join(" "),x=()=>C(P=>(P===0&&B(!1),P-100));g.useEffect(()=>{!i&&!c&&B(!0);let P;return!b&&i&&(P=setInterval(x,100)),()=>{clearInterval(P)}},[b,i,l,y,c]);const _=()=>{E(!0)},p=()=>{E(!1)},D=P=>{B(!1),h&&h(P)};return y?u.jsxs("div",{className:U,"data-testid":"ds-notification",id:s,onMouseEnter:_,onMouseLeave:p,children:[u.jsx(qe,{bottom:"nano",top:"nano",children:u.jsxs(De,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[u.jsx(te,{children:u.jsx(Y,{color:e,fill:!0,image:Xn[e]})}),u.jsx(te,{flex:"1",children:u.jsx(qe,{left:"none",right:"none",space:"nano",children:n??a})}),u.jsx(te,{children:c?u.jsx("div",{className:`${ue.class}__button`,"data-testid":"notification-close",onClick:P=>D(P),children:u.jsx(qe,{children:u.jsx(Y,{image:"close"})})}):u.jsx(ge,{horizontal:"quark"})})]})}),f&&i&&u.jsx("div",{className:`${ue.class}__progress-bar ${ue.class}__progress-bar--${e}`,"data-testid":"ds-progress-bar",style:{width:`${k/l*100}%`}})]}):null};zt.displayName="DsNotification";const ln={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:"}}},ut={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},qt=({onChange:r,validationList:e=ln.props.validationList.default,instructionLabel:t=ln.props.instructionLabel.default})=>{const[s,n]=g.useState(""),[a,i]=g.useState(""),[l,c]=g.useState([]),[d,f]=g.useState({score:0,color:"danger",label:"Fraco"}),[h,k]=g.useState(!1),C=g.useCallback(_=>{const p=e.map(D=>D==null?void 0:D.rule(_));return c(p),p},[e]),b=g.useCallback(_=>{n(_.currentTarget.value);const p=C(_.currentTarget.value),D=U(p);r({password:_.currentTarget.value,confirmationPassword:a,isEqual:a===_.currentTarget.value,feedback:D})},[a,r,C]),E=g.useCallback(_=>{i(_.currentTarget.value);const p=C(s),D=U(p);r({password:s,confirmationPassword:_.currentTarget.value,isEqual:s===_.currentTarget.value,feedback:D})},[s,r,C]),y=g.useMemo(()=>s!==a&&h?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[s,a,h]),B=g.useCallback(_=>{const p={score:_,color:"danger",label:ut.weak};return _>30&&_<75?(p.color="warning",p.label=ut.medium):_>=75&&_<100?(p.color="success",p.label=ut.good):_===100&&(p.color="success-dark",p.label=ut.strong),p},[]),U=g.useCallback(_=>{const p=_.reduce((P,Z)=>{let $=P;return Z?($++,$):P},0),D=B(p*100/_.length);return f(D),D},[B]),x=()=>u.jsx("ul",{children:e.map((_,p)=>{const D=l[p]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return u.jsxs("li",{className:D,children:[l[p]?u.jsx(Y,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,u.jsx(ge,{horizontal:"quark"}),u.jsx(we,{children:_.title})]},p+_.title)})});return u.jsxs(De,{className:"ds-password-confirmation",flexDirection:"column",children:[u.jsx(te,{children:u.jsx(ze,{label:"Senha",name:"password",onChangeHandler:b,type:"password",value:s})}),u.jsx(te,{children:u.jsx(Ft,{color:d==null?void 0:d.color,label:d==null?void 0:d.label,progress:d==null?void 0:d.score})}),u.jsx(te,{children:u.jsx(we,{children:t})}),u.jsx(te,{children:x()}),u.jsx(ge,{vertical:"xxxs"}),u.jsx(te,{children:u.jsx(ze,{feedback:y.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>k(!0),onChangeHandler:E,onFocusHandler:()=>k(!0),status:y.status,testId:"ds-confirmPassword",type:"password",value:a})})]})};qt.propTypes={onChange:o.func,validationList:o.array.isRequired,instructionLabel:o.string},qt.displayName="DsPasswordConfirmation";const ye={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},un=({steps:r,selectedStep:e=ye.props.selectedStep.default,onChange:t})=>{const[s,n]=g.useState(e),a=(i,l)=>{const c=[`${ye.class}__button`];return l!==i&&c.push(`${ye.class}__button--round`),r[i]&&r[i].disabled&&c.push(`${ye.class}__button--disabled`),c.join(" ")};return g.useEffect(()=>{n(e)},[e]),g.useEffect(()=>{t(s)},[s]),u.jsxs("div",{className:ye.class,children:[u.jsxs("span",{className:`${ye.class}__step-counter`,children:["Etapa ",s+1," de ",r==null?void 0:r.length]}),u.jsx("div",{className:`${ye.class}__step`,children:r.map((i,l)=>u.jsx("div",{className:`${ye.class}__content`,children:u.jsx("button",{className:a(l,s),"data-testid":`ds-button-${l}`,disabled:i.disabled,onClick:()=>n(l),children:u.jsxs("span",{className:`${ye.class}__text`,children:[s===l?u.jsx(qe,{bottom:"none",left:"nano",right:"nano",top:"none",children:u.jsx(Y,{className:`${ye.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${l}`})}):u.jsx(Y,{className:`${ye.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${l}`}),s===l&&i.label]})})},l))})]})};un.displayName="DsStepper";const Se={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},cn=({item:r,columns:e})=>u.jsx("tr",{className:`${Se.class}__row`,children:e.map((t,s)=>{const n=t.align&&`${Se.class}__cell--align-${t.align}`;return u.jsx("td",{children:u.jsx("div",{className:[`${Se.class}__cell`,n,t.className].filter(a=>a).join(" "),children:r&&r[`${t.name}`]})},s)})});cn.displayName="DsTableRow";const dn=({columns:r,data:e,className:t})=>u.jsx("div",{className:`${Se.class}__wrapper`,children:u.jsxs("table",{className:[`${Se.class}`,t].filter(s=>s).join(" "),children:[u.jsx("thead",{className:`${Se.class}__head`,children:u.jsx("tr",{className:`${Se.class}__row`,children:r&&r.map((s,n)=>u.jsx("th",{style:{width:s.size},children:u.jsx("div",{className:[`${Se.class}__cell`,s.align&&`${Se.class}__cell--align-${s.align}`].filter(a=>a).join(" "),children:s.label})},n))})}),u.jsx("tbody",{className:`${Se.class}__body`,children:e&&e.map((s,n)=>u.jsx(cn,{columns:r,item:s},n))})]})});dn.displayName="DsTable";const pn={None:"",Primary:"primary",Secondary:"secondary",Neutral:"neutral",Success:"success",Warning:"warning",Danger:"danger",Info:"info"},Be={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:pn.Primary,options:Object.values(pn)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},Kn=({active:r,className:e,color:t,disabled:s,name:n,index:a,title:i,onClick:l})=>{const c=[`${Be.class}__tab`,`${Be.class}__tab-color--${t}`,r&&`${Be.class}__tab--active`,s&&`${Be.class}__tab--disabled`,e&&e].join(" "),d=f=>{l&&!s&&l(f)};return u.jsx("div",{className:c,"data-testid":`ds-tab-${a}`,id:n,onClick:()=>d(a),children:i})},Zn=({tabs:r,color:e,selectedTab:t=Be.props.selectedTab.default,className:s,onChange:n})=>{const[a,i]=g.useState(t),l=c=>{i(c),n&&n(c)};return g.useEffect(()=>i(t),[t]),u.jsxs("div",{className:[Be.class,s&&s].join(" "),"data-testid":"ds-tabs",children:[u.jsx("div",{className:`${Be.class}__header`,children:r.map((c,d)=>g.createElement(Kn,{...c,active:a===d,color:e,index:d,key:d,onClick:()=>l(d)}))}),u.jsx("div",{className:`${Be.class}__content`,children:r[a].content})]})};function hn({library:r,children:e,theme:t}){return u.jsx("div",{"data-library":r,"data-theme":t,children:u.jsx("div",{className:"ds-theme",children:e})})}hn.propTypes={library:o.string,children:o.node.isRequired,theme:o.string};const fn={TopLeft:"top-left",TopCenter:"top-center",TopRight:"top-right",BottomLeft:"bottom-left",BottomCenter:"bottom-center",BottomRight:"bottom-right"},Pe={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:fn.TopRight,options:Object.values(fn)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},Ut=({className:r=Pe.props.className.default,position:e=Pe.props.position.default,fluid:t=Pe.props.fluid.default,notifications:s,removeNotification:n})=>{const a=[Pe.class,`${Pe.class}--${e}`,t&&`${Pe.class}--fluid`,r&&r].join(" "),i=l=>{n&&n(l)};return u.jsx("div",{className:a,"data-testid":"ds-notification-list",children:s.map(l=>{const c=l.autoClose??!0,d=l.autoCloseTimer??4e3,f=l.dismissible??!0,h=l.elevation??2,k=l.progressBar??!0;return u.jsx(zt,{autoClose:c,autoCloseTimer:d,dismissible:f,elevation:h,handleClose:()=>i(l.id),id:l.id,message:l.message,progressBar:k,type:l.type},l.id)})})};Ut.propTypes={position:o.oneOf(Pe.props.position.options),fluid:o.bool,notifications:o.array,removeNotification:o.func},Ut.displayName="DsNotificationList";const ct={name:"TwoColumns",class:"ds-two-columns",props:{}},Ht=({header:r,main:e,sidebar:t,breadcrumb:s})=>u.jsxs(ot,{children:[u.jsxs("div",{className:"ds-grid",children:[u.jsx("div",{className:"ds-grid__row",children:u.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:s})}),u.jsxs("div",{className:`${ct.class}__content ds-grid__row`,children:[u.jsx("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:u.jsxs(u.Fragment,{children:[u.jsx("div",{className:`${ct.class}__header`,children:r}),u.jsx("div",{className:`${ct.class}__main`,children:e})]})}),u.jsx("div",{className:`${ct.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:t})]})]}),u.jsx(ge,{vertical:"sm"})]});Ht.propTypes={breadcrumb:o.node,header:o.node,main:o.node,sidebar:o.node},Ht.displayName="DsTwoColumns",I.DsAccordion=Lt,I.DsActiveTags=tn,I.DsButton=He,I.DsCaption=kt,I.DsCard=bt,I.DsCheckbox=St,I.DsContainer=ot,I.DsEditableSelect=nn,I.DsFlexElement=te,I.DsFlexLayout=De,I.DsGridElement=Js,I.DsGridLayout=Mt,I.DsHR=Et,I.DsHeading=Ct,I.DsIcon=Y,I.DsIndicator=Rn,I.DsInlineEditable=Pt,I.DsInput=ze,I.DsLoading=at,I.DsModal=jt,I.DsNotification=zt,I.DsNotificationList=Ut,I.DsOption=wt,I.DsParagraph=we,I.DsPasswordConfirmation=qt,I.DsProgress=Ft,I.DsSelect=It,I.DsSpacer=ge,I.DsStepper=un,I.DsSubtitle=Rs,I.DsTable=dn,I.DsTabs=Zn,I.DsTextArea=Bt,I.DsTooltip=$e,I.DsTwoColumns=Ht,I.DsWrapper=qe,I.ThemeProvider=hn,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});