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