@akad/design-system 2.0.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/css/core.css +1 -1
  2. package/package.json +1 -1
  3. package/react/react-lib.js +2643 -2247
  4. package/react/react-lib.umd.cjs +5 -5
  5. package/react/src/components/atoms/Card/Card.config.d.ts +29 -11
  6. package/react/src/components/atoms/Card/Card.d.ts +8 -5
  7. package/react/src/components/atoms/Card/Card.stories.d.ts +31 -5
  8. package/react/src/components/atoms/Radio/Radio.d.ts +5 -0
  9. package/react/src/components/index.d.ts +1 -0
  10. package/react/src/components/molecules/CheckboxCard/CheckboxCard.config.d.ts +70 -0
  11. package/react/src/components/molecules/CheckboxCard/CheckboxCard.d.ts +21 -0
  12. package/react/src/components/molecules/CheckboxCard/CheckboxCard.stories.d.ts +135 -0
  13. package/react/src/components/molecules/CheckboxCard/CheckboxCard.test.d.ts +1 -0
  14. package/react/src/components/molecules/CheckboxCard/CheckboxCardForm.stories.d.ts +36 -0
  15. package/react/src/components/molecules/CheckboxCard/CheckboxCardGroup.config.d.ts +88 -0
  16. package/react/src/components/molecules/CheckboxCard/CheckboxCardGroup.d.ts +34 -0
  17. package/react/src/components/molecules/CheckboxCard/CheckboxCardGroup.stories.d.ts +94 -0
  18. package/react/src/components/molecules/CheckboxCard/CheckboxCardGroup.test.d.ts +1 -0
  19. package/react/src/components/molecules/CheckboxCard/index.d.ts +8 -0
  20. package/scss/core/components/atoms/card.scss +114 -8
  21. package/scss/core/components/atoms/chip.scss +1 -1
  22. package/scss/core/components/atoms/input.scss +1 -1
  23. package/scss/core/components/atoms/loading.scss +4 -4
  24. package/scss/core/components/atoms/progress.scss +2 -2
  25. package/scss/core/components/atoms/radio-card.scss +1 -1
  26. package/scss/core/components/atoms/radio.scss +2 -2
  27. package/scss/core/components/atoms/segment-control.scss +2 -2
  28. package/scss/core/components/atoms/select.scss +1 -1
  29. package/scss/core/components/atoms/textarea.scss +1 -1
  30. package/scss/core/components/atoms/tooltip.scss +1 -1
  31. package/scss/core/components/index.scss +1 -0
  32. package/scss/core/components/molecules/accordion.scss +5 -3
  33. package/scss/core/components/molecules/active-tags.scss +3 -2
  34. package/scss/core/components/molecules/carousel.scss +1 -1
  35. package/scss/core/components/molecules/checkbox-card.scss +473 -0
  36. package/scss/core/components/molecules/editable-select.scss +2 -2
  37. package/scss/core/components/molecules/indicator.scss +1 -1
  38. package/scss/core/components/molecules/modal.scss +2 -2
  39. package/scss/core/components/molecules/notification.scss +2 -2
  40. package/scss/core/components/molecules/stepper.scss +1 -1
  41. package/scss/core/components/molecules/table.scss +11 -6
  42. package/scss/core/helpers/index.scss +0 -1
  43. package/scss/core/tokens/borders.scss +24 -5
  44. package/scss/themes/aon/index.scss +4 -1
  45. package/scss/themes/linker/index.scss +4 -1
  46. package/scss/core/helpers/borders.scss +0 -105
