@hortiview/default-components 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +22 -0
  2. package/dist/HealthCheckFailed-BfzG8Esl.js +46 -0
  3. package/dist/Iconify-DQUxnnUE.js +81 -0
  4. package/dist/{LoadingSpinner-BxqY1o89.js → LoadingSpinner-BCdWKiWZ.js} +8 -7
  5. package/dist/assets/GenericTable.css +1 -0
  6. package/dist/{component-DsB0poTj-B4NF-JCy.js → component-DsB0poTj-CmUZ4Kqw.js} +113 -73
  7. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +527 -3443
  8. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +5 -5
  9. package/dist/components/GenericTable/GenericTable.d.ts +12 -0
  10. package/dist/components/GenericTable/GenericTable.js +29900 -0
  11. package/dist/components/HealthChecks/DataBaseHealthCheck.js +4 -4
  12. package/dist/components/HealthChecks/DefaultHealthCheck.js +6 -6
  13. package/dist/components/HealthChecks/HealthCheck.test.js +5960 -7065
  14. package/dist/components/HealthChecks/IotServiceHealthCheck.js +4 -4
  15. package/dist/components/HealthChecks/PlatformHealthCheck.js +4 -4
  16. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +6 -6
  17. package/dist/components/InternationalizationWrapper/InternationalizationWrapper.js +24 -6
  18. package/dist/context-f4Bcf4Hs.js +19 -0
  19. package/dist/{i18n-DIprVS_u.js → i18n-BhmFdUcK.js} +208 -250
  20. package/dist/i18n.js +3 -2
  21. package/dist/i18nInstance-l1IFPZ5d.js +48 -0
  22. package/dist/index.es-25EARqhH-By1Ap282.js +2944 -0
  23. package/dist/{HealthCheckFailed-j1XFU5px.js → index.es-6TJ1S8Jr-BFJPMGBn.js} +224 -257
  24. package/dist/index.es-D-CKRzIB-C6Z-ohcV.js +959 -0
  25. package/dist/locales/en-US.js +10 -8
  26. package/dist/locales/en-US.json.d.ts +15 -10
  27. package/dist/locales/es-MX.js +8 -6
  28. package/dist/locales/es-MX.json.d.ts +5 -2
  29. package/dist/locales/tr-TR.js +9 -7
  30. package/dist/locales/tr-TR.json.d.ts +5 -2
  31. package/dist/main.d.ts +1 -0
  32. package/dist/main.js +14 -12
  33. package/dist/{useTranslation-Bh0VR1ML.js → useTranslation-B6E1rHIA.js} +1259 -1106
  34. package/package.json +12 -12
  35. package/dist/InternationalizationWrapper-BtWuzVFG.js +0 -41
  36. package/dist/index.es-D-CKRzIB-Cv9zF1oG.js +0 -1029
  37. /package/dist/assets/{index.css → Iconify.css} +0 -0
  38. /package/dist/assets/{i18n.css → i18nInstance.css} +0 -0
