@warp-ds/elements 2.9.0-next.2 → 2.9.0-next.4

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 (210) hide show
  1. package/dist/custom-elements.json +101 -173
  2. package/dist/docs/affix/accessibility.md +1 -0
  3. package/dist/docs/affix/affix.md +58 -0
  4. package/dist/docs/affix/api.md +44 -0
  5. package/dist/docs/affix/examples.md +1 -0
  6. package/dist/docs/affix/usage.md +1 -0
  7. package/dist/docs/alert/accessibility.md +30 -0
  8. package/dist/docs/alert/alert.md +208 -0
  9. package/dist/docs/alert/api.md +39 -0
  10. package/dist/docs/alert/examples.md +84 -0
  11. package/dist/docs/alert/usage.md +42 -0
  12. package/dist/docs/attention/accessibility.md +1 -0
  13. package/dist/docs/attention/api.md +132 -0
  14. package/dist/docs/attention/attention.md +144 -0
  15. package/dist/docs/attention/examples.md +1 -0
  16. package/dist/docs/attention/usage.md +1 -0
  17. package/dist/docs/badge/accessibility.md +1 -0
  18. package/dist/docs/badge/api.md +28 -0
  19. package/dist/docs/badge/badge.md +42 -0
  20. package/dist/docs/badge/examples.md +1 -0
  21. package/dist/docs/badge/usage.md +1 -0
  22. package/dist/docs/box/accessibility.md +1 -0
  23. package/dist/docs/box/api.md +52 -0
  24. package/dist/docs/box/box.md +66 -0
  25. package/dist/docs/box/examples.md +1 -0
  26. package/dist/docs/box/usage.md +1 -0
  27. package/dist/docs/breadcrumbs/accessibility.md +1 -0
  28. package/dist/docs/breadcrumbs/api.md +20 -0
  29. package/dist/docs/breadcrumbs/breadcrumbs.md +34 -0
  30. package/dist/docs/breadcrumbs/examples.md +1 -0
  31. package/dist/docs/breadcrumbs/usage.md +1 -0
  32. package/dist/docs/button/accessibility.md +1 -0
  33. package/dist/docs/button/api.md +155 -0
  34. package/dist/docs/button/button.md +169 -0
  35. package/dist/docs/button/examples.md +1 -0
  36. package/dist/docs/button/usage.md +1 -0
  37. package/dist/docs/card/accessibility.md +1 -0
  38. package/dist/docs/card/api.md +44 -0
  39. package/dist/docs/card/card.md +58 -0
  40. package/dist/docs/card/examples.md +1 -0
  41. package/dist/docs/card/usage.md +1 -0
  42. package/dist/docs/combobox/accessibility.md +1 -0
  43. package/dist/docs/combobox/api.md +132 -0
  44. package/dist/docs/combobox/combobox.md +146 -0
  45. package/dist/docs/combobox/examples.md +1 -0
  46. package/dist/docs/combobox/usage.md +1 -0
  47. package/dist/docs/datepicker/accessibility.md +1 -0
  48. package/dist/docs/datepicker/api.md +184 -0
  49. package/dist/docs/datepicker/datepicker.md +200 -0
  50. package/dist/docs/datepicker/examples.md +1 -0
  51. package/dist/docs/datepicker/usage.md +1 -0
  52. package/dist/docs/expandable/accessibility.md +1 -0
  53. package/dist/docs/expandable/api.md +100 -0
  54. package/dist/docs/expandable/examples.md +1 -0
  55. package/dist/docs/expandable/expandable.md +114 -0
  56. package/dist/docs/expandable/usage.md +1 -0
  57. package/dist/docs/link/accessibility.md +1 -0
  58. package/dist/docs/link/api.md +87 -0
  59. package/dist/docs/link/examples.md +1 -0
  60. package/dist/docs/link/link.md +101 -0
  61. package/dist/docs/link/usage.md +1 -0
  62. package/dist/docs/page-indicator/accessibility.md +1 -0
  63. package/dist/docs/page-indicator/api.md +28 -0
  64. package/dist/docs/page-indicator/examples.md +1 -0
  65. package/dist/docs/page-indicator/page-indicator.md +41 -0
  66. package/dist/docs/page-indicator/usage.md +1 -0
  67. package/dist/docs/pagination/accessibility.md +1 -0
  68. package/dist/docs/pagination/api.md +44 -0
  69. package/dist/docs/pagination/examples.md +1 -0
  70. package/dist/docs/pagination/pagination.md +58 -0
  71. package/dist/docs/pagination/usage.md +1 -0
  72. package/dist/docs/pill/accessibility.md +1 -0
  73. package/dist/docs/pill/api.md +76 -0
  74. package/dist/docs/pill/examples.md +1 -0
  75. package/dist/docs/pill/pill.md +90 -0
  76. package/dist/docs/pill/usage.md +1 -0
  77. package/dist/docs/select/accessibility.md +1 -0
  78. package/dist/docs/select/api.md +124 -0
  79. package/dist/docs/select/examples.md +1 -0
  80. package/dist/docs/select/select.md +138 -0
  81. package/dist/docs/select/usage.md +1 -0
  82. package/dist/docs/slider/accessibility.md +1 -0
  83. package/dist/docs/slider/api.md +220 -0
  84. package/dist/docs/slider/examples.md +1 -0
  85. package/dist/docs/slider/slider.md +234 -0
  86. package/dist/docs/slider/usage.md +1 -0
  87. package/dist/docs/slider-thumb/accessibility.md +1 -0
  88. package/dist/docs/slider-thumb/api.md +164 -0
  89. package/dist/docs/slider-thumb/examples.md +1 -0
  90. package/dist/docs/slider-thumb/slider-thumb.md +178 -0
  91. package/dist/docs/slider-thumb/usage.md +1 -0
  92. package/dist/docs/step/accessibility.md +1 -0
  93. package/dist/docs/step/api.md +28 -0
  94. package/dist/docs/step/examples.md +1 -0
  95. package/dist/docs/step/step.md +40 -0
  96. package/dist/docs/step/usage.md +1 -0
  97. package/dist/docs/step-indicator/accessibility.md +1 -0
  98. package/dist/docs/step-indicator/api.md +28 -0
  99. package/dist/docs/step-indicator/examples.md +1 -0
  100. package/dist/docs/step-indicator/step-indicator.md +42 -0
  101. package/dist/docs/step-indicator/usage.md +1 -0
  102. package/dist/docs/switch/accessibility.md +1 -0
  103. package/dist/docs/switch/api.md +52 -0
  104. package/dist/docs/switch/examples.md +1 -0
  105. package/dist/docs/switch/switch.md +64 -0
  106. package/dist/docs/switch/usage.md +1 -0
  107. package/dist/docs/tab/accessibility.md +1 -0
  108. package/dist/docs/tab/api.md +92 -0
  109. package/dist/docs/tab/examples.md +1 -0
  110. package/dist/docs/tab/tab.md +106 -0
  111. package/dist/docs/tab/usage.md +1 -0
  112. package/dist/docs/tab-panel/accessibility.md +1 -0
  113. package/dist/docs/tab-panel/api.md +37 -0
  114. package/dist/docs/tab-panel/examples.md +1 -0
  115. package/dist/docs/tab-panel/tab-panel.md +52 -0
  116. package/dist/docs/tab-panel/usage.md +1 -0
  117. package/dist/docs/tabs/accessibility.md +1 -0
  118. package/dist/docs/tabs/api.md +36 -0
  119. package/dist/docs/tabs/examples.md +1 -0
  120. package/dist/docs/tabs/tabs.md +50 -0
  121. package/dist/docs/tabs/usage.md +1 -0
  122. package/dist/docs/textarea/accessibility.md +1 -0
  123. package/dist/docs/textarea/api.md +156 -0
  124. package/dist/docs/textarea/examples.md +1 -0
  125. package/dist/docs/textarea/textarea.md +170 -0
  126. package/dist/docs/textarea/usage.md +1 -0
  127. package/dist/docs/textfield/accessibility.md +1 -0
  128. package/dist/docs/textfield/api.md +204 -0
  129. package/dist/docs/textfield/examples.md +1 -0
  130. package/dist/docs/textfield/textfield.md +218 -0
  131. package/dist/docs/textfield/usage.md +1 -0
  132. package/dist/docs/toast/accessibility.md +9 -0
  133. package/dist/docs/toast/api.md +71 -0
  134. package/dist/docs/toast/examples.md +29 -0
  135. package/dist/docs/toast/toast.md +150 -0
  136. package/dist/docs/toast/usage.md +31 -0
  137. package/dist/index.d.ts +104 -97
  138. package/dist/packages/affix/affix.d.ts +16 -2
  139. package/dist/packages/affix/affix.js +5 -5
  140. package/dist/packages/affix/affix.js.map +2 -2
  141. package/dist/packages/alert/alert.d.ts +15 -0
  142. package/dist/packages/alert/alert.js +6 -6
  143. package/dist/packages/alert/alert.js.map +2 -2
  144. package/dist/packages/attention/attention.d.ts +52 -0
  145. package/dist/packages/attention/attention.js +5 -5
  146. package/dist/packages/attention/attention.js.map +2 -2
  147. package/dist/packages/badge/badge.d.ts +8 -0
  148. package/dist/packages/badge/badge.js.map +2 -2
  149. package/dist/packages/box/box.d.ts +20 -0
  150. package/dist/packages/box/box.js.map +2 -2
  151. package/dist/packages/button/button.d.ts +60 -2
  152. package/dist/packages/button/button.js.map +2 -2
  153. package/dist/packages/card/card.d.ts +12 -0
  154. package/dist/packages/card/card.js.map +2 -2
  155. package/dist/packages/combobox/combobox.d.ts +60 -15
  156. package/dist/packages/combobox/combobox.js.map +2 -2
  157. package/dist/packages/datepicker/datepicker.d.ts +32 -5
  158. package/dist/packages/datepicker/datepicker.js +1 -1
  159. package/dist/packages/datepicker/datepicker.js.map +2 -2
  160. package/dist/packages/expandable/expandable.d.ts +44 -0
  161. package/dist/packages/expandable/expandable.js +7 -7
  162. package/dist/packages/expandable/expandable.js.map +2 -2
  163. package/dist/packages/icon/icon.js +2 -2
  164. package/dist/packages/icon/icon.js.map +2 -2
  165. package/dist/packages/icon/icon.test.js +14 -0
  166. package/dist/packages/link/link.d.ts +32 -0
  167. package/dist/packages/link/link.js.map +2 -2
  168. package/dist/packages/modal-header/modal-header.js +6 -6
  169. package/dist/packages/modal-header/modal-header.js.map +2 -2
  170. package/dist/packages/page-indicator/page-indicator.d.ts +8 -2
  171. package/dist/packages/page-indicator/page-indicator.js.map +2 -2
  172. package/dist/packages/pagination/pagination.d.ts +16 -0
  173. package/dist/packages/pagination/pagination.js +3 -3
  174. package/dist/packages/pagination/pagination.js.map +2 -2
  175. package/dist/packages/pill/pill.d.ts +24 -2
  176. package/dist/packages/pill/pill.js +3 -3
  177. package/dist/packages/pill/pill.js.map +2 -2
  178. package/dist/packages/select/select.d.ts +56 -12
  179. package/dist/packages/select/select.js +4 -4
  180. package/dist/packages/select/select.js.map +2 -2
  181. package/dist/packages/slider/slider.d.ts +65 -8
  182. package/dist/packages/slider/slider.js +7 -7
  183. package/dist/packages/slider/slider.js.map +3 -3
  184. package/dist/packages/slider/slider.test.js +68 -0
  185. package/dist/packages/slider-thumb/slider-thumb.d.ts +44 -6
  186. package/dist/packages/slider-thumb/slider-thumb.js +24 -23
  187. package/dist/packages/slider-thumb/slider-thumb.js.map +3 -3
  188. package/dist/packages/step/step.d.ts +8 -0
  189. package/dist/packages/step/step.js +4 -4
  190. package/dist/packages/step/step.js.map +2 -2
  191. package/dist/packages/step-indicator/step-indicator.d.ts +8 -0
  192. package/dist/packages/step-indicator/step-indicator.js.map +2 -2
  193. package/dist/packages/switch/switch.d.ts +16 -0
  194. package/dist/packages/switch/switch.js.map +2 -2
  195. package/dist/packages/tab/tab.d.ts +28 -3
  196. package/dist/packages/tab/tab.js.map +2 -2
  197. package/dist/packages/tab-panel/tab-panel.d.ts +8 -2
  198. package/dist/packages/tab-panel/tab-panel.js.map +2 -2
  199. package/dist/packages/tabs/tabs.d.ts +4 -0
  200. package/dist/packages/tabs/tabs.js.map +2 -2
  201. package/dist/packages/textarea/textarea.d.ts +52 -1
  202. package/dist/packages/textarea/textarea.js.map +2 -2
  203. package/dist/packages/textfield/textfield.d.ts +92 -4
  204. package/dist/packages/textfield/textfield.js.map +2 -2
  205. package/dist/packages/toast/toast.js +4 -4
  206. package/dist/packages/toast/toast.js.map +2 -2
  207. package/dist/packages/toast-container/toast-container.d.ts +14 -0
  208. package/dist/packages/toast-container/toast-container.js.map +2 -2
  209. package/dist/web-types.json +77 -225
  210. package/package.json +8 -3
