@rededor/cura 2.0.0-alpha.13 → 2.0.0-alpha.16

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 (168) hide show
  1. package/dist/cjs/cura-accordion_22.cjs.entry.js +65 -74
  2. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  3. package/dist/cjs/cura-display.cjs.entry.js +1 -1
  4. package/dist/cjs/cura-dropdown-search-not-found.cjs.entry.js +1 -1
  5. package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
  6. package/dist/cjs/cura-input-date.cjs.entry.js +1 -1
  7. package/dist/cjs/cura-input-textarea.cjs.entry.js +236 -0
  8. package/dist/cjs/cura-loader-bar.cjs.entry.js +1 -1
  9. package/dist/cjs/cura-modal.cjs.entry.js +1 -1
  10. package/dist/cjs/cura-progress-bar_2.cjs.entry.js +2 -2
  11. package/dist/cjs/cura-radio.cjs.entry.js +1 -1
  12. package/dist/cjs/cura-stepper.cjs.entry.js +1 -1
  13. package/dist/cjs/cura-switch.cjs.entry.js +1 -1
  14. package/dist/cjs/cura-tabs-button.cjs.entry.js +1 -1
  15. package/dist/cjs/cura-tabs-transparent.cjs.entry.js +1 -1
  16. package/dist/cjs/cura-toast.cjs.entry.js +1 -1
  17. package/dist/cjs/cura-tooltip.cjs.entry.js +1 -1
  18. package/dist/cjs/cura.cjs.js +1 -1
  19. package/dist/cjs/loader.cjs.js +1 -1
  20. package/dist/cjs/utils-DMHZ2n4p.js +47 -0
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/cura-calendar/cura-calendar.css +13 -1
  23. package/dist/collection/components/cura-calendar/cura-calendar.js +92 -11
  24. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +29 -1
  25. package/dist/collection/components/cura-calendar/cura-calendar.type.js +1 -0
  26. package/dist/collection/components/cura-card/cura-card.js +1 -1
  27. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-category/cura-dropdown-search-category.js +1 -1
  28. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-not-found/cura-dropdown-search-not-found.js +1 -1
  29. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +1 -1
  30. package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +1 -1
  31. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  32. package/dist/collection/components/cura-icons-view/cura-icons-view.js +1 -1
  33. package/dist/collection/components/cura-modal/cura-modal.js +1 -1
  34. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  35. package/dist/collection/components/cura-stepper/cura-progress-bar/cura-progress-bar.js +1 -1
  36. package/dist/collection/components/cura-stepper/cura-stepper-item/cura-stepper-item.js +1 -1
  37. package/dist/collection/components/cura-stepper/cura-stepper.js +1 -1
  38. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  39. package/dist/collection/components/cura-tooltip/cura-tooltip.js +1 -1
  40. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  41. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +1 -1
  42. package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.css +174 -0
  43. package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.js +613 -0
  44. package/dist/collection/components/forms/cura-input-textarea/cura-input-textarea.stories.js +222 -0
  45. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  46. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  47. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  48. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  49. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  50. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  51. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  52. package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +1 -1
  53. package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +1 -1
  54. package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +1 -1
  55. package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +1 -1
  56. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  57. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  58. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  59. package/dist/components/cura-accordion-item.js +1 -1
  60. package/dist/components/cura-alert.js +1 -1
  61. package/dist/components/cura-badge-counter.js +1 -1
  62. package/dist/components/cura-badge-distance.js +1 -1
  63. package/dist/components/cura-badge-pill.js +1 -1
  64. package/dist/components/cura-button-outline.js +1 -1
  65. package/dist/components/cura-button-select.js +1 -1
  66. package/dist/components/cura-button-transparent.js +1 -1
  67. package/dist/components/cura-button.js +1 -1
  68. package/dist/components/cura-calendar.js +1 -1
  69. package/dist/components/cura-card.js +1 -1
  70. package/dist/components/cura-checkbox.js +1 -1
  71. package/dist/components/cura-display.js +1 -1
  72. package/dist/components/cura-dropdown-search-category.js +1 -1
  73. package/dist/components/cura-dropdown-search-not-found.js +1 -1
  74. package/dist/components/cura-dropdown-search-option.js +1 -1
  75. package/dist/components/cura-dropdown-search.js +1 -1
  76. package/dist/components/cura-heading.js +1 -1
  77. package/dist/components/cura-icon.js +1 -1
  78. package/dist/components/cura-icons-view.js +1 -1
  79. package/dist/components/cura-input-date.js +1 -1
  80. package/dist/components/cura-input-text.js +1 -1
  81. package/dist/components/cura-input-textarea.d.ts +11 -0
  82. package/dist/components/cura-input-textarea.js +1 -0
  83. package/dist/components/cura-label.js +1 -1
  84. package/dist/components/cura-loader-bar.js +1 -1
  85. package/dist/components/cura-loader-circle.js +1 -1
  86. package/dist/components/cura-modal.js +1 -1
  87. package/dist/components/cura-page-template.js +1 -1
  88. package/dist/components/cura-paragraph.js +1 -1
  89. package/dist/components/cura-progress-bar.js +1 -1
  90. package/dist/components/cura-radio.js +1 -1
  91. package/dist/components/cura-select-option.js +1 -1
  92. package/dist/components/cura-select.js +1 -1
  93. package/dist/components/cura-stepper-item.js +1 -1
  94. package/dist/components/cura-stepper.js +1 -1
  95. package/dist/components/cura-switch.js +1 -1
  96. package/dist/components/cura-tabs-button.js +1 -1
  97. package/dist/components/cura-tabs-group.js +1 -1
  98. package/dist/components/cura-tabs-transparent.js +1 -1
  99. package/dist/components/cura-tabs.js +1 -1
  100. package/dist/components/cura-toast.js +1 -1
  101. package/dist/components/cura-tooltip.js +1 -1
  102. package/dist/components/index.js +1 -1
  103. package/dist/components/p-B2TDH4aP.js +1 -0
  104. package/dist/components/{p-C05r6CQV.js → p-BHVSbubb.js} +1 -1
  105. package/dist/components/{p-B2RN7oe_.js → p-BKDpza6x.js} +1 -1
  106. package/dist/components/{p-BYA8glxD.js → p-BuETJyzc.js} +1 -1
  107. package/dist/components/p-CalvBU-U.js +1 -0
  108. package/dist/components/{p-CCkEqDZb.js → p-CksTHXxZ.js} +1 -1
  109. package/dist/components/{p-DxJedO3K.js → p-D4hCuriT.js} +1 -1
  110. package/dist/components/{p-fn4zJrKE.js → p-DI66_jP6.js} +1 -1
  111. package/dist/components/{p-Bf21UQXV.js → p-DQP7jRHp.js} +1 -1
  112. package/dist/components/p-DgK8dEko.js +1 -0
  113. package/dist/components/{p-DXlGQp3a.js → p-DgQJ968V.js} +1 -1
  114. package/dist/components/{p-fR02COZb.js → p-Dmalf4Oj.js} +1 -1
  115. package/dist/components/{p-D6xuYQiO.js → p-KovUKiTX.js} +1 -1
  116. package/dist/components/{p-D7WNwjv-.js → p-PiUhcFob.js} +1 -1
  117. package/dist/components/{p-C7so9xnO.js → p-TnCIk87O.js} +1 -1
  118. package/dist/components/{p-BSdkRryc.js → p-i55vIhdM.js} +1 -1
  119. package/dist/cura/cura.esm.js +1 -1
  120. package/dist/cura/{p-bf99e8bf.entry.js → p-18a1cadf.entry.js} +1 -1
  121. package/dist/cura/{p-ddf4d240.entry.js → p-1c48aaa7.entry.js} +1 -1
  122. package/dist/cura/{p-b7369d04.entry.js → p-4178e3e6.entry.js} +1 -1
  123. package/dist/cura/p-5b26a166.entry.js +1 -0
  124. package/dist/cura/{p-42e72d12.entry.js → p-604f1c1d.entry.js} +1 -1
  125. package/dist/cura/{p-9de85de6.entry.js → p-906c8b66.entry.js} +1 -1
  126. package/dist/cura/p-CUmwazb8.js +1 -0
  127. package/dist/cura/p-a305e17a.entry.js +1 -0
  128. package/dist/cura/{p-3a3202f0.entry.js → p-a72db13d.entry.js} +1 -1
  129. package/dist/cura/{p-c247c93b.entry.js → p-b157025d.entry.js} +1 -1
  130. package/dist/cura/{p-f911a6c5.entry.js → p-b447fca2.entry.js} +1 -1
  131. package/dist/cura/{p-2e2e2b4d.entry.js → p-bd649bed.entry.js} +1 -1
  132. package/dist/cura/{p-c18d7f16.entry.js → p-c987ddde.entry.js} +1 -1
  133. package/dist/cura/{p-b14ae206.entry.js → p-d43fb791.entry.js} +1 -1
  134. package/dist/cura/{p-7965fe63.entry.js → p-d64ef37d.entry.js} +1 -1
  135. package/dist/cura/{p-1dc9c478.entry.js → p-f072b011.entry.js} +1 -1
  136. package/dist/cura/{p-5357f7bd.entry.js → p-f407bd73.entry.js} +1 -1
  137. package/dist/cura/p-f638eda8.entry.js +1 -0
  138. package/dist/esm/cura-accordion_22.entry.js +58 -67
  139. package/dist/esm/cura-checkbox.entry.js +1 -1
  140. package/dist/esm/cura-display.entry.js +1 -1
  141. package/dist/esm/cura-dropdown-search-not-found.entry.js +1 -1
  142. package/dist/esm/cura-icons-view.entry.js +1 -1
  143. package/dist/esm/cura-input-date.entry.js +1 -1
  144. package/dist/esm/cura-input-textarea.entry.js +234 -0
  145. package/dist/esm/cura-loader-bar.entry.js +1 -1
  146. package/dist/esm/cura-modal.entry.js +1 -1
  147. package/dist/esm/cura-progress-bar_2.entry.js +2 -2
  148. package/dist/esm/cura-radio.entry.js +1 -1
  149. package/dist/esm/cura-stepper.entry.js +1 -1
  150. package/dist/esm/cura-switch.entry.js +1 -1
  151. package/dist/esm/cura-tabs-button.entry.js +1 -1
  152. package/dist/esm/cura-tabs-transparent.entry.js +1 -1
  153. package/dist/esm/cura-toast.entry.js +1 -1
  154. package/dist/esm/cura-tooltip.entry.js +1 -1
  155. package/dist/esm/cura.js +1 -1
  156. package/dist/esm/loader.js +1 -1
  157. package/dist/esm/utils-BZCR971L.js +41 -0
  158. package/dist/types/components/cura-calendar/cura-calendar.d.ts +20 -2
  159. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +29 -0
  160. package/dist/types/components/cura-calendar/cura-calendar.type.d.ts +4 -0
  161. package/dist/types/components/forms/cura-input-textarea/cura-input-textarea.d.ts +116 -0
  162. package/dist/types/components/forms/cura-input-textarea/cura-input-textarea.stories.d.ts +188 -0
  163. package/dist/types/components.d.ts +232 -0
  164. package/package.json +2 -2
  165. package/dist/components/p-B8xnU6YS.js +0 -1
  166. package/dist/components/p-CG1lz5DR.js +0 -1
  167. package/dist/cura/p-47fdb124.entry.js +0 -1
  168. package/dist/cura/p-cbe8c690.entry.js +0 -1