@@ -1,20 +1,20 @@
1
- (function(p,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):(p=typeof globalThis<"u"?globalThis:p||self,u(p["react-lib"]={},p.jsxRuntime,p.React))})(this,function(p,u,m){"use strict";const Qa=["amplitude"];function Za(t,e,s,a=Qa){var n;(n=globalThis.window)!=null&&n.dataLayer&&globalThis.window.dataLayer.push({event:t,eventName:e,properties:s,targets:a})}var aa=(t=>(t.EAO="SQ-A7K3",t.BrokerPortal="SQ-X9P2",t.GuaranteesAndRD="SQ-M4T8",t.Partnerships="SQ-Q2L9",t.Claims="SQ-Z8N1",t.NewProductsAndTransport="SQ-B5R7",t.OperationsExcellence="SQ-H3D6",t.Underwriting="SQ-J9K4",t.IssuanceAndReinsurance="SQ-W2C8",t.Regulatory="SQ-P7X3",t.TaxClosing="SQ-L8F2",t.BillingSettlementAndCommission="SQ-D4V9",t.Cybersecurity="SQ-F0D9",t.DataEngineering="SQ-K8V1",t.AI="SQ-R1K7",t.PlatformEngineering="SQ-G7R1",t.TraineePresidency="SQ-TRN1",t))(aa||{}),Nt=(t=>(t.AkadDigital="AkadDigital",t.AkadImo="AkadImo",t.Hub="Hub",t.Custom="Custom",t))(Nt||{}),na=(t=>(t.DataOwl="npm-data-owl",t.Sdk="npm-sdk",t.Custom="custom",t))(na||{}),ra=(t=>(t.EAO="eao",t.Transport="transportes",t.Guarantees="garantias",t.Partnerships="parcerias",t.Cross="cross",t))(ra||{}),ia=(t=>(t.Quote="cotacao",t.PolicyManagement="gestao_apolice",t.BrokerageManagement="gestao_corretora",t.Finance="financeiro",t.Documents="documentos",t.Claim="sinistro",t.Support="suporte",t.Performance="performance",t.Onboarding="onboarding",t.Loyalty="fidelidade",t.Campaigns="campanhas",t.Feedback="feedback",t))(ia||{});const Ja={businessFlow:"business_flow",feature:"feature",contextOrigin:"context_origin",product:"product",productCategory:"product_category",squadId:"squad_id",source:"source",customSource:"custom_source",handler:"handler"},en=["product","productCategory","squadId","source","handler","businessFlow"],tn={businessFlow:ia,productCategory:ra,squadId:aa,source:Nt,handler:na},sn="direct",an={pagePath:"page_path",pageTitle:"page_title",pageUrl:"page_url",pageReferrer:"page_referrer"},nn=["pagePath","pageTitle","pageUrl"];function ot(t,e){console.warn(`[data-owl] ${t}: ${e}`)}function ut(t,e){ot(t,e)}function ct(t){return t==null||typeof t=="string"&&!t.trim()}function rn(t,e){return e.filter(s=>ct(t[s]))}function ln(t,e){const s=[];return Object.entries(e).forEach(([a,n])=>{const r=t[a];if(ct(r))return;const i=Object.values(n);i.includes(r)||s.push(`invalid value for ${a}: "${String(r)}" (expected one of: ${i.join(", ")})`)}),s}function on(t,e,s,a){if(e===null||typeof e!="object")return ut(t,"event data must be an object"),null;const n=rn(e,s);if(n.length)return ut(t,`missing required field(s): ${n.join(", ")}`),null;const r=ln(e,a);if(r.length)return ut(t,r.join("; ")),null;const i={...e};if(i.source===Nt.Custom){if(ct(i.customSource))return ut(t,"customSource is required when source is EventSource.Custom"),null}else ct(i.customSource)||(ot(t,"customSource is only allowed when source is EventSource.Custom and was discarded"),delete i.customSource);return i}function un(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase()}function cn(t,e,s,a=[]){const n=new Set([...Object.values(s),...a]),r={};return Object.keys(e).forEach(i=>{const o=e[i];if(o==null||typeof o=="string"&&!o.trim())return;const c=s[i];if(c){r[c]=o;return}const d=un(i);if(n.has(d)){ot(t,`custom property "${i}" collides with the reserved property "${d}" and was discarded`);return}r[d]=o}),r}var xt=(t=>(t.Button="button",t.Link="link",t.Icon="icon",t.Card="card",t.Tab="tab",t.Carousel="carousel",t))(xt||{});const dn="Element Clicked",Bt="pushClickEvent",pn=["elementType","elementName",...nn,...en],hn={...tn,elementType:xt},fn={...Ja,...an,elementType:"element_type",elementName:"element_name",elementText:"element_text",elementSection:"element_section",elementIndex:"element_index",elementDestinationUrl:"element_destination_url",elementLoadTimeMs:"element_load_time_ms"};function gn(t){var e;try{const s=on(Bt,t,pn,hn);if(!s)return;const{targets:a,...n}=s;n.pageReferrer=((e=n.pageReferrer)==null?void 0:e.trim())||sn,Za("clickEventV2",dn,cn(Bt,n,fn),a)}catch(s){ot(Bt,`unexpected error: ${s instanceof Error?s.message:String(s)}`)}}function mn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $t={exports:{}},dt={exports:{}},R={};/** @license React v16.13.1
1
+ (function(p,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],o):(p=typeof globalThis<"u"?globalThis:p||self,o(p["react-lib"]={},p.jsxRuntime,p.React))})(this,function(p,o,y){"use strict";const ln=["amplitude"];function on(t,e,s,a=ln){var n;(n=globalThis.window)!=null&&n.dataLayer&&globalThis.window.dataLayer.push({event:t,eventName:e,properties:s,targets:a})}var pa=(t=>(t.EAO="SQ-A7K3",t.BrokerPortal="SQ-X9P2",t.GuaranteesAndRD="SQ-M4T8",t.Partnerships="SQ-Q2L9",t.Claims="SQ-Z8N1",t.NewProductsAndTransport="SQ-B5R7",t.OperationsExcellence="SQ-H3D6",t.Underwriting="SQ-J9K4",t.IssuanceAndReinsurance="SQ-W2C8",t.Regulatory="SQ-P7X3",t.TaxClosing="SQ-L8F2",t.BillingSettlementAndCommission="SQ-D4V9",t.Cybersecurity="SQ-F0D9",t.DataEngineering="SQ-K8V1",t.AI="SQ-R1K7",t.PlatformEngineering="SQ-G7R1",t.TraineePresidency="SQ-TRN1",t))(pa||{}),Mt=(t=>(t.AkadDigital="AkadDigital",t.AkadImo="AkadImo",t.Hub="Hub",t.Custom="Custom",t))(Mt||{}),ha=(t=>(t.DataOwl="npm-data-owl",t.Sdk="npm-sdk",t.Custom="custom",t))(ha||{}),fa=(t=>(t.EAO="eao",t.Transport="transportes",t.Guarantees="garantias",t.Partnerships="parcerias",t.Cross="cross",t))(fa||{}),ga=(t=>(t.Quote="cotacao",t.PolicyManagement="gestao_apolice",t.BrokerageManagement="gestao_corretora",t.Finance="financeiro",t.Documents="documentos",t.Claim="sinistro",t.Support="suporte",t.Performance="performance",t.Onboarding="onboarding",t.Loyalty="fidelidade",t.Campaigns="campanhas",t.Feedback="feedback",t))(ga||{});const un={businessFlow:"business_flow",feature:"feature",contextOrigin:"context_origin",product:"product",productCategory:"product_category",squadId:"squad_id",source:"source",customSource:"custom_source",handler:"handler"},cn=["product","productCategory","squadId","source","handler","businessFlow"],dn={businessFlow:ga,productCategory:fa,squadId:pa,source:Mt,handler:ha},pn="direct",hn={pagePath:"page_path",pageTitle:"page_title",pageUrl:"page_url",pageReferrer:"page_referrer"},fn=["pagePath","pageTitle","pageUrl"];function dt(t,e){console.warn(`[data-owl] ${t}: ${e}`)}function pt(t,e){dt(t,e)}function ht(t){return t==null||typeof t=="string"&&!t.trim()}function gn(t,e){return e.filter(s=>ht(t[s]))}function mn(t,e){const s=[];return Object.entries(e).forEach(([a,n])=>{const r=t[a];if(ht(r))return;const i=Object.values(n);i.includes(r)||s.push(`invalid value for ${a}: "${String(r)}" (expected one of: ${i.join(", ")})`)}),s}function yn(t,e,s,a){if(e===null||typeof e!="object")return pt(t,"event data must be an object"),null;const n=gn(e,s);if(n.length)return pt(t,`missing required field(s): ${n.join(", ")}`),null;const r=mn(e,a);if(r.length)return pt(t,r.join("; ")),null;const i={...e};if(i.source===Mt.Custom){if(ht(i.customSource))return pt(t,"customSource is required when source is EventSource.Custom"),null}else ht(i.customSource)||(dt(t,"customSource is only allowed when source is EventSource.Custom and was discarded"),delete i.customSource);return i}function vn(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase()}function _n(t,e,s,a=[]){const n=new Set([...Object.values(s),...a]),r={};return Object.keys(e).forEach(i=>{const u=e[i];if(u==null||typeof u=="string"&&!u.trim())return;const c=s[i];if(c){r[c]=u;return}const d=vn(i);if(n.has(d)){dt(t,`custom property "${i}" collides with the reserved property "${d}" and was discarded`);return}r[d]=u}),r}var Vt=(t=>(t.Button="button",t.Link="link",t.Icon="icon",t.Card="card",t.Tab="tab",t.Carousel="carousel",t))(Vt||{});const kn="Element Clicked",Lt="pushClickEvent",bn=["elementType","elementName",...fn,...cn],Sn={...dn,elementType:Vt},En={...un,...hn,elementType:"element_type",elementName:"element_name",elementText:"element_text",elementSection:"element_section",elementIndex:"element_index",elementDestinationUrl:"element_destination_url",elementLoadTimeMs:"element_load_time_ms"};function Cn(t){var e;try{const s=yn(Lt,t,bn,Sn);if(!s)return;const{targets:a,...n}=s;n.pageReferrer=((e=n.pageReferrer)==null?void 0:e.trim())||pn,on("clickEventV2",kn,_n(Lt,n,En),a)}catch(s){dt(Lt,`unexpected error: ${s instanceof Error?s.message:String(s)}`)}}function wn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jt={exports:{}},ft={exports:{}},G={};/** @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 la;function vn(){if(la)return R;la=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,k=t?Symbol.for("react.suspense_list"):60120,E=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,$=t?Symbol.for("react.scope"):60119;function A(h){if(typeof h=="object"&&h!==null){var F=h.$$typeof;switch(F){case e:switch(h=h.type,h){case c:case d:case a:case r:case n:case g:return h;default:switch(h=h&&h.$$typeof,h){case o:case f:case C:case E:case i:return h;default:return F}}case s:return F}}}function T(h){return A(h)===d}return R.AsyncMode=c,R.ConcurrentMode=d,R.ContextConsumer=o,R.ContextProvider=i,R.Element=e,R.ForwardRef=f,R.Fragment=a,R.Lazy=C,R.Memo=E,R.Portal=s,R.Profiler=r,R.StrictMode=n,R.Suspense=g,R.isAsyncMode=function(h){return T(h)||A(h)===c},R.isConcurrentMode=T,R.isContextConsumer=function(h){return A(h)===o},R.isContextProvider=function(h){return A(h)===i},R.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},R.isForwardRef=function(h){return A(h)===f},R.isFragment=function(h){return A(h)===a},R.isLazy=function(h){return A(h)===C},R.isMemo=function(h){return A(h)===E},R.isPortal=function(h){return A(h)===s},R.isProfiler=function(h){return A(h)===r},R.isStrictMode=function(h){return A(h)===n},R.isSuspense=function(h){return A(h)===g},R.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===a||h===d||h===r||h===n||h===g||h===k||typeof h=="object"&&h!==null&&(h.$$typeof===C||h.$$typeof===E||h.$$typeof===i||h.$$typeof===o||h.$$typeof===f||h.$$typeof===v||h.$$typeof===D||h.$$typeof===$||h.$$typeof===_)},R.typeOf=A,R}var G={};/** @license React v16.13.1
8
+ */var ma;function An(){if(ma)return G;ma=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,S=t?Symbol.for("react.suspense_list"):60120,k=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,N=t?Symbol.for("react.scope"):60119;function w(h){if(typeof h=="object"&&h!==null){var T=h.$$typeof;switch(T){case e:switch(h=h.type,h){case c:case d:case a:case r:case n:case g:return h;default:switch(h=h&&h.$$typeof,h){case u:case f:case b:case k:case i:return h;default:return T}}case s:return T}}}function F(h){return w(h)===d}return G.AsyncMode=c,G.ConcurrentMode=d,G.ContextConsumer=u,G.ContextProvider=i,G.Element=e,G.ForwardRef=f,G.Fragment=a,G.Lazy=b,G.Memo=k,G.Portal=s,G.Profiler=r,G.StrictMode=n,G.Suspense=g,G.isAsyncMode=function(h){return F(h)||w(h)===c},G.isConcurrentMode=F,G.isContextConsumer=function(h){return w(h)===u},G.isContextProvider=function(h){return w(h)===i},G.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},G.isForwardRef=function(h){return w(h)===f},G.isFragment=function(h){return w(h)===a},G.isLazy=function(h){return w(h)===b},G.isMemo=function(h){return w(h)===k},G.isPortal=function(h){return w(h)===s},G.isProfiler=function(h){return w(h)===r},G.isStrictMode=function(h){return w(h)===n},G.isSuspense=function(h){return w(h)===g},G.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===a||h===d||h===r||h===n||h===g||h===S||typeof h=="object"&&h!==null&&(h.$$typeof===b||h.$$typeof===k||h.$$typeof===i||h.$$typeof===u||h.$$typeof===f||h.$$typeof===m||h.$$typeof===D||h.$$typeof===N||h.$$typeof===_)},G.typeOf=w,G}var Q={};/** @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 oa;function yn(){return oa||(oa=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,k=t?Symbol.for("react.suspense_list"):60120,E=t?Symbol.for("react.memo"):60115,C=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,$=t?Symbol.for("react.scope"):60119;function A(S){return typeof S=="string"||typeof S=="function"||S===a||S===d||S===r||S===n||S===g||S===k||typeof S=="object"&&S!==null&&(S.$$typeof===C||S.$$typeof===E||S.$$typeof===i||S.$$typeof===o||S.$$typeof===f||S.$$typeof===v||S.$$typeof===D||S.$$typeof===$||S.$$typeof===_)}function T(S){if(typeof S=="object"&&S!==null){var ne=S.$$typeof;switch(ne){case e:var Ve=S.type;switch(Ve){case c:case d:case a:case r:case n:case g:return Ve;default:var lt=Ve&&Ve.$$typeof;switch(lt){case o:case f:case C:case E:case i:return lt;default:return ne}}case s:return ne}}}var h=c,F=d,x=o,W=i,V=e,ae=f,M=a,H=C,te=E,ie=s,we=r,se=n,ue=g,xe=!1;function Te(S){return xe||(xe=!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.")),y(S)||T(S)===c}function y(S){return T(S)===d}function w(S){return T(S)===o}function P(S){return T(S)===i}function L(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function B(S){return T(S)===f}function I(S){return T(S)===a}function j(S){return T(S)===C}function U(S){return T(S)===E}function z(S){return T(S)===s}function X(S){return T(S)===r}function b(S){return T(S)===n}function K(S){return T(S)===g}G.AsyncMode=h,G.ConcurrentMode=F,G.ContextConsumer=x,G.ContextProvider=W,G.Element=V,G.ForwardRef=ae,G.Fragment=M,G.Lazy=H,G.Memo=te,G.Portal=ie,G.Profiler=we,G.StrictMode=se,G.Suspense=ue,G.isAsyncMode=Te,G.isConcurrentMode=y,G.isContextConsumer=w,G.isContextProvider=P,G.isElement=L,G.isForwardRef=B,G.isFragment=I,G.isLazy=j,G.isMemo=U,G.isPortal=z,G.isProfiler=X,G.isStrictMode=b,G.isSuspense=K,G.isValidElementType=A,G.typeOf=T}()),G}var ua;function ca(){return ua||(ua=1,process.env.NODE_ENV==="production"?dt.exports=vn():dt.exports=yn()),dt.exports}/*
15
+ */var ya;function Dn(){return ya||(ya=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,s=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,g=t?Symbol.for("react.suspense"):60113,S=t?Symbol.for("react.suspense_list"):60120,k=t?Symbol.for("react.memo"):60115,b=t?Symbol.for("react.lazy"):60116,_=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,D=t?Symbol.for("react.responder"):60118,N=t?Symbol.for("react.scope"):60119;function w(C){return typeof C=="string"||typeof C=="function"||C===a||C===d||C===r||C===n||C===g||C===S||typeof C=="object"&&C!==null&&(C.$$typeof===b||C.$$typeof===k||C.$$typeof===i||C.$$typeof===u||C.$$typeof===f||C.$$typeof===m||C.$$typeof===D||C.$$typeof===N||C.$$typeof===_)}function F(C){if(typeof C=="object"&&C!==null){var le=C.$$typeof;switch(le){case e:var je=C.type;switch(je){case c:case d:case a:case r:case n:case g:return je;default:var ct=je&&je.$$typeof;switch(ct){case u:case f:case b:case k:case i:return ct;default:return le}}case s:return le}}}var h=c,T=d,$=u,U=i,B=e,se=f,V=a,H=b,R=k,ie=s,be=r,ee=n,ce=g,Fe=!1;function Ae(C){return Fe||(Fe=!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.")),v(C)||F(C)===c}function v(C){return F(C)===d}function A(C){return F(C)===u}function L(C){return F(C)===i}function j(C){return typeof C=="object"&&C!==null&&C.$$typeof===e}function x(C){return F(C)===f}function O(C){return F(C)===a}function P(C){return F(C)===b}function z(C){return F(C)===k}function W(C){return F(C)===s}function X(C){return F(C)===r}function E(C){return F(C)===n}function K(C){return F(C)===g}Q.AsyncMode=h,Q.ConcurrentMode=T,Q.ContextConsumer=$,Q.ContextProvider=U,Q.Element=B,Q.ForwardRef=se,Q.Fragment=V,Q.Lazy=H,Q.Memo=R,Q.Portal=ie,Q.Profiler=be,Q.StrictMode=ee,Q.Suspense=ce,Q.isAsyncMode=Ae,Q.isConcurrentMode=v,Q.isContextConsumer=A,Q.isContextProvider=L,Q.isElement=j,Q.isForwardRef=x,Q.isFragment=O,Q.isLazy=P,Q.isMemo=z,Q.isPortal=W,Q.isProfiler=X,Q.isStrictMode=E,Q.isSuspense=K,Q.isValidElementType=w,Q.typeOf=F}()),Q}var va;function _a(){return va||(va=1,process.env.NODE_ENV==="production"?ft.exports=An():ft.exports=Dn()),ft.exports}/*
16
16
  object-assign
17
17
  (c) Sindre Sorhus
18
18
  @license MIT
19
- */var Mt,da;function _n(){if(da)return Mt;da=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function a(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function n(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;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 Mt=n()?Object.assign:function(r,i){for(var o,c=a(r),d,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var g in o)e.call(o,g)&&(c[g]=o[g]);if(t){d=t(o);for(var k=0;k<d.length;k++)s.call(o,d[k])&&(c[d[k]]=o[d[k]])}}return c},Mt}var Vt,pa;function Lt(){if(pa)return Vt;pa=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vt=t,Vt}var jt,ha;function fa(){return ha||(ha=1,jt=Function.call.bind(Object.prototype.hasOwnProperty)),jt}var Pt,ga;function kn(){if(ga)return Pt;ga=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=Lt(),s={},a=fa();t=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(r,i,o,c,d){if(process.env.NODE_ENV!=="production"){for(var f in r)if(a(r,f)){var g;try{if(typeof r[f]!="function"){var k=Error((c||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}g=r[f](i,f,c,o,null,e)}catch(C){g=C}if(g&&!(g instanceof Error)&&t((c||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in s)){s[g.message]=!0;var E=d?d():"";t("Failed "+o+" type: "+g.message+(E??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(s={})},Pt=n,Pt}var qt,ma;function bn(){if(ma)return qt;ma=1;var t=ca(),e=_n(),s=Lt(),a=fa(),n=kn(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return qt=function(o,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function g(y){var w=y&&(d&&y[d]||y[f]);if(typeof w=="function")return w}var k="<<anonymous>>",E={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:$(),arrayOf:A,element:T(),elementType:h(),instanceOf:F,node:ae(),objectOf:W,oneOf:x,oneOfType:V,shape:H,exact:te};function C(y,w){return y===w?y!==0||1/y===1/w:y!==y&&w!==w}function _(y,w){this.message=y,this.data=w&&typeof w=="object"?w:{},this.stack=""}_.prototype=Error.prototype;function v(y){if(process.env.NODE_ENV!=="production")var w={},P=0;function L(I,j,U,z,X,b,K){if(z=z||k,b=b||U,K!==s){if(c){var S=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 S.name="Invariant Violation",S}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=z+":"+U;!w[ne]&&P<3&&(r("You are manually calling a React.PropTypes validation function for the `"+b+"` prop on `"+z+"`. 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."),w[ne]=!0,P++)}}return j[U]==null?I?j[U]===null?new _("The "+X+" `"+b+"` is marked as required "+("in `"+z+"`, but its value is `null`.")):new _("The "+X+" `"+b+"` is marked as required in "+("`"+z+"`, but its value is `undefined`.")):null:y(j,U,z,X,b)}var B=L.bind(null,!1);return B.isRequired=L.bind(null,!0),B}function D(y){function w(P,L,B,I,j,U){var z=P[L],X=se(z);if(X!==y){var b=ue(z);return new _("Invalid "+I+" `"+j+"` of type "+("`"+b+"` supplied to `"+B+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return v(w)}function $(){return v(i)}function A(y){function w(P,L,B,I,j){if(typeof y!="function")return new _("Property `"+j+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var U=P[L];if(!Array.isArray(U)){var z=se(U);return new _("Invalid "+I+" `"+j+"` of type "+("`"+z+"` supplied to `"+B+"`, expected an array."))}for(var X=0;X<U.length;X++){var b=y(U,X,B,I,j+"["+X+"]",s);if(b instanceof Error)return b}return null}return v(w)}function T(){function y(w,P,L,B,I){var j=w[P];if(!o(j)){var U=se(j);return new _("Invalid "+B+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected a single ReactElement."))}return null}return v(y)}function h(){function y(w,P,L,B,I){var j=w[P];if(!t.isValidElementType(j)){var U=se(j);return new _("Invalid "+B+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected a single ReactElement type."))}return null}return v(y)}function F(y){function w(P,L,B,I,j){if(!(P[L]instanceof y)){var U=y.name||k,z=Te(P[L]);return new _("Invalid "+I+" `"+j+"` of type "+("`"+z+"` supplied to `"+B+"`, expected ")+("instance of `"+U+"`."))}return null}return v(w)}function x(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("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])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function w(P,L,B,I,j){for(var U=P[L],z=0;z<y.length;z++)if(C(U,y[z]))return null;var X=JSON.stringify(y,function(K,S){var ne=ue(S);return ne==="symbol"?String(S):S});return new _("Invalid "+I+" `"+j+"` of value `"+String(U)+"` "+("supplied to `"+B+"`, expected one of "+X+"."))}return v(w)}function W(y){function w(P,L,B,I,j){if(typeof y!="function")return new _("Property `"+j+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var U=P[L],z=se(U);if(z!=="object")return new _("Invalid "+I+" `"+j+"` of type "+("`"+z+"` supplied to `"+B+"`, expected an object."));for(var X in U)if(a(U,X)){var b=y(U,X,B,I,j+"."+X,s);if(b instanceof Error)return b}return null}return v(w)}function V(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var w=0;w<y.length;w++){var P=y[w];if(typeof P!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+xe(P)+" at index "+w+"."),i}function L(B,I,j,U,z){for(var X=[],b=0;b<y.length;b++){var K=y[b],S=K(B,I,j,U,z,s);if(S==null)return null;S.data&&a(S.data,"expectedType")&&X.push(S.data.expectedType)}var ne=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new _("Invalid "+U+" `"+z+"` supplied to "+("`"+j+"`"+ne+"."))}return v(L)}function ae(){function y(w,P,L,B,I){return ie(w[P])?null:new _("Invalid "+B+" `"+I+"` supplied to "+("`"+L+"`, expected a ReactNode."))}return v(y)}function M(y,w,P,L,B){return new _((y||"React class")+": "+w+" type `"+P+"."+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function H(y){function w(P,L,B,I,j){var U=P[L],z=se(U);if(z!=="object")return new _("Invalid "+I+" `"+j+"` of type `"+z+"` "+("supplied to `"+B+"`, expected `object`."));for(var X in y){var b=y[X];if(typeof b!="function")return M(B,I,j,X,ue(b));var K=b(U,X,B,I,j+"."+X,s);if(K)return K}return null}return v(w)}function te(y){function w(P,L,B,I,j){var U=P[L],z=se(U);if(z!=="object")return new _("Invalid "+I+" `"+j+"` of type `"+z+"` "+("supplied to `"+B+"`, expected `object`."));var X=e({},P[L],y);for(var b in X){var K=y[b];if(a(y,b)&&typeof K!="function")return M(B,I,j,b,ue(K));if(!K)return new _("Invalid "+I+" `"+j+"` key `"+b+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(P[L],null," ")+`
20
- Valid keys: `+JSON.stringify(Object.keys(y),null," "));var S=K(U,b,B,I,j+"."+b,s);if(S)return S}return null}return v(w)}function ie(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(ie);if(y===null||o(y))return!0;var w=g(y);if(w){var P=w.call(y),L;if(w!==y.entries){for(;!(L=P.next()).done;)if(!ie(L.value))return!1}else for(;!(L=P.next()).done;){var B=L.value;if(B&&!ie(B[1]))return!1}}else return!1;return!0;default:return!1}}function we(y,w){return y==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function se(y){var w=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":we(w,y)?"symbol":w}function ue(y){if(typeof y>"u"||y===null)return""+y;var w=se(y);if(w==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return w}function xe(y){var w=ue(y);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function Te(y){return!y.constructor||!y.constructor.name?k:y.constructor.name}return E.checkPropTypes=n,E.resetWarningCache=n.resetWarningCache,E.PropTypes=E,E},qt}var Ut,va;function Sn(){if(va)return Ut;va=1;var t=Lt();function e(){}function s(){}return s.resetWarningCache=e,Ut=function(){function a(i,o,c,d,f,g){if(g!==t){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}}a.isRequired=a;function n(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:n,element:a,elementType:a,instanceOf:n,node:a,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:s,resetWarningCache:e};return r.PropTypes=r,r},Ut}if(process.env.NODE_ENV!=="production"){var En=ca(),Cn=!0;$t.exports=bn()(En.isElement,Cn)}else $t.exports=Sn()();var wn=$t.exports;const l=mn(wn);var zt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(zt||{}),Ht=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(Ht||{}),Wt=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(Wt||{}),Xt=(t=>(t.Right="right",t.Left="left",t))(Xt||{}),ya=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(ya||{});const Q={name:"Button",class:"ds-button",props:{color:{type:String,default:"primary",options:Object.values(zt)},variant:{type:String,default:"solid",options:Object.values(Ht)},size:{type:String,default:"md",options:Object.values(Wt)},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:"right",options:Object.values(Xt)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}};var Yt=(t=>(t.Primary="primary",t.PrimaryLightest="primary-lightest",t.PrimaryLighter="primary-lighter",t.PrimaryLight="primary-light",t.PrimaryDark="primary-dark",t.PrimaryDarker="primary-darker",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.Secondary="secondary",t.SecondaryLightest="secondary-lightest",t.SecondaryLighter="secondary-lighter",t.SecondaryLight="secondary-light",t.SecondaryDark="secondary-dark",t.SecondaryDarker="secondary-darker",t.Success="success",t.SuccessLighter="success-lighter",t.SuccessLight="success-light",t.SuccessDark="success-dark",t.Warning="warning",t.WarningLighter="warning-lighter",t.WarningLight="warning-light",t.WarningDark="warning-dark",t.Danger="danger",t.DangerLighter="danger-lighter",t.DangerLight="danger-light",t.DangerDark="danger-dark",t.Info="info",t.InfoLighter="info-lighter",t.InfoLight="info-light",t.InfoDark="info-dark",t))(Yt||{}),Kt=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(Kt||{}),Rt=(t=>(t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t.Huge="huge",t))(Rt||{}),Gt=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(Gt||{});const ge={name:"Icon",class:"ds-icon",props:{color:{type:String,default:"neutral-90",options:Object.values(Yt)},image:{type:String,default:"settings"},variation:{type:String,default:"outlined",options:Object.values(Kt)},size:{type:String,default:"md",options:Object.values(Rt)},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:"semibold",options:Object.values(Gt)},onClick:{type:Function,default:()=>({})}}};var Je=(t=>(t["primary-darker"]="primary--darker",t["primary-dark"]="primary--dark",t["primary-light"]="primary--light",t["primary-lighter"]="primary--lighter",t["primary-lightest"]="primary--lightest",t["secondary-darker"]="secondary--darker",t["secondary-dark"]="secondary--dark",t["secondary-light"]="secondary--light",t["secondary-lighter"]="secondary--lighter",t["secondary-lightest"]="secondary--lightest",t["success-dark"]="success--dark",t["success-light"]="success--light",t["success-lighter"]="success--lighter",t["warning-dark"]="warning--dark",t["warning-light"]="warning--light",t["warning-lighter"]="warning--lighter",t["danger-dark"]="danger--dark",t["danger-light"]="danger--light",t["danger-lighter"]="danger--lighter",t["info-dark"]="info--dark",t["info-light"]="info--light",t["info-lighter"]="info--lighter",t))(Je||{});const An={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},Z=({image:t=ge.props.image.default,color:e=ge.props.color.default,className:s,size:a=ge.props.size.default,fill:n=ge.props.fill.default,weight:r=ge.props.weight.default,testId:i=ge.props.testId.default,onClick:o=ge.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&ge.props.color.options.find(g=>g===e)&&`color__${Je[e]??e}`,f=m.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${An[r]}, 'opsz' 48`}),[r,n]);return u.jsx("i",{className:[`${ge.class}--${a}`,ge.class,c,d,s].filter(g=>g).join(" "),"data-testid":i,onClick:o,style:f,translate:"no",children:t})};Z.propTypes={color:l.oneOf(ge.props.color.options),image:l.string,fontVariationSettings:l.object,size:l.oneOf(ge.props.size.options),fill:l.bool,weight:l.oneOf(ge.props.weight.options),onClick:l.func},Z.displayName="DsIcon";const et=({children:t,className:e,onClick:s,size:a=Q.props.size.default,disabled:n=Q.props.disabled.default,icon:r=Q.props.icon.default,id:i=Q.props.id.default,testId:o=Q.props.testId.default,elevation:c,variant:d=Q.props.variant.default,color:f=Q.props.color.default,iconFill:g=Q.props.iconFill.default,iconPosition:k=Q.props.iconPosition.default,fullSize:E=Q.props.fullSize.default,trackingData:C})=>{const _=a&&Q.props.size.options.find(W=>W===a)?`${Q.class}--${a}`:`${Q.class}__${Q.props.size.default}`,v=n&&`${Q.class}--disabled`,D=`${Q.class}__${f}--${d}`,$=c&&`${Q.class}--elevation-${c}`,A=r&&`${Q.class}--with-icon`,T=E?`${Q.class}--full-size`:"",h=k==="right"?`${Q.class}__icon`:`${Q.class}__icon--left`,F=k==="right"?`${Q.class}__text`:`${Q.class}__text--reversed`,x=W=>{var V,ae,M,H;C&&gn({elementType:xt.Button,pagePath:((V=globalThis.window)==null?void 0:V.location.pathname)??"",pageTitle:((ae=globalThis.document)==null?void 0:ae.title)??"",pageUrl:((M=globalThis.window)==null?void 0:M.location.href)??"",pageReferrer:((H=globalThis.document)==null?void 0:H.referrer)??"",elementText:typeof t=="string"?t:void 0,...C}),s&&s(W)};return u.jsx("button",{className:[Q.class,T,v,_,D,$,A,e].filter(W=>W).join(" "),"data-testid":o,disabled:n,id:i,onClick:n?void 0:x,children:u.jsxs("span",{className:["ds-button__text",F].join(" "),children:[t,r&&u.jsx(Z,{className:["ds-button__icon",h].join(" "),fill:g,image:r,size:a})]})})};et.propTypes={color:l.oneOf(Q.props.color.options),variant:l.oneOf(Q.props.variant.options),size:l.oneOf(Q.props.size.options),disabled:l.bool,icon:l.string,iconFill:l.bool,iconPosition:l.oneOf(Q.props.iconPosition.options),testId:l.string,id:l.string,fullSize:l.bool,trackingData:l.shape({elementName:l.string.isRequired,elementType:l.string,product:l.string.isRequired,productCategory:l.string.isRequired,squadId:l.string.isRequired,source:l.string.isRequired,handler:l.string.isRequired,businessFlow:l.string.isRequired})},et.displayName="DsButton";const _a={name:"Caption",class:"ds-caption"},Qt=({children:t,className:e,testId:s="ds-caption-test"})=>u.jsx("p",{className:[_a.class,e].filter(a=>a).join(" "),"data-testid":s,children:t});Qt.propTypes={children:l.node.isRequired,className:l.string,testId:l.string},Qt.displayName="DsCaption";var pt=(t=>(t.None="",t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(pt||{}),Zt=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t))(Zt||{}),ka=(t=>(t[t.Elevation=0]="Elevation",t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(ka||{});const me={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:"",options:Object.values(pt)},borderColor:{type:String,default:"",options:Object.values(pt)},elevation:{type:Number,default:0,options:[0,1,2,3,4]},size:{type:String,default:"xxxs",options:Object.values(Zt)},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},Jt=({id:t,testId:e=me.props.testId.default,children:s,className:a,elevation:n=me.props.elevation.default,backgroundColor:r=me.props.backgroundColor.default,borderColor:i=me.props.borderColor.default,size:o=me.props.size.default})=>{const c=n&&`elevation-${n}`,d=i&&`border-color__${Je[i]??i}`,f=r&&`bg-color__${Je[r]??r}`,g=o&&me.props.size.options.find(k=>k===o)?`${me.class}--${o}`:`${me.class}--${me.props.size.default}`;return u.jsx("div",{className:[me.class,a,c,d,f,g].filter(k=>k).join(" "),"data-testid":e,id:t,children:s})};Jt.propTypes={id:l.string,testId:l.string,backgroundColor:l.oneOf(me.props.backgroundColor.options),borderColor:l.oneOf(me.props.borderColor.options),elevation:l.oneOf(me.props.elevation.options)},Jt.displayName="DsCard";const ce={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:()=>({})}}},es=m.forwardRef(({id:t,className:e,name:s,testId:a=ce.props.testId.default,label:n=ce.props.label.default,description:r=ce.props.description.default,checked:i=ce.props.checked.default,disabled:o=ce.props.disabled.default,changeByChecked:c=ce.props.changeByChecked.default,onChangeHandler:d},f)=>{const g=c??!1,k=i??!1,[E,C]=m.useState(k),_={image:E?"check_box":"check_box_outline_blank",class:E?`${ce.class}__icon--checked`:`${ce.class}__icon--unchecked`},v=o&&`${ce.class}--disabled`,D=$=>{o||(C(A=>!A),d&&d($))};return m.useEffect(()=>{g&&C(i)},[i,g]),u.jsxs("label",{className:[ce.class,v,e].join(" "),htmlFor:t||s,children:[u.jsx("input",{checked:E,className:`${ce.class}__input`,"data-testid":a,disabled:o,id:t||s,name:s,onChange:D,ref:f,type:"checkbox"}),u.jsx(Z,{className:`${ce.class}__icon ${_.class}`,fill:!0,image:_.image,size:"xxl",testId:`${a}-icon`}),(r||n)&&u.jsxs("div",{className:`${ce.class}__label`,children:[n&&u.jsx("label",{className:`${ce.class}__label-title`,htmlFor:t||s,children:n}),r&&u.jsx("label",{className:`${ce.class}__label-description`,htmlFor:t||s,children:r})]})]})});es.propTypes={label:l.oneOfType([l.string,l.element]),name:l.string,className:l.string,testId:l.string,description:l.oneOfType([l.string,l.element]),checked:l.bool,disabled:l.bool},es.displayName="DsCheckbox";var ts=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(ts||{}),ss=(t=>(t.Solid="solid",t.Light="light",t))(ss||{}),tt=(t=>(t.Left="left",t.Right="right",t))(tt||{});const Fe={name:"DsChip",class:"ds-chip",props:{color:{type:String,default:"primary",options:Object.values(ts)},variant:{type:String,default:"solid",options:Object.values(ss)},iconPosition:{type:String,default:"left",options:Object.values(tt)}}},Dn=({label:t,color:e=Fe.props.color.default,variant:s=Fe.props.variant.default,icon:a,iconPosition:n=Fe.props.iconPosition.default,className:r,title:i,testId:o="ds-chip"})=>{const c=[Fe.class,`${Fe.class}__${e}--${s}`,a&&`${Fe.class}--with-icon`,a&&`${Fe.class}--icon-${n}`,r].filter(Boolean).join(" "),d=a?u.jsx("span",{className:`${Fe.class}__icon`,"data-testid":`${o}-icon`,children:a}):null;return u.jsxs("span",{className:c,"data-testid":o,title:i,children:[n===tt.Left&&d,u.jsx("span",{className:`${Fe.class}__label`,children:t}),n===tt.Right&&d]})};var as=(t=>(t.Heading1="heading-1",t.Heading2="heading-2",t.Heading3="heading-3",t.Heading4="heading-4",t.Heading5="heading-5",t.Heading6="heading-6",t))(as||{});const Xe={name:"Heading",class:"ds-heading",props:{type:{type:String,default:"heading-1",options:Object.values(as)}}},ht=({children:t,testId:e="ds-heading-test",type:s=Xe.props.type.default,className:a})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},r=s.replace("heading-",""),i=Xe.props.type.options.find(d=>d===s)&&`${Xe.class}--${r}`,c=n[s];return u.jsx(c,{className:[Xe.class,i,a].filter(d=>d).join(" "),"data-testid":e,children:t})};ht.propTypes={className:l.string,testId:l.string,type:l.oneOf(Xe.props.type.options)},ht.displayName="DsHeading";var ns=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(ns||{}),rs=(t=>(t.None="",t.Small="small",t.Large="large",t))(rs||{});const Le={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(ns)},size:{type:String,default:"",options:Object.values(rs)}}};function ba(t,e,s){const a=s.props[t];return a.options&&a.options.some(n=>n===e)?`${s.class}--${e}`:""}const is=({size:t=Le.props.size.default,borderStyle:e=Le.props.borderStyle.default})=>{const s=ba("size",t,Le),a=ba("borderStyle",e,Le);return u.jsx("hr",{className:`${Le.class} ${s} ${a}`.trim()})};is.propTypes={size:l.oneOf(Le.props.size.options),borderStyle:l.oneOf(Le.props.borderStyle.options)},is.displayName="DsHR";function je(t){return typeof t=="string"||t instanceof String}function Sa(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Ea(t,e){return Array.isArray(e)?Ea(t,(s,a)=>e.includes(a)):Object.entries(t).reduce((s,a)=>{let[n,r]=a;return e(r,n)&&(s[n]=r),s},{})}const O={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Tn(t){switch(t){case O.LEFT:return O.FORCE_LEFT;case O.RIGHT:return O.FORCE_RIGHT;default:return t}}function ls(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function ft(t,e){if(e===t)return!0;const s=Array.isArray(e),a=Array.isArray(t);let n;if(s&&a){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!ft(e[n],t[n]))return!1;return!0}if(s!=a)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e instanceof Date,i=t instanceof Date;if(r&&i)return e.getTime()==t.getTime();if(r!=i)return!1;const o=e instanceof RegExp,c=t instanceof RegExp;if(o&&c)return e.toString()==t.toString();if(o!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=0;n<d.length;n++)if(!ft(t[d[n]],e[d[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Fn{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?O.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?O.RIGHT:O.LEFT}}function N(t,e){return new N.InputMask(t,e)}function Ca(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?N.MaskedRegExp:je(t)?N.MaskedPattern:t===Date?N.MaskedDate:t===Number?N.MaskedNumber:Array.isArray(t)||t===Array?N.MaskedDynamic:N.Masked&&t.prototype instanceof N.Masked?t:N.Masked&&t instanceof N.Masked?t.constructor:t instanceof Function?N.MaskedFunction:(console.warn("Mask not found for mask",t),N.Masked)}function st(t){if(!t)throw new Error("Options in not defined");if(N.Masked){if(t.prototype instanceof N.Masked)return{mask:t};const{mask:e=void 0,...s}=t instanceof N.Masked?{mask:t}:Sa(t)&&t.mask instanceof N.Masked?t:{};if(e){const a=e.mask;return{...Ea(e,(n,r)=>!r.startsWith("_")),mask:e.constructor,_mask:a,...s}}}return Sa(t)?{...t}:{mask:t}}function Be(t){if(N.Masked&&t instanceof N.Masked)return t;const e=st(t),s=Ca(e.mask);if(!s)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===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}N.createMask=Be;class os{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,s){if(!(e==null||s==null||e===this.selectionStart&&s===this.selectionEnd))try{this._unsafeSelect(e,s)}catch{}}get isActive(){return!1}}N.MaskElement=os;const wa=90,On=89;class gt extends os{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,s,a;return(e=(s=(a=this.input).getRootNode)==null?void 0:s.call(a))!=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===wa&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===On&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===wa&&(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={}}}N.HTMLMaskElement=gt;class In extends gt{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,s){this.input.setSelectionRange(e,s)}get value(){return this.input.value}set value(e){this.input.value=e}}N.HTMLMaskElement=gt;class Aa extends gt{get _unsafeSelectionStart(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a<n?a:n}get _unsafeSelectionEnd(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a>n?a:n}_unsafeSelect(e,s){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,e),a.setEnd(this.input.lastChild||this.input,s);const n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(a))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}N.HTMLContenteditableMaskElement=Aa;class mt{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>mt.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}}mt.MAX_LENGTH=100;class Nn{constructor(e,s){this.el=e instanceof os?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Aa(e):new In(e),this.masked=Be(s),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new mt,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.updateValue(),this._onChange()}maskEquals(e){var s;return e==null||((s=this.masked)==null?void 0:s.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof N.Masked)&&this.masked.constructor===Ca(e)){this.masked.updateOptions({mask:e});return}const s=e instanceof N.Masked?e:Be({mask:e});s.unmaskedValue=this.masked.unmaskedValue,this.masked=s}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,s){const a=this._listeners[e];a&&a.forEach(n=>n(s))}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 s=this.masked.unmaskedValue,a=this.masked.value,n=this.masked.rawInputValue,r=this.displayValue,i=this.unmaskedValue!==s||this.value!==a||this._rawInputValue!==n;this._unmaskedValue=s,this._value=a,this._rawInputValue=n,this.el.value!==r&&(this.el.value=r),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:s,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:s,...a}=e,n=!this.maskEquals(s),r=this.masked.optionsIsChanged(a);n&&(this.mask=s),r&&this.masked.updateOptions(a),(n||r)&&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,O.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,s){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(s),this}off(e,s){if(!this._listeners[e])return this;if(!s)return delete this._listeners[e],this;const a=this._listeners[e].indexOf(s);return a>=0&&this._listeners[e].splice(a,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const s=new Fn({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,n=this.masked.splice(s.startChangePos,s.removed.length,s.inserted,s.removeDirection,{input:!0,raw:!0}).offset,r=a===this.masked.rawInputValue?s.removeDirection:O.NONE;let i=this.masked.nearestInputPos(s.startChangePos+n,r);r!==O.NONE&&(i=this.masked.nearestInputPos(i,O.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}}N.InputMask=Nn;class q{static normalize(e){return Array.isArray(e)?e:[e,new q]}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}}N.ChangeDetails=q;class Oe{constructor(e,s,a){e===void 0&&(e=""),s===void 0&&(s=0),this.value=e,this.from=s,this.stop=a}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 s=this.value[0];return this.value=this.value.slice(1),s}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class de{constructor(e){this._value="",this._update({...de.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,s){s===void 0&&(s={input:!0}),this.reset(),this.append(e,s,""),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,s){return e}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),Math.min(this.displayValue.length,s-e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this.displayValue.slice(e,s)}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Oe(this.extractInput(e,s),e)}appendTail(e){return je(e)&&(e=new Oe(String(e))),e.appendTo(this)}_appendCharRaw(e,s){return e?(this._value+=e,new q({inserted:e,rawInserted:e})):new q}_appendChar(e,s,a){s===void 0&&(s={});const n=this.state;let r;if([e,r]=this.doPrepareChar(e,s),e&&(r=r.aggregate(this._appendCharRaw(e,s)),!r.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let o=this.pad(s);const c=this._appendCharRaw(e,s);o=o.aggregate(c),c.rawInserted||o.equals(r)?r=o:this.state=i}if(r.inserted){let i,o=this.doValidate(s)!==!1;if(o&&a!=null){const c=this.state;if(this.overwrite===!0){i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.unshift(this.displayValue.length-r.tailShift)}let d=this.appendTail(a);if(o=d.rawInserted.length===a.toString().length,!(o&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.shift();d=this.appendTail(a),o=d.rawInserted.length===a.toString().length}o&&d.inserted&&(this.state=c)}o||(r=new q,this.state=n,a&&i&&(a.state=i))}return r}_appendPlaceholder(){return new q}_appendEager(){return new q}append(e,s,a){if(!je(e))throw new Error("value should be string");const n=je(a)?new Oe(String(a)):a;s!=null&&s.tail&&(s._beforeTailState=this.state);let r;[e,r]=this.doPrepare(e,s);for(let i=0;i<e.length;++i){const o=this._appendChar(e[i],s,n);if(!o.rawInserted&&!this.doSkipInvalid(e[i],s,n))break;r.aggregate(o)}return(this.eager===!0||this.eager==="append")&&s!=null&&s.input&&e&&r.aggregate(this._appendEager()),n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(s),new q}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const s=this.rawInputValue,a=this.value,n=e();return this.rawInputValue=s,this.value&&this.value!==a&&a.indexOf(this.value)===0&&(this.append(a.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const s=this.state,a=e(this);return this.state=s,delete this._isolated,a}doSkipInvalid(e,s,a){return!!this.skipInvalid}doPrepare(e,s){return s===void 0&&(s={}),q.normalize(this.prepare?this.prepare(e,this,s):e)}doPrepareChar(e,s){return s===void 0&&(s={}),q.normalize(this.prepareChar?this.prepareChar(e,this,s):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,s,a,n,r){a===void 0&&(a=""),n===void 0&&(n=O.NONE),r===void 0&&(r={input:!0});const i=e+s,o=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=Tn(n),d=this.extractInput(0,i,{raw:!0}));let f=e;const g=new q;if(n!==O.NONE&&(f=this.nearestInputPos(e,s>1&&e!==0&&!c?O.NONE:n),g.tailShift=f-e),g.aggregate(this.remove(f)),c&&n!==O.NONE&&d===this.rawInputValue)if(n===O.FORCE_LEFT){let k;for(;d===this.rawInputValue&&(k=this.displayValue.length);)g.aggregate(new q({tailShift:-1})).aggregate(this.remove(k-1))}else n===O.FORCE_RIGHT&&o.unshift();return g.aggregate(this.append(a,r,o))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!ft(this,e)}typedValueEquals(e){const s=this.typedValue;return e===s||de.EMPTY_VALUES.includes(e)&&de.EMPTY_VALUES.includes(s)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new q}}de.DEFAULTS={skipInvalid:!0},de.EMPTY_VALUES=[void 0,null,""],N.Masked=de;class Ue{constructor(e,s){e===void 0&&(e=[]),s===void 0&&(s=0),this.chunks=e,this.from=s}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=je(e)?new Oe(String(e)):e;const s=this.chunks[this.chunks.length-1],a=s&&(s.stop===e.stop||e.stop==null)&&e.from===s.from+s.toString().length;if(e instanceof Oe)a?s.extend(e.toString()):this.chunks.push(e);else if(e instanceof Ue){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 N.MaskedPattern))return new Oe(this.toString()).appendTo(e);const s=new q;for(let a=0;a<this.chunks.length;++a){const n=this.chunks[a],r=e._mapPosToBlock(e.displayValue.length),i=n.stop;let o;if(i!=null&&(!r||r.index<=i)&&((n instanceof Ue||e._stops.indexOf(i)>=0)&&s.aggregate(e._appendPlaceholder(i)),o=n instanceof Ue&&e._blocks[i]),o){const c=o.appendTail(n);s.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&s.aggregate(e.append(d,{tail:!0}))}else s.aggregate(e.append(n.toString(),{tail:!0}))}return s}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:s,...a}=e;Object.assign(this,a),this.chunks=s.map(n=>{const r="chunks"in n?new Ue:new Oe;return r.state=n,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const s=e!=null?e-this.from:e;let a=0;for(;a<this.chunks.length;){const n=this.chunks[a],r=n.unshift(s);if(n.toString()){if(!r)break;++a}else this.chunks.splice(a,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const s=this.chunks[e],a=s.shift();if(s.toString()){if(!a)break;--e}else this.chunks.splice(e,1);if(a)return a}return""}}class xn{constructor(e,s){this.masked=e,this._log=[];const{offset:a,index:n}=e._mapPosToBlock(s)||(s<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,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=((s=this.block)==null?void 0:s.displayValue.length)||0){var s;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,O.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,O.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,O.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,O.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,O.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,O.NONE),!0})}}class Da{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,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(s),this._value||(this._isRawInput=!1),new q}nearestInputPos(e,s){s===void 0&&(s=O.NONE);const a=0,n=this._value.length;switch(s){case O.LEFT:case O.FORCE_LEFT:return a;case O.NONE:case O.RIGHT:case O.FORCE_RIGHT:default:return n}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._isRawInput?s-e:0}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(e,s)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.eager===!0||this.eager==="append",r=this.char===e&&(this.isUnmasking||s.input||s.raw)&&(!s.raw||!a)&&!s.tail,i=new q({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(s.raw||s.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new q;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new Oe("")}appendTail(e){return je(e)&&(e=new Oe(String(e))),e.appendTo(this)}append(e,s,a){const n=this._appendChar(e[0],s);return a!=null&&(n.tailShift+=this.appendTail(a).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 vt{constructor(e){const{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o,...c}=e;this.masked=Be(c),Object.assign(this,{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),e===0&&s>=1?(this.isFilled=!1,this.masked.remove(e,s)):new q}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,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(s));return n.inserted&&this.doValidate(s)===!1&&(n=new q,this.masked.state=a),!n.inserted&&!this.isOptional&&!this.lazy&&!s.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,s,a){return this.masked.append(e,this.currentMaskFlags(s),a)}_appendPlaceholder(){return this.isFilled||this.isOptional?new q:(this.isFilled=!0,new q({inserted:this.placeholderChar}))}_appendEager(){return new q}extractTail(e,s){return this.masked.extractTail(e,s)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.masked.extractInput(e,s,a)}nearestInputPos(e,s){s===void 0&&(s=O.NONE);const a=0,n=this.value.length,r=Math.min(Math.max(e,a),n);switch(s){case O.LEFT:case O.FORCE_LEFT:return this.isComplete?r:a;case O.RIGHT:case O.FORCE_RIGHT:return this.isComplete?r:n;case O.NONE:default:return r}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.value.slice(e,s).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 s;return{...e,_beforeTailState:(e==null||(s=e._beforeTailState)==null?void 0:s.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new q}}vt.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 Bn extends de{updateOptions(e){super.updateOptions(e)}_update(e){const s=e.mask;s&&(e.validate=a=>a.search(s)>=0),super._update(e)}}N.MaskedRegExp=Bn;class pe extends de{constructor(e){super({...pe.DEFAULTS,...e,definitions:Object.assign({},vt.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 s=this.mask;if(!s||!e)return;let a=!1,n=!1;for(let r=0;r<s.length;++r){if(this.blocks){const d=s.slice(r),f=Object.keys(this.blocks).filter(k=>d.indexOf(k)===0);f.sort((k,E)=>E.length-k.length);const g=f[0];if(g){const{expose:k,repeat:E,...C}=st(this.blocks[g]),_={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...C,repeat:E,parent:this},v=E!=null?new N.RepeatBlock(_):Be(_);v&&(this._blocks.push(v),k&&(this.exposeBlock=v),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),r+=g.length-1;continue}}let i=s[r],o=i in e;if(i===pe.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){a=!a;continue}if(i==="["||i==="]"){n=!n;continue}if(i===pe.ESCAPE_CHAR){if(++r,i=s[r],!i)break;o=!1}const c=o?new vt({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...st(e[i]),parent:this}):new Da({char:i,eager:this.eager,isUnmasking:a});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:s,...a}=e;this._blocks.forEach((n,r)=>n.state=s[r]),super.state=a}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,s)=>e+=s.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(s),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,s)=>e+=s.value,"")}set value(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(s),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(s),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,s)=>e+=s.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const s=new q;let a=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(a==null)return s;this._blocks[a].isFilled&&++a;for(let n=a;n<this._blocks.length;++n){const r=this._blocks[n]._appendEager();if(!r.inserted)break;s.aggregate(r)}return s}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._mapPosToBlock(this.displayValue.length),n=new q;if(!a)return n;for(let i=a.index,o;o=this._blocks[i];++i){var r;const c=o._appendChar(e,{...s,_beforeTailState:(r=s._beforeTailState)==null||(r=r._blocks)==null?void 0:r[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=new Ue;return e===s||this._forEachBlocksInRange(e,s,(n,r,i,o)=>{const c=n.extractTail(i,o);c.stop=this._findStopBefore(r),c.from=this._blockStartPos(r),c instanceof Ue&&(c.blockIndex=r),a.extend(c)}),a}extractInput(e,s,a){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),a===void 0&&(a={}),e===s)return"";let n="";return this._forEachBlocksInRange(e,s,(r,i,o,c)=>{n+=r.extractInput(o,c,a)}),n}_findStopBefore(e){let s;for(let a=0;a<this._stops.length;++a){const n=this._stops[a];if(n<=e)s=n;else break}return s}_appendPlaceholder(e){const s=new q;if(this.lazy&&e==null)return s;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return s;const n=a.index,r=e??this._blocks.length;return this._blocks.slice(n,r).forEach(i=>{if(!i.lazy||e!=null){var o;s.aggregate(i._appendPlaceholder((o=i._blocks)==null?void 0:o.length))}}),s}_mapPosToBlock(e){let s="";for(let a=0;a<this._blocks.length;++a){const n=this._blocks[a],r=s.length;if(s+=n.displayValue,e<=s.length)return{index:a,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((s,a)=>s+=a.displayValue.length,0)}_forEachBlocksInRange(e,s,a){s===void 0&&(s=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const r=this._mapPosToBlock(s),i=r&&n.index===r.index,o=n.offset,c=r&&i?r.offset:this._blocks[n.index].displayValue.length;if(a(this._blocks[n.index],n.index,o,c),r&&!i){for(let d=n.index+1;d<r.index;++d)a(this._blocks[d],d,0,this._blocks[d].displayValue.length);a(this._blocks[r.index],r.index,0,r.offset)}}}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a.aggregate(n.remove(i,o))}),a}nearestInputPos(e,s){if(s===void 0&&(s=O.NONE),!this._blocks.length)return 0;const a=new xn(this,e);if(s===O.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(s===O.LEFT||s===O.FORCE_LEFT){if(s===O.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===e)return e;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),s===O.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=e||(a.popState(),a.ok&&a.pos<=e))return a.pos;a.popState()}return a.ok?a.pos:s===O.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return s===O.RIGHT||s===O.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:s===O.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(e,O.LEFT))):e}totalInputPositions(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);let a=0;return this._forEachBlocksInRange(e,s,(n,r,i,o)=>{a+=n.totalInputPositions(i,o)}),a}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const s=this._maskedBlocks[e];return s?s.map(a=>this._blocks[a]):[]}pad(e){const s=new q;return this._forEachBlocksInRange(0,this.displayValue.length,a=>s.aggregate(a.pad(e))),s}}pe.DEFAULTS={...de.DEFAULTS,lazy:!0,placeholderChar:"_"},pe.STOP_CHAR="`",pe.ESCAPE_CHAR="\\",pe.InputDefinition=vt,pe.FixedDefinition=Da,N.MaskedPattern=pe;class yt extends pe{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:s=this.to||0,from:a=this.from||0,maxLength:n=this.maxLength||0,autofix:r=this.autofix,...i}=e;this.to=s,this.from=a,this.maxLength=Math.max(String(s).length,n),this.autofix=r;const o=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===o[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 s="",a="";const[,n,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(s="0".repeat(n.length)+r,a="9".repeat(n.length)+r),s=s.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[s,a]}doPrepareChar(e,s){s===void 0&&(s={});let a;return[e,a]=super.doPrepareChar(e.replace(/\D/g,""),s),e||(a.skip=!this.isComplete),[e,a]}_appendCharRaw(e,s){if(s===void 0&&(s={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,s);const a=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[r,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(a[this.value.length],s):Number(r)>this.to?!s.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(a[this.value.length],s).aggregate(this._appendCharRaw(e,s)):super._appendCharRaw(n[this.value.length],s):super._appendCharRaw(e,s)}doValidate(e){const s=this.value;if(s.search(/[^0]/)===-1&&s.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(s);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const s=new q;if(this.value.length===this.maxLength)return s;const a=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let r=0;r<n;++r)s.aggregate(super._appendCharRaw("0",e));a.split("").forEach(r=>this._appendCharRaw(r))}return s}}N.MaskedRange=yt;const $n="d{.}`m{.}`Y";class $e extends pe{static extractPatternOptions(e){const{mask:s,pattern:a,...n}=e;return{...n,mask:je(s)?s:a}}constructor(e){super($e.extractPatternOptions({...$e.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:s,pattern:a,blocks:n,...r}={...$e.DEFAULTS,...e},i=Object.assign({},$e.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({...r,mask:je(s)?s:a,blocks:i})}doValidate(e){const s=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&s!=null&&(this.min==null||this.min<=s)&&(this.max==null||s<=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($e.extractPatternOptions(e))}}$e.GET_DEFAULT_BLOCKS=()=>({d:{mask:yt,from:1,to:31,maxLength:2},m:{mask:yt,from:1,to:12,maxLength:2},Y:{mask:yt,from:1900,to:9999}}),$e.DEFAULTS={...pe.DEFAULTS,mask:Date,pattern:$n,format:(t,e)=>{if(!t)return"";const s=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[s,a,n].join(".")},parse:(t,e)=>{const[s,a,n]=t.split(".").map(Number);return new Date(n,a-1,s)}},N.MaskedDate=$e;class _t extends de{constructor(e){super({..._t.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(s=>{const{expose:a,...n}=st(s),r=Be({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return a&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._applyDispatch(e,s);return this.currentMask&&a.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(s))),a}_applyDispatch(e,s,a){e===void 0&&(e=""),s===void 0&&(s={}),a===void 0&&(a="");const n=s.tail&&s._beforeTailState!=null?s._beforeTailState._value:this.value,r=this.rawInputValue,i=s.tail&&s._beforeTailState!=null?s._beforeTailState._rawInputValue:r,o=r.slice(i.length),c=this.currentMask,d=new q,f=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...s},a),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),o&&(d.tailShift+=this.currentMask.append(o,{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 s=new q;return e&&s.aggregate(this._applyDispatch("",{},e)),s.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var s,a;return{...e,_beforeTailState:((s=e._beforeTailState)==null?void 0:s.currentMaskRef)===this.currentMask&&((a=e._beforeTailState)==null?void 0:a.currentMask)||e._beforeTailState}}doDispatch(e,s,a){return s===void 0&&(s={}),a===void 0&&(a=""),this.dispatch(e,this,s,a)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,s){s===void 0&&(s={});let[a,n]=super.doPrepare(e,s);if(this.currentMask){let r;[a,r]=super.doPrepare(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}doPrepareChar(e,s){s===void 0&&(s={});let[a,n]=super.doPrepareChar(e,s);if(this.currentMask){let r;[a,r]=super.doPrepareChar(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(s=>s.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 s=String(e);this.currentMask&&(this.currentMask.typedValue=e,s=this.currentMask.unmaskedValue),this.unmaskedValue=s}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,s){const a=new q;return this.currentMask&&a.aggregate(this.currentMask.remove(e,s)).aggregate(this._applyDispatch()),a}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(s=>s.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:s,currentMaskRef:a,currentMask:n,...r}=e;s&&this.compiledMasks.forEach((i,o)=>i.state=s[o]),a!=null&&(this.currentMask=a,this.currentMask.state=n),super.state=r}extractInput(e,s,a){return this.currentMask?this.currentMask.extractInput(e,s,a):""}extractTail(e,s){return this.currentMask?this.currentMask.extractTail(e,s):super.extractTail(e,s)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,s){return this.currentMask?this.currentMask.nearestInputPos(e,s):super.nearestInputPos(e,s)}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((s,a)=>{if(!e[a])return;const{mask:n,...r}=e[a];return ft(s,r)&&s.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var s;return!!((s=this.currentMask)!=null&&s.typedValueEquals(e))}}_t.DEFAULTS={...de.DEFAULTS,dispatch:(t,e,s,a)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,r=e.compiledMasks.map((i,o)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,O.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(t,e.currentMaskFlags(s)),i.appendTail(a),{index:o,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,O.FORCE_LEFT)))}});return r.sort((i,o)=>o.weight-i.weight||o.totalInputPositions-i.totalInputPositions),e.compiledMasks[r[0].index]}},N.MaskedDynamic=_t;class kt extends pe{constructor(e){super({...kt.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:s,...a}=e;if(s){const n=s.map(o=>o.length),r=Math.min(...n),i=Math.max(...n)-r;a.mask="*".repeat(r),i&&(a.mask+="["+"*".repeat(i)+"]"),this.enum=s}super._update(a)}_appendCharRaw(e,s){s===void 0&&(s={});const a=Math.min(this.nearestInputPos(0,O.FORCE_RIGHT),this.value.length),n=this.enum.filter(r=>this.matchValue(r,this.unmaskedValue+e,a));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,o)=>{const c=n[0][o];o>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,s))});const r=super._appendCharRaw(n[0][this.value.length],s);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>r.aggregate(super._appendCharRaw(i))),r}return new q({skip:!this.isComplete})}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new Oe("",e)}remove(e,s){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),e===s)return new q;const a=Math.min(super.nearestInputPos(0,O.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(a,n),a)).length>1);--n);const r=super.remove(n,s);return r.tailShift+=n-e,r}get isComplete(){return this.enum.indexOf(this.value)>=0}}kt.DEFAULTS={...pe.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},N.MaskedEnum=kt;class Mn extends de{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}N.MaskedFunction=Mn;var Ta;class _e extends de{constructor(e){super({..._e.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),s="\\d*",a=(this.scale?"("+ls(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+s+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ls).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ls(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const s=e.split(this.radix);return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),s.join(this.radix)}doPrepareChar(e,s){s===void 0&&(s={});const[a,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(s.input&&s.raw||!s.input&&!s.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),s);return e&&!a&&(n.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&n.aggregate(this._appendChar("-")),[a,n]}_separatorsCount(e,s){s===void 0&&(s=!1);let a=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++a,s&&(e+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s),this._removeThousandsSeparators(super.extractInput(e,s,a))}_appendCharRaw(e,s){s===void 0&&(s={});const a=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=e;const i=this.number;let o=!isNaN(i),c=!1;if(o){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(_e.UNMASKED_RADIX,this.radix),c||(c=r===this._value&&!s.tail)):o=!1),o&&(o=!!this._value.match(this._numberRegExp))}let d;o?d=new q({inserted:this._value.slice(r.length),rawInserted:c?"":e,skip:c}):(this._value=r,d=new q),this._value=this._insertThousandsSeparators(this._value);const f=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(f);return d.tailShift+=(g-n)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const s=e-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,s);if(a<=e)return a}return-1}_adjustRangeWithSeparators(e,s){const a=this._findSeparatorAround(e);a>=0&&(e=a);const n=this._findSeparatorAround(s);return n>=0&&(s=n+this.thousandsSeparator.length),[e,s]}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s);const a=this.value.slice(0,e),n=this.value.slice(s),r=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+n));const i=this._separatorsCountFromSlice(a);return new q({tailShift:(i-r)*this.thousandsSeparator.length})}nearestInputPos(e,s){if(!this.thousandsSeparator)return e;switch(s){case O.NONE:case O.LEFT:case O.FORCE_LEFT:{const a=this._findSeparatorAround(e-1);if(a>=0){const n=a+this.thousandsSeparator.length;if(e<n||this.value.length<=n||s===O.FORCE_LEFT)return a}break}case O.RIGHT:case O.FORCE_RIGHT:{const a=this._findSeparatorAround(e);if(a>=0)return a+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let s=e;this.min!=null&&(s=Math.max(s,this.min)),this.max!=null&&(s=Math.min(s,this.max)),s!==e&&(this.unmaskedValue=this.format(s,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(e){const s=this._removeThousandsSeparators(e).split(this.radix);return s[0]=s[0].replace(/^(\D*)(0*)(\d*)/,(a,n,r,i)=>n+i),e.length&&!/\d$/.test(s[0])&&(s[0]=s[0]+"0"),s.length>1&&(s[1]=s[1].replace(/0*$/,""),s[1].length||(s.length=1)),this._insertThousandsSeparators(s.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const s=e.split(this.radix);return s.length<2&&s.push(""),s[1]=s[1].padEnd(this.scale,"0"),s.join(this.radix)}doSkipInvalid(e,s,a){s===void 0&&(s={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===_e.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,s,a)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,_e.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(_e.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)||_e.EMPTY_VALUES.includes(e)&&_e.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Ta=_e,_e.UNMASKED_RADIX=".",_e.EMPTY_VALUES=[...de.EMPTY_VALUES,0],_e.DEFAULTS={...de.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ta.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})},N.MaskedNumber=_e;const us={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Fa(t,e,s){e===void 0&&(e=us.MASKED),s===void 0&&(s=us.MASKED);const a=Be(t);return n=>a.runIsolated(r=>(r[e]=n,r[s]))}function Vn(t,e,s,a){return Fa(e,s,a)(t)}N.PIPE_TYPE=us,N.createPipe=Fa,N.pipe=Vn;class Ln extends pe{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 s,a,n;const{repeat:r,...i}=st(e);this._blockOpts=Object.assign({},this._blockOpts,i);const o=Be(this._blockOpts);this.repeat=(s=(a=r??o.repeat)!=null?a:this.repeat)!=null?s: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(Be(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,s){s===void 0&&(s={});const a=new q;for(let c=(n=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.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,r,i,o;const g=d._appendChar(e,{...s,_beforeTailState:(o=s._beforeTailState)==null||(o=o._blocks)==null?void 0:o[c]});if(g.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(a.aggregate(g),g.consumed)break}return a}_trimEmptyTail(e,s){var a,n;e===void 0&&(e=0);const r=Math.max(((a=this._mapPosToBlock(e))==null?void 0:a.index)||0,this.repeatFrom,0);let i;s!=null&&(i=(n=this._mapPosToBlock(s))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let o=0;for(let c=i;r<=c&&!this._blocks[c].unmaskedValue;--c,++o);o&&(this._blocks.splice(i-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._trimEmptyTail(e,s),a}totalInputPositions(e,s){return e===void 0&&(e=0),s==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,s)}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}}N.RepeatBlock=Ln;try{globalThis.IMask=N}catch{}const Oa={mask:l.oneOfType([l.array,l.func,l.string,l.instanceOf(RegExp),l.oneOf([Date,Number,N.Masked]),l.instanceOf(N.Masked)]),value:l.any,unmask:l.oneOfType([l.bool,l.oneOf(["typed"])]),prepare:l.func,prepareChar:l.func,validate:l.func,commit:l.func,overwrite:l.oneOfType([l.bool,l.oneOf(["shift"])]),eager:l.oneOfType([l.bool,l.oneOf(["append","remove"])]),skipInvalid:l.bool,onAccept:l.func,onComplete:l.func,placeholderChar:l.string,displayChar:l.string,lazy:l.bool,definitions:l.object,blocks:l.object,enum:l.arrayOf(l.string),maxLength:l.number,from:l.number,to:l.number,pattern:l.string,format:l.func,parse:l.func,autofix:l.oneOfType([l.bool,l.oneOf(["pad"])]),radix:l.string,thousandsSeparator:l.string,mapToRadix:l.arrayOf(l.string),scale:l.number,normalizeZeros:l.bool,padFractionalZeros:l.bool,min:l.oneOfType([l.number,l.instanceOf(Date)]),max:l.oneOfType([l.number,l.instanceOf(Date)]),dispatch:l.func,inputRef:l.oneOfType([l.func,l.shape({current:l.object})])},Ia=Object.keys(Oa).filter(t=>t!=="value"),jn=["value","unmask","onAccept","onComplete","inputRef"],Pn=Ia.filter(t=>jn.indexOf(t)<0);function qn(t){var e;const s=(e=class extends m.Component{constructor(r){super(r),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const r=this.props,i=this._extractMaskOptionsFromProps(r);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in r&&r.value!==void 0&&(this.maskValue=r.value)):this.initMask(i);else if(this.destroyMask(),"value"in r&&r.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=r.value:this.element.value=r.value}}componentWillUnmount(){this.destroyMask()}_inputRef(r){this.element=r,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=r:this.props.inputRef(r))}initMask(r){r===void 0&&(r=this._extractMaskOptionsFromProps(this.props)),this.maskRef=N(this.element,r).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(r){const{...i}=r;return Object.keys(i).filter(o=>Pn.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(r){const{...i}=r;return Ia.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=r.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(r){this.maskRef&&(r=r==null&&this.props.unmask!=="typed"?"":r,this.props.unmask==="typed"?this.maskRef.typedValue=r:this.props.unmask?this.maskRef.unmaskedValue=r:this.maskRef.value=r)}_onAccept(r){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,r)}_onComplete(r){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,r)}render(){return m.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),a=t.displayName||t.name||"Component";return s.displayName="IMask("+a+")",s.propTypes=Oa,m.forwardRef((n,r)=>m.createElement(s,{...n,ref:r}))}const Un=qn(t=>{let{inputRef:e,...s}=t;return m.createElement("input",{...s,ref:e})}),zn=(t,e)=>m.createElement(Un,{...t,ref:e});m.forwardRef(zn);function Hn(t,e){let{onAccept:s,onComplete:a,ref:n=m.useRef(null),defaultValue:r,defaultUnmaskedValue:i,defaultTypedValue:o}=e===void 0?{}:e;const c=m.useRef(null),[d,f]=m.useState({}),[g,k]=m.useState(""),[E,C]=m.useState(""),[_,v]=m.useState(),D=m.useCallback(()=>{var h;(h=c.current)==null||h.destroy(),c.current=null},[]),$=m.useCallback(()=>{const h=c.current;h&&(f({value:h.value,unmaskedValue:h.unmaskedValue,typedValue:h.typedValue}),v(h.typedValue),C(h.unmaskedValue),k(h.value))},[]),A=m.useCallback(h=>{const F=c.current;F&&($(),s==null||s(F.value,F,h))},[s]),T=m.useCallback(h=>c.current&&(a==null?void 0:a(c.current.value,c.current,h)),[a]);return m.useEffect(()=>{const{value:h,...F}=d,x=c.current;!x||g===void 0||(h!==g&&(x.value=g,x.value!==g&&A()),f(F))},[g]),m.useEffect(()=>{const{unmaskedValue:h,...F}=d,x=c.current;!x||E===void 0||(h!==E&&(x.unmaskedValue=E,x.unmaskedValue!==E&&A()),f(F))},[E]),m.useEffect(()=>{const{typedValue:h,...F}=d,x=c.current;!x||_===void 0||(h!==_&&(x.typedValue=_,x.masked.typedValueEquals(_)||A()),f(F))},[_]),m.useEffect(()=>{const h=n.current;if(!h||!(t!=null&&t.mask))return D();const F=c.current;F?F==null||F.updateOptions(t):h&&t!=null&&t.mask&&(c.current=N(h,t),$(),r!==void 0&&k(r),i!==void 0&&C(i),o!==void 0&&v(o))},[t,D,A]),m.useEffect(()=>{if(!c.current)return;const h=c.current;return h.on("accept",A),h.on("complete",T),()=>{h.off("accept",A),h.off("complete",T)}},[A,T]),m.useEffect(()=>D,[D]),{ref:n,maskRef:c,value:g,setValue:k,unmaskedValue:E,setUnmaskedValue:C,typedValue:_,setTypedValue:v}}var cs=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(cs||{}),ds=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(ds||{}),ps=(t=>(t.Default="",t.Error="error",t.Success="success",t))(ps||{}),hs=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(hs||{}),fs=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(fs||{});const J={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:"text",options:Object.values(cs)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(ds)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:"",options:Object.values(ps)},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:"center",options:Object.values(hs)},tooltipPosition:{type:String,default:"top",options:Object.values(fs)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},Na={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:"AA.AAA.AAA/AAAA-AA",definitions:{A:/[0-9A-Z]/},prepareChar:t=>t.toUpperCase(),startsWith:/[A-Z0-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]}};var gs=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(gs||{}),ms=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(ms||{});const Ae={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:"top",options:Object.values(gs)},placement:{type:String,default:"center",options:Object.values(ms)},text:{type:String,default:""},testId:{type:String,default:"ds-tooltip"}}},ze=({children:t,position:e=Ae.props.position.default,placement:s=Ae.props.placement.default,text:a=Ae.props.text.default,testId:n=Ae.props.testId.default,className:r})=>{const i=m.useRef(null),[o,c]=m.useState(0),[d,f]=m.useState(0),[g,k]=m.useState(!1),E=e&&Ae.props.position.options.find(D=>D===e)&&`${Ae.class}--${e}`,C=s&&Ae.props.placement.options.find(D=>D===s)&&`${Ae.class}--${s}`;let _;m.useLayoutEffect(()=>{var D,$;i.current&&(c((D=i==null?void 0:i.current)==null?void 0:D.offsetHeight),f(($=i==null?void 0:i.current)==null?void 0:$.offsetWidth))},[]);const v=9;switch(e){case"top":s==="initial"?_={bottom:o+v,left:-v}:s==="end"?_={bottom:o+v,right:-v}:_={bottom:o+v,left:"50%",transform:"translateX(-50%)"};break;case"bottom":s==="initial"?_={top:o+v,left:-v}:s==="end"?_={top:o+v,right:-v}:_={top:o+v,left:"50%",transform:"translateX(-50%)"};break;case"left":s==="initial"?_={right:d+v,top:-v}:s==="end"?_={right:d+v,bottom:-v}:_={right:d+v,top:"50%",transform:"translateY(-50%)"};break;case"right":s==="initial"?_={left:d+v,top:-v}:s==="end"?_={left:d+v,bottom:-v}:_={left:d+v,top:"50%",transform:"translateY(-50%)"};break}return u.jsxs("div",{className:[Ae.class,r].join(" "),"data-testid":n,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),ref:i,role:"tooltip",children:[t,g&&u.jsx("div",{className:[E,C].filter(D=>D).join(" "),children:u.jsx("span",{className:`${Ae.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:_,children:a})})]})};ze.propTypes={position:l.string,placement:l.string,text:l.oneOfType([l.string,l.node]),testId:l.string},ze.displayName="DsTooltip";const Ye=m.forwardRef(({name:t,testId:e=J.props.testId.default,type:s=J.props.type.default,animated:a=J.props.animated.default,size:n=J.props.size.default,label:r,placeholder:i,value:o,min:c,max:d,tooltip:f=J.props.tooltip.default,tooltipPosition:g=J.props.tooltipPosition.default,tooltipPlacement:k=J.props.tooltipPlacement.default,icon:E=J.props.icon.default,status:C=J.props.status.default,feedback:_,hasFeedback:v=J.props.hasFeedback.default,noMargin:D=J.props.noMargin.default,disabled:$=J.props.disabled.default,autoFocus:A,className:T,mask:h,onChangeHandler:F=J.props.onChangeHandler.default,onBlurHandler:x,onKeyDownHandler:W,onFocusHandler:V},ae)=>{const[M,H]=m.useState(!1),[te,ie]=m.useState(!1),we=!!F&&!!h,se=(b,K,S)=>{if(we&&S){const ne={...S,target:{...S.target,name:t,maskedValue:b,value:K.unmaskedValue,type:"text"}};F(ne)}},ue=m.useMemo(()=>typeof h=="object"?{lazy:!0,...h}:Na[h]?{...Na[h],min:c,max:d,lazy:!0}:{mask:h??"",min:c,max:d,lazy:!0},[h]),{ref:xe,setUnmaskedValue:Te}=Hn(ue,{onAccept:se}),y=b=>{F&&!we&&F(b)},w=b=>{W&&W(b)},P=b=>{H(!1),x&&x(b)},L=b=>{H(!0),V&&V(b)},B=()=>{ie(b=>!b)},I=m.useMemo(()=>te&&s==="password"?"text":s,[te,s]),j=()=>{const b=[`${J.class}`];return n&&b.push(`${J.class}--${n}`),a&&b.push(`${J.class}--animated`),D&&b.push(`${J.class}--no-margin`),E&&b.push(`${J.class}--with-icon`),C&&b.push(`${J.class}--${C}`),T&&b.push(T),b.join(" ")},U=m.useMemo(()=>{const b=[`${J.class}__label`];return(M||o)&&b.push(`${J.class}__label--active`),b.join(" ")},[o,M]),z=()=>!a&&i?i:"",X=()=>C&&C==="error"?"info":"check_circle";return m.useEffect(()=>{h&&Te(o??"")},[o,h,Te]),u.jsxs("div",{className:j(),ref:ae,children:[v&&u.jsx("div",{className:"ds-input__feedback",children:_&&u.jsxs(u.Fragment,{children:[u.jsx(Z,{image:X()}),_]})}),u.jsx("input",{autoFocus:A,className:"ds-input__input","data-testid":e,disabled:$,id:t,max:d,min:c,name:t,onBlur:P,onChange:y,onFocus:L,onInput:y,onKeyDown:w,placeholder:z(),ref:xe,type:I,...!h&&{value:o??""}}),u.jsxs("label",{className:U,htmlFor:t,children:[r,f&&u.jsx(ze,{className:"ds-input__tooltip",placement:k,position:g,text:f,children:u.jsx(Z,{className:"ds-input__icon",image:"info"})})]}),E&&u.jsx(Z,{className:"ds-input__icon",image:E}),s==="password"&&u.jsx(Z,{className:"ds-input__password-icon",image:te?"visibility_off":"visibility",onClick:B,size:"xl"})]})});Ye.propTypes={name:l.string,testId:l.string,type:l.oneOf(J.props.type.options),animated:l.bool,size:l.oneOf(J.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),min:l.string,max:l.string,tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,icon:l.string,status:l.oneOf(J.props.status.options),feedback:l.string,hasFeedback:l.bool,noMargin:l.bool,disabled:l.bool,mask:l.oneOfType([l.string,l.object]),onChangeHandler:l.func,onFocusHandler:l.func},Ye.displayName="DsInput";var vs=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(vs||{}),ys=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(ys||{});const ve={name:"Loading",class:"ds-loading",props:{size:{type:String,default:"medium",options:Object.values(vs)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:"neutral-10",options:Object.values(ys)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},bt=({id:t,testId:e=ve.props.testId.default,className:s,size:a=ve.props.size.default,opacity:n=ve.props.opacity.default,fullscreen:r=ve.props.fullscreen.default,backgroundColor:i=ve.props.backgroundColor.default})=>{const o=!r&&`${ve.class}--absolute`,c=a&&`${ve.class}__dots--${a}`,d=i&&ve.props.backgroundColor.options.find(g=>g===i)&&`${ve.class}__background--${i}`,f=n&&`${ve.class}__background--opacity`;return u.jsxs("div",{className:[ve.class,s,o].filter(g=>g).join(" "),"data-testid":e,id:t,children:[u.jsx("div",{className:[`${ve.class}__background`,d,f].filter(g=>g).join(" ")}),u.jsx("div",{className:["ds-loading__dots",c].filter(g=>g).join(" "),role:"status"})]})};bt.propTypes={id:l.string,testId:l.string,size:l.oneOf(ve.props.size.options),opacity:l.bool,fullscreen:l.bool,backgroundColor:l.string},bt.displayName="DsLoading";const Ie={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:()=>({})}}},_s=({id:t,label:e,detail:s,name:a,testId:n=a??"ds-option-test",disabled:r=Ie.props.disabled.default,value:i,checked:o=Ie.props.checked.default,onChangeHandler:c=Ie.props.onChangeHandler.default})=>{const[d]=m.useState(crypto.randomUUID()),f=()=>{const g=[Ie.class];return r&&g.push(`${Ie.class}--disabled`),g.join(" ")};return u.jsxs("div",{className:f(),children:[u.jsx("input",{checked:o,"data-testid":n,disabled:r,id:t??String(d),name:a,onChange:c,type:"radio",value:i}),u.jsx(Z,{className:`${Ie.class}__icon`,image:o?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),u.jsxs("div",{className:`${Ie.class}__text-container`,children:[e&&u.jsx("label",{className:`${Ie.class}__label`,htmlFor:t??String(d),children:e}),s&&u.jsx("label",{className:`${Ie.class}__detail`,htmlFor:t??String(d),children:s})]})]})};_s.propTypes={id:l.string,name:l.string,testId:l.string,label:l.oneOfType([l.string,l.node]),value:l.oneOfType([l.string,l.number]),detail:l.string,disabled:l.bool,checked:l.bool,onChangeHandler:l.func},_s.displayName="DsOption";var ks=(t=>(t.Default="",t.Large="large",t.Small="small",t))(ks||{});const at={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:"",options:Object.values(ks)}}},Ne=({children:t,className:e,testId:s="ds-paragraph-test",type:a=at.props.type.default})=>{const n=a&&`${at.class}--${a}`;return u.jsx("p",{className:[at.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};Ne.propTypes={className:l.string,testId:l.string,type:l.oneOf(at.props.type.options)},Ne.displayName="DsParagraph";var bs=(t=>(t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(bs||{});const St={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:"success",options:Object.values(bs)}}};var Ss=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(Ss||{}),Es=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(Es||{}),Cs=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))(Cs||{}),ws=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(ws||{}),As=(t=>(t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t))(As||{});const Pe={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:"stretch",required:!0,options:Object.values(Ss)},alignItems:{type:String,default:"stretch",required:!0,options:Object.values(Es)},flexDirection:{type:String,default:"row",required:!0,options:Object.values(Cs)},flexWrap:{type:String,default:"wrap",required:!1,options:Object.values(ws)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(As)}}},Me=({children:t,className:e,justifyContent:s=Pe.props.justifyContent.default,alignItems:a=Pe.props.alignItems.default,flexDirection:n=Pe.props.flexDirection.default,flexWrap:r=Pe.props.flexWrap.default,width:i=Pe.props.width.default,height:o,gap:c})=>{const d=()=>{const g=[Pe.class,e];return c&&g.push(`${Pe.class}--gap-${c}`),g.join(" ")},f=()=>({display:"flex",justifyContent:s,alignItems:a,flexDirection:n,flexWrap:r,width:i,height:o,gap:c});return u.jsx("div",{className:d(),style:f(),children:t})};Me.propTypes={className:l.string,justifyContent:l.string,alignItems:l.string,flexDirection:l.string,flexWrap:l.string,width:l.string,height:l.string,gap:l.string},Me.displayName="DsFlexLayout";const Et={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},oe=({children:t,flex:e=Et.props.flex.default,className:s=Et.props.className.default})=>{const a=()=>[Et.class,s].join(" "),n=()=>({flex:e});return u.jsx("div",{className:a(),style:n(),children:t})};oe.propTypes={className:l.string,flex:l.string},oe.displayName="DsFlexElement";var Ct=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(Ct||{});const Ke={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:"none",options:Object.values(Ct)},horizontal:{type:String,default:"none",options:Object.values(Ct)}}},ke=({vertical:t=Ke.props.vertical.default,horizontal:e=Ke.props.horizontal.default})=>{const s=t&&`ds-spacer__vertical--${t}`,a=e&&`ds-spacer__horizontal--${e}`;return u.jsx("div",{className:[Ke.class,s,a].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};ke.propTypes={vertical:l.oneOf(Ke.props.vertical.options),horizontal:l.oneOf(Ke.props.horizontal.options)},ke.displayName="DsSpacer";const Ds=({label:t,progress:e=St.props.progress.default,color:s=St.props.color.default})=>{const a=m.useMemo(()=>e>100?100:e<0?0:e,[e]),n=m.useMemo(()=>Je[s]??s,[s]),r=m.useMemo(()=>`bg-color__${n}`,[n]),i=m.useMemo(()=>`color__${n}`,[n]);return u.jsx("div",{className:"ds-progress",children:u.jsxs(Me,{flexDirection:"column",children:[u.jsx(oe,{children:u.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,className:"ds-progress__container",role:"progressbar",children:u.jsx("div",{className:`ds-progress__progress ${r}`,"data-testid":"ds-progress-bar",style:{width:`${a}%`}})})}),u.jsx(oe,{children:u.jsxs(Me,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[u.jsx(ke,{vertical:"quark"}),u.jsx(u.Fragment,{children:t&&u.jsx(Ne,{className:i,children:t})})]})})]})})};Ds.propTypes={label:l.string,progress:l.number,color:l.oneOf(St.props.color.options)};var Ts=(t=>(t.Default="default",t.Card="card",t))(Ts||{});const be={name:"DsRadio",class:"ds-radio",props:{variant:{type:String,default:"default",options:Object.values(Ts)},fullWidth:{type:Boolean,default:!1}}},xa=m.forwardRef(({variant:t=be.props.variant.default,fullWidth:e=be.props.fullWidth.default,label:s,description:a,className:n,id:r,testId:i="ds-radio",disabled:o,...c},d)=>{const f=m.useId(),g=r??`${be.class}-${f.replace(/:/g,"")}`,k=[be.class,`${be.class}--${t}`,e&&`${be.class}--full-width`,o&&`${be.class}--disabled`,n].filter(Boolean).join(" ");return u.jsxs("label",{className:k,"data-testid":`${i}-root`,htmlFor:g,children:[u.jsx("input",{...c,className:`${be.class}__input`,"data-testid":i,disabled:o,id:g,ref:d,type:"radio"}),u.jsx("span",{"aria-hidden":"true",className:`${be.class}__control`}),(s||a)&&u.jsxs("span",{className:`${be.class}__text`,children:[s&&u.jsx("span",{className:`${be.class}__label`,children:s}),a&&u.jsx("span",{className:`${be.class}__description`,children:a})]})]})});xa.displayName="DsRadio";var Fs=(t=>(t.Small="sm",t.Medium="md",t))(Fs||{});const ye={name:"DsSegmentControl",class:"ds-segment-control",props:{items:{type:Array,required:!0},value:{type:String,required:!1},defaultValue:{type:String,required:!1},size:{type:String,default:"sm",options:Object.values(Fs)},fullWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},className:{type:String,default:""},testId:{type:String,default:"ds-segment-control"},onChange:{type:Function,default:()=>{}}}},Ba=m.forwardRef(({items:t,value:e,defaultValue:s,name:a,size:n=ye.props.size.default,fullWidth:r=ye.props.fullWidth.default,disabled:i=ye.props.disabled.default,className:o,testId:c=ye.props.testId.default,onChange:d,"aria-label":f,"aria-labelledby":g},k)=>{const E=m.useId(),C=a??`${ye.class}-${E.replace(/:/g,"")}`,_=e!==void 0,v=m.useMemo(()=>t.findIndex(M=>!M.disabled),[t]),D=m.useMemo(()=>_?e:s!==void 0?s:v>=0?t[v].value:void 0,[s,v,_,t,e]),[$,A]=m.useState(D),T=_?e:$,h=m.useRef([]);m.useEffect(()=>{h.current=h.current.slice(0,t.length)},[t.length]);const F=m.useMemo(()=>t.findIndex(M=>M.value===T),[T,t]),x=m.useCallback(M=>{const H=t.length;let te=(M%H+H)%H,ie=0;for(;t[te].disabled&&ie<H;)te=(te+1)%H,ie+=1;h.current[te].focus()},[t]),W=m.useCallback((M,H)=>{i||M.disabled||M.value!==T&&(_||A(M.value),d==null||d(M.value,H))},[T,i,_,d]),V=(M,H)=>{const te=t.length-1;switch(M.key){case"ArrowRight":case"ArrowDown":M.preventDefault(),x(H+1);break;case"ArrowLeft":case"ArrowUp":M.preventDefault(),x(H-1);break;case"Home":M.preventDefault(),x(0);break;case"End":M.preventDefault(),x(te);break;case" ":case"Enter":M.preventDefault(),W(t[H],H);break}},ae=[ye.class,`${ye.class}--size-${n}`,r&&`${ye.class}--full-width`,i&&`${ye.class}--disabled`,o].filter(Boolean).join(" ");return u.jsx("div",{"aria-disabled":i||void 0,"aria-label":f,"aria-labelledby":g,className:ae,"data-testid":c,ref:k,role:"radiogroup",children:t.map((M,H)=>{const te=T===M.value,ie=i||!!M.disabled,we=[`${ye.class}__item`,te&&`${ye.class}__item--active`,ie&&`${ye.class}__item--disabled`].filter(Boolean).join(" "),se=ie?-1:F===-1?H===v?0:-1:te?0:-1;return u.jsxs("label",{className:we,children:[u.jsx("input",{checked:te,className:`${ye.class}__item-input`,"data-testid":M.testId??`${c}-item-${M.value}`,disabled:ie,name:C,onChange:()=>W(M,H),onKeyDown:ue=>V(ue,H),ref:ue=>h.current[H]=ue,tabIndex:se,type:"radio",value:M.value}),M.label]},M.value)})})});Ba.displayName="DsSegmentControl";var Os=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(Os||{}),Is=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Is||{}),Ns=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Ns||{}),xs=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(xs||{});const ee={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(Os),default:"md"},status:{type:String,default:"",options:Object.values(Is)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"initial",options:Object.values(Ns)},tooltipPosition:{type:String,default:"top",options:Object.values(xs)},feedback:{type:String,default:""},options:[]}},Bs=m.forwardRef(({label:t,className:e,disabled:s=ee.props.disabled.default,animated:a=ee.props.animated.default,multiple:n=ee.props.multiple.default,testId:r=ee.props.testId.default,name:i,options:o,value:c,placeholder:d,onChange:f,onChangeHandler:g,size:k=ee.props.size.default,status:E=ee.props.status.default,tooltip:C,tooltipPosition:_=ee.props.tooltipPosition.default,tooltipPlacement:v=ee.props.tooltipPlacement.default,feedback:D,...$},A)=>{const[T,h]=m.useState(!1),F=V=>{h(!1),f&&f(V,V.target.value),g&&g(V,V.target.value)},x=()=>{const V=[ee.class,"select-placeholder"];return V.push(`${ee.class}--${k}`),E&&V.push(`${ee.class}--${E}`),T&&V.push(`${ee.class}--active`),s&&V.push(`${ee.class}--disabled`),e&&V.push(e),V.join(" ")},W=m.useMemo(()=>{const V=[`${ee.class}__label`];return!a&&V.push(`${ee.class}__label--not-animated`),c&&V.push(`${ee.class}__label--has-value`),a&&!c&&!C&&V.push(`${ee.class}__label--hidden`),V.join(" ")},[c]);return u.jsxs("div",{className:x(),"data-testid":"ds-select-component",children:[t&&u.jsxs("label",{className:W,"data-testid":"ds-label-id",htmlFor:i,children:[t,C&&u.jsx(ze,{className:`${ee.class}__tooltip`,placement:v,position:_,text:C,children:u.jsx(Z,{className:`${ee.class}__icon`,image:"info"})})]}),u.jsxs("select",{"data-testid":r,disabled:s,id:i,multiple:n,name:i,onBlur:()=>h(!1),onChange:V=>F(V),onFocus:()=>h(!0),ref:A,value:c??"",...$,children:[(d||a)&&u.jsx("option",{disabled:!0,value:"",children:d??t}),o==null?void 0:o.map((V,ae)=>{var M;return"options"in V?u.jsx("optgroup",{label:V.label,children:(M=V.options)==null?void 0:M.map((H,te)=>u.jsx("option",{className:`${ee.class}__option-select`,value:H.value,children:H.label??H.value},te))},ae):u.jsx("option",{className:`${ee.class}__option-select`,value:V.value,children:V.label??V.value},ae)})]}),D&&u.jsxs("div",{className:"ds-select__feedback-container",children:[u.jsx(Z,{className:"ds-select__icon",image:E==="success"?"check_circle":"info"}),u.jsx("span",{className:"ds-select__feedback",children:D})]})]})});Bs.propTypes={label:l.string.isRequired,className:l.string,disabled:l.bool,animated:l.bool,multiple:l.bool,name:l.string,testId:l.string,options:l.array.isRequired,placeholder:l.string,onChange:l.func,onChangeHandler:l.func,value:l.oneOfType([l.string,l.number]),size:l.oneOf(ee.props.size.options),status:l.oneOf(ee.props.status.options),tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,feedback:l.string},Bs.displayName="DsSelect";var $s=(t=>(t.Large="large",t.Small="small",t))($s||{});const wt={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:"large",options:Object.values($s)}}},$a=({children:t,className:e,testId:s="ds-subtitle-test",type:a})=>{const n=wt.props.type.options.find(r=>r===a)&&`${wt.class}--${a}`;return u.jsx("p",{className:[wt.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};$a.displayName="DsSubtitle";var Ms=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Ms||{}),Vs=(t=>(t.Text="text",t))(Vs||{}),Ls=(t=>(t.None="",t.Error="error",t.Success="success",t))(Ls||{}),js=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(js||{});const le={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:"text",options:Object.values(Vs)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(Ms)},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:"",options:Object.values(Ls)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:"none",options:Object.values(js)},onChangeHandler:{type:Function,default:()=>{}}}},Ps=m.forwardRef(({name:t,testId:e=le.props.testId.default,animated:s=le.props.animated.default,size:a=le.props.size.default,label:n,placeholder:r,value:i,minLength:o,maxLength:c,tooltip:d,icon:f,status:g=le.props.status.default,feedback:k,disabled:E=le.props.disabled.default,required:C,className:_,resize:v=le.props.resize.default,onChangeHandler:D,onBlurHandler:$,onKeyDownHandler:A,onFocusHandler:T,rows:h=le.props.rows.default,cols:F,description:x,style:W},V)=>{const[ae,M]=m.useState(!1),[H,te]=m.useState(0),[ie,we]=m.useState(crypto.randomUUID());m.useEffect(()=>{i==null&&we(crypto.randomUUID())},[i]);const se=I=>{te(I.target.value.length),D&&D(I)},ue=I=>{A&&A(I)},xe=I=>{M(!1),$&&$(I)},Te=I=>{M(!0),T&&T(I)},y=()=>{const I=[`${le.class}`];return a&&I.push(`${le.class}--${a}`),s&&I.push(`${le.class}--animated`),d&&I.push(`${le.class}--with-icon`),g&&I.push(`${le.class}--${g}`),_&&I.push(_),I.join(" ")},w=m.useMemo(()=>{const I=[`${le.class}__label`];return(ae||i)&&I.push(`${le.class}__label--active`),I.join(" ")},[i,ae]),P=()=>!s&&r?r:"",L=()=>g&&g==="error"?"info":"check_circle",B={resize:v,...W??{}};return u.jsxs("div",{className:y(),children:[x&&u.jsx("span",{className:"ds-textarea__description",children:x}),k&&u.jsxs("div",{className:"ds-textarea__feedback",children:[u.jsx(Z,{image:L()}),k]}),u.jsx("textarea",{className:"ds-textarea__textarea",cols:F,"data-testid":e,defaultValue:i??"",disabled:E,id:t,maxLength:c,minLength:o,name:t,onBlur:xe,onChange:se,onFocus:Te,onKeyDown:ue,placeholder:P(),ref:V,required:C,rows:h,style:B}),u.jsx("label",{className:w,htmlFor:t,children:n}),c&&u.jsxs("span",{className:"ds-textarea__count",children:[H,"/",c]}),d&&u.jsx(ze,{className:"ds-textarea__tooltip",placement:"end",text:d,children:u.jsx(Z,{className:"ds-textarea__icon",image:f})})]},ie)});Ps.propTypes={name:l.string,testId:l.string,animated:l.bool,size:l.oneOf(le.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),tooltip:l.string,icon:l.string,status:l.oneOf(le.props.status.options),feedback:l.string,minLength:l.number,maxLength:l.number,rows:l.number,cols:l.number,disabled:l.bool,required:l.bool,onChangeHandler:l.func,onBlur:l.func,onKeyDown:l.func,onFocus:l.func,resize:l.oneOf(le.props.resize.options).isRequired,description:l.string,style:l.object},Ps.displayName="DsTextArea";const nt={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1},testId:{type:String,default:"ds-container-test"}}},At=({children:t,fluid:e=nt.props.fluid.default,className:s,style:a,testId:n=nt.props.testId.default})=>{const r=e?`${nt.class}--fluid`:nt.class;return u.jsx("div",{className:[r,s].filter(i=>i).join(" "),"data-testid":n,style:a,children:t})};At.propTypes={children:l.node,fluid:l.bool,className:l.string,style:l.object,testId:l.string},At.displayName="DsContainer";var qs=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(qs||{}),Dt=(t=>(t.Start="start",t.End="end",t.Center="center",t.Stretch="stretch",t.SpaceAround="space-around",t.SpaceBetween="space-between",t.SpaceEvenly="space-evenly",t))(Dt||{});const re={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:"sm",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:"start",options:Object.values(Dt)},verticalAlign:{type:String,default:"start",options:Object.values(Dt)}}};function Ma(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function Wn(){const[t,e]=m.useState(Ma());return m.useEffect(()=>{function s(){e(Ma())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),t}const Us=({children:t,rows:e=re.props.rows.default,gap:s=re.props.gap.default,vGap:a=re.props.vGap.default,hGap:n=re.props.hGap.default,horizontalAlign:r=re.props.horizontalAlign.default,verticalAlign:i=re.props.verticalAlign.default,width:o=re.props.width.default,height:c=re.props.height.default})=>{const d=a&&`${re.class}__v-gap--${s}`,f=n&&`${re.class}__h-gap--${s}`,g=r&&re.props.horizontalAlign.options.find(A=>A===r)?`${re.class}--h-${r}`:null,k=i&&re.props.verticalAlign.options.find(A=>A===i)?`${re.class}--v-${i}`:null,{width:E}=Wn(),[C,_]=m.useState("auto");m.useEffect(()=>{E<=768?_("6"):_("12")},[E]);const v=A=>/^[+-]?\d+$/.test(A),D=()=>e.split(",").map(T=>(T=T.trim(),T==="0"||T==="*"||T==="auto"?"auto":v(T)?T+"fr":T)).join(" "),$=()=>`repeat(${C}, minmax(0, 1fr))`;return u.jsx("div",{className:[re.class,g,k,d,f].filter(A=>A).join(" "),style:{width:o,height:c,gridTemplateColumns:$(),gridTemplateRows:D()},children:t})};Us.propTypes={children:l.oneOfType([l.arrayOf(l.node),l.node,l.func]),rows:l.string,gap:l.oneOf(re.props.gap.options),vGap:l.bool,hGap:l.bool,width:l.string,height:l.string,horizontalAlign:l.oneOf(re.props.horizontalAlign.options),verticalAlign:l.oneOf(re.props.verticalAlign.options)},Us.displayName="DsGridLayout";const Va=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,La=({children:t,grid:e})=>{const{row:s,col:a,mobileRow:n,mobileCol:r}=e,[i,o]=m.useState(Va());m.useEffect(()=>{const d=()=>{o(Va())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=m.useMemo(()=>i<=768?{gridRow:n??s,gridColumn:r??a}:{gridRow:s,gridColumn:a},[i,s,a,n,r]);return u.jsx("div",{style:c,children:t})};La.displayName="DsGridElement";const Xn={name:"Grid-Element",class:"ds-grid-element",props:{grid:{type:Object,default:{row:"auto",col:"auto"}}}};var He=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(He||{});const Ee={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:"xs",options:Object.values(He)},top:{type:String,default:"none",options:Object.values(He)},right:{type:String,default:"none",options:Object.values(He)},bottom:{type:String,default:"none",options:Object.values(He)},left:{type:String,default:"none",options:Object.values(He)}}},Re=({children:t,space:e=Ee.props.space.default,top:s=Ee.props.top.default,right:a=Ee.props.right.default,bottom:n=Ee.props.bottom.default,left:r=Ee.props.left.default})=>{const i=s&&`${Ee.class}__top--${s}`,o=a&&`${Ee.class}__right--${a}`,c=n&&`${Ee.class}__bottom--${n}`,d=r&&`${Ee.class}__left--${r}`,f=e&&`${Ee.class}--${e}`;return u.jsx("div",{className:[Ee.class,i,o,c,d,f].filter(g=>g).join(" "),children:t})};Re.displayName="DsWrapper";const Tt={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},We={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}}},Ft=({title:t,content:e,onToggle:s,active:a=We.props.active.default,disabled:n=We.props.disabled.default})=>{const r=a&&`${We.class}--active`;return u.jsxs("li",{className:[We.class,r].filter(i=>i).join(" "),children:[u.jsxs("button",{className:`${We.class}__button`,disabled:n,onClick:s,children:[t,u.jsx(Z,{className:`${We.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),a&&u.jsx("div",{className:"ds-accordion-item__content",children:e})]})};Ft.propTypes={active:l.bool,title:l.oneOfType([l.element,l.string]),content:l.oneOfType([l.element,l.string]),disabled:l.bool},Ft.displayName="DsAccordionItem";const zs=({items:t=Tt.props.items.default,activeItem:e=Tt.props.activeItem.default,onClick:s})=>{const[a,n]=m.useState(-1);m.useEffect(()=>{t.map((i,o)=>{i.active&&n(o)})},[t]),m.useEffect(()=>{e!=null&&n(e)},[e]);const r=i=>{if(a===i)return s&&s(-1),n(-1);n(i),s&&s(i)};return u.jsx("ul",{className:Tt.class,children:t.map((i,o)=>u.jsx(Ft,{active:a===o,content:i.content,disabled:i.disabled,onToggle:()=>{r(o)},title:i.title},o))})};zs.propTypes={items:l.array,activeItem:l.number},zs.displayName="DsAccordion";const ja=({title:t,activeTags:e,handleTagClose:s})=>u.jsx("div",{className:"active-tags",children:e.length>0&&u.jsxs(u.Fragment,{children:[u.jsx(Ne,{className:"active-tags__title",children:t}),u.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((a,n)=>u.jsx(ze,{text:`Filtro ${a.text} aplicado`,children:u.jsxs("div",{className:`active-tags__item ${a.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[u.jsxs(Me,{alignItems:"center",gap:"nano",children:[u.jsx(oe,{children:u.jsx(Z,{className:"active-tags__icon",color:a.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:a.icon,testId:`icon-${n}`})}),u.jsx(oe,{children:u.jsx(Ne,{type:"small",children:a.text})})]}),!a.hiddenClose&&u.jsx(Z,{image:"close",onClick:()=>s(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${a.id}-${a.text}`))})]})});ja.displayName="DsActiveTags";const Yn={name:"ActiveTags",class:"ds-active-tags",props:{title:{type:String,default:""},activeTags:{type:Array,default:[]},handleTagClose:{type:Function,default:()=>{}}}},Ge={name:"Carousel",class:"ds-carousel",props:{}},Pa=({slides:t,interval:e=3e3,imageHeight:s=100,imageWidth:a=100,imageMaxHeight:n,imageMaxWidth:r})=>{const[i,o]=m.useState(0),[c,d]=m.useState(!1),f=m.useRef(null);m.useEffect(()=>(c||(f.current=setInterval(()=>{o(E=>E===t.length-1?0:E+1)},e)),()=>{f.current&&clearInterval(f.current)}),[c,e,t.length]);const g=()=>d(!0),k=()=>d(!1);return u.jsxs("div",{className:`${Ge.class}`,"data-testid":"ds-carousel",onMouseEnter:g,onMouseLeave:k,children:[u.jsx("div",{className:`${Ge.class}__image-wrapper`,style:{height:s,width:a,maxHeight:n,maxWidth:r},children:t.map((E,C)=>u.jsx("img",{alt:E.title,className:`${Ge.class}__image ${C===i?"active":"inactive"}`,height:s,src:E.image,style:{maxHeight:n,maxWidth:r},width:a},C))}),u.jsx(ke,{vertical:"xxs"}),u.jsx("div",{children:u.jsx(ht,{className:"color__primary",type:"heading-4",children:t[i].title})}),u.jsx("div",{children:u.jsx(Ne,{type:"large",children:t[i].description})}),u.jsx(ke,{vertical:"xxs"}),u.jsx("div",{className:`${Ge.class}__dots`,children:u.jsx("div",{className:`${Ge.class}__dots-wrapper`,children:t.map((E,C)=>u.jsx("button",{"aria-label":`Go to slide ${C+1}`,className:`dot ${i===C?"dot--active":""}`,onClick:()=>o(C)},C))})})]})};Pa.propTypes={slides:l.arrayOf(l.shape({title:l.string.isRequired,image:l.string.isRequired,description:l.string.isRequired})).isRequired,interval:l.number,imageHeight:l.oneOfType([l.number,l.string]),imageWidth:l.oneOfType([l.number,l.string]),imageMaxHeight:l.oneOfType([l.number,l.string]),imageMaxWidth:l.oneOfType([l.number,l.string])};var Hs=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Hs||{});const Y={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},animated:{type:Boolean,default:!0},inputAutoFocus:{type:Boolean,default:!1},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:"medium",options:Object.values(Hs)},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:()=>{}},onClearHandler:{type:Function,default:()=>{}}}},Kn=(t,e)=>{if(!e)return t;const s=e.toLowerCase();return t.filter(a=>a.label.toLowerCase().includes(s))},qa=t=>t,Ua=({label:t=Y.props.label.default,name:e=Y.props.name.default,testId:s=Y.props.testId.default,value:a=Y.props.value.default,options:n=Y.props.options.default,size:r=Y.props.size.default,onChangeHandler:i=Y.props.onChangeHandler.default,onSelectHandler:o=Y.props.onSelectHandler.default,onClearHandler:c=Y.props.onClearHandler.default,icon:d=Y.props.icon.default,noOptionsMessage:f=Y.props.noOptionsMessage.default,disabled:g=Y.props.disabled.default,status:k=Y.props.status.default,onBlurHandler:E=Y.props.onBlurHandler.default,onFocusHandler:C=Y.props.onFocusHandler.default,animated:_=Y.props.animated.default,inputAutoFocus:v=Y.props.inputAutoFocus.default,placeholder:D=Y.props.placeholder.default,loading:$,showOptionsOnFocus:A=!1,inputType:T,inputMin:h,inputMax:F,inputTooltip:x,inputTooltipPosition:W,inputTooltipPlacement:V,inputFeedback:ae,inputHasFeedback:M,inputNoMargin:H,inputMask:te,inputOnKeyDownHandler:ie})=>{const[we,se]=m.useState(!1),[ue,xe]=m.useState(a),[Te,y]=m.useState(!0),w=m.useRef(null),P=b=>{if(A){const ne=a.trim().toLowerCase(),Ve=b.currentTarget.value.trim().toLowerCase(),lt=n.map(er=>er.label.trim().toLowerCase()),Zn=!!ne&&lt.includes(ne),Jn=!!Ve&&lt.includes(Ve);Zn&&!Jn&&c()}i(b),y(!1);const K=b.currentTarget.value.length;(A||$==null&&K>0||!$&&K>2)&&se(!0)},L=()=>{C(),y(!0),A&&se(!0)},B=()=>{var S,ne;const b=(S=w.current)==null?void 0:S.querySelector("input");if(!b)return;const K=(ne=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:ne.set;K==null||K.call(b,""),b.dispatchEvent(new Event("input",{bubbles:!0}))},I=()=>{if(A){const b=a.trim(),K=b?n.find(S=>S.label.trim().toLowerCase()===b.toLowerCase()):void 0;b&&(K?o(K):(B(),c()))}E(),y(!0)},j=b=>{o(b),E(),A||xe(crypto.randomUUID().toString()),y(!0),se(!1)},U=b=>{g||j(b)};m.useEffect(()=>{!A&&a.length===0&&se(!1)},[a,A]),m.useEffect(()=>{if(!A)return;const b=K=>{w.current&&!w.current.contains(K.target)&&se(!1)};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[A]);const z=m.useMemo(()=>A?Te?qa(n):Kn(n,a):qa(n),[n,a,A,Te]),X=()=>z.length>0?z.map((b,K)=>{const ne=b.label===a?` ${Y.class}__option--selected`:"";return u.jsx("button",{className:`${Y.class}__option ${Y.class}__option--${r}${ne}`,"data-testid":`ds-option-${b.id??b.label}`,onClick:()=>U(b),onMouseDown:Ve=>Ve.preventDefault(),type:"button",children:b.label},K)}):u.jsx("div",{className:`${Y.class}__option ${Y.class}__option--not-found--${r}`,children:f},"no_option");return u.jsxs("div",{className:`${Y.class}__container`,ref:w,children:[u.jsx(Ye,{animated:_,autoFocus:v,className:`${Y.class}__input`,disabled:g,feedback:ae,hasFeedback:M,label:t,mask:te,max:F,min:h,name:e,noMargin:H,onBlurHandler:I,onChangeHandler:P,onFocusHandler:L,onKeyDownHandler:ie,placeholder:D,size:r,status:k,testId:s,tooltip:x,tooltipPlacement:V,tooltipPosition:W,type:T,value:a},ue),(d||$)&&($?u.jsx("div",{className:`${Y.class}__loading ${Y.class}__loading--${r}`,style:{width:"18px"},children:u.jsx(bt,{fullscreen:!1})}):d&&u.jsx(Z,{className:`${Y.class}__icon ${Y.class}__icon--${r}`,image:d})),we&&u.jsx("div",{className:`${Y.class}__list ${Y.class}__list--${r}`,"data-testid":"ds-list",children:X()})]})};Ua.displayName="DsEditableSelect";const Qe={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},Rn=({length:t,current:e=Qe.props.current.default})=>{const[s,a]=m.useState(e),n=i=>i<s?`${Qe.class}__step--older`:i===s?`${Qe.class}__step--active`:"";m.useEffect(()=>{a(e)},[e]);const r=[];for(let i=0;i<t;i++)r.push(u.jsx("div",{className:`${Qe.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return u.jsx("div",{className:Qe.class,children:r})},za={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:()=>{}}}},Ws=({name:t,value:e,prefix:s,sufix:a,min:n,max:r,onChangeHandler:i})=>{const o=m.useRef(null),[c,d]=m.useState(!1),[f,g]=m.useState("");m.useEffect(()=>{g(e??"")},[e]);const k=v=>{v.key==="Enter"&&E(v)};function E(v){d(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(v.currentTarget.value=n,g(n)):r&&parseInt(r)<parseInt(f)?(v.currentTarget.value=r,g(r)):v.currentTarget.value=f,i(v))}const C=v=>{g(v.currentTarget.value)},_=async()=>{var v;await d(!0),(v=o.current)==null||v.focus()};return u.jsx("div",{className:za.class,children:c?u.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:r,min:n,name:t,onBlur:E,onChange:C,onKeyDown:k,ref:o,type:"number",value:f}):u.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:_,children:u.jsxs(Me,{alignItems:"center",gap:"nano",children:[u.jsx(oe,{children:u.jsx(Ne,{children:u.jsxs("b",{children:[s,e,a]})})}),u.jsx(oe,{children:u.jsx(Z,{image:"edit_square"})})]})})})};Ws.propTypes={value:l.string},Ws.displayName="DsInlineEditable";var Ha=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Ha||{}),Xs=(t=>(t.Squared="squared",t.Rounded="rounded",t))(Xs||{});const Se={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:"rounded",options:Object.values(Xs)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},Ys=({className:t,title:e,content:s,cancelBtnText:a=Se.props.cancelBtnText.default,confirmBtnText:n=Se.props.confirmBtnText.default,variant:r=Se.props.variant.default,elevation:i,isModalOpen:o=Se.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:f,...g})=>{const k=r&&Se.props.variant.options.find(v=>v===r)?`${Se.class}--${r}`:`${Se.class}--${Se.props.variant.default}`,E=i&&`${Se.class}--elevation-${i}`,C=f||d,_=m.useCallback(v=>{v.keyCode===27&&c()},[c]);return m.useEffect(()=>(o&&window&&!C&&window.addEventListener("keyup",_),()=>{window.removeEventListener("keyup",_)}),[C,_]),o?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...g,onClick:()=>C?()=>{}:c()}),u.jsxs("div",{className:[Se.class,k,E,t].filter(v=>v).join(" "),"data-testid":"ds-modal",children:[!C&&u.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:u.jsx(Z,{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(ke,{vertical:"xxxs"}),u.jsx("div",{className:"ds-modal__content__content",children:s})]}),C&&u.jsx(ke,{vertical:"sm"}),!C&&u.jsx(ke,{vertical:"xxs"}),u.jsxs("div",{className:"ds-modal__cta",children:[d&&u.jsx(et,{onClick:()=>{c(),d()},children:a}),f&&u.jsx(et,{onClick:()=>{c(),f()},children:n})]})]})]}):null};Ys.propTypes={firstButtonText:l.string,confirmBtnText:l.string,cancelBtnText:l.string,variant:l.oneOf(Se.props.variant.options),elevation:l.oneOf(Se.props.elevation.options),isModalOpen:l.bool,title:l.node,content:l.node},Ys.displayName="DsModal";var Ks=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(Ks||{}),Rs=(t=>(t.Rounded="rounded",t.Squared="squared",t))(Rs||{});const fe={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:"info",options:Object.values(Ks)},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:"rounded",options:Object.values(Rs)},progressBar:{type:Boolean,default:!0},testId:{type:String,default:"ds-notification"}}};var Wa=(t=>(t.success="check",t.danger="error",t.warning="warning",t.info="info",t))(Wa||{});const Gs=({className:t,type:e=fe.props.type.default,variant:s=fe.props.variant.default,id:a,children:n,message:r,autoClose:i=fe.props.autoClose.default,autoCloseTimer:o=fe.props.autoCloseTimer.default,dismissible:c=fe.props.dismissible.default,elevation:d,progressBar:f=fe.props.progressBar.default,handleClose:g,testId:k=fe.props.testId.default})=>{const[E,C]=m.useState(o),[_,v]=m.useState(!1),[D,$]=m.useState(!0),A=[fe.class,e&&`${fe.class}--${e}`,s&&`${fe.class}--${s}`,d&&`${fe.class}--elevation-${d}`,t].join(" "),T=()=>C(W=>(W===0&&$(!1),W-100));m.useEffect(()=>{!i&&!c&&$(!0);let W;return!_&&i&&(W=setInterval(T,100)),()=>{clearInterval(W)}},[_,i,o,D,c]);const h=()=>{v(!0)},F=()=>{v(!1)},x=W=>{$(!1),g&&g(W)};return D?u.jsxs("div",{className:A,"data-testid":k,id:a,onMouseEnter:h,onMouseLeave:F,children:[u.jsx(Re,{bottom:"nano",top:"nano",children:u.jsxs(Me,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[u.jsx(oe,{children:u.jsx(Z,{color:e,fill:!0,image:Wa[e]})}),u.jsx(oe,{flex:"1",children:u.jsx(Re,{left:"none",right:"none",space:"nano",children:n??r})}),u.jsx(oe,{children:c?u.jsx("div",{className:`${fe.class}__button`,"data-testid":`${k}-close`,onClick:W=>x(W),children:u.jsx(Re,{children:u.jsx(Z,{image:"close"})})}):u.jsx(ke,{horizontal:"quark"})})]})}),f&&i&&u.jsx("div",{className:`${fe.class}__progress-bar ${fe.class}__progress-bar--${e}`,"data-testid":`${k}-progress-bar`,style:{width:`${E/o*100}%`}})]}):null};Gs.displayName="DsNotification";const Ot={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:"},testId:{type:String,default:"ds-password-confirmation"}}},It={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},Qs=({onChange:t,validationList:e=Ot.props.validationList.default,instructionLabel:s=Ot.props.instructionLabel.default,testId:a=Ot.props.testId.default})=>{const[n,r]=m.useState(""),[i,o]=m.useState(""),[c,d]=m.useState([]),[f,g]=m.useState({score:0,color:"danger",label:"Fraco"}),[k,E]=m.useState(!1),C=m.useCallback(h=>{const F=e.map(x=>x==null?void 0:x.rule(h));return d(F),F},[e]),_=m.useCallback(h=>{r(h.currentTarget.value);const F=C(h.currentTarget.value),x=A(F);t({password:h.currentTarget.value,confirmationPassword:i,isEqual:i===h.currentTarget.value,feedback:x})},[i,t,C]),v=m.useCallback(h=>{o(h.currentTarget.value);const F=C(n),x=A(F);t({password:n,confirmationPassword:h.currentTarget.value,isEqual:n===h.currentTarget.value,feedback:x})},[n,t,C]),D=m.useMemo(()=>n!==i&&k?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[n,i,k]),$=m.useCallback(h=>{const F={score:h,color:"danger",label:It.weak};return h>30&&h<75?(F.color="warning",F.label=It.medium):h>=75&&h<100?(F.color="success",F.label=It.good):h===100&&(F.color="success-dark",F.label=It.strong),F},[]),A=m.useCallback(h=>{const F=h.reduce((W,V)=>{let ae=W;return V?(ae++,ae):W},0),x=$(F*100/h.length);return g(x),x},[$]),T=()=>u.jsx("ul",{children:e.map((h,F)=>{const x=c[F]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return u.jsxs("li",{className:x,children:[c[F]?u.jsx(Z,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,u.jsx(ke,{horizontal:"quark"}),u.jsx(Ne,{children:h.title})]},F+h.title)})});return u.jsxs(Me,{className:"ds-password-confirmation",flexDirection:"column",children:[u.jsx(oe,{children:u.jsx(Ye,{label:"Senha",name:"password",onChangeHandler:_,testId:`${a}-main-input`,type:"password",value:n})}),u.jsx(oe,{children:u.jsx(Ds,{color:f==null?void 0:f.color,label:f==null?void 0:f.label,progress:f==null?void 0:f.score})}),u.jsx(oe,{children:u.jsx(Ne,{children:s})}),u.jsx(oe,{children:T()}),u.jsx(ke,{vertical:"xxs"}),u.jsx(oe,{children:u.jsx(Ye,{feedback:D.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>E(!0),onChangeHandler:v,onFocusHandler:()=>E(!0),status:D.status,testId:`${a}-confirm-input`,type:"password",value:i})})]})};Qs.propTypes={onChange:l.func,validationList:l.array,instructionLabel:l.string,testId:l.string},Qs.displayName="DsPasswordConfirmation";const Ce={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},Xa=({steps:t,selectedStep:e=Ce.props.selectedStep.default,onChange:s})=>{const[a,n]=m.useState(e),r=(i,o)=>{const c=[`${Ce.class}__button`];return o!==i&&c.push(`${Ce.class}__button--round`),t[i]&&t[i].disabled&&c.push(`${Ce.class}__button--disabled`),c.join(" ")};return m.useEffect(()=>{n(e)},[e]),m.useEffect(()=>{s(a)},[a]),u.jsxs("div",{className:Ce.class,children:[u.jsxs("span",{className:`${Ce.class}__step-counter`,children:["Etapa ",a+1," de ",t==null?void 0:t.length]}),u.jsx("div",{className:`${Ce.class}__step`,children:t.map((i,o)=>u.jsx("div",{className:`${Ce.class}__content`,children:u.jsx("button",{className:r(o,a),"data-testid":`ds-button-${o}`,disabled:i.disabled,onClick:()=>n(o),children:u.jsxs("span",{className:`${Ce.class}__text`,children:[a===o?u.jsx(Re,{bottom:"none",left:"nano",right:"nano",top:"none",children:u.jsx(Z,{className:`${Ce.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`})}):u.jsx(Z,{className:`${Ce.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${o}`}),a===o&&i.label]})})},`${i.name}-${i.label}`))})]})};Xa.displayName="DsStepper";const De={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},Ya=({item:t,columns:e})=>u.jsx("tr",{className:`${De.class}__row`,children:e.map((s,a)=>{const n=s.align&&`${De.class}__cell--align-${s.align}`;return u.jsx("td",{children:u.jsx("div",{className:[`${De.class}__cell`,n,s.className].filter(r=>r).join(" "),children:t&&t[`${s.name}`]})},a)})});Ya.displayName="DsTableRow";const Ka=({columns:t,data:e,className:s})=>u.jsx("div",{className:`${De.class}__wrapper`,children:u.jsxs("table",{className:[`${De.class}`,s].filter(a=>a).join(" "),children:[u.jsx("thead",{className:`${De.class}__head`,children:u.jsx("tr",{className:`${De.class}__row`,children:t==null?void 0:t.map((a,n)=>u.jsx("th",{style:{width:a.size},children:u.jsx("div",{className:[`${De.class}__cell`,a.align&&`${De.class}__cell--align-${a.align}`].filter(r=>r).join(" "),children:a.label})},n))})}),u.jsx("tbody",{className:`${De.class}__body`,children:e&&e.map((a,n)=>u.jsx(Ya,{columns:t,item:a},n))})]})});Ka.displayName="DsTable";var Zs=(t=>(t.None="",t.Primary="primary",t.Secondary="secondary",t.Neutral="neutral",t.Success="success",t.Warning="warning",t.Danger="danger",t.Info="info",t))(Zs||{}),Ze=(t=>(t.Segmented="segmented",t.Navigation="navigation",t))(Ze||{});const he={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:"primary",options:Object.values(Zs)},variant:{type:String,default:"segmented",options:Object.values(Ze)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},Gn=({active:t,className:e,color:s,disabled:a,index:n,name:r,title:i,onClick:o,variant:c,tabDomId:d,panelDomId:f,hasPanel:g,tabDataTestId:k})=>{const E=[`${he.class}__tab`,s&&`${he.class}__tab-color--${s}`,t&&`${he.class}__tab--active`,a&&`${he.class}__tab--disabled`,e].filter(Boolean).join(" "),C=()=>{a||o==null||o(n)},_=v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),C())};return c===Ze.Navigation?u.jsx("button",{"aria-controls":g?f:void 0,"aria-selected":t,className:E,"data-testid":k??`ds-tab-${n}`,disabled:a,id:d,onClick:C,role:"tab",type:"button",children:i}):u.jsx("div",{"aria-disabled":a,"aria-selected":t,className:E,"data-testid":k??`ds-tab-${n}`,id:r,onClick:C,onKeyDown:_,role:"tab",tabIndex:a?-1:0,children:i})};function Js(t,e){if(t.length===0)return 0;const s=t[e];if(s&&!s.hidden)return e;const a=t.findIndex(n=>!n.hidden);return a>=0?a:0}const Qn=({tabs:t,color:e,selectedTab:s=he.props.selectedTab.default,className:a,variant:n=he.props.variant.default,onChange:r,"aria-label":i,"aria-labelledby":o,rootDataTestId:c})=>{const[d,f]=m.useState(()=>Js(t,s));m.useEffect(()=>{f(Js(t,s))},[s,t]),m.useEffect(()=>{if(t.length===0)return;const v=t[d];(!v||v.hidden)&&f(Js(t,d))},[t,d]);const g=m.useMemo(()=>t.map((v,D)=>({tab:v,index:D})).filter(({tab:v})=>!v.hidden),[t]),k=v=>{f(v),r==null||r(v)},E=[he.class,n===Ze.Navigation&&`${he.class}--navigation`,a].filter(Boolean).join(" "),C=n===Ze.Navigation,_=t[d];return u.jsxs("div",{"aria-label":i,"aria-labelledby":o,className:E,"data-testid":c??"ds-tabs",children:[u.jsx("div",{className:`${he.class}__header`,role:C?"tablist":void 0,children:g.map(({tab:v,index:D})=>{const $=`${he.class}-tab-${v.name??D}`,A=`${he.class}-panel-${v.name??D}`,T=v.content!==void 0;return u.jsx(Gn,{...v,active:d===D,color:e,hasPanel:T,index:D,onClick:()=>k(D),panelDomId:T?A:void 0,tabDomId:$,variant:n},$)})}),C?g.map(({tab:v,index:D})=>{if(v.content===void 0)return null;const $=`${he.class}-panel-${v.name??D}`,A=`${he.class}-tab-${v.name??D}`,T=d===D;return u.jsx("div",{"aria-labelledby":A,className:`${he.class}__panel`,"data-testid":v.panelDataTestId??`ds-tabs-panel-${v.name??D}`,hidden:!T,id:$,role:"tabpanel",tabIndex:T?0:-1,children:v.content},$)}):u.jsx("div",{className:`${he.class}__content`,children:_?_.content:null})]})};function Ra({library:t,children:e,theme:s}){return u.jsx("div",{"data-library":t,"data-theme":s,children:u.jsx("div",{className:"ds-theme",children:e})})}Ra.propTypes={library:l.string,children:l.node.isRequired,theme:l.string};var ea=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(ea||{});const qe={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:"top-right",options:Object.values(ea)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},ta=({className:t=qe.props.className.default,position:e=qe.props.position.default,fluid:s=qe.props.fluid.default,notifications:a,removeNotification:n})=>{const r=[qe.class,`${qe.class}--${e}`,s&&`${qe.class}--fluid`,t].join(" "),i=o=>{n&&n(o)};return u.jsx("div",{className:r,"data-testid":"ds-notification-list",children:a.map(o=>{const c=o.autoClose??!0,d=o.autoCloseTimer??4e3,f=o.dismissible??!0,g=o.elevation??2,k=o.progressBar??!0;return u.jsx(Gs,{autoClose:c,autoCloseTimer:d,dismissible:f,elevation:g,handleClose:()=>i(o.id),id:o.id,message:o.message,progressBar:k,type:o.type},o.id)})})};ta.propTypes={position:l.oneOf(qe.props.position.options),fluid:l.bool,notifications:l.array,removeNotification:l.func},ta.displayName="DsNotificationList";const rt={class:"ds-split-layout"},Ga=({leftContent:t,rightContent:e,leftBackgroundColor:s,rightBackgroundColor:a,reverseOnMobile:n=!1})=>{const r=s?`bg-color__${s}`:"",i=a?`bg-color__${a}`:"",o=n?`${rt.class}__content--mobile-order-2`:"",c=n?`${rt.class}__content--mobile-order-1`:"",d=`${rt.class}__content ${r} ${o}`,f=`${rt.class}__content ${i} ${c}`;return u.jsxs("div",{className:rt.class,children:[u.jsx("div",{className:d,children:t}),u.jsx("div",{className:f,children:e})]})};Ga.displayName="DsSplitLayout";const it={name:"TwoColumns",class:"ds-two-columns",props:{}},sa=({header:t,main:e,sidebar:s,breadcrumb:a})=>u.jsxs(At,{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:a})}),u.jsxs("div",{className:`${it.class}__content ds-grid__row`,children:[u.jsxs("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:[u.jsx("div",{className:`${it.class}__header`,children:t}),u.jsx("div",{className:`${it.class}__main`,children:e})]}),u.jsx("div",{className:`${it.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:s})]})]}),u.jsx(ke,{vertical:"sm"})]});sa.propTypes={breadcrumb:l.node,header:l.node,main:l.node,sidebar:l.node},sa.displayName="DsTwoColumns",p.ButtonColor=zt,p.ButtonElevation=ya,p.ButtonIconPosition=Xt,p.ButtonSize=Wt,p.ButtonVariant=Ht,p.CardColor=pt,p.CardElevation=ka,p.CardSize=Zt,p.ChipColor=ts,p.ChipIconPosition=tt,p.ChipVariant=ss,p.DsAccordion=zs,p.DsAccordionItem=Ft,p.DsActiveTags=ja,p.DsButton=et,p.DsCaption=Qt,p.DsCard=Jt,p.DsCarousel=Pa,p.DsCheckbox=es,p.DsChip=Dn,p.DsContainer=At,p.DsEditableSelect=Ua,p.DsFlexElement=oe,p.DsFlexLayout=Me,p.DsGridElement=La,p.DsGridLayout=Us,p.DsHR=is,p.DsHeading=ht,p.DsIcon=Z,p.DsIndicator=Rn,p.DsInlineEditable=Ws,p.DsInput=Ye,p.DsLoading=bt,p.DsModal=Ys,p.DsNotification=Gs,p.DsNotificationList=ta,p.DsOption=_s,p.DsParagraph=Ne,p.DsPasswordConfirmation=Qs,p.DsProgress=Ds,p.DsRadio=xa,p.DsSegmentControl=Ba,p.DsSelect=Bs,p.DsSpacer=ke,p.DsSplitLayout=Ga,p.DsStepper=Xa,p.DsSubtitle=$a,p.DsTable=Ka,p.DsTabs=Qn,p.DsTextArea=Ps,p.DsTooltip=ze,p.DsTwoColumns=sa,p.DsWrapper=Re,p.EditableSelectSize=Hs,p.FlexLayoutAlignItems=Es,p.FlexLayoutDirection=Cs,p.FlexLayoutGap=As,p.FlexLayoutJustifyContent=Ss,p.FlexLayoutWrap=ws,p.GridLayoutAlign=Dt,p.GridLayoutGap=qs,p.HRBorderStyle=ns,p.HRSize=rs,p.HeadingType=as,p.IconColor=Yt,p.IconSize=Rt,p.IconVariation=Kt,p.IconWeight=Gt,p.InputSize=ds,p.InputStatus=ps,p.InputTooltipPlacement=hs,p.InputTooltipPosition=fs,p.InputType=cs,p.LoadingBackgroundColor=ys,p.LoadingSize=vs,p.ModalElevation=Ha,p.ModalVariant=Xs,p.NotificationListPosition=ea,p.NotificationType=Ks,p.NotificationVariant=Rs,p.ParagraphType=ks,p.ProgressColor=bs,p.RadioVariant=Ts,p.SegmentControlSize=Fs,p.SelectSize=Os,p.SelectStatus=Is,p.SelectTooltipPlacement=Ns,p.SelectTooltipPosition=xs,p.SpacerSize=Ct,p.SubtitleType=$s,p.TabsColor=Zs,p.TabsVariant=Ze,p.TextAreaResize=js,p.TextAreaSize=Ms,p.TextAreaStatus=Ls,p.TextAreaType=Vs,p.ThemeProvider=Ra,p.TooltipPlacement=ms,p.TooltipPosition=gs,p.WrapperSpace=He,p.accordionConfig=Tt,p.accordionItemConfig=We,p.activeTagsConfig=Yn,p.buttonConfig=Q,p.captionConfig=_a,p.cardConfig=me,p.carouselConfig=Ge,p.checkboxConfig=ce,p.chipConfig=Fe,p.containerConfig=nt,p.editableSelectConfig=Y,p.flexElementConfig=Et,p.flexLayoutConfig=Pe,p.gridElementConfig=Xn,p.gridLayoutConfig=re,p.headingConfig=Xe,p.horizontalRuleConfig=Le,p.iconConfig=ge,p.indicatorConfig=Qe,p.inlineEditableConfig=za,p.inputConfig=J,p.loadingConfig=ve,p.modalConfig=Se,p.notificationConfig=fe,p.notificationListConfig=qe,p.optionConfig=Ie,p.paragraphConfig=at,p.passwordConfirmationConfig=Ot,p.progressConfig=St,p.radioConfig=be,p.segmentControlConfig=ye,p.selectConfig=ee,p.spacerConfig=Ke,p.stepperConfig=Ce,p.subtitleConfig=wt,p.tableConfig=De,p.tabsConfig=he,p.textAreaConfig=le,p.tooltipConfig=Ae,p.twoColumnsConfig=it,p.wrapperConfig=Ee,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
19
+ */var Pt,ka;function Tn(){if(ka)return Pt;ka=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function a(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function n(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var i={},u=0;u<10;u++)i["_"+String.fromCharCode(u)]=u;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 Pt=n()?Object.assign:function(r,i){for(var u,c=a(r),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var g in u)e.call(u,g)&&(c[g]=u[g]);if(t){d=t(u);for(var S=0;S<d.length;S++)s.call(u,d[S])&&(c[d[S]]=u[d[S]])}}return c},Pt}var qt,ba;function zt(){if(ba)return qt;ba=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qt=t,qt}var Ut,Sa;function Ea(){return Sa||(Sa=1,Ut=Function.call.bind(Object.prototype.hasOwnProperty)),Ut}var Ht,Ca;function Fn(){if(Ca)return Ht;Ca=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=zt(),s={},a=Ea();t=function(r){var i="Warning: "+r;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function n(r,i,u,c,d){if(process.env.NODE_ENV!=="production"){for(var f in r)if(a(r,f)){var g;try{if(typeof r[f]!="function"){var S=Error((c||"React class")+": "+u+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}g=r[f](i,f,c,u,null,e)}catch(b){g=b}if(g&&!(g instanceof Error)&&t((c||"React class")+": type specification of "+u+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in s)){s[g.message]=!0;var k=d?d():"";t("Failed "+u+" type: "+g.message+(k??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(s={})},Ht=n,Ht}var Wt,wa;function In(){if(wa)return Wt;wa=1;var t=_a(),e=Tn(),s=zt(),a=Ea(),n=Fn(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(u){var c="Warning: "+u;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return Wt=function(u,c){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function g(v){var A=v&&(d&&v[d]||v[f]);if(typeof A=="function")return A}var S="<<anonymous>>",k={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:N(),arrayOf:w,element:F(),elementType:h(),instanceOf:T,node:se(),objectOf:U,oneOf:$,oneOfType:B,shape:H,exact:R};function b(v,A){return v===A?v!==0||1/v===1/A:v!==v&&A!==A}function _(v,A){this.message=v,this.data=A&&typeof A=="object"?A:{},this.stack=""}_.prototype=Error.prototype;function m(v){if(process.env.NODE_ENV!=="production")var A={},L=0;function j(O,P,z,W,X,E,K){if(W=W||S,E=E||z,K!==s){if(c){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var le=W+":"+z;!A[le]&&L<3&&(r("You are manually calling a React.PropTypes validation function for the `"+E+"` prop on `"+W+"`. 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."),A[le]=!0,L++)}}return P[z]==null?O?P[z]===null?new _("The "+X+" `"+E+"` is marked as required "+("in `"+W+"`, but its value is `null`.")):new _("The "+X+" `"+E+"` is marked as required in "+("`"+W+"`, but its value is `undefined`.")):null:v(P,z,W,X,E)}var x=j.bind(null,!1);return x.isRequired=j.bind(null,!0),x}function D(v){function A(L,j,x,O,P,z){var W=L[j],X=ee(W);if(X!==v){var E=ce(W);return new _("Invalid "+O+" `"+P+"` of type "+("`"+E+"` supplied to `"+x+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return m(A)}function N(){return m(i)}function w(v){function A(L,j,x,O,P){if(typeof v!="function")return new _("Property `"+P+"` of component `"+x+"` has invalid PropType notation inside arrayOf.");var z=L[j];if(!Array.isArray(z)){var W=ee(z);return new _("Invalid "+O+" `"+P+"` of type "+("`"+W+"` supplied to `"+x+"`, expected an array."))}for(var X=0;X<z.length;X++){var E=v(z,X,x,O,P+"["+X+"]",s);if(E instanceof Error)return E}return null}return m(A)}function F(){function v(A,L,j,x,O){var P=A[L];if(!u(P)){var z=ee(P);return new _("Invalid "+x+" `"+O+"` of type "+("`"+z+"` supplied to `"+j+"`, expected a single ReactElement."))}return null}return m(v)}function h(){function v(A,L,j,x,O){var P=A[L];if(!t.isValidElementType(P)){var z=ee(P);return new _("Invalid "+x+" `"+O+"` of type "+("`"+z+"` supplied to `"+j+"`, expected a single ReactElement type."))}return null}return m(v)}function T(v){function A(L,j,x,O,P){if(!(L[j]instanceof v)){var z=v.name||S,W=Ae(L[j]);return new _("Invalid "+O+" `"+P+"` of type "+("`"+W+"` supplied to `"+x+"`, expected ")+("instance of `"+z+"`."))}return null}return m(A)}function $(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("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])."):r("Invalid argument supplied to oneOf, expected an array.")),i;function A(L,j,x,O,P){for(var z=L[j],W=0;W<v.length;W++)if(b(z,v[W]))return null;var X=JSON.stringify(v,function(K,C){var le=ce(C);return le==="symbol"?String(C):C});return new _("Invalid "+O+" `"+P+"` of value `"+String(z)+"` "+("supplied to `"+x+"`, expected one of "+X+"."))}return m(A)}function U(v){function A(L,j,x,O,P){if(typeof v!="function")return new _("Property `"+P+"` of component `"+x+"` has invalid PropType notation inside objectOf.");var z=L[j],W=ee(z);if(W!=="object")return new _("Invalid "+O+" `"+P+"` of type "+("`"+W+"` supplied to `"+x+"`, expected an object."));for(var X in z)if(a(z,X)){var E=v(z,X,x,O,P+"."+X,s);if(E instanceof Error)return E}return null}return m(A)}function B(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var A=0;A<v.length;A++){var L=v[A];if(typeof L!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Fe(L)+" at index "+A+"."),i}function j(x,O,P,z,W){for(var X=[],E=0;E<v.length;E++){var K=v[E],C=K(x,O,P,z,W,s);if(C==null)return null;C.data&&a(C.data,"expectedType")&&X.push(C.data.expectedType)}var le=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new _("Invalid "+z+" `"+W+"` supplied to "+("`"+P+"`"+le+"."))}return m(j)}function se(){function v(A,L,j,x,O){return ie(A[L])?null:new _("Invalid "+x+" `"+O+"` supplied to "+("`"+j+"`, expected a ReactNode."))}return m(v)}function V(v,A,L,j,x){return new _((v||"React class")+": "+A+" type `"+L+"."+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+x+"`.")}function H(v){function A(L,j,x,O,P){var z=L[j],W=ee(z);if(W!=="object")return new _("Invalid "+O+" `"+P+"` of type `"+W+"` "+("supplied to `"+x+"`, expected `object`."));for(var X in v){var E=v[X];if(typeof E!="function")return V(x,O,P,X,ce(E));var K=E(z,X,x,O,P+"."+X,s);if(K)return K}return null}return m(A)}function R(v){function A(L,j,x,O,P){var z=L[j],W=ee(z);if(W!=="object")return new _("Invalid "+O+" `"+P+"` of type `"+W+"` "+("supplied to `"+x+"`, expected `object`."));var X=e({},L[j],v);for(var E in X){var K=v[E];if(a(v,E)&&typeof K!="function")return V(x,O,P,E,ce(K));if(!K)return new _("Invalid "+O+" `"+P+"` key `"+E+"` supplied to `"+x+"`.\nBad object: "+JSON.stringify(L[j],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(v),null," "));var C=K(z,E,x,O,P+"."+E,s);if(C)return C}return null}return m(A)}function ie(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(ie);if(v===null||u(v))return!0;var A=g(v);if(A){var L=A.call(v),j;if(A!==v.entries){for(;!(j=L.next()).done;)if(!ie(j.value))return!1}else for(;!(j=L.next()).done;){var x=j.value;if(x&&!ie(x[1]))return!1}}else return!1;return!0;default:return!1}}function be(v,A){return v==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function ee(v){var A=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":be(A,v)?"symbol":A}function ce(v){if(typeof v>"u"||v===null)return""+v;var A=ee(v);if(A==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return A}function Fe(v){var A=ce(v);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function Ae(v){return!v.constructor||!v.constructor.name?S:v.constructor.name}return k.checkPropTypes=n,k.resetWarningCache=n.resetWarningCache,k.PropTypes=k,k},Wt}var Xt,Aa;function On(){if(Aa)return Xt;Aa=1;var t=zt();function e(){}function s(){}return s.resetWarningCache=e,Xt=function(){function a(i,u,c,d,f,g){if(g!==t){var S=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 S.name="Invariant Violation",S}}a.isRequired=a;function n(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:n,element:a,elementType:a,instanceOf:n,node:a,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:s,resetWarningCache:e};return r.PropTypes=r,r},Xt}if(process.env.NODE_ENV!=="production"){var Nn=_a(),$n=!0;jt.exports=In()(Nn.isElement,$n)}else jt.exports=On()();var xn=jt.exports;const l=wn(xn);var Yt=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(Yt||{}),Kt=(t=>(t.Solid="solid",t.Outline="outline",t.Text="text",t))(Kt||{}),Gt=(t=>(t.Large="lg",t.Medium="md",t.Small="sm",t))(Gt||{}),Qt=(t=>(t.Right="right",t.Left="left",t))(Qt||{}),Da=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Da||{});const Z={name:"Button",class:"ds-button",props:{color:{type:String,default:"primary",options:Object.values(Yt)},variant:{type:String,default:"solid",options:Object.values(Kt)},size:{type:String,default:"md",options:Object.values(Gt)},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:"right",options:Object.values(Qt)},id:{type:String,default:""},testId:{type:String,default:"ds-button-test"},fullSize:{type:Boolean,default:!1}}};var Zt=(t=>(t.Primary="primary",t.PrimaryLightest="primary-lightest",t.PrimaryLighter="primary-lighter",t.PrimaryLight="primary-light",t.PrimaryDark="primary-dark",t.PrimaryDarker="primary-darker",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.Secondary="secondary",t.SecondaryLightest="secondary-lightest",t.SecondaryLighter="secondary-lighter",t.SecondaryLight="secondary-light",t.SecondaryDark="secondary-dark",t.SecondaryDarker="secondary-darker",t.Success="success",t.SuccessLighter="success-lighter",t.SuccessLight="success-light",t.SuccessDark="success-dark",t.Warning="warning",t.WarningLighter="warning-lighter",t.WarningLight="warning-light",t.WarningDark="warning-dark",t.Danger="danger",t.DangerLighter="danger-lighter",t.DangerLight="danger-light",t.DangerDark="danger-dark",t.Info="info",t.InfoLighter="info-lighter",t.InfoLight="info-light",t.InfoDark="info-dark",t))(Zt||{}),Jt=(t=>(t.Outlined="outlined",t.Rounded="rounded",t.Sharp="sharp",t))(Jt||{}),Rt=(t=>(t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t.Huge="huge",t))(Rt||{}),es=(t=>(t.Bold="bold",t.Semibold="semibold",t.Medium="medium",t.Regular="regular",t.Light="light",t.Extralight="extralight",t))(es||{});const ve={name:"Icon",class:"ds-icon",props:{color:{type:String,default:"neutral-90",options:Object.values(Zt)},image:{type:String,default:"settings"},variation:{type:String,default:"outlined",options:Object.values(Jt)},size:{type:String,default:"md",options:Object.values(Rt)},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:"semibold",options:Object.values(es)},onClick:{type:Function,default:()=>({})}}};var gt=(t=>(t["primary-darker"]="primary--darker",t["primary-dark"]="primary--dark",t["primary-light"]="primary--light",t["primary-lighter"]="primary--lighter",t["primary-lightest"]="primary--lightest",t["secondary-darker"]="secondary--darker",t["secondary-dark"]="secondary--dark",t["secondary-light"]="secondary--light",t["secondary-lighter"]="secondary--lighter",t["secondary-lightest"]="secondary--lightest",t["success-dark"]="success--dark",t["success-light"]="success--light",t["success-lighter"]="success--lighter",t["warning-dark"]="warning--dark",t["warning-light"]="warning--light",t["warning-lighter"]="warning--lighter",t["danger-dark"]="danger--dark",t["danger-light"]="danger--light",t["danger-lighter"]="danger--lighter",t["info-dark"]="info--dark",t["info-light"]="info--light",t["info-lighter"]="info--lighter",t))(gt||{});const Bn={bold:700,semibold:600,medium:500,regular:400,light:300,extralight:200},J=({image:t=ve.props.image.default,color:e=ve.props.color.default,className:s,size:a=ve.props.size.default,fill:n=ve.props.fill.default,weight:r=ve.props.weight.default,testId:i=ve.props.testId.default,onClick:u=ve.props.onClick.default})=>{const c="material-symbols-rounded",d=e&&ve.props.color.options.find(g=>g===e)&&`color__${gt[e]??e}`,f=y.useMemo(()=>({fontVariationSettings:`'FILL' ${n?1:0}, 'GRAD' 0,'wght' ${Bn[r]}, 'opsz' 48`}),[r,n]);return o.jsx("i",{className:[`${ve.class}--${a}`,ve.class,c,d,s].filter(g=>g).join(" "),"data-testid":i,onClick:u,style:f,translate:"no",children:t})};J.propTypes={color:l.oneOf(ve.props.color.options),image:l.string,fontVariationSettings:l.object,size:l.oneOf(ve.props.size.options),fill:l.bool,weight:l.oneOf(ve.props.weight.options),onClick:l.func},J.displayName="DsIcon";const st=({children:t,className:e,onClick:s,size:a=Z.props.size.default,disabled:n=Z.props.disabled.default,icon:r=Z.props.icon.default,id:i=Z.props.id.default,testId:u=Z.props.testId.default,elevation:c,variant:d=Z.props.variant.default,color:f=Z.props.color.default,iconFill:g=Z.props.iconFill.default,iconPosition:S=Z.props.iconPosition.default,fullSize:k=Z.props.fullSize.default,trackingData:b})=>{const _=a&&Z.props.size.options.find(U=>U===a)?`${Z.class}--${a}`:`${Z.class}__${Z.props.size.default}`,m=n&&`${Z.class}--disabled`,D=`${Z.class}__${f}--${d}`,N=c&&`${Z.class}--elevation-${c}`,w=r&&`${Z.class}--with-icon`,F=k?`${Z.class}--full-size`:"",h=S==="right"?`${Z.class}__icon`:`${Z.class}__icon--left`,T=S==="right"?`${Z.class}__text`:`${Z.class}__text--reversed`,$=U=>{var B,se,V,H;b&&Cn({elementType:Vt.Button,pagePath:((B=globalThis.window)==null?void 0:B.location.pathname)??"",pageTitle:((se=globalThis.document)==null?void 0:se.title)??"",pageUrl:((V=globalThis.window)==null?void 0:V.location.href)??"",pageReferrer:((H=globalThis.document)==null?void 0:H.referrer)??"",elementText:typeof t=="string"?t:void 0,...b}),s&&s(U)};return o.jsx("button",{className:[Z.class,F,m,_,D,N,w,e].filter(U=>U).join(" "),"data-testid":u,disabled:n,id:i,onClick:n?void 0:$,children:o.jsxs("span",{className:["ds-button__text",T].join(" "),children:[t,r&&o.jsx(J,{className:["ds-button__icon",h].join(" "),fill:g,image:r,size:a})]})})};st.propTypes={color:l.oneOf(Z.props.color.options),variant:l.oneOf(Z.props.variant.options),size:l.oneOf(Z.props.size.options),disabled:l.bool,icon:l.string,iconFill:l.bool,iconPosition:l.oneOf(Z.props.iconPosition.options),testId:l.string,id:l.string,fullSize:l.bool,trackingData:l.shape({elementName:l.string.isRequired,elementType:l.string,product:l.string.isRequired,productCategory:l.string.isRequired,squadId:l.string.isRequired,source:l.string.isRequired,handler:l.string.isRequired,businessFlow:l.string.isRequired})},st.displayName="DsButton";const Ta={name:"Caption",class:"ds-caption"},ts=({children:t,className:e,testId:s="ds-caption-test"})=>o.jsx("p",{className:[Ta.class,e].filter(a=>a).join(" "),"data-testid":s,children:t});ts.propTypes={children:l.node.isRequired,className:l.string,testId:l.string},ts.displayName="DsCaption";var mt=(t=>(t.None="",t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral70="neutral-70",t.Neutral60="neutral-60",t.Neutral50="neutral-50",t.Neutral40="neutral-40",t.Neutral30="neutral-30",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(mt||{}),ss=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t))(ss||{}),at=(t=>(t.None="none",t.Full="full",t.Side="side",t))(at||{}),as=(t=>(t.None="none",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t.Pill="pill",t))(as||{});const te={name:"Card",class:"ds-card",props:{backgroundColor:{type:String,default:"",options:Object.values(mt)},border:{type:String,default:"full",options:Object.values(at)},borderColor:{type:String,default:"neutral-30",options:Object.values(mt).filter(t=>t!=="")},size:{type:String,default:"xxxs",options:Object.values(ss)},radius:{type:String,default:"sm",options:Object.values(as)},id:{type:String,default:""},testId:{type:String,default:"ds-card"}}},ns=({id:t,testId:e=te.props.testId.default,children:s,className:a,backgroundColor:n=te.props.backgroundColor.default,border:r=te.props.border.default,borderColor:i=te.props.borderColor.default,size:u=te.props.size.default,radius:c=te.props.radius.default})=>{const d=r&&te.props.border.options.includes(r)?r:te.props.border.default,f=d!==at.None,g=d===at.Full?"":`${te.class}--border-${d}`,S=f?i&&te.props.borderColor.options.includes(i)?`${te.class}--border-color-${i}`:`${te.class}--border-color-${te.props.borderColor.default}`:"",k=n&&`bg-color__${gt[n]??n}`,b=u&&te.props.size.options.find(m=>m===u)?`${te.class}--${u}`:`${te.class}--${te.props.size.default}`,_=c&&te.props.radius.options.find(m=>m===c)?`${te.class}--radius-${c}`:`${te.class}--radius-${te.props.radius.default}`;return o.jsx("div",{className:[te.class,a,S,g,k,b,_].filter(m=>m).join(" "),"data-testid":e,id:t,children:s})};ns.propTypes={id:l.string,testId:l.string,backgroundColor:l.oneOf(te.props.backgroundColor.options),border:l.oneOf(te.props.border.options),borderColor:l.oneOf(te.props.borderColor.options),radius:l.oneOf(te.props.radius.options)},ns.displayName="DsCard";const he={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:()=>({})}}},rs=y.forwardRef(({id:t,className:e,name:s,testId:a=he.props.testId.default,label:n=he.props.label.default,description:r=he.props.description.default,checked:i=he.props.checked.default,disabled:u=he.props.disabled.default,changeByChecked:c=he.props.changeByChecked.default,onChangeHandler:d},f)=>{const g=c??!1,S=i??!1,[k,b]=y.useState(S),_={image:k?"check_box":"check_box_outline_blank",class:k?`${he.class}__icon--checked`:`${he.class}__icon--unchecked`},m=u&&`${he.class}--disabled`,D=N=>{u||(b(w=>!w),d&&d(N))};return y.useEffect(()=>{g&&b(i)},[i,g]),o.jsxs("label",{className:[he.class,m,e].join(" "),htmlFor:t||s,children:[o.jsx("input",{checked:k,className:`${he.class}__input`,"data-testid":a,disabled:u,id:t||s,name:s,onChange:D,ref:f,type:"checkbox"}),o.jsx(J,{className:`${he.class}__icon ${_.class}`,fill:!0,image:_.image,size:"xxl",testId:`${a}-icon`}),(r||n)&&o.jsxs("div",{className:`${he.class}__label`,children:[n&&o.jsx("label",{className:`${he.class}__label-title`,htmlFor:t||s,children:n}),r&&o.jsx("label",{className:`${he.class}__label-description`,htmlFor:t||s,children:r})]})]})});rs.propTypes={label:l.oneOfType([l.string,l.element]),name:l.string,className:l.string,testId:l.string,description:l.oneOfType([l.string,l.element]),checked:l.bool,disabled:l.bool},rs.displayName="DsCheckbox";var is=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Danger="danger",t.Warning="warning",t.Neutral="neutral",t))(is||{}),ls=(t=>(t.Solid="solid",t.Light="light",t))(ls||{}),nt=(t=>(t.Left="left",t.Right="right",t))(nt||{});const Ne={name:"DsChip",class:"ds-chip",props:{color:{type:String,default:"primary",options:Object.values(is)},variant:{type:String,default:"solid",options:Object.values(ls)},iconPosition:{type:String,default:"left",options:Object.values(nt)}}},Mn=({label:t,color:e=Ne.props.color.default,variant:s=Ne.props.variant.default,icon:a,iconPosition:n=Ne.props.iconPosition.default,className:r,title:i,testId:u="ds-chip"})=>{const c=[Ne.class,`${Ne.class}__${e}--${s}`,a&&`${Ne.class}--with-icon`,a&&`${Ne.class}--icon-${n}`,r].filter(Boolean).join(" "),d=a?o.jsx("span",{className:`${Ne.class}__icon`,"data-testid":`${u}-icon`,children:a}):null;return o.jsxs("span",{className:c,"data-testid":u,title:i,children:[n===nt.Left&&d,o.jsx("span",{className:`${Ne.class}__label`,children:t}),n===nt.Right&&d]})};var os=(t=>(t.Heading1="heading-1",t.Heading2="heading-2",t.Heading3="heading-3",t.Heading4="heading-4",t.Heading5="heading-5",t.Heading6="heading-6",t))(os||{});const Ge={name:"Heading",class:"ds-heading",props:{type:{type:String,default:"heading-1",options:Object.values(os)}}},yt=({children:t,testId:e="ds-heading-test",type:s=Ge.props.type.default,className:a})=>{const n={"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6"},r=s.replace("heading-",""),i=Ge.props.type.options.find(d=>d===s)&&`${Ge.class}--${r}`,c=n[s];return o.jsx(c,{className:[Ge.class,i,a].filter(d=>d).join(" "),"data-testid":e,children:t})};yt.propTypes={className:l.string,testId:l.string,type:l.oneOf(Ge.props.type.options)},yt.displayName="DsHeading";var us=(t=>(t.None="",t.Dashed="dashed",t.Dotted="dotted",t))(us||{}),cs=(t=>(t.None="",t.Small="small",t.Large="large",t))(cs||{});const Pe={name:"HR",class:"ds-hr",props:{borderStyle:{type:String,default:"",options:Object.values(us)},size:{type:String,default:"",options:Object.values(cs)}}};function Fa(t,e,s){const a=s.props[t];return a.options&&a.options.some(n=>n===e)?`${s.class}--${e}`:""}const ds=({size:t=Pe.props.size.default,borderStyle:e=Pe.props.borderStyle.default})=>{const s=Fa("size",t,Pe),a=Fa("borderStyle",e,Pe);return o.jsx("hr",{className:`${Pe.class} ${s} ${a}`.trim()})};ds.propTypes={size:l.oneOf(Pe.props.size.options),borderStyle:l.oneOf(Pe.props.borderStyle.options)},ds.displayName="DsHR";function qe(t){return typeof t=="string"||t instanceof String}function Ia(t){var e;return typeof t=="object"&&t!=null&&(t==null||(e=t.constructor)==null?void 0:e.name)==="Object"}function Oa(t,e){return Array.isArray(e)?Oa(t,(s,a)=>e.includes(a)):Object.entries(t).reduce((s,a)=>{let[n,r]=a;return e(r,n)&&(s[n]=r),s},{})}const I={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function Vn(t){switch(t){case I.LEFT:return I.FORCE_LEFT;case I.RIGHT:return I.FORCE_RIGHT;default:return t}}function ps(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function vt(t,e){if(e===t)return!0;const s=Array.isArray(e),a=Array.isArray(t);let n;if(s&&a){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}if(s!=a)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e instanceof Date,i=t instanceof Date;if(r&&i)return e.getTime()==t.getTime();if(r!=i)return!1;const u=e instanceof RegExp,c=t instanceof RegExp;if(u&&c)return e.toString()==t.toString();if(u!=c)return!1;const d=Object.keys(e);for(n=0;n<d.length;n++)if(!Object.prototype.hasOwnProperty.call(t,d[n]))return!1;for(n=0;n<d.length;n++)if(!vt(t[d[n]],e[d[n]]))return!1;return!0}else if(e&&t&&typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();return!1}class Ln{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?I.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?I.RIGHT:I.LEFT}}function M(t,e){return new M.InputMask(t,e)}function Na(t){if(t==null)throw new Error("mask property should be defined");return t instanceof RegExp?M.MaskedRegExp:qe(t)?M.MaskedPattern:t===Date?M.MaskedDate:t===Number?M.MaskedNumber:Array.isArray(t)||t===Array?M.MaskedDynamic:M.Masked&&t.prototype instanceof M.Masked?t:M.Masked&&t instanceof M.Masked?t.constructor:t instanceof Function?M.MaskedFunction:(console.warn("Mask not found for mask",t),M.Masked)}function rt(t){if(!t)throw new Error("Options in not defined");if(M.Masked){if(t.prototype instanceof M.Masked)return{mask:t};const{mask:e=void 0,...s}=t instanceof M.Masked?{mask:t}:Ia(t)&&t.mask instanceof M.Masked?t:{};if(e){const a=e.mask;return{...Oa(e,(n,r)=>!r.startsWith("_")),mask:e.constructor,_mask:a,...s}}}return Ia(t)?{...t}:{mask:t}}function Me(t){if(M.Masked&&t instanceof M.Masked)return t;const e=rt(t),s=Na(e.mask);if(!s)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===s&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new s(e)}M.createMask=Me;class hs{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,s){if(!(e==null||s==null||e===this.selectionStart&&s===this.selectionEnd))try{this._unsafeSelect(e,s)}catch{}}get isActive(){return!1}}M.MaskElement=hs;const $a=90,jn=89;class _t extends hs{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,s,a;return(e=(s=(a=this.input).getRootNode)==null?void 0:s.call(a))!=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===$a&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===jn&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===$a&&(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={}}}M.HTMLMaskElement=_t;class Pn extends _t{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,s){this.input.setSelectionRange(e,s)}get value(){return this.input.value}set value(e){this.input.value=e}}M.HTMLMaskElement=_t;class xa extends _t{get _unsafeSelectionStart(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a<n?a:n}get _unsafeSelectionEnd(){const e=this.rootElement,s=e.getSelection&&e.getSelection(),a=s&&s.anchorOffset,n=s&&s.focusOffset;return n==null||a==null||a>n?a:n}_unsafeSelect(e,s){if(!this.rootElement.createRange)return;const a=this.rootElement.createRange();a.setStart(this.input.firstChild||this.input,e),a.setEnd(this.input.lastChild||this.input,s);const n=this.rootElement,r=n.getSelection&&n.getSelection();r&&(r.removeAllRanges(),r.addRange(a))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}M.HTMLContenteditableMaskElement=xa;class kt{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>kt.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}}kt.MAX_LENGTH=100;class qn{constructor(e,s){this.el=e instanceof hs?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new xa(e):new Pn(e),this.masked=Me(s),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new kt,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.updateValue(),this._onChange()}maskEquals(e){var s;return e==null||((s=this.masked)==null?void 0:s.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof M.Masked)&&this.masked.constructor===Na(e)){this.masked.updateOptions({mask:e});return}const s=e instanceof M.Masked?e:Me({mask:e});s.unmaskedValue=this.masked.unmaskedValue,this.masked=s}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,s){const a=this._listeners[e];a&&a.forEach(n=>n(s))}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 s=this.masked.unmaskedValue,a=this.masked.value,n=this.masked.rawInputValue,r=this.displayValue,i=this.unmaskedValue!==s||this.value!==a||this._rawInputValue!==n;this._unmaskedValue=s,this._value=a,this._rawInputValue=n,this.el.value!==r&&(this.el.value=r),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),i&&this._fireChangeEvents(),!this._historyChanging&&(i||this.history.isEmpty)&&this.history.push({unmaskedValue:s,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:s,...a}=e,n=!this.maskEquals(s),r=this.masked.optionsIsChanged(a);n&&(this.mask=s),r&&this.masked.updateOptions(a),(n||r)&&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,I.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,s){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(s),this}off(e,s){if(!this._listeners[e])return this;if(!s)return delete this._listeners[e],this;const a=this._listeners[e].indexOf(s);return a>=0&&this._listeners[e].splice(a,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const s=new Ln({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),a=this.masked.rawInputValue,n=this.masked.splice(s.startChangePos,s.removed.length,s.inserted,s.removeDirection,{input:!0,raw:!0}).offset,r=a===this.masked.rawInputValue?s.removeDirection:I.NONE;let i=this.masked.nearestInputPos(s.startChangePos+n,r);r!==I.NONE&&(i=this.masked.nearestInputPos(i,I.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}}M.InputMask=qn;class q{static normalize(e){return Array.isArray(e)?e:[e,new q]}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}}M.ChangeDetails=q;class $e{constructor(e,s,a){e===void 0&&(e=""),s===void 0&&(s=0),this.value=e,this.from=s,this.stop=a}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 s=this.value[0];return this.value=this.value.slice(1),s}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class fe{constructor(e){this._value="",this._update({...fe.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,s){s===void 0&&(s={input:!0}),this.reset(),this.append(e,s,""),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,s){return e}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),Math.min(this.displayValue.length,s-e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this.displayValue.slice(e,s)}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new $e(this.extractInput(e,s),e)}appendTail(e){return qe(e)&&(e=new $e(String(e))),e.appendTo(this)}_appendCharRaw(e,s){return e?(this._value+=e,new q({inserted:e,rawInserted:e})):new q}_appendChar(e,s,a){s===void 0&&(s={});const n=this.state;let r;if([e,r]=this.doPrepareChar(e,s),e&&(r=r.aggregate(this._appendCharRaw(e,s)),!r.rawInserted&&this.autofix==="pad")){const i=this.state;this.state=n;let u=this.pad(s);const c=this._appendCharRaw(e,s);u=u.aggregate(c),c.rawInserted||u.equals(r)?r=u:this.state=i}if(r.inserted){let i,u=this.doValidate(s)!==!1;if(u&&a!=null){const c=this.state;if(this.overwrite===!0){i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.unshift(this.displayValue.length-r.tailShift)}let d=this.appendTail(a);if(u=d.rawInserted.length===a.toString().length,!(u&&d.inserted)&&this.overwrite==="shift"){this.state=c,i=a.state;for(let f=0;f<r.rawInserted.length;++f)a.shift();d=this.appendTail(a),u=d.rawInserted.length===a.toString().length}u&&d.inserted&&(this.state=c)}u||(r=new q,this.state=n,a&&i&&(a.state=i))}return r}_appendPlaceholder(){return new q}_appendEager(){return new q}append(e,s,a){if(!qe(e))throw new Error("value should be string");const n=qe(a)?new $e(String(a)):a;s!=null&&s.tail&&(s._beforeTailState=this.state);let r;[e,r]=this.doPrepare(e,s);for(let i=0;i<e.length;++i){const u=this._appendChar(e[i],s,n);if(!u.rawInserted&&!this.doSkipInvalid(e[i],s,n))break;r.aggregate(u)}return(this.eager===!0||this.eager==="append")&&s!=null&&s.input&&e&&r.aggregate(this._appendEager()),n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(s),new q}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const s=this.rawInputValue,a=this.value,n=e();return this.rawInputValue=s,this.value&&this.value!==a&&a.indexOf(this.value)===0&&(this.append(a.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,n}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const s=this.state,a=e(this);return this.state=s,delete this._isolated,a}doSkipInvalid(e,s,a){return!!this.skipInvalid}doPrepare(e,s){return s===void 0&&(s={}),q.normalize(this.prepare?this.prepare(e,this,s):e)}doPrepareChar(e,s){return s===void 0&&(s={}),q.normalize(this.prepareChar?this.prepareChar(e,this,s):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,s,a,n,r){a===void 0&&(a=""),n===void 0&&(n=I.NONE),r===void 0&&(r={input:!0});const i=e+s,u=this.extractTail(i),c=this.eager===!0||this.eager==="remove";let d;c&&(n=Vn(n),d=this.extractInput(0,i,{raw:!0}));let f=e;const g=new q;if(n!==I.NONE&&(f=this.nearestInputPos(e,s>1&&e!==0&&!c?I.NONE:n),g.tailShift=f-e),g.aggregate(this.remove(f)),c&&n!==I.NONE&&d===this.rawInputValue)if(n===I.FORCE_LEFT){let S;for(;d===this.rawInputValue&&(S=this.displayValue.length);)g.aggregate(new q({tailShift:-1})).aggregate(this.remove(S-1))}else n===I.FORCE_RIGHT&&u.unshift();return g.aggregate(this.append(a,r,u))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!vt(this,e)}typedValueEquals(e){const s=this.typedValue;return e===s||fe.EMPTY_VALUES.includes(e)&&fe.EMPTY_VALUES.includes(s)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new q}}fe.DEFAULTS={skipInvalid:!0},fe.EMPTY_VALUES=[void 0,null,""],M.Masked=fe;class He{constructor(e,s){e===void 0&&(e=[]),s===void 0&&(s=0),this.chunks=e,this.from=s}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=qe(e)?new $e(String(e)):e;const s=this.chunks[this.chunks.length-1],a=s&&(s.stop===e.stop||e.stop==null)&&e.from===s.from+s.toString().length;if(e instanceof $e)a?s.extend(e.toString()):this.chunks.push(e);else if(e instanceof He){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 M.MaskedPattern))return new $e(this.toString()).appendTo(e);const s=new q;for(let a=0;a<this.chunks.length;++a){const n=this.chunks[a],r=e._mapPosToBlock(e.displayValue.length),i=n.stop;let u;if(i!=null&&(!r||r.index<=i)&&((n instanceof He||e._stops.indexOf(i)>=0)&&s.aggregate(e._appendPlaceholder(i)),u=n instanceof He&&e._blocks[i]),u){const c=u.appendTail(n);s.aggregate(c);const d=n.toString().slice(c.rawInserted.length);d&&s.aggregate(e.append(d,{tail:!0}))}else s.aggregate(e.append(n.toString(),{tail:!0}))}return s}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:s,...a}=e;Object.assign(this,a),this.chunks=s.map(n=>{const r="chunks"in n?new He:new $e;return r.state=n,r})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const s=e!=null?e-this.from:e;let a=0;for(;a<this.chunks.length;){const n=this.chunks[a],r=n.unshift(s);if(n.toString()){if(!r)break;++a}else this.chunks.splice(a,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const s=this.chunks[e],a=s.shift();if(s.toString()){if(!a)break;--e}else this.chunks.splice(e,1);if(a)return a}return""}}class zn{constructor(e,s){this.masked=e,this._log=[];const{offset:a,index:n}=e._mapPosToBlock(s)||(s<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=a,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=((s=this.block)==null?void 0:s.displayValue.length)||0){var s;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,I.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,I.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,I.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,I.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,I.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,I.NONE),!0})}}class Ba{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,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(s),this._value||(this._isRawInput=!1),new q}nearestInputPos(e,s){s===void 0&&(s=I.NONE);const a=0,n=this._value.length;switch(s){case I.LEFT:case I.FORCE_LEFT:return a;case I.NONE:case I.RIGHT:case I.FORCE_RIGHT:default:return n}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),this._isRawInput?s-e:0}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this._value.length),a===void 0&&(a={}),a.raw&&this._isRawInput&&this._value.slice(e,s)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.eager===!0||this.eager==="append",r=this.char===e&&(this.isUnmasking||s.input||s.raw)&&(!s.raw||!a)&&!s.tail,i=new q({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(s.raw||s.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new q;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new $e("")}appendTail(e){return qe(e)&&(e=new $e(String(e))),e.appendTo(this)}append(e,s,a){const n=this._appendChar(e[0],s);return a!=null&&(n.tailShift+=this.appendTail(a).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 bt{constructor(e){const{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:u,...c}=e;this.masked=Me(c),Object.assign(this,{parent:s,isOptional:a,placeholderChar:n,displayChar:r,lazy:i,eager:u})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),e===0&&s>=1?(this.isFilled=!1,this.masked.remove(e,s)):new q}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,s){if(s===void 0&&(s={}),this.isFilled)return new q;const a=this.masked.state;let n=this.masked._appendChar(e,this.currentMaskFlags(s));return n.inserted&&this.doValidate(s)===!1&&(n=new q,this.masked.state=a),!n.inserted&&!this.isOptional&&!this.lazy&&!s.input&&(n.inserted=this.placeholderChar),n.skip=!n.inserted&&!this.isOptional,this.isFilled=!!n.inserted,n}append(e,s,a){return this.masked.append(e,this.currentMaskFlags(s),a)}_appendPlaceholder(){return this.isFilled||this.isOptional?new q:(this.isFilled=!0,new q({inserted:this.placeholderChar}))}_appendEager(){return new q}extractTail(e,s){return this.masked.extractTail(e,s)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.masked.extractInput(e,s,a)}nearestInputPos(e,s){s===void 0&&(s=I.NONE);const a=0,n=this.value.length,r=Math.min(Math.max(e,a),n);switch(s){case I.LEFT:case I.FORCE_LEFT:return this.isComplete?r:a;case I.RIGHT:case I.FORCE_RIGHT:return this.isComplete?r:n;case I.NONE:default:return r}}totalInputPositions(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.value.length),this.value.slice(e,s).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 s;return{...e,_beforeTailState:(e==null||(s=e._beforeTailState)==null?void 0:s.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new q}}bt.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 Un extends fe{updateOptions(e){super.updateOptions(e)}_update(e){const s=e.mask;s&&(e.validate=a=>a.search(s)>=0),super._update(e)}}M.MaskedRegExp=Un;class ge extends fe{constructor(e){super({...ge.DEFAULTS,...e,definitions:Object.assign({},bt.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 s=this.mask;if(!s||!e)return;let a=!1,n=!1;for(let r=0;r<s.length;++r){if(this.blocks){const d=s.slice(r),f=Object.keys(this.blocks).filter(S=>d.indexOf(S)===0);f.sort((S,k)=>k.length-S.length);const g=f[0];if(g){const{expose:S,repeat:k,...b}=rt(this.blocks[g]),_={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...b,repeat:k,parent:this},m=k!=null?new M.RepeatBlock(_):Me(_);m&&(this._blocks.push(m),S&&(this.exposeBlock=m),this._maskedBlocks[g]||(this._maskedBlocks[g]=[]),this._maskedBlocks[g].push(this._blocks.length-1)),r+=g.length-1;continue}}let i=s[r],u=i in e;if(i===ge.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(i==="{"||i==="}"){a=!a;continue}if(i==="["||i==="]"){n=!n;continue}if(i===ge.ESCAPE_CHAR){if(++r,i=s[r],!i)break;u=!1}const c=u?new bt({isOptional:n,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...rt(e[i]),parent:this}):new Ba({char:i,eager:this.eager,isUnmasking:a});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:s,...a}=e;this._blocks.forEach((n,r)=>n.state=s[r]),super.state=a}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,s)=>e+=s.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(s),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,s)=>e+=s.value,"")}set value(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(s),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const s=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(s),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,s)=>e+=s.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const s=new q;let a=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(a==null)return s;this._blocks[a].isFilled&&++a;for(let n=a;n<this._blocks.length;++n){const r=this._blocks[n]._appendEager();if(!r.inserted)break;s.aggregate(r)}return s}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._mapPosToBlock(this.displayValue.length),n=new q;if(!a)return n;for(let i=a.index,u;u=this._blocks[i];++i){var r;const c=u._appendChar(e,{...s,_beforeTailState:(r=s._beforeTailState)==null||(r=r._blocks)==null?void 0:r[i]});if(n.aggregate(c),c.consumed)break}return n}extractTail(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=new He;return e===s||this._forEachBlocksInRange(e,s,(n,r,i,u)=>{const c=n.extractTail(i,u);c.stop=this._findStopBefore(r),c.from=this._blockStartPos(r),c instanceof He&&(c.blockIndex=r),a.extend(c)}),a}extractInput(e,s,a){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),a===void 0&&(a={}),e===s)return"";let n="";return this._forEachBlocksInRange(e,s,(r,i,u,c)=>{n+=r.extractInput(u,c,a)}),n}_findStopBefore(e){let s;for(let a=0;a<this._stops.length;++a){const n=this._stops[a];if(n<=e)s=n;else break}return s}_appendPlaceholder(e){const s=new q;if(this.lazy&&e==null)return s;const a=this._mapPosToBlock(this.displayValue.length);if(!a)return s;const n=a.index,r=e??this._blocks.length;return this._blocks.slice(n,r).forEach(i=>{if(!i.lazy||e!=null){var u;s.aggregate(i._appendPlaceholder((u=i._blocks)==null?void 0:u.length))}}),s}_mapPosToBlock(e){let s="";for(let a=0;a<this._blocks.length;++a){const n=this._blocks[a],r=s.length;if(s+=n.displayValue,e<=s.length)return{index:a,offset:e-r}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((s,a)=>s+=a.displayValue.length,0)}_forEachBlocksInRange(e,s,a){s===void 0&&(s=this.displayValue.length);const n=this._mapPosToBlock(e);if(n){const r=this._mapPosToBlock(s),i=r&&n.index===r.index,u=n.offset,c=r&&i?r.offset:this._blocks[n.index].displayValue.length;if(a(this._blocks[n.index],n.index,u,c),r&&!i){for(let d=n.index+1;d<r.index;++d)a(this._blocks[d],d,0,this._blocks[d].displayValue.length);a(this._blocks[r.index],r.index,0,r.offset)}}}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._forEachBlocksInRange(e,s,(n,r,i,u)=>{a.aggregate(n.remove(i,u))}),a}nearestInputPos(e,s){if(s===void 0&&(s=I.NONE),!this._blocks.length)return 0;const a=new zn(this,e);if(s===I.NONE)return a.pushRightBeforeInput()||(a.popState(),a.pushLeftBeforeInput())?a.pos:this.displayValue.length;if(s===I.LEFT||s===I.FORCE_LEFT){if(s===I.LEFT){if(a.pushRightBeforeFilled(),a.ok&&a.pos===e)return e;a.popState()}if(a.pushLeftBeforeInput(),a.pushLeftBeforeRequired(),a.pushLeftBeforeFilled(),s===I.LEFT){if(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.ok&&a.pos<=e||(a.popState(),a.ok&&a.pos<=e))return a.pos;a.popState()}return a.ok?a.pos:s===I.FORCE_LEFT?0:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:0)}return s===I.RIGHT||s===I.FORCE_RIGHT?(a.pushRightBeforeInput(),a.pushRightBeforeRequired(),a.pushRightBeforeFilled()?a.pos:s===I.FORCE_RIGHT?this.displayValue.length:(a.popState(),a.ok||(a.popState(),a.ok)?a.pos:this.nearestInputPos(e,I.LEFT))):e}totalInputPositions(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);let a=0;return this._forEachBlocksInRange(e,s,(n,r,i,u)=>{a+=n.totalInputPositions(i,u)}),a}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const s=this._maskedBlocks[e];return s?s.map(a=>this._blocks[a]):[]}pad(e){const s=new q;return this._forEachBlocksInRange(0,this.displayValue.length,a=>s.aggregate(a.pad(e))),s}}ge.DEFAULTS={...fe.DEFAULTS,lazy:!0,placeholderChar:"_"},ge.STOP_CHAR="`",ge.ESCAPE_CHAR="\\",ge.InputDefinition=bt,ge.FixedDefinition=Ba,M.MaskedPattern=ge;class St extends ge{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:s=this.to||0,from:a=this.from||0,maxLength:n=this.maxLength||0,autofix:r=this.autofix,...i}=e;this.to=s,this.from=a,this.maxLength=Math.max(String(s).length,n),this.autofix=r;const u=String(this.from).padStart(this.maxLength,"0"),c=String(this.to).padStart(this.maxLength,"0");let d=0;for(;d<c.length&&c[d]===u[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 s="",a="";const[,n,r]=e.match(/^(\D*)(\d*)(\D*)/)||[];return r&&(s="0".repeat(n.length)+r,a="9".repeat(n.length)+r),s=s.padEnd(this.maxLength,"0"),a=a.padEnd(this.maxLength,"9"),[s,a]}doPrepareChar(e,s){s===void 0&&(s={});let a;return[e,a]=super.doPrepareChar(e.replace(/\D/g,""),s),e||(a.skip=!this.isComplete),[e,a]}_appendCharRaw(e,s){if(s===void 0&&(s={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,s);const a=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0"),[r,i]=this.boundaries(this.value+e);return Number(i)<this.from?super._appendCharRaw(a[this.value.length],s):Number(r)>this.to?!s.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(a[this.value.length],s).aggregate(this._appendCharRaw(e,s)):super._appendCharRaw(n[this.value.length],s):super._appendCharRaw(e,s)}doValidate(e){const s=this.value;if(s.search(/[^0]/)===-1&&s.length<=this._matchFrom)return!0;const[n,r]=this.boundaries(s);return this.from<=Number(r)&&Number(n)<=this.to&&super.doValidate(e)}pad(e){const s=new q;if(this.value.length===this.maxLength)return s;const a=this.value,n=this.maxLength-this.value.length;if(n){this.reset();for(let r=0;r<n;++r)s.aggregate(super._appendCharRaw("0",e));a.split("").forEach(r=>this._appendCharRaw(r))}return s}}M.MaskedRange=St;const Hn="d{.}`m{.}`Y";class Ve extends ge{static extractPatternOptions(e){const{mask:s,pattern:a,...n}=e;return{...n,mask:qe(s)?s:a}}constructor(e){super(Ve.extractPatternOptions({...Ve.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:s,pattern:a,blocks:n,...r}={...Ve.DEFAULTS,...e},i=Object.assign({},Ve.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({...r,mask:qe(s)?s:a,blocks:i})}doValidate(e){const s=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&s!=null&&(this.min==null||this.min<=s)&&(this.max==null||s<=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(Ve.extractPatternOptions(e))}}Ve.GET_DEFAULT_BLOCKS=()=>({d:{mask:St,from:1,to:31,maxLength:2},m:{mask:St,from:1,to:12,maxLength:2},Y:{mask:St,from:1900,to:9999}}),Ve.DEFAULTS={...ge.DEFAULTS,mask:Date,pattern:Hn,format:(t,e)=>{if(!t)return"";const s=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();return[s,a,n].join(".")},parse:(t,e)=>{const[s,a,n]=t.split(".").map(Number);return new Date(n,a-1,s)}},M.MaskedDate=Ve;class Et extends fe{constructor(e){super({...Et.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(s=>{const{expose:a,...n}=rt(s),r=Me({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return a&&(this.exposeMask=r),r}):[])}_appendCharRaw(e,s){s===void 0&&(s={});const a=this._applyDispatch(e,s);return this.currentMask&&a.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(s))),a}_applyDispatch(e,s,a){e===void 0&&(e=""),s===void 0&&(s={}),a===void 0&&(a="");const n=s.tail&&s._beforeTailState!=null?s._beforeTailState._value:this.value,r=this.rawInputValue,i=s.tail&&s._beforeTailState!=null?s._beforeTailState._rawInputValue:r,u=r.slice(i.length),c=this.currentMask,d=new q,f=c==null?void 0:c.state;return this.currentMask=this.doDispatch(e,{...s},a),this.currentMask&&(this.currentMask!==c?(this.currentMask.reset(),i&&(this.currentMask.append(i,{raw:!0}),d.tailShift=this.currentMask.value.length-n.length),u&&(d.tailShift+=this.currentMask.append(u,{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 s=new q;return e&&s.aggregate(this._applyDispatch("",{},e)),s.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var s,a;return{...e,_beforeTailState:((s=e._beforeTailState)==null?void 0:s.currentMaskRef)===this.currentMask&&((a=e._beforeTailState)==null?void 0:a.currentMask)||e._beforeTailState}}doDispatch(e,s,a){return s===void 0&&(s={}),a===void 0&&(a=""),this.dispatch(e,this,s,a)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,s){s===void 0&&(s={});let[a,n]=super.doPrepare(e,s);if(this.currentMask){let r;[a,r]=super.doPrepare(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}doPrepareChar(e,s){s===void 0&&(s={});let[a,n]=super.doPrepareChar(e,s);if(this.currentMask){let r;[a,r]=super.doPrepareChar(a,this.currentMaskFlags(s)),n=n.aggregate(r)}return[a,n]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(s=>s.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 s=String(e);this.currentMask&&(this.currentMask.typedValue=e,s=this.currentMask.unmaskedValue),this.unmaskedValue=s}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,s){const a=new q;return this.currentMask&&a.aggregate(this.currentMask.remove(e,s)).aggregate(this._applyDispatch()),a}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(s=>s.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:s,currentMaskRef:a,currentMask:n,...r}=e;s&&this.compiledMasks.forEach((i,u)=>i.state=s[u]),a!=null&&(this.currentMask=a,this.currentMask.state=n),super.state=r}extractInput(e,s,a){return this.currentMask?this.currentMask.extractInput(e,s,a):""}extractTail(e,s){return this.currentMask?this.currentMask.extractTail(e,s):super.extractTail(e,s)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,s){return this.currentMask?this.currentMask.nearestInputPos(e,s):super.nearestInputPos(e,s)}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((s,a)=>{if(!e[a])return;const{mask:n,...r}=e[a];return vt(s,r)&&s.maskEquals(n)}):super.maskEquals(e)}typedValueEquals(e){var s;return!!((s=this.currentMask)!=null&&s.typedValueEquals(e))}}Et.DEFAULTS={...fe.DEFAULTS,dispatch:(t,e,s,a)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,r=e.compiledMasks.map((i,u)=>{const c=e.currentMask===i,d=c?i.displayValue.length:i.nearestInputPos(i.displayValue.length,I.FORCE_LEFT);return i.rawInputValue!==n?(i.reset(),i.append(n,{raw:!0})):c||i.remove(d),i.append(t,e.currentMaskFlags(s)),i.appendTail(a),{index:u,weight:i.rawInputValue.length,totalInputPositions:i.totalInputPositions(0,Math.max(d,i.nearestInputPos(i.displayValue.length,I.FORCE_LEFT)))}});return r.sort((i,u)=>u.weight-i.weight||u.totalInputPositions-i.totalInputPositions),e.compiledMasks[r[0].index]}},M.MaskedDynamic=Et;class Ct extends ge{constructor(e){super({...Ct.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:s,...a}=e;if(s){const n=s.map(u=>u.length),r=Math.min(...n),i=Math.max(...n)-r;a.mask="*".repeat(r),i&&(a.mask+="["+"*".repeat(i)+"]"),this.enum=s}super._update(a)}_appendCharRaw(e,s){s===void 0&&(s={});const a=Math.min(this.nearestInputPos(0,I.FORCE_RIGHT),this.value.length),n=this.enum.filter(r=>this.matchValue(r,this.unmaskedValue+e,a));if(n.length){n.length===1&&this._forEachBlocksInRange(0,this.value.length,(i,u)=>{const c=n[0][u];u>=this.value.length||c===i.value||(i.reset(),i._appendChar(c,s))});const r=super._appendCharRaw(n[0][this.value.length],s);return n.length===1&&n[0].slice(this.unmaskedValue.length).split("").forEach(i=>r.aggregate(super._appendCharRaw(i))),r}return new q({skip:!this.isComplete})}extractTail(e,s){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),new $e("",e)}remove(e,s){if(e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),e===s)return new q;const a=Math.min(super.nearestInputPos(0,I.FORCE_RIGHT),this.value.length);let n;for(n=e;n>=0&&!(this.enum.filter(u=>this.matchValue(u,this.value.slice(a,n),a)).length>1);--n);const r=super.remove(n,s);return r.tailShift+=n-e,r}get isComplete(){return this.enum.indexOf(this.value)>=0}}Ct.DEFAULTS={...ge.DEFAULTS,matchValue:(t,e,s)=>t.indexOf(e,s)===s},M.MaskedEnum=Ct;class Wn extends fe{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}M.MaskedFunction=Wn;var Ma;class Se extends fe{constructor(e){super({...Se.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),s="\\d*",a=(this.scale?"("+ps(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+s+a),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(ps).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(ps(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const s=e.split(this.radix);return s[0]=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),s.join(this.radix)}doPrepareChar(e,s){s===void 0&&(s={});const[a,n]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(s.input&&s.raw||!s.input&&!s.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),s);return e&&!a&&(n.skip=!0),a&&!this.allowPositive&&!this.value&&a!=="-"&&n.aggregate(this._appendChar("-")),[a,n]}_separatorsCount(e,s){s===void 0&&(s=!1);let a=0;for(let n=0;n<e;++n)this._value.indexOf(this.thousandsSeparator,n)===n&&(++a,s&&(e+=this.thousandsSeparator.length));return a}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,s,a){return e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s),this._removeThousandsSeparators(super.extractInput(e,s,a))}_appendCharRaw(e,s){s===void 0&&(s={});const a=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,n=this._separatorsCountFromSlice(a);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=e;const i=this.number;let u=!isNaN(i),c=!1;if(u){let S;this.min!=null&&this.min<0&&this.number<this.min&&(S=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(S=this.max),S!=null&&(this.autofix?(this._value=this.format(S,this).replace(Se.UNMASKED_RADIX,this.radix),c||(c=r===this._value&&!s.tail)):u=!1),u&&(u=!!this._value.match(this._numberRegExp))}let d;u?d=new q({inserted:this._value.slice(r.length),rawInserted:c?"":e,skip:c}):(this._value=r,d=new q),this._value=this._insertThousandsSeparators(this._value);const f=s.tail&&s._beforeTailState?s._beforeTailState._value:this._value,g=this._separatorsCountFromSlice(f);return d.tailShift+=(g-n)*this.thousandsSeparator.length,d}_findSeparatorAround(e){if(this.thousandsSeparator){const s=e-this.thousandsSeparator.length+1,a=this.value.indexOf(this.thousandsSeparator,s);if(a<=e)return a}return-1}_adjustRangeWithSeparators(e,s){const a=this._findSeparatorAround(e);a>=0&&(e=a);const n=this._findSeparatorAround(s);return n>=0&&(s=n+this.thousandsSeparator.length),[e,s]}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length),[e,s]=this._adjustRangeWithSeparators(e,s);const a=this.value.slice(0,e),n=this.value.slice(s),r=this._separatorsCount(a.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(a+n));const i=this._separatorsCountFromSlice(a);return new q({tailShift:(i-r)*this.thousandsSeparator.length})}nearestInputPos(e,s){if(!this.thousandsSeparator)return e;switch(s){case I.NONE:case I.LEFT:case I.FORCE_LEFT:{const a=this._findSeparatorAround(e-1);if(a>=0){const n=a+this.thousandsSeparator.length;if(e<n||this.value.length<=n||s===I.FORCE_LEFT)return a}break}case I.RIGHT:case I.FORCE_RIGHT:{const a=this._findSeparatorAround(e);if(a>=0)return a+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let s=e;this.min!=null&&(s=Math.max(s,this.min)),this.max!=null&&(s=Math.min(s,this.max)),s!==e&&(this.unmaskedValue=this.format(s,this));let a=this.value;this.normalizeZeros&&(a=this._normalizeZeros(a)),this.padFractionalZeros&&this.scale>0&&(a=this._padFractionalZeros(a)),this._value=a}super.doCommit()}_normalizeZeros(e){const s=this._removeThousandsSeparators(e).split(this.radix);return s[0]=s[0].replace(/^(\D*)(0*)(\d*)/,(a,n,r,i)=>n+i),e.length&&!/\d$/.test(s[0])&&(s[0]=s[0]+"0"),s.length>1&&(s[1]=s[1].replace(/0*$/,""),s[1].length||(s.length=1)),this._insertThousandsSeparators(s.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const s=e.split(this.radix);return s.length<2&&s.push(""),s[1]=s[1].padEnd(this.scale,"0"),s.join(this.radix)}doSkipInvalid(e,s,a){s===void 0&&(s={});const n=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===Se.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,s,a)&&!n}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Se.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(Se.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)||Se.EMPTY_VALUES.includes(e)&&Se.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Ma=Se,Se.UNMASKED_RADIX=".",Se.EMPTY_VALUES=[...fe.EMPTY_VALUES,0],Se.DEFAULTS={...fe.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Ma.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})},M.MaskedNumber=Se;const fs={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Va(t,e,s){e===void 0&&(e=fs.MASKED),s===void 0&&(s=fs.MASKED);const a=Me(t);return n=>a.runIsolated(r=>(r[e]=n,r[s]))}function Xn(t,e,s,a){return Va(e,s,a)(t)}M.PIPE_TYPE=fs,M.createPipe=Va,M.pipe=Xn;class Yn extends ge{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 s,a,n;const{repeat:r,...i}=rt(e);this._blockOpts=Object.assign({},this._blockOpts,i);const u=Me(this._blockOpts);this.repeat=(s=(a=r??u.repeat)!=null?a:this.repeat)!=null?s: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:u},eager:u.eager,overwrite:u.overwrite,skipInvalid:u.skipInvalid,lazy:u.lazy,placeholderChar:u.placeholderChar,displayChar:u.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(Me(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,s){s===void 0&&(s={});const a=new q;for(let c=(n=(r=this._mapPosToBlock(this.displayValue.length))==null?void 0:r.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,r,i,u;const g=d._appendChar(e,{...s,_beforeTailState:(u=s._beforeTailState)==null||(u=u._blocks)==null?void 0:u[c]});if(g.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(a.aggregate(g),g.consumed)break}return a}_trimEmptyTail(e,s){var a,n;e===void 0&&(e=0);const r=Math.max(((a=this._mapPosToBlock(e))==null?void 0:a.index)||0,this.repeatFrom,0);let i;s!=null&&(i=(n=this._mapPosToBlock(s))==null?void 0:n.index),i==null&&(i=this._blocks.length-1);let u=0;for(let c=i;r<=c&&!this._blocks[c].unmaskedValue;--c,++u);u&&(this._blocks.splice(i-u+1,u),this.mask=this.mask.slice(u))}reset(){super.reset(),this._trimEmptyTail()}remove(e,s){e===void 0&&(e=0),s===void 0&&(s=this.displayValue.length);const a=super.remove(e,s);return this._trimEmptyTail(e,s),a}totalInputPositions(e,s){return e===void 0&&(e=0),s==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,s)}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}}M.RepeatBlock=Yn;try{globalThis.IMask=M}catch{}const La={mask:l.oneOfType([l.array,l.func,l.string,l.instanceOf(RegExp),l.oneOf([Date,Number,M.Masked]),l.instanceOf(M.Masked)]),value:l.any,unmask:l.oneOfType([l.bool,l.oneOf(["typed"])]),prepare:l.func,prepareChar:l.func,validate:l.func,commit:l.func,overwrite:l.oneOfType([l.bool,l.oneOf(["shift"])]),eager:l.oneOfType([l.bool,l.oneOf(["append","remove"])]),skipInvalid:l.bool,onAccept:l.func,onComplete:l.func,placeholderChar:l.string,displayChar:l.string,lazy:l.bool,definitions:l.object,blocks:l.object,enum:l.arrayOf(l.string),maxLength:l.number,from:l.number,to:l.number,pattern:l.string,format:l.func,parse:l.func,autofix:l.oneOfType([l.bool,l.oneOf(["pad"])]),radix:l.string,thousandsSeparator:l.string,mapToRadix:l.arrayOf(l.string),scale:l.number,normalizeZeros:l.bool,padFractionalZeros:l.bool,min:l.oneOfType([l.number,l.instanceOf(Date)]),max:l.oneOfType([l.number,l.instanceOf(Date)]),dispatch:l.func,inputRef:l.oneOfType([l.func,l.shape({current:l.object})])},ja=Object.keys(La).filter(t=>t!=="value"),Kn=["value","unmask","onAccept","onComplete","inputRef"],Gn=ja.filter(t=>Kn.indexOf(t)<0);function Qn(t){var e;const s=(e=class extends y.Component{constructor(r){super(r),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const r=this.props,i=this._extractMaskOptionsFromProps(r);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in r&&r.value!==void 0&&(this.maskValue=r.value)):this.initMask(i);else if(this.destroyMask(),"value"in r&&r.value!==void 0){var u;(u=this.element)!=null&&u.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=r.value:this.element.value=r.value}}componentWillUnmount(){this.destroyMask()}_inputRef(r){this.element=r,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=r:this.props.inputRef(r))}initMask(r){r===void 0&&(r=this._extractMaskOptionsFromProps(this.props)),this.maskRef=M(this.element,r).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(r){const{...i}=r;return Object.keys(i).filter(u=>Gn.indexOf(u)<0).forEach(u=>{delete i[u]}),i}_extractNonMaskProps(r){const{...i}=r;return ja.forEach(u=>{u!=="maxLength"&&delete i[u]}),"defaultValue"in i||(i.defaultValue=r.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(r){this.maskRef&&(r=r==null&&this.props.unmask!=="typed"?"":r,this.props.unmask==="typed"?this.maskRef.typedValue=r:this.props.unmask?this.maskRef.unmaskedValue=r:this.maskRef.value=r)}_onAccept(r){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,r)}_onComplete(r){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,r)}render(){return y.createElement(t,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),a=t.displayName||t.name||"Component";return s.displayName="IMask("+a+")",s.propTypes=La,y.forwardRef((n,r)=>y.createElement(s,{...n,ref:r}))}const Zn=Qn(t=>{let{inputRef:e,...s}=t;return y.createElement("input",{...s,ref:e})}),Jn=(t,e)=>y.createElement(Zn,{...t,ref:e});y.forwardRef(Jn);function Rn(t,e){let{onAccept:s,onComplete:a,ref:n=y.useRef(null),defaultValue:r,defaultUnmaskedValue:i,defaultTypedValue:u}=e===void 0?{}:e;const c=y.useRef(null),[d,f]=y.useState({}),[g,S]=y.useState(""),[k,b]=y.useState(""),[_,m]=y.useState(),D=y.useCallback(()=>{var h;(h=c.current)==null||h.destroy(),c.current=null},[]),N=y.useCallback(()=>{const h=c.current;h&&(f({value:h.value,unmaskedValue:h.unmaskedValue,typedValue:h.typedValue}),m(h.typedValue),b(h.unmaskedValue),S(h.value))},[]),w=y.useCallback(h=>{const T=c.current;T&&(N(),s==null||s(T.value,T,h))},[s]),F=y.useCallback(h=>c.current&&(a==null?void 0:a(c.current.value,c.current,h)),[a]);return y.useEffect(()=>{const{value:h,...T}=d,$=c.current;!$||g===void 0||(h!==g&&($.value=g,$.value!==g&&w()),f(T))},[g]),y.useEffect(()=>{const{unmaskedValue:h,...T}=d,$=c.current;!$||k===void 0||(h!==k&&($.unmaskedValue=k,$.unmaskedValue!==k&&w()),f(T))},[k]),y.useEffect(()=>{const{typedValue:h,...T}=d,$=c.current;!$||_===void 0||(h!==_&&($.typedValue=_,$.masked.typedValueEquals(_)||w()),f(T))},[_]),y.useEffect(()=>{const h=n.current;if(!h||!(t!=null&&t.mask))return D();const T=c.current;T?T==null||T.updateOptions(t):h&&t!=null&&t.mask&&(c.current=M(h,t),N(),r!==void 0&&S(r),i!==void 0&&b(i),u!==void 0&&m(u))},[t,D,w]),y.useEffect(()=>{if(!c.current)return;const h=c.current;return h.on("accept",w),h.on("complete",F),()=>{h.off("accept",w),h.off("complete",F)}},[w,F]),y.useEffect(()=>D,[D]),{ref:n,maskRef:c,value:g,setValue:S,unmaskedValue:k,setUnmaskedValue:b,typedValue:_,setTypedValue:m}}var gs=(t=>(t.Text="text",t.Password="password",t.Email="email",t.Date="date",t.Number="number",t))(gs||{}),ms=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(ms||{}),ys=(t=>(t.Default="",t.Error="error",t.Success="success",t))(ys||{}),vs=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(vs||{}),_s=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(_s||{});const ae={name:"Input",class:"ds-input",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-input-test"},type:{type:String,default:"text",options:Object.values(gs)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(ms)},label:{type:String,default:""},placeholder:{type:String,default:" "},value:{type:String,default:""},min:{type:String,default:""},max:{type:String,default:""},status:{type:String,default:"",options:Object.values(ys)},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:"center",options:Object.values(vs)},tooltipPosition:{type:String,default:"top",options:Object.values(_s)},mask:{type:String,default:""},onChangeHandler:{type:Function,default:()=>({})}}},Pa={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:"AA.AAA.AAA/AAAA-AA",definitions:{A:/[0-9A-Z]/},prepareChar:t=>t.toUpperCase(),startsWith:/[A-Z0-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]}};var ks=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(ks||{}),bs=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(bs||{});const Ie={name:"Tooltip",class:"ds-tooltip",props:{position:{type:String,default:"top",options:Object.values(ks)},placement:{type:String,default:"center",options:Object.values(bs)},text:{type:String,default:""},testId:{type:String,default:"ds-tooltip"}}},We=({children:t,position:e=Ie.props.position.default,placement:s=Ie.props.placement.default,text:a=Ie.props.text.default,testId:n=Ie.props.testId.default,className:r})=>{const i=y.useRef(null),[u,c]=y.useState(0),[d,f]=y.useState(0),[g,S]=y.useState(!1),k=e&&Ie.props.position.options.find(D=>D===e)&&`${Ie.class}--${e}`,b=s&&Ie.props.placement.options.find(D=>D===s)&&`${Ie.class}--${s}`;let _;y.useLayoutEffect(()=>{var D,N;i.current&&(c((D=i==null?void 0:i.current)==null?void 0:D.offsetHeight),f((N=i==null?void 0:i.current)==null?void 0:N.offsetWidth))},[]);const m=9;switch(e){case"top":s==="initial"?_={bottom:u+m,left:-m}:s==="end"?_={bottom:u+m,right:-m}:_={bottom:u+m,left:"50%",transform:"translateX(-50%)"};break;case"bottom":s==="initial"?_={top:u+m,left:-m}:s==="end"?_={top:u+m,right:-m}:_={top:u+m,left:"50%",transform:"translateX(-50%)"};break;case"left":s==="initial"?_={right:d+m,top:-m}:s==="end"?_={right:d+m,bottom:-m}:_={right:d+m,top:"50%",transform:"translateY(-50%)"};break;case"right":s==="initial"?_={left:d+m,top:-m}:s==="end"?_={left:d+m,bottom:-m}:_={left:d+m,top:"50%",transform:"translateY(-50%)"};break}return o.jsxs("div",{className:[Ie.class,r].join(" "),"data-testid":n,onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),ref:i,role:"tooltip",children:[t,g&&o.jsx("div",{className:[k,b].filter(D=>D).join(" "),children:o.jsx("span",{className:`${Ie.class}__wrapper`,"data-testid":"ds-tooltip-wrapper",style:_,children:a})})]})};We.propTypes={position:l.string,placement:l.string,text:l.oneOfType([l.string,l.node]),testId:l.string},We.displayName="DsTooltip";const Qe=y.forwardRef(({name:t,testId:e=ae.props.testId.default,type:s=ae.props.type.default,animated:a=ae.props.animated.default,size:n=ae.props.size.default,label:r,placeholder:i,value:u,min:c,max:d,tooltip:f=ae.props.tooltip.default,tooltipPosition:g=ae.props.tooltipPosition.default,tooltipPlacement:S=ae.props.tooltipPlacement.default,icon:k=ae.props.icon.default,status:b=ae.props.status.default,feedback:_,hasFeedback:m=ae.props.hasFeedback.default,noMargin:D=ae.props.noMargin.default,disabled:N=ae.props.disabled.default,autoFocus:w,className:F,mask:h,onChangeHandler:T=ae.props.onChangeHandler.default,onBlurHandler:$,onKeyDownHandler:U,onFocusHandler:B},se)=>{const[V,H]=y.useState(!1),[R,ie]=y.useState(!1),be=!!T&&!!h,ee=(E,K,C)=>{if(be&&C){const le={...C,target:{...C.target,name:t,maskedValue:E,value:K.unmaskedValue,type:"text"}};T(le)}},ce=y.useMemo(()=>typeof h=="object"?{lazy:!0,...h}:Pa[h]?{...Pa[h],min:c,max:d,lazy:!0}:{mask:h??"",min:c,max:d,lazy:!0},[h]),{ref:Fe,setUnmaskedValue:Ae}=Rn(ce,{onAccept:ee}),v=E=>{T&&!be&&T(E)},A=E=>{U&&U(E)},L=E=>{H(!1),$&&$(E)},j=E=>{H(!0),B&&B(E)},x=()=>{ie(E=>!E)},O=y.useMemo(()=>R&&s==="password"?"text":s,[R,s]),P=()=>{const E=[`${ae.class}`];return n&&E.push(`${ae.class}--${n}`),a&&E.push(`${ae.class}--animated`),D&&E.push(`${ae.class}--no-margin`),k&&E.push(`${ae.class}--with-icon`),b&&E.push(`${ae.class}--${b}`),F&&E.push(F),E.join(" ")},z=y.useMemo(()=>{const E=[`${ae.class}__label`];return(V||u)&&E.push(`${ae.class}__label--active`),E.join(" ")},[u,V]),W=()=>!a&&i?i:"",X=()=>b&&b==="error"?"info":"check_circle";return y.useEffect(()=>{h&&Ae(u??"")},[u,h,Ae]),o.jsxs("div",{className:P(),ref:se,children:[m&&o.jsx("div",{className:"ds-input__feedback",children:_&&o.jsxs(o.Fragment,{children:[o.jsx(J,{image:X()}),_]})}),o.jsx("input",{autoFocus:w,className:"ds-input__input","data-testid":e,disabled:N,id:t,max:d,min:c,name:t,onBlur:L,onChange:v,onFocus:j,onInput:v,onKeyDown:A,placeholder:W(),ref:Fe,type:O,...!h&&{value:u??""}}),o.jsxs("label",{className:z,htmlFor:t,children:[r,f&&o.jsx(We,{className:"ds-input__tooltip",placement:S,position:g,text:f,children:o.jsx(J,{className:"ds-input__icon",image:"info"})})]}),k&&o.jsx(J,{className:"ds-input__icon",image:k}),s==="password"&&o.jsx(J,{className:"ds-input__password-icon",image:R?"visibility_off":"visibility",onClick:x,size:"xl"})]})});Qe.propTypes={name:l.string,testId:l.string,type:l.oneOf(ae.props.type.options),animated:l.bool,size:l.oneOf(ae.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),min:l.string,max:l.string,tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,icon:l.string,status:l.oneOf(ae.props.status.options),feedback:l.string,hasFeedback:l.bool,noMargin:l.bool,disabled:l.bool,mask:l.oneOfType([l.string,l.object]),onChangeHandler:l.func,onFocusHandler:l.func},Qe.displayName="DsInput";var Ss=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Ss||{}),Es=(t=>(t.None="",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t))(Es||{});const _e={name:"Loading",class:"ds-loading",props:{size:{type:String,default:"medium",options:Object.values(Ss)},opacity:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!0},backgroundColor:{type:String,default:"neutral-10",options:Object.values(Es)},id:{type:String,default:""},testId:{type:String,default:"ds-loading"}}},wt=({id:t,testId:e=_e.props.testId.default,className:s,size:a=_e.props.size.default,opacity:n=_e.props.opacity.default,fullscreen:r=_e.props.fullscreen.default,backgroundColor:i=_e.props.backgroundColor.default})=>{const u=!r&&`${_e.class}--absolute`,c=a&&`${_e.class}__dots--${a}`,d=i&&_e.props.backgroundColor.options.find(g=>g===i)&&`${_e.class}__background--${i}`,f=n&&`${_e.class}__background--opacity`;return o.jsxs("div",{className:[_e.class,s,u].filter(g=>g).join(" "),"data-testid":e,id:t,children:[o.jsx("div",{className:[`${_e.class}__background`,d,f].filter(g=>g).join(" ")}),o.jsx("div",{className:["ds-loading__dots",c].filter(g=>g).join(" "),role:"status"})]})};wt.propTypes={id:l.string,testId:l.string,size:l.oneOf(_e.props.size.options),opacity:l.bool,fullscreen:l.bool,backgroundColor:l.string},wt.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:()=>({})}}},Cs=({id:t,label:e,detail:s,name:a,testId:n=a??"ds-option-test",disabled:r=xe.props.disabled.default,value:i,checked:u=xe.props.checked.default,onChangeHandler:c=xe.props.onChangeHandler.default})=>{const[d]=y.useState(crypto.randomUUID()),f=()=>{const g=[xe.class];return r&&g.push(`${xe.class}--disabled`),g.join(" ")};return o.jsxs("div",{className:f(),children:[o.jsx("input",{checked:u,"data-testid":n,disabled:r,id:t??String(d),name:a,onChange:c,type:"radio",value:i}),o.jsx(J,{className:`${xe.class}__icon`,image:u?"radio_button_checked":"radio_button_unchecked",size:"xxl"}),o.jsxs("div",{className:`${xe.class}__text-container`,children:[e&&o.jsx("label",{className:`${xe.class}__label`,htmlFor:t??String(d),children:e}),s&&o.jsx("label",{className:`${xe.class}__detail`,htmlFor:t??String(d),children:s})]})]})};Cs.propTypes={id:l.string,name:l.string,testId:l.string,label:l.oneOfType([l.string,l.node]),value:l.oneOfType([l.string,l.number]),detail:l.string,disabled:l.bool,checked:l.bool,onChangeHandler:l.func},Cs.displayName="DsOption";var ws=(t=>(t.Default="",t.Large="large",t.Small="small",t))(ws||{});const it={name:"Paragraph",class:"ds-paragraph",props:{type:{type:String,default:"",options:Object.values(ws)}}},Be=({children:t,className:e,testId:s="ds-paragraph-test",type:a=it.props.type.default})=>{const n=a&&`${it.class}--${a}`;return o.jsx("p",{className:[it.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};Be.propTypes={className:l.string,testId:l.string,type:l.oneOf(it.props.type.options)},Be.displayName="DsParagraph";var As=(t=>(t.PrimaryDarker="primary-darker",t.PrimaryDark="primary-dark",t.Primary="primary",t.PrimaryLight="primary-light",t.PrimaryLighter="primary-lighter",t.PrimaryLightest="primary-lightest",t.SecondaryDarker="secondary-darker",t.SecondaryDark="secondary-dark",t.Secondary="secondary",t.SecondaryLight="secondary-light",t.SecondaryLighter="secondary-lighter",t.SecondaryLightest="secondary-lightest",t.Neutral90="neutral-90",t.Neutral80="neutral-80",t.Neutral60="neutral-60",t.Neutral40="neutral-40",t.Neutral20="neutral-20",t.Neutral10="neutral-10",t.Neutral05="neutral-05",t.Neutral00="neutral-00",t.SuccessDark="success-dark",t.Success="success",t.SuccessLight="success-light",t.SuccessLighter="success-lighter",t.WarningDark="warning-dark",t.Warning="warning",t.WarningLight="warning-light",t.WarningLighter="warning-lighter",t.DangerDark="danger-dark",t.Danger="danger",t.DangerLight="danger-light",t.DangerLighter="danger-lighter",t.InfoDark="info-dark",t.Info="info",t.InfoLight="info-light",t.InfoLighter="info-lighter",t))(As||{});const At={name:"Progress",class:"ds-progress",props:{label:{type:String,default:""},progress:{type:Number,default:0},color:{type:String,default:"success",options:Object.values(As)}}};var Ds=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t.SpaceAround="space-around",t.SpaceBetween="space-between",t))(Ds||{}),Ts=(t=>(t.Stretch="stretch",t.FlexStart="flex-start",t.FlexEnd="flex-end",t.Center="center",t))(Ts||{}),Fs=(t=>(t.Row="row",t.Column="column",t.RowReverse="row-reverse",t.ColumnReverse="column-reverse",t))(Fs||{}),Is=(t=>(t.NoWrap="nowrap",t.Wrap="wrap",t.WrapReverse="wrap-reverse",t))(Is||{}),Os=(t=>(t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t.MD="md",t.LG="lg",t.XL="xl",t.XXL="xxl",t.XXXL="xxxl",t))(Os||{});const ze={name:"Flex-Layout",class:"ds-flex-layout",props:{justifyContent:{type:String,default:"stretch",required:!0,options:Object.values(Ds)},alignItems:{type:String,default:"stretch",required:!0,options:Object.values(Ts)},flexDirection:{type:String,default:"row",required:!0,options:Object.values(Fs)},flexWrap:{type:String,default:"wrap",required:!1,options:Object.values(Is)},className:{type:String,default:""},width:{type:String,default:"100%"},height:{type:String,default:""},gap:{type:String,default:"",options:Object.values(Os)}}},Le=({children:t,className:e,justifyContent:s=ze.props.justifyContent.default,alignItems:a=ze.props.alignItems.default,flexDirection:n=ze.props.flexDirection.default,flexWrap:r=ze.props.flexWrap.default,width:i=ze.props.width.default,height:u,gap:c})=>{const d=()=>{const g=[ze.class,e];return c&&g.push(`${ze.class}--gap-${c}`),g.join(" ")},f=()=>({display:"flex",justifyContent:s,alignItems:a,flexDirection:n,flexWrap:r,width:i,height:u,gap:c});return o.jsx("div",{className:d(),style:f(),children:t})};Le.propTypes={className:l.string,justifyContent:l.string,alignItems:l.string,flexDirection:l.string,flexWrap:l.string,width:l.string,height:l.string,gap:l.string},Le.displayName="DsFlexLayout";const Dt={name:"Flex-Element",class:"ds-flex-element",props:{flex:{type:String,default:"0 1 auto",required:!1},className:{type:String,default:"",required:!1}}},pe=({children:t,flex:e=Dt.props.flex.default,className:s=Dt.props.className.default})=>{const a=()=>[Dt.class,s].join(" "),n=()=>({flex:e});return o.jsx("div",{className:a(),style:n(),children:t})};pe.propTypes={className:l.string,flex:l.string},pe.displayName="DsFlexElement";var Tt=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.XXXS="xxxs",t.XXS="xxs",t.XS="xs",t.SM="sm",t))(Tt||{});const Ze={name:"Spacer",class:"ds-spacer",props:{vertical:{type:String,default:"none",options:Object.values(Tt)},horizontal:{type:String,default:"none",options:Object.values(Tt)}}},Ee=({vertical:t=Ze.props.vertical.default,horizontal:e=Ze.props.horizontal.default})=>{const s=t&&`ds-spacer__vertical--${t}`,a=e&&`ds-spacer__horizontal--${e}`;return o.jsx("div",{className:[Ze.class,s,a].filter(n=>n).join(" "),"data-testid":"ds-spacer"})};Ee.propTypes={vertical:l.oneOf(Ze.props.vertical.options),horizontal:l.oneOf(Ze.props.horizontal.options)},Ee.displayName="DsSpacer";const Ns=({label:t,progress:e=At.props.progress.default,color:s=At.props.color.default})=>{const a=y.useMemo(()=>e>100?100:e<0?0:e,[e]),n=y.useMemo(()=>gt[s]??s,[s]),r=y.useMemo(()=>`bg-color__${n}`,[n]),i=y.useMemo(()=>`color__${n}`,[n]);return o.jsx("div",{className:"ds-progress",children:o.jsxs(Le,{flexDirection:"column",children:[o.jsx(pe,{children:o.jsx("div",{"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":a,className:"ds-progress__container",role:"progressbar",children:o.jsx("div",{className:`ds-progress__progress ${r}`,"data-testid":"ds-progress-bar",style:{width:`${a}%`}})})}),o.jsx(pe,{children:o.jsxs(Le,{alignItems:"flex-end",flexDirection:"column",justifyContent:"center",children:[o.jsx(Ee,{vertical:"quark"}),o.jsx(o.Fragment,{children:t&&o.jsx(Be,{className:i,children:t})})]})})]})})};Ns.propTypes={label:l.string,progress:l.number,color:l.oneOf(At.props.color.options)};var $s=(t=>(t.Default="default",t.Card="card",t))($s||{});const Ce={name:"DsRadio",class:"ds-radio",props:{variant:{type:String,default:"default",options:Object.values($s)},fullWidth:{type:Boolean,default:!1}}},qa=y.forwardRef(({variant:t=Ce.props.variant.default,fullWidth:e=Ce.props.fullWidth.default,label:s,description:a,className:n,id:r,testId:i="ds-radio",disabled:u,status:c,feedback:d,onChangeHandler:f,onBlurHandler:g,onFocusHandler:S,...k},b)=>{const _=y.useId(),m=r??`${Ce.class}-${_.replace(/:/g,"")}`,D=[Ce.class,`${Ce.class}--${t}`,e&&`${Ce.class}--full-width`,u&&`${Ce.class}--disabled`,n].filter(Boolean).join(" ");return o.jsxs("label",{className:D,"data-testid":`${i}-root`,htmlFor:m,children:[o.jsx("input",{...k,className:`${Ce.class}__input`,"data-testid":i,disabled:u,id:m,ref:b,type:"radio"}),o.jsx("span",{"aria-hidden":"true",className:`${Ce.class}__control`}),(s||a)&&o.jsxs("span",{className:`${Ce.class}__text`,children:[s&&o.jsx("span",{className:`${Ce.class}__label`,children:s}),a&&o.jsx("span",{className:`${Ce.class}__description`,children:a})]})]})});qa.displayName="DsRadio";var xs=(t=>(t.Small="sm",t.Medium="md",t))(xs||{});const ke={name:"DsSegmentControl",class:"ds-segment-control",props:{items:{type:Array,required:!0},value:{type:String,required:!1},defaultValue:{type:String,required:!1},size:{type:String,default:"sm",options:Object.values(xs)},fullWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},className:{type:String,default:""},testId:{type:String,default:"ds-segment-control"},onChange:{type:Function,default:()=>{}}}},za=y.forwardRef(({items:t,value:e,defaultValue:s,name:a,size:n=ke.props.size.default,fullWidth:r=ke.props.fullWidth.default,disabled:i=ke.props.disabled.default,className:u,testId:c=ke.props.testId.default,onChange:d,"aria-label":f,"aria-labelledby":g},S)=>{const k=y.useId(),b=a??`${ke.class}-${k.replace(/:/g,"")}`,_=e!==void 0,m=y.useMemo(()=>t.findIndex(V=>!V.disabled),[t]),D=y.useMemo(()=>_?e:s!==void 0?s:m>=0?t[m].value:void 0,[s,m,_,t,e]),[N,w]=y.useState(D),F=_?e:N,h=y.useRef([]);y.useEffect(()=>{h.current=h.current.slice(0,t.length)},[t.length]);const T=y.useMemo(()=>t.findIndex(V=>V.value===F),[F,t]),$=y.useCallback(V=>{const H=t.length;let R=(V%H+H)%H,ie=0;for(;t[R].disabled&&ie<H;)R=(R+1)%H,ie+=1;h.current[R].focus()},[t]),U=y.useCallback((V,H)=>{i||V.disabled||V.value!==F&&(_||w(V.value),d==null||d(V.value,H))},[F,i,_,d]),B=(V,H)=>{const R=t.length-1;switch(V.key){case"ArrowRight":case"ArrowDown":V.preventDefault(),$(H+1);break;case"ArrowLeft":case"ArrowUp":V.preventDefault(),$(H-1);break;case"Home":V.preventDefault(),$(0);break;case"End":V.preventDefault(),$(R);break;case" ":case"Enter":V.preventDefault(),U(t[H],H);break}},se=[ke.class,`${ke.class}--size-${n}`,r&&`${ke.class}--full-width`,i&&`${ke.class}--disabled`,u].filter(Boolean).join(" ");return o.jsx("div",{"aria-disabled":i||void 0,"aria-label":f,"aria-labelledby":g,className:se,"data-testid":c,ref:S,role:"radiogroup",children:t.map((V,H)=>{const R=F===V.value,ie=i||!!V.disabled,be=[`${ke.class}__item`,R&&`${ke.class}__item--active`,ie&&`${ke.class}__item--disabled`].filter(Boolean).join(" "),ee=ie?-1:T===-1?H===m?0:-1:R?0:-1;return o.jsxs("label",{className:be,children:[o.jsx("input",{checked:R,className:`${ke.class}__item-input`,"data-testid":V.testId??`${c}-item-${V.value}`,disabled:ie,name:b,onChange:()=>U(V,H),onKeyDown:ce=>B(ce,H),ref:ce=>h.current[H]=ce,tabIndex:ee,type:"radio",value:V.value}),V.label]},V.value)})})});za.displayName="DsSegmentControl";var Bs=(t=>(t.Small="sm",t.Medium="md",t.Large="lg",t))(Bs||{}),Ms=(t=>(t.Default="",t.Error="error",t.Success="success",t))(Ms||{}),Vs=(t=>(t.Center="center",t.End="end",t.Initial="initial",t))(Vs||{}),Ls=(t=>(t.Top="top",t.Right="right",t.Bottom="bottom",t.Left="left",t))(Ls||{});const ne={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(Bs),default:"md"},status:{type:String,default:"",options:Object.values(Ms)},tooltip:{type:String,default:""},tooltipPlacement:{type:String,default:"initial",options:Object.values(Vs)},tooltipPosition:{type:String,default:"top",options:Object.values(Ls)},feedback:{type:String,default:""},options:[]}},js=y.forwardRef(({label:t,className:e,disabled:s=ne.props.disabled.default,animated:a=ne.props.animated.default,multiple:n=ne.props.multiple.default,testId:r=ne.props.testId.default,name:i,options:u,value:c,placeholder:d,onChange:f,onChangeHandler:g,size:S=ne.props.size.default,status:k=ne.props.status.default,tooltip:b,tooltipPosition:_=ne.props.tooltipPosition.default,tooltipPlacement:m=ne.props.tooltipPlacement.default,feedback:D,...N},w)=>{const[F,h]=y.useState(!1),T=B=>{h(!1),f&&f(B,B.target.value),g&&g(B,B.target.value)},$=()=>{const B=[ne.class,"select-placeholder"];return B.push(`${ne.class}--${S}`),k&&B.push(`${ne.class}--${k}`),F&&B.push(`${ne.class}--active`),s&&B.push(`${ne.class}--disabled`),e&&B.push(e),B.join(" ")},U=y.useMemo(()=>{const B=[`${ne.class}__label`];return!a&&B.push(`${ne.class}__label--not-animated`),c&&B.push(`${ne.class}__label--has-value`),a&&!c&&!b&&B.push(`${ne.class}__label--hidden`),B.join(" ")},[c]);return o.jsxs("div",{className:$(),"data-testid":"ds-select-component",children:[t&&o.jsxs("label",{className:U,"data-testid":"ds-label-id",htmlFor:i,children:[t,b&&o.jsx(We,{className:`${ne.class}__tooltip`,placement:m,position:_,text:b,children:o.jsx(J,{className:`${ne.class}__icon`,image:"info"})})]}),o.jsxs("select",{"data-testid":r,disabled:s,id:i,multiple:n,name:i,onBlur:()=>h(!1),onChange:B=>T(B),onFocus:()=>h(!0),ref:w,value:c??"",...N,children:[(d||a)&&o.jsx("option",{disabled:!0,value:"",children:d??t}),u==null?void 0:u.map((B,se)=>{var V;return"options"in B?o.jsx("optgroup",{label:B.label,children:(V=B.options)==null?void 0:V.map((H,R)=>o.jsx("option",{className:`${ne.class}__option-select`,value:H.value,children:H.label??H.value},R))},se):o.jsx("option",{className:`${ne.class}__option-select`,value:B.value,children:B.label??B.value},se)})]}),D&&o.jsxs("div",{className:"ds-select__feedback-container",children:[o.jsx(J,{className:"ds-select__icon",image:k==="success"?"check_circle":"info"}),o.jsx("span",{className:"ds-select__feedback",children:D})]})]})});js.propTypes={label:l.string.isRequired,className:l.string,disabled:l.bool,animated:l.bool,multiple:l.bool,name:l.string,testId:l.string,options:l.array.isRequired,placeholder:l.string,onChange:l.func,onChangeHandler:l.func,value:l.oneOfType([l.string,l.number]),size:l.oneOf(ne.props.size.options),status:l.oneOf(ne.props.status.options),tooltip:l.string,tooltipPosition:l.string,tooltipPlacement:l.string,feedback:l.string},js.displayName="DsSelect";var Ps=(t=>(t.Large="large",t.Small="small",t))(Ps||{});const Ft={name:"Subtitle",class:"ds-subtitle",props:{type:{type:String,default:"large",options:Object.values(Ps)}}},Ua=({children:t,className:e,testId:s="ds-subtitle-test",type:a})=>{const n=Ft.props.type.options.find(r=>r===a)&&`${Ft.class}--${a}`;return o.jsx("p",{className:[Ft.class,n,e].filter(r=>r).join(" "),"data-testid":s,children:t})};Ua.displayName="DsSubtitle";var qs=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(qs||{}),zs=(t=>(t.Text="text",t))(zs||{}),Us=(t=>(t.None="",t.Error="error",t.Success="success",t))(Us||{}),Hs=(t=>(t.None="none",t.Both="both",t.Horizontal="horizontal",t.Vertical="vertical",t.Block="block",t.Inline="inline",t))(Hs||{});const de={name:"TextArea",class:"ds-textarea",props:{name:{type:String,required:!0},testId:{type:String,default:"ds-textarea-test"},type:{type:String,default:"text",options:Object.values(zs)},animated:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",options:Object.values(qs)},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:"",options:Object.values(Us)},feedback:{type:String,default:""},description:{type:String,default:""},icon:{type:String,default:""},tooltip:{type:String,default:""},resize:{type:String,default:"none",options:Object.values(Hs)},onChangeHandler:{type:Function,default:()=>{}}}},Ws=y.forwardRef(({name:t,testId:e=de.props.testId.default,animated:s=de.props.animated.default,size:a=de.props.size.default,label:n,placeholder:r,value:i,minLength:u,maxLength:c,tooltip:d,icon:f,status:g=de.props.status.default,feedback:S,disabled:k=de.props.disabled.default,required:b,className:_,resize:m=de.props.resize.default,onChangeHandler:D,onBlurHandler:N,onKeyDownHandler:w,onFocusHandler:F,rows:h=de.props.rows.default,cols:T,description:$,style:U},B)=>{const[se,V]=y.useState(!1),[H,R]=y.useState(0),[ie,be]=y.useState(crypto.randomUUID());y.useEffect(()=>{i==null&&be(crypto.randomUUID())},[i]);const ee=O=>{R(O.target.value.length),D&&D(O)},ce=O=>{w&&w(O)},Fe=O=>{V(!1),N&&N(O)},Ae=O=>{V(!0),F&&F(O)},v=()=>{const O=[`${de.class}`];return a&&O.push(`${de.class}--${a}`),s&&O.push(`${de.class}--animated`),d&&O.push(`${de.class}--with-icon`),g&&O.push(`${de.class}--${g}`),_&&O.push(_),O.join(" ")},A=y.useMemo(()=>{const O=[`${de.class}__label`];return(se||i)&&O.push(`${de.class}__label--active`),O.join(" ")},[i,se]),L=()=>!s&&r?r:"",j=()=>g&&g==="error"?"info":"check_circle",x={resize:m,...U??{}};return o.jsxs("div",{className:v(),children:[$&&o.jsx("span",{className:"ds-textarea__description",children:$}),S&&o.jsxs("div",{className:"ds-textarea__feedback",children:[o.jsx(J,{image:j()}),S]}),o.jsx("textarea",{className:"ds-textarea__textarea",cols:T,"data-testid":e,defaultValue:i??"",disabled:k,id:t,maxLength:c,minLength:u,name:t,onBlur:Fe,onChange:ee,onFocus:Ae,onKeyDown:ce,placeholder:L(),ref:B,required:b,rows:h,style:x}),o.jsx("label",{className:A,htmlFor:t,children:n}),c&&o.jsxs("span",{className:"ds-textarea__count",children:[H,"/",c]}),d&&o.jsx(We,{className:"ds-textarea__tooltip",placement:"end",text:d,children:o.jsx(J,{className:"ds-textarea__icon",image:f})})]},ie)});Ws.propTypes={name:l.string,testId:l.string,animated:l.bool,size:l.oneOf(de.props.size.options),label:l.string,placeholder:l.string,value:l.oneOfType([l.string]),tooltip:l.string,icon:l.string,status:l.oneOf(de.props.status.options),feedback:l.string,minLength:l.number,maxLength:l.number,rows:l.number,cols:l.number,disabled:l.bool,required:l.bool,onChangeHandler:l.func,onBlur:l.func,onKeyDown:l.func,onFocus:l.func,resize:l.oneOf(de.props.resize.options).isRequired,description:l.string,style:l.object},Ws.displayName="DsTextArea";const lt={name:"Container",class:"ds-container",props:{fluid:{type:Boolean,default:!1},testId:{type:String,default:"ds-container-test"}}},It=({children:t,fluid:e=lt.props.fluid.default,className:s,style:a,testId:n=lt.props.testId.default})=>{const r=e?`${lt.class}--fluid`:lt.class;return o.jsx("div",{className:[r,s].filter(i=>i).join(" "),"data-testid":n,style:a,children:t})};It.propTypes={children:l.node,fluid:l.bool,className:l.string,style:l.object,testId:l.string},It.displayName="DsContainer";var Xs=(t=>(t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Xs||{}),Ot=(t=>(t.Start="start",t.End="end",t.Center="center",t.Stretch="stretch",t.SpaceAround="space-around",t.SpaceBetween="space-between",t.SpaceEvenly="space-evenly",t))(Ot||{});const oe={name:"Grid-Layout",class:"ds-grid-layout",props:{rows:{type:String,default:"auto",required:!0},gap:{type:String,default:"sm",options:Object.values(Xs)},vGap:{type:Boolean,default:!0},hGap:{type:Boolean,default:!0},width:{type:String,default:""},height:{type:String,default:""},horizontalAlign:{type:String,default:"start",options:Object.values(Ot)},verticalAlign:{type:String,default:"start",options:Object.values(Ot)}}};function Ha(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}function er(){const[t,e]=y.useState(Ha());return y.useEffect(()=>{function s(){e(Ha())}return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),t}const Ys=({children:t,rows:e=oe.props.rows.default,gap:s=oe.props.gap.default,vGap:a=oe.props.vGap.default,hGap:n=oe.props.hGap.default,horizontalAlign:r=oe.props.horizontalAlign.default,verticalAlign:i=oe.props.verticalAlign.default,width:u=oe.props.width.default,height:c=oe.props.height.default})=>{const d=a&&`${oe.class}__v-gap--${s}`,f=n&&`${oe.class}__h-gap--${s}`,g=r&&oe.props.horizontalAlign.options.find(w=>w===r)?`${oe.class}--h-${r}`:null,S=i&&oe.props.verticalAlign.options.find(w=>w===i)?`${oe.class}--v-${i}`:null,{width:k}=er(),[b,_]=y.useState("auto");y.useEffect(()=>{k<=768?_("6"):_("12")},[k]);const m=w=>/^[+-]?\d+$/.test(w),D=()=>e.split(",").map(F=>(F=F.trim(),F==="0"||F==="*"||F==="auto"?"auto":m(F)?F+"fr":F)).join(" "),N=()=>`repeat(${b}, minmax(0, 1fr))`;return o.jsx("div",{className:[oe.class,g,S,d,f].filter(w=>w).join(" "),style:{width:u,height:c,gridTemplateColumns:N(),gridTemplateRows:D()},children:t})};Ys.propTypes={children:l.oneOfType([l.arrayOf(l.node),l.node,l.func]),rows:l.string,gap:l.oneOf(oe.props.gap.options),vGap:l.bool,hGap:l.bool,width:l.string,height:l.string,horizontalAlign:l.oneOf(oe.props.horizontalAlign.options),verticalAlign:l.oneOf(oe.props.verticalAlign.options)},Ys.displayName="DsGridLayout";const Wa=()=>typeof window<"u"&&window.innerWidth?window.innerWidth:0,Xa=({children:t,grid:e})=>{const{row:s,col:a,mobileRow:n,mobileCol:r}=e,[i,u]=y.useState(Wa());y.useEffect(()=>{const d=()=>{u(Wa())};if(typeof window<"u")return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const c=y.useMemo(()=>i<=768?{gridRow:n??s,gridColumn:r??a}:{gridRow:s,gridColumn:a},[i,s,a,n,r]);return o.jsx("div",{style:c,children:t})};Xa.displayName="DsGridElement";const tr={name:"Grid-Element",class:"ds-grid-element",props:{grid:{type:Object,default:{row:"auto",col:"auto"}}}};var Xe=(t=>(t.None="none",t.Quark="quark",t.Nano="nano",t.ExtraSmall="xs",t.Small="sm",t.Medium="md",t.Large="lg",t))(Xe||{});const De={name:"Wrapper",class:"ds-wrapper",props:{space:{type:String,default:"xs",options:Object.values(Xe)},top:{type:String,default:"none",options:Object.values(Xe)},right:{type:String,default:"none",options:Object.values(Xe)},bottom:{type:String,default:"none",options:Object.values(Xe)},left:{type:String,default:"none",options:Object.values(Xe)}}},Je=({children:t,space:e=De.props.space.default,top:s=De.props.top.default,right:a=De.props.right.default,bottom:n=De.props.bottom.default,left:r=De.props.left.default})=>{const i=s&&`${De.class}__top--${s}`,u=a&&`${De.class}__right--${a}`,c=n&&`${De.class}__bottom--${n}`,d=r&&`${De.class}__left--${r}`,f=e&&`${De.class}--${e}`;return o.jsx("div",{className:[De.class,i,u,c,d,f].filter(g=>g).join(" "),children:t})};Je.displayName="DsWrapper";const Nt={name:"Accordion",class:"ds-accordion",props:{openItemListIndex:{type:Boolean,default:!1},items:{type:Array,default:[]},activeItem:{type:Number,default:0}}},Ye={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:t,content:e,onToggle:s,active:a=Ye.props.active.default,disabled:n=Ye.props.disabled.default})=>{const r=a&&`${Ye.class}--active`;return o.jsxs("li",{className:[Ye.class,r].filter(i=>i).join(" "),children:[o.jsxs("button",{className:`${Ye.class}__button`,disabled:n,onClick:s,children:[t,o.jsx(J,{className:`${Ye.class}__icon`,color:"neutral-90",image:"expand_more",size:"xl"})]}),a&&o.jsx("div",{className:"ds-accordion-item__content",children:e})]})};$t.propTypes={active:l.bool,title:l.oneOfType([l.element,l.string]),content:l.oneOfType([l.element,l.string]),disabled:l.bool},$t.displayName="DsAccordionItem";const Ks=({items:t=Nt.props.items.default,activeItem:e=Nt.props.activeItem.default,onClick:s})=>{const[a,n]=y.useState(-1);y.useEffect(()=>{t.map((i,u)=>{i.active&&n(u)})},[t]),y.useEffect(()=>{e!=null&&n(e)},[e]);const r=i=>{if(a===i)return s&&s(-1),n(-1);n(i),s&&s(i)};return o.jsx("ul",{className:Nt.class,children:t.map((i,u)=>o.jsx($t,{active:a===u,content:i.content,disabled:i.disabled,onToggle:()=>{r(u)},title:i.title},u))})};Ks.propTypes={items:l.array,activeItem:l.number},Ks.displayName="DsAccordion";const Ya=({title:t,activeTags:e,handleTagClose:s})=>o.jsx("div",{className:"active-tags",children:e.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Be,{className:"active-tags__title",children:t}),o.jsx("div",{className:"active-tags__list","data-testid":"ds-list",children:e.map((a,n)=>o.jsx(We,{text:`Filtro ${a.text} aplicado`,children:o.jsxs("div",{className:`active-tags__item ${a.hiddenClose&&"active-tags__item--no-close"}`,"data-testid":`ds-active-tag-${n}`,children:[o.jsxs(Le,{alignItems:"center",gap:"nano",children:[o.jsx(pe,{children:o.jsx(J,{className:"active-tags__icon",color:a.hiddenClose?"neutral-00":"neutral-90",fill:!0,image:a.icon,testId:`icon-${n}`})}),o.jsx(pe,{children:o.jsx(Be,{type:"small",children:a.text})})]}),!a.hiddenClose&&o.jsx(J,{image:"close",onClick:()=>s(n),testId:`icon-close-${n}`})]},n)},`ds-tooltip-key-${a.id}-${a.text}`))})]})});Ya.displayName="DsActiveTags";const sr={name:"ActiveTags",class:"ds-active-tags",props:{title:{type:String,default:""},activeTags:{type:Array,default:[]},handleTagClose:{type:Function,default:()=>{}}}},Re={name:"Carousel",class:"ds-carousel",props:{}},Ka=({slides:t,interval:e=3e3,imageHeight:s=100,imageWidth:a=100,imageMaxHeight:n,imageMaxWidth:r})=>{const[i,u]=y.useState(0),[c,d]=y.useState(!1),f=y.useRef(null);y.useEffect(()=>(c||(f.current=setInterval(()=>{u(k=>k===t.length-1?0:k+1)},e)),()=>{f.current&&clearInterval(f.current)}),[c,e,t.length]);const g=()=>d(!0),S=()=>d(!1);return o.jsxs("div",{className:`${Re.class}`,"data-testid":"ds-carousel",onMouseEnter:g,onMouseLeave:S,children:[o.jsx("div",{className:`${Re.class}__image-wrapper`,style:{height:s,width:a,maxHeight:n,maxWidth:r},children:t.map((k,b)=>o.jsx("img",{alt:k.title,className:`${Re.class}__image ${b===i?"active":"inactive"}`,height:s,src:k.image,style:{maxHeight:n,maxWidth:r},width:a},b))}),o.jsx(Ee,{vertical:"xxs"}),o.jsx("div",{children:o.jsx(yt,{className:"color__primary",type:"heading-4",children:t[i].title})}),o.jsx("div",{children:o.jsx(Be,{type:"large",children:t[i].description})}),o.jsx(Ee,{vertical:"xxs"}),o.jsx("div",{className:`${Re.class}__dots`,children:o.jsx("div",{className:`${Re.class}__dots-wrapper`,children:t.map((k,b)=>o.jsx("button",{"aria-label":`Go to slide ${b+1}`,className:`dot ${i===b?"dot--active":""}`,onClick:()=>u(b)},b))})})]})};Ka.propTypes={slides:l.arrayOf(l.shape({title:l.string.isRequired,image:l.string.isRequired,description:l.string.isRequired})).isRequired,interval:l.number,imageHeight:l.oneOfType([l.number,l.string]),imageWidth:l.oneOfType([l.number,l.string]),imageMaxHeight:l.oneOfType([l.number,l.string]),imageMaxWidth:l.oneOfType([l.number,l.string])};var Ke=(t=>(t.Default="",t.Error="error",t.Warning="warning",t))(Ke||{});const Gs={Checked:"check_box",Unchecked:"check_box_outline_blank"},Qs={error:"error",warning:"warning"},re={name:"DsCheckboxCard",class:"ds-checkbox-card",props:{value:{type:String,required:!1},status:{type:String,default:"",options:Object.values(Ke)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},className:{type:String,default:""},testId:{type:String,default:"ds-checkbox-card"}}},Zs=y.forwardRef(({className:t,description:e,disabled:s,feedback:a,fullWidth:n=re.props.fullWidth.default,hasFeedback:r=re.props.hasFeedback.default,icon:i,id:u,label:c,status:d=re.props.status.default,testId:f=re.props.testId.default,value:g,onChangeHandler:S,onBlurHandler:k,onFocusHandler:b,..._},m)=>{const D=y.useId(),N=u??`${re.class}-${D.replace(/:/g,"")}`,w=`${N}-label`,F=`${N}-description`,h=`${N}-feedback`,T=!!(d&&a),$=T||r,U=!!c&&!_["aria-label"]&&!_["aria-labelledby"],B=[e&&F,T&&h,_["aria-describedby"]].filter(Boolean).join(" ")||void 0,se=[re.class,d&&`${re.class}--${d}`,n&&`${re.class}--full-width`,s&&`${re.class}--disabled`,t].filter(Boolean).join(" ");return o.jsxs("label",{className:se,"data-testid":`${f}-root`,htmlFor:N,children:[o.jsx("input",{..._,"aria-describedby":B,"aria-invalid":d===Ke.Error?!0:_["aria-invalid"],"aria-labelledby":U?w:_["aria-labelledby"],className:`${re.class}__input`,"data-testid":f,disabled:s,id:N,ref:m,type:"checkbox",value:g}),o.jsxs("span",{"aria-hidden":"true",className:`${re.class}__box`,children:[o.jsx(J,{className:`${re.class}__glyph ${re.class}__glyph--unchecked`,fill:!0,image:Gs.Unchecked,size:"lg",testId:`${f}-glyph-unchecked`}),o.jsx(J,{className:`${re.class}__glyph ${re.class}__glyph--checked`,fill:!0,image:Gs.Checked,size:"lg",testId:`${f}-glyph-checked`})]}),i&&o.jsx("span",{"aria-hidden":"true",className:`${re.class}__icon`,children:i}),(c||e||$)&&o.jsxs("span",{className:`${re.class}__text`,children:[c&&o.jsx("span",{className:`${re.class}__label`,id:w,children:c}),e&&o.jsx("span",{className:`${re.class}__description`,id:F,children:e}),$&&o.jsx("span",{className:`${re.class}__feedback`,id:h,children:T&&o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:`${re.class}__feedback-icon`,children:o.jsx(J,{fill:!0,image:Qs[d],size:"md",testId:`${f}-feedback-icon`})}),o.jsx("span",{className:`${re.class}__feedback-text`,children:a})]})})]})]})});Zs.displayName="DsCheckboxCard";var Js=(t=>(t.Row="row",t.Column="column",t))(Js||{});const ue={name:"DsCheckboxCardGroup",class:"ds-checkbox-card-group",props:{items:{type:Array,required:!0},value:{type:Array,required:!1},defaultValue:{type:Array,required:!1},orientation:{type:String,default:"column",options:Object.values(Js)},status:{type:String,default:Ke.Default,options:Object.values(Ke)},feedback:{type:String,default:""},hasFeedback:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},className:{type:String,default:""},testId:{type:String,default:"ds-checkbox-card-group"},onChange:{type:Function,default:()=>{}}}},Ga=y.forwardRef(({className:t,defaultValue:e,description:s,disabled:a=ue.props.disabled.default,feedback:n,fullWidth:r=ue.props.fullWidth.default,hasFeedback:i=ue.props.hasFeedback.default,id:u,items:c,label:d,name:f,onChange:g,orientation:S=ue.props.orientation.default,status:k=ue.props.status.default,testId:b=ue.props.testId.default,value:_,onChangeHandler:m,onBlurHandler:D,onFocusHandler:N,...w},F)=>{const h=y.useId(),T=u??`${ue.class}-${h.replace(/:/g,"")}`,$=f??T,U=`${T}-description`,B=`${T}-feedback`,se=!!(k&&n),V=se||i,H=[s&&U,se&&B,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,R=_!==void 0,[ie,be]=y.useState(e??[]),ee=R?_:ie,ce=y.useMemo(()=>new Set(ee),[ee]),Fe=y.useCallback(v=>{if(a)return;const{checked:A,value:L}=v.target,j=A?[...ee.filter(x=>x!==L),L]:ee.filter(x=>x!==L);R||be(j),g==null||g(j,v)},[ee,a,R,g]),Ae=[ue.class,`${ue.class}--${S}`,k&&`${ue.class}--${k}`,r&&`${ue.class}--full-width`,a&&`${ue.class}--disabled`,t].filter(Boolean).join(" ");return o.jsxs("fieldset",{...w,"aria-describedby":H,"aria-disabled":a||void 0,className:Ae,"data-testid":b,id:u,ref:F,children:[d&&o.jsx("legend",{className:`${ue.class}__legend`,children:d}),s&&o.jsx("span",{className:`${ue.class}__description`,id:U,children:s}),o.jsx("div",{className:`${ue.class}__items`,"data-testid":`${b}-items`,children:c.map(v=>o.jsx(Zs,{checked:ce.has(v.value),description:v.description,disabled:a||v.disabled,feedback:v.feedback,icon:v.icon,id:`${T}-${v.value}`,label:v.label,name:$,onChange:Fe,status:v.status,testId:v.testId??`${b}-item-${v.value}`,value:v.value},v.value))}),V&&o.jsx("span",{className:`${ue.class}__feedback`,id:B,role:k===Ke.Error?"alert":void 0,children:se&&o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:`${ue.class}__feedback-icon`,children:o.jsx(J,{fill:!0,image:Qs[k],size:"md",testId:`${b}-feedback-icon`})}),o.jsx("span",{className:`${ue.class}__feedback-text`,children:n})]})})]})});Ga.displayName="DsCheckboxCardGroup";var Rs=(t=>(t.Small="small",t.Medium="medium",t.Large="large",t))(Rs||{});const Y={name:"EditableSelect",class:"ds-editable-select",props:{label:{type:String,default:""},testId:{type:String,default:"ds-editable-select"},animated:{type:Boolean,default:!0},inputAutoFocus:{type:Boolean,default:!1},placeholder:{type:String,default:""},name:{type:String,default:""},value:{type:String,default:""},noOptionsMessage:{type:String,default:"Nenhum resultado encontrado"},size:{type:String,default:"medium",options:Object.values(Rs)},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:()=>{}},onClearHandler:{type:Function,default:()=>{}}}},ar=(t,e)=>{if(!e)return t;const s=e.toLowerCase();return t.filter(a=>a.label.toLowerCase().includes(s))},Qa=t=>t,Za=({label:t=Y.props.label.default,name:e=Y.props.name.default,testId:s=Y.props.testId.default,value:a=Y.props.value.default,options:n=Y.props.options.default,size:r=Y.props.size.default,onChangeHandler:i=Y.props.onChangeHandler.default,onSelectHandler:u=Y.props.onSelectHandler.default,onClearHandler:c=Y.props.onClearHandler.default,icon:d=Y.props.icon.default,noOptionsMessage:f=Y.props.noOptionsMessage.default,disabled:g=Y.props.disabled.default,status:S=Y.props.status.default,onBlurHandler:k=Y.props.onBlurHandler.default,onFocusHandler:b=Y.props.onFocusHandler.default,animated:_=Y.props.animated.default,inputAutoFocus:m=Y.props.inputAutoFocus.default,placeholder:D=Y.props.placeholder.default,loading:N,showOptionsOnFocus:w=!1,inputType:F,inputMin:h,inputMax:T,inputTooltip:$,inputTooltipPosition:U,inputTooltipPlacement:B,inputFeedback:se,inputHasFeedback:V,inputNoMargin:H,inputMask:R,inputOnKeyDownHandler:ie})=>{const[be,ee]=y.useState(!1),[ce,Fe]=y.useState(a),[Ae,v]=y.useState(!0),A=y.useRef(null),L=E=>{if(w){const le=a.trim().toLowerCase(),je=E.currentTarget.value.trim().toLowerCase(),ct=n.map(ur=>ur.label.trim().toLowerCase()),lr=!!le&&ct.includes(le),or=!!je&&ct.includes(je);lr&&!or&&c()}i(E),v(!1);const K=E.currentTarget.value.length;(w||N==null&&K>0||!N&&K>2)&&ee(!0)},j=()=>{b(),v(!0),w&&ee(!0)},x=()=>{var C,le;const E=(C=A.current)==null?void 0:C.querySelector("input");if(!E)return;const K=(le=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:le.set;K==null||K.call(E,""),E.dispatchEvent(new Event("input",{bubbles:!0}))},O=()=>{if(w){const E=a.trim(),K=E?n.find(C=>C.label.trim().toLowerCase()===E.toLowerCase()):void 0;E&&(K?u(K):(x(),c()))}k(),v(!0)},P=E=>{u(E),k(),w||Fe(crypto.randomUUID().toString()),v(!0),ee(!1)},z=E=>{g||P(E)};y.useEffect(()=>{!w&&a.length===0&&ee(!1)},[a,w]),y.useEffect(()=>{if(!w)return;const E=K=>{A.current&&!A.current.contains(K.target)&&ee(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[w]);const W=y.useMemo(()=>w?Ae?Qa(n):ar(n,a):Qa(n),[n,a,w,Ae]),X=()=>W.length>0?W.map((E,K)=>{const le=E.label===a?` ${Y.class}__option--selected`:"";return o.jsx("button",{className:`${Y.class}__option ${Y.class}__option--${r}${le}`,"data-testid":`ds-option-${E.id??E.label}`,onClick:()=>z(E),onMouseDown:je=>je.preventDefault(),type:"button",children:E.label},K)}):o.jsx("div",{className:`${Y.class}__option ${Y.class}__option--not-found--${r}`,children:f},"no_option");return o.jsxs("div",{className:`${Y.class}__container`,ref:A,children:[o.jsx(Qe,{animated:_,autoFocus:m,className:`${Y.class}__input`,disabled:g,feedback:se,hasFeedback:V,label:t,mask:R,max:T,min:h,name:e,noMargin:H,onBlurHandler:O,onChangeHandler:L,onFocusHandler:j,onKeyDownHandler:ie,placeholder:D,size:r,status:S,testId:s,tooltip:$,tooltipPlacement:B,tooltipPosition:U,type:F,value:a},ce),(d||N)&&(N?o.jsx("div",{className:`${Y.class}__loading ${Y.class}__loading--${r}`,style:{width:"18px"},children:o.jsx(wt,{fullscreen:!1})}):d&&o.jsx(J,{className:`${Y.class}__icon ${Y.class}__icon--${r}`,image:d})),be&&o.jsx("div",{className:`${Y.class}__list ${Y.class}__list--${r}`,"data-testid":"ds-list",children:X()})]})};Za.displayName="DsEditableSelect";const et={name:"DsIndicator",class:"ds-indicator",props:{current:{type:Number,default:0},length:{type:Number,required:!0}}},nr=({length:t,current:e=et.props.current.default})=>{const[s,a]=y.useState(e),n=i=>i<s?`${et.class}__step--older`:i===s?`${et.class}__step--active`:"";y.useEffect(()=>{a(e)},[e]);const r=[];for(let i=0;i<t;i++)r.push(o.jsx("div",{className:`${et.class}__step ${n(i)}`,"data-testid":`ds-indicator-step-${i}`},i));return o.jsx("div",{className:et.class,children:r})},Ja={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:()=>{}}}},ea=({name:t,value:e,prefix:s,sufix:a,min:n,max:r,onChangeHandler:i})=>{const u=y.useRef(null),[c,d]=y.useState(!1),[f,g]=y.useState("");y.useEffect(()=>{g(e??"")},[e]);const S=m=>{m.key==="Enter"&&k(m)};function k(m){d(!1),i&&(n&&parseInt(n)>=parseInt(f===""?n:f)?(m.currentTarget.value=n,g(n)):r&&parseInt(r)<parseInt(f)?(m.currentTarget.value=r,g(r)):m.currentTarget.value=f,i(m))}const b=m=>{g(m.currentTarget.value)},_=async()=>{var m;await d(!0),(m=u.current)==null||m.focus()};return o.jsx("div",{className:Ja.class,children:c?o.jsx("input",{className:"ds-input__input","data-testid":"ds-input",max:r,min:n,name:t,onBlur:k,onChange:b,onKeyDown:S,ref:u,type:"number",value:f}):o.jsx("div",{"data-testid":"ds-inline-editible-div-click",onClick:_,children:o.jsxs(Le,{alignItems:"center",gap:"nano",children:[o.jsx(pe,{children:o.jsx(Be,{children:o.jsxs("b",{children:[s,e,a]})})}),o.jsx(pe,{children:o.jsx(J,{image:"edit_square"})})]})})})};ea.propTypes={value:l.string},ea.displayName="DsInlineEditable";var Ra=(t=>(t[t.Elevation1=1]="Elevation1",t[t.Elevation2=2]="Elevation2",t[t.Elevation3=3]="Elevation3",t[t.Elevation4=4]="Elevation4",t))(Ra||{}),ta=(t=>(t.Squared="squared",t.Rounded="rounded",t))(ta||{});const we={name:"Modal",class:"ds-modal",props:{elevation:{type:Number,options:[1,2,3,4]},variant:{type:String,default:"rounded",options:Object.values(ta)},cancelBtnText:{type:String,default:"Cancelar"},confirmBtnText:{type:String,default:"Confirmar"},isModalOpen:{type:Boolean,default:!1}}},sa=({className:t,title:e,content:s,cancelBtnText:a=we.props.cancelBtnText.default,confirmBtnText:n=we.props.confirmBtnText.default,variant:r=we.props.variant.default,elevation:i,isModalOpen:u=we.props.isModalOpen.default,onClose:c,onCancel:d,onConfirm:f,...g})=>{const S=r&&we.props.variant.options.find(m=>m===r)?`${we.class}--${r}`:`${we.class}--${we.props.variant.default}`,k=i&&`${we.class}--elevation-${i}`,b=f||d,_=y.useCallback(m=>{m.keyCode===27&&c()},[c]);return y.useEffect(()=>(u&&window&&!b&&window.addEventListener("keyup",_),()=>{window.removeEventListener("keyup",_)}),[b,_]),u?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"ds-modal-overlay","data-testid":"ds-modal-overlay",...g,onClick:()=>b?()=>{}:c()}),o.jsxs("div",{className:[we.class,S,k,t].filter(m=>m).join(" "),"data-testid":"ds-modal",children:[!b&&o.jsx("button",{className:"ds-modal__closeBtn","data-testid":"ds-modal-close-button",onClick:c,children:o.jsx(J,{image:"close",size:"lg"})}),o.jsxs("div",{className:"ds-modal__content",children:[o.jsx("div",{className:"ds-modal__content__title",children:e}),e&&o.jsx(Ee,{vertical:"xxxs"}),o.jsx("div",{className:"ds-modal__content__content",children:s})]}),b&&o.jsx(Ee,{vertical:"sm"}),!b&&o.jsx(Ee,{vertical:"xxs"}),o.jsxs("div",{className:"ds-modal__cta",children:[d&&o.jsx(st,{onClick:()=>{c(),d()},children:a}),f&&o.jsx(st,{onClick:()=>{c(),f()},children:n})]})]})]}):null};sa.propTypes={firstButtonText:l.string,confirmBtnText:l.string,cancelBtnText:l.string,variant:l.oneOf(we.props.variant.options),elevation:l.oneOf(we.props.elevation.options),isModalOpen:l.bool,title:l.node,content:l.node},sa.displayName="DsModal";var aa=(t=>(t.Success="success",t.Danger="danger",t.Warning="warning",t.Info="info",t))(aa||{}),na=(t=>(t.Rounded="rounded",t.Squared="squared",t))(na||{});const ye={name:"DsNotification",class:"ds-notification",props:{type:{type:String,default:"info",options:Object.values(aa)},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:"rounded",options:Object.values(na)},progressBar:{type:Boolean,default:!0},testId:{type:String,default:"ds-notification"}}};var en=(t=>(t.success="check",t.danger="error",t.warning="warning",t.info="info",t))(en||{});const ra=({className:t,type:e=ye.props.type.default,variant:s=ye.props.variant.default,id:a,children:n,message:r,autoClose:i=ye.props.autoClose.default,autoCloseTimer:u=ye.props.autoCloseTimer.default,dismissible:c=ye.props.dismissible.default,elevation:d,progressBar:f=ye.props.progressBar.default,handleClose:g,testId:S=ye.props.testId.default})=>{const[k,b]=y.useState(u),[_,m]=y.useState(!1),[D,N]=y.useState(!0),w=[ye.class,e&&`${ye.class}--${e}`,s&&`${ye.class}--${s}`,d&&`${ye.class}--elevation-${d}`,t].join(" "),F=()=>b(U=>(U===0&&N(!1),U-100));y.useEffect(()=>{!i&&!c&&N(!0);let U;return!_&&i&&(U=setInterval(F,100)),()=>{clearInterval(U)}},[_,i,u,D,c]);const h=()=>{m(!0)},T=()=>{m(!1)},$=U=>{N(!1),g&&g(U)};return D?o.jsxs("div",{className:w,"data-testid":S,id:a,onMouseEnter:h,onMouseLeave:T,children:[o.jsx(Je,{bottom:"nano",top:"nano",children:o.jsxs(Le,{alignItems:"center",flexWrap:"nowrap",gap:"xxxs",children:[o.jsx(pe,{children:o.jsx(J,{color:e,fill:!0,image:en[e]})}),o.jsx(pe,{flex:"1",children:o.jsx(Je,{left:"none",right:"none",space:"nano",children:n??r})}),o.jsx(pe,{children:c?o.jsx("div",{className:`${ye.class}__button`,"data-testid":`${S}-close`,onClick:U=>$(U),children:o.jsx(Je,{children:o.jsx(J,{image:"close"})})}):o.jsx(Ee,{horizontal:"quark"})})]})}),f&&i&&o.jsx("div",{className:`${ye.class}__progress-bar ${ye.class}__progress-bar--${e}`,"data-testid":`${S}-progress-bar`,style:{width:`${k/u*100}%`}})]}):null};ra.displayName="DsNotification";const xt={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:"},testId:{type:String,default:"ds-password-confirmation"}}},Bt={strong:"Forte",good:"Boa",medium:"Médio",weak:"Fraco"},ia=({onChange:t,validationList:e=xt.props.validationList.default,instructionLabel:s=xt.props.instructionLabel.default,testId:a=xt.props.testId.default})=>{const[n,r]=y.useState(""),[i,u]=y.useState(""),[c,d]=y.useState([]),[f,g]=y.useState({score:0,color:"danger",label:"Fraco"}),[S,k]=y.useState(!1),b=y.useCallback(h=>{const T=e.map($=>$==null?void 0:$.rule(h));return d(T),T},[e]),_=y.useCallback(h=>{r(h.currentTarget.value);const T=b(h.currentTarget.value),$=w(T);t({password:h.currentTarget.value,confirmationPassword:i,isEqual:i===h.currentTarget.value,feedback:$})},[i,t,b]),m=y.useCallback(h=>{u(h.currentTarget.value);const T=b(n),$=w(T);t({password:n,confirmationPassword:h.currentTarget.value,isEqual:n===h.currentTarget.value,feedback:$})},[n,t,b]),D=y.useMemo(()=>n!==i&&S?{status:"error",feedback:"As senhas são diferentes"}:{status:"",feedback:""},[n,i,S]),N=y.useCallback(h=>{const T={score:h,color:"danger",label:Bt.weak};return h>30&&h<75?(T.color="warning",T.label=Bt.medium):h>=75&&h<100?(T.color="success",T.label=Bt.good):h===100&&(T.color="success-dark",T.label=Bt.strong),T},[]),w=y.useCallback(h=>{const T=h.reduce((U,B)=>{let se=U;return B?(se++,se):U},0),$=N(T*100/h.length);return g($),$},[N]),F=()=>o.jsx("ul",{children:e.map((h,T)=>{const $=c[T]?"ds-password-confirmation__list":"ds-password-confirmation__list--disc";return o.jsxs("li",{className:$,children:[c[T]?o.jsx(J,{color:"success-dark",image:"check",testId:"ds-check-icon"}):null,o.jsx(Ee,{horizontal:"quark"}),o.jsx(Be,{children:h.title})]},T+h.title)})});return o.jsxs(Le,{className:"ds-password-confirmation",flexDirection:"column",children:[o.jsx(pe,{children:o.jsx(Qe,{label:"Senha",name:"password",onChangeHandler:_,testId:`${a}-main-input`,type:"password",value:n})}),o.jsx(pe,{children:o.jsx(Ns,{color:f==null?void 0:f.color,label:f==null?void 0:f.label,progress:f==null?void 0:f.score})}),o.jsx(pe,{children:o.jsx(Be,{children:s})}),o.jsx(pe,{children:F()}),o.jsx(Ee,{vertical:"xxs"}),o.jsx(pe,{children:o.jsx(Qe,{feedback:D.feedback,label:"Confirme a senha",name:"confirmPassword",onBlurHandler:()=>k(!0),onChangeHandler:m,onFocusHandler:()=>k(!0),status:D.status,testId:`${a}-confirm-input`,type:"password",value:i})})]})};ia.propTypes={onChange:l.func,validationList:l.array,instructionLabel:l.string,testId:l.string},ia.displayName="DsPasswordConfirmation";const Te={name:"DsStepper",class:"ds-stepper",props:{steps:{type:Array,required:!0},selectedStep:{type:Number,default:0}}},tn=({steps:t,selectedStep:e=Te.props.selectedStep.default,onChange:s})=>{const[a,n]=y.useState(e),r=(i,u)=>{const c=[`${Te.class}__button`];return u!==i&&c.push(`${Te.class}__button--round`),t[i]&&t[i].disabled&&c.push(`${Te.class}__button--disabled`),c.join(" ")};return y.useEffect(()=>{n(e)},[e]),y.useEffect(()=>{s(a)},[a]),o.jsxs("div",{className:Te.class,children:[o.jsxs("span",{className:`${Te.class}__step-counter`,children:["Etapa ",a+1," de ",t==null?void 0:t.length]}),o.jsx("div",{className:`${Te.class}__step`,children:t.map((i,u)=>o.jsx("div",{className:`${Te.class}__content`,children:o.jsx("button",{className:r(u,a),"data-testid":`ds-button-${u}`,disabled:i.disabled,onClick:()=>n(u),children:o.jsxs("span",{className:`${Te.class}__text`,children:[a===u?o.jsx(Je,{bottom:"none",left:"nano",right:"nano",top:"none",children:o.jsx(J,{className:`${Te.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${u}`})}):o.jsx(J,{className:`${Te.class}__icon`,fill:!0,image:i.icon,testId:`ds-icon-${u}`}),a===u&&i.label]})})},`${i.name}-${i.label}`))})]})};tn.displayName="DsStepper";const Oe={name:"Table",class:"ds-table",props:{header:{type:Array,default:[]},items:{type:Array,default:[]},columns:{type:Array,default:[]}}},sn=({item:t,columns:e})=>o.jsx("tr",{className:`${Oe.class}__row`,children:e.map((s,a)=>{const n=s.align&&`${Oe.class}__cell--align-${s.align}`;return o.jsx("td",{children:o.jsx("div",{className:[`${Oe.class}__cell`,n,s.className].filter(r=>r).join(" "),children:t&&t[`${s.name}`]})},a)})});sn.displayName="DsTableRow";const an=({columns:t,data:e,className:s})=>o.jsx("div",{className:`${Oe.class}__wrapper`,children:o.jsxs("table",{className:[`${Oe.class}`,s].filter(a=>a).join(" "),children:[o.jsx("thead",{className:`${Oe.class}__head`,children:o.jsx("tr",{className:`${Oe.class}__row`,children:t==null?void 0:t.map((a,n)=>o.jsx("th",{style:{width:a.size},children:o.jsx("div",{className:[`${Oe.class}__cell`,a.align&&`${Oe.class}__cell--align-${a.align}`].filter(r=>r).join(" "),children:a.label})},n))})}),o.jsx("tbody",{className:`${Oe.class}__body`,children:e&&e.map((a,n)=>o.jsx(sn,{columns:t,item:a},n))})]})});an.displayName="DsTable";var la=(t=>(t.None="",t.Primary="primary",t.Secondary="secondary",t.Neutral="neutral",t.Success="success",t.Warning="warning",t.Danger="danger",t.Info="info",t))(la||{}),tt=(t=>(t.Segmented="segmented",t.Navigation="navigation",t))(tt||{});const me={name:"DsTabs",class:"ds-tabs",props:{tabs:{type:Array,required:!0},selectedTab:{type:Number,default:0},color:{type:String,default:"primary",options:Object.values(la)},variant:{type:String,default:"segmented",options:Object.values(tt)},className:{type:String,default:""},onChange:{type:Function,default:()=>{}}}},rr=({active:t,className:e,color:s,disabled:a,index:n,name:r,title:i,onClick:u,variant:c,tabDomId:d,panelDomId:f,hasPanel:g,tabDataTestId:S})=>{const k=[`${me.class}__tab`,s&&`${me.class}__tab-color--${s}`,t&&`${me.class}__tab--active`,a&&`${me.class}__tab--disabled`,e].filter(Boolean).join(" "),b=()=>{a||u==null||u(n)},_=m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),b())};return c===tt.Navigation?o.jsx("button",{"aria-controls":g?f:void 0,"aria-selected":t,className:k,"data-testid":S??`ds-tab-${n}`,disabled:a,id:d,onClick:b,role:"tab",type:"button",children:i}):o.jsx("div",{"aria-disabled":a,"aria-selected":t,className:k,"data-testid":S??`ds-tab-${n}`,id:r,onClick:b,onKeyDown:_,role:"tab",tabIndex:a?-1:0,children:i})};function oa(t,e){if(t.length===0)return 0;const s=t[e];if(s&&!s.hidden)return e;const a=t.findIndex(n=>!n.hidden);return a>=0?a:0}const ir=({tabs:t,color:e,selectedTab:s=me.props.selectedTab.default,className:a,variant:n=me.props.variant.default,onChange:r,"aria-label":i,"aria-labelledby":u,rootDataTestId:c})=>{const[d,f]=y.useState(()=>oa(t,s));y.useEffect(()=>{f(oa(t,s))},[s,t]),y.useEffect(()=>{if(t.length===0)return;const m=t[d];(!m||m.hidden)&&f(oa(t,d))},[t,d]);const g=y.useMemo(()=>t.map((m,D)=>({tab:m,index:D})).filter(({tab:m})=>!m.hidden),[t]),S=m=>{f(m),r==null||r(m)},k=[me.class,n===tt.Navigation&&`${me.class}--navigation`,a].filter(Boolean).join(" "),b=n===tt.Navigation,_=t[d];return o.jsxs("div",{"aria-label":i,"aria-labelledby":u,className:k,"data-testid":c??"ds-tabs",children:[o.jsx("div",{className:`${me.class}__header`,role:b?"tablist":void 0,children:g.map(({tab:m,index:D})=>{const N=`${me.class}-tab-${m.name??D}`,w=`${me.class}-panel-${m.name??D}`,F=m.content!==void 0;return o.jsx(rr,{...m,active:d===D,color:e,hasPanel:F,index:D,onClick:()=>S(D),panelDomId:F?w:void 0,tabDomId:N,variant:n},N)})}),b?g.map(({tab:m,index:D})=>{if(m.content===void 0)return null;const N=`${me.class}-panel-${m.name??D}`,w=`${me.class}-tab-${m.name??D}`,F=d===D;return o.jsx("div",{"aria-labelledby":w,className:`${me.class}__panel`,"data-testid":m.panelDataTestId??`ds-tabs-panel-${m.name??D}`,hidden:!F,id:N,role:"tabpanel",tabIndex:F?0:-1,children:m.content},N)}):o.jsx("div",{className:`${me.class}__content`,children:_?_.content:null})]})};function nn({library:t,children:e,theme:s}){return o.jsx("div",{"data-library":t,"data-theme":s,children:o.jsx("div",{className:"ds-theme",children:e})})}nn.propTypes={library:l.string,children:l.node.isRequired,theme:l.string};var ua=(t=>(t.TopLeft="top-left",t.TopCenter="top-center",t.TopRight="top-right",t.BottomLeft="bottom-left",t.BottomCenter="bottom-center",t.BottomRight="bottom-right",t))(ua||{});const Ue={name:"DsNotificationList",class:"ds-notification-list",props:{position:{type:String,default:"top-right",options:Object.values(ua)},fluid:{type:Boolean,default:!1},className:{type:String,default:""}}},ca=({className:t=Ue.props.className.default,position:e=Ue.props.position.default,fluid:s=Ue.props.fluid.default,notifications:a,removeNotification:n})=>{const r=[Ue.class,`${Ue.class}--${e}`,s&&`${Ue.class}--fluid`,t].join(" "),i=u=>{n&&n(u)};return o.jsx("div",{className:r,"data-testid":"ds-notification-list",children:a.map(u=>{const c=u.autoClose??!0,d=u.autoCloseTimer??4e3,f=u.dismissible??!0,g=u.elevation??2,S=u.progressBar??!0;return o.jsx(ra,{autoClose:c,autoCloseTimer:d,dismissible:f,elevation:g,handleClose:()=>i(u.id),id:u.id,message:u.message,progressBar:S,type:u.type},u.id)})})};ca.propTypes={position:l.oneOf(Ue.props.position.options),fluid:l.bool,notifications:l.array,removeNotification:l.func},ca.displayName="DsNotificationList";const ot={class:"ds-split-layout"},rn=({leftContent:t,rightContent:e,leftBackgroundColor:s,rightBackgroundColor:a,reverseOnMobile:n=!1})=>{const r=s?`bg-color__${s}`:"",i=a?`bg-color__${a}`:"",u=n?`${ot.class}__content--mobile-order-2`:"",c=n?`${ot.class}__content--mobile-order-1`:"",d=`${ot.class}__content ${r} ${u}`,f=`${ot.class}__content ${i} ${c}`;return o.jsxs("div",{className:ot.class,children:[o.jsx("div",{className:d,children:t}),o.jsx("div",{className:f,children:e})]})};rn.displayName="DsSplitLayout";const ut={name:"TwoColumns",class:"ds-two-columns",props:{}},da=({header:t,main:e,sidebar:s,breadcrumb:a})=>o.jsxs(It,{children:[o.jsxs("div",{className:"ds-grid",children:[o.jsx("div",{className:"ds-grid__row",children:o.jsx("div",{className:"ds-grid__col ds-grid__col-12",children:a})}),o.jsxs("div",{className:`${ut.class}__content ds-grid__row`,children:[o.jsxs("div",{className:"ds-grid__col ds-grid__col--lg-8 ds-grid__col--sm-12 ds-grid__col-12",children:[o.jsx("div",{className:`${ut.class}__header`,children:t}),o.jsx("div",{className:`${ut.class}__main`,children:e})]}),o.jsx("div",{className:`${ut.class}__sidebar ds-grid__col ds-grid__col--lg-4 ds-grid__col--sm-12 ds-grid__col-12`,children:s})]})]}),o.jsx(Ee,{vertical:"sm"})]});da.propTypes={breadcrumb:l.node,header:l.node,main:l.node,sidebar:l.node},da.displayName="DsTwoColumns",p.ButtonColor=Yt,p.ButtonElevation=Da,p.ButtonIconPosition=Qt,p.ButtonSize=Gt,p.ButtonVariant=Kt,p.CardBorder=at,p.CardColor=mt,p.CardRadius=as,p.CardSize=ss,p.CheckboxCardFeedbackGlyph=Qs,p.CheckboxCardGlyph=Gs,p.CheckboxCardGroupOrientation=Js,p.CheckboxCardStatus=Ke,p.ChipColor=is,p.ChipIconPosition=nt,p.ChipVariant=ls,p.DsAccordion=Ks,p.DsAccordionItem=$t,p.DsActiveTags=Ya,p.DsButton=st,p.DsCaption=ts,p.DsCard=ns,p.DsCarousel=Ka,p.DsCheckbox=rs,p.DsCheckboxCard=Zs,p.DsCheckboxCardGroup=Ga,p.DsChip=Mn,p.DsContainer=It,p.DsEditableSelect=Za,p.DsFlexElement=pe,p.DsFlexLayout=Le,p.DsGridElement=Xa,p.DsGridLayout=Ys,p.DsHR=ds,p.DsHeading=yt,p.DsIcon=J,p.DsIndicator=nr,p.DsInlineEditable=ea,p.DsInput=Qe,p.DsLoading=wt,p.DsModal=sa,p.DsNotification=ra,p.DsNotificationList=ca,p.DsOption=Cs,p.DsParagraph=Be,p.DsPasswordConfirmation=ia,p.DsProgress=Ns,p.DsRadio=qa,p.DsSegmentControl=za,p.DsSelect=js,p.DsSpacer=Ee,p.DsSplitLayout=rn,p.DsStepper=tn,p.DsSubtitle=Ua,p.DsTable=an,p.DsTabs=ir,p.DsTextArea=Ws,p.DsTooltip=We,p.DsTwoColumns=da,p.DsWrapper=Je,p.EditableSelectSize=Rs,p.FlexLayoutAlignItems=Ts,p.FlexLayoutDirection=Fs,p.FlexLayoutGap=Os,p.FlexLayoutJustifyContent=Ds,p.FlexLayoutWrap=Is,p.GridLayoutAlign=Ot,p.GridLayoutGap=Xs,p.HRBorderStyle=us,p.HRSize=cs,p.HeadingType=os,p.IconColor=Zt,p.IconSize=Rt,p.IconVariation=Jt,p.IconWeight=es,p.InputSize=ms,p.InputStatus=ys,p.InputTooltipPlacement=vs,p.InputTooltipPosition=_s,p.InputType=gs,p.LoadingBackgroundColor=Es,p.LoadingSize=Ss,p.ModalElevation=Ra,p.ModalVariant=ta,p.NotificationListPosition=ua,p.NotificationType=aa,p.NotificationVariant=na,p.ParagraphType=ws,p.ProgressColor=As,p.RadioVariant=$s,p.SegmentControlSize=xs,p.SelectSize=Bs,p.SelectStatus=Ms,p.SelectTooltipPlacement=Vs,p.SelectTooltipPosition=Ls,p.SpacerSize=Tt,p.SubtitleType=Ps,p.TabsColor=la,p.TabsVariant=tt,p.TextAreaResize=Hs,p.TextAreaSize=qs,p.TextAreaStatus=Us,p.TextAreaType=zs,p.ThemeProvider=nn,p.TooltipPlacement=bs,p.TooltipPosition=ks,p.WrapperSpace=Xe,p.accordionConfig=Nt,p.accordionItemConfig=Ye,p.activeTagsConfig=sr,p.buttonConfig=Z,p.captionConfig=Ta,p.cardConfig=te,p.carouselConfig=Re,p.checkboxCardConfig=re,p.checkboxCardGroupConfig=ue,p.checkboxConfig=he,p.chipConfig=Ne,p.containerConfig=lt,p.editableSelectConfig=Y,p.flexElementConfig=Dt,p.flexLayoutConfig=ze,p.gridElementConfig=tr,p.gridLayoutConfig=oe,p.headingConfig=Ge,p.horizontalRuleConfig=Pe,p.iconConfig=ve,p.indicatorConfig=et,p.inlineEditableConfig=Ja,p.inputConfig=ae,p.loadingConfig=_e,p.modalConfig=we,p.notificationConfig=ye,p.notificationListConfig=Ue,p.optionConfig=xe,p.paragraphConfig=it,p.passwordConfirmationConfig=xt,p.progressConfig=At,p.radioConfig=Ce,p.segmentControlConfig=ke,p.selectConfig=ne,p.spacerConfig=Ze,p.stepperConfig=Te,p.subtitleConfig=Ft,p.tableConfig=Oe,p.tabsConfig=me,p.textAreaConfig=de,p.tooltipConfig=Ie,p.twoColumnsConfig=ut,p.wrapperConfig=De,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});