@@ -1,2979 +1,54 @@
1
- import { jsx as jt } from "react/jsx-runtime";
2
- import { t as xn } from "../../i18n-DIprVS_u.js";
3
- import { s as Tn, R as u, F as Cn, t as On, v as Ln, o as be, w as Nn, N as lt, _ as Y, x as Ht, h as K, f as Et, p as k, a as It, y as An, D as Ye, U as Sn, r as _e, L as tn, b as ct, I as Rn, g as Vn, u as Pn } from "../../useTranslation-Bh0VR1ML.js";
4
- import I, { forwardRef as mt, useState as rt, useRef as F, useImperativeHandle as xt, useEffect as B, useMemo as vt, useCallback as _t, Fragment as Le, useLayoutEffect as Fn } from "react";
5
- import { useFormContext as en, Controller as wn } from "react-hook-form";
6
- import { D as Dn, p as Gt, U as Ne, _ as Hn, O as jn } from "../../component-DsB0poTj-B4NF-JCy.js";
7
- import Bn from "react-dom";
8
- import { I as $n } from "../../InternationalizationWrapper-BtWuzVFG.js";
9
- import '../../assets/DefaultFormNumber.css';const kn = {
10
- /**
11
- * Content to be rendered inside the portal.
12
- *
13
- * Defaults to **null**.
14
- */
15
- children: u.node,
16
- /**
17
- * Disables the portal to rendering children in the natural flow of the DOM.
18
- *
19
- * Defaults to **false**.
20
- */
21
- disabled: u.bool,
22
- /**
23
- * The DOM element the children will render in. If a string is sent it should be a valid DOM query selector. If one is not sent, Portal will default to `document.body`.
24
- *
25
- * Defaults to **'document.body'**.
26
- */
27
- portalContainer: u.oneOfType([u.string, u.node])
28
- }, Mn = {
29
- children: null,
30
- disabled: !1,
31
- portalContainer: "document.body"
32
- }, Kt = /* @__PURE__ */ mt((n, e) => {
33
- var t;
34
- const [r, i] = rt((t = document) === null || t === void 0 ? void 0 : t.body), {
35
- children: a,
36
- container: o,
37
- disabled: l
38
- } = n, s = F();
39
- return xt(e, () => s.current, []), B(() => {
40
- var f;
41
- const p = (f = document) === null || f === void 0 ? void 0 : f.body;
42
- if (typeof o == "string")
43
- if (o === "document.body")
44
- i(p);
45
- else {
46
- const v = Tn(o);
47
- i(v || p);
48
- }
49
- else
50
- i(o || p);
51
- }, [o]), // eslint-disable-next-line react/jsx-no-useless-fragment
52
- /* @__PURE__ */ I.createElement(I.Fragment, null, l || !r ? a : /* @__PURE__ */ Bn.createPortal(a, r));
53
- });
54
- Kt.displayName = "Portal";
55
- Kt.propTypes = kn;
56
- Kt.defaultProps = Mn;
57
- var Un = /* @__PURE__ */ I.memo(Kt), ie, Ae;
58
- function Wn() {
59
- if (Ae) return ie;
60
- Ae = 1;
61
- function n(e, t) {
62
- for (var r = -1, i = e == null ? 0 : e.length, a = Array(i); ++r < i; )
63
- a[r] = t(e[r], r, e);
64
- return a;
65
- }
66
- return ie = n, ie;
67
- }
68
- var ae, Se;
69
- function ye() {
70
- if (Se) return ae;
71
- Se = 1;
72
- var n = Cn(), e = On(), t = "[object Symbol]";
73
- function r(i) {
74
- return typeof i == "symbol" || e(i) && n(i) == t;
75
- }
76
- return ae = r, ae;
77
- }
78
- var oe, Re;
79
- function qn() {
80
- if (Re) return oe;
81
- Re = 1;
82
- var n = Ln(), e = Wn(), t = be(), r = ye(), i = n ? n.prototype : void 0, a = i ? i.toString : void 0;
83
- function o(l) {
84
- if (typeof l == "string")
85
- return l;
86
- if (t(l))
87
- return e(l, o) + "";
88
- if (r(l))
89
- return a ? a.call(l) : "";
90
- var s = l + "";
91
- return s == "0" && 1 / l == -1 / 0 ? "-0" : s;
92
- }
93
- return oe = o, oe;
94
- }
95
- var le, Ve;
96
- function Gn() {
97
- if (Ve) return le;
98
- Ve = 1;
99
- var n = qn();
100
- function e(t) {
101
- return t == null ? "" : n(t);
102
- }
103
- return le = e, le;
104
- }
105
- var ue, Pe;
106
- function Xn() {
107
- if (Pe) return ue;
108
- Pe = 1;
109
- var n = be(), e = ye(), t = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, r = /^\w*$/;
110
- function i(a, o) {
111
- if (n(a))
112
- return !1;
113
- var l = typeof a;
114
- return l == "number" || l == "symbol" || l == "boolean" || a == null || e(a) ? !0 : r.test(a) || !t.test(a) || o != null && a in Object(o);
115
- }
116
- return ue = i, ue;
117
- }
118
- var se, Fe;
119
- function Kn() {
120
- if (Fe) return se;
121
- Fe = 1;
122
- var n = Nn(), e = "Expected a function";
123
- function t(r, i) {
124
- if (typeof r != "function" || i != null && typeof i != "function")
125
- throw new TypeError(e);
126
- var a = function() {
127
- var o = arguments, l = i ? i.apply(this, o) : o[0], s = a.cache;
128
- if (s.has(l))
129
- return s.get(l);
130
- var f = r.apply(this, o);
131
- return a.cache = s.set(l, f) || s, f;
132
- };
133
- return a.cache = new (t.Cache || n)(), a;
134
- }
135
- return t.Cache = n, se = t, se;
136
- }
137
- var ce, we;
138
- function zn() {
139
- if (we) return ce;
140
- we = 1;
141
- var n = Kn(), e = 500;
142
- function t(r) {
143
- var i = n(r, function(o) {
144
- return a.size === e && a.clear(), o;
145
- }), a = i.cache;
146
- return i;
147
- }
148
- return ce = t, ce;
149
- }
150
- var de, De;
151
- function Zn() {
152
- if (De) return de;
153
- De = 1;
154
- var n = zn(), e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, t = /\\(\\)?/g, r = n(function(i) {
155
- var a = [];
156
- return i.charCodeAt(0) === 46 && a.push(""), i.replace(e, function(o, l, s, f) {
157
- a.push(s ? f.replace(t, "$1") : l || o);
158
- }), a;
159
- });
160
- return de = r, de;
161
- }
162
- var fe, He;
163
- function Jn() {
164
- if (He) return fe;
165
- He = 1;
166
- var n = be(), e = Xn(), t = Zn(), r = Gn();
167
- function i(a, o) {
168
- return n(a) ? a : e(a, o) ? [a] : t(r(a));
169
- }
170
- return fe = i, fe;
171
- }
172
- var pe, je;
173
- function Qn() {
174
- if (je) return pe;
175
- je = 1;
176
- var n = ye();
177
- function e(t) {
178
- if (typeof t == "string" || n(t))
179
- return t;
180
- var r = t + "";
181
- return r == "0" && 1 / t == -1 / 0 ? "-0" : r;
182
- }
183
- return pe = e, pe;
184
- }
185
- var he, Be;
186
- function Yn() {
187
- if (Be) return he;
188
- Be = 1;
189
- var n = Jn(), e = Qn();
190
- function t(r, i) {
191
- i = n(i, r);
192
- for (var a = 0, o = i.length; r != null && a < o; )
193
- r = r[e(i[a++])];
194
- return a && a == o ? r : void 0;
195
- }
196
- return he = t, he;
197
- }
198
- var me, $e;
199
- function tr() {
200
- if ($e) return me;
201
- $e = 1;
202
- var n = Yn();
203
- function e(t, r, i) {
204
- var a = t == null ? void 0 : n(t, r);
205
- return a === void 0 ? i : a;
206
- }
207
- return me = e, me;
208
- }
209
- /**
210
- * @license
211
- * Copyright 2016 Google Inc.
212
- *
213
- * Permission is hereby granted, free of charge, to any person obtaining a copy
214
- * of this software and associated documentation files (the "Software"), to deal
215
- * in the Software without restriction, including without limitation the rights
216
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
217
- * copies of the Software, and to permit persons to whom the Software is
218
- * furnished to do so, subject to the following conditions:
219
- *
220
- * The above copyright notice and this permission notice shall be included in
221
- * all copies or substantial portions of the Software.
222
- *
223
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
224
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
225
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
226
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
227
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
228
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
229
- * THE SOFTWARE.
230
- */
231
- var er = {
232
- LABEL_FLOAT_ABOVE: "mdc-floating-label--float-above",
233
- LABEL_REQUIRED: "mdc-floating-label--required",
234
- LABEL_SHAKE: "mdc-floating-label--shake",
235
- ROOT: "mdc-floating-label"
236
- };
237
- /**
238
- * @license
239
- * Copyright 2016 Google Inc.
240
- *
241
- * Permission is hereby granted, free of charge, to any person obtaining a copy
242
- * of this software and associated documentation files (the "Software"), to deal
243
- * in the Software without restriction, including without limitation the rights
244
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
245
- * copies of the Software, and to permit persons to whom the Software is
246
- * furnished to do so, subject to the following conditions:
247
- *
248
- * The above copyright notice and this permission notice shall be included in
249
- * all copies or substantial portions of the Software.
250
- *
251
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
252
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
253
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
254
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
255
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
256
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
257
- * THE SOFTWARE.
258
- */
259
- var nn = (
260
- /** @class */
261
- function(n) {
262
- K(e, n);
263
- function e(t) {
264
- var r = n.call(this, k(k({}, e.defaultAdapter), t)) || this;
265
- return r.shakeAnimationEndHandler_ = function() {
266
- return r.handleShakeAnimationEnd_();
267
- }, r;
268
- }
269
- return Object.defineProperty(e, "cssClasses", {
270
- get: function() {
271
- return er;
272
- },
273
- enumerable: !1,
274
- configurable: !0
275
- }), Object.defineProperty(e, "defaultAdapter", {
276
- /**
277
- * See {@link MDCFloatingLabelAdapter} for typing information on parameters and return types.
278
- */
279
- get: function() {
280
- return {
281
- addClass: function() {
282
- },
283
- removeClass: function() {
284
- },
285
- getWidth: function() {
286
- return 0;
287
- },
288
- registerInteractionHandler: function() {
289
- },
290
- deregisterInteractionHandler: function() {
291
- }
292
- };
293
- },
294
- enumerable: !1,
295
- configurable: !0
296
- }), e.prototype.init = function() {
297
- this.adapter.registerInteractionHandler("animationend", this.shakeAnimationEndHandler_);
298
- }, e.prototype.destroy = function() {
299
- this.adapter.deregisterInteractionHandler("animationend", this.shakeAnimationEndHandler_);
300
- }, e.prototype.getWidth = function() {
301
- return this.adapter.getWidth();
302
- }, e.prototype.shake = function(t) {
303
- var r = e.cssClasses.LABEL_SHAKE;
304
- t ? this.adapter.addClass(r) : this.adapter.removeClass(r);
305
- }, e.prototype.float = function(t) {
306
- var r = e.cssClasses, i = r.LABEL_FLOAT_ABOVE, a = r.LABEL_SHAKE;
307
- t ? this.adapter.addClass(i) : (this.adapter.removeClass(i), this.adapter.removeClass(a));
308
- }, e.prototype.setRequired = function(t) {
309
- var r = e.cssClasses.LABEL_REQUIRED;
310
- t ? this.adapter.addClass(r) : this.adapter.removeClass(r);
311
- }, e.prototype.handleShakeAnimationEnd_ = function() {
312
- var t = e.cssClasses.LABEL_SHAKE;
313
- this.adapter.removeClass(t);
314
- }, e;
315
- }(It)
316
- );
317
- /**
318
- * @license
319
- * Copyright 2016 Google Inc.
320
- *
321
- * Permission is hereby granted, free of charge, to any person obtaining a copy
322
- * of this software and associated documentation files (the "Software"), to deal
323
- * in the Software without restriction, including without limitation the rights
324
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
325
- * copies of the Software, and to permit persons to whom the Software is
326
- * furnished to do so, subject to the following conditions:
327
- *
328
- * The above copyright notice and this permission notice shall be included in
329
- * all copies or substantial portions of the Software.
330
- *
331
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
332
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
333
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
334
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
335
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
336
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
337
- * THE SOFTWARE.
338
- */
339
- var rn = (
340
- /** @class */
341
- function(n) {
342
- K(e, n);
343
- function e() {
344
- return n !== null && n.apply(this, arguments) || this;
345
- }
346
- return e.attachTo = function(t) {
347
- return new e(t);
348
- }, e.prototype.shake = function(t) {
349
- this.foundation.shake(t);
350
- }, e.prototype.float = function(t) {
351
- this.foundation.float(t);
352
- }, e.prototype.setRequired = function(t) {
353
- this.foundation.setRequired(t);
354
- }, e.prototype.getWidth = function() {
355
- return this.foundation.getWidth();
356
- }, e.prototype.getDefaultFoundation = function() {
357
- var t = this, r = {
358
- addClass: function(i) {
359
- return t.root.classList.add(i);
360
- },
361
- removeClass: function(i) {
362
- return t.root.classList.remove(i);
363
- },
364
- getWidth: function() {
365
- return Dn(t.root);
366
- },
367
- registerInteractionHandler: function(i, a) {
368
- return t.listen(i, a);
369
- },
370
- deregisterInteractionHandler: function(i, a) {
371
- return t.unlisten(i, a);
372
- }
373
- };
374
- return new nn(r);
375
- }, e;
376
- }(Et)
377
- );
378
- /**
379
- * @license
380
- * Copyright 2018 Google Inc.
381
- *
382
- * Permission is hereby granted, free of charge, to any person obtaining a copy
383
- * of this software and associated documentation files (the "Software"), to deal
384
- * in the Software without restriction, including without limitation the rights
385
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
386
- * copies of the Software, and to permit persons to whom the Software is
387
- * furnished to do so, subject to the following conditions:
388
- *
389
- * The above copyright notice and this permission notice shall be included in
390
- * all copies or substantial portions of the Software.
391
- *
392
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
393
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
394
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
395
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
396
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
397
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
398
- * THE SOFTWARE.
399
- */
400
- var an = {
401
- NOTCH_ELEMENT_SELECTOR: ".mdc-notched-outline__notch"
402
- }, ke = {
403
- // This should stay in sync with $mdc-notched-outline-padding * 2.
404
- NOTCH_ELEMENT_PADDING: 8
405
- }, ge = {
406
- NO_LABEL: "mdc-notched-outline--no-label",
407
- OUTLINE_NOTCHED: "mdc-notched-outline--notched",
408
- OUTLINE_UPGRADED: "mdc-notched-outline--upgraded"
409
- };
410
- /**
411
- * @license
412
- * Copyright 2017 Google Inc.
413
- *
414
- * Permission is hereby granted, free of charge, to any person obtaining a copy
415
- * of this software and associated documentation files (the "Software"), to deal
416
- * in the Software without restriction, including without limitation the rights
417
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
418
- * copies of the Software, and to permit persons to whom the Software is
419
- * furnished to do so, subject to the following conditions:
420
- *
421
- * The above copyright notice and this permission notice shall be included in
422
- * all copies or substantial portions of the Software.
423
- *
424
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
425
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
426
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
427
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
428
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
429
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
430
- * THE SOFTWARE.
431
- */
432
- var nr = (
433
- /** @class */
434
- function(n) {
435
- K(e, n);
436
- function e(t) {
437
- return n.call(this, k(k({}, e.defaultAdapter), t)) || this;
438
- }
439
- return Object.defineProperty(e, "strings", {
440
- get: function() {
441
- return an;
442
- },
443
- enumerable: !1,
444
- configurable: !0
445
- }), Object.defineProperty(e, "cssClasses", {
446
- get: function() {
447
- return ge;
448
- },
449
- enumerable: !1,
450
- configurable: !0
451
- }), Object.defineProperty(e, "numbers", {
452
- get: function() {
453
- return ke;
454
- },
455
- enumerable: !1,
456
- configurable: !0
457
- }), Object.defineProperty(e, "defaultAdapter", {
458
- /**
459
- * See {@link MDCNotchedOutlineAdapter} for typing information on parameters and return types.
460
- */
461
- get: function() {
462
- return {
463
- addClass: function() {
464
- },
465
- removeClass: function() {
466
- },
467
- setNotchWidthProperty: function() {
468
- },
469
- removeNotchWidthProperty: function() {
470
- }
471
- };
472
- },
473
- enumerable: !1,
474
- configurable: !0
475
- }), e.prototype.notch = function(t) {
476
- var r = e.cssClasses.OUTLINE_NOTCHED;
477
- t > 0 && (t += ke.NOTCH_ELEMENT_PADDING), this.adapter.setNotchWidthProperty(t), this.adapter.addClass(r);
478
- }, e.prototype.closeNotch = function() {
479
- var t = e.cssClasses.OUTLINE_NOTCHED;
480
- this.adapter.removeClass(t), this.adapter.removeNotchWidthProperty();
481
- }, e;
482
- }(It)
483
- );
484
- /**
485
- * @license
486
- * Copyright 2017 Google Inc.
487
- *
488
- * Permission is hereby granted, free of charge, to any person obtaining a copy
489
- * of this software and associated documentation files (the "Software"), to deal
490
- * in the Software without restriction, including without limitation the rights
491
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
492
- * copies of the Software, and to permit persons to whom the Software is
493
- * furnished to do so, subject to the following conditions:
494
- *
495
- * The above copyright notice and this permission notice shall be included in
496
- * all copies or substantial portions of the Software.
497
- *
498
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
499
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
500
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
501
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
502
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
503
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
504
- * THE SOFTWARE.
505
- */
506
- var on = (
507
- /** @class */
508
- function(n) {
509
- K(e, n);
510
- function e() {
511
- return n !== null && n.apply(this, arguments) || this;
512
- }
513
- return e.attachTo = function(t) {
514
- return new e(t);
515
- }, e.prototype.initialSyncWithDOM = function() {
516
- this.notchElement_ = this.root.querySelector(an.NOTCH_ELEMENT_SELECTOR);
517
- var t = this.root.querySelector("." + nn.cssClasses.ROOT);
518
- t ? (t.style.transitionDuration = "0s", this.root.classList.add(ge.OUTLINE_UPGRADED), requestAnimationFrame(function() {
519
- t.style.transitionDuration = "";
520
- })) : this.root.classList.add(ge.NO_LABEL);
521
- }, e.prototype.notch = function(t) {
522
- this.foundation.notch(t);
523
- }, e.prototype.closeNotch = function() {
524
- this.foundation.closeNotch();
525
- }, e.prototype.getDefaultFoundation = function() {
526
- var t = this, r = {
527
- addClass: function(i) {
528
- return t.root.classList.add(i);
529
- },
530
- removeClass: function(i) {
531
- return t.root.classList.remove(i);
532
- },
533
- setNotchWidthProperty: function(i) {
534
- return t.notchElement_.style.setProperty("width", i + "px");
535
- },
536
- removeNotchWidthProperty: function() {
537
- return t.notchElement_.style.removeProperty("width");
538
- }
539
- };
540
- return new nr(r);
541
- }, e;
542
- }(Et)
543
- );
544
- const rr = {
545
- /**
546
- * Content to be rendered inside the label. Expects a string, though accepts any valid markup.
547
- *
548
- * Defaults to **null**.
549
- */
550
- children: u.node.isRequired,
551
- /**
552
- * The css class name to be passed through to the component markup.
553
- *
554
- * Defaults to **undefined**.
555
- */
556
- className: u.string,
557
- /**
558
- * The label will appear in the floating state.
559
- *
560
- * Defaults to **false**.
561
- */
562
- float: u.bool,
563
- /**
564
- * The id of the component to trigger on active
565
- *
566
- * Defaults to **empty string**.
567
- */
568
- htmlFor: u.string,
569
- /**
570
- * The label will shake briefly when set.
571
- *
572
- * Defaults to **false**.
573
- */
574
- shake: u.bool
575
- }, ir = {
576
- children: null,
577
- className: void 0,
578
- float: !1,
579
- htmlFor: "",
580
- shake: !1
581
- }, Bt = /* @__PURE__ */ mt((n, e) => {
582
- const {
583
- children: t,
584
- htmlFor: r = "",
585
- shake: i = !1,
586
- float: a = !1,
587
- className: o,
588
- style: l,
589
- ...s
590
- } = n, f = F(), p = t, v = F();
591
- return xt(e, () => v.current, []), B(() => (f.current = rn.attachTo(v.current), () => {
592
- f.current.destroy();
593
- })), B(() => {
594
- f.current.float(a);
595
- }, [a]), /* @__PURE__ */ I.createElement("label", lt({
596
- ref: v,
597
- htmlFor: r,
598
- className: Y("lmnt", "mdc-floating-label", a && "mdc-floating-label--float-above", i && "mdc-floating-label--shake", o)
599
- }, s, {
600
- style: l
601
- }), p);
602
- });
603
- Bt.displayName = "FloatingLabel";
604
- Bt.propTypes = rr;
605
- Bt.defaultProps = ir;
606
- const ar = {
607
- /**
608
- * Content to be rendered inside the notched outline. Accepts a string.
609
- *
610
- * Defaults to **null**.
611
- */
612
- children: u.node,
613
- /**
614
- * The css class name to be passed through to the component markup.
615
- *
616
- * Defaults to **undefined**.
617
- */
618
- className: u.string,
619
- /**
620
- * Determines if the notch is opened or closed.
621
- *
622
- * Defaults to **undefined**.
623
- */
624
- closed: u.bool,
625
- /**
626
- *
627
- *
628
- * Defaults to **null**.
629
- */
630
- width: u.number
631
- }, or = {
632
- children: null,
633
- className: void 0,
634
- closed: void 0,
635
- width: null
636
- }, zt = /* @__PURE__ */ mt((n, e) => {
637
- const {
638
- closed: t,
639
- className: r,
640
- children: i,
641
- width: a,
642
- ...o
643
- } = n, l = F(), s = F();
644
- return xt(e, () => l.current, []), B(() => (s.current = on.attachTo(l.current), () => {
645
- s.current.destroy();
646
- }), []), B(() => {
647
- t !== void 0 && (t ? s.current.closeNotch() : s.current.notch());
648
- }, [t]), B(() => {
649
- a ? s.current.foundation.adapter.setNotchWidthProperty(a) : s.current.foundation.adapter.removeNotchWidthProperty();
650
- }, [a]), /* @__PURE__ */ I.createElement("div", lt({
651
- className: Y("lmnt", "mdc-notched-outline", r),
652
- ref: l
653
- }, o), /* @__PURE__ */ I.createElement("div", {
654
- className: "mdc-notched-outline__leading"
655
- }), /* @__PURE__ */ I.createElement("div", {
656
- className: "mdc-notched-outline__notch"
657
- }, i), /* @__PURE__ */ I.createElement("div", {
658
- className: "mdc-notched-outline__trailing"
659
- }));
660
- });
661
- zt.displayName = "NotchedOutline";
662
- zt.propTypes = ar;
663
- zt.defaultProps = or;
664
- const lr = {
665
- /**
666
- * Accepts any valid markup. This will be rendered before any value set with the `text` prop. For most use-cases use `text`.
667
- *
668
- * Defaults to **undefined**.
669
- */
670
- children: u.node.isRequired,
671
- /**
672
- * The css class name to be passed through to the component markup.
673
- *
674
- * Defaults to **undefined**.
675
- */
676
- className: u.string,
677
- /**
678
- * Container display type, inline or block.
679
- *
680
- * Defaults to **'inline'**.
681
- */
682
- containerType: u.oneOf(["inline", "block"]),
683
- /**
684
- * Whether or not the tooltip is hoisted to render outside of the parent element. Useful for when the tooltip needs to render in a parent with `overflow: hidden` ie. a table cell.
685
- *
686
- * Defaults to **false**.
687
- */
688
- hoisted: u.bool,
689
- /**
690
- * Randomly generated id. May be overwritten.
691
- *
692
- * Defaults to **undefined**.
693
- */
694
- id: u.string,
695
- /**
696
- * Fired when the trigger is interacted with.
697
- *
698
- * Defaults to **null**.
699
- */
700
- onClick: u.func,
701
- /**
702
- * The DOM element the children will render in. If a string is sent it should be a valid DOM query selector. If one is not sent, Portal will default to `document.body`.
703
- *
704
- * Defaults to **'document.body'**.
705
- */
706
- portalContainer: u.oneOfType([u.string, u.node]),
707
- /**
708
- * Position of tooltip. Options include: 'top', 'left', 'right', and 'bottom'(default).
709
- *
710
- * Defaults to **'bottom'**.
711
- */
712
- position: u.oneOf(["bottom", "top", "left", "right"]),
713
- /**
714
- * string
715
- *
716
- * Defaults to **null**.
717
- */
718
- text: u.oneOfType([u.string, u.func, u.node]).isRequired,
719
- /**
720
- * Custom properties to apply to the hovering element.
721
- *
722
- * Defaults to **null**.
723
- */
724
- tooltipProps: u.object,
725
- /**
726
- * Custom properties to apply to the trigger element.
727
- *
728
- * Defaults to **null**.
729
- */
730
- triggerProps: u.object
731
- }, ur = {
732
- children: void 0,
733
- className: void 0,
734
- containerType: "inline",
735
- hoisted: !1,
736
- id: void 0,
737
- portalContainer: "document.body",
738
- position: "bottom",
739
- text: null,
740
- tooltipProps: null,
741
- triggerProps: null
742
- }, sr = {
743
- /**
744
- * The css class name to be passed through to the component markup.
745
- *
746
- * Defaults to **undefined**.
747
- */
748
- className: u.string,
749
- /**
750
- * Whether or not the tooltip is hoisted to render outside of the parent element. Useful for when the tooltip needs to render in a parent with `overflow: hidden` ie. a table cell.
751
- *
752
- * Defaults to **false**.
753
- */
754
- hoisted: u.bool,
755
- /**
756
- * Randomly generated id. May be overwritten.
757
- *
758
- * Defaults to **undefined**.
759
- */
760
- id: u.string,
761
- /**
762
- * The DOM element the children will render in. If a string is sent it should be a valid DOM query selector. If one is not sent, Portal will default to `document.body`.
763
- *
764
- * Defaults to **'document.body'**.
765
- */
766
- portalContainer: u.oneOfType([u.string, u.node]),
767
- /**
768
- * The text to be rendered inside of the Tooltip.
769
- *
770
- * Defaults to **null**.
771
- */
772
- text: u.oneOfType([u.string, u.func, u.node]).isRequired
773
- }, cr = {
774
- className: void 0,
775
- hoisted: !1,
776
- id: void 0,
777
- portalContainer: "document.body",
778
- text: null
779
- }, Mt = /* @__PURE__ */ mt((n, e) => {
780
- const {
781
- className: t,
782
- hoisted: r,
783
- id: i,
784
- portalContainer: a,
785
- text: o,
786
- ...l
787
- } = n, [s] = rt(() => i || Ht()), f = F();
788
- xt(e, () => f.current, []);
789
- const p = vt(() => Y(["lmnt", t, "lmnt-tooltip__text-content", "mdc-typography--caption"]), [t]);
790
- return /* @__PURE__ */ I.createElement(Un, {
791
- disabled: !r,
792
- container: a
793
- }, /* @__PURE__ */ I.createElement("div", lt({
794
- role: "tooltip",
795
- id: s,
796
- className: p
797
- }, l, {
798
- ref: f
799
- }), o));
800
- });
801
- Mt.displayName = "TooltipText";
802
- Mt.propTypes = sr;
803
- Mt.defaultProps = cr;
804
- const Ee = /* @__PURE__ */ mt((n, e) => {
805
- const {
806
- children: t,
807
- className: r,
808
- containerType: i,
809
- hoisted: a,
810
- id: o,
811
- onClick: l,
812
- portalContainer: s,
813
- position: f,
814
- text: p,
815
- tooltipProps: v,
816
- triggerProps: C,
817
- ...b
818
- } = n, m = F(), g = F(), L = F();
819
- xt(e, () => g.current, []);
820
- const [h] = rt(() => o || Ht()), w = _t(() => {
821
- l == null || l();
822
- }, [l]), $ = _t((T) => {
823
- T.key === "Enter" && (l == null || l());
824
- }, [l]);
825
- An(() => {
826
- const T = [{
827
- name: "flip",
828
- options: {
829
- enabled: !0,
830
- padding: {
831
- bottom: 32,
832
- top: 32
833
- }
834
- }
835
- }];
836
- return a ? T.push({
837
- name: "offset",
838
- options: {
839
- offset: [0, 6]
840
- }
841
- }) : T.push({
842
- name: "offset",
843
- options: {
844
- offset: [0, 12]
845
- }
846
- }), m.current && g.current && (L.current = Ye(m.current, g.current, {
847
- placement: f,
848
- modifiers: T
849
- })), () => {
850
- var D;
851
- (D = L.current) === null || D === void 0 || D.destroy();
852
- };
853
- }, [f, a]);
854
- const O = _t(() => {
855
- var T, D, M;
856
- (T = g.current) === null || T === void 0 || T.setAttribute("data-show", ""), (D = L.current) === null || D === void 0 || D.setOptions((z) => ({
857
- ...z,
858
- modifiers: [...z.modifiers, {
859
- name: "eventListeners",
860
- enabled: !0
861
- }]
862
- })), (M = L.current) === null || M === void 0 || M.update();
863
- }, []), U = _t(() => {
864
- var T, D;
865
- (T = g.current) === null || T === void 0 || T.removeAttribute("data-show"), (D = L.current) === null || D === void 0 || D.setOptions((M) => ({
866
- ...M,
867
- modifiers: [...M.modifiers, {
868
- name: "eventListeners",
869
- enabled: !1
870
- }]
871
- }));
872
- }, []), J = _t(() => {
873
- const T = t;
874
- return T.type ? T.type === Le : T === Le;
875
- }, [t]);
876
- B(() => {
877
- const T = `Tooltips should only include short text for additional context and should not exceed three lines visually. (Toolitip ID ${h}).`;
878
- p && p.length > 100 && Sn(T);
879
- }, [p, h]);
880
- const q = vt(
881
- // eslint-disable-next-line react/no-unstable-nested-components
882
- () => () => t ? typeof t == "string" || J(t) ? /* @__PURE__ */ I.createElement("span", {
883
- "aria-describedby": h
884
- }, t) : _e(t, {
885
- "aria-describedby": h
886
- }) : null,
887
- [t, h, J]
888
- ), S = l ? {
889
- tabIndex: 0,
890
- role: l ? "button" : "note",
891
- onKeyPress: $,
892
- onClick: w
893
- } : {};
894
- return /* @__PURE__ */ I.createElement("span", lt({
895
- className: Y("lmnt lmnt-tooltip", i === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
896
- }, S, b), /* @__PURE__ */ I.createElement("span", lt({
897
- className: Y("lmnt-tooltip__content", i === "block" ? "lmnt-tooltip--block" : "lmnt-tooltip--inline")
898
- }, C, {
899
- ref: m,
900
- onMouseEnter: O,
901
- onFocus: O,
902
- onMouseLeave: U,
903
- onBlur: U
904
- }), /* @__PURE__ */ I.createElement(q, null)), p && /* @__PURE__ */ I.createElement(Mt, lt({
905
- hoisted: a,
906
- portalContainer: s,
907
- role: "tooltip",
908
- id: h,
909
- className: r
910
- }, v, {
911
- ref: g,
912
- text: p
913
- })));
914
- });
915
- Ee.displayName = "Tooltip";
916
- Ee.propTypes = lr;
917
- Ee.defaultProps = ur;
918
- /**
919
- * @license
920
- * Copyright 2018 Google Inc.
921
- *
922
- * Permission is hereby granted, free of charge, to any person obtaining a copy
923
- * of this software and associated documentation files (the "Software"), to deal
924
- * in the Software without restriction, including without limitation the rights
925
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
926
- * copies of the Software, and to permit persons to whom the Software is
927
- * furnished to do so, subject to the following conditions:
928
- *
929
- * The above copyright notice and this permission notice shall be included in
930
- * all copies or substantial portions of the Software.
931
- *
932
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
933
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
934
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
935
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
936
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
937
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
938
- * THE SOFTWARE.
939
- */
940
- var bt = {
941
- LINE_RIPPLE_ACTIVE: "mdc-line-ripple--active",
942
- LINE_RIPPLE_DEACTIVATING: "mdc-line-ripple--deactivating"
943
- };
944
- /**
945
- * @license
946
- * Copyright 2018 Google Inc.
947
- *
948
- * Permission is hereby granted, free of charge, to any person obtaining a copy
949
- * of this software and associated documentation files (the "Software"), to deal
950
- * in the Software without restriction, including without limitation the rights
951
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
952
- * copies of the Software, and to permit persons to whom the Software is
953
- * furnished to do so, subject to the following conditions:
954
- *
955
- * The above copyright notice and this permission notice shall be included in
956
- * all copies or substantial portions of the Software.
957
- *
958
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
959
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
960
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
961
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
962
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
963
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
964
- * THE SOFTWARE.
965
- */
966
- var dr = (
967
- /** @class */
968
- function(n) {
969
- K(e, n);
970
- function e(t) {
971
- var r = n.call(this, k(k({}, e.defaultAdapter), t)) || this;
972
- return r.transitionEndHandler_ = function(i) {
973
- return r.handleTransitionEnd(i);
974
- }, r;
975
- }
976
- return Object.defineProperty(e, "cssClasses", {
977
- get: function() {
978
- return bt;
979
- },
980
- enumerable: !1,
981
- configurable: !0
982
- }), Object.defineProperty(e, "defaultAdapter", {
983
- /**
984
- * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.
985
- */
986
- get: function() {
987
- return {
988
- addClass: function() {
989
- },
990
- removeClass: function() {
991
- },
992
- hasClass: function() {
993
- return !1;
994
- },
995
- setStyle: function() {
996
- },
997
- registerEventHandler: function() {
998
- },
999
- deregisterEventHandler: function() {
1000
- }
1001
- };
1002
- },
1003
- enumerable: !1,
1004
- configurable: !0
1005
- }), e.prototype.init = function() {
1006
- this.adapter.registerEventHandler("transitionend", this.transitionEndHandler_);
1007
- }, e.prototype.destroy = function() {
1008
- this.adapter.deregisterEventHandler("transitionend", this.transitionEndHandler_);
1009
- }, e.prototype.activate = function() {
1010
- this.adapter.removeClass(bt.LINE_RIPPLE_DEACTIVATING), this.adapter.addClass(bt.LINE_RIPPLE_ACTIVE);
1011
- }, e.prototype.setRippleCenter = function(t) {
1012
- this.adapter.setStyle("transform-origin", t + "px center");
1013
- }, e.prototype.deactivate = function() {
1014
- this.adapter.addClass(bt.LINE_RIPPLE_DEACTIVATING);
1015
- }, e.prototype.handleTransitionEnd = function(t) {
1016
- var r = this.adapter.hasClass(bt.LINE_RIPPLE_DEACTIVATING);
1017
- t.propertyName === "opacity" && r && (this.adapter.removeClass(bt.LINE_RIPPLE_ACTIVE), this.adapter.removeClass(bt.LINE_RIPPLE_DEACTIVATING));
1018
- }, e;
1019
- }(It)
1020
- );
1021
- /**
1022
- * @license
1023
- * Copyright 2018 Google Inc.
1024
- *
1025
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1026
- * of this software and associated documentation files (the "Software"), to deal
1027
- * in the Software without restriction, including without limitation the rights
1028
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1029
- * copies of the Software, and to permit persons to whom the Software is
1030
- * furnished to do so, subject to the following conditions:
1031
- *
1032
- * The above copyright notice and this permission notice shall be included in
1033
- * all copies or substantial portions of the Software.
1034
- *
1035
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1036
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1037
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1038
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1039
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1040
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1041
- * THE SOFTWARE.
1042
- */
1043
- var ln = (
1044
- /** @class */
1045
- function(n) {
1046
- K(e, n);
1047
- function e() {
1048
- return n !== null && n.apply(this, arguments) || this;
1049
- }
1050
- return e.attachTo = function(t) {
1051
- return new e(t);
1052
- }, e.prototype.activate = function() {
1053
- this.foundation.activate();
1054
- }, e.prototype.deactivate = function() {
1055
- this.foundation.deactivate();
1056
- }, e.prototype.setRippleCenter = function(t) {
1057
- this.foundation.setRippleCenter(t);
1058
- }, e.prototype.getDefaultFoundation = function() {
1059
- var t = this, r = {
1060
- addClass: function(i) {
1061
- return t.root.classList.add(i);
1062
- },
1063
- removeClass: function(i) {
1064
- return t.root.classList.remove(i);
1065
- },
1066
- hasClass: function(i) {
1067
- return t.root.classList.contains(i);
1068
- },
1069
- setStyle: function(i, a) {
1070
- return t.root.style.setProperty(i, a);
1071
- },
1072
- registerEventHandler: function(i, a) {
1073
- return t.listen(i, a);
1074
- },
1075
- deregisterEventHandler: function(i, a) {
1076
- return t.unlisten(i, a);
1077
- }
1078
- };
1079
- return new dr(r);
1080
- }, e;
1081
- }(Et)
1082
- );
1083
- /**
1084
- * @license
1085
- * Copyright 2019 Google Inc.
1086
- *
1087
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1088
- * of this software and associated documentation files (the "Software"), to deal
1089
- * in the Software without restriction, including without limitation the rights
1090
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1091
- * copies of the Software, and to permit persons to whom the Software is
1092
- * furnished to do so, subject to the following conditions:
1093
- *
1094
- * The above copyright notice and this permission notice shall be included in
1095
- * all copies or substantial portions of the Software.
1096
- *
1097
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1098
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1099
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1100
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1101
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1102
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1103
- * THE SOFTWARE.
1104
- */
1105
- var un = {
1106
- ROOT: "mdc-text-field-character-counter"
1107
- }, fr = {
1108
- ROOT_SELECTOR: "." + un.ROOT
1109
- };
1110
- /**
1111
- * @license
1112
- * Copyright 2019 Google Inc.
1113
- *
1114
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1115
- * of this software and associated documentation files (the "Software"), to deal
1116
- * in the Software without restriction, including without limitation the rights
1117
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1118
- * copies of the Software, and to permit persons to whom the Software is
1119
- * furnished to do so, subject to the following conditions:
1120
- *
1121
- * The above copyright notice and this permission notice shall be included in
1122
- * all copies or substantial portions of the Software.
1123
- *
1124
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1125
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1126
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1127
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1128
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1129
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1130
- * THE SOFTWARE.
1131
- */
1132
- var sn = (
1133
- /** @class */
1134
- function(n) {
1135
- K(e, n);
1136
- function e(t) {
1137
- return n.call(this, k(k({}, e.defaultAdapter), t)) || this;
1138
- }
1139
- return Object.defineProperty(e, "cssClasses", {
1140
- get: function() {
1141
- return un;
1142
- },
1143
- enumerable: !1,
1144
- configurable: !0
1145
- }), Object.defineProperty(e, "strings", {
1146
- get: function() {
1147
- return fr;
1148
- },
1149
- enumerable: !1,
1150
- configurable: !0
1151
- }), Object.defineProperty(e, "defaultAdapter", {
1152
- /**
1153
- * See {@link MDCTextFieldCharacterCounterAdapter} for typing information on parameters and return types.
1154
- */
1155
- get: function() {
1156
- return {
1157
- setContent: function() {
1158
- }
1159
- };
1160
- },
1161
- enumerable: !1,
1162
- configurable: !0
1163
- }), e.prototype.setCounterValue = function(t, r) {
1164
- t = Math.min(t, r), this.adapter.setContent(t + " / " + r);
1165
- }, e;
1166
- }(It)
1167
- );
1168
- /**
1169
- * @license
1170
- * Copyright 2019 Google Inc.
1171
- *
1172
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1173
- * of this software and associated documentation files (the "Software"), to deal
1174
- * in the Software without restriction, including without limitation the rights
1175
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1176
- * copies of the Software, and to permit persons to whom the Software is
1177
- * furnished to do so, subject to the following conditions:
1178
- *
1179
- * The above copyright notice and this permission notice shall be included in
1180
- * all copies or substantial portions of the Software.
1181
- *
1182
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1183
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1184
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1185
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1186
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1187
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1188
- * THE SOFTWARE.
1189
- */
1190
- var pr = (
1191
- /** @class */
1192
- function(n) {
1193
- K(e, n);
1194
- function e() {
1195
- return n !== null && n.apply(this, arguments) || this;
1196
- }
1197
- return e.attachTo = function(t) {
1198
- return new e(t);
1199
- }, Object.defineProperty(e.prototype, "foundationForTextField", {
1200
- // Provided for access by MDCTextField component
1201
- get: function() {
1202
- return this.foundation;
1203
- },
1204
- enumerable: !1,
1205
- configurable: !0
1206
- }), e.prototype.getDefaultFoundation = function() {
1207
- var t = this, r = {
1208
- setContent: function(i) {
1209
- t.root.textContent = i;
1210
- }
1211
- };
1212
- return new sn(r);
1213
- }, e;
1214
- }(Et)
1215
- );
1216
- /**
1217
- * @license
1218
- * Copyright 2016 Google Inc.
1219
- *
1220
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1221
- * of this software and associated documentation files (the "Software"), to deal
1222
- * in the Software without restriction, including without limitation the rights
1223
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1224
- * copies of the Software, and to permit persons to whom the Software is
1225
- * furnished to do so, subject to the following conditions:
1226
- *
1227
- * The above copyright notice and this permission notice shall be included in
1228
- * all copies or substantial portions of the Software.
1229
- *
1230
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1231
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1232
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1233
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1234
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1235
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1236
- * THE SOFTWARE.
1237
- */
1238
- var nt = {
1239
- ARIA_CONTROLS: "aria-controls",
1240
- ARIA_DESCRIBEDBY: "aria-describedby",
1241
- INPUT_SELECTOR: ".mdc-text-field__input",
1242
- LABEL_SELECTOR: ".mdc-floating-label",
1243
- LEADING_ICON_SELECTOR: ".mdc-text-field__icon--leading",
1244
- LINE_RIPPLE_SELECTOR: ".mdc-line-ripple",
1245
- OUTLINE_SELECTOR: ".mdc-notched-outline",
1246
- PREFIX_SELECTOR: ".mdc-text-field__affix--prefix",
1247
- SUFFIX_SELECTOR: ".mdc-text-field__affix--suffix",
1248
- TRAILING_ICON_SELECTOR: ".mdc-text-field__icon--trailing"
1249
- }, Xt = {
1250
- DISABLED: "mdc-text-field--disabled",
1251
- FOCUSED: "mdc-text-field--focused",
1252
- HELPER_LINE: "mdc-text-field-helper-line",
1253
- INVALID: "mdc-text-field--invalid",
1254
- LABEL_FLOATING: "mdc-text-field--label-floating",
1255
- NO_LABEL: "mdc-text-field--no-label",
1256
- OUTLINED: "mdc-text-field--outlined",
1257
- ROOT: "mdc-text-field",
1258
- TEXTAREA: "mdc-text-field--textarea",
1259
- WITH_LEADING_ICON: "mdc-text-field--with-leading-icon",
1260
- WITH_TRAILING_ICON: "mdc-text-field--with-trailing-icon"
1261
- }, Me = {
1262
- LABEL_SCALE: 0.75
1263
- }, hr = [
1264
- "pattern",
1265
- "min",
1266
- "max",
1267
- "required",
1268
- "step",
1269
- "minlength",
1270
- "maxlength"
1271
- ], mr = [
1272
- "color",
1273
- "date",
1274
- "datetime-local",
1275
- "month",
1276
- "range",
1277
- "time",
1278
- "week"
1279
- ];
1280
- /**
1281
- * @license
1282
- * Copyright 2016 Google Inc.
1283
- *
1284
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1285
- * of this software and associated documentation files (the "Software"), to deal
1286
- * in the Software without restriction, including without limitation the rights
1287
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1288
- * copies of the Software, and to permit persons to whom the Software is
1289
- * furnished to do so, subject to the following conditions:
1290
- *
1291
- * The above copyright notice and this permission notice shall be included in
1292
- * all copies or substantial portions of the Software.
1293
- *
1294
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1295
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1296
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1297
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1298
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1299
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1300
- * THE SOFTWARE.
1301
- */
1302
- var Ue = ["mousedown", "touchstart"], We = ["click", "keydown"], vr = (
1303
- /** @class */
1304
- function(n) {
1305
- K(e, n);
1306
- function e(t, r) {
1307
- r === void 0 && (r = {});
1308
- var i = n.call(this, k(k({}, e.defaultAdapter), t)) || this;
1309
- return i.isFocused_ = !1, i.receivedUserInput_ = !1, i.isValid_ = !0, i.useNativeValidation_ = !0, i.validateOnValueChange_ = !0, i.helperText_ = r.helperText, i.characterCounter_ = r.characterCounter, i.leadingIcon_ = r.leadingIcon, i.trailingIcon_ = r.trailingIcon, i.inputFocusHandler_ = function() {
1310
- return i.activateFocus();
1311
- }, i.inputBlurHandler_ = function() {
1312
- return i.deactivateFocus();
1313
- }, i.inputInputHandler_ = function() {
1314
- return i.handleInput();
1315
- }, i.setPointerXOffset_ = function(a) {
1316
- return i.setTransformOrigin(a);
1317
- }, i.textFieldInteractionHandler_ = function() {
1318
- return i.handleTextFieldInteraction();
1319
- }, i.validationAttributeChangeHandler_ = function(a) {
1320
- return i.handleValidationAttributeChange(a);
1321
- }, i;
1322
- }
1323
- return Object.defineProperty(e, "cssClasses", {
1324
- get: function() {
1325
- return Xt;
1326
- },
1327
- enumerable: !1,
1328
- configurable: !0
1329
- }), Object.defineProperty(e, "strings", {
1330
- get: function() {
1331
- return nt;
1332
- },
1333
- enumerable: !1,
1334
- configurable: !0
1335
- }), Object.defineProperty(e, "numbers", {
1336
- get: function() {
1337
- return Me;
1338
- },
1339
- enumerable: !1,
1340
- configurable: !0
1341
- }), Object.defineProperty(e.prototype, "shouldAlwaysFloat_", {
1342
- get: function() {
1343
- var t = this.getNativeInput_().type;
1344
- return mr.indexOf(t) >= 0;
1345
- },
1346
- enumerable: !1,
1347
- configurable: !0
1348
- }), Object.defineProperty(e.prototype, "shouldFloat", {
1349
- get: function() {
1350
- return this.shouldAlwaysFloat_ || this.isFocused_ || !!this.getValue() || this.isBadInput_();
1351
- },
1352
- enumerable: !1,
1353
- configurable: !0
1354
- }), Object.defineProperty(e.prototype, "shouldShake", {
1355
- get: function() {
1356
- return !this.isFocused_ && !this.isValid() && !!this.getValue();
1357
- },
1358
- enumerable: !1,
1359
- configurable: !0
1360
- }), Object.defineProperty(e, "defaultAdapter", {
1361
- /**
1362
- * See {@link MDCTextFieldAdapter} for typing information on parameters and
1363
- * return types.
1364
- */
1365
- get: function() {
1366
- return {
1367
- addClass: function() {
1368
- },
1369
- removeClass: function() {
1370
- },
1371
- hasClass: function() {
1372
- return !0;
1373
- },
1374
- setInputAttr: function() {
1375
- },
1376
- removeInputAttr: function() {
1377
- },
1378
- registerTextFieldInteractionHandler: function() {
1379
- },
1380
- deregisterTextFieldInteractionHandler: function() {
1381
- },
1382
- registerInputInteractionHandler: function() {
1383
- },
1384
- deregisterInputInteractionHandler: function() {
1385
- },
1386
- registerValidationAttributeChangeHandler: function() {
1387
- return new MutationObserver(function() {
1388
- });
1389
- },
1390
- deregisterValidationAttributeChangeHandler: function() {
1391
- },
1392
- getNativeInput: function() {
1393
- return null;
1394
- },
1395
- isFocused: function() {
1396
- return !1;
1397
- },
1398
- activateLineRipple: function() {
1399
- },
1400
- deactivateLineRipple: function() {
1401
- },
1402
- setLineRippleTransformOrigin: function() {
1403
- },
1404
- shakeLabel: function() {
1405
- },
1406
- floatLabel: function() {
1407
- },
1408
- setLabelRequired: function() {
1409
- },
1410
- hasLabel: function() {
1411
- return !1;
1412
- },
1413
- getLabelWidth: function() {
1414
- return 0;
1415
- },
1416
- hasOutline: function() {
1417
- return !1;
1418
- },
1419
- notchOutline: function() {
1420
- },
1421
- closeOutline: function() {
1422
- }
1423
- };
1424
- },
1425
- enumerable: !1,
1426
- configurable: !0
1427
- }), e.prototype.init = function() {
1428
- var t = this;
1429
- this.adapter.hasLabel() && this.getNativeInput_().required && this.adapter.setLabelRequired(!0), this.adapter.isFocused() ? this.inputFocusHandler_() : this.adapter.hasLabel() && this.shouldFloat && (this.notchOutline(!0), this.adapter.floatLabel(!0), this.styleFloating_(!0)), this.adapter.registerInputInteractionHandler("focus", this.inputFocusHandler_), this.adapter.registerInputInteractionHandler("blur", this.inputBlurHandler_), this.adapter.registerInputInteractionHandler("input", this.inputInputHandler_), Ue.forEach(function(r) {
1430
- t.adapter.registerInputInteractionHandler(r, t.setPointerXOffset_);
1431
- }), We.forEach(function(r) {
1432
- t.adapter.registerTextFieldInteractionHandler(r, t.textFieldInteractionHandler_);
1433
- }), this.validationObserver_ = this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_), this.setCharacterCounter_(this.getValue().length);
1434
- }, e.prototype.destroy = function() {
1435
- var t = this;
1436
- this.adapter.deregisterInputInteractionHandler("focus", this.inputFocusHandler_), this.adapter.deregisterInputInteractionHandler("blur", this.inputBlurHandler_), this.adapter.deregisterInputInteractionHandler("input", this.inputInputHandler_), Ue.forEach(function(r) {
1437
- t.adapter.deregisterInputInteractionHandler(r, t.setPointerXOffset_);
1438
- }), We.forEach(function(r) {
1439
- t.adapter.deregisterTextFieldInteractionHandler(r, t.textFieldInteractionHandler_);
1440
- }), this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_);
1441
- }, e.prototype.handleTextFieldInteraction = function() {
1442
- var t = this.adapter.getNativeInput();
1443
- t && t.disabled || (this.receivedUserInput_ = !0);
1444
- }, e.prototype.handleValidationAttributeChange = function(t) {
1445
- var r = this;
1446
- t.some(function(i) {
1447
- return hr.indexOf(i) > -1 ? (r.styleValidity_(!0), r.adapter.setLabelRequired(r.getNativeInput_().required), !0) : !1;
1448
- }), t.indexOf("maxlength") > -1 && this.setCharacterCounter_(this.getValue().length);
1449
- }, e.prototype.notchOutline = function(t) {
1450
- if (!(!this.adapter.hasOutline() || !this.adapter.hasLabel()))
1451
- if (t) {
1452
- var r = this.adapter.getLabelWidth() * Me.LABEL_SCALE;
1453
- this.adapter.notchOutline(r);
1454
- } else
1455
- this.adapter.closeOutline();
1456
- }, e.prototype.activateFocus = function() {
1457
- this.isFocused_ = !0, this.styleFocused_(this.isFocused_), this.adapter.activateLineRipple(), this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating_(this.shouldFloat), this.adapter.shakeLabel(this.shouldShake)), this.helperText_ && (this.helperText_.isPersistent() || !this.helperText_.isValidation() || !this.isValid_) && this.helperText_.showToScreenReader();
1458
- }, e.prototype.setTransformOrigin = function(t) {
1459
- if (!(this.isDisabled() || this.adapter.hasOutline())) {
1460
- var r = t.touches, i = r ? r[0] : t, a = i.target.getBoundingClientRect(), o = i.clientX - a.left;
1461
- this.adapter.setLineRippleTransformOrigin(o);
1462
- }
1463
- }, e.prototype.handleInput = function() {
1464
- this.autoCompleteFocus(), this.setCharacterCounter_(this.getValue().length);
1465
- }, e.prototype.autoCompleteFocus = function() {
1466
- this.receivedUserInput_ || this.activateFocus();
1467
- }, e.prototype.deactivateFocus = function() {
1468
- this.isFocused_ = !1, this.adapter.deactivateLineRipple();
1469
- var t = this.isValid();
1470
- this.styleValidity_(t), this.styleFocused_(this.isFocused_), this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating_(this.shouldFloat), this.adapter.shakeLabel(this.shouldShake)), this.shouldFloat || (this.receivedUserInput_ = !1);
1471
- }, e.prototype.getValue = function() {
1472
- return this.getNativeInput_().value;
1473
- }, e.prototype.setValue = function(t) {
1474
- if (this.getValue() !== t && (this.getNativeInput_().value = t), this.setCharacterCounter_(t.length), this.validateOnValueChange_) {
1475
- var r = this.isValid();
1476
- this.styleValidity_(r);
1477
- }
1478
- this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating_(this.shouldFloat), this.validateOnValueChange_ && this.adapter.shakeLabel(this.shouldShake));
1479
- }, e.prototype.isValid = function() {
1480
- return this.useNativeValidation_ ? this.isNativeInputValid_() : this.isValid_;
1481
- }, e.prototype.setValid = function(t) {
1482
- this.isValid_ = t, this.styleValidity_(t);
1483
- var r = !t && !this.isFocused_ && !!this.getValue();
1484
- this.adapter.hasLabel() && this.adapter.shakeLabel(r);
1485
- }, e.prototype.setValidateOnValueChange = function(t) {
1486
- this.validateOnValueChange_ = t;
1487
- }, e.prototype.getValidateOnValueChange = function() {
1488
- return this.validateOnValueChange_;
1489
- }, e.prototype.setUseNativeValidation = function(t) {
1490
- this.useNativeValidation_ = t;
1491
- }, e.prototype.isDisabled = function() {
1492
- return this.getNativeInput_().disabled;
1493
- }, e.prototype.setDisabled = function(t) {
1494
- this.getNativeInput_().disabled = t, this.styleDisabled_(t);
1495
- }, e.prototype.setHelperTextContent = function(t) {
1496
- this.helperText_ && this.helperText_.setContent(t);
1497
- }, e.prototype.setLeadingIconAriaLabel = function(t) {
1498
- this.leadingIcon_ && this.leadingIcon_.setAriaLabel(t);
1499
- }, e.prototype.setLeadingIconContent = function(t) {
1500
- this.leadingIcon_ && this.leadingIcon_.setContent(t);
1501
- }, e.prototype.setTrailingIconAriaLabel = function(t) {
1502
- this.trailingIcon_ && this.trailingIcon_.setAriaLabel(t);
1503
- }, e.prototype.setTrailingIconContent = function(t) {
1504
- this.trailingIcon_ && this.trailingIcon_.setContent(t);
1505
- }, e.prototype.setCharacterCounter_ = function(t) {
1506
- if (this.characterCounter_) {
1507
- var r = this.getNativeInput_().maxLength;
1508
- if (r === -1)
1509
- throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");
1510
- this.characterCounter_.setCounterValue(t, r);
1511
- }
1512
- }, e.prototype.isBadInput_ = function() {
1513
- return this.getNativeInput_().validity.badInput || !1;
1514
- }, e.prototype.isNativeInputValid_ = function() {
1515
- return this.getNativeInput_().validity.valid;
1516
- }, e.prototype.styleValidity_ = function(t) {
1517
- var r = e.cssClasses.INVALID;
1518
- if (t ? this.adapter.removeClass(r) : this.adapter.addClass(r), this.helperText_) {
1519
- this.helperText_.setValidity(t);
1520
- var i = this.helperText_.isValidation();
1521
- if (!i)
1522
- return;
1523
- var a = this.helperText_.isVisible(), o = this.helperText_.getId();
1524
- a && o ? this.adapter.setInputAttr(nt.ARIA_DESCRIBEDBY, o) : this.adapter.removeInputAttr(nt.ARIA_DESCRIBEDBY);
1525
- }
1526
- }, e.prototype.styleFocused_ = function(t) {
1527
- var r = e.cssClasses.FOCUSED;
1528
- t ? this.adapter.addClass(r) : this.adapter.removeClass(r);
1529
- }, e.prototype.styleDisabled_ = function(t) {
1530
- var r = e.cssClasses, i = r.DISABLED, a = r.INVALID;
1531
- t ? (this.adapter.addClass(i), this.adapter.removeClass(a)) : this.adapter.removeClass(i), this.leadingIcon_ && this.leadingIcon_.setDisabled(t), this.trailingIcon_ && this.trailingIcon_.setDisabled(t);
1532
- }, e.prototype.styleFloating_ = function(t) {
1533
- var r = e.cssClasses.LABEL_FLOATING;
1534
- t ? this.adapter.addClass(r) : this.adapter.removeClass(r);
1535
- }, e.prototype.getNativeInput_ = function() {
1536
- var t = this.adapter ? this.adapter.getNativeInput() : null;
1537
- return t || {
1538
- disabled: !1,
1539
- maxLength: -1,
1540
- required: !1,
1541
- type: "input",
1542
- validity: {
1543
- badInput: !1,
1544
- valid: !0
1545
- },
1546
- value: ""
1547
- };
1548
- }, e;
1549
- }(It)
1550
- );
1551
- /**
1552
- * @license
1553
- * Copyright 2016 Google Inc.
1554
- *
1555
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1556
- * of this software and associated documentation files (the "Software"), to deal
1557
- * in the Software without restriction, including without limitation the rights
1558
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1559
- * copies of the Software, and to permit persons to whom the Software is
1560
- * furnished to do so, subject to the following conditions:
1561
- *
1562
- * The above copyright notice and this permission notice shall be included in
1563
- * all copies or substantial portions of the Software.
1564
- *
1565
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1566
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1567
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1568
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1569
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1570
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1571
- * THE SOFTWARE.
1572
- */
1573
- var ot = {
1574
- HELPER_TEXT_PERSISTENT: "mdc-text-field-helper-text--persistent",
1575
- HELPER_TEXT_VALIDATION_MSG: "mdc-text-field-helper-text--validation-msg",
1576
- ROOT: "mdc-text-field-helper-text"
1577
- }, At = {
1578
- ARIA_HIDDEN: "aria-hidden",
1579
- ROLE: "role",
1580
- ROOT_SELECTOR: "." + ot.ROOT
1581
- };
1582
- /**
1583
- * @license
1584
- * Copyright 2017 Google Inc.
1585
- *
1586
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1587
- * of this software and associated documentation files (the "Software"), to deal
1588
- * in the Software without restriction, including without limitation the rights
1589
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1590
- * copies of the Software, and to permit persons to whom the Software is
1591
- * furnished to do so, subject to the following conditions:
1592
- *
1593
- * The above copyright notice and this permission notice shall be included in
1594
- * all copies or substantial portions of the Software.
1595
- *
1596
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1597
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1598
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1599
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1600
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1601
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1602
- * THE SOFTWARE.
1603
- */
1604
- var cn = (
1605
- /** @class */
1606
- function(n) {
1607
- K(e, n);
1608
- function e(t) {
1609
- return n.call(this, k(k({}, e.defaultAdapter), t)) || this;
1610
- }
1611
- return Object.defineProperty(e, "cssClasses", {
1612
- get: function() {
1613
- return ot;
1614
- },
1615
- enumerable: !1,
1616
- configurable: !0
1617
- }), Object.defineProperty(e, "strings", {
1618
- get: function() {
1619
- return At;
1620
- },
1621
- enumerable: !1,
1622
- configurable: !0
1623
- }), Object.defineProperty(e, "defaultAdapter", {
1624
- /**
1625
- * See {@link MDCTextFieldHelperTextAdapter} for typing information on parameters and return types.
1626
- */
1627
- get: function() {
1628
- return {
1629
- addClass: function() {
1630
- },
1631
- removeClass: function() {
1632
- },
1633
- hasClass: function() {
1634
- return !1;
1635
- },
1636
- getAttr: function() {
1637
- return null;
1638
- },
1639
- setAttr: function() {
1640
- },
1641
- removeAttr: function() {
1642
- },
1643
- setContent: function() {
1644
- }
1645
- };
1646
- },
1647
- enumerable: !1,
1648
- configurable: !0
1649
- }), e.prototype.getId = function() {
1650
- return this.adapter.getAttr("id");
1651
- }, e.prototype.isVisible = function() {
1652
- return this.adapter.getAttr(At.ARIA_HIDDEN) !== "true";
1653
- }, e.prototype.setContent = function(t) {
1654
- this.adapter.setContent(t);
1655
- }, e.prototype.isPersistent = function() {
1656
- return this.adapter.hasClass(ot.HELPER_TEXT_PERSISTENT);
1657
- }, e.prototype.setPersistent = function(t) {
1658
- t ? this.adapter.addClass(ot.HELPER_TEXT_PERSISTENT) : this.adapter.removeClass(ot.HELPER_TEXT_PERSISTENT);
1659
- }, e.prototype.isValidation = function() {
1660
- return this.adapter.hasClass(ot.HELPER_TEXT_VALIDATION_MSG);
1661
- }, e.prototype.setValidation = function(t) {
1662
- t ? this.adapter.addClass(ot.HELPER_TEXT_VALIDATION_MSG) : this.adapter.removeClass(ot.HELPER_TEXT_VALIDATION_MSG);
1663
- }, e.prototype.showToScreenReader = function() {
1664
- this.adapter.removeAttr(At.ARIA_HIDDEN);
1665
- }, e.prototype.setValidity = function(t) {
1666
- var r = this.adapter.hasClass(ot.HELPER_TEXT_PERSISTENT), i = this.adapter.hasClass(ot.HELPER_TEXT_VALIDATION_MSG), a = i && !t;
1667
- a ? (this.showToScreenReader(), this.adapter.setAttr(At.ROLE, "alert")) : this.adapter.removeAttr(At.ROLE), !r && !a && this.hide_();
1668
- }, e.prototype.hide_ = function() {
1669
- this.adapter.setAttr(At.ARIA_HIDDEN, "true");
1670
- }, e;
1671
- }(It)
1672
- );
1673
- /**
1674
- * @license
1675
- * Copyright 2017 Google Inc.
1676
- *
1677
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1678
- * of this software and associated documentation files (the "Software"), to deal
1679
- * in the Software without restriction, including without limitation the rights
1680
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1681
- * copies of the Software, and to permit persons to whom the Software is
1682
- * furnished to do so, subject to the following conditions:
1683
- *
1684
- * The above copyright notice and this permission notice shall be included in
1685
- * all copies or substantial portions of the Software.
1686
- *
1687
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1688
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1689
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1690
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1691
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1692
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1693
- * THE SOFTWARE.
1694
- */
1695
- var dn = (
1696
- /** @class */
1697
- function(n) {
1698
- K(e, n);
1699
- function e() {
1700
- return n !== null && n.apply(this, arguments) || this;
1701
- }
1702
- return e.attachTo = function(t) {
1703
- return new e(t);
1704
- }, Object.defineProperty(e.prototype, "foundationForTextField", {
1705
- // Provided for access by MDCTextField component
1706
- get: function() {
1707
- return this.foundation;
1708
- },
1709
- enumerable: !1,
1710
- configurable: !0
1711
- }), e.prototype.getDefaultFoundation = function() {
1712
- var t = this, r = {
1713
- addClass: function(i) {
1714
- return t.root.classList.add(i);
1715
- },
1716
- removeClass: function(i) {
1717
- return t.root.classList.remove(i);
1718
- },
1719
- hasClass: function(i) {
1720
- return t.root.classList.contains(i);
1721
- },
1722
- getAttr: function(i) {
1723
- return t.root.getAttribute(i);
1724
- },
1725
- setAttr: function(i, a) {
1726
- return t.root.setAttribute(i, a);
1727
- },
1728
- removeAttr: function(i) {
1729
- return t.root.removeAttribute(i);
1730
- },
1731
- setContent: function(i) {
1732
- t.root.textContent = i;
1733
- }
1734
- };
1735
- return new cn(r);
1736
- }, e;
1737
- }(Et)
1738
- );
1739
- /**
1740
- * @license
1741
- * Copyright 2016 Google Inc.
1742
- *
1743
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1744
- * of this software and associated documentation files (the "Software"), to deal
1745
- * in the Software without restriction, including without limitation the rights
1746
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1747
- * copies of the Software, and to permit persons to whom the Software is
1748
- * furnished to do so, subject to the following conditions:
1749
- *
1750
- * The above copyright notice and this permission notice shall be included in
1751
- * all copies or substantial portions of the Software.
1752
- *
1753
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1754
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1755
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1756
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1757
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1758
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1759
- * THE SOFTWARE.
1760
- */
1761
- var qe = {
1762
- ICON_EVENT: "MDCTextField:icon",
1763
- ICON_ROLE: "button"
1764
- }, gr = {
1765
- ROOT: "mdc-text-field__icon"
1766
- };
1767
- /**
1768
- * @license
1769
- * Copyright 2017 Google Inc.
1770
- *
1771
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1772
- * of this software and associated documentation files (the "Software"), to deal
1773
- * in the Software without restriction, including without limitation the rights
1774
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1775
- * copies of the Software, and to permit persons to whom the Software is
1776
- * furnished to do so, subject to the following conditions:
1777
- *
1778
- * The above copyright notice and this permission notice shall be included in
1779
- * all copies or substantial portions of the Software.
1780
- *
1781
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1782
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1783
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1784
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1785
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1786
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1787
- * THE SOFTWARE.
1788
- */
1789
- var Ge = ["click", "keydown"], Xe = (
1790
- /** @class */
1791
- function(n) {
1792
- K(e, n);
1793
- function e(t) {
1794
- var r = n.call(this, k(k({}, e.defaultAdapter), t)) || this;
1795
- return r.savedTabIndex_ = null, r.interactionHandler_ = function(i) {
1796
- return r.handleInteraction(i);
1797
- }, r;
1798
- }
1799
- return Object.defineProperty(e, "strings", {
1800
- get: function() {
1801
- return qe;
1802
- },
1803
- enumerable: !1,
1804
- configurable: !0
1805
- }), Object.defineProperty(e, "cssClasses", {
1806
- get: function() {
1807
- return gr;
1808
- },
1809
- enumerable: !1,
1810
- configurable: !0
1811
- }), Object.defineProperty(e, "defaultAdapter", {
1812
- /**
1813
- * See {@link MDCTextFieldIconAdapter} for typing information on parameters and return types.
1814
- */
1815
- get: function() {
1816
- return {
1817
- getAttr: function() {
1818
- return null;
1819
- },
1820
- setAttr: function() {
1821
- },
1822
- removeAttr: function() {
1823
- },
1824
- setContent: function() {
1825
- },
1826
- registerInteractionHandler: function() {
1827
- },
1828
- deregisterInteractionHandler: function() {
1829
- },
1830
- notifyIconAction: function() {
1831
- }
1832
- };
1833
- },
1834
- enumerable: !1,
1835
- configurable: !0
1836
- }), e.prototype.init = function() {
1837
- var t = this;
1838
- this.savedTabIndex_ = this.adapter.getAttr("tabindex"), Ge.forEach(function(r) {
1839
- t.adapter.registerInteractionHandler(r, t.interactionHandler_);
1840
- });
1841
- }, e.prototype.destroy = function() {
1842
- var t = this;
1843
- Ge.forEach(function(r) {
1844
- t.adapter.deregisterInteractionHandler(r, t.interactionHandler_);
1845
- });
1846
- }, e.prototype.setDisabled = function(t) {
1847
- this.savedTabIndex_ && (t ? (this.adapter.setAttr("tabindex", "-1"), this.adapter.removeAttr("role")) : (this.adapter.setAttr("tabindex", this.savedTabIndex_), this.adapter.setAttr("role", qe.ICON_ROLE)));
1848
- }, e.prototype.setAriaLabel = function(t) {
1849
- this.adapter.setAttr("aria-label", t);
1850
- }, e.prototype.setContent = function(t) {
1851
- this.adapter.setContent(t);
1852
- }, e.prototype.handleInteraction = function(t) {
1853
- var r = t.key === "Enter" || t.keyCode === 13;
1854
- (t.type === "click" || r) && (t.preventDefault(), this.adapter.notifyIconAction());
1855
- }, e;
1856
- }(It)
1857
- );
1858
- /**
1859
- * @license
1860
- * Copyright 2017 Google Inc.
1861
- *
1862
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1863
- * of this software and associated documentation files (the "Software"), to deal
1864
- * in the Software without restriction, including without limitation the rights
1865
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1866
- * copies of the Software, and to permit persons to whom the Software is
1867
- * furnished to do so, subject to the following conditions:
1868
- *
1869
- * The above copyright notice and this permission notice shall be included in
1870
- * all copies or substantial portions of the Software.
1871
- *
1872
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1873
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1874
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1875
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1876
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1877
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1878
- * THE SOFTWARE.
1879
- */
1880
- var br = (
1881
- /** @class */
1882
- function(n) {
1883
- K(e, n);
1884
- function e() {
1885
- return n !== null && n.apply(this, arguments) || this;
1886
- }
1887
- return e.attachTo = function(t) {
1888
- return new e(t);
1889
- }, Object.defineProperty(e.prototype, "foundationForTextField", {
1890
- // Provided for access by MDCTextField component
1891
- get: function() {
1892
- return this.foundation;
1893
- },
1894
- enumerable: !1,
1895
- configurable: !0
1896
- }), e.prototype.getDefaultFoundation = function() {
1897
- var t = this, r = {
1898
- getAttr: function(i) {
1899
- return t.root.getAttribute(i);
1900
- },
1901
- setAttr: function(i, a) {
1902
- return t.root.setAttribute(i, a);
1903
- },
1904
- removeAttr: function(i) {
1905
- return t.root.removeAttribute(i);
1906
- },
1907
- setContent: function(i) {
1908
- t.root.textContent = i;
1909
- },
1910
- registerInteractionHandler: function(i, a) {
1911
- return t.listen(i, a);
1912
- },
1913
- deregisterInteractionHandler: function(i, a) {
1914
- return t.unlisten(i, a);
1915
- },
1916
- notifyIconAction: function() {
1917
- return t.emit(
1918
- Xe.strings.ICON_EVENT,
1919
- {},
1920
- !0
1921
- /* shouldBubble */
1922
- );
1923
- }
1924
- };
1925
- return new Xe(r);
1926
- }, e;
1927
- }(Et)
1928
- );
1929
- /**
1930
- * @license
1931
- * Copyright 2016 Google Inc.
1932
- *
1933
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1934
- * of this software and associated documentation files (the "Software"), to deal
1935
- * in the Software without restriction, including without limitation the rights
1936
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1937
- * copies of the Software, and to permit persons to whom the Software is
1938
- * furnished to do so, subject to the following conditions:
1939
- *
1940
- * The above copyright notice and this permission notice shall be included in
1941
- * all copies or substantial portions of the Software.
1942
- *
1943
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1944
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1945
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1946
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1947
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1948
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1949
- * THE SOFTWARE.
1950
- */
1951
- var _r = (
1952
- /** @class */
1953
- function(n) {
1954
- K(e, n);
1955
- function e() {
1956
- return n !== null && n.apply(this, arguments) || this;
1957
- }
1958
- return e.attachTo = function(t) {
1959
- return new e(t);
1960
- }, e.prototype.initialize = function(t, r, i, a, o, l, s) {
1961
- t === void 0 && (t = function(O, U) {
1962
- return new Ne(O, U);
1963
- }), r === void 0 && (r = function(O) {
1964
- return new ln(O);
1965
- }), i === void 0 && (i = function(O) {
1966
- return new dn(O);
1967
- }), a === void 0 && (a = function(O) {
1968
- return new pr(O);
1969
- }), o === void 0 && (o = function(O) {
1970
- return new br(O);
1971
- }), l === void 0 && (l = function(O) {
1972
- return new rn(O);
1973
- }), s === void 0 && (s = function(O) {
1974
- return new on(O);
1975
- }), this.input_ = this.root.querySelector(nt.INPUT_SELECTOR);
1976
- var f = this.root.querySelector(nt.LABEL_SELECTOR);
1977
- this.label_ = f ? l(f) : null;
1978
- var p = this.root.querySelector(nt.LINE_RIPPLE_SELECTOR);
1979
- this.lineRipple_ = p ? r(p) : null;
1980
- var v = this.root.querySelector(nt.OUTLINE_SELECTOR);
1981
- this.outline_ = v ? s(v) : null;
1982
- var C = cn.strings, b = this.root.nextElementSibling, m = b && b.classList.contains(Xt.HELPER_LINE), g = m && b && b.querySelector(C.ROOT_SELECTOR);
1983
- this.helperText_ = g ? i(g) : null;
1984
- var L = sn.strings, h = this.root.querySelector(L.ROOT_SELECTOR);
1985
- !h && m && b && (h = b.querySelector(L.ROOT_SELECTOR)), this.characterCounter_ = h ? a(h) : null;
1986
- var w = this.root.querySelector(nt.LEADING_ICON_SELECTOR);
1987
- this.leadingIcon_ = w ? o(w) : null;
1988
- var $ = this.root.querySelector(nt.TRAILING_ICON_SELECTOR);
1989
- this.trailingIcon_ = $ ? o($) : null, this.prefix_ = this.root.querySelector(nt.PREFIX_SELECTOR), this.suffix_ = this.root.querySelector(nt.SUFFIX_SELECTOR), this.ripple = this.createRipple_(t);
1990
- }, e.prototype.destroy = function() {
1991
- this.ripple && this.ripple.destroy(), this.lineRipple_ && this.lineRipple_.destroy(), this.helperText_ && this.helperText_.destroy(), this.characterCounter_ && this.characterCounter_.destroy(), this.leadingIcon_ && this.leadingIcon_.destroy(), this.trailingIcon_ && this.trailingIcon_.destroy(), this.label_ && this.label_.destroy(), this.outline_ && this.outline_.destroy(), n.prototype.destroy.call(this);
1992
- }, e.prototype.initialSyncWithDOM = function() {
1993
- this.disabled = this.input_.disabled;
1994
- }, Object.defineProperty(e.prototype, "value", {
1995
- get: function() {
1996
- return this.foundation.getValue();
1997
- },
1998
- /**
1999
- * @param value The value to set on the input.
2000
- */
2001
- set: function(t) {
2002
- this.foundation.setValue(t);
2003
- },
2004
- enumerable: !1,
2005
- configurable: !0
2006
- }), Object.defineProperty(e.prototype, "disabled", {
2007
- get: function() {
2008
- return this.foundation.isDisabled();
2009
- },
2010
- /**
2011
- * @param disabled Sets the Text Field disabled or enabled.
2012
- */
2013
- set: function(t) {
2014
- this.foundation.setDisabled(t);
2015
- },
2016
- enumerable: !1,
2017
- configurable: !0
2018
- }), Object.defineProperty(e.prototype, "valid", {
2019
- get: function() {
2020
- return this.foundation.isValid();
2021
- },
2022
- /**
2023
- * @param valid Sets the Text Field valid or invalid.
2024
- */
2025
- set: function(t) {
2026
- this.foundation.setValid(t);
2027
- },
2028
- enumerable: !1,
2029
- configurable: !0
2030
- }), Object.defineProperty(e.prototype, "required", {
2031
- get: function() {
2032
- return this.input_.required;
2033
- },
2034
- /**
2035
- * @param required Sets the Text Field to required.
2036
- */
2037
- set: function(t) {
2038
- this.input_.required = t;
2039
- },
2040
- enumerable: !1,
2041
- configurable: !0
2042
- }), Object.defineProperty(e.prototype, "pattern", {
2043
- get: function() {
2044
- return this.input_.pattern;
2045
- },
2046
- /**
2047
- * @param pattern Sets the input element's validation pattern.
2048
- */
2049
- set: function(t) {
2050
- this.input_.pattern = t;
2051
- },
2052
- enumerable: !1,
2053
- configurable: !0
2054
- }), Object.defineProperty(e.prototype, "minLength", {
2055
- get: function() {
2056
- return this.input_.minLength;
2057
- },
2058
- /**
2059
- * @param minLength Sets the input element's minLength.
2060
- */
2061
- set: function(t) {
2062
- this.input_.minLength = t;
2063
- },
2064
- enumerable: !1,
2065
- configurable: !0
2066
- }), Object.defineProperty(e.prototype, "maxLength", {
2067
- get: function() {
2068
- return this.input_.maxLength;
2069
- },
2070
- /**
2071
- * @param maxLength Sets the input element's maxLength.
2072
- */
2073
- set: function(t) {
2074
- t < 0 ? this.input_.removeAttribute("maxLength") : this.input_.maxLength = t;
2075
- },
2076
- enumerable: !1,
2077
- configurable: !0
2078
- }), Object.defineProperty(e.prototype, "min", {
2079
- get: function() {
2080
- return this.input_.min;
2081
- },
2082
- /**
2083
- * @param min Sets the input element's min.
2084
- */
2085
- set: function(t) {
2086
- this.input_.min = t;
2087
- },
2088
- enumerable: !1,
2089
- configurable: !0
2090
- }), Object.defineProperty(e.prototype, "max", {
2091
- get: function() {
2092
- return this.input_.max;
2093
- },
2094
- /**
2095
- * @param max Sets the input element's max.
2096
- */
2097
- set: function(t) {
2098
- this.input_.max = t;
2099
- },
2100
- enumerable: !1,
2101
- configurable: !0
2102
- }), Object.defineProperty(e.prototype, "step", {
2103
- get: function() {
2104
- return this.input_.step;
2105
- },
2106
- /**
2107
- * @param step Sets the input element's step.
2108
- */
2109
- set: function(t) {
2110
- this.input_.step = t;
2111
- },
2112
- enumerable: !1,
2113
- configurable: !0
2114
- }), Object.defineProperty(e.prototype, "helperTextContent", {
2115
- /**
2116
- * Sets the helper text element content.
2117
- */
2118
- set: function(t) {
2119
- this.foundation.setHelperTextContent(t);
2120
- },
2121
- enumerable: !1,
2122
- configurable: !0
2123
- }), Object.defineProperty(e.prototype, "leadingIconAriaLabel", {
2124
- /**
2125
- * Sets the aria label of the leading icon.
2126
- */
2127
- set: function(t) {
2128
- this.foundation.setLeadingIconAriaLabel(t);
2129
- },
2130
- enumerable: !1,
2131
- configurable: !0
2132
- }), Object.defineProperty(e.prototype, "leadingIconContent", {
2133
- /**
2134
- * Sets the text content of the leading icon.
2135
- */
2136
- set: function(t) {
2137
- this.foundation.setLeadingIconContent(t);
2138
- },
2139
- enumerable: !1,
2140
- configurable: !0
2141
- }), Object.defineProperty(e.prototype, "trailingIconAriaLabel", {
2142
- /**
2143
- * Sets the aria label of the trailing icon.
2144
- */
2145
- set: function(t) {
2146
- this.foundation.setTrailingIconAriaLabel(t);
2147
- },
2148
- enumerable: !1,
2149
- configurable: !0
2150
- }), Object.defineProperty(e.prototype, "trailingIconContent", {
2151
- /**
2152
- * Sets the text content of the trailing icon.
2153
- */
2154
- set: function(t) {
2155
- this.foundation.setTrailingIconContent(t);
2156
- },
2157
- enumerable: !1,
2158
- configurable: !0
2159
- }), Object.defineProperty(e.prototype, "useNativeValidation", {
2160
- /**
2161
- * Enables or disables the use of native validation. Use this for custom validation.
2162
- * @param useNativeValidation Set this to false to ignore native input validation.
2163
- */
2164
- set: function(t) {
2165
- this.foundation.setUseNativeValidation(t);
2166
- },
2167
- enumerable: !1,
2168
- configurable: !0
2169
- }), Object.defineProperty(e.prototype, "prefixText", {
2170
- /**
2171
- * Gets the text content of the prefix, or null if it does not exist.
2172
- */
2173
- get: function() {
2174
- return this.prefix_ ? this.prefix_.textContent : null;
2175
- },
2176
- /**
2177
- * Sets the text content of the prefix, if it exists.
2178
- */
2179
- set: function(t) {
2180
- this.prefix_ && (this.prefix_.textContent = t);
2181
- },
2182
- enumerable: !1,
2183
- configurable: !0
2184
- }), Object.defineProperty(e.prototype, "suffixText", {
2185
- /**
2186
- * Gets the text content of the suffix, or null if it does not exist.
2187
- */
2188
- get: function() {
2189
- return this.suffix_ ? this.suffix_.textContent : null;
2190
- },
2191
- /**
2192
- * Sets the text content of the suffix, if it exists.
2193
- */
2194
- set: function(t) {
2195
- this.suffix_ && (this.suffix_.textContent = t);
2196
- },
2197
- enumerable: !1,
2198
- configurable: !0
2199
- }), e.prototype.focus = function() {
2200
- this.input_.focus();
2201
- }, e.prototype.layout = function() {
2202
- var t = this.foundation.shouldFloat;
2203
- this.foundation.notchOutline(t);
2204
- }, e.prototype.getDefaultFoundation = function() {
2205
- var t = k(k(k(k(k({}, this.getRootAdapterMethods_()), this.getInputAdapterMethods_()), this.getLabelAdapterMethods_()), this.getLineRippleAdapterMethods_()), this.getOutlineAdapterMethods_());
2206
- return new vr(t, this.getFoundationMap_());
2207
- }, e.prototype.getRootAdapterMethods_ = function() {
2208
- var t = this;
2209
- return {
2210
- addClass: function(r) {
2211
- return t.root.classList.add(r);
2212
- },
2213
- removeClass: function(r) {
2214
- return t.root.classList.remove(r);
2215
- },
2216
- hasClass: function(r) {
2217
- return t.root.classList.contains(r);
2218
- },
2219
- registerTextFieldInteractionHandler: function(r, i) {
2220
- t.listen(r, i);
2221
- },
2222
- deregisterTextFieldInteractionHandler: function(r, i) {
2223
- t.unlisten(r, i);
2224
- },
2225
- registerValidationAttributeChangeHandler: function(r) {
2226
- var i = function(l) {
2227
- return l.map(function(s) {
2228
- return s.attributeName;
2229
- }).filter(function(s) {
2230
- return s;
2231
- });
2232
- }, a = new MutationObserver(function(l) {
2233
- return r(i(l));
2234
- }), o = { attributes: !0 };
2235
- return a.observe(t.input_, o), a;
2236
- },
2237
- deregisterValidationAttributeChangeHandler: function(r) {
2238
- r.disconnect();
2239
- }
2240
- };
2241
- }, e.prototype.getInputAdapterMethods_ = function() {
2242
- var t = this;
2243
- return {
2244
- getNativeInput: function() {
2245
- return t.input_;
2246
- },
2247
- setInputAttr: function(r, i) {
2248
- t.input_.setAttribute(r, i);
2249
- },
2250
- removeInputAttr: function(r) {
2251
- t.input_.removeAttribute(r);
2252
- },
2253
- isFocused: function() {
2254
- return document.activeElement === t.input_;
2255
- },
2256
- registerInputInteractionHandler: function(r, i) {
2257
- t.input_.addEventListener(r, i, Gt());
2258
- },
2259
- deregisterInputInteractionHandler: function(r, i) {
2260
- t.input_.removeEventListener(r, i, Gt());
2261
- }
2262
- };
2263
- }, e.prototype.getLabelAdapterMethods_ = function() {
2264
- var t = this;
2265
- return {
2266
- floatLabel: function(r) {
2267
- return t.label_ && t.label_.float(r);
2268
- },
2269
- getLabelWidth: function() {
2270
- return t.label_ ? t.label_.getWidth() : 0;
2271
- },
2272
- hasLabel: function() {
2273
- return !!t.label_;
2274
- },
2275
- shakeLabel: function(r) {
2276
- return t.label_ && t.label_.shake(r);
2277
- },
2278
- setLabelRequired: function(r) {
2279
- return t.label_ && t.label_.setRequired(r);
2280
- }
2281
- };
2282
- }, e.prototype.getLineRippleAdapterMethods_ = function() {
2283
- var t = this;
2284
- return {
2285
- activateLineRipple: function() {
2286
- t.lineRipple_ && t.lineRipple_.activate();
2287
- },
2288
- deactivateLineRipple: function() {
2289
- t.lineRipple_ && t.lineRipple_.deactivate();
2290
- },
2291
- setLineRippleTransformOrigin: function(r) {
2292
- t.lineRipple_ && t.lineRipple_.setRippleCenter(r);
2293
- }
2294
- };
2295
- }, e.prototype.getOutlineAdapterMethods_ = function() {
2296
- var t = this;
2297
- return {
2298
- closeOutline: function() {
2299
- return t.outline_ && t.outline_.closeNotch();
2300
- },
2301
- hasOutline: function() {
2302
- return !!t.outline_;
2303
- },
2304
- notchOutline: function(r) {
2305
- return t.outline_ && t.outline_.notch(r);
2306
- }
2307
- };
2308
- }, e.prototype.getFoundationMap_ = function() {
2309
- return {
2310
- characterCounter: this.characterCounter_ ? this.characterCounter_.foundationForTextField : void 0,
2311
- helperText: this.helperText_ ? this.helperText_.foundationForTextField : void 0,
2312
- leadingIcon: this.leadingIcon_ ? this.leadingIcon_.foundationForTextField : void 0,
2313
- trailingIcon: this.trailingIcon_ ? this.trailingIcon_.foundationForTextField : void 0
2314
- };
2315
- }, e.prototype.createRipple_ = function(t) {
2316
- var r = this, i = this.root.classList.contains(Xt.TEXTAREA), a = this.root.classList.contains(Xt.OUTLINED);
2317
- if (i || a)
2318
- return null;
2319
- var o = k(k({}, Ne.createAdapter(this)), { isSurfaceActive: function() {
2320
- return Hn(r.input_, ":active");
2321
- }, registerInteractionHandler: function(l, s) {
2322
- return r.input_.addEventListener(l, s, Gt());
2323
- }, deregisterInteractionHandler: function(l, s) {
2324
- return r.input_.removeEventListener(l, s, Gt());
2325
- } });
2326
- return t(this.root, new jn(o));
2327
- }, e;
2328
- }(Et)
2329
- );
2330
- const yr = {
2331
- /**
2332
- *
2333
- *
2334
- * Defaults to **null**.
2335
- */
2336
- activated: u.bool,
2337
- /**
2338
- * The css class name to be passed through to the component markup.
2339
- *
2340
- * Defaults to **undefined**.
2341
- */
2342
- className: u.string,
2343
- /**
2344
- *
2345
- *
2346
- * Defaults to **null**.
2347
- */
2348
- rippleCenter: u.string
2349
- }, Er = {
2350
- activated: null,
2351
- className: void 0,
2352
- rippleCenter: null
2353
- }, Zt = /* @__PURE__ */ mt((n, e) => {
2354
- const {
2355
- activated: t,
2356
- rippleCenter: r,
2357
- className: i,
2358
- ...a
2359
- } = n, o = F(), l = F();
2360
- return xt(e, () => l.current, []), B(() => (o.current = ln.attachTo(l.current), () => {
2361
- o.current.destroy();
2362
- }), [l]), B(() => {
2363
- t ? o.current.activate() : o.current.deactivate();
2364
- }, [t]), B(() => {
2365
- r && o.current.setRippleCenter(r);
2366
- }, [r]), /* @__PURE__ */ I.createElement("div", lt({
2367
- ref: l,
2368
- className: Y("lmnt", "mdc-line-ripple", i)
2369
- }, a));
2370
- });
2371
- Zt.displayName = "LineRipple";
2372
- Zt.propTypes = yr;
2373
- Zt.defaultProps = Er;
2374
- const Jt = /* @__PURE__ */ mt((n, e) => {
2375
- const {
2376
- wrap: t,
2377
- children: r
2378
- } = n;
2379
- return t ? /* @__PURE__ */ I.createElement("span", {
2380
- ref: e,
2381
- className: "mdc-text-field__resizer"
2382
- }, r) : r;
2383
- });
2384
- Jt.displayName = "TextfieldSpanShim";
2385
- Jt.propTypes = {
2386
- children: u.node,
2387
- wrap: u.bool
2388
- };
2389
- Jt.defaultProps = {
2390
- children: void 0,
2391
- wrap: !1
2392
- };
2393
- const Ir = {
2394
- /**
2395
- * @deprecated _Use `fullWidth` instead._
2396
- *
2397
- * Applies a full-width style where the Textfield will fill its container.
2398
- *
2399
- * Defaults to **undefined**.
2400
- */
2401
- block: ct(u.bool, "Textfield", "Use `fullWidth` instead."),
2402
- /**
2403
- * The css class name to be passed through to the component markup.
2404
- *
2405
- * Defaults to **undefined**.
2406
- */
2407
- className: u.string,
2408
- /**
2409
- * @deprecated _See `containerProps`._
2410
- *
2411
- * Add a custom class to the `Textfield` container.
2412
- *
2413
- * Defaults to **undefined**.
2414
- */
2415
- containerClass: ct(u.string, "Textfield", "See `containerProps`."),
2416
- /**
2417
- * Properties to be added to the container of the textfield.
2418
- *
2419
- * Defaults to **undefined**.
2420
- */
2421
- containerProps: u.object,
2422
- /**
2423
- * Enables a character count. _Warning_ requires `maxlength` to be set.
2424
- *
2425
- * Defaults to **false**.
2426
- */
2427
- counter: u.bool,
2428
- /**
2429
- * The starting value of the Textfield when working in uncontrolled mode.
2430
- *
2431
- * Defaults to **undefined**.
2432
- */
2433
- defaultValue: u.oneOfType([u.string, u.number]),
2434
- /**
2435
- * The size of the Textfield will be reduced.
2436
- *
2437
- * Defaults to **false**.
2438
- */
2439
- dense: u.bool,
2440
- /**
2441
- * Textfield will be disabled.
2442
- *
2443
- * Defaults to **false**.
2444
- */
2445
- disabled: u.bool,
2446
- /**
2447
- * @deprecated _Use `variant='embedded'_
2448
- *
2449
- * An unfilled, non-outlined and full-width variant of Textfield, intended to be embedded in other components such as TopAppBar or TableHeader.
2450
- *
2451
- * Defaults to **undefined**.
2452
- */
2453
- embedded: ct(u.bool, "Textfield", 'Use `variant="embedded"'),
2454
- /**
2455
- * @deprecated _Use variant='filled' instead._
2456
- *
2457
- * Apply filled style to the Textfield. Previously called primary.
2458
- *
2459
- * Defaults to **undefined**.
2460
- */
2461
- filled: ct(u.bool, "Textfield", 'Use variant="filled" instead.'),
2462
- /**
2463
- * Sets the Textfield to the focused state.
2464
- *
2465
- * Defaults to **false**.
2466
- */
2467
- focused: u.bool,
2468
- /**
2469
- * The Textfield will expand to 100% width.
2470
- *
2471
- * Defaults to **false**.
2472
- */
2473
- fullWidth: u.bool,
2474
- /**
2475
- * Helper text to be displayed below Textfield, by default only visible on focus.
2476
- *
2477
- * Defaults to **null**.
2478
- */
2479
- helperText: u.node,
2480
- /**
2481
- * Randomly generated id for the helper text container element. May be overwritten.
2482
- *
2483
- * Defaults to **undefined**.
2484
- */
2485
- helperTextId: u.string,
2486
- /**
2487
- * Set the helper text to be permanently visible.
2488
- *
2489
- * Defaults to **false**.
2490
- */
2491
- helperTextPersistent: u.bool,
2492
- /**
2493
- * Set the helper text to use validation styles. Helper text changes with `valid` (e.g., helper text will appear red when `valid` is set to 'false').
2494
- *
2495
- * Defaults to **false**.
2496
- */
2497
- helperTextValidation: u.bool,
2498
- /**
2499
- * Randomly generated id for the input element. May be overwritten.
2500
- *
2501
- * Defaults to **undefined**.
2502
- */
2503
- id: u.string,
2504
- /**
2505
- * Floating input label. Note: full-width Textfields do not support floating labels - any label on a full-width Textfield will be automatically mapped to a placeholder.
2506
- *
2507
- * Defaults to **null**.
2508
- */
2509
- label: u.string,
2510
- /**
2511
- * Randomly generated id for the label element. May be overwritten.
2512
- *
2513
- * Defaults to **undefined**.
2514
- */
2515
- labelId: u.string,
2516
- /**
2517
- * Custom content to appear before the input.
2518
- *
2519
- * Defaults to **null**.
2520
- */
2521
- leadingContent: u.node,
2522
- /**
2523
- * Adds the given Icon or Icon Button to the left of the Textfield. Expects the name of a valid Material.io icon, however in React an icon or icon button component may be passed in instead for more control,
2524
- *
2525
- * Defaults to **null**.
2526
- */
2527
- leadingIcon: u.oneOfType([u.string, u.node]),
2528
- /**
2529
- * @deprecated _Use `maxlength` instead. The case of this prop has changed to be more consistent._
2530
- *
2531
- * Restricts the number of characters that can be entered, best used with counter.
2532
- *
2533
- * Defaults to **undefined**.
2534
- */
2535
- maxLength: ct(u.number, "Textfield", "Use `maxlength` instead. The case of this prop has changed to be more consistent."),
2536
- /**
2537
- * Restricts the number of characters that can be entered, best used with counter.
2538
- *
2539
- * Defaults to **null**.
2540
- */
2541
- maxlength: Rn(u.number, "Textfield", "counter"),
2542
- /**
2543
- * Prevents resizing when using `textarea`.
2544
- *
2545
- * Defaults to **true**.
2546
- */
2547
- noResize: u.bool,
2548
- /**
2549
- * Fired when focus leaves the input.
2550
- *
2551
- * Defaults to **null**.
2552
- */
2553
- onBlur: u.func,
2554
- /**
2555
- * Fired when each character is entered into the Textfield.
2556
- *
2557
- * Defaults to **null**.
2558
- */
2559
- onChange: u.func,
2560
- /**
2561
- * Fired when the input gains focus.
2562
- *
2563
- * Defaults to **null**.
2564
- */
2565
- onFocus: u.func,
2566
- /**
2567
- * @deprecated _Use `variant='outlined'` instead_
2568
- *
2569
- * Apply outlined style to the Textfield. Previously called secondary.
2570
- *
2571
- * Defaults to **undefined**.
2572
- */
2573
- outlined: ct(u.bool, "Textfield", 'Use `variant="outlined"` instead'),
2574
- /**
2575
- * Non-floating label text, will be replaced when the user starts typing.
2576
- *
2577
- * Defaults to **null**.
2578
- */
2579
- placeholder: u.string,
2580
- /**
2581
- * Text that will appear before the label or value of the Textfield. It will be shown on focus. An example use-case might be a currency symbol such as `$`. _Warning:_ This cannot be used with `leadingIcon` or `textarea`.
2582
- *
2583
- * Defaults to **null**.
2584
- */
2585
- prefixText: u.string,
2586
- /**
2587
- * @deprecated _This feature is no longer supported. Use `variant='filled'` instead._
2588
- *
2589
- * Enable filled styling.
2590
- *
2591
- * Defaults to **undefined**.
2592
- */
2593
- primary: ct(u.bool, "Textfield", 'This feature is no longer supported. Use `variant="filled"` instead.'),
2594
- /**
2595
- * @deprecated _Use `variant='embedded'`_
2596
- *
2597
- * Enabled search bar styling, including a full width style.
2598
- *
2599
- * Defaults to **undefined**.
2600
- */
2601
- search: ct(u.bool, "Textfield", 'Use `variant="embedded"`'),
2602
- /**
2603
- * @deprecated _Use `variant='outlined'` instead._
2604
- *
2605
- * Apply secondary style to the Textfield.
2606
- *
2607
- * Defaults to **undefined**.
2608
- */
2609
- secondary: ct(u.bool, "Textfield", 'Use `variant="outlined"` instead.'),
2610
- /**
2611
- * Text that will appear after the label or value of the Textfield. It will be shown on focus. An example use-case might be `.00` if handling currency. _Warning:_ This cannot be used with `trailingIcon` or `textarea`.
2612
- *
2613
- * Defaults to **null**.
2614
- */
2615
- suffixText: u.string,
2616
- /**
2617
- * Enabled multi-line text input. _Note_ `textarea` cannot be used with the embedded variant.
2618
- *
2619
- * Defaults to **false**.
2620
- */
2621
- textarea: u.bool,
2622
- /**
2623
- * If defined, a Tooltip will appear on the Textfield. Useful to show the full value, if the value is too long for the Textfield width. The object should be the needed Tooltip properties. Tooltip `text` prop will be set to the current value of the Textfield. See Tooltip docs for available props.
2624
- *
2625
- * Defaults to **null**.
2626
- */
2627
- tooltip: u.oneOfType([u.bool, u.object]),
2628
- /**
2629
- * Custom content to appear after the input.
2630
- *
2631
- * Defaults to **null**.
2632
- */
2633
- trailingContent: u.node,
2634
- /**
2635
- * Adds the given Icon or Icon Button to the right of the Textfield . Expects the name of a valid Material.io icon, however in React an icon icon button component may be passed in instead for more control.
2636
- *
2637
- * Defaults to **null**.
2638
- */
2639
- trailingIcon: u.oneOfType([u.string, u.node]),
2640
- /**
2641
- * Support for built-in input types. Browser support for some advanced types such as color or date may be limited or appear differently between browsers. _Note_ the `Datepicker` component should be preferred over the built-in date/time types as it offers more consistency and features._Note_ Slider type is not support, please use the Element `Slider` component instead.
2642
- *
2643
- * Defaults to **'text'**.
2644
- */
2645
- type: u.oneOf(["text", "password", "color", "email", "url", "number", "tel", "search", "datetime-local", "month", "time", "week", "date"]),
2646
- /**
2647
- * Applies an invalid style to the Textfield.
2648
- *
2649
- * Defaults to **true**.
2650
- */
2651
- valid: u.bool,
2652
- /**
2653
- * The current value of the Textfield component.
2654
- *
2655
- * Defaults to **undefined**.
2656
- */
2657
- value: u.oneOfType([u.string, u.number]),
2658
- /**
2659
- * Applies the selected styling to the Textfield. _Note_ `textarea` does not support the `embedded` variant.
2660
- *
2661
- * Defaults to **'filled'**.
2662
- */
2663
- variant: u.oneOf(["filled", "outlined", "embedded"])
2664
- }, xr = {
2665
- block: void 0,
2666
- className: void 0,
2667
- containerClass: void 0,
2668
- containerProps: void 0,
2669
- counter: !1,
2670
- defaultValue: void 0,
2671
- dense: !1,
2672
- disabled: !1,
2673
- embedded: void 0,
2674
- filled: void 0,
2675
- focused: !1,
2676
- fullWidth: !1,
2677
- helperText: null,
2678
- helperTextId: void 0,
2679
- helperTextPersistent: !1,
2680
- helperTextValidation: !1,
2681
- id: void 0,
2682
- label: null,
2683
- labelId: void 0,
2684
- leadingContent: null,
2685
- leadingIcon: null,
2686
- maxLength: void 0,
2687
- maxlength: null,
2688
- noResize: !0,
2689
- outlined: void 0,
2690
- placeholder: null,
2691
- prefixText: null,
2692
- primary: void 0,
2693
- search: void 0,
2694
- secondary: void 0,
2695
- suffixText: null,
2696
- textarea: !1,
2697
- tooltip: null,
2698
- trailingContent: null,
2699
- trailingIcon: null,
2700
- type: "text",
2701
- valid: !0,
2702
- value: void 0,
2703
- variant: "filled"
2704
- }, Ke = (n, e) => n ? /* @__PURE__ */ I.createElement("div", {
2705
- className: "mdc-text-field-character-counter"
2706
- }, "0 / ", e) : null, Tr = (n) => {
2707
- const {
2708
- type: e
2709
- } = {
2710
- ...n
2711
- }, {
2712
- displayName: t
2713
- } = {
2714
- ...e
2715
- };
2716
- return typeof n == "string" ? /* @__PURE__ */ I.createElement(tn, {
2717
- role: "button",
2718
- className: "mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--leading",
2719
- icon: n
2720
- }) : _e(n, {
2721
- className: Y("mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--leading", t === "IconButton" && "lmnt-text-field__icon-button--leading"),
2722
- dense: t === "IconButton" ? !0 : void 0,
2723
- role: "button"
2724
- });
2725
- }, Cr = (n) => {
2726
- const {
2727
- type: e
2728
- } = {
2729
- ...n
2730
- }, {
2731
- displayName: t
2732
- } = {
2733
- ...e
2734
- };
2735
- return typeof n == "string" ? /* @__PURE__ */ I.createElement(tn, {
2736
- className: "mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--trailing",
2737
- icon: n
2738
- }) : _e(n, {
2739
- className: Y("mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--trailing", t === "IconButton" && "lmnt-text-field__icon-button--trailing"),
2740
- dense: t === "IconButton" ? !0 : void 0,
2741
- role: t === "IconButton" ? "button" : null
2742
- });
2743
- }, Qt = /* @__PURE__ */ mt((n, e) => {
2744
- const {
2745
- block: t,
2746
- className: r,
2747
- containerClass: i,
2748
- containerProps: a,
2749
- containerStyle: o,
2750
- counter: l,
2751
- defaultValue: s,
2752
- dense: f,
2753
- disabled: p,
2754
- embedded: v,
2755
- filled: C,
2756
- focused: b,
2757
- fullWidth: m,
2758
- helperText: g,
2759
- helperTextId: L,
2760
- helperTextPersistent: h,
2761
- helperTextValidation: w,
2762
- id: $,
2763
- label: O,
2764
- labelId: U,
2765
- leadingContent: J,
2766
- leadingIcon: q,
2767
- maxLength: S,
2768
- maxlength: T,
2769
- noResize: D,
2770
- onBlur: M,
2771
- outlined: z,
2772
- placeholder: it,
2773
- prefixText: ut,
2774
- primary: gt = null,
2775
- search: x,
2776
- secondary: _,
2777
- suffixText: V,
2778
- textarea: N,
2779
- tooltip: R,
2780
- trailingContent: H,
2781
- trailingIcon: j,
2782
- type: st,
2783
- valid: dt,
2784
- value: X,
2785
- variant: ft,
2786
- ...Rt
2787
- } = n, {
2788
- hoisted: Vt,
2789
- position: Ut = "bottom"
2790
- } = R && typeof R == "object" ? R : {}, [Tt] = rt(() => $ || Ht()), [Pt] = rt(() => L || Ht()), [Ft] = rt(() => U || Ht()), [Wt, te] = rt(!0), [Ct, ee] = rt(!1), [c, d] = rt(T), y = g || l && c, P = N ? "textarea" : "input", G = F(), A = F(), E = F(), Z = F(), tt = F(), Q = F(), pt = F(), wt = F(), yn = (j || q) && !N, Ot = vt(() => dt ?? !0, [dt]), Lt = !N && (v || x || ft === "embedded"), ne = !v && (z || _ || ft === "outlined"), qt = !ne && !Lt && (gt || C || ft === "filled"), Dt = Lt || m || t, re = !Lt && !!O && !f;
2791
- B(() => (E.current = _r.attachTo(Z.current), () => {
2792
- E.current.destroy();
2793
- }), [Ct]), xt(e, () => ({
2794
- mdc: E.current,
2795
- input: tt.current,
2796
- container: Q.current,
2797
- label: Z.current
2798
- })), B(() => (g && typeof g == "string" && (A.current = new dn(G.current)), () => {
2799
- A.current && A.current.destroy();
2800
- }), [g]), B(() => {
2801
- if (g) {
2802
- var W, et, at, Nt;
2803
- (W = A.current) === null || W === void 0 || W.foundation.setValidation(w), (et = A.current) === null || et === void 0 || et.foundation.setValidity(Ot), (at = A.current) === null || at === void 0 || at.foundation.setPersistent(h), (Nt = A.current) === null || Nt === void 0 || Nt.foundation.setContent(g);
2804
- }
2805
- }, [g, h, w, Ot]), B(() => {
2806
- s || (E.current.value = X || X === 0 ? X : ""), E.current.valid = Ot;
2807
- }, [E, X, Ot, s]), B(() => {
2808
- E.current.disabled = p;
2809
- }, [E, p]), B(() => {
2810
- d(S && !T ? S : T);
2811
- }, [T, S]), B(() => {
2812
- ee(c > 0 && l);
2813
- }, [c, l]), B(() => {
2814
- te(Dt || l || g);
2815
- }, [Dt, l, g]);
2816
- const En = () => {
2817
- dt !== void 0 && X !== null && (E.current.valid = dt);
2818
- }, In = (W) => {
2819
- M && M(W), En();
2820
- }, xe = () => {
2821
- E.current.value = "", E.current.valid = Ot;
2822
- };
2823
- B(() => (window.addEventListener("reset", xe), () => {
2824
- window.removeEventListener("reset", xe);
2825
- }), []), B(() => {
2826
- if (R) {
2827
- const W = [{
2828
- name: "flip",
2829
- options: {
2830
- enabled: !0,
2831
- padding: {
2832
- bottom: 32,
2833
- top: 32
2834
- }
2835
- }
2836
- }, {
2837
- name: "offset",
2838
- options: {
2839
- offset: [0, 12]
2840
- }
2841
- }];
2842
- wt.current = Ye(Q.current, pt.current, {
2843
- placement: Ut,
2844
- modifiers: W
2845
- });
2846
- }
2847
- return () => {
2848
- var W;
2849
- (W = wt.current) === null || W === void 0 || W.destroy();
2850
- };
2851
- }, [Ut, Vt, R]);
2852
- const Te = _t(() => {
2853
- if (X) {
2854
- const Nt = E.current.input_;
2855
- if (Nt.offsetWidth < Nt.scrollWidth) {
2856
- var W, et, at;
2857
- (W = pt.current) === null || W === void 0 || W.setAttribute("data-show", ""), (et = wt.current) === null || et === void 0 || et.setOptions((Oe) => ({
2858
- ...Oe,
2859
- modifiers: [...Oe.modifiers, {
2860
- name: "eventListeners",
2861
- enabled: !0
2862
- }]
2863
- })), (at = wt.current) === null || at === void 0 || at.update();
2864
- }
2865
- }
2866
- }, [X]), Ce = _t(() => {
2867
- var W, et;
2868
- (W = pt.current) === null || W === void 0 || W.removeAttribute("data-show"), (et = wt.current) === null || et === void 0 || et.setOptions((at) => ({
2869
- ...at,
2870
- modifiers: [...at.modifiers, {
2871
- name: "eventListeners",
2872
- enabled: !1
2873
- }]
2874
- }));
2875
- }, []);
2876
- return /* @__PURE__ */ I.createElement("div", lt({
2877
- ref: Q,
2878
- style: o,
2879
- className: Y("lmnt", "lmnt-text-field--container", Dt && "lmnt-text-field--container-full-width", !Dt && Wt && "lmnt-text-field--container-to-content-width", !Wt && "lmnt-text-field-inline-container", i)
2880
- }, a, {
2881
- onMouseEnter: R && Te,
2882
- onFocus: R && Te,
2883
- onMouseLeave: R && Ce,
2884
- onBlur: R && Ce
2885
- }), J, /* @__PURE__ */ I.createElement("label", {
2886
- htmlFor: Tt,
2887
- ref: Z,
2888
- className: Y(["lmnt", "mdc-text-field", "lmnt-text-field", Lt && "lmnt-text-field--embedded", Dt && "lmnt-text-field--full-width", yn && "lmnt-text-field--with-icon", !Ot && "mdc-text-field--invalid", p && "mdc-text-field--disabled", b && "mdc-text-field--focused", !re && "mdc-text-field--no-label", q && !N && "mdc-text-field--with-leading-icon", N && "mdc-text-field--textarea", N && l && c && !D && "mdc-text-field--with-internal-counter", j && !N && "mdc-text-field--with-trailing-icon", qt && "mdc-text-field--filled", ne && "mdc-text-field--outlined", f && "lmnt-text-field--dense", r])
2889
- }, qt && /* @__PURE__ */ I.createElement("span", {
2890
- className: "mdc-text-field__ripple"
2891
- }), q && !N && Tr(q), ut && !q && !N && /* @__PURE__ */ I.createElement("span", {
2892
- className: "mdc-text-field__affix mdc-text-field__affix--prefix"
2893
- }, ut), /* @__PURE__ */ I.createElement(Jt, {
2894
- wrap: !D && N
2895
- }, /* @__PURE__ */ I.createElement(P, lt({
2896
- "aria-controls": Pt,
2897
- "aria-describedby": Pt,
2898
- "aria-labelledby": Ft,
2899
- className: Y("mdc-text-field__input", st === "color" && "lmnt-text-field__input--color"),
2900
- disabled: p,
2901
- id: Tt,
2902
- type: st,
2903
- onBlur: In,
2904
- defaultValue: s,
2905
- placeholder: it || (Lt && O ? O : "") || (f && O ? O : ""),
2906
- maxLength: c,
2907
- ref: tt,
2908
- value: X
2909
- }, Rt)), !D && Ke(Ct, c)), j && !N && Cr(j), V && !j && !N && /* @__PURE__ */ I.createElement("span", {
2910
- className: "mdc-text-field__affix mdc-text-field__affix--suffix"
2911
- }, V), ne && /* @__PURE__ */ I.createElement(zt, null, re && /* @__PURE__ */ I.createElement(Bt, {
2912
- id: Ft,
2913
- htmlFor: Tt
2914
- }, O)), qt && re && /* @__PURE__ */ I.createElement(Bt, {
2915
- id: Ft,
2916
- htmlFor: Tt
2917
- }, O), (qt || Lt) && /* @__PURE__ */ I.createElement(Zt, null)), H, y && /* @__PURE__ */ I.createElement("div", {
2918
- className: "mdc-text-field-helper-line"
2919
- }, g && /* @__PURE__ */ I.createElement("div", {
2920
- ref: G,
2921
- id: Pt,
2922
- "aria-hidden": h ? "false" : "true",
2923
- className: Y(["mdc-text-field-helper-text", h && "mdc-text-field-helper-text--persistent", w && "mdc-text-field-helper-text--validation-msg"])
2924
- }, g), D && Ke(Ct, c)), R && /* @__PURE__ */ I.createElement(Mt, lt({
2925
- role: "tooltip"
2926
- }, R, {
2927
- ref: pt,
2928
- text: X
2929
- })));
2930
- });
2931
- Qt.displayName = "Textfield";
2932
- Qt.propTypes = Ir;
2933
- Qt.defaultProps = xr;
2934
- var Or = tr();
2935
- const fn = /* @__PURE__ */ Vn(Or);
2936
- function pn(n, e) {
2937
- var t = {};
2938
- for (var r in n)
2939
- Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
2940
- if (n != null && typeof Object.getOwnPropertySymbols == "function")
2941
- for (var i = 0, r = Object.getOwnPropertySymbols(n); i < r.length; i++)
2942
- e.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[i]) && (t[r[i]] = n[r[i]]);
2943
- return t;
1
+ import { jsx as at } from "react/jsx-runtime";
2
+ import "../../i18nInstance-l1IFPZ5d.js";
3
+ import { useFormContext as mt, Controller as Rt } from "react-hook-form";
4
+ import X, { useRef as Y, useState as bt, useEffect as vt, useLayoutEffect as kt, useMemo as tt } from "react";
5
+ import { c as Wt, u as Lt } from "../../useTranslation-B6E1rHIA.js";
6
+ import { Z as _t, x as Kt } from "../../index.es-25EARqhH-By1Ap282.js";
7
+ import { t as $t } from "../../i18n-BhmFdUcK.js";
8
+ import { InternationalizationWrapper as Ut } from "../InternationalizationWrapper/InternationalizationWrapper.js";
9
+ import '../../assets/DefaultFormNumber.css';var qt = _t();
10
+ const Vt = /* @__PURE__ */ Wt(qt);
11
+ function Nt(t, e) {
12
+ var r = {};
13
+ for (var n in t)
14
+ Object.prototype.hasOwnProperty.call(t, n) && e.indexOf(n) < 0 && (r[n] = t[n]);
15
+ if (t != null && typeof Object.getOwnPropertySymbols == "function")
16
+ for (var a = 0, n = Object.getOwnPropertySymbols(t); a < n.length; a++)
17
+ e.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(t, n[a]) && (r[n[a]] = t[n[a]]);
18
+ return r;
2944
19
  }