@@ -5,8 +5,10 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { ChangeDateInViewEvent } from "./components/cura-calendar/cura-calendar.type";
8
9
  import { MaskPreset } from "./components/forms/cura-input-text/cura-input-text";
9
10
  import { Step } from "./components/cura-stepper/stepper.type";
11
+ export { ChangeDateInViewEvent } from "./components/cura-calendar/cura-calendar.type";
10
12
  export { MaskPreset } from "./components/forms/cura-input-text/cura-input-text";
11
13
  export { Step } from "./components/cura-stepper/stepper.type";
12
14
  export namespace Components {
@@ -529,6 +531,12 @@ export namespace Components {
529
531
  * @default false
530
532
  */
531
533
  "isDisabled": boolean;
534
+ /**
535
+ * Loading state
536
+ * @type {boolean}
537
+ * @default false
538
+ */
539
+ "isLoading": boolean;
532
540
  /**
533
541
  * Limits the selectable date range.
534
542
  * @type {Date | null}
@@ -1064,6 +1072,87 @@ export namespace Components {
1064
1072
  */
1065
1073
  "value": string | number;
1066
1074
  }
1075
+ interface CuraInputTextarea {
1076
+ /**
1077
+ * Whether the textarea should have autocomplete
1078
+ * @default 'on'
1079
+ */
1080
+ "autocomplete"?: string;
1081
+ /**
1082
+ * Whether the textarea is disabled (default: false)
1083
+ * @default false
1084
+ */
1085
+ "disabled"?: boolean;
1086
+ /**
1087
+ * Helper text displayed below the textarea
1088
+ */
1089
+ "helperText"?: string;
1090
+ /**
1091
+ * Removes the alertCircle icon when necessary (as used in CuraDropdownSearch)
1092
+ * @default false
1093
+ */
1094
+ "hideErrorIcon": boolean;
1095
+ /**
1096
+ * Cura icon name to display
1097
+ * @default ''
1098
+ */
1099
+ "iconName"?: string;
1100
+ /**
1101
+ * Whether the textarea is in loading state (default: false)
1102
+ * @default false
1103
+ */
1104
+ "isLoading"?: boolean;
1105
+ /**
1106
+ * Label text for the textarea
1107
+ * @default ''
1108
+ */
1109
+ "label"?: string;
1110
+ /**
1111
+ * Maximum length of the textarea value
1112
+ */
1113
+ "maxlength"?: number | undefined;
1114
+ /**
1115
+ * Name for the textarea
1116
+ * @default ''
1117
+ */
1118
+ "name"?: string;
1119
+ /**
1120
+ * Placeholder text
1121
+ * @default null
1122
+ */
1123
+ "placeholder"?: string | null;
1124
+ /**
1125
+ * Whether the textarea is read-only (default: false)
1126
+ * @default false
1127
+ */
1128
+ "readOnly"?: boolean;
1129
+ /**
1130
+ * Whether the textarea is required (default: false)
1131
+ * @default false
1132
+ */
1133
+ "required"?: boolean;
1134
+ /**
1135
+ * Whether the textarea is resizable (default: true)
1136
+ * @default true
1137
+ */
1138
+ "resizable"?: boolean;
1139
+ "setFocus": () => Promise<void>;
1140
+ /**
1141
+ * Size of the textarea: 'small', 'medium', or 'large' (default: 'medium')
1142
+ * @default 'medium'
1143
+ */
1144
+ "size": 'small' | 'medium' | 'large' | string;
1145
+ /**
1146
+ * Indicates input status (default: 'default')
1147
+ * @default 'default'
1148
+ */
1149
+ "status": 'error' | 'success' | 'default' | string;
1150
+ /**
1151
+ * Initial value of the textarea
1152
+ * @default ''
1153
+ */
1154
+ "value": string | number;
1155
+ }
1067
1156
  interface CuraLabel {
1068
1157
  /**
1069
1158
  * Text color. Values: Color from design system scheme. Default to the font color from the theme.
@@ -1650,6 +1739,10 @@ export interface CuraInputTextCustomEvent<T> extends CustomEvent<T> {
1650
1739
  detail: T;
1651
1740
  target: HTMLCuraInputTextElement;
1652
1741
  }
1742
+ export interface CuraInputTextareaCustomEvent<T> extends CustomEvent<T> {
1743
+ detail: T;
1744
+ target: HTMLCuraInputTextareaElement;
1745
+ }
1653
1746
  export interface CuraModalCustomEvent<T> extends CustomEvent<T> {
1654
1747
  detail: T;
1655
1748
  target: HTMLCuraModalElement;
@@ -1787,6 +1880,7 @@ declare global {
1787
1880
  };
1788
1881
  interface HTMLCuraCalendarElementEventMap {
1789
1882
  "onchangeday": { days: Date[] };
1883
+ "changeDateInView": ChangeDateInViewEvent;
1790
1884
  }
1791
1885
  interface HTMLCuraCalendarElement extends Components.CuraCalendar, HTMLStencilElement {
1792
1886
  addEventListener<K extends keyof HTMLCuraCalendarElementEventMap>(type: K, listener: (this: HTMLCuraCalendarElement, ev: CuraCalendarCustomEvent<HTMLCuraCalendarElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -1944,6 +2038,24 @@ declare global {
1944
2038
  prototype: HTMLCuraInputTextElement;
1945
2039
  new (): HTMLCuraInputTextElement;
1946
2040
  };
2041
+ interface HTMLCuraInputTextareaElementEventMap {
2042
+ "valueChange": string | number;
2043
+ "inputClear": string | number;
2044
+ }
2045
+ interface HTMLCuraInputTextareaElement extends Components.CuraInputTextarea, HTMLStencilElement {
2046
+ addEventListener<K extends keyof HTMLCuraInputTextareaElementEventMap>(type: K, listener: (this: HTMLCuraInputTextareaElement, ev: CuraInputTextareaCustomEvent<HTMLCuraInputTextareaElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2047
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2048
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2049
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2050
+ removeEventListener<K extends keyof HTMLCuraInputTextareaElementEventMap>(type: K, listener: (this: HTMLCuraInputTextareaElement, ev: CuraInputTextareaCustomEvent<HTMLCuraInputTextareaElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2051
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2052
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2053
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2054
+ }
2055
+ var HTMLCuraInputTextareaElement: {
2056
+ prototype: HTMLCuraInputTextareaElement;
2057
+ new (): HTMLCuraInputTextareaElement;
2058
+ };
1947
2059
  interface HTMLCuraLabelElement extends Components.CuraLabel, HTMLStencilElement {
1948
2060
  }
1949
2061
  var HTMLCuraLabelElement: {
@@ -2195,6 +2307,7 @@ declare global {
2195
2307
  "cura-icons-view": HTMLCuraIconsViewElement;
2196
2308
  "cura-input-date": HTMLCuraInputDateElement;
2197
2309
  "cura-input-text": HTMLCuraInputTextElement;
2310
+ "cura-input-textarea": HTMLCuraInputTextareaElement;
2198
2311
  "cura-label": HTMLCuraLabelElement;
2199
2312
  "cura-loader-bar": HTMLCuraLoaderBarElement;
2200
2313
  "cura-loader-circle": HTMLCuraLoaderCircleElement;
@@ -2764,6 +2877,12 @@ declare namespace LocalJSX {
2764
2877
  * @default false
2765
2878
  */
2766
2879
  "isDisabled"?: boolean;
2880
+ /**
2881
+ * Loading state
2882
+ * @type {boolean}
2883
+ * @default false
2884
+ */
2885
+ "isLoading"?: boolean;
2767
2886
  /**
2768
2887
  * Limits the selectable date range.
2769
2888
  * @type {Date | null}
@@ -2794,6 +2913,12 @@ declare namespace LocalJSX {
2794
2913
  * @default 'single'
2795
2914
  */
2796
2915
  "mode"?: 'single' | 'multiple' | 'range';
2916
+ /**
2917
+ * Event emitted when dates displayed changes
2918
+ * @event
2919
+ * @type {EventEmitter<ChangeDateInViewEvent>}
2920
+ */
2921
+ "onChangeDateInView"?: (event: CuraCalendarCustomEvent<ChangeDateInViewEvent>) => void;
2797
2922
  /**
2798
2923
  * Event emitted when a day is changed.
2799
2924
  * @event
@@ -3338,6 +3463,92 @@ declare namespace LocalJSX {
3338
3463
  */
3339
3464
  "value"?: string | number;
3340
3465
  }
3466
+ interface CuraInputTextarea {
3467
+ /**
3468
+ * Whether the textarea should have autocomplete
3469
+ * @default 'on'
3470
+ */
3471
+ "autocomplete"?: string;
3472
+ /**
3473
+ * Whether the textarea is disabled (default: false)
3474
+ * @default false
3475
+ */
3476
+ "disabled"?: boolean;
3477
+ /**
3478
+ * The `id` of a `<form>` element to associate this element with.
3479
+ */
3480
+ "form"?: string;
3481
+ /**
3482
+ * Helper text displayed below the textarea
3483
+ */
3484
+ "helperText"?: string;
3485
+ /**
3486
+ * Removes the alertCircle icon when necessary (as used in CuraDropdownSearch)
3487
+ * @default false
3488
+ */
3489
+ "hideErrorIcon"?: boolean;
3490
+ /**
3491
+ * Cura icon name to display
3492
+ * @default ''
3493
+ */
3494
+ "iconName"?: string;
3495
+ /**
3496
+ * Whether the textarea is in loading state (default: false)
3497
+ * @default false
3498
+ */
3499
+ "isLoading"?: boolean;
3500
+ /**
3501
+ * Label text for the textarea
3502
+ * @default ''
3503
+ */
3504
+ "label"?: string;
3505
+ /**
3506
+ * Maximum length of the textarea value
3507
+ */
3508
+ "maxlength"?: number | undefined;
3509
+ /**
3510
+ * Name for the textarea
3511
+ * @default ''
3512
+ */
3513
+ "name"?: string;
3514
+ "onInputClear"?: (event: CuraInputTextareaCustomEvent<string | number>) => void;
3515
+ "onValueChange"?: (event: CuraInputTextareaCustomEvent<string | number>) => void;
3516
+ /**
3517
+ * Placeholder text
3518
+ * @default null
3519
+ */
3520
+ "placeholder"?: string | null;
3521
+ /**
3522
+ * Whether the textarea is read-only (default: false)
3523
+ * @default false
3524
+ */
3525
+ "readOnly"?: boolean;
3526
+ /**
3527
+ * Whether the textarea is required (default: false)
3528
+ * @default false
3529
+ */
3530
+ "required"?: boolean;
3531
+ /**
3532
+ * Whether the textarea is resizable (default: true)
3533
+ * @default true
3534
+ */
3535
+ "resizable"?: boolean;
3536
+ /**
3537
+ * Size of the textarea: 'small', 'medium', or 'large' (default: 'medium')
3538
+ * @default 'medium'
3539
+ */
3540
+ "size"?: 'small' | 'medium' | 'large' | string;
3541
+ /**
3542
+ * Indicates input status (default: 'default')
3543
+ * @default 'default'
3544
+ */
3545
+ "status"?: 'error' | 'success' | 'default' | string;
3546
+ /**
3547
+ * Initial value of the textarea
3548
+ * @default ''
3549
+ */
3550
+ "value"?: string | number;
3551
+ }
3341
3552
  interface CuraLabel {
3342
3553
  /**
3343
3554
  * Text color. Values: Color from design system scheme. Default to the font color from the theme.
@@ -4050,6 +4261,7 @@ declare namespace LocalJSX {
4050
4261
  }
4051
4262
  interface CuraCalendarAttributes {
4052
4263
  "isDisabled": boolean;
4264
+ "isLoading": boolean;
4053
4265
  "period": null | string[] | string;
4054
4266
  "width": string;
4055
4267
  "minWidth": string;
@@ -4178,6 +4390,24 @@ declare namespace LocalJSX {
4178
4390
  "hideErrorIcon": boolean;
4179
4391
  "autocomplete": string;
4180
4392
  }
4393
+ interface CuraInputTextareaAttributes {
4394
+ "status": 'error' | 'success' | 'default' | string;
4395
+ "size": 'small' | 'medium' | 'large' | string;
4396
+ "label": string;
4397
+ "name": string;
4398
+ "placeholder": string | null;
4399
+ "value": string;
4400
+ "iconName": string;
4401
+ "helperText": string;
4402
+ "disabled": boolean;
4403
+ "required": boolean;
4404
+ "maxlength": number | undefined;
4405
+ "readOnly": boolean;
4406
+ "resizable": boolean;
4407
+ "isLoading": boolean;
4408
+ "hideErrorIcon": boolean;
4409
+ "autocomplete": string;
4410
+ }
4181
4411
  interface CuraLabelAttributes {
4182
4412
  "size": 'medium' | 'large' | 'small' | 'xsmall' | string;
4183
4413
  "weight": 'regular' | 'bold';
@@ -4362,6 +4592,7 @@ declare namespace LocalJSX {
4362
4592
  "cura-icons-view": CuraIconsView;
4363
4593
  "cura-input-date": Omit<CuraInputDate, keyof CuraInputDateAttributes> & { [K in keyof CuraInputDate & keyof CuraInputDateAttributes]?: CuraInputDate[K] } & { [K in keyof CuraInputDate & keyof CuraInputDateAttributes as `attr:${K}`]?: CuraInputDateAttributes[K] } & { [K in keyof CuraInputDate & keyof CuraInputDateAttributes as `prop:${K}`]?: CuraInputDate[K] };
4364
4594
  "cura-input-text": Omit<CuraInputText, keyof CuraInputTextAttributes> & { [K in keyof CuraInputText & keyof CuraInputTextAttributes]?: CuraInputText[K] } & { [K in keyof CuraInputText & keyof CuraInputTextAttributes as `attr:${K}`]?: CuraInputTextAttributes[K] } & { [K in keyof CuraInputText & keyof CuraInputTextAttributes as `prop:${K}`]?: CuraInputText[K] };
4595
+ "cura-input-textarea": Omit<CuraInputTextarea, keyof CuraInputTextareaAttributes> & { [K in keyof CuraInputTextarea & keyof CuraInputTextareaAttributes]?: CuraInputTextarea[K] } & { [K in keyof CuraInputTextarea & keyof CuraInputTextareaAttributes as `attr:${K}`]?: CuraInputTextareaAttributes[K] } & { [K in keyof CuraInputTextarea & keyof CuraInputTextareaAttributes as `prop:${K}`]?: CuraInputTextarea[K] };
4365
4596
  "cura-label": Omit<CuraLabel, keyof CuraLabelAttributes> & { [K in keyof CuraLabel & keyof CuraLabelAttributes]?: CuraLabel[K] } & { [K in keyof CuraLabel & keyof CuraLabelAttributes as `attr:${K}`]?: CuraLabelAttributes[K] } & { [K in keyof CuraLabel & keyof CuraLabelAttributes as `prop:${K}`]?: CuraLabel[K] };
4366
4597
  "cura-loader-bar": Omit<CuraLoaderBar, keyof CuraLoaderBarAttributes> & { [K in keyof CuraLoaderBar & keyof CuraLoaderBarAttributes]?: CuraLoaderBar[K] } & { [K in keyof CuraLoaderBar & keyof CuraLoaderBarAttributes as `attr:${K}`]?: CuraLoaderBarAttributes[K] } & { [K in keyof CuraLoaderBar & keyof CuraLoaderBarAttributes as `prop:${K}`]?: CuraLoaderBar[K] };
4367
4598
  "cura-loader-circle": Omit<CuraLoaderCircle, keyof CuraLoaderCircleAttributes> & { [K in keyof CuraLoaderCircle & keyof CuraLoaderCircleAttributes]?: CuraLoaderCircle[K] } & { [K in keyof CuraLoaderCircle & keyof CuraLoaderCircleAttributes as `attr:${K}`]?: CuraLoaderCircleAttributes[K] } & { [K in keyof CuraLoaderCircle & keyof CuraLoaderCircleAttributes as `prop:${K}`]?: CuraLoaderCircle[K] };
@@ -4412,6 +4643,7 @@ declare module "@stencil/core" {
4412
4643
  "cura-icons-view": LocalJSX.IntrinsicElements["cura-icons-view"] & JSXBase.HTMLAttributes<HTMLCuraIconsViewElement>;
4413
4644
  "cura-input-date": LocalJSX.IntrinsicElements["cura-input-date"] & JSXBase.HTMLAttributes<HTMLCuraInputDateElement>;
4414
4645
  "cura-input-text": LocalJSX.IntrinsicElements["cura-input-text"] & JSXBase.HTMLAttributes<HTMLCuraInputTextElement>;
4646
+ "cura-input-textarea": LocalJSX.IntrinsicElements["cura-input-textarea"] & JSXBase.HTMLAttributes<HTMLCuraInputTextareaElement>;
4415
4647
  "cura-label": LocalJSX.IntrinsicElements["cura-label"] & JSXBase.HTMLAttributes<HTMLCuraLabelElement>;
4416
4648
  "cura-loader-bar": LocalJSX.IntrinsicElements["cura-loader-bar"] & JSXBase.HTMLAttributes<HTMLCuraLoaderBarElement>;
4417
4649
  "cura-loader-circle": LocalJSX.IntrinsicElements["cura-loader-circle"] & JSXBase.HTMLAttributes<HTMLCuraLoaderCircleElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rededor/cura",
3
- "version": "2.0.0-alpha.13",
3
+ "version": "2.0.0-alpha.16",
4
4
  "description": "Cura Design System",
5
5
  "author": "Rede D`Or São Luiz",
6
6
  "license": "MIT",
@@ -54,5 +54,5 @@
54
54
  "storybook": "^7.6.7",
55
55
  "svgo": "^3.3.2"
56
56
  },
57
- "gitHead": "bb552a2580dd57ae90a3367e78c82d658a12b4ea"
57
+ "gitHead": "9dce78a5e320ef39fcaf108999cb9f5ca0272ec5"
58
58
  }
@@ -1 +0,0 @@
1
- import{p as t,H as i,k as r,i as e,j as s,t as u}from"./p-DBXUEjWh.js";import{d as n}from"./p-fn4zJrKE.js";import{d as a}from"./p-BSdkRryc.js";import{d as o}from"./p-Bf21UQXV.js";const h={color:{success:{100:"223,246,233",300:"148,225,181",500:"95,210,144",700:"49,115,77",900:"19,42,29"},info:{100:"207,226,255",300:"149,191,255",500:"110,168,255",700:"66,100,153",900:"37,56,85"},error:{100:"251,221,221",300:"242,143,143",500:"206,42,42",700:"157,58,58",900:"47,17,17"},warning:{100:"252,250,196",300:"248,244,137",500:"245,239,78",700:"108,106,32",900:"49,48,16"},whatsapp:{100:"182,240,204",300:"110,226,153",500:"37,211,102",700:"25,141,68",900:"7,42,20"},neutral:{0:"255,255,255",100:"246,246,246",200:"233,233,233",300:"226,226,226",400:"212,212,212",500:"183,183,183",600:"146,146,146",700:"110,110,110",800:"74,74,74",900:"38,38,38"}},breakpoints:{xsmall:{min:0,max:480},small:{min:481,max:768},medium:{min:769,max:992},large:{min:993,max:1920},xlarge:{min:1921,max:4096}}};function l(){return(null===window||void 0===window?void 0:window.innerWidth)<h.breakpoints.medium.min}function p(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.userAgent)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function d(){document.body.classList.add("cura-body-scroll-lock")}function c(){document.body.classList.contains("cura-body-scroll-lock")&&document.body.classList.remove("cura-body-scroll-lock")}function f(t){return"string"==typeof t||t instanceof String}function g(t){var i;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(i=t.constructor)?void 0:i.name)}function m(t,i){return Array.isArray(i)?m(t,((t,r)=>i.includes(r))):Object.entries(t).reduce(((t,r)=>{let[e,s]=r;return i(s,e)&&(t[e]=s),t}),{})}const x="NONE",b="LEFT",v="FORCE_LEFT",w="RIGHT",k="FORCE_RIGHT";function A(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function F(t,i){if(i===t)return!0;const r=Array.isArray(i),e=Array.isArray(t);let s;if(r&&e){if(i.length!=t.length)return!1;for(s=0;s<i.length;s++)if(!F(i[s],t[s]))return!1;return!0}if(r!=e)return!1;if(i&&t&&"object"==typeof i&&"object"==typeof t){const r=i instanceof Date,e=t instanceof Date;if(r&&e)return i.getTime()==t.getTime();if(r!=e)return!1;const u=i instanceof RegExp,n=t instanceof RegExp;if(u&&n)return i.toString()==t.toString();if(u!=n)return!1;const a=Object.keys(i);for(s=0;s<a.length;s++)if(!Object.prototype.hasOwnProperty.call(t,a[s]))return!1;for(s=0;s<a.length;s++)if(!F(t[a[s]],i[a[s]]))return!1;return!0}return!(!i||!t||"function"!=typeof i||"function"!=typeof t)&&i.toString()===t.toString()}class y{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?x:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?b:w}}function C(t,i){return new C.InputMask(t,i)}function B(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?C.MaskedRegExp:f(t)?C.MaskedPattern:t===Date?C.MaskedDate:t===Number?C.MaskedNumber:Array.isArray(t)||t===Array?C.MaskedDynamic:C.Masked&&t.prototype instanceof C.Masked?t:C.Masked&&t instanceof C.Masked?t.constructor:t instanceof Function?C.MaskedFunction:(console.warn("Mask not found for mask",t),C.Masked)}function E(t){if(!t)throw new Error("Options in not defined");if(C.Masked){if(t.prototype instanceof C.Masked)return{mask:t};const{mask:i,...r}=t instanceof C.Masked?{mask:t}:g(t)&&t.mask instanceof C.Masked?t:{};if(i){const t=i.mask;return{...m(i,((t,i)=>!i.startsWith("_"))),mask:i.constructor,_mask:t,...r}}}return g(t)?{...t}:{mask:t}}function D(t){if(C.Masked&&t instanceof C.Masked)return t;const i=E(t),r=B(i.mask);if(!r)throw new Error("Masked class is not found for provided mask "+i.mask+", appropriate module needs to be imported manually before creating mask.");return i.mask===r&&delete i.mask,i._mask&&(i.mask=i._mask,delete i._mask),new r(i)}C.createMask=D;class _{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,i){if(null!=t&&null!=i&&(t!==this.selectionStart||i!==this.selectionEnd))try{this._unsafeSelect(t,i)}catch{}}get isActive(){return!1}}C.MaskElement=_;class z extends _{constructor(t){super(),this.input=t,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 t,i,r;return null!=(t=null==(i=(r=this.input).getRootNode)?void 0:i.call(r))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){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",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}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={}}}C.HTMLMaskElement=z;class I extends z{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,i){this.input.setSelectionRange(t,i)}get value(){return this.input.value}set value(t){this.input.value=t}}C.HTMLMaskElement=z;class S extends z{get _unsafeSelectionStart(){const t=this.rootElement,i=t.getSelection&&t.getSelection(),r=i&&i.anchorOffset,e=i&&i.focusOffset;return null==e||null==r||r<e?r:e}get _unsafeSelectionEnd(){const t=this.rootElement,i=t.getSelection&&t.getSelection(),r=i&&i.anchorOffset,e=i&&i.focusOffset;return null==e||null==r||r>e?r:e}_unsafeSelect(t,i){if(!this.rootElement.createRange)return;const r=this.rootElement.createRange();r.setStart(this.input.firstChild||this.input,t),r.setEnd(this.input.lastChild||this.input,i);const e=this.rootElement,s=e.getSelection&&e.getSelection();s&&(s.removeAllRanges(),s.addRange(r))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}C.HTMLContenteditableMaskElement=S;class V{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>V.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,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}}V.MAX_LENGTH=100,C.InputMask=class{constructor(t,i){this.el=t instanceof _?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new S(t):new I(t),this.masked=D(i),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new V,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(t){var i;return null==t||(null==(i=this.masked)?void 0:i.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof C.Masked)&&this.masked.constructor===B(t))return void this.masked.updateOptions({mask:t});const i=t instanceof C.Masked?t:D({mask:t});i.unmaskedValue=this.masked.unmaskedValue,this.masked=i}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,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(t,i){const r=this._listeners[t];r&&r.forEach((t=>t(i)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),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(t){const i=this.masked.unmaskedValue,r=this.masked.value,e=this.masked.rawInputValue,s=this.displayValue,u=this.unmaskedValue!==i||this.value!==r||this._rawInputValue!==e;this._unmaskedValue=i,this._value=r,this._rawInputValue=e,this.el.value!==s&&(this.el.value=s),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),u&&this._fireChangeEvents(),this._historyChanging||!u&&!this.history.isEmpty||this.history.push({unmaskedValue:i,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:i,...r}=t,e=!this.maskEquals(i),s=this.masked.optionsIsChanged(r);e&&(this.mask=i),s&&this.masked.updateOptions(r),(e||s)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,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,b))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,i){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(i),this}off(t,i){if(!this._listeners[t])return this;if(!i)return delete this._listeners[t],this;const r=this._listeners[t].indexOf(i);return r>=0&&this._listeners[t].splice(r,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const i=new y({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),r=this.masked.rawInputValue,e=this.masked.splice(i.startChangePos,i.removed.length,i.inserted,i.removeDirection,{input:!0,raw:!0}).offset,s=r===this.masked.rawInputValue?i.removeDirection:x;let u=this.masked.nearestInputPos(i.startChangePos+e,s);s!==x&&(u=this.masked.nearestInputPos(u,x)),this.updateControl(u),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class M{static normalize(t){return Array.isArray(t)?t:[t,new M]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}C.ChangeDetails=M;class O{constructor(t,i,r){void 0===t&&(t=""),void 0===i&&(i=0),this.value=t,this.from=i,this.stop=r}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const i=this.value[0];return this.value=this.value.slice(1),i}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class P{constructor(t){this._value="",this._update({...P.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,i){void 0===i&&(i={input:!0}),this.reset(),this.append(t,i,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,i){return t}totalInputPositions(t,i){return void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),Math.min(this.displayValue.length,i-t)}extractInput(t,i,r){return void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),this.displayValue.slice(t,i)}extractTail(t,i){return void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),new O(this.extractInput(t,i),t)}appendTail(t){return f(t)&&(t=new O(String(t))),t.appendTo(this)}_appendCharRaw(t,i){return t?(this._value+=t,new M({inserted:t,rawInserted:t})):new M}_appendChar(t,i,r){void 0===i&&(i={});const e=this.state;let s;if([t,s]=this.doPrepareChar(t,i),t&&(s=s.aggregate(this._appendCharRaw(t,i)),!s.rawInserted&&"pad"===this.autofix)){const r=this.state;this.state=e;let u=this.pad(i);const n=this._appendCharRaw(t,i);u=u.aggregate(n),n.rawInserted||u.equals(s)?s=u:this.state=r}if(s.inserted){let t,u=!1!==this.doValidate(i);if(u&&null!=r){const i=this.state;if(!0===this.overwrite){t=r.state;for(let t=0;t<s.rawInserted.length;++t)r.unshift(this.displayValue.length-s.tailShift)}let e=this.appendTail(r);if(u=e.rawInserted.length===r.toString().length,!(u&&e.inserted||"shift"!==this.overwrite)){this.state=i,t=r.state;for(let t=0;t<s.rawInserted.length;++t)r.shift();e=this.appendTail(r),u=e.rawInserted.length===r.toString().length}u&&e.inserted&&(this.state=i)}u||(s=new M,this.state=e,r&&t&&(r.state=t))}return s}_appendPlaceholder(){return new M}_appendEager(){return new M}append(t,i,r){if(!f(t))throw new Error("value should be string");const e=f(r)?new O(String(r)):r;let s;null!=i&&i.tail&&(i._beforeTailState=this.state),[t,s]=this.doPrepare(t,i);for(let r=0;r<t.length;++r){const u=this._appendChar(t[r],i,e);if(!u.rawInserted&&!this.doSkipInvalid(t[r],i,e))break;s.aggregate(u)}return(!0===this.eager||"append"===this.eager)&&null!=i&&i.input&&t&&s.aggregate(this._appendEager()),null!=e&&(s.tailShift+=this.appendTail(e).tailShift),s}remove(t,i){return void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(i),new M}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const i=this.rawInputValue,r=this.value,e=t();return this.rawInputValue=i,this.value&&this.value!==r&&0===r.indexOf(this.value)&&(this.append(r.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,e}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const i=this.state,r=t(this);return this.state=i,delete this._isolated,r}doSkipInvalid(t,i,r){return Boolean(this.skipInvalid)}doPrepare(t,i){return void 0===i&&(i={}),M.normalize(this.prepare?this.prepare(t,this,i):t)}doPrepareChar(t,i){return void 0===i&&(i={}),M.normalize(this.prepareChar?this.prepareChar(t,this,i):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,i,r,e,s){void 0===r&&(r=""),void 0===e&&(e=x),void 0===s&&(s={input:!0});const u=t+i,n=this.extractTail(u),a=!0===this.eager||"remove"===this.eager;let o;a&&(e=function(t){switch(t){case b:return v;case w:return k;default:return t}}(e),o=this.extractInput(0,u,{raw:!0}));let h=t;const l=new M;if(e!==x&&(h=this.nearestInputPos(t,i>1&&0!==t&&!a?x:e),l.tailShift=h-t),l.aggregate(this.remove(h)),a&&e!==x&&o===this.rawInputValue)if(e===v){let t;for(;o===this.rawInputValue&&(t=this.displayValue.length);)l.aggregate(new M({tailShift:-1})).aggregate(this.remove(t-1))}else e===k&&n.unshift();return l.aggregate(this.append(r,s,n))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!F(this,t)}typedValueEquals(t){const i=this.typedValue;return t===i||P.EMPTY_VALUES.includes(t)&&P.EMPTY_VALUES.includes(i)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new M}}P.DEFAULTS={skipInvalid:!0},P.EMPTY_VALUES=[void 0,null,""],C.Masked=P;class R{constructor(t,i){void 0===t&&(t=[]),void 0===i&&(i=0),this.chunks=t,this.from=i}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=f(t)?new O(String(t)):t;const i=this.chunks[this.chunks.length-1],r=i&&(i.stop===t.stop||null==t.stop)&&t.from===i.from+i.toString().length;if(t instanceof O)r?i.extend(t.toString()):this.chunks.push(t);else if(t instanceof R){if(null==t.stop){let i;for(;t.chunks.length&&null==t.chunks[0].stop;)i=t.chunks.shift(),i.from+=t.from,this.extend(i)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof C.MaskedPattern))return new O(this.toString()).appendTo(t);const i=new M;for(let r=0;r<this.chunks.length;++r){const e=this.chunks[r],s=t._mapPosToBlock(t.displayValue.length),u=e.stop;let n;if(null!=u&&(!s||s.index<=u)&&((e instanceof R||t._stops.indexOf(u)>=0)&&i.aggregate(t._appendPlaceholder(u)),n=e instanceof R&&t._blocks[u]),n){const r=n.appendTail(e);i.aggregate(r);const s=e.toString().slice(r.rawInserted.length);s&&i.aggregate(t.append(s,{tail:!0}))}else i.aggregate(t.append(e.toString(),{tail:!0}))}return i}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:i,...r}=t;Object.assign(this,r),this.chunks=i.map((t=>{const i="chunks"in t?new R:new O;return i.state=t,i}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const i=null!=t?t-this.from:t;let r=0;for(;r<this.chunks.length;){const t=this.chunks[r],e=t.unshift(i);if(t.toString()){if(!e)break;++r}else this.chunks.splice(r,1);if(e)return e}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const i=this.chunks[t],r=i.shift();if(i.toString()){if(!r)break;--t}else this.chunks.splice(t,1);if(r)return r}return""}}class T{constructor(t,i){this.masked=t,this._log=[];const{offset:r,index:e}=t._mapPosToBlock(i)||(i<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=r,this.index=e,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(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}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(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(i=this.block)?void 0:i.displayValue.length)||0){var i;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,v),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,b),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,b),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,k),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,x),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,x),!0}))}}class j{constructor(t){Object.assign(this,t),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(t,i){return void 0===t&&(t=0),void 0===i&&(i=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(i),this._value||(this._isRawInput=!1),new M}nearestInputPos(t,i){void 0===i&&(i=x);const r=this._value.length;switch(i){case b:case v:return 0;default:return r}}totalInputPositions(t,i){return void 0===t&&(t=0),void 0===i&&(i=this._value.length),this._isRawInput?i-t:0}extractInput(t,i,r){return void 0===t&&(t=0),void 0===i&&(i=this._value.length),void 0===r&&(r={}),r.raw&&this._isRawInput&&this._value.slice(t,i)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,i){if(void 0===i&&(i={}),this.isFilled)return new M;const r=this.char===t&&(this.isUnmasking||i.input||i.raw)&&(!i.raw||!(!0===this.eager||"append"===this.eager))&&!i.tail,e=new M({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(i.raw||i.input),e}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new M;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new O("")}appendTail(t){return f(t)&&(t=new O(String(t))),t.appendTo(this)}append(t,i,r){const e=this._appendChar(t[0],i);return null!=r&&(e.tailShift+=this.appendTail(r).tailShift),e}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class L{constructor(t){const{parent:i,isOptional:r,placeholderChar:e,displayChar:s,lazy:u,eager:n,...a}=t;this.masked=D(a),Object.assign(this,{parent:i,isOptional:r,placeholderChar:e,displayChar:s,lazy:u,eager:n})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,i){return void 0===t&&(t=0),void 0===i&&(i=this.value.length),0===t&&i>=1?(this.isFilled=!1,this.masked.remove(t,i)):new M}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 Boolean(this.masked.value)||this.isOptional}_appendChar(t,i){if(void 0===i&&(i={}),this.isFilled)return new M;const r=this.masked.state;let e=this.masked._appendChar(t,this.currentMaskFlags(i));return e.inserted&&!1===this.doValidate(i)&&(e=new M,this.masked.state=r),e.inserted||this.isOptional||this.lazy||i.input||(e.inserted=this.placeholderChar),e.skip=!e.inserted&&!this.isOptional,this.isFilled=Boolean(e.inserted),e}append(t,i,r){return this.masked.append(t,this.currentMaskFlags(i),r)}_appendPlaceholder(){return this.isFilled||this.isOptional?new M:(this.isFilled=!0,new M({inserted:this.placeholderChar}))}_appendEager(){return new M}extractTail(t,i){return this.masked.extractTail(t,i)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,i,r){return void 0===t&&(t=0),void 0===i&&(i=this.value.length),this.masked.extractInput(t,i,r)}nearestInputPos(t,i){void 0===i&&(i=x);const r=this.value.length,e=Math.min(Math.max(t,0),r);switch(i){case b:case v:return this.isComplete?e:0;case w:case k:return this.isComplete?e:r;default:return e}}totalInputPositions(t,i){return void 0===t&&(t=0),void 0===i&&(i=this.value.length),this.value.slice(t,i).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var i;return{...t,_beforeTailState:(null==t||null==(i=t._beforeTailState)?void 0:i.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new M}}L.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]/,"*":/./},C.MaskedRegExp=class extends P{updateOptions(t){super.updateOptions(t)}_update(t){const i=t.mask;i&&(t.validate=t=>t.search(i)>=0),super._update(t)}};class N extends P{constructor(t){super({...N.DEFAULTS,...t,definitions:Object.assign({},L.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const i=this.mask;if(!i||!t)return;let r=!1,e=!1;for(let s=0;s<i.length;++s){if(this.blocks){const t=i.slice(s),r=Object.keys(this.blocks).filter((i=>0===t.indexOf(i)));r.sort(((t,i)=>i.length-t.length));const e=r[0];if(e){const{expose:t,repeat:i,...r}=E(this.blocks[e]),u={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...r,repeat:i,parent:this},n=null!=i?new C.RepeatBlock(u):D(u);n&&(this._blocks.push(n),t&&(this.exposeBlock=n),this._maskedBlocks[e]||(this._maskedBlocks[e]=[]),this._maskedBlocks[e].push(this._blocks.length-1)),s+=e.length-1;continue}}let u=i[s],n=u in t;if(u===N.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===u||"}"===u){r=!r;continue}if("["===u||"]"===u){e=!e;continue}if(u===N.ESCAPE_CHAR){if(++s,u=i[s],!u)break;n=!1}const a=n?new L({isOptional:e,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...E(t[u]),parent:this}):new j({char:u,eager:this.eager,isUnmasking:r});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:i,...r}=t;this._blocks.forEach(((t,r)=>t.state=i[r])),super.state=r}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,i)=>t+i.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(i),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,i)=>t+i.value),"")}set value(t){if(this.exposeBlock){const i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(i),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(i),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,i)=>t+i.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const i=new M;let r=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==r)return i;this._blocks[r].isFilled&&++r;for(let t=r;t<this._blocks.length;++t){const r=this._blocks[t]._appendEager();if(!r.inserted)break;i.aggregate(r)}return i}_appendCharRaw(t,i){void 0===i&&(i={});const r=this._mapPosToBlock(this.displayValue.length),e=new M;if(!r)return e;for(let u,n=r.index;u=this._blocks[n];++n){var s;const r=u._appendChar(t,{...i,_beforeTailState:null==(s=i._beforeTailState)||null==(s=s._blocks)?void 0:s[n]});if(e.aggregate(r),r.consumed)break}return e}extractTail(t,i){void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length);const r=new R;return t===i||this._forEachBlocksInRange(t,i,((t,i,e,s)=>{const u=t.extractTail(e,s);u.stop=this._findStopBefore(i),u.from=this._blockStartPos(i),u instanceof R&&(u.blockIndex=i),r.extend(u)})),r}extractInput(t,i,r){if(void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),void 0===r&&(r={}),t===i)return"";let e="";return this._forEachBlocksInRange(t,i,((t,i,s,u)=>{e+=t.extractInput(s,u,r)})),e}_findStopBefore(t){let i;for(let r=0;r<this._stops.length;++r){const e=this._stops[r];if(!(e<=t))break;i=e}return i}_appendPlaceholder(t){const i=new M;if(this.lazy&&null==t)return i;const r=this._mapPosToBlock(this.displayValue.length);return r?(this._blocks.slice(r.index,null!=t?t:this._blocks.length).forEach((r=>{var e;r.lazy&&null==t||i.aggregate(r._appendPlaceholder(null==(e=r._blocks)?void 0:e.length))})),i):i}_mapPosToBlock(t){let i="";for(let r=0;r<this._blocks.length;++r){const e=i.length;if(i+=this._blocks[r].displayValue,t<=i.length)return{index:r,offset:t-e}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,i)=>t+i.displayValue.length),0)}_forEachBlocksInRange(t,i,r){void 0===i&&(i=this.displayValue.length);const e=this._mapPosToBlock(t);if(e){const t=this._mapPosToBlock(i),s=t&&e.index===t.index;if(r(this._blocks[e.index],e.index,e.offset,t&&s?t.offset:this._blocks[e.index].displayValue.length),t&&!s){for(let i=e.index+1;i<t.index;++i)r(this._blocks[i],i,0,this._blocks[i].displayValue.length);r(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,i){void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length);const r=super.remove(t,i);return this._forEachBlocksInRange(t,i,((t,i,e,s)=>{r.aggregate(t.remove(e,s))})),r}nearestInputPos(t,i){if(void 0===i&&(i=x),!this._blocks.length)return 0;const r=new T(this,t);if(i===x)return r.pushRightBeforeInput()?r.pos:(r.popState(),r.pushLeftBeforeInput()?r.pos:this.displayValue.length);if(i===b||i===v){if(i===b){if(r.pushRightBeforeFilled(),r.ok&&r.pos===t)return t;r.popState()}if(r.pushLeftBeforeInput(),r.pushLeftBeforeRequired(),r.pushLeftBeforeFilled(),i===b){if(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.ok&&r.pos<=t)return r.pos;if(r.popState(),r.ok&&r.pos<=t)return r.pos;r.popState()}return r.ok?r.pos:i===v?0:(r.popState(),r.ok?r.pos:(r.popState(),r.ok?r.pos:0))}return i===w||i===k?(r.pushRightBeforeInput(),r.pushRightBeforeRequired(),r.pushRightBeforeFilled()?r.pos:i===k?this.displayValue.length:(r.popState(),r.ok?r.pos:(r.popState(),r.ok?r.pos:this.nearestInputPos(t,b)))):t}totalInputPositions(t,i){void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length);let r=0;return this._forEachBlocksInRange(t,i,((t,i,e,s)=>{r+=t.totalInputPositions(e,s)})),r}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const i=this._maskedBlocks[t];return i?i.map((t=>this._blocks[t])):[]}pad(t){const i=new M;return this._forEachBlocksInRange(0,this.displayValue.length,(r=>i.aggregate(r.pad(t)))),i}}N.DEFAULTS={...P.DEFAULTS,lazy:!0,placeholderChar:"_"},N.STOP_CHAR="`",N.ESCAPE_CHAR="\\",N.InputDefinition=L,N.FixedDefinition=j,C.MaskedPattern=N;class q extends N{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:i=this.to||0,from:r=this.from||0,maxLength:e=this.maxLength||0,autofix:s=this.autofix,...u}=t;this.to=i,this.from=r,this.maxLength=Math.max(String(i).length,e),this.autofix=s;const n=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let o=0;for(;o<a.length&&a[o]===n[o];)++o;u.mask=a.slice(0,o).replace(/0/g,"\\0")+"0".repeat(this.maxLength-o),super._update(u)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let i="",r="";const[,e,s]=t.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(i="0".repeat(e.length)+s,r="9".repeat(e.length)+s),i=i.padEnd(this.maxLength,"0"),r=r.padEnd(this.maxLength,"9"),[i,r]}doPrepareChar(t,i){let r;return void 0===i&&(i={}),[t,r]=super.doPrepareChar(t.replace(/\D/g,""),i),t||(r.skip=!this.isComplete),[t,r]}_appendCharRaw(t,i){if(void 0===i&&(i={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,i);const r=String(this.from).padStart(this.maxLength,"0"),e=String(this.to).padStart(this.maxLength,"0"),[s,u]=this.boundaries(this.value+t);return Number(u)<this.from?super._appendCharRaw(r[this.value.length],i):Number(s)>this.to?!i.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(r[this.value.length],i).aggregate(this._appendCharRaw(t,i)):super._appendCharRaw(e[this.value.length],i):super._appendCharRaw(t,i)}doValidate(t){const i=this.value;if(-1===i.search(/[^0]/)&&i.length<=this._matchFrom)return!0;const[r,e]=this.boundaries(i);return this.from<=Number(e)&&Number(r)<=this.to&&super.doValidate(t)}pad(t){const i=new M;if(this.value.length===this.maxLength)return i;const r=this.value,e=this.maxLength-this.value.length;if(e){this.reset();for(let r=0;r<e;++r)i.aggregate(super._appendCharRaw("0",t));r.split("").forEach((t=>this._appendCharRaw(t)))}return i}}C.MaskedRange=q;class U extends N{static extractPatternOptions(t){const{mask:i,pattern:r,...e}=t;return{...e,mask:f(i)?i:r}}constructor(t){super(U.extractPatternOptions({...U.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:i,pattern:r,blocks:e,...s}={...U.DEFAULTS,...t},u=Object.assign({},U.GET_DEFAULT_BLOCKS());t.min&&(u.Y.from=t.min.getFullYear()),t.max&&(u.Y.to=t.max.getFullYear()),t.min&&t.max&&u.Y.from===u.Y.to&&(u.m.from=t.min.getMonth()+1,u.m.to=t.max.getMonth()+1,u.m.from===u.m.to&&(u.d.from=t.min.getDate(),u.d.to=t.max.getDate())),Object.assign(u,this.blocks,e),super._update({...s,mask:f(i)?i:r,blocks:u})}doValidate(t){const i=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=i&&(null==this.min||this.min<=i)&&(null==this.max||i<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(U.extractPatternOptions(t))}}U.GET_DEFAULT_BLOCKS=()=>({d:{mask:q,from:1,to:31,maxLength:2},m:{mask:q,from:1,to:12,maxLength:2},Y:{mask:q,from:1900,to:9999}}),U.DEFAULTS={...N.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:t=>t?[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join("."):"",parse:t=>{const[i,r,e]=t.split(".").map(Number);return new Date(e,r-1,i)}},C.MaskedDate=U;class H extends P{constructor(t){super({...H.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:i,...r}=E(t),e=D({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return i&&(this.exposeMask=e),e})):[])}_appendCharRaw(t,i){void 0===i&&(i={});const r=this._applyDispatch(t,i);return this.currentMask&&r.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(i))),r}_applyDispatch(t,i,r){void 0===t&&(t=""),void 0===i&&(i={}),void 0===r&&(r="");const e=i.tail&&null!=i._beforeTailState?i._beforeTailState._value:this.value,s=this.rawInputValue,u=i.tail&&null!=i._beforeTailState?i._beforeTailState._rawInputValue:s,n=s.slice(u.length),a=this.currentMask,o=new M,h=null==a?void 0:a.state;return this.currentMask=this.doDispatch(t,{...i},r),this.currentMask&&(this.currentMask!==a?(this.currentMask.reset(),u&&(this.currentMask.append(u,{raw:!0}),o.tailShift=this.currentMask.value.length-e.length),n&&(o.tailShift+=this.currentMask.append(n,{raw:!0,tail:!0}).tailShift)):h&&(this.currentMask.state=h)),o}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const i=new M;return t&&i.aggregate(this._applyDispatch("",{},t)),i.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var i,r;return{...t,_beforeTailState:(null==(i=t._beforeTailState)?void 0:i.currentMaskRef)===this.currentMask&&(null==(r=t._beforeTailState)?void 0:r.currentMask)||t._beforeTailState}}doDispatch(t,i,r){return void 0===i&&(i={}),void 0===r&&(r=""),this.dispatch(t,this,i,r)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,i){void 0===i&&(i={});let[r,e]=super.doPrepare(t,i);if(this.currentMask){let t;[r,t]=super.doPrepare(r,this.currentMaskFlags(i)),e=e.aggregate(t)}return[r,e]}doPrepareChar(t,i){void 0===i&&(i={});let[r,e]=super.doPrepareChar(t,i);if(this.currentMask){let t;[r,t]=super.doPrepareChar(r,this.currentMaskFlags(i)),e=e.aggregate(t)}return[r,e]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let i=String(t);this.currentMask&&(this.currentMask.typedValue=t,i=this.currentMask.unmaskedValue),this.unmaskedValue=i}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,i){const r=new M;return this.currentMask&&r.aggregate(this.currentMask.remove(t,i)).aggregate(this._applyDispatch()),r}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:i,currentMaskRef:r,currentMask:e,...s}=t;i&&this.compiledMasks.forEach(((t,r)=>t.state=i[r])),null!=r&&(this.currentMask=r,this.currentMask.state=e),super.state=s}extractInput(t,i,r){return this.currentMask?this.currentMask.extractInput(t,i,r):""}extractTail(t,i){return this.currentMask?this.currentMask.extractTail(t,i):super.extractTail(t,i)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,i){return this.currentMask?this.currentMask.nearestInputPos(t,i):super.nearestInputPos(t,i)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((i,r)=>{if(!t[r])return;const{mask:e,...s}=t[r];return F(i,s)&&i.maskEquals(e)})):super.maskEquals(t)}typedValueEquals(t){var i;return Boolean(null==(i=this.currentMask)?void 0:i.typedValueEquals(t))}}H.DEFAULTS={...P.DEFAULTS,dispatch:(t,i,r,e)=>{if(!i.compiledMasks.length)return;const s=i.rawInputValue,u=i.compiledMasks.map(((u,n)=>{const a=i.currentMask===u,o=a?u.displayValue.length:u.nearestInputPos(u.displayValue.length,v);return u.rawInputValue!==s?(u.reset(),u.append(s,{raw:!0})):a||u.remove(o),u.append(t,i.currentMaskFlags(r)),u.appendTail(e),{index:n,weight:u.rawInputValue.length,totalInputPositions:u.totalInputPositions(0,Math.max(o,u.nearestInputPos(u.displayValue.length,v)))}}));return u.sort(((t,i)=>i.weight-t.weight||i.totalInputPositions-t.totalInputPositions)),i.compiledMasks[u[0].index]}},C.MaskedDynamic=H;class $ extends N{constructor(t){super({...$.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:i,...r}=t;if(i){const t=i.map((t=>t.length)),e=Math.min(...t),s=Math.max(...t)-e;r.mask="*".repeat(e),s&&(r.mask+="["+"*".repeat(s)+"]"),this.enum=i}super._update(r)}_appendCharRaw(t,i){void 0===i&&(i={});const r=Math.min(this.nearestInputPos(0,k),this.value.length),e=this.enum.filter((i=>this.matchValue(i,this.unmaskedValue+t,r)));if(e.length){1===e.length&&this._forEachBlocksInRange(0,this.value.length,((t,r)=>{const s=e[0][r];r>=this.value.length||s===t.value||(t.reset(),t._appendChar(s,i))}));const t=super._appendCharRaw(e[0][this.value.length],i);return 1===e.length&&e[0].slice(this.unmaskedValue.length).split("").forEach((i=>t.aggregate(super._appendCharRaw(i)))),t}return new M({skip:!this.isComplete})}extractTail(t,i){return void 0===t&&(t=0),new O("",t)}remove(t,i){if(void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),t===i)return new M;const r=Math.min(super.nearestInputPos(0,k),this.value.length);let e;for(e=t;e>=0&&!(this.enum.filter((t=>this.matchValue(t,this.value.slice(r,e),r))).length>1);--e);const s=super.remove(e,i);return s.tailShift+=e-t,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}var K;$.DEFAULTS={...N.DEFAULTS,matchValue:(t,i,r)=>t.indexOf(i,r)===r},C.MaskedEnum=$,C.MaskedFunction=class extends P{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}};class Z extends P{constructor(t){super({...Z.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),i=(this.scale?"("+A(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+i),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(A).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(A(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const i=t.split(this.radix);return i[0]=i[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),i.join(this.radix)}doPrepareChar(t,i){void 0===i&&(i={});const[r,e]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(i.input&&i.raw||!i.input&&!i.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),i);return t&&!r&&(e.skip=!0),!r||this.allowPositive||this.value||"-"===r||e.aggregate(this._appendChar("-")),[r,e]}_separatorsCount(t,i){void 0===i&&(i=!1);let r=0;for(let e=0;e<t;++e)this._value.indexOf(this.thousandsSeparator,e)===e&&(++r,i&&(t+=this.thousandsSeparator.length));return r}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,i,r){return void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),[t,i]=this._adjustRangeWithSeparators(t,i),this._removeThousandsSeparators(super.extractInput(t,i,r))}_appendCharRaw(t,i){void 0===i&&(i={});const r=this._separatorsCountFromSlice(i.tail&&i._beforeTailState?i._beforeTailState._value:this._value);this._value=this._removeThousandsSeparators(this.value);const e=this._value;this._value+=t;let s,u=!isNaN(this.number),n=!1;if(u){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(Z.UNMASKED_RADIX,this.radix),n||(n=e===this._value&&!i.tail)):u=!1),u&&(u=Boolean(this._value.match(this._numberRegExp)))}u?s=new M({inserted:this._value.slice(e.length),rawInserted:n?"":t,skip:n}):(this._value=e,s=new M),this._value=this._insertThousandsSeparators(this._value);const a=this._separatorsCountFromSlice(i.tail&&i._beforeTailState?i._beforeTailState._value:this._value);return s.tailShift+=(a-r)*this.thousandsSeparator.length,s}_findSeparatorAround(t){if(this.thousandsSeparator){const i=this.value.indexOf(this.thousandsSeparator,t-this.thousandsSeparator.length+1);if(i<=t)return i}return-1}_adjustRangeWithSeparators(t,i){const r=this._findSeparatorAround(t);r>=0&&(t=r);const e=this._findSeparatorAround(i);return e>=0&&(i=e+this.thousandsSeparator.length),[t,i]}remove(t,i){void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length),[t,i]=this._adjustRangeWithSeparators(t,i);const r=this.value.slice(0,t),e=this.value.slice(i),s=this._separatorsCount(r.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(r+e));const u=this._separatorsCountFromSlice(r);return new M({tailShift:(u-s)*this.thousandsSeparator.length})}nearestInputPos(t,i){if(!this.thousandsSeparator)return t;switch(i){case x:case b:case v:{const r=this._findSeparatorAround(t-1);if(r>=0){const e=r+this.thousandsSeparator.length;if(t<e||this.value.length<=e||i===v)return r}break}case w:case k:{const i=this._findSeparatorAround(t);if(i>=0)return i+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let i=t;null!=this.min&&(i=Math.max(i,this.min)),null!=this.max&&(i=Math.min(i,this.max)),i!==t&&(this.unmaskedValue=this.format(i,this));let r=this.value;this.normalizeZeros&&(r=this._normalizeZeros(r)),this.padFractionalZeros&&this.scale>0&&(r=this._padFractionalZeros(r)),this._value=r}super.doCommit()}_normalizeZeros(t){const i=this._removeThousandsSeparators(t).split(this.radix);return i[0]=i[0].replace(/^(\D*)(0*)(\d*)/,((t,i,r,e)=>i+e)),t.length&&!/\d$/.test(i[0])&&(i[0]=i[0]+"0"),i.length>1&&(i[1]=i[1].replace(/0*$/,""),i[1].length||(i.length=1)),this._insertThousandsSeparators(i.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const i=t.split(this.radix);return i.length<2&&i.push(""),i[1]=i[1].padEnd(this.scale,"0"),i.join(this.radix)}doSkipInvalid(t,i,r){void 0===i&&(i={});const e=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===Z.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,i,r)&&!e}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,Z.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(Z.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||Z.EMPTY_VALUES.includes(t)&&Z.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}K=Z,Z.UNMASKED_RADIX=".",Z.EMPTY_VALUES=[...P.EMPTY_VALUES,0],Z.DEFAULTS={...P.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[K.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})},C.MaskedNumber=Z;const G={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function X(t,i,r){void 0===i&&(i=G.MASKED),void 0===r&&(r=G.MASKED);const e=D(t);return t=>e.runIsolated((e=>(e[i]=t,e[r])))}C.PIPE_TYPE=G,C.createPipe=X,C.pipe=function(t,i,r,e){return X(i,r,e)(t)},C.RepeatBlock=class extends N{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var i,r,e;const{repeat:s,...u}=E(t);this._blockOpts=Object.assign({},this._blockOpts,u);const n=D(this._blockOpts);this.repeat=null!=(i=null!=(r=null!=s?s:n.repeat)?r:this.repeat)?i:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(e=this._blocks)?void 0:e.length)||0,this.repeatFrom)),blocks:{m:n},eager:n.eager,overwrite:n.overwrite,skipInvalid:n.skipInvalid,lazy:n.lazy,placeholderChar:n.placeholderChar,displayChar:n.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(D(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,i){void 0===i&&(i={});const r=new M;for(let a,o,h=null!=(e=null==(s=this._mapPosToBlock(this.displayValue.length))?void 0:s.index)?e:Math.max(this._blocks.length-1,0);a=null!=(u=this._blocks[h])?u:o=!o&&this._allocateBlock(h);++h){var e,s,u,n;const l=a._appendChar(t,{...i,_beforeTailState:null==(n=i._beforeTailState)||null==(n=n._blocks)?void 0:n[h]});if(l.skip&&o){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(r.aggregate(l),l.consumed)break}return r}_trimEmptyTail(t,i){var r,e;void 0===t&&(t=0);const s=Math.max((null==(r=this._mapPosToBlock(t))?void 0:r.index)||0,this.repeatFrom,0);let u;null!=i&&(u=null==(e=this._mapPosToBlock(i))?void 0:e.index),null==u&&(u=this._blocks.length-1);let n=0;for(let t=u;s<=t&&!this._blocks[t].unmaskedValue;--t,++n);n&&(this._blocks.splice(u-n+1,n),this.mask=this.mask.slice(n))}reset(){super.reset(),this._trimEmptyTail()}remove(t,i){void 0===t&&(t=0),void 0===i&&(i=this.displayValue.length);const r=super.remove(t,i);return this._trimEmptyTail(t,i),r}totalInputPositions(t,i){return void 0===t&&(t=0),null==i&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,i)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};try{globalThis.IMask=C}catch{}const Y={cpf_cnpj:{mask:[{mask:"000.000.000-00"},{mask:"00.000.000/0000-00"}],placeholderChar:"_"},cpf:{mask:"000.000.000-00",placeholderChar:"_"},cnpj:{mask:"00.000.000/0000-00",placeholderChar:"_"},phone:{mask:"(00) 00000-0000",blocks:{"(00)":{mask:"(00)",maxLength:2,placeholderChar:""},"00000":{mask:"00000",maxLength:5,placeholderChar:"_"},"-":{mask:"-"},"0000":{mask:"0000",maxLength:4,placeholderChar:"_"}},placeholderChar:"_"},date:{mask:"00/00/0000"},dateRange:{mask:"00/00/0000 - 00/00/0000"}},J=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.valueChange=r(this,"valueChange"),this.inputClear=r(this,"inputClear"),this.internals=this.attachInternals(),this.mode="default",this.status="default",this.size="medium",this.type="text",this.inputMode="text",this.label="",this.name="",this.placeholder=null,this.value="",this.iconName="",this.disabled=!1,this.required=!1,this.enableSelectionMode=!1,this.readOnly=!1,this.isLoading=!1,this.isHovered=!1,this.isFocused=!1,this.styles={},this.clearIcon=!0,this.hideErrorIcon=!1,this.autocomplete="on"}async setFocus(){const t=l()&&p()?1e3:200;let i=function(t){if(!l()||!p())return null;const i=document.createElement("input");return i.setAttribute("type","text"),i.style.position="absolute",i.style.opacity="0",i.style.height="0",i.style.fontSize="16px",t.prepend(i),i.focus(),i}(this.host);setTimeout((()=>{this.inputRef.focus(),i&&i.remove()}),t)}formStateRestoreCallback(t){var i;this.value=t.value,this.applyValueToMask(),null===(i=this.internals)||void 0===i||i.setFormValue(this.value)}formAssociatedCallback(t){t.ariaLabel=this.label}formResetCallback(){var t,i;this.handleClearInput(),null===(t=this.internals)||void 0===t||t.setValidity({}),null===(i=this.internals)||void 0===i||i.setFormValue("")}formDisabledCallback(t){this.disabled=t}connectedCallback(){this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor("primary-base"),this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor("neutral-black"),this.styles["--neutral-medium"]=window.CuraAPI.theme.colors.getColor("neutral-medium"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--success-dark"]=window.CuraAPI.theme.colors.getColor("success-dark"),this.styles["--success-darker"]=window.CuraAPI.theme.colors.getColor("success-darker"),this.styles["--success-lighter"]=window.CuraAPI.theme.colors.getColor("success-lighter"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-darker"]=window.CuraAPI.theme.colors.getColor("error-darker"),this.styles["--error-base"]=window.CuraAPI.theme.colors.getColor("error-base"),this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor(),this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--font-weight-bold"]=this.weights.bold,this.styles["--font-weight-regular"]=this.weights.regular}getClasses(){return{[this.size.toLowerCase()]:"default"===this.mode,disabled:this.disabled,isLoading:this.isLoading,isFocused:this.isFocused&&!this.disabled&&!this.readOnly&&!this.isLoading,isHovered:this.isHovered,[this.status]:!0,transparent:"transparent"===this.mode,selection:this.enableSelectionMode}}getLabelColor(){return this.disabled?"neutral-medium":this.isLoading&&"transparent"===this.mode&&!this.isHovered?"neutral-dark":(this.isFocused||this.isHovered||"success"===this.status||"error"===this.status)&&!this.readOnly||this.isHovered?"neutral-black":"neutral-dark"}renderIcon(){if(""===this.iconName&&"default"===this.status||"transparent"===this.mode&&this.isLoading||"transparent"===this.mode&&"default"===this.status)return;if("error"===this.status&&this.hideErrorIcon)return;const t={loading:{name:this.iconName,color:"primary-base"},success:{name:"checkCircle",color:"success-dark"},error:{name:"alertCircle",color:"error-dark"},default:{name:this.iconName,color:"neutral-dark"},disabled:{name:this.iconName,color:"neutral-medium"}}[this.isLoading?"loading":this.disabled?"disabled":this.status||"default"];return e("div",{class:"feedback-icon",style:this.styles},e("cura-icon",{name:t.name,iconset:"default",size:"transparent"===this.mode||"large"===this.size?20:16,color:t.color}))}renderHelperText(){const t="error"===this.status,i="success"===this.status,r="default"===this.status,s="large"===this.size?"small":"xsmall",u=(()=>this.disabled?"neutral-medium":this.isLoading?"primary-base":this.isFocused||this.isHovered?"neutral-black":"neutral-dark")();return e("div",{style:this.styles,class:"helper-text",part:"cura-input-text-helper"},r&&e("cura-label",{size:s,lineHeight:"xsmall",color:u},e("slot",null)),t&&"default"===this.mode&&e("cura-label",{size:s,lineHeight:"xsmall",color:"error-dark"},e("slot",null)),t&&"transparent"===this.mode&&e("cura-label",{size:s,lineHeight:"xsmall",color:"neutral-black"},e("slot",null)),i&&e("cura-label",{size:s,lineHeight:"xsmall",color:"success-dark"},e("slot",null)))}handleMouseEnter(){this.isHovered=!0}handleMouseLeave(){this.isHovered=!1}componentDidLoad(){this.initializeMask()}disconnectedCallback(){this.destroyMask()}handleMaskUpdate(){this.maskedInput&&this.maskedInput.updateValue()}handleClearInput(){this.handleMaskUpdate(),this.value="",this.inputRef.value="",this.valueChange.emit(this.value),this.inputClear.emit(this.value),this.handleMaskUpdate(),this.setFocus()}handleInputFocus(){this.handleMaskUpdate(),this.isFocused=!0}handleInputBlur(){this.handleMaskUpdate(),setTimeout((()=>{this.isFocused=!1}),150)}shouldDisplayMask(){return this.maskPreset||this.maskRegex||this.maskAdvanced}initializeMask(){this.shouldDisplayMask()?(this.maskedInput&&this.destroyMask(),this.maskPreset?this.initializePresetMask():this.maskRegex?this.initializeRegexMask():this.maskAdvanced&&this.initializeAdvancedMask(),this.applyValueToMask()):this.clearMaskValue()}initializeRegexMask(){const t=this.maskRegex.replace(/^\/|\/[gimsuy]*$/g,""),i=(this.maskRegex.match(/\/[gimsuy]*$/g)||[""])[0].slice(1);this.maskedInput=C(this.inputRef,{mask:new RegExp(t,i)})}initializePresetMask(){const t=Y[this.maskPreset];t?this.maskedInput=C(this.inputRef,t):console.error(`Mask preset "${this.maskPreset}" not found.`)}initializeAdvancedMask(){if(this.inputRef)try{const t="string"==typeof this.maskAdvanced?JSON.parse(this.maskAdvanced):this.maskAdvanced;this.maskedInput=C(this.inputRef,t)}catch(t){console.error("Error defining maskAdvanced:",t)}}applyValueToMask(){this.maskedInput&&(this.maskedInput.mask===Date||this.maskedInput.mask===Number?this.maskedInput.typedValue=this.value:this.value=this.maskedInput.value,this.handleMaskUpdate())}clearMaskValue(){this.inputRef.value=this.value}destroyMask(){this.maskedInput&&(this.maskedInput.destroy(),this.maskedInput=void 0)}handleInputChange(t){var i;const r=t.target.value;this.valueChange.emit(r),"number"===this.type?this.handleNumberInputChange(r):this.handleTextInputChange(r),null===(i=this.internals)||void 0===i||i.setFormValue(this.value)}handleNumberInputChange(t){const i=parseFloat(t);isNaN(i)?console.error("Invalid numeric input:",t):this.value=i}handleTextInputChange(t){this.maskedInput?((this.maskedInput.mask instanceof Date||this.maskedInput.mask===Number)&&(this.maskedInput.typedValue=t,this.value=this.maskedInput.typedValue),this.value=this.maskedInput.value):this.value=t}handleKeyDown(t){"number"===this.type&&this.handleBlockInvalidNumber(t)}handleBlockInvalidNumber(t){["e","E","+","-"].includes(t.key)&&t.preventDefault()}render(){return e(s,{key:"7794e2a816baa0438c256ba584d14ddbeb9cc9b8",role:"textbox","aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},e("div",{key:"60fd4d3edebfe6aeb720dd079efb94970626d975",style:this.styles,onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),class:Object.assign({"cura-input-group":!0},this.getClasses())},e("div",{key:"55db1933b3eb29807029669e5c66002556b3bd03",class:"input-wrapper"},this.label&&e("cura-label",{key:"1c4119cc0b2190fbdb1ddcc3f55c41c68ec88957",class:"label",weight:"bold",size:"large"===this.size?"small":"xsmall",color:this.getLabelColor()},this.label," ",this.required&&e("span",{key:"779e4726201110a6daf2c474b494f6baa9db5dc0",class:"required"},"* ")),e("div",{key:"a409f41993833fea3eb3212821c26a63f62e970f",class:"cura-input-field",part:"cura-input-field",style:this.styles},this.renderIcon(),e("input",{key:"75b3de8e8ca33eb2b9e8e8a285de19d172490552",name:this.name?this.name:"",type:this.type,onKeyDown:t=>this.handleKeyDown(t),onBlur:this.handleInputBlur.bind(this),onFocus:this.handleInputFocus.bind(this),onInput:t=>this.handleInputChange(t),class:this.getClasses(),style:this.styles,placeholder:this.placeholder,disabled:this.disabled||this.isLoading,required:this.required,readonly:this.readOnly,maxlength:this.maxlength,value:null!=this.value?this.value:"",inputmode:this.maskPreset?"tel":this.inputMode,ref:t=>this.inputRef=t,autocomplete:this.autocomplete}),!!this.clearIcon&&!this.readOnly&&!this.isLoading&&!this.disabled&&this.value&&this.isFocused&&e("cura-icon",{key:"4a22b5b1608c5dc57a99b7edc93ab11ce2de4048",size:"large"===this.size||"transparent"===this.mode?20:16,color:"primary-base",name:"closeCircle",iconset:"default",class:"clear-button",onMouseDown:()=>this.handleClearInput()}),this.isLoading&&e("cura-loader-circle",{key:"65a078642ac17f1779726749b29516c018bc317d",size:"large"===this.size?"medium":"small",color:"primary-base"})),this.renderHelperText())))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{styles:[{connectedCallback:0}],size:[{getClasses:0}],status:[{renderIcon:0}],mode:[{renderIcon:0}],maskPreset:[{initializeMask:0}],maskRegex:[{initializeMask:0}],maskAdvanced:[{initializeMask:0}]}}static get style(){return":host{display:block;box-sizing:border-box;width:100%}.required{color:var(--error-base)}.cura-input-group{width:100%;font-family:var(--font-family);text-align:left !important}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group cura-label{margin-bottom:8px}.cura-input-group .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group .cura-input-field cura-loader-circle{margin:0px 12px}.cura-input-group .cura-input-field .feedback-icon{padding-left:12px;padding-top:6px}.cura-input-group .cura-input-field .clear-button{padding-right:12px;cursor:pointer}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field input{color:var(--success-darker) !important}.cura-input-group.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.cura-input-group.success:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-input-group.success:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field input{color:var(--error-darker) !important}.cura-input-group.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.cura-input-group.error:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-input-group.error:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field{border-color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group:focus-within:not(.selection) .cura-input-field{border:2px solid var(--info-base) !important;background-color:var(--neutral-purewhite);outline:none}.cura-input-group:focus-within:not(.selection) .cura-input-field input{color:var(--neutral-black) !important}.cura-input-group:focus-within.selection .cura-input-field{border-radius:4px 4px 0px 0px}.cura-input-group.isLoading{cursor:wait}.cura-input-group.isLoading .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:var(--neutral-white) !important;border:2px solid var(--primary-base) !important}.cura-input-group.isLoading .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.isLoading .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.isLoading .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.isLoading .cura-input-field input{cursor:wait;color:var(--primary-base) !important}.cura-input-group.isLoading .cura-input-field input::placeholder{color:var(--primary-base) !important}.cura-input-group.readOnly[read-only] .cura-input-field{cursor:default}.cura-input-group.readOnly[read-only] .cura-input-field input{cursor:default}.cura-input-group.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.cura-input-group.disabled .cura-input-field input{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field input::placeholder{color:var(--neutral-medium)}.cura-input-group.transparent{background-color:transparent;padding:0px;max-height:80px}.cura-input-group.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px}.cura-input-group.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.transparent .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.transparent .cura-input-field input{color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.cura-input-group.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.cura-input-group.transparent .cura-input-field .feedback-icon{order:3;margin:0 20px 0 0}.cura-input-group.transparent:focus-within .cura-input-field{border:none !important;background-color:transparent !important}.cura-input-group.transparent:focus-within .cura-input-field input{border:none !important;outline:none}.cura-input-group.transparent .helper-text{margin-top:0px}.cura-input-group.transparent.transparent{display:flex;background-color:transparent;padding:0px;justify-content:start;align-items:center;max-height:80px;gap:4px}.cura-input-group.transparent.transparent .input-wrapper{display:flex;width:100%;flex-direction:column;justify-content:start}.cura-input-group.transparent.transparent cura-label{margin-bottom:4px;--color-body:var(--neutral-dark) !important}.cura-input-group.transparent.transparent.error cura-label{--color-body:var(--neutral-black) !important}.cura-input-group.transparent.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px;overflow:hidden}.cura-input-group.transparent.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.transparent.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.transparent.transparent .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.transparent.transparent .cura-input-field input{order:1;color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.cura-input-group.transparent.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.cura-input-group.transparent.transparent .cura-input-field .clear-button{order:2;cursor:pointer;margin:0 20px 0 0;padding:0}.cura-input-group.transparent.transparent .cura-input-field .feedback-icon{padding:6px 0 0 0}.cura-input-group.transparent.transparent .cura-input-field cura-loader-circle{order:2;margin:0 20px 0 0}.cura-input-group.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field input{color:var(--error-darker) !important}.cura-input-group.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.cura-input-group.error.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.error.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.error.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.error.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.error.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.error:not(.transparent).large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-input-group.error:not(.transparent).large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error:not(.transparent).large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error:not(.transparent).large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field input{color:var(--success-darker) !important}.cura-input-group.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.cura-input-group.success.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.success.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.success.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.success.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.success.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.success:not(.transparent).large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-input-group.success:not(.transparent).large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success:not(.transparent).large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success:not(.transparent).large .cura-input-field .feedback-icon{padding-left:12px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}"}},[321,"cura-input-text",{mode:[1537],status:[1537],size:[1537],type:[513],inputMode:[513,"input-mode"],label:[513],name:[513],placeholder:[513],value:[1544],iconName:[1537,"icon-name"],helperText:[1537,"helper-text"],disabled:[516],required:[516],maskPreset:[8,"mask-preset"],enableSelectionMode:[1540,"enable-selection-mode"],maskRegex:[1537,"mask-regex"],maskAdvanced:[1544,"mask-advanced"],maxlength:[1538],readOnly:[516,"read-only"],isLoading:[1540,"is-loading"],clearIcon:[1540,"clear-icon"],hideErrorIcon:[4,"hide-error-icon"],autocomplete:[513],isHovered:[32],isFocused:[32],styles:[32],setFocus:[64]},void 0,{styles:[{connectedCallback:0}],size:[{getClasses:0}],status:[{renderIcon:0}],mode:[{renderIcon:0}],maskPreset:[{initializeMask:0}],maskRegex:[{initializeMask:0}],maskAdvanced:[{initializeMask:0}]}]);function W(){"undefined"!=typeof customElements&&["cura-input-text","cura-icon","cura-label","cura-loader-circle"].forEach((t=>{switch(t){case"cura-input-text":customElements.get(u(t))||customElements.define(u(t),J);break;case"cura-icon":customElements.get(u(t))||n();break;case"cura-label":customElements.get(u(t))||a();break;case"cura-loader-circle":customElements.get(u(t))||o()}}))}export{J as C,h as S,d as a,p as b,l as c,W as d,c as r}
@@ -1 +0,0 @@
1
- import{p as e,H as s,i as t,j as r,t as i}from"./p-DBXUEjWh.js";const a=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.size=40,this.strokeWidth=3.25}render(){const e=(this.size-this.strokeWidth)/2,s=e*Math.PI*2,i=this.progress*s/100;return t(r,{key:"6deebf97271b84fcecb9e1d688c79ae88b2aa618"},t("div",{key:"f6556e004e4d0cc4de342292610764b74495e3b0",class:"progress-bar"},t("svg",{key:"ffc1de55ded85602db1840812cd1f296a413c39e",width:this.size,height:this.size,viewBox:`0 0 ${this.size} ${this.size}`},t("circle",{key:"691beeaf7b5fb5d670bfde48d8023b742bd97126",fill:"none",stroke:"#ccc",cx:this.size/2,cy:this.size/2,r:e,"stroke-width":`${this.strokeWidth}px`}),this.active&&t("circle",{key:"0fee97b7da871d6b242786bbcf175e9792da69f8",fill:"none",stroke:this.progressColor,cx:this.size/2,cy:this.size/2,r:e,"stroke-width":`${this.strokeWidth}px`,transform:`rotate(-90 ${this.size/2} ${this.size/2})`,"stroke-dasharray":`${i}px ${s-i}px`,"stroke-linecap":"round",style:{transition:"all 0.5s"}})),t("span",{key:"8e78dd28e8fad5ee4d9aef8029a73b6cf6d778cc"},t("slot",{key:"aa7155860e7aa0bcd2aef87bed2a5530161de4aa"}))))}static get style(){return":host{display:block;box-sizing:border-box}.progress-bar{position:relative;display:flex;align-items:center;justify-content:center}.progress-bar span{position:absolute;display:flex}"}},[257,"cura-progress-bar",{progressColor:[513,"progress-color"],progress:[514],size:[514],strokeWidth:[514,"stroke-width"],active:[516]}]);function o(){"undefined"!=typeof customElements&&["cura-progress-bar"].forEach((e=>{"cura-progress-bar"===e&&(customElements.get(i(e))||customElements.define(i(e),a))}))}export{a as C,o as d}