@@ -61,6 +61,74 @@ test('can set slider value via the number input', async () => {
61
61
  const formData = new FormData(page.getByTestId('form').element());
62
62
  expect(formData.get('value')).toBe('50');
63
63
  });
64
+ test('can increment and decrement the slider values with arrow keys in the number input', async () => {
65
+ const component = html `
66
+ <form data-testid="form">
67
+ <w-slider
68
+ label="Model year"
69
+ min="1950"
70
+ max="2025"
71
+ open-ended
72
+ >
73
+ <w-slider-thumb
74
+ slot="from"
75
+ aria-label="From year"
76
+ name="from-year"
77
+ ></w-slider-thumb>
78
+ <w-slider-thumb
79
+ slot="to"
80
+ aria-label="To year"
81
+ name="to-year"
82
+ ></w-slider-thumb>
83
+ </w-slider>
84
+ </form>
85
+ `;
86
+ const page = render(component);
87
+ await userEvent.type(page.getByRole('spinbutton').first(), '{ArrowUp}');
88
+ // Go from Min "beyond" 1950 to 1950
89
+ await expect.element(page.getByRole('spinbutton').first()).toHaveValue(1950);
90
+ await expect.element(page.getByLabelText('From year').first()).toHaveValue('1950'); // keeps value in sync between inputs
91
+ await userEvent.type(page.getByRole('spinbutton').last(), '{ArrowDown}');
92
+ // Go from Max "beyond" 2025 to 2025
93
+ await expect.element(page.getByRole('spinbutton').last()).toHaveValue(2025);
94
+ await expect.element(page.getByLabelText('To year').first()).toHaveValue('2025'); // keeps value in sync between inputs
95
+ const formData = new FormData(page.getByTestId('form').element());
96
+ expect(formData.get('from-year')).toBe('1950');
97
+ expect(formData.get('to-year')).toBe('2025');
98
+ });
99
+ test('going down from Min and up from Max sets value to min - 1 and max + a respectively', async () => {
100
+ const component = html `
101
+ <form data-testid="form">
102
+ <w-slider
103
+ label="Model year"
104
+ min="1950"
105
+ max="2025"
106
+ open-ended
107
+ >
108
+ <w-slider-thumb
109
+ slot="from"
110
+ aria-label="From year"
111
+ name="from-year"
112
+ ></w-slider-thumb>
113
+ <w-slider-thumb
114
+ slot="to"
115
+ aria-label="To year"
116
+ name="to-year"
117
+ ></w-slider-thumb>
118
+ </w-slider>
119
+ </form>
120
+ `;
121
+ const page = render(component);
122
+ await userEvent.type(page.getByRole('spinbutton').first(), '{ArrowDown}');
123
+ await expect.element(page.getByRole('spinbutton').first()).toHaveValue(1949);
124
+ await expect.element(page.getByLabelText('From year').first()).toHaveValue('1949'); // keeps value in sync between inputs
125
+ await userEvent.type(page.getByRole('spinbutton').last(), '{ArrowUp}');
126
+ await expect.element(page.getByRole('spinbutton').last()).toHaveValue(2026);
127
+ await expect.element(page.getByLabelText('To year').first()).toHaveValue('2026'); // keeps value in sync between inputs
128
+ const formData = new FormData(page.getByTestId('form').element());
129
+ expect(formData.get('from-year')).toBe('1949');
130
+ expect(formData.get('to-year')).toBe('2026');
131
+ });
64
132
  test('slider without suffix syncs empty suffix to thumb', async () => {
65
133
  render(html `
66
134
  <w-slider label="Single" min="0" max="100">
@@ -16,16 +16,45 @@ declare class WarpSliderThumb extends WarpSliderThumb_base {
16
16
  slotAssignment?: SlotAssignmentMode;
17
17
  };
18
18
  static styles: import("lit").CSSResult[];
19
+ /**
20
+ * @summary
21
+ * @description
22
+ */
19
23
  ariaLabel: string;
24
+ /**
25
+ * @summary
26
+ * @description
27
+ */
20
28
  ariaDescription: string;
29
+ /**
30
+ * @summary
31
+ * @description
32
+ */
21
33
  name: string;
34
+ /**
35
+ * @summary
36
+ * @description
37
+ */
22
38
  value: string;
23
- /** @internal Set by `<w-slider>` */
39
+ /** @internal Set by `<w-slider>`
40
+ * @summary
41
+ * @description
42
+ */
24
43
  disabled: boolean;
25
- /** @internal Set by `<w-slider>` */
44
+ /** @internal Set by `<w-slider>`
45
+ * @summary
46
+ * @description
47
+ */
26
48
  invalid: boolean;
27
- /** @internal Set by `<w-slider>` */
49
+ /** @internal Set by `<w-slider>`
50
+ * @summary
51
+ * @description
52
+ */
28
53
  openEnded: boolean;
54
+ /**
55
+ * @summary
56
+ * @description
57
+ */
29
58
  placeholder: string;
30
59
  /** @internal Set by `<w-slider>` */
31
60
  markers: string;
@@ -39,11 +68,20 @@ declare class WarpSliderThumb extends WarpSliderThumb_base {
39
68
  max: string;
40
69
  /** @internal Set by `<w-slider>` */
41
70
  suffix: string;
42
- /** @internal Formatter for the tooltip and input mask values. Set by `<w-slider>`. */
71
+ /** @internal Formatter for the tooltip and input mask values. Set by `<w-slider>`.
72
+ * @summary
73
+ * @description
74
+ */
43
75
  valueFormatter: (value: string, slot: SliderSlot) => string;
44
- /** @internal Replaces {@link valueFormatter} for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. Set by `<w-slider>`. */
76
+ /** @internal Replaces {@link valueFormatter} for the tooltip. Use in open-ended sliders to show for example "300+ hk" instead of "Max" in the tooltip. Set by `<w-slider>`.
77
+ * @summary
78
+ * @description
79
+ */
45
80
  tooltipFormatter: (value: string, slot: SliderSlot) => string;
46
- /** @internal Formatter for the min and max labels below the range. Set by `<w-slider>`. */
81
+ /** @internal Formatter for the min and max labels below the range. Set by `<w-slider>`.
82
+ * @summary
83
+ * @description
84
+ */
47
85
  labelFormatter: (slot: SliderSlot) => string;
48
86
  range: HTMLInputElement;
49
87
  tooltipTarget: HTMLOutputElement;
@@ -1,5 +1,5 @@
1
- var Ye=Object.create;var ie=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Ue=Object.getPrototypeOf,Xe=Object.prototype.hasOwnProperty;var xe=o=>{throw TypeError(o)};var ke=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var He=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Re(e))!Xe.call(o,a)&&a!==r&&ie(o,a,{get:()=>e[a],enumerable:!(t=we(e,a))||t.enumerable});return o};var qe=(o,e,r)=>(r=o!=null?Ye(Ue(o)):{},He(e||!o||!o.__esModule?ie(r,"default",{value:o,enumerable:!0}):r,o));var p=(o,e,r,t)=>{for(var a=t>1?void 0:t?we(e,r):e,i=o.length-1,n;i>=0;i--)(n=o[i])&&(a=(t?n(e,r,a):n(a))||a);return t&&a&&ie(e,r,a),a};var se=(o,e,r)=>e.has(o)||xe("Cannot "+r);var ne=(o,e,r)=>(se(o,e,"read from private field"),r?r.call(o):e.get(o)),le=(o,e,r)=>e.has(o)?xe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,r),de=(o,e,r,t)=>(se(o,e,"write to private field"),t?t.call(o,r):e.set(o,r),r),g=(o,e,r)=>(se(o,e,"access private method"),r);var ye=ke(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.errorMessages=O.ErrorType=void 0;var R;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(R=O.ErrorType||(O.ErrorType={}));O.errorMessages=new Map([[R.MalformedUnicode,"malformed Unicode character escape sequence"],[R.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[R.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[R.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[R.EndOfString,"malformed escape sequence at end of string"]])});var ze=ke(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.unraw=N.errorMessages=N.ErrorType=void 0;var y=ye();Object.defineProperty(N,"ErrorType",{enumerable:!0,get:function(){return y.ErrorType}});Object.defineProperty(N,"errorMessages",{enumerable:!0,get:function(){return y.errorMessages}});function Ze(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function G(o,e,r){let t=Ze(o);if(Number.isNaN(t)||r!==void 0&&r!==o.length)throw new SyntaxError(y.errorMessages.get(e));return t}function Be(o){let e=G(o,y.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function _e(o,e){let r=G(o,y.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=G(e,y.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,t)}return String.fromCharCode(r)}function Ge(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Ke(o){if(!Ge(o))throw new SyntaxError(y.errorMessages.get(y.ErrorType.MalformedUnicode));let e=o.slice(1,-1),r=G(e,y.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(t){throw t instanceof RangeError?new SyntaxError(y.errorMessages.get(y.ErrorType.CodePointLimit)):t}}function Je(o,e=!1){if(e)throw new SyntaxError(y.errorMessages.get(y.ErrorType.OctalDeprecation));let r=parseInt(o,8);return String.fromCharCode(r)}var Qe=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function We(o){return Qe.get(o)||o}var er=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function Ce(o,e=!1){return o.replace(er,function(r,t,a,i,n,s,d,m,_){if(t!==void 0)return"\\";if(a!==void 0)return Be(a);if(i!==void 0)return Ke(i);if(n!==void 0)return _e(n,s);if(d!==void 0)return _e(d);if(m==="0")return"\0";if(m!==void 0)return Je(m,!e);if(_!==void 0)return We(_);throw new SyntaxError(y.errorMessages.get(y.ErrorType.EndOfString))})}N.unraw=Ce;N.default=Ce});var Fe=qe(ze(),1);var A=o=>typeof o=="string",rr=o=>typeof o=="function",Ee=new Map,Se="en";function be(o){return[...Array.isArray(o)?o:[o],Se]}function pe(o,e,r){let t=be(o);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return K(()=>J("date",t,r),()=>new Intl.DateTimeFormat(t,a)).format(A(e)?new Date(e):e)}function tr(o,e,r){let t;if(r||(r="default"),typeof r=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=r;return pe(o,e,t)}function ce(o,e,r){let t=be(o);return K(()=>J("number",t,r),()=>new Intl.NumberFormat(t,r)).format(e)}function Me(o,e,r,{offset:t=0,...a}){var s,d;let i=be(o),n=e?K(()=>J("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):K(()=>J("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(d=(s=a[r])!=null?s:a[n.select(r-t)])!=null?d:a.other}function K(o,e){let r=o(),t=Ee.get(r);return t||(t=e(),Ee.set(r,t)),t}function J(o,e,r){let t=e.join("-");return`${o}-${t}-${JSON.stringify(r)}`}var $e=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Ve="%__lingui_octothorpe__%",or=(o,e,r={})=>{let t=e||o,a=n=>typeof n=="object"?n:r[n],i=(n,s)=>{let d=Object.keys(r).length?a("number"):void 0,m=ce(t,n,d);return s.replace(new RegExp(Ve,"g"),m)};return{plural:(n,s)=>{let{offset:d=0}=s,m=Me(t,!1,n,s);return i(n-d,m)},selectordinal:(n,s)=>{let{offset:d=0}=s,m=Me(t,!0,n,s);return i(n-d,m)},select:ar,number:(n,s)=>ce(t,n,a(s)||{style:s}),date:(n,s)=>pe(t,n,a(s)||s),time:(n,s)=>tr(t,n,a(s)||s)}},ar=(o,e)=>{var r;return(r=e[o])!=null?r:e.other};function ir(o,e,r){return(t={},a)=>{let i=or(e,r,a),n=(d,m=!1)=>Array.isArray(d)?d.reduce((_,F)=>{if(F==="#"&&m)return _+Ve;if(A(F))return _+F;let[S,k,C]=F,z={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(C).forEach(([T,$])=>{z[T]=n($,k==="plural"||k==="selectordinal")}):z=C;let x;if(k){let T=i[k];x=T(t[S],z)}else x=t[S];return x==null?_:_+x},""):d,s=n(o);return A(s)&&$e.test(s)?(0,Fe.unraw)(s):A(s)?s:s?String(s):""}}var sr=Object.defineProperty,nr=(o,e,r)=>e in o?sr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,lr=(o,e,r)=>(nr(o,typeof e!="symbol"?e+"":e,r),r),he=class{constructor(){lr(this,"_events",{})}on(e,r){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(r);~a&&t.splice(a,1)}emit(e,...r){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},dr=Object.defineProperty,cr=(o,e,r)=>e in o?dr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,I=(o,e,r)=>(cr(o,typeof e!="symbol"?e+"":e,r),r),ue=class extends he{constructor(e){var r;super(),I(this,"_locale",""),I(this,"_locales"),I(this,"_localeData",{}),I(this,"_messages",{}),I(this,"_missing"),I(this,"_messageCompiler"),I(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:Se,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,r){let t=this._localeData[e];t?Object.assign(t,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,r){let t=this._messages[e];t?Object.assign(t,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:t}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),A(e)||(r=e.values||r,a=e.message,e=e.id);let i=this.messages[e],n=i===void 0,s=this._missing;if(s&&n)return rr(s)?s(this._locale,e):s;n&&this.emit("missing",{id:e,locale:this._locale});let d=i||a||e;return A(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
1
+ var Ue=Object.create;var ie=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Xe=Object.getPrototypeOf,He=Object.prototype.hasOwnProperty;var xe=o=>{throw TypeError(o)};var ke=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports);var qe=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Re(r))!He.call(o,a)&&a!==e&&ie(o,a,{get:()=>r[a],enumerable:!(t=we(r,a))||t.enumerable});return o};var Ze=(o,r,e)=>(e=o!=null?Ue(Xe(o)):{},qe(r||!o||!o.__esModule?ie(e,"default",{value:o,enumerable:!0}):e,o));var p=(o,r,e,t)=>{for(var a=t>1?void 0:t?we(r,e):r,i=o.length-1,n;i>=0;i--)(n=o[i])&&(a=(t?n(r,e,a):n(a))||a);return t&&a&&ie(r,e,a),a};var se=(o,r,e)=>r.has(o)||xe("Cannot "+e);var ne=(o,r,e)=>(se(o,r,"read from private field"),e?e.call(o):r.get(o)),le=(o,r,e)=>r.has(o)?xe("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),de=(o,r,e,t)=>(se(o,r,"write to private field"),t?t.call(o,e):r.set(o,e),e),m=(o,r,e)=>(se(o,r,"access private method"),e);var ye=ke(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.errorMessages=O.ErrorType=void 0;var U;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(U=O.ErrorType||(O.ErrorType={}));O.errorMessages=new Map([[U.MalformedUnicode,"malformed Unicode character escape sequence"],[U.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[U.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[U.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[U.EndOfString,"malformed escape sequence at end of string"]])});var ze=ke(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.unraw=T.errorMessages=T.ErrorType=void 0;var y=ye();Object.defineProperty(T,"ErrorType",{enumerable:!0,get:function(){return y.ErrorType}});Object.defineProperty(T,"errorMessages",{enumerable:!0,get:function(){return y.errorMessages}});function Be(o){return!o.match(/[^a-f0-9]/i)?parseInt(o,16):NaN}function G(o,r,e){let t=Be(o);if(Number.isNaN(t)||e!==void 0&&e!==o.length)throw new SyntaxError(y.errorMessages.get(r));return t}function Ke(o){let r=G(o,y.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(r)}function _e(o,r){let e=G(o,y.ErrorType.MalformedUnicode,4);if(r!==void 0){let t=G(r,y.ErrorType.MalformedUnicode,4);return String.fromCharCode(e,t)}return String.fromCharCode(e)}function Ge(o){return o.charAt(0)==="{"&&o.charAt(o.length-1)==="}"}function Je(o){if(!Ge(o))throw new SyntaxError(y.errorMessages.get(y.ErrorType.MalformedUnicode));let r=o.slice(1,-1),e=G(r,y.ErrorType.MalformedUnicode);try{return String.fromCodePoint(e)}catch(t){throw t instanceof RangeError?new SyntaxError(y.errorMessages.get(y.ErrorType.CodePointLimit)):t}}function Qe(o,r=!1){if(r)throw new SyntaxError(y.errorMessages.get(y.ErrorType.OctalDeprecation));let e=parseInt(o,8);return String.fromCharCode(e)}var We=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function er(o){return We.get(o)||o}var rr=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function Ce(o,r=!1){return o.replace(rr,function(e,t,a,i,n,s,d,g,_){if(t!==void 0)return"\\";if(a!==void 0)return Ke(a);if(i!==void 0)return Je(i);if(n!==void 0)return _e(n,s);if(d!==void 0)return _e(d);if(g==="0")return"\0";if(g!==void 0)return Qe(g,!r);if(_!==void 0)return er(_);throw new SyntaxError(y.errorMessages.get(y.ErrorType.EndOfString))})}T.unraw=Ce;T.default=Ce});var Fe=Ze(ze(),1);var L=o=>typeof o=="string",tr=o=>typeof o=="function",Ee=new Map,Se="en";function be(o){return[...Array.isArray(o)?o:[o],Se]}function pe(o,r,e){let t=be(o);e||(e="default");let a;if(typeof e=="string")switch(a={day:"numeric",month:"short",year:"numeric"},e){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=e;return J(()=>Q("date",t,e),()=>new Intl.DateTimeFormat(t,a)).format(L(r)?new Date(r):r)}function or(o,r,e){let t;if(e||(e="default"),typeof e=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},e){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=e;return pe(o,r,t)}function ce(o,r,e){let t=be(o);return J(()=>Q("number",t,e),()=>new Intl.NumberFormat(t,e)).format(r)}function Me(o,r,e,{offset:t=0,...a}){var s,d;let i=be(o),n=r?J(()=>Q("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):J(()=>Q("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(d=(s=a[e])!=null?s:a[n.select(e-t)])!=null?d:a.other}function J(o,r){let e=o(),t=Ee.get(e);return t||(t=r(),Ee.set(e,t)),t}function Q(o,r,e){let t=r.join("-");return`${o}-${t}-${JSON.stringify(e)}`}var $e=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Ve="%__lingui_octothorpe__%",ar=(o,r,e={})=>{let t=r||o,a=n=>typeof n=="object"?n:e[n],i=(n,s)=>{let d=Object.keys(e).length?a("number"):void 0,g=ce(t,n,d);return s.replace(new RegExp(Ve,"g"),g)};return{plural:(n,s)=>{let{offset:d=0}=s,g=Me(t,!1,n,s);return i(n-d,g)},selectordinal:(n,s)=>{let{offset:d=0}=s,g=Me(t,!0,n,s);return i(n-d,g)},select:ir,number:(n,s)=>ce(t,n,a(s)||{style:s}),date:(n,s)=>pe(t,n,a(s)||s),time:(n,s)=>or(t,n,a(s)||s)}},ir=(o,r)=>{var e;return(e=r[o])!=null?e:r.other};function sr(o,r,e){return(t={},a)=>{let i=ar(r,e,a),n=(d,g=!1)=>Array.isArray(d)?d.reduce((_,F)=>{if(F==="#"&&g)return _+Ve;if(L(F))return _+F;let[S,k,C]=F,z={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(C).forEach(([N,$])=>{z[N]=n($,k==="plural"||k==="selectordinal")}):z=C;let x;if(k){let N=i[k];x=N(t[S],z)}else x=t[S];return x==null?_:_+x},""):d,s=n(o);return L(s)&&$e.test(s)?(0,Fe.unraw)(s):L(s)?s:s?String(s):""}}var nr=Object.defineProperty,lr=(o,r,e)=>r in o?nr(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,dr=(o,r,e)=>(lr(o,typeof r!="symbol"?r+"":r,e),e),he=class{constructor(){dr(this,"_events",{})}on(r,e){var a;var t;return(a=(t=this._events)[r])!=null||(t[r]=[]),this._events[r].push(e),()=>this.removeListener(r,e)}removeListener(r,e){let t=this._getListeners(r);if(!t)return;let a=t.indexOf(e);~a&&t.splice(a,1)}emit(r,...e){let t=this._getListeners(r);t&&t.map(a=>a.apply(this,e))}_getListeners(r){let e=this._events[r];return Array.isArray(e)?e:!1}},cr=Object.defineProperty,hr=(o,r,e)=>r in o?cr(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,I=(o,r,e)=>(hr(o,typeof r!="symbol"?r+"":r,e),e),ue=class extends he{constructor(r){var e;super(),I(this,"_locale",""),I(this,"_locales"),I(this,"_localeData",{}),I(this,"_messages",{}),I(this,"_missing"),I(this,"_messageCompiler"),I(this,"t",this._.bind(this)),r.missing!=null&&(this._missing=r.missing),r.messages!=null&&this.load(r.messages),r.localeData!=null&&this.loadLocaleData(r.localeData),(typeof r.locale=="string"||r.locales)&&this.activate((e=r.locale)!=null?e:Se,r.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var r;return(r=this._messages[this._locale])!=null?r:{}}get localeData(){var r;return(r=this._localeData[this._locale])!=null?r:{}}_loadLocaleData(r,e){let t=this._localeData[r];t?Object.assign(t,e):this._localeData[r]=e}setMessagesCompiler(r){return this._messageCompiler=r,this}loadLocaleData(r,e){typeof r=="string"?this._loadLocaleData(r,e):Object.keys(r).forEach(t=>this._loadLocaleData(t,r[t])),this.emit("change")}_load(r,e){let t=this._messages[r];t?Object.assign(t,e):this._messages[r]=e}load(r,e){typeof r=="string"&&typeof e=="object"?this._load(r,e):Object.entries(r).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:r,locales:e,messages:t}){this._locale=r,this._locales=e||void 0,this._messages[this._locale]=t,this.emit("change")}activate(r,e){this._locale=r,this._locales=e,this.emit("change")}_(r,e,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;r||(r=""),L(r)||(e=r.values||e,a=r.message,r=r.id);let i=this.messages[r],n=i===void 0,s=this._missing;if(s&&n)return tr(s)?s(this._locale,r):s;n&&this.emit("missing",{id:r,locale:this._locale});let d=i||a||r;return L(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
3
3
 
4
4
  > ${d}
5
5
 
@@ -7,7 +7,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
7
7
  ICU features such as interpolation and plurals will not work properly for that message.
8
8
 
9
9
  Please compile your catalog first.
10
- `)),A(d)&&$e.test(d)?JSON.parse(`"${d}"`):A(d)?d:ir(d,this._locale,this._locales)(r,t==null?void 0:t.formats)}date(e,r){return pe(this._locales||this._locale,e,r)}number(e,r){return ce(this._locales||this._locale,e,r)}};function hr(o={}){return new ue(o)}var M=hr();var h=function(o,e,r,t){if(r==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?o!==e||!t:!e.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?t:r==="a"?t.call(o):t?t.value:e.get(o)},v=function(o,e,r,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?o!==e||!a:!e.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,r):a?a.value=r:e.set(o,r),r};function Te(o){var e,r,t,a,i,n,s,d,m,_,F,S,k,C,z,x,T,$,te;class je extends o{constructor(...l){var c,f,w;super(...l),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),t.set(this,!1),a.set(this,!1),i.set(this,void 0),n.set(this,void 0),s.set(this,!0),m.set(this,""),_.set(this,()=>{v(this,a,!0,"f"),v(this,r,!0,"f"),h(this,e,"m",x).call(this)}),F.set(this,()=>{v(this,r,!1,"f"),h(this,e,"m",T).call(this,this.shouldFormValueUpdate()?h(this,m,"f"):""),!this.validity.valid&&h(this,a,"f")&&v(this,t,!0,"f");let P=h(this,e,"m",x).call(this);this.validationMessageCallback&&this.validationMessageCallback(P?this.internals.validationMessage:"")}),S.set(this,()=>{var P;h(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),v(this,s,!1,"f")),v(this,a,!0,"f"),v(this,t,!0,"f"),h(this,e,"m",x).call(this),(P=this===null||this===void 0?void 0:this.validationMessageCallback)===null||P===void 0||P.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),C.set(this,!1),z.set(this,Promise.resolve()),(c=this.addEventListener)===null||c===void 0||c.call(this,"focus",h(this,_,"f")),(f=this.addEventListener)===null||f===void 0||f.call(this,"blur",h(this,F,"f")),(w=this.addEventListener)===null||w===void 0||w.call(this,"invalid",h(this,S,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(w=>w.attribute).flat(),c=super.observedAttributes||[];return[...new Set([...c,...l])]}static getValidator(l){return this.validators.find(c=>c.attribute===l)||null}static getValidators(l){return this.validators.filter(c=>{var f;if(c.attribute===l||!((f=c.attribute)===null||f===void 0)&&f.includes(l))return!0})}get form(){return this.internals.form}get showError(){return h(this,e,"m",x).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,c,f){var w;(w=super.attributeChangedCallback)===null||w===void 0||w.call(this,l,c,f);let H=this.constructor.getValidators(l);H!=null&&H.length&&this.validationTarget&&this.setValue(h(this,m,"f"))}setValue(l){var c;v(this,t,!1,"f"),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,""),v(this,m,l,"f");let w=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(w),h(this,e,"m",T).call(this,w),this.valueChangedCallback&&this.valueChangedCallback(w),h(this,e,"m",x).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(h(this,z,"f")))}formResetCallback(){var l,c;v(this,a,!1,"f"),v(this,t,!1,"f"),h(this,e,"m",x).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(c=this.validationMessageCallback)===null||c===void 0||c.call(this,h(this,e,"m",x).call(this)?this.validationMessage:"")}}return r=new WeakMap,t=new WeakMap,a=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,m=new WeakMap,_=new WeakMap,F=new WeakMap,S=new WeakMap,k=new WeakMap,C=new WeakMap,z=new WeakMap,e=new WeakSet,d=function(){let l=this.getRootNode(),c=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(c)},x=function(){if(this.hasAttribute("disabled"))return!1;let l=h(this,t,"f")||h(this,a,"f")&&!this.validity.valid&&!h(this,r,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},T=function(l){let c=this.constructor,f={},w=c.validators,P=[],H=w.some(E=>E.isValid instanceof Promise);h(this,C,"f")||(v(this,z,new Promise(E=>{v(this,k,E,"f")}),"f"),v(this,C,!0,"f")),h(this,i,"f")&&(h(this,i,"f").abort(),v(this,n,h(this,i,"f"),"f"));let q=new AbortController;v(this,i,q,"f");let Z,ve=!1;w.length&&(w.forEach(E=>{let oe=E.key||"customError",Y=E.isValid(this,l,q.signal);Y instanceof Promise?(P.push(Y),Y.then(ae=>{ae!=null&&(f[oe]=!ae,Z=h(this,e,"m",te).call(this,E,l),h(this,e,"m",$).call(this,f,Z))})):(f[oe]=!Y,this.validity[oe]!==!Y&&(ve=!0),!Y&&!Z&&(Z=h(this,e,"m",te).call(this,E,l)))}),Promise.allSettled(P).then(()=>{var E;q!=null&&q.signal.aborted||(v(this,C,!1,"f"),(E=h(this,k,"f"))===null||E===void 0||E.call(this))}),(ve||!H)&&h(this,e,"m",$).call(this,f,Z))},$=function(l,c){if(this.validationTarget)this.internals.setValidity(l,c,this.validationTarget),v(this,s,!1,"f");else{if(this.internals.setValidity(l,c),this.internals.validity.valid)return;v(this,s,!0,"f")}},te=function(l,c){if(this.validityCallback){let f=this.validityCallback(l.key||"customError");if(f)return f}return l.message instanceof Function?l.message(this,c):l.message},je}import{html as B,LitElement as Ae,nothing as D}from"lit";import{property as V,query as me,state as L}from"lit/decorators.js";import{classMap as pr}from"lit/directives/class-map.js";import{ifDefined as Q}from"lit/directives/if-defined.js";import{css as ur}from"lit";var Pe=ur`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`;import{css as Ne}from"lit";var De=Ne`
10
+ `)),L(d)&&$e.test(d)?JSON.parse(`"${d}"`):L(d)?d:sr(d,this._locale,this._locales)(e,t==null?void 0:t.formats)}date(r,e){return pe(this._locales||this._locale,r,e)}number(r,e){return ce(this._locales||this._locale,r,e)}};function ur(o={}){return new ue(o)}var M=ur();var u=function(o,r,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?o!==r||!t:!r.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(o):t?t.value:r.get(o)},v=function(o,r,e,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?o!==r||!a:!r.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(o,e):a?a.value=e:r.set(o,e),e};function Ne(o){var r,e,t,a,i,n,s,d,g,_,F,S,k,C,z,x,N,$,te;class Ye extends o{constructor(...l){var h,f,w;super(...l),r.add(this),this.internals=this.attachInternals(),e.set(this,!1),t.set(this,!1),a.set(this,!1),i.set(this,void 0),n.set(this,void 0),s.set(this,!0),g.set(this,""),_.set(this,()=>{v(this,a,!0,"f"),v(this,e,!0,"f"),u(this,r,"m",x).call(this)}),F.set(this,()=>{v(this,e,!1,"f"),u(this,r,"m",N).call(this,this.shouldFormValueUpdate()?u(this,g,"f"):""),!this.validity.valid&&u(this,a,"f")&&v(this,t,!0,"f");let P=u(this,r,"m",x).call(this);this.validationMessageCallback&&this.validationMessageCallback(P?this.internals.validationMessage:"")}),S.set(this,()=>{var P;u(this,s,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),v(this,s,!1,"f")),v(this,a,!0,"f"),v(this,t,!0,"f"),u(this,r,"m",x).call(this),(P=this===null||this===void 0?void 0:this.validationMessageCallback)===null||P===void 0||P.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),C.set(this,!1),z.set(this,Promise.resolve()),(h=this.addEventListener)===null||h===void 0||h.call(this,"focus",u(this,_,"f")),(f=this.addEventListener)===null||f===void 0||f.call(this,"blur",u(this,F,"f")),(w=this.addEventListener)===null||w===void 0||w.call(this,"invalid",u(this,S,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(w=>w.attribute).flat(),h=super.observedAttributes||[];return[...new Set([...h,...l])]}static getValidator(l){return this.validators.find(h=>h.attribute===l)||null}static getValidators(l){return this.validators.filter(h=>{var f;if(h.attribute===l||!((f=h.attribute)===null||f===void 0)&&f.includes(l))return!0})}get form(){return this.internals.form}get showError(){return u(this,r,"m",x).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,h,f){var w;(w=super.attributeChangedCallback)===null||w===void 0||w.call(this,l,h,f);let H=this.constructor.getValidators(l);H!=null&&H.length&&this.validationTarget&&this.setValue(u(this,g,"f"))}setValue(l){var h;v(this,t,!1,"f"),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,""),v(this,g,l,"f");let w=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(w),u(this,r,"m",N).call(this,w),this.valueChangedCallback&&this.valueChangedCallback(w),u(this,r,"m",x).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(u(this,z,"f")))}formResetCallback(){var l,h;v(this,a,!1,"f"),v(this,t,!1,"f"),u(this,r,"m",x).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(h=this.validationMessageCallback)===null||h===void 0||h.call(this,u(this,r,"m",x).call(this)?this.validationMessage:"")}}return e=new WeakMap,t=new WeakMap,a=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,g=new WeakMap,_=new WeakMap,F=new WeakMap,S=new WeakMap,k=new WeakMap,C=new WeakMap,z=new WeakMap,r=new WeakSet,d=function(){let l=this.getRootNode(),h=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(h)},x=function(){if(this.hasAttribute("disabled"))return!1;let l=u(this,t,"f")||u(this,a,"f")&&!this.validity.valid&&!u(this,e,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},N=function(l){let h=this.constructor,f={},w=h.validators,P=[],H=w.some(E=>E.isValid instanceof Promise);u(this,C,"f")||(v(this,z,new Promise(E=>{v(this,k,E,"f")}),"f"),v(this,C,!0,"f")),u(this,i,"f")&&(u(this,i,"f").abort(),v(this,n,u(this,i,"f"),"f"));let q=new AbortController;v(this,i,q,"f");let Z,ve=!1;w.length&&(w.forEach(E=>{let oe=E.key||"customError",Y=E.isValid(this,l,q.signal);Y instanceof Promise?(P.push(Y),Y.then(ae=>{ae!=null&&(f[oe]=!ae,Z=u(this,r,"m",te).call(this,E,l),u(this,r,"m",$).call(this,f,Z))})):(f[oe]=!Y,this.validity[oe]!==!Y&&(ve=!0),!Y&&!Z&&(Z=u(this,r,"m",te).call(this,E,l)))}),Promise.allSettled(P).then(()=>{var E;q!=null&&q.signal.aborted||(v(this,C,!1,"f"),(E=u(this,k,"f"))===null||E===void 0||E.call(this))}),(ve||!H)&&u(this,r,"m",$).call(this,f,Z))},$=function(l,h){if(this.validationTarget)this.internals.setValidity(l,h,this.validationTarget),v(this,s,!1,"f");else{if(this.internals.setValidity(l,h),this.internals.validity.valid)return;v(this,s,!0,"f")}},te=function(l,h){if(this.validityCallback){let f=this.validityCallback(l.key||"customError");if(f)return f}return l.message instanceof Function?l.message(this,h):l.message},Ye}import{html as B,LitElement as Le,nothing as D}from"lit";import{property as V,query as me,state as A}from"lit/decorators.js";import{classMap as mr}from"lit/directives/class-map.js";import{ifDefined as W}from"lit/directives/if-defined.js";import{css as br}from"lit";var Pe=br`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hidden{display:none}.absolute{position:absolute}.relative{position:relative}.static{position:static}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`;import{css as Te}from"lit";var De=Te`
11
11
  *,
12
12
  :before,
13
13
  :after {
@@ -280,7 +280,7 @@ Please compile your catalog first.
280
280
  svg {
281
281
  pointer-events: none;
282
282
  }
283
- `,Cr=Ne`*, :before, :after {
283
+ `,zr=Te`*, :before, :after {
284
284
  --w-rotate: 0;
285
285
  --w-rotate-x: 0;
286
286
  --w-rotate-y: 0;
@@ -2446,7 +2446,7 @@ Please compile your catalog first.
2446
2446
  display: none
2447
2447
  }
2448
2448
  }
2449
- `;import{css as br}from"lit";var Le=br`
2449
+ `;import{css as pr}from"lit";var Ae=pr`
2450
2450
  .w-slider-thumb {
2451
2451
  position: relative;
2452
2452
  display: grid;
@@ -2637,7 +2637,7 @@ Please compile your catalog first.
2637
2637
  w-textfield {
2638
2638
  --w-textfield-placeholder-color-text: var(--w-s-color-text);
2639
2639
  }
2640
- `;var Oe={};var j,b,W,ee,ge,U,re,fe,Ie,u=class extends Te(Ae){constructor(){super(...arguments);le(this,b);this.disabled=!1;this.invalid=!1;this.openEnded=!1;this.suffix="";this._showTooltip=!1;this._inputHasFocus=!1;this._hiddenTextfield=!1;le(this,j,null);this.anchorPositioningStyleElement=null}resetFormControl(){this.value=ne(this,j),this.dispatchEvent(new CustomEvent("thumbreset",{bubbles:!0}))}async updateFieldAfterValidation(){let r=this.shadowRoot.querySelector("w-textfield");await g(this,b,re).call(this,r.value,!0)}async connectedCallback(){if(super.connectedCallback(),de(this,j,this.value),this.setValue(this.value),this.slot&&!this.ariaDescription&&(this.slot==="from"?this.ariaDescription=M.t({id:"slider.label.from",comment:"Accessible label for the 'from value' input field in a range slider",message:"From"}):this.slot==="to"&&(this.ariaDescription=M.t({id:"slider.label.to",comment:"Accessible label for the 'to value' input field in a range slider",message:"To"}))),"anchorName"in document.documentElement.style)await this.updateComplete;else{let a=Oe.url.substring(0,Oe.url.lastIndexOf("/"));try{let[{default:i}]=await Promise.all([import(`${a}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent=`
2640
+ `;var Oe={};var j,c,ee,re,ge,R,K,fe,Ie,je,b=class extends Ne(Le){constructor(){super(...arguments);le(this,c);this.disabled=!1;this.invalid=!1;this.openEnded=!1;this.suffix="";this._showTooltip=!1;this._inputHasFocus=!1;this._hiddenTextfield=!1;le(this,j,null);this.anchorPositioningStyleElement=null}resetFormControl(){this.value=ne(this,j),this.dispatchEvent(new CustomEvent("thumbreset",{bubbles:!0}))}async updateFieldAfterValidation(){let e=this.shadowRoot.querySelector("w-textfield");await m(this,c,K).call(this,e.value,!0)}async connectedCallback(){if(super.connectedCallback(),de(this,j,this.value),this.setValue(this.value),this.slot&&!this.ariaDescription&&(this.slot==="from"?this.ariaDescription=M.t({id:"slider.label.from",comment:"Accessible label for the 'from value' input field in a range slider",message:"From"}):this.slot==="to"&&(this.ariaDescription=M.t({id:"slider.label.to",comment:"Accessible label for the 'to value' input field in a range slider",message:"To"}))),"anchorName"in document.documentElement.style)await this.updateComplete;else{let a=Oe.url.substring(0,Oe.url.lastIndexOf("/"));try{let[{default:i}]=await Promise.all([import(`${a}/oddbird-css-anchor-positioning.js`),this.updateComplete]);this.anchorPositioningStyleElement||(this.anchorPositioningStyleElement=document.createElement("style"),this.shadowRoot.prepend(this.anchorPositioningStyleElement)),this.anchorPositioningStyleElement.textContent=`
2641
2641
  /*
2642
2642
  * The polyfill can only anchor to ::before and ::after pseudo elements, not the pseudo element slider thumb.
2643
2643
  * We work around that by recreating a transparent version of the active range
@@ -2686,7 +2686,7 @@ Please compile your catalog first.
2686
2686
  left: anchor(--polyfilled-thumb left);
2687
2687
  margin-left: 38px;
2688
2688
  }
2689
- `,await i({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(i){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:i}))}}let r=window.navigator.userAgent;/WebKit/.test(r)&&!/Chrome/.test(r)&&this.tooltipTarget&&this.tooltipTarget.style.setProperty("--transform-offset","var(--w-slider-thumb-size, 28px)"),g(this,b,ge).call(this)}get boundaryValue(){return this.slot==="from"?this.min:this.max}get textFieldDisplayValue(){var r;return this._inputHasFocus?this.value!==""?this.value:(r=this.range)!=null&&r.value?Math.min(Math.max(Number(this.range.value),Number(this.min)+1),Number(this.max)-1).toString():"":this.value}get tooltipDisplayValue(){var t,a;let r=0;return this.tooltipFormatter?r=this.tooltipFormatter(this.value,this.slot):this.valueFormatter?r=this.valueFormatter(this.value,this.slot):this.value===""?r=(a=(t=this.range)==null?void 0:t.value)!=null?a:this.boundaryValue:r=this.value||0,r}get ariaDescriptionText(){let r="",t=this.ariaDescription||"",a=this.value==="";return this.openEnded&&a&&(r=this.slot==="from"?M.t({id:"slider.placeholder.from",message:"Min"}):M.t({id:"slider.placeholder.to",message:"Max"})),r?`${r}, ${t}`:t}updated(r){r.has("openEnded")&&this.openEnded&&!this.placeholder&&(this.slot==="to"||this.slot===""?this.placeholder=M.t({id:"slider.placeholder.to",message:"Max",comment:"Max as in short for Maximum"}):this.slot==="from"&&(this.placeholder=M.t({id:"slider.placeholder.from",message:"Min",comment:"Min as in short for Minimum"}))),r.has("value")&&(typeof ne(this,j)=="undefined"&&typeof this.value!="undefined"&&de(this,j,this.value),this.setValue(this.value),g(this,b,ge).call(this))}render(){var t,a,i,n;let r=this.placeholder&&!this.value;return B`
2689
+ `,await i({roots:[this.shadowRoot],elements:[this.anchorPositioningStyleElement]})}catch(i){console.error(new Error("Error registering the CSS anchor positioning polyfill. The UI will look broken.",{cause:i}))}}let e=window.navigator.userAgent;/WebKit/.test(e)&&!/Chrome/.test(e)&&this.tooltipTarget&&this.tooltipTarget.style.setProperty("--transform-offset","var(--w-slider-thumb-size, 28px)"),m(this,c,ge).call(this)}get boundaryValue(){return this.slot==="from"?this.min:this.max}get textFieldDisplayValue(){var e;return this._inputHasFocus?this.value!==""?this.value:(e=this.range)!=null&&e.value?Math.min(Math.max(Number(this.range.value),Number(this.min)+1),Number(this.max)-1).toString():"":this.value}get tooltipDisplayValue(){var t,a;let e=0;return this.tooltipFormatter?e=this.tooltipFormatter(this.value,this.slot):this.valueFormatter?e=this.valueFormatter(this.value,this.slot):this.value===""?e=(a=(t=this.range)==null?void 0:t.value)!=null?a:this.boundaryValue:e=this.value||0,e}get ariaDescriptionText(){let e="",t=this.ariaDescription||"",a=this.value==="";return this.openEnded&&a&&(e=this.slot==="from"?M.t({id:"slider.placeholder.from",message:"Min"}):M.t({id:"slider.placeholder.to",message:"Max"})),e?`${e}, ${t}`:t}updated(e){e.has("openEnded")&&this.openEnded&&!this.placeholder&&(this.slot==="to"||this.slot===""?this.placeholder=M.t({id:"slider.placeholder.to",message:"Max",comment:"Max as in short for Maximum"}):this.slot==="from"&&(this.placeholder=M.t({id:"slider.placeholder.from",message:"Min",comment:"Min as in short for Minimum"}))),e.has("value")&&(typeof ne(this,j)=="undefined"&&typeof this.value!="undefined"&&de(this,j,this.value),this.setValue(this.value),m(this,c,ge).call(this))}render(){var t,a,i,n;let e=this.placeholder&&!this.value;return B`
2690
2690
  <div class="w-slider-thumb">
2691
2691
  ${"anchorName"in document.documentElement.style?D:B`<div class="polyfill-range">
2692
2692
  <div class="polyfill-active-range"></div>
@@ -2694,22 +2694,22 @@ Please compile your catalog first.
2694
2694
  <input
2695
2695
  id="range"
2696
2696
  aria-label="${this.ariaLabel}"
2697
- aria-describedby="${Q(this.ariaDescription?"aria-description":void 0)}"
2697
+ aria-describedby="${W(this.ariaDescription?"aria-description":void 0)}"
2698
2698
  class="w-slider-thumb__range"
2699
2699
  type="range"
2700
2700
  .value="${this.value}"
2701
2701
  min="${this.min}"
2702
2702
  max="${this.max}"
2703
- step="${Q(!this.openEnded&&this.step?this.step:void 0)}"
2703
+ step="${W(!this.openEnded&&this.step?this.step:void 0)}"
2704
2704
  ?disabled="${this.disabled}"
2705
- @mousedown="${g(this,b,W)}"
2706
- @mouseup="${g(this,b,ee)}"
2707
- @touchstart="${g(this,b,W)}"
2708
- @touchend="${g(this,b,ee)}"
2709
- @focus="${g(this,b,W)}"
2710
- @blur="${g(this,b,ee)}"
2711
- @input="${g(this,b,fe)}"
2712
- @keydown="${this.openEnded?g(this,b,Ie):D}"
2705
+ @mousedown="${m(this,c,ee)}"
2706
+ @mouseup="${m(this,c,re)}"
2707
+ @touchstart="${m(this,c,ee)}"
2708
+ @touchend="${m(this,c,re)}"
2709
+ @focus="${m(this,c,ee)}"
2710
+ @blur="${m(this,c,re)}"
2711
+ @input="${m(this,c,fe)}"
2712
+ @keydown="${this.openEnded?m(this,c,Ie):D}"
2713
2713
  />
2714
2714
 
2715
2715
  ${this.slot==="from"||!this.slot?B`
@@ -2732,18 +2732,19 @@ Please compile your catalog first.
2732
2732
 
2733
2733
  <w-textfield
2734
2734
  aria-label="${this.ariaLabel}"
2735
- aria-description="${Q(this.ariaDescriptionText)}"
2736
- class="${pr({"w-slider-thumb__textfield":!0,"sr-only":this._hiddenTextfield})}"
2735
+ aria-description="${W(this.ariaDescriptionText)}"
2736
+ class="${mr({"w-slider-thumb__textfield":!0,"sr-only":this._hiddenTextfield})}"
2737
2737
  type="number"
2738
2738
  tabindex="${this._hiddenTextfield?-1:D}"
2739
2739
  placeholder="${this.placeholder}"
2740
2740
  .value="${this.textFieldDisplayValue}"
2741
- .formatter=${this.valueFormatter&&!r?s=>this.valueFormatter(s,this.slot):D}
2741
+ .formatter=${this.valueFormatter&&!e?s=>this.valueFormatter(s,this.slot):D}
2742
2742
  min="${this.openEnded?D:this.min}"
2743
2743
  max="${this.openEnded?D:this.max}"
2744
- step="${Q(this.step)}"
2744
+ step="${W(this.step)}"
2745
2745
  ?invalid="${!!this.invalid}"
2746
- @input="${g(this,b,fe)}"
2746
+ @input="${m(this,c,fe)}"
2747
+ @keydown="${m(this,c,je)}"
2747
2748
  ?disabled="${this.disabled}"
2748
2749
  >
2749
2750
  ${(t=this.suffix)!=null&&t?B`<w-affix slot="suffix" label="${(a=this.suffix)!=null?a:""}"></w-affix>`:D}
@@ -2770,5 +2771,5 @@ Please compile your catalog first.
2770
2771
  ${this.ariaDescriptionText}
2771
2772
  </span>
2772
2773
  </div>
2773
- `}};j=new WeakMap,b=new WeakSet,W=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},ee=function(){this._showTooltip=!1},ge=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},U=function(r){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:r,slot:this.slot}}))},re=async function(r,t){var _;let a=(_=this.suffix)!=null?_:"",i=Number.parseInt(r);if(this.openEnded&&!t&&this.step&&!(this.slot==="to"&&i>=Number(this.max)-1||this.slot==="from"&&i<=Number(this.min)+1)){let S=1/this.step;i=Math.round(i*S)/S,r=i.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.openEnded&&(i>n||i<s))return g(this,b,U).call(this,M.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${a}`.trim(),max:`${this.max} ${a}`.trim()}})),{shouldCancel:!0};r===""&&this.required&&g(this,b,U).call(this,M.t({id:"slider.error.required",message:"This field is required"})),this.value=r;let d=r===this.max||r===this.min,m=!1;if(this.slot){let F=this.parentElement.querySelector('w-slider-thumb[slot="to"]'),S=this.parentElement.querySelector('w-slider-thumb[slot="from"]'),k=F.textfield.value||this.max,C=S.textfield.value||this.min,z=Number.parseInt(k),x=Number.parseInt(C),T=M.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let $=this.openEnded&&z>n?z:Math.min(z,this.openEnded?n-1:n);i>$&&(m=!0,this.openEnded&&d?this.value=String($):this.value=k,t&&(g(this,b,U).call(this,T),await this.updateComplete,this.textfield.value=r))}else{let $=this.openEnded&&x<s?x:Math.max(Number.parseInt(C),this.openEnded?s+1:s);i<$&&(m=!0,this.openEnded&&d?this.value=String($):this.value=C,t&&(g(this,b,U).call(this,T),await this.updateComplete,this.textfield.value=r))}}return m?{shouldCancel:!0}:(g(this,b,U).call(this,""),this.range.value=Math.min(Math.max(Number(r),Number(this.min)),Number(this.max)).toString(),this.value=this.openEnded&&!t&&d?"":r,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},fe=async function(r){let t=r.currentTarget.tagName==="W-TEXTFIELD";if(r instanceof CustomEvent)return;let a=r.currentTarget.value;return(await g(this,b,re).call(this,a,t)).shouldCancel?(r.preventDefault(),!1):!0},Ie=async function(r){if(r.key!=="ArrowLeft"&&r.key!=="ArrowRight")return;let t=Number(this.range.value),a=this.step||1,i;r.key==="ArrowLeft"?i=t-a:i=t+a,i=Math.min(Math.max(i,Number(this.min)),Number(this.max)),(await g(this,b,re).call(this,i.toString(),!1)).shouldCancel&&r.preventDefault()},u.shadowRootOptions={...Ae.shadowRootOptions,delegatesFocus:!0},u.styles=[De,Pe,Le],p([V({attribute:"aria-label"})],u.prototype,"ariaLabel",2),p([V({attribute:"aria-description"})],u.prototype,"ariaDescription",2),p([V({reflect:!0})],u.prototype,"name",2),p([V({reflect:!0})],u.prototype,"value",2),p([V({type:Boolean,reflect:!0})],u.prototype,"disabled",2),p([V({type:Boolean,reflect:!0})],u.prototype,"invalid",2),p([V({attribute:!1,reflect:!1})],u.prototype,"openEnded",2),p([V({reflect:!0})],u.prototype,"placeholder",2),p([L()],u.prototype,"markers",2),p([L()],u.prototype,"required",2),p([L()],u.prototype,"step",2),p([L()],u.prototype,"min",2),p([L()],u.prototype,"max",2),p([L()],u.prototype,"suffix",2),p([V({attribute:!1})],u.prototype,"valueFormatter",2),p([V({attribute:!1})],u.prototype,"tooltipFormatter",2),p([V({attribute:!1})],u.prototype,"labelFormatter",2),p([me('input[type="range"]')],u.prototype,"range",2),p([me(".w-slider-thumb__tooltip-target")],u.prototype,"tooltipTarget",2),p([me("w-textfield")],u.prototype,"textfield",2),p([L()],u.prototype,"_showTooltip",2),p([L()],u.prototype,"_inputHasFocus",2),p([L()],u.prototype,"_hiddenTextfield",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",u);export{u as WarpSliderThumb};
2774
+ `}};j=new WeakMap,c=new WeakSet,ee=function(){this._showTooltip=!0,this.shadowRoot.querySelector("w-attention").handleDone()},re=function(){this._showTooltip=!1},ge=function(){this.range&&(this.value===""?this.range.value=this.boundaryValue:this.value&&(this.range.value=this.value))},R=function(e){this.dispatchEvent(new CustomEvent("slidervalidity",{bubbles:!0,detail:{invalid:e,slot:this.slot}}))},K=async function(e,t){var _;let a=(_=this.suffix)!=null?_:"",i=Number.parseInt(e);if(this.openEnded&&!t&&this.step&&!(this.slot==="to"&&i>=Number(this.max)-1||this.slot==="from"&&i<=Number(this.min)+1)){let S=1/this.step;i=Math.round(i*S)/S,e=i.toString()}let n=Number.parseInt(this.max),s=Number.parseInt(this.min);if(!this.openEnded&&(i>n||i<s))return m(this,c,R).call(this,M.t({id:"slider.error.out_of_bounds",message:"Value must be between {min} and {max}",values:{min:`${this.min} ${a}`.trim(),max:`${this.max} ${a}`.trim()}})),{shouldCancel:!0};e===""&&this.required&&m(this,c,R).call(this,M.t({id:"slider.error.required",message:"This field is required"})),this.value=e;let d=e===this.max||e===this.min,g=!1;if(this.slot){let F=this.parentElement.querySelector('w-slider-thumb[slot="to"]'),S=this.parentElement.querySelector('w-slider-thumb[slot="from"]'),k=F.textfield.value||this.max,C=S.textfield.value||this.min,z=Number.parseInt(k),x=Number.parseInt(C),N=M.t({id:"slider.error.overlap",message:"The maximum value cannot be less than the minimum"});if(this.slot==="from"){let $=this.openEnded&&z>n?z:Math.min(z,this.openEnded?n-1:n);i>$&&(g=!0,this.openEnded&&d?this.value=String($):this.value=k,t&&(m(this,c,R).call(this,N),await this.updateComplete,this.textfield.value=e))}else{let $=this.openEnded&&x<s?x:Math.max(Number.parseInt(C),this.openEnded?s+1:s);i<$&&(g=!0,this.openEnded&&d?this.value=String($):this.value=C,t&&(m(this,c,R).call(this,N),await this.updateComplete,this.textfield.value=e))}}return g?{shouldCancel:!0}:(m(this,c,R).call(this,""),this.range.value=Math.min(Math.max(Number(e),Number(this.min)),Number(this.max)).toString(),this.value=this.openEnded&&!t&&d?"":e,this.shadowRoot.querySelector("w-attention").handleDone(),{shouldCancel:!1})},fe=async function(e){let t=e.currentTarget.tagName==="W-TEXTFIELD";if(e instanceof CustomEvent)return;let a=e.currentTarget.value;return(await m(this,c,K).call(this,a,t)).shouldCancel?(e.preventDefault(),!1):!0},Ie=async function(e){if(e.key!=="ArrowLeft"&&e.key!=="ArrowRight")return;let t=Number(this.range.value),a=this.step||1,i;e.key==="ArrowLeft"?i=t-a:i=t+a,i=Math.min(Math.max(i,Number(this.min)),Number(this.max)),(await m(this,c,K).call(this,i.toString(),!1)).shouldCancel&&e.preventDefault()},je=async function(e){if(this.textfield.value)return;e.preventDefault();let t="";this.slot==="from"?e.key==="ArrowUp"?t=String(Number(this.min)+1)||"1":e.key==="ArrowDown"&&(t=String(Number(this.min))||"0"):e.key==="ArrowUp"?t=String(Number(this.max))||"100":e.key==="ArrowDown"&&(t=String(Number(this.max)-1)||"99"),await m(this,c,K).call(this,t,!0)},b.shadowRootOptions={...Le.shadowRootOptions,delegatesFocus:!0},b.styles=[De,Pe,Ae],p([V({attribute:"aria-label"})],b.prototype,"ariaLabel",2),p([V({attribute:"aria-description"})],b.prototype,"ariaDescription",2),p([V({reflect:!0})],b.prototype,"name",2),p([V({reflect:!0})],b.prototype,"value",2),p([V({type:Boolean,reflect:!0})],b.prototype,"disabled",2),p([V({type:Boolean,reflect:!0})],b.prototype,"invalid",2),p([V({attribute:!1,reflect:!1})],b.prototype,"openEnded",2),p([V({reflect:!0})],b.prototype,"placeholder",2),p([A()],b.prototype,"markers",2),p([A()],b.prototype,"required",2),p([A()],b.prototype,"step",2),p([A()],b.prototype,"min",2),p([A()],b.prototype,"max",2),p([A()],b.prototype,"suffix",2),p([V({attribute:!1})],b.prototype,"valueFormatter",2),p([V({attribute:!1})],b.prototype,"tooltipFormatter",2),p([V({attribute:!1})],b.prototype,"labelFormatter",2),p([me('input[type="range"]')],b.prototype,"range",2),p([me(".w-slider-thumb__tooltip-target")],b.prototype,"tooltipTarget",2),p([me("w-textfield")],b.prototype,"textfield",2),p([A()],b.prototype,"_showTooltip",2),p([A()],b.prototype,"_inputHasFocus",2),p([A()],b.prototype,"_hiddenTextfield",2);customElements.get("w-slider-thumb")||customElements.define("w-slider-thumb",b);export{b as WarpSliderThumb};
2774
2775
  //# sourceMappingURL=slider-thumb.js.map