2945
- var $t;
2946
- (function(n) {
2947
- n.event = "event", n.props = "prop";
2948
- })($t || ($t = {}));
2949
- function ht() {
20
+ var nt;
21
+ (function(t) {
22
+ t.event = "event", t.props = "prop";
23
+ })(nt || (nt = {}));
24
+ function q() {
2950
25
  }
2951
- function Lr(n) {
2952
- var e, t = void 0;
26
+ function Zt(t) {
27
+ var e, r = void 0;
2953
28
  return function() {
2954
- for (var r = [], i = arguments.length; i--; ) r[i] = arguments[i];
2955
- return e && r.length === e.length && r.every(function(a, o) {
2956
- return a === e[o];
2957
- }) || (e = r, t = n.apply(void 0, r)), t;
29
+ for (var n = [], a = arguments.length; a--; ) n[a] = arguments[a];
30
+ return e && n.length === e.length && n.every(function(o, l) {
31
+ return o === e[l];
32
+ }) || (e = n, r = t.apply(void 0, n)), r;
2958
33
  };
2959
34
  }
2960
- function kt(n) {
2961
- return !!(n || "").match(/\d/);
35
+ function ot(t) {
36
+ return !!(t || "").match(/\d/);
2962
37
  }
2963
- function St(n) {
2964
- return n == null;
38
+ function Q(t) {
39
+ return t == null;
2965
40
  }
2966
- function Nr(n) {
2967
- return typeof n == "number" && isNaN(n);
41
+ function Gt(t) {
42
+ return typeof t == "number" && isNaN(t);
2968
43
  }
2969
- function hn(n) {
2970
- return St(n) || Nr(n) || typeof n == "number" && !isFinite(n);
44
+ function wt(t) {
45
+ return Q(t) || Gt(t) || typeof t == "number" && !isFinite(t);
2971
46
  }
2972
- function mn(n) {
2973
- return n.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
47
+ function Tt(t) {
48
+ return t.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
2974
49
  }
2975
- function Ar(n) {
2976
- switch (n) {
50
+ function Ht(t) {
51
+ switch (t) {
2977
52
  case "lakh":
2978
53
  return /(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;
2979
54
  case "wan":
@@ -2983,102 +58,102 @@ function Ar(n) {
2983
58
  return /(\d)(?=(\d{3})+(?!\d))/g;
2984
59
  }
2985
60
  }
2986
- function Sr(n, e, t) {
2987
- var r = Ar(t), i = n.search(/[1-9]/);
2988
- return i = i === -1 ? n.length : i, n.substring(0, i) + n.substring(i, n.length).replace(r, "$1" + e);
61
+ function zt(t, e, r) {
62
+ var n = Ht(r), a = t.search(/[1-9]/);
63
+ return a = a === -1 ? t.length : a, t.substring(0, a) + t.substring(a, t.length).replace(n, "$1" + e);
2989
64
  }
2990
- function Rr(n) {
2991
- var e = F(n);
2992
- e.current = n;
2993
- var t = F(function() {
2994
- for (var r = [], i = arguments.length; i--; ) r[i] = arguments[i];
2995
- return e.current.apply(e, r);
65
+ function Jt(t) {
66
+ var e = Y(t);
67
+ e.current = t;
68
+ var r = Y(function() {
69
+ for (var n = [], a = arguments.length; a--; ) n[a] = arguments[a];
70
+ return e.current.apply(e, n);
2996
71
  });
2997
- return t.current;
72
+ return r.current;
2998
73
  }
2999
- function Ie(n, e) {
74
+ function gt(t, e) {
3000
75
  e === void 0 && (e = !0);
3001
- var t = n[0] === "-", r = t && e;
3002
- n = n.replace("-", "");
3003
- var i = n.split("."), a = i[0], o = i[1] || "";
76
+ var r = t[0] === "-", n = r && e;
77
+ t = t.replace("-", "");
78
+ var a = t.split("."), o = a[0], l = a[1] || "";
3004
79
  return {
3005
- beforeDecimal: a,
3006
- afterDecimal: o,
3007
- hasNegation: t,
3008
- addNegation: r
80
+ beforeDecimal: o,
81
+ afterDecimal: l,
82
+ hasNegation: r,
83
+ addNegation: n
3009
84
  };
3010
85
  }
3011
- function Vr(n) {
3012
- if (!n)
3013
- return n;
3014
- var e = n[0] === "-";
3015
- e && (n = n.substring(1, n.length));
3016
- var t = n.split("."), r = t[0].replace(/^0+/, "") || "0", i = t[1] || "";
3017
- return (e ? "-" : "") + r + (i ? "." + i : "");
3018
- }
3019
- function vn(n, e, t) {
3020
- for (var r = "", i = t ? "0" : "", a = 0; a <= e - 1; a++)
3021
- r += n[a] || i;
3022
- return r;
3023
- }
3024
- function ze(n, e) {
3025
- return Array(e + 1).join(n);
3026
- }
3027
- function gn(n) {
3028
- var e = n + "", t = e[0] === "-" ? "-" : "";
3029
- t && (e = e.substring(1));
3030
- var r = e.split(/[eE]/g), i = r[0], a = r[1];
3031
- if (a = Number(a), !a)
3032
- return t + i;
3033
- i = i.replace(".", "");
3034
- var o = 1 + a, l = i.length;
3035
- return o < 0 ? i = "0." + ze("0", Math.abs(o)) + i : o >= l ? i = i + ze("0", o - l) : i = (i.substring(0, o) || "0") + "." + i.substring(o), t + i;
3036
- }
3037
- function Ze(n, e, t) {
3038
- if (["", "-"].indexOf(n) !== -1)
3039
- return n;
3040
- var r = (n.indexOf(".") !== -1 || t) && e, i = Ie(n), a = i.beforeDecimal, o = i.afterDecimal, l = i.hasNegation, s = parseFloat("0." + (o || "0")), f = o.length <= e ? "0." + o : s.toFixed(e), p = f.split("."), v = a;
3041
- a && Number(p[0]) && (v = a.split("").reverse().reduce(function(g, L, h) {
3042
- return g.length > h ? (Number(g[0]) + Number(L)).toString() + g.substring(1, g.length) : L + g;
3043
- }, p[0]));
3044
- var C = vn(p[1] || "", e, t), b = l ? "-" : "", m = r ? "." : "";
3045
- return "" + b + v + m + C;
86
+ function Xt(t) {
87
+ if (!t)
88
+ return t;
89
+ var e = t[0] === "-";
90
+ e && (t = t.substring(1, t.length));
91
+ var r = t.split("."), n = r[0].replace(/^0+/, "") || "0", a = r[1] || "";
92
+ return (e ? "-" : "") + n + (a ? "." + a : "");
93
+ }
94
+ function Dt(t, e, r) {
95
+ for (var n = "", a = r ? "0" : "", o = 0; o <= e - 1; o++)
96
+ n += t[o] || a;
97
+ return n;
3046
98
  }
3047
- function yt(n, e) {
3048
- if (n.value = n.value, n !== null) {
3049
- if (n.createTextRange) {
3050
- var t = n.createTextRange();
3051
- return t.move("character", e), t.select(), !0;
99
+ function ht(t, e) {
100
+ return Array(e + 1).join(t);
101
+ }
102
+ function Ct(t) {
103
+ var e = t + "", r = e[0] === "-" ? "-" : "";
104
+ r && (e = e.substring(1));
105
+ var n = e.split(/[eE]/g), a = n[0], o = n[1];
106
+ if (o = Number(o), !o)
107
+ return r + a;
108
+ a = a.replace(".", "");
109
+ var l = 1 + o, d = a.length;
110
+ return l < 0 ? a = "0." + ht("0", Math.abs(l)) + a : l >= d ? a = a + ht("0", l - d) : a = (a.substring(0, l) || "0") + "." + a.substring(l), r + a;
111
+ }
112
+ function St(t, e, r) {
113
+ if (["", "-"].indexOf(t) !== -1)
114
+ return t;
115
+ var n = (t.indexOf(".") !== -1 || r) && e, a = gt(t), o = a.beforeDecimal, l = a.afterDecimal, d = a.hasNegation, m = parseFloat("0." + (l || "0")), S = l.length <= e ? "0." + l : m.toFixed(e), x = S.split("."), p = o;
116
+ o && Number(x[0]) && (p = o.split("").reverse().reduce(function(V, C, g) {
117
+ return V.length > g ? (Number(V[0]) + Number(C)).toString() + V.substring(1, V.length) : C + V;
118
+ }, x[0]));
119
+ var y = Dt(x[1] || "", e, r), h = d ? "-" : "", s = n ? "." : "";
120
+ return "" + h + p + s + y;
121
+ }
122
+ function H(t, e) {
123
+ if (t.value = t.value, t !== null) {
124
+ if (t.createTextRange) {
125
+ var r = t.createTextRange();
126
+ return r.move("character", e), r.select(), !0;
3052
127
  }
3053
- return n.selectionStart || n.selectionStart === 0 ? (n.focus(), n.setSelectionRange(e, e), !0) : (n.focus(), !1);
128
+ return t.selectionStart || t.selectionStart === 0 ? (t.focus(), t.setSelectionRange(e, e), !0) : (t.focus(), !1);
3054
129
  }
3055
130
  }
3056
- var bn = Lr(function(n, e) {
3057
- for (var t = 0, r = 0, i = n.length, a = e.length; n[t] === e[t] && t < i; )
3058
- t++;
3059
- for (; n[i - 1 - r] === e[a - 1 - r] && a - r > t && i - r > t; )
131
+ var Ot = Zt(function(t, e) {
132
+ for (var r = 0, n = 0, a = t.length, o = e.length; t[r] === e[r] && r < a; )
3060
133
  r++;
134
+ for (; t[a - 1 - n] === e[o - 1 - n] && o - n > r && a - n > r; )
135
+ n++;
3061
136
  return {
3062
- from: { start: t, end: i - r },
3063
- to: { start: t, end: a - r }
137
+ from: { start: r, end: a - n },
138
+ to: { start: r, end: o - n }
3064
139
  };
3065
- }), Pr = function(n, e) {
3066
- var t = Math.min(n.selectionStart, e);
140
+ }), Yt = function(t, e) {
141
+ var r = Math.min(t.selectionStart, e);
3067
142
  return {
3068
- from: { start: t, end: n.selectionEnd },
3069
- to: { start: t, end: e }
143
+ from: { start: r, end: t.selectionEnd },
144
+ to: { start: r, end: e }
3070
145
  };
3071
146
  };
3072
- function Fr(n, e, t) {
3073
- return Math.min(Math.max(n, e), t);
147
+ function Qt(t, e, r) {
148
+ return Math.min(Math.max(t, e), r);
3074
149
  }
3075
- function ve(n) {
3076
- return Math.max(n.selectionStart, n.selectionEnd);
150
+ function dt(t) {
151
+ return Math.max(t.selectionStart, t.selectionEnd);
3077
152
  }
3078
- function wr() {
153
+ function te() {
3079
154
  return typeof navigator < "u" && !(navigator.platform && /iPhone|iPod/.test(navigator.platform));
3080
155
  }
3081
- function Dr(n) {
156
+ function ee(t) {
3082
157
  return {
3083
158
  from: {
3084
159
  start: 0,
@@ -3086,515 +161,524 @@ function Dr(n) {
3086
161
  },
3087
162
  to: {
3088
163
  start: 0,
3089
- end: n.length
164
+ end: t.length
3090
165
  },
3091
166
  lastValue: ""
3092
167
  };
3093
168
  }
3094
- function Hr(n) {
3095
- var e = n.currentValue, t = n.formattedValue, r = n.currentValueIndex, i = n.formattedValueIndex;
3096
- return e[r] === t[i];
3097
- }
3098
- function jr(n, e, t, r, i, a, o) {
3099
- o === void 0 && (o = Hr);
3100
- var l = i.findIndex(function(O) {
3101
- return O;
3102
- }), s = n.slice(0, l);
3103
- !e && !t.startsWith(s) && (e = s, t = s + t, r = r + s.length);
3104
- for (var f = t.length, p = n.length, v = {}, C = new Array(f), b = 0; b < f; b++) {
3105
- C[b] = -1;
3106
- for (var m = 0, g = p; m < g; m++) {
3107
- var L = o({
3108
- currentValue: t,
169
+ function re(t) {
170
+ var e = t.currentValue, r = t.formattedValue, n = t.currentValueIndex, a = t.formattedValueIndex;
171
+ return e[n] === r[a];
172
+ }
173
+ function ae(t, e, r, n, a, o, l) {
174
+ l === void 0 && (l = re);
175
+ var d = a.findIndex(function(k) {
176
+ return k;
177
+ }), m = t.slice(0, d);
178
+ !e && !r.startsWith(m) && (e = m, r = m + r, n = n + m.length);
179
+ for (var S = r.length, x = t.length, p = {}, y = new Array(S), h = 0; h < S; h++) {
180
+ y[h] = -1;
181
+ for (var s = 0, V = x; s < V; s++) {
182
+ var C = l({
183
+ currentValue: r,
3109
184
  lastValue: e,
3110
- formattedValue: n,
3111
- currentValueIndex: b,
3112
- formattedValueIndex: m
185
+ formattedValue: t,
186
+ currentValueIndex: h,
187
+ formattedValueIndex: s
3113
188
  });
3114
- if (L && v[m] !== !0) {
3115
- C[b] = m, v[m] = !0;
189
+ if (C && p[s] !== !0) {
190
+ y[h] = s, p[s] = !0;
3116
191
  break;
3117
192
  }
3118
193
  }
3119
194
  }
3120
- for (var h = r; h < f && (C[h] === -1 || !a(t[h])); )
3121
- h++;
3122
- var w = h === f || C[h] === -1 ? p : C[h];
3123
- for (h = r - 1; h > 0 && C[h] === -1; )
3124
- h--;
3125
- var $ = h === -1 || C[h] === -1 ? 0 : C[h] + 1;
3126
- return $ > w ? w : r - $ < w - r ? $ : w;
3127
- }
3128
- function Je(n, e, t, r) {
3129
- var i = n.length;
3130
- if (e = Fr(e, 0, i), r === "left") {
3131
- for (; e >= 0 && !t[e]; )
195
+ for (var g = n; g < S && (y[g] === -1 || !o(r[g])); )
196
+ g++;
197
+ var B = g === S || y[g] === -1 ? x : y[g];
198
+ for (g = n - 1; g > 0 && y[g] === -1; )
199
+ g--;
200
+ var j = g === -1 || y[g] === -1 ? 0 : y[g] + 1;
201
+ return j > B ? B : n - j < B - n ? j : B;
202
+ }
203
+ function xt(t, e, r, n) {
204
+ var a = t.length;
205
+ if (e = Qt(e, 0, a), n === "left") {
206
+ for (; e >= 0 && !r[e]; )
3132
207
  e--;
3133
- e === -1 && (e = t.indexOf(!0));
208
+ e === -1 && (e = r.indexOf(!0));
3134
209
  } else {
3135
- for (; e <= i && !t[e]; )
210
+ for (; e <= a && !r[e]; )
3136
211
  e++;
3137
- e > i && (e = t.lastIndexOf(!0));
212
+ e > a && (e = r.lastIndexOf(!0));
3138
213
  }
3139
- return e === -1 && (e = i), e;
214
+ return e === -1 && (e = a), e;
3140
215
  }
3141
- function Br(n) {
3142
- for (var e = Array.from({ length: n.length + 1 }).map(function() {
216
+ function ne(t) {
217
+ for (var e = Array.from({ length: t.length + 1 }).map(function() {
3143
218
  return !0;
3144
- }), t = 0, r = e.length; t < r; t++)
3145
- e[t] = !!(kt(n[t]) || kt(n[t - 1]));
219
+ }), r = 0, n = e.length; r < n; r++)
220
+ e[r] = !!(ot(t[r]) || ot(t[r - 1]));
3146
221
  return e;
3147
222
  }
3148
- function _n(n, e, t, r, i, a) {
3149
- a === void 0 && (a = ht);
3150
- var o = Rr(function(m, g) {
3151
- var L, h;
3152
- return hn(m) ? (h = "", L = "") : typeof m == "number" || g ? (h = typeof m == "number" ? gn(m) : m, L = r(h)) : (h = i(m, void 0), L = r(h)), { formattedValue: L, numAsString: h };
3153
- }), l = rt(function() {
3154
- return o(St(n) ? e : n, t);
3155
- }), s = l[0], f = l[1], p = function(m, g) {
3156
- m.formattedValue !== s.formattedValue && f({
3157
- formattedValue: m.formattedValue,
3158
- numAsString: m.value
3159
- }), a(m, g);
3160
- }, v = n, C = t;
3161
- St(n) && (v = s.numAsString, C = !0);
3162
- var b = o(v, C);
3163
- return vt(function() {
3164
- f(b);
3165
- }, [b.formattedValue]), [s, p];
3166
- }
3167
- function $r(n) {
3168
- return n.replace(/[^0-9]/g, "");
3169
- }
3170
- function kr(n) {
3171
- return n;
223
+ function At(t, e, r, n, a, o) {
224
+ o === void 0 && (o = q);
225
+ var l = Jt(function(s, V) {
226
+ var C, g;
227
+ return wt(s) ? (g = "", C = "") : typeof s == "number" || V ? (g = typeof s == "number" ? Ct(s) : s, C = n(g)) : (g = a(s, void 0), C = n(g)), { formattedValue: C, numAsString: g };
228
+ }), d = bt(function() {
229
+ return l(Q(t) ? e : t, r);
230
+ }), m = d[0], S = d[1], x = function(s, V) {
231
+ s.formattedValue !== m.formattedValue && S({
232
+ formattedValue: s.formattedValue,
233
+ numAsString: s.value
234
+ }), o(s, V);
235
+ }, p = t, y = r;
236
+ Q(t) && (p = m.numAsString, y = !0);
237
+ var h = l(p, y);
238
+ return tt(function() {
239
+ S(h);
240
+ }, [h.formattedValue]), [m, x];
241
+ }
242
+ function oe(t) {
243
+ return t.replace(/[^0-9]/g, "");
244
+ }
245
+ function ue(t) {
246
+ return t;
3172
247
  }
3173
- function Mr(n) {
3174
- var e = n.type;
248
+ function ie(t) {
249
+ var e = t.type;
3175
250
  e === void 0 && (e = "text");
3176
- var t = n.displayType;
3177
- t === void 0 && (t = "input");
3178
- var r = n.customInput, i = n.renderText, a = n.getInputRef, o = n.format;
3179
- o === void 0 && (o = kr);
3180
- var l = n.removeFormatting;
3181
- l === void 0 && (l = $r);
3182
- var s = n.defaultValue, f = n.valueIsNumericString, p = n.onValueChange, v = n.isAllowed, C = n.onChange;
3183
- C === void 0 && (C = ht);
3184
- var b = n.onKeyDown;
3185
- b === void 0 && (b = ht);
3186
- var m = n.onMouseUp;
3187
- m === void 0 && (m = ht);
3188
- var g = n.onFocus;
3189
- g === void 0 && (g = ht);
3190
- var L = n.onBlur;
3191
- L === void 0 && (L = ht);
3192
- var h = n.value, w = n.getCaretBoundary;
3193
- w === void 0 && (w = Br);
3194
- var $ = n.isValidInputCharacter;
3195
- $ === void 0 && ($ = kt);
3196
- var O = n.isCharacterSame, U = pn(n, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), J = _n(h, s, !!f, o, l, p), q = J[0], S = q.formattedValue, T = q.numAsString, D = J[1], M = F(), z = F({ formattedValue: S, numAsString: T }), it = function(c, d) {
3197
- z.current = { formattedValue: c.formattedValue, numAsString: c.value }, D(c, d);
3198
- }, ut = rt(!1), gt = ut[0], x = ut[1], _ = F(null), V = F({
251
+ var r = t.displayType;
252
+ r === void 0 && (r = "input");
253
+ var n = t.customInput, a = t.renderText, o = t.getInputRef, l = t.format;
254
+ l === void 0 && (l = ue);
255
+ var d = t.removeFormatting;
256
+ d === void 0 && (d = oe);
257
+ var m = t.defaultValue, S = t.valueIsNumericString, x = t.onValueChange, p = t.isAllowed, y = t.onChange;
258
+ y === void 0 && (y = q);
259
+ var h = t.onKeyDown;
260
+ h === void 0 && (h = q);
261
+ var s = t.onMouseUp;
262
+ s === void 0 && (s = q);
263
+ var V = t.onFocus;
264
+ V === void 0 && (V = q);
265
+ var C = t.onBlur;
266
+ C === void 0 && (C = q);
267
+ var g = t.value, B = t.getCaretBoundary;
268
+ B === void 0 && (B = ne);
269
+ var j = t.isValidInputCharacter;
270
+ j === void 0 && (j = ot);
271
+ var k = t.isCharacterSame, M = Nt(t, ["type", "displayType", "customInput", "renderText", "getInputRef", "format", "removeFormatting", "defaultValue", "valueIsNumericString", "onValueChange", "isAllowed", "onChange", "onKeyDown", "onMouseUp", "onFocus", "onBlur", "value", "getCaretBoundary", "isValidInputCharacter", "isCharacterSame"]), Z = At(g, m, !!S, l, d, x), W = Z[0], N = W.formattedValue, P = W.numAsString, G = Z[1], R = Y(), _ = Y({ formattedValue: N, numAsString: P }), K = function(u, i) {
272
+ _.current = { formattedValue: u.formattedValue, numAsString: u.value }, G(u, i);
273
+ }, z = bt(!1), et = z[0], v = z[1], c = Y(null), w = Y({
3199
274
  setCaretTimeout: null,
3200
275
  focusTimeout: null
3201
276
  });
3202
- B(function() {
3203
- return x(!0), function() {
3204
- clearTimeout(V.current.setCaretTimeout), clearTimeout(V.current.focusTimeout);
277
+ vt(function() {
278
+ return v(!0), function() {
279
+ clearTimeout(w.current.setCaretTimeout), clearTimeout(w.current.focusTimeout);
3205
280
  };
3206
281
  }, []);
3207
- var N = o, R = function(c, d) {
3208
- var y = parseFloat(d);
282
+ var A = l, I = function(u, i) {
283
+ var f = parseFloat(i);
3209
284
  return {
3210
- formattedValue: c,
3211
- value: d,
3212
- floatValue: isNaN(y) ? void 0 : y
285
+ formattedValue: u,
286
+ value: i,
287
+ floatValue: isNaN(f) ? void 0 : f
3213
288
  };
3214
- }, H = function(c, d, y) {
3215
- c.selectionStart === 0 && c.selectionEnd === c.value.length || (yt(c, d), V.current.setCaretTimeout = setTimeout(function() {
3216
- c.value === y && c.selectionStart !== d && yt(c, d);
289
+ }, O = function(u, i, f) {
290
+ u.selectionStart === 0 && u.selectionEnd === u.value.length || (H(u, i), w.current.setCaretTimeout = setTimeout(function() {
291
+ u.value === f && u.selectionStart !== i && H(u, i);
3217
292
  }, 0));
3218
- }, j = function(c, d, y) {
3219
- return Je(c, d, w(c), y);
3220
- }, st = function(c, d, y) {
3221
- var P = w(d), G = jr(d, S, c, y, P, $, O);
3222
- return G = Je(d, G, P), G;
3223
- }, dt = function(c) {
3224
- var d = c.formattedValue;
3225
- d === void 0 && (d = "");
3226
- var y = c.input, P = c.source, G = c.event, A = c.numAsString, E;
3227
- if (y) {
3228
- var Z = c.inputValue || y.value, tt = ve(y);
3229
- y.value = d, E = st(Z, d, tt), E !== void 0 && H(y, E, d);
293
+ }, E = function(u, i, f) {
294
+ return xt(u, i, B(u), f);
295
+ }, J = function(u, i, f) {
296
+ var T = B(i), F = ae(i, N, u, f, T, j, k);
297
+ return F = xt(i, F, T), F;
298
+ }, lt = function(u) {
299
+ var i = u.formattedValue;
300
+ i === void 0 && (i = "");
301
+ var f = u.input, T = u.source, F = u.event, D = u.numAsString, b;
302
+ if (f) {
303
+ var L = u.inputValue || f.value, $ = dt(f);
304
+ f.value = i, b = J(L, i, $), b !== void 0 && O(f, b, i);
3230
305
  }
3231
- d !== S && it(R(d, A), { event: G, source: P });
306
+ i !== N && K(I(i, D), { event: F, source: T });
3232
307
  };
3233
- B(function() {
3234
- var c = z.current, d = c.formattedValue, y = c.numAsString;
3235
- (S !== d || T !== y) && it(R(S, T), {
308
+ vt(function() {
309
+ var u = _.current, i = u.formattedValue, f = u.numAsString;
310
+ (N !== i || P !== f) && K(I(N, P), {
3236
311
  event: void 0,
3237
- source: $t.props
312
+ source: nt.props
3238
313
  });
3239
- }, [S, T]);
3240
- var X = _.current ? ve(_.current) : void 0, ft = typeof window < "u" ? Fn : B;
3241
- ft(function() {
3242
- var c = _.current;
3243
- if (S !== z.current.formattedValue && c) {
3244
- var d = st(z.current.formattedValue, S, X);
3245
- c.value = S, H(c, d, S);
314
+ }, [N, P]);
315
+ var rt = c.current ? dt(c.current) : void 0, ut = typeof window < "u" ? kt : vt;
316
+ ut(function() {
317
+ var u = c.current;
318
+ if (N !== _.current.formattedValue && u) {
319
+ var i = J(_.current.formattedValue, N, rt);
320
+ u.value = N, O(u, i, N);
3246
321
  }
3247
- }, [S]);
3248
- var Rt = function(c, d, y) {
3249
- var P = d.target, G = M.current ? Pr(M.current, P.selectionEnd) : bn(S, c), A = Object.assign(Object.assign({}, G), { lastValue: S }), E = l(c, A), Z = N(E);
3250
- if (E = l(Z, void 0), v && !v(R(Z, E))) {
3251
- var tt = d.target, Q = ve(tt), pt = st(c, S, Q);
3252
- return tt.value = S, H(tt, pt, S), !1;
322
+ }, [N]);
323
+ var st = function(u, i, f) {
324
+ var T = i.target, F = R.current ? Yt(R.current, T.selectionEnd) : Ot(N, u), D = Object.assign(Object.assign({}, F), { lastValue: N }), b = d(u, D), L = A(b);
325
+ if (b = d(L, void 0), p && !p(I(L, b))) {
326
+ var $ = i.target, U = dt($), ft = J(u, N, U);
327
+ return $.value = N, O($, ft, N), !1;
3253
328
  }
3254
- return dt({
3255
- formattedValue: Z,
3256
- numAsString: E,
3257
- inputValue: c,
3258
- event: d,
3259
- source: y,
3260
- input: d.target
329
+ return lt({
330
+ formattedValue: L,
331
+ numAsString: b,
332
+ inputValue: u,
333
+ event: i,
334
+ source: f,
335
+ input: i.target
3261
336
  }), !0;
3262
- }, Vt = function(c, d) {
3263
- d === void 0 && (d = 0);
3264
- var y = c.selectionStart, P = c.selectionEnd;
3265
- M.current = { selectionStart: y, selectionEnd: P + d };
3266
- }, Ut = function(c) {
3267
- var d = c.target, y = d.value, P = Rt(y, c, $t.event);
3268
- P && C(c), M.current = void 0;
3269
- }, Tt = function(c) {
3270
- var d = c.target, y = c.key, P = d.selectionStart, G = d.selectionEnd, A = d.value;
3271
- A === void 0 && (A = "");
3272
- var E;
3273
- y === "ArrowLeft" || y === "Backspace" ? E = Math.max(P - 1, 0) : y === "ArrowRight" ? E = Math.min(P + 1, A.length) : y === "Delete" && (E = P);
3274
- var Z = 0;
3275
- y === "Delete" && P === G && (Z = 1);
3276
- var tt = y === "ArrowLeft" || y === "ArrowRight";
3277
- if (E === void 0 || P !== G && !tt) {
3278
- b(c), Vt(d, Z);
337
+ }, ct = function(u, i) {
338
+ i === void 0 && (i = 0);
339
+ var f = u.selectionStart, T = u.selectionEnd;
340
+ R.current = { selectionStart: f, selectionEnd: T + i };
341
+ }, It = function(u) {
342
+ var i = u.target, f = i.value, T = st(f, u, nt.event);
343
+ T && y(u), R.current = void 0;
344
+ }, Et = function(u) {
345
+ var i = u.target, f = u.key, T = i.selectionStart, F = i.selectionEnd, D = i.value;
346
+ D === void 0 && (D = "");
347
+ var b;
348
+ f === "ArrowLeft" || f === "Backspace" ? b = Math.max(T - 1, 0) : f === "ArrowRight" ? b = Math.min(T + 1, D.length) : f === "Delete" && (b = T);
349
+ var L = 0;
350
+ f === "Delete" && T === F && (L = 1);
351
+ var $ = f === "ArrowLeft" || f === "ArrowRight";
352
+ if (b === void 0 || T !== F && !$) {
353
+ h(u), ct(i, L);
3279
354
  return;
3280
355
  }
3281
- var Q = E;
3282
- if (tt) {
3283
- var pt = y === "ArrowLeft" ? "left" : "right";
3284
- Q = j(A, E, pt), Q !== E && c.preventDefault();
3285
- } else y === "Delete" && !$(A[E]) ? Q = j(A, E, "right") : y === "Backspace" && !$(A[E]) && (Q = j(A, E, "left"));
3286
- Q !== E && H(d, Q, A), b(c), Vt(d, Z);
3287
- }, Pt = function(c) {
3288
- var d = c.target, y = function() {
3289
- var P = d.selectionStart, G = d.selectionEnd, A = d.value;
3290
- if (A === void 0 && (A = ""), P === G) {
3291
- var E = j(A, P);
3292
- E !== P && H(d, E, A);
356
+ var U = b;
357
+ if ($) {
358
+ var ft = f === "ArrowLeft" ? "left" : "right";
359
+ U = E(D, b, ft), U !== b && u.preventDefault();
360
+ } else f === "Delete" && !j(D[b]) ? U = E(D, b, "right") : f === "Backspace" && !j(D[b]) && (U = E(D, b, "left"));
361
+ U !== b && O(i, U, D), h(u), ct(i, L);
362
+ }, Bt = function(u) {
363
+ var i = u.target, f = function() {
364
+ var T = i.selectionStart, F = i.selectionEnd, D = i.value;
365
+ if (D === void 0 && (D = ""), T === F) {
366
+ var b = E(D, T);
367
+ b !== T && O(i, b, D);
3293
368
  }
3294
369
  };
3295
- y(), requestAnimationFrame(function() {
3296
- y();
3297
- }), m(c), Vt(d);
3298
- }, Ft = function(c) {
3299
- c.persist && c.persist();
3300
- var d = c.target, y = c.currentTarget;
3301
- _.current = d, V.current.focusTimeout = setTimeout(function() {
3302
- var P = d.selectionStart, G = d.selectionEnd, A = d.value;
3303
- A === void 0 && (A = "");
3304
- var E = j(A, P);
3305
- E !== P && !(P === 0 && G === A.length) && H(d, E, A), g(Object.assign(Object.assign({}, c), { currentTarget: y }));
370
+ f(), requestAnimationFrame(function() {
371
+ f();
372
+ }), s(u), ct(i);
373
+ }, jt = function(u) {
374
+ u.persist && u.persist();
375
+ var i = u.target, f = u.currentTarget;
376
+ c.current = i, w.current.focusTimeout = setTimeout(function() {
377
+ var T = i.selectionStart, F = i.selectionEnd, D = i.value;
378
+ D === void 0 && (D = "");
379
+ var b = E(D, T);
380
+ b !== T && !(T === 0 && F === D.length) && O(i, b, D), V(Object.assign(Object.assign({}, u), { currentTarget: f }));
3306
381
  }, 0);
3307
- }, Wt = function(c) {
3308
- _.current = null, clearTimeout(V.current.focusTimeout), clearTimeout(V.current.setCaretTimeout), L(c);
3309
- }, te = gt && wr() ? "numeric" : void 0, Ct = Object.assign({ inputMode: te }, U, {
382
+ }, Ft = function(u) {
383
+ c.current = null, clearTimeout(w.current.focusTimeout), clearTimeout(w.current.setCaretTimeout), C(u);
384
+ }, Mt = et && te() ? "numeric" : void 0, pt = Object.assign({ inputMode: Mt }, M, {
3310
385
  type: e,
3311
- value: S,
3312
- onChange: Ut,
3313
- onKeyDown: Tt,
3314
- onMouseUp: Pt,
3315
- onFocus: Ft,
3316
- onBlur: Wt
386
+ value: N,
387
+ onChange: It,
388
+ onKeyDown: Et,
389
+ onMouseUp: Bt,
390
+ onFocus: jt,
391
+ onBlur: Ft
3317
392
  });
3318
- if (t === "text")
3319
- return i ? I.createElement(I.Fragment, null, i(S, U) || null) : I.createElement("span", Object.assign({}, U, { ref: a }), S);
3320
- if (r) {
3321
- var ee = r;
3322
- return I.createElement(ee, Object.assign({}, Ct, { ref: a }));
393
+ if (r === "text")
394
+ return a ? X.createElement(X.Fragment, null, a(N, M) || null) : X.createElement("span", Object.assign({}, M, { ref: o }), N);
395
+ if (n) {
396
+ var Pt = n;
397
+ return X.createElement(Pt, Object.assign({}, pt, { ref: o }));
3323
398
  }
3324
- return I.createElement("input", Object.assign({}, Ct, { ref: a }));
399
+ return X.createElement("input", Object.assign({}, pt, { ref: o }));
3325
400
  }
3326
- function Qe(n, e) {
3327
- var t = e.decimalScale, r = e.fixedDecimalScale, i = e.prefix;
3328
- i === void 0 && (i = "");
3329
- var a = e.suffix;
401
+ function yt(t, e) {
402
+ var r = e.decimalScale, n = e.fixedDecimalScale, a = e.prefix;
3330
403
  a === void 0 && (a = "");
3331
- var o = e.allowNegative, l = e.thousandsGroupStyle;
3332
- if (l === void 0 && (l = "thousand"), n === "" || n === "-")
3333
- return n;
3334
- var s = Yt(e), f = s.thousandSeparator, p = s.decimalSeparator, v = t !== 0 && n.indexOf(".") !== -1 || t && r, C = Ie(n, o), b = C.beforeDecimal, m = C.afterDecimal, g = C.addNegation;
3335
- return t !== void 0 && (m = vn(m, t, !!r)), f && (b = Sr(b, f, l)), i && (b = i + b), a && (m = m + a), g && (b = "-" + b), n = b + (v && p || "") + m, n;
3336
- }
3337
- function Yt(n) {
3338
- var e = n.decimalSeparator;
404
+ var o = e.suffix;
405
+ o === void 0 && (o = "");
406
+ var l = e.allowNegative, d = e.thousandsGroupStyle;
407
+ if (d === void 0 && (d = "thousand"), t === "" || t === "-")
408
+ return t;
409
+ var m = it(e), S = m.thousandSeparator, x = m.decimalSeparator, p = r !== 0 && t.indexOf(".") !== -1 || r && n, y = gt(t, l), h = y.beforeDecimal, s = y.afterDecimal, V = y.addNegation;
410
+ return r !== void 0 && (s = Dt(s, r, !!n)), S && (h = zt(h, S, d)), a && (h = a + h), o && (s = s + o), V && (h = "-" + h), t = h + (p && x || "") + s, t;
411
+ }
412
+ function it(t) {
413
+ var e = t.decimalSeparator;
3339
414
  e === void 0 && (e = ".");
3340
- var t = n.thousandSeparator, r = n.allowedDecimalSeparators;
3341
- return t === !0 && (t = ","), r || (r = [e, "."]), {
415
+ var r = t.thousandSeparator, n = t.allowedDecimalSeparators;
416
+ return r === !0 && (r = ","), n || (n = [e, "."]), {
3342
417
  decimalSeparator: e,
3343
- thousandSeparator: t,
3344
- allowedDecimalSeparators: r
418
+ thousandSeparator: r,
419
+ allowedDecimalSeparators: n
3345
420
  };
3346
421
  }
3347
- function Ur(n, e) {
3348
- n === void 0 && (n = "");
3349
- var t = new RegExp("(-)"), r = new RegExp("(-)(.)*(-)"), i = t.test(n), a = r.test(n);
3350
- return n = n.replace(/-/g, ""), i && !a && e && (n = "-" + n), n;
422
+ function le(t, e) {
423
+ t === void 0 && (t = "");
424
+ var r = new RegExp("(-)"), n = new RegExp("(-)(.)*(-)"), a = r.test(t), o = n.test(t);
425
+ return t = t.replace(/-/g, ""), a && !o && e && (t = "-" + t), t;
3351
426
  }
3352
- function Wr(n, e) {
3353
- return new RegExp("(^-)|[0-9]|" + mn(n), "g");
427
+ function se(t, e) {
428
+ return new RegExp("(^-)|[0-9]|" + Tt(t), "g");
3354
429
  }
3355
- function qr(n, e, t) {
3356
- return n === "" ? !0 : !(e != null && e.match(/\d/)) && !(t != null && t.match(/\d/)) && typeof n == "string" && !isNaN(Number(n));
430
+ function ce(t, e, r) {
431
+ return t === "" ? !0 : !(e != null && e.match(/\d/)) && !(r != null && r.match(/\d/)) && typeof t == "string" && !isNaN(Number(t));
3357
432
  }
3358
- function Gr(n, e, t) {
3359
- var r;
3360
- e === void 0 && (e = Dr(n));
3361
- var i = t.allowNegative, a = t.prefix;
3362
- a === void 0 && (a = "");
3363
- var o = t.suffix;
433
+ function fe(t, e, r) {
434
+ var n;
435
+ e === void 0 && (e = ee(t));
436
+ var a = r.allowNegative, o = r.prefix;
3364
437
  o === void 0 && (o = "");
3365
- var l = t.decimalScale, s = e.from, f = e.to, p = f.start, v = f.end, C = Yt(t), b = C.allowedDecimalSeparators, m = C.decimalSeparator, g = n[v] === m;
3366
- if (kt(n) && (n === a || n === o) && e.lastValue === "")
3367
- return n;
3368
- if (v - p === 1 && b.indexOf(n[p]) !== -1) {
3369
- var L = l === 0 ? "" : m;
3370
- n = n.substring(0, p) + L + n.substring(p + 1, n.length);
438
+ var l = r.suffix;
439
+ l === void 0 && (l = "");
440
+ var d = r.decimalScale, m = e.from, S = e.to, x = S.start, p = S.end, y = it(r), h = y.allowedDecimalSeparators, s = y.decimalSeparator, V = t[p] === s;
441
+ if (ot(t) && (t === o || t === l) && e.lastValue === "")
442
+ return t;
443
+ if (p - x === 1 && h.indexOf(t[x]) !== -1) {
444
+ var C = d === 0 ? "" : s;
445
+ t = t.substring(0, x) + C + t.substring(x + 1, t.length);
3371
446
  }
3372
- var h = function(_, V, N) {
3373
- var R = !1, H = !1;
3374
- a.startsWith("-") ? R = !1 : _.startsWith("--") ? (R = !1, H = !0) : o.startsWith("-") && _.length === o.length ? R = !1 : _[0] === "-" && (R = !0);
3375
- var j = R ? 1 : 0;
3376
- return H && (j = 2), j && (_ = _.substring(j), V -= j, N -= j), { value: _, start: V, end: N, hasNegation: R };
3377
- }, w = h(n, p, v), $ = w.hasNegation;
3378
- r = w, n = r.value, p = r.start, v = r.end;
3379
- var O = h(e.lastValue, s.start, s.end), U = O.start, J = O.end, q = O.value, S = n.substring(p, v);
3380
- n.length && q.length && (U > q.length - o.length || J < a.length) && !(S && o.startsWith(S)) && (n = q);
3381
- var T = 0;
3382
- n.startsWith(a) ? T += a.length : p < a.length && (T = p), n = n.substring(T), v -= T;
3383
- var D = n.length, M = n.length - o.length;
3384
- n.endsWith(o) ? D = M : (v > M || v > n.length - o.length) && (D = v), n = n.substring(0, D), n = Ur($ ? "-" + n : n, i), n = (n.match(Wr(m)) || []).join("");
3385
- var z = n.indexOf(m);
3386
- n = n.replace(new RegExp(mn(m), "g"), function(_, V) {
3387
- return V === z ? "." : "";
447
+ var g = function(c, w, A) {
448
+ var I = !1, O = !1;
449
+ o.startsWith("-") ? I = !1 : c.startsWith("--") ? (I = !1, O = !0) : l.startsWith("-") && c.length === l.length ? I = !1 : c[0] === "-" && (I = !0);
450
+ var E = I ? 1 : 0;
451
+ return O && (E = 2), E && (c = c.substring(E), w -= E, A -= E), { value: c, start: w, end: A, hasNegation: I };
452
+ }, B = g(t, x, p), j = B.hasNegation;
453
+ n = B, t = n.value, x = n.start, p = n.end;
454
+ var k = g(e.lastValue, m.start, m.end), M = k.start, Z = k.end, W = k.value, N = t.substring(x, p);
455
+ t.length && W.length && (M > W.length - l.length || Z < o.length) && !(N && l.startsWith(N)) && (t = W);
456
+ var P = 0;
457
+ t.startsWith(o) ? P += o.length : x < o.length && (P = x), t = t.substring(P), p -= P;
458
+ var G = t.length, R = t.length - l.length;
459
+ t.endsWith(l) ? G = R : (p > R || p > t.length - l.length) && (G = p), t = t.substring(0, G), t = le(j ? "-" + t : t, a), t = (t.match(se(s)) || []).join("");
460
+ var _ = t.indexOf(s);
461
+ t = t.replace(new RegExp(Tt(s), "g"), function(c, w) {
462
+ return w === _ ? "." : "";
3388
463
  });
3389
- var it = Ie(n, i), ut = it.beforeDecimal, gt = it.afterDecimal, x = it.addNegation;
3390
- return f.end - f.start < s.end - s.start && ut === "" && g && !parseFloat(gt) && (n = x ? "-" : ""), n;
464
+ var K = gt(t, a), z = K.beforeDecimal, et = K.afterDecimal, v = K.addNegation;
465
+ return S.end - S.start < m.end - m.start && z === "" && V && !parseFloat(et) && (t = v ? "-" : ""), t;
3391
466
  }
3392
- function Xr(n, e) {
3393
- var t = e.prefix;
3394
- t === void 0 && (t = "");
3395
- var r = e.suffix;
467
+ function ve(t, e) {
468
+ var r = e.prefix;
3396
469
  r === void 0 && (r = "");
3397
- var i = Array.from({ length: n.length + 1 }).map(function() {
470
+ var n = e.suffix;
471
+ n === void 0 && (n = "");
472
+ var a = Array.from({ length: t.length + 1 }).map(function() {
3398
473
  return !0;
3399
- }), a = n[0] === "-";
3400
- i.fill(!1, 0, t.length + (a ? 1 : 0));
3401
- var o = n.length;
3402
- return i.fill(!1, o - r.length + 1, o + 1), i;
474
+ }), o = t[0] === "-";
475
+ a.fill(!1, 0, r.length + (o ? 1 : 0));
476
+ var l = t.length;
477
+ return a.fill(!1, l - n.length + 1, l + 1), a;
3403
478
  }
3404
- function Kr(n) {
3405
- var e = Yt(n), t = e.thousandSeparator, r = e.decimalSeparator, i = n.prefix;
3406
- i === void 0 && (i = "");
3407
- var a = n.allowNegative;
3408
- if (a === void 0 && (a = !0), t === r)
479
+ function de(t) {
480
+ var e = it(t), r = e.thousandSeparator, n = e.decimalSeparator, a = t.prefix;
481
+ a === void 0 && (a = "");
482
+ var o = t.allowNegative;
483
+ if (o === void 0 && (o = !0), r === n)
3409
484
  throw new Error(`
3410
485
  Decimal separator can't be same as thousand separator.
3411
- thousandSeparator: ` + t + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
3412
- decimalSeparator: ` + r + ` (default value for decimalSeparator is .)
486
+ thousandSeparator: ` + r + ` (thousandSeparator = {true} is same as thousandSeparator = ",")
487
+ decimalSeparator: ` + n + ` (default value for decimalSeparator is .)
3413
488
  `);
3414
- return i.startsWith("-") && a && (console.error(`
489
+ return a.startsWith("-") && o && (console.error(`
3415
490
  Prefix can't start with '-' when allowNegative is true.
3416
- prefix: ` + i + `
3417
- allowNegative: ` + a + `
3418
- `), a = !1), Object.assign(Object.assign({}, n), { allowNegative: a });
3419
- }
3420
- function zr(n) {
3421
- n = Kr(n), n.decimalSeparator, n.allowedDecimalSeparators, n.thousandsGroupStyle;
3422
- var e = n.suffix, t = n.allowNegative, r = n.allowLeadingZeros, i = n.onKeyDown;
3423
- i === void 0 && (i = ht);
3424
- var a = n.onBlur;
3425
- a === void 0 && (a = ht);
3426
- var o = n.thousandSeparator, l = n.decimalScale, s = n.fixedDecimalScale, f = n.prefix;
3427
- f === void 0 && (f = "");
3428
- var p = n.defaultValue, v = n.value, C = n.valueIsNumericString, b = n.onValueChange, m = pn(n, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), g = Yt(n), L = g.decimalSeparator, h = g.allowedDecimalSeparators, w = function(x) {
3429
- return Qe(x, n);
3430
- }, $ = function(x, _) {
3431
- return Gr(x, _, n);
3432
- }, O = St(v) ? p : v, U = C ?? qr(O, f, e);
3433
- St(v) ? St(p) || (U = U || typeof p == "number") : U = U || typeof v == "number";
3434
- var J = function(x) {
3435
- return hn(x) ? x : (typeof x == "number" && (x = gn(x)), U && typeof l == "number" ? Ze(x, l, !!s) : x);
3436
- }, q = _n(J(v), J(p), !!U, w, $, b), S = q[0], T = S.numAsString, D = S.formattedValue, M = q[1], z = function(x) {
3437
- var _ = x.target, V = x.key, N = _.selectionStart, R = _.selectionEnd, H = _.value;
3438
- if (H === void 0 && (H = ""), (V === "Backspace" || V === "Delete") && R < f.length) {
3439
- x.preventDefault();
491
+ prefix: ` + a + `
492
+ allowNegative: ` + o + `
493
+ `), o = !1), Object.assign(Object.assign({}, t), { allowNegative: o });
494
+ }
495
+ function me(t) {
496
+ t = de(t), t.decimalSeparator, t.allowedDecimalSeparators, t.thousandsGroupStyle;
497
+ var e = t.suffix, r = t.allowNegative, n = t.allowLeadingZeros, a = t.onKeyDown;
498
+ a === void 0 && (a = q);
499
+ var o = t.onBlur;
500
+ o === void 0 && (o = q);
501
+ var l = t.thousandSeparator, d = t.decimalScale, m = t.fixedDecimalScale, S = t.prefix;
502
+ S === void 0 && (S = "");
503
+ var x = t.defaultValue, p = t.value, y = t.valueIsNumericString, h = t.onValueChange, s = Nt(t, ["decimalSeparator", "allowedDecimalSeparators", "thousandsGroupStyle", "suffix", "allowNegative", "allowLeadingZeros", "onKeyDown", "onBlur", "thousandSeparator", "decimalScale", "fixedDecimalScale", "prefix", "defaultValue", "value", "valueIsNumericString", "onValueChange"]), V = it(t), C = V.decimalSeparator, g = V.allowedDecimalSeparators, B = function(v) {
504
+ return yt(v, t);
505
+ }, j = function(v, c) {
506
+ return fe(v, c, t);
507
+ }, k = Q(p) ? x : p, M = y ?? ce(k, S, e);
508
+ Q(p) ? Q(x) || (M = M || typeof x == "number") : M = M || typeof p == "number";
509
+ var Z = function(v) {
510
+ return wt(v) ? v : (typeof v == "number" && (v = Ct(v)), M && typeof d == "number" ? St(v, d, !!m) : v);
511
+ }, W = At(Z(p), Z(x), !!M, B, j, h), N = W[0], P = N.numAsString, G = N.formattedValue, R = W[1], _ = function(v) {
512
+ var c = v.target, w = v.key, A = c.selectionStart, I = c.selectionEnd, O = c.value;
513
+ if (O === void 0 && (O = ""), (w === "Backspace" || w === "Delete") && I < S.length) {
514
+ v.preventDefault();
3440
515
  return;
3441
516
  }
3442
- if (N !== R) {
3443
- i(x);
517
+ if (A !== I) {
518
+ a(v);
3444
519
  return;
3445
520
  }
3446
- V === "Backspace" && H[0] === "-" && N === f.length + 1 && t && yt(_, 1), l && s && (V === "Backspace" && H[N - 1] === L ? (yt(_, N - 1), x.preventDefault()) : V === "Delete" && H[N] === L && x.preventDefault()), h != null && h.includes(V) && H[N] === L && yt(_, N + 1);
3447
- var j = o === !0 ? "," : o;
3448
- V === "Backspace" && H[N - 1] === j && yt(_, N - 1), V === "Delete" && H[N] === j && yt(_, N + 1), i(x);
3449
- }, it = function(x) {
3450
- var _ = T;
3451
- if (_.match(/\d/g) || (_ = ""), r || (_ = Vr(_)), s && l && (_ = Ze(_, l, s)), _ !== T) {
3452
- var V = Qe(_, n);
3453
- M({
3454
- formattedValue: V,
3455
- value: _,
3456
- floatValue: parseFloat(_)
521
+ w === "Backspace" && O[0] === "-" && A === S.length + 1 && r && H(c, 1), d && m && (w === "Backspace" && O[A - 1] === C ? (H(c, A - 1), v.preventDefault()) : w === "Delete" && O[A] === C && v.preventDefault()), g != null && g.includes(w) && O[A] === C && H(c, A + 1);
522
+ var E = l === !0 ? "," : l;
523
+ w === "Backspace" && O[A - 1] === E && H(c, A - 1), w === "Delete" && O[A] === E && H(c, A + 1), a(v);
524
+ }, K = function(v) {
525
+ var c = P;
526
+ if (c.match(/\d/g) || (c = ""), n || (c = Xt(c)), m && d && (c = St(c, d, m)), c !== P) {
527
+ var w = yt(c, t);
528
+ R({
529
+ formattedValue: w,
530
+ value: c,
531
+ floatValue: parseFloat(c)
3457
532
  }, {
3458
- event: x,
3459
- source: $t.event
533
+ event: v,
534
+ source: nt.event
3460
535
  });
3461
536
  }
3462
- a(x);
3463
- }, ut = function(x) {
3464
- return x === L ? !0 : kt(x);
3465
- }, gt = function(x) {
3466
- var _ = x.currentValue, V = x.lastValue, N = x.formattedValue, R = x.currentValueIndex, H = x.formattedValueIndex, j = _[R], st = N[H], dt = bn(V, _), X = dt.to, ft = function(Rt) {
3467
- return $(Rt).indexOf(".") + f.length;
537
+ o(v);
538
+ }, z = function(v) {
539
+ return v === C ? !0 : ot(v);
540
+ }, et = function(v) {
541
+ var c = v.currentValue, w = v.lastValue, A = v.formattedValue, I = v.currentValueIndex, O = v.formattedValueIndex, E = c[I], J = A[O], lt = Ot(w, c), rt = lt.to, ut = function(st) {
542
+ return j(st).indexOf(".") + S.length;
3468
543
  };
3469
- return v === 0 && s && l && _[X.start] === L && ft(_) < R && ft(N) > H ? !1 : R >= X.start && R < X.end && h && h.includes(j) && st === L ? !0 : j === st;
544
+ return p === 0 && m && d && c[rt.start] === C && ut(c) < I && ut(A) > O ? !1 : I >= rt.start && I < rt.end && g && g.includes(E) && J === C ? !0 : E === J;
3470
545
  };
3471
- return Object.assign(Object.assign({}, m), {
3472
- value: D,
546
+ return Object.assign(Object.assign({}, s), {
547
+ value: G,
3473
548
  valueIsNumericString: !1,
3474
- isValidInputCharacter: ut,
3475
- isCharacterSame: gt,
3476
- onValueChange: M,
3477
- format: w,
3478
- removeFormatting: $,
3479
- getCaretBoundary: function(x) {
3480
- return Xr(x, n);
549
+ isValidInputCharacter: z,
550
+ isCharacterSame: et,
551
+ onValueChange: R,
552
+ format: B,
553
+ removeFormatting: j,
554
+ getCaretBoundary: function(v) {
555
+ return ve(v, t);
3481
556
  },
3482
- onKeyDown: z,
3483
- onBlur: it
557
+ onKeyDown: _,
558
+ onBlur: K
3484
559
  });
3485
560
  }
3486
- function Zr(n) {
3487
- var e = zr(n);
3488
- return I.createElement(Mr, Object.assign({}, e));
561
+ function ge(t) {
562
+ var e = me(t);
563
+ return X.createElement(ie, Object.assign({}, e));
3489
564
  }
3490
- function Jr(n) {
3491
- return vt(() => {
3492
- var t;
3493
- return ((t = Intl.NumberFormat(n).formatToParts(1234.45).find((r) => r.type === "decimal")) == null ? void 0 : t.value) || ".";
3494
- }, [n]);
565
+ function pe(t) {
566
+ return tt(() => {
567
+ var r;
568
+ return ((r = Intl.NumberFormat(t).formatToParts(1234.45).find((n) => n.type === "decimal")) == null ? void 0 : r.value) || ".";
569
+ }, [t]);
3495
570
  }
3496
- function Qr(n) {
3497
- return vt(() => {
3498
- var t;
3499
- return ((t = Intl.NumberFormat(n).formatToParts(1234.45).find((r) => r.type === "group")) == null ? void 0 : t.value) || ",";
3500
- }, [n]);
571
+ function he(t) {
572
+ return tt(() => {
573
+ var r;
574
+ return ((r = Intl.NumberFormat(t).formatToParts(1234.45).find((n) => n.type === "group")) == null ? void 0 : r.value) || ",";
575
+ }, [t]);
3501
576
  }
3502
- const Yr = "_invalid_1dsbr_1", ti = {
3503
- invalid: Yr
3504
- }, ei = ({ ...n }) => {
577
+ const Se = ({
578
+ propertyName: t,
579
+ requiredText: e,
580
+ maxLength: r,
581
+ helperText: n = null,
582
+ hasCharacterCount: a = !1
583
+ }) => {
584
+ const {
585
+ formState: { errors: o }
586
+ } = mt(), l = Vt(o, t), d = tt(() => l ? l.message || "Invalid input" : n ?? e, [l, n, e]), m = tt(() => !!(l || a && r || e || n), [l, a, r, e, n]);
587
+ return { helperText: d, helperTextPersistent: m };
588
+ }, xe = "_invalid_1dsbr_1", ye = {
589
+ invalid: xe
590
+ }, be = ({ ...t }) => {
3505
591
  const {
3506
592
  getFieldState: e,
3507
- formState: { errors: t },
3508
- trigger: r,
3509
- watch: i
3510
- } = en(), a = i(n.propertyName), o = vt(() => {
3511
- if (!(!a || n.value === null))
3512
- return n.value;
3513
- }, [a, n.value]);
3514
- return /* @__PURE__ */ jt(
3515
- Qt,
593
+ formState: { errors: r },
594
+ trigger: n,
595
+ watch: a
596
+ } = mt(), o = a(t.propertyName), l = tt(() => {
597
+ if (!(!o || t.value === null))
598
+ return t.value;
599
+ }, [o, t.value]);
600
+ return /* @__PURE__ */ at(
601
+ Kt,
3516
602
  {
3517
- ...n,
3518
- value: o,
3519
- "data-testid": `numeric-field-${n.propertyName}`,
603
+ ...t,
604
+ value: l,
605
+ "data-testid": `numeric-field-${t.propertyName}`,
3520
606
  fullWidth: !0,
3521
607
  inputMode: "decimal",
3522
608
  variant: "outlined",
3523
- onBlur: (l) => {
3524
- var s;
3525
- (s = n.onBlur) == null || s.call(n, l), n.formOnBlur(), n.additionalTrigger === "onBlur" && r(n.propertyName);
609
+ onBlur: (d) => {
610
+ var m;
611
+ (m = t.onBlur) == null || m.call(t, d), t.formOnBlur(), t.additionalTrigger === "onBlur" && n(t.propertyName);
3526
612
  },
3527
- onChange: (l) => {
3528
- var s;
3529
- (s = n.onChange) == null || s.call(n, l), n.additionalTrigger === "onChange" && r(n.propertyName);
613
+ onChange: (d) => {
614
+ var m;
615
+ (m = t.onChange) == null || m.call(t, d), t.additionalTrigger === "onChange" && n(t.propertyName);
3530
616
  },
3531
- valid: !e(n.propertyName).invalid,
3532
- helperTextPersistent: fn(t, n.propertyName) !== void 0 || n.helperTextPersistent,
3533
- className: e(n.propertyName).invalid ? ti.invalid : ""
617
+ valid: !e(t.propertyName).invalid,
618
+ helperTextPersistent: Vt(r, t.propertyName) !== void 0 || t.helperTextPersistent,
619
+ className: e(t.propertyName).invalid ? ye.invalid : ""
3534
620
  }
3535
621
  );
3536
- }, ni = ({
622
+ }, Ve = ({
3537
623
  /**numeric format props */
3538
- decimalScale: n = 2,
624
+ decimalScale: t = 2,
3539
625
  /** TextField props */
3540
626
  helperTextPersistent: e = !0,
3541
627
  /** custom props */
3542
- languageCode: t = "es-MX",
3543
- additionalTrigger: r = "none",
3544
- ...i
628
+ languageCode: r = "es-MX",
629
+ additionalTrigger: n = "none",
630
+ ...a
3545
631
  }) => {
3546
- const {
3547
- control: a,
3548
- formState: { errors: o }
3549
- } = en(), l = vt(() => {
3550
- const p = fn(o, i.propertyName);
3551
- return p ? p.message || "Invalid input" : i.helperText;
3552
- }, [o, i.propertyName, i.helperText]), s = Jr(t), f = Qr(t);
3553
- return /* @__PURE__ */ jt(
3554
- wn,
632
+ const { control: o } = mt(), { helperText: l, helperTextPersistent: d } = Se({
633
+ propertyName: a.propertyName,
634
+ helperText: a.helperText,
635
+ hasCharacterCount: !1
636
+ }), m = pe(r), S = he(r);
637
+ return /* @__PURE__ */ at(
638
+ Rt,
3555
639
  {
3556
- name: i.propertyName,
3557
- control: a,
3558
- render: ({ field: { value: p, onChange: v, onBlur: C } }) => /* @__PURE__ */ jt(
3559
- Zr,
640
+ name: a.propertyName,
641
+ control: o,
642
+ render: ({ field: { value: x, onChange: p, onBlur: y } }) => /* @__PURE__ */ at(
643
+ ge,
3560
644
  {
3561
- "data-testid": `form-number-${i.propertyName}`,
3562
- ...i,
645
+ "data-testid": `form-number-${a.propertyName}`,
646
+ ...a,
3563
647
  valueIsNumericString: !0,
3564
- value: p,
3565
- onValueChange: (b) => {
3566
- b.value === "" ? v(null) : v(Number(b.value));
3567
- },
3568
- decimalSeparator: s,
3569
- thousandSeparator: f,
3570
- decimalScale: n,
3571
- customInput: ei,
3572
- isAllowed: (b) => {
3573
- var g;
3574
- const { floatValue: m } = b;
3575
- return m ? i.maxValue && m > i.maxValue ? !1 : ((g = i.isAllowed) == null ? void 0 : g.call(i, b)) ?? !0 : !0;
3576
- },
3577
- formOnBlur: C,
3578
- additionalTrigger: r,
648
+ value: x,
649
+ onValueChange: (h) => {
650
+ h.value === "" ? p(null) : p(Number(h.value));
651
+ },
652
+ decimalSeparator: m,
653
+ thousandSeparator: S,
654
+ decimalScale: t,
655
+ customInput: be,
656
+ isAllowed: (h) => {
657
+ var V;
658
+ const { floatValue: s } = h;
659
+ return s ? a.maxValue && s > a.maxValue ? !1 : ((V = a.isAllowed) == null ? void 0 : V.call(a, h)) ?? !0 : !0;
660
+ },
661
+ formOnBlur: y,
662
+ additionalTrigger: n,
3579
663
  helperText: l,
3580
- helperTextPersistent: e
664
+ helperTextPersistent: e || d
3581
665
  }
3582
666
  )
3583
667
  }
3584
668
  );
3585
- }, di = ({
3586
- ...n
669
+ }, Ee = ({
670
+ ...t
3587
671
  }) => {
3588
- const { t: e, i18n: t } = Pn();
3589
- return /* @__PURE__ */ jt($n, { children: /* @__PURE__ */ jt(
3590
- ni,
672
+ const { t: e, i18n: r } = Lt();
673
+ return /* @__PURE__ */ at(Ut, { children: /* @__PURE__ */ at(
674
+ Ve,
3591
675
  {
3592
- ...n,
3593
- languageCode: xn[t == null ? void 0 : t.language],
676
+ ...t,
677
+ languageCode: $t[r == null ? void 0 : r.language],
3594
678
  helperText: e("formNumber.separator")
3595
679
  }
3596
680
  ) });
3597
681
  };
3598
682
  export {
3599
- di as DefaultFormNumber
683
+ Ee as DefaultFormNumber
3600
684
  };