use-mask-input 3.6.0 → 3.7.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 (58) hide show
  1. package/CHANGELOG.md +53 -76
  2. package/README.md +2 -251
  3. package/dist/antd/index.cjs +67 -0
  4. package/dist/antd/index.cjs.map +1 -0
  5. package/dist/antd/index.d.cts +37 -0
  6. package/dist/antd/index.d.ts +37 -0
  7. package/dist/antd/index.js +64 -0
  8. package/dist/antd/index.js.map +1 -0
  9. package/dist/chunk-4Y2DTPBL.cjs +3841 -0
  10. package/dist/chunk-4Y2DTPBL.cjs.map +1 -0
  11. package/dist/chunk-JGOZSJMW.js +3829 -0
  12. package/dist/chunk-JGOZSJMW.js.map +1 -0
  13. package/dist/index-F3rlTTTe.d.cts +583 -0
  14. package/dist/index-F3rlTTTe.d.ts +583 -0
  15. package/dist/index.cjs +72 -3870
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +48 -585
  18. package/dist/index.d.ts +48 -585
  19. package/dist/index.js +72 -3870
  20. package/dist/index.js.map +1 -1
  21. package/package.json +27 -21
  22. package/src/antd/index.ts +9 -0
  23. package/src/antd/useHookFormMaskAntd.spec.ts +142 -0
  24. package/src/antd/useHookFormMaskAntd.ts +57 -0
  25. package/src/antd/useMaskInputAntd-server.spec.tsx +36 -0
  26. package/src/antd/useMaskInputAntd.spec.tsx +108 -0
  27. package/src/antd/useMaskInputAntd.ts +77 -0
  28. package/src/api/index.ts +4 -0
  29. package/src/api/useHookFormMask.spec.ts +146 -0
  30. package/src/api/useHookFormMask.ts +56 -0
  31. package/src/api/useMaskInput-server.spec.tsx +30 -0
  32. package/src/api/useMaskInput.spec.tsx +220 -0
  33. package/src/api/useMaskInput.ts +73 -0
  34. package/src/api/withHookFormMask.spec.ts +155 -0
  35. package/src/api/withHookFormMask.ts +54 -0
  36. package/src/api/withMask.spec.ts +93 -0
  37. package/src/api/withMask.ts +25 -0
  38. package/src/core/elementResolver.spec.ts +175 -0
  39. package/src/core/elementResolver.ts +84 -0
  40. package/src/core/index.ts +3 -0
  41. package/src/core/maskConfig.spec.ts +183 -0
  42. package/src/core/maskConfig.ts +56 -0
  43. package/src/core/maskEngine.spec.ts +108 -0
  44. package/src/core/maskEngine.ts +47 -0
  45. package/src/index.tsx +12 -5
  46. package/src/{types.ts → types/index.ts} +13 -0
  47. package/src/utils/flow.spec.ts +27 -30
  48. package/src/utils/flow.ts +2 -2
  49. package/src/utils/index.ts +1 -1
  50. package/src/utils/isServer.spec.ts +15 -0
  51. package/src/utils/moduleInterop.spec.ts +37 -0
  52. package/src/useHookFormMask.ts +0 -47
  53. package/src/useMaskInput.ts +0 -41
  54. package/src/utils/getMaskOptions.spec.ts +0 -126
  55. package/src/utils/getMaskOptions.ts +0 -94
  56. package/src/withHookFormMask.ts +0 -34
  57. package/src/withMask.ts +0 -18
  58. /package/src/{inputmask.types.ts → types/inputmask.types.ts} +0 -0
package/dist/index.js CHANGED
@@ -1,3894 +1,96 @@
1
- import { useRef, useEffect } from 'react';
1
+ import { __toESM, require_inputmask, isServer_default, createMaskInstance, resolveInputRef, isHTMLElement, findInputElement, flow, interopDefaultSync, getMaskOptions, applyMaskToElement } from './chunk-JGOZSJMW.js';
2
+ import { useRef, useMemo, useCallback, useEffect } from 'react';
2
3
 
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJS = (cb, mod) => function __require() {
10
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- __defProp(target, "default", { value: mod, enumerable: true }) ,
26
- mod
27
- ));
28
-
29
- // node_modules/inputmask/dist/inputmask.js
30
- var require_inputmask = __commonJS({
31
- "node_modules/inputmask/dist/inputmask.js"(exports, module) {
32
- !(function(e, t) {
33
- if ("object" == typeof exports && "object" == typeof module) module.exports = t();
34
- else if ("function" == typeof define && define.amd) define([], t);
35
- else {
36
- var n = t();
37
- for (var i in n) ("object" == typeof exports ? exports : e)[i] = n[i];
38
- }
39
- })("undefined" != typeof self ? self : exports, function() {
40
- return (function() {
41
- var e = {
42
- 340: function(e2, t2) {
43
- Object.defineProperty(t2, "__esModule", {
44
- value: true
45
- }), t2.escapeRegex = function(e3) {
46
- return e3.replace(n2, "\\$1");
47
- };
48
- var n2 = new RegExp("(\\" + ["/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^"].join("|\\") + ")", "gim");
49
- },
50
- 472: function() {
51
- function e2(t3) {
52
- return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
53
- return typeof e3;
54
- } : function(e3) {
55
- return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
56
- }, e2(t3);
57
- }
58
- function t2(e3, t3) {
59
- for (var i3 = 0; i3 < t3.length; i3++) {
60
- var a2 = t3[i3];
61
- a2.enumerable = a2.enumerable || false, a2.configurable = true, "value" in a2 && (a2.writable = true), Object.defineProperty(e3, n2(a2.key), a2);
62
- }
63
- }
64
- function n2(t3) {
65
- var n3 = (function(t4, n4) {
66
- if ("object" != e2(t4) || !t4) return t4;
67
- var i3 = t4[Symbol.toPrimitive];
68
- if (void 0 !== i3) {
69
- var a2 = i3.call(t4, n4);
70
- if ("object" != e2(a2)) return a2;
71
- throw new TypeError("@@toPrimitive must return a primitive value.");
72
- }
73
- return (String )(t4);
74
- })(t3, "string");
75
- return "symbol" == e2(n3) ? n3 : n3 + "";
76
- }
77
- function i2(t3, n3) {
78
- if (n3 && ("object" == e2(n3) || "function" == typeof n3)) return n3;
79
- if (void 0 !== n3) throw new TypeError("Derived constructors may only return object or undefined");
80
- return (function(e3) {
81
- if (void 0 === e3) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
82
- return e3;
83
- })(t3);
84
- }
85
- function a(e3) {
86
- var t3 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
87
- return a = function(e4) {
88
- if (null === e4 || !(function(e5) {
89
- try {
90
- return -1 !== Function.toString.call(e5).indexOf("[native code]");
91
- } catch (t4) {
92
- return "function" == typeof e5;
93
- }
94
- })(e4)) return e4;
95
- if ("function" != typeof e4) throw new TypeError("Super expression must either be null or a function");
96
- if (void 0 !== t3) {
97
- if (t3.has(e4)) return t3.get(e4);
98
- t3.set(e4, n3);
99
- }
100
- function n3() {
101
- return (function(e5, t4, n4) {
102
- if (r()) return Reflect.construct.apply(null, arguments);
103
- var i3 = [null];
104
- i3.push.apply(i3, t4);
105
- var a2 = new (e5.bind.apply(e5, i3))();
106
- return n4 && o(a2, n4.prototype), a2;
107
- })(e4, arguments, l(this).constructor);
108
- }
109
- return n3.prototype = Object.create(e4.prototype, {
110
- constructor: {
111
- value: n3,
112
- enumerable: false,
113
- writable: true,
114
- configurable: true
115
- }
116
- }), o(n3, e4);
117
- }, a(e3);
118
- }
119
- function r() {
120
- try {
121
- var e3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
122
- }));
123
- } catch (e4) {
124
- }
125
- return (r = function() {
126
- return !!e3;
127
- })();
128
- }
129
- function o(e3, t3) {
130
- return o = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e4, t4) {
131
- return e4.__proto__ = t4, e4;
132
- }, o(e3, t3);
133
- }
134
- function l(e3) {
135
- return l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e4) {
136
- return e4.__proto__ || Object.getPrototypeOf(e4);
137
- }, l(e3);
138
- }
139
- if (void 0 === FormData.Inputmask) {
140
- var s = (function(e3) {
141
- function n3(e4, t3) {
142
- var a3, o2, s3, c2;
143
- !(function(e5, t4) {
144
- if (!(e5 instanceof t4)) throw new TypeError("Cannot call a class as a function");
145
- })(this, n3), o2 = this, c2 = [e4, t3], s3 = l(s3 = n3);
146
- for (var u, f = (a3 = i2(o2, r() ? Reflect.construct(s3, c2 || [], l(o2).constructor) : s3.apply(o2, c2))).entries(); false === (u = f.next()).done; ) {
147
- var p = u.value[0], d = u.value[1], h = e4[p];
148
- !h || void 0 === h.inputmask || d instanceof File || a3.set(p, h.value);
149
- }
150
- return i2(a3, a3);
151
- }
152
- return (function(e4, t3) {
153
- if ("function" != typeof t3 && null !== t3) throw new TypeError("Super expression must either be null or a function");
154
- e4.prototype = Object.create(t3 && t3.prototype, {
155
- constructor: {
156
- value: e4,
157
- writable: true,
158
- configurable: true
159
- }
160
- }), Object.defineProperty(e4, "prototype", {
161
- writable: false
162
- }), t3 && o(e4, t3);
163
- })(n3, e3), a2 = n3, s2 && t2(a2.prototype, s2), c && t2(a2, c), Object.defineProperty(a2, "prototype", {
164
- writable: false
165
- }), a2;
166
- var a2, s2, c;
167
- })(a(FormData));
168
- s.Inputmask = true, FormData = s;
169
- }
170
- },
171
- 493: function() {
172
- String.prototype.includes || (String.prototype.includes = function(e2, t2) {
173
- return "number" != typeof t2 && (t2 = 0), !(t2 + e2.length > this.length) && -1 !== this.indexOf(e2, t2);
174
- });
175
- },
176
- 546: function(e2, t2, n2) {
177
- var i2, a = n2(340), r = (i2 = n2(3978)) && i2.__esModule ? i2 : {
178
- default: i2
179
- }, o = n2(6032), l = n2(7539);
180
- var s = r.default.dependencyLib;
181
- function c(e3, t3) {
182
- for (var n3 = "", i3 = 0; i3 < e3.length; i3++) r.default.prototype.definitions[e3.charAt(i3)] || t3.definitions[e3.charAt(i3)] || t3.optionalmarker[0] === e3.charAt(i3) || t3.optionalmarker[1] === e3.charAt(i3) || t3.quantifiermarker[0] === e3.charAt(i3) || t3.quantifiermarker[1] === e3.charAt(i3) || t3.groupmarker[0] === e3.charAt(i3) || t3.groupmarker[1] === e3.charAt(i3) || t3.alternatormarker === e3.charAt(i3) ? n3 += "\\" + e3.charAt(i3) : n3 += e3.charAt(i3);
183
- return n3;
184
- }
185
- function u(e3, t3, n3, i3) {
186
- if (e3.length > 0 && t3 > 0 && (!n3.digitsOptional || i3)) {
187
- var a2 = e3.indexOf(n3.radixPoint), r2 = false;
188
- n3.negationSymbol.back === e3[e3.length - 1] && (r2 = true, e3.length--), -1 === a2 && (e3.push(n3.radixPoint), a2 = e3.length - 1);
189
- for (var o2 = 1; o2 <= t3; o2++) isFinite(e3[a2 + o2]) || (e3[a2 + o2] = "0");
190
- }
191
- return r2 && e3.push(n3.negationSymbol.back), e3;
192
- }
193
- function f(e3, t3) {
194
- var n3 = 0;
195
- for (var i3 in "+" === e3 && (n3 = l.seekNext.call(this, t3.validPositions.length - 1)), t3.tests) if ((i3 = parseInt(i3)) >= n3) {
196
- for (var a2 = 0, r2 = t3.tests[i3].length; a2 < r2; a2++) if ((void 0 === t3.validPositions[i3] || "-" === e3) && t3.tests[i3][a2].match.def === e3) return i3 + (void 0 !== t3.validPositions[i3] && "-" !== e3 ? 1 : 0);
197
- }
198
- return n3;
199
- }
200
- function p(e3, t3) {
201
- for (var n3 = -1, i3 = 0, a2 = t3.validPositions.length; i3 < a2; i3++) {
202
- var r2 = t3.validPositions[i3];
203
- if (r2 && r2.match.def === e3) {
204
- n3 = i3;
205
- break;
206
- }
207
- }
208
- return n3;
209
- }
210
- function d(e3, t3, n3, i3, a2) {
211
- var r2 = t3.buffer ? t3.buffer.indexOf(a2.radixPoint) : -1, o2 = (-1 !== r2 || i3 && a2.jitMasking) && new RegExp(a2.definitions[9].validator).test(e3);
212
- return !i3 && a2._radixDance && -1 !== r2 && o2 && null == t3.validPositions[r2] ? {
213
- insert: {
214
- pos: r2 === n3 ? r2 + 1 : r2,
215
- c: a2.radixPoint
216
- },
217
- pos: n3
218
- } : o2;
219
- }
220
- r.default.extendAliases({
221
- numeric: {
222
- mask: function(e3) {
223
- e3.repeat = 0, e3.groupSeparator === e3.radixPoint && e3.digits && "0" !== e3.digits && ("." === e3.radixPoint ? e3.groupSeparator = "," : "," === e3.radixPoint ? e3.groupSeparator = "." : e3.groupSeparator = ""), " " === e3.groupSeparator && (e3.skipOptionalPartCharacter = void 0), e3.placeholder.length > 1 && (e3.placeholder = e3.placeholder.charAt(0)), "radixFocus" === e3.positionCaretOnClick && "" === e3.placeholder && (e3.positionCaretOnClick = "lvp");
224
- var t3 = "0", n3 = e3.radixPoint;
225
- true === e3.numericInput && void 0 === e3.__financeInput ? (t3 = "1", e3.positionCaretOnClick = "radixFocus" === e3.positionCaretOnClick ? "lvp" : e3.positionCaretOnClick, e3.digitsOptional = false, isNaN(e3.digits) && (e3.digits = -1 !== e3.digits.indexOf(",") ? e3.digits.split(",")[0] : 2), e3._radixDance = false, n3 = "," === e3.radixPoint ? "?" : "!", "" !== e3.radixPoint && void 0 === e3.definitions[n3] && (e3.definitions[n3] = {}, e3.definitions[n3].validator = "[" + e3.radixPoint + "]", e3.definitions[n3].placeholder = e3.radixPoint, e3.definitions[n3].static = true, e3.definitions[n3].generated = true)) : (e3.__financeInput = false, e3.numericInput = true);
226
- var i3, r2 = "[+]";
227
- if (r2 += c(e3.prefix, e3), "" !== e3.groupSeparator ? (void 0 === e3.definitions[e3.groupSeparator] && (e3.definitions[e3.groupSeparator] = {}, e3.definitions[e3.groupSeparator].validator = "[" + e3.groupSeparator + "]", e3.definitions[e3.groupSeparator].placeholder = e3.groupSeparator, e3.definitions[e3.groupSeparator].static = true, e3.definitions[e3.groupSeparator].generated = true), r2 += e3._mask(e3)) : r2 += "9{+}", void 0 !== e3.digits && 0 !== e3.digits) {
228
- var o2 = e3.digits.toString().split(",");
229
- isFinite(o2[0]) && o2[1] && isFinite(o2[1]) ? r2 += n3 + t3 + "{" + e3.digits + "}" : (isNaN(e3.digits) || parseInt(e3.digits) > 0) && (e3.digitsOptional || e3.jitMasking ? (i3 = r2 + n3 + t3 + "{0," + e3.digits + "}", e3.keepStatic = true) : r2 += n3 + t3 + "{" + e3.digits + "}");
230
- } else e3.inputmode = "numeric";
231
- return r2 += c(e3.suffix, e3), r2 += "[-]", i3 && (r2 = [i3 + c(e3.suffix, e3) + "[-]", r2]), e3.greedy = false, (function(e4) {
232
- void 0 === e4.parseMinMaxOptions && (null !== e4.min && (e4.min = e4.min.toString().replace(new RegExp((0, a.escapeRegex)(e4.groupSeparator), "g"), ""), "," === e4.radixPoint && (e4.min = e4.min.replace(e4.radixPoint, ".")), e4.min = isFinite(e4.min) ? parseFloat(e4.min) : NaN, isNaN(e4.min) && (e4.min = Number.MIN_VALUE)), null !== e4.max && (e4.max = e4.max.toString().replace(new RegExp((0, a.escapeRegex)(e4.groupSeparator), "g"), ""), "," === e4.radixPoint && (e4.max = e4.max.replace(e4.radixPoint, ".")), e4.max = isFinite(e4.max) ? parseFloat(e4.max) : NaN, isNaN(e4.max) && (e4.max = Number.MAX_VALUE)), e4.parseMinMaxOptions = "done");
233
- })(e3), "" !== e3.radixPoint && e3.substituteRadixPoint && (e3.substitutes["." == e3.radixPoint ? "," : "."] = e3.radixPoint), r2;
234
- },
235
- _mask: function(e3) {
236
- return "(" + e3.groupSeparator + "999){+|1}";
237
- },
238
- digits: "*",
239
- digitsOptional: true,
240
- enforceDigitsOnBlur: false,
241
- radixPoint: ".",
242
- positionCaretOnClick: "radixFocus",
243
- _radixDance: true,
244
- groupSeparator: "",
245
- allowMinus: true,
246
- negationSymbol: {
247
- front: "-",
248
- back: ""
249
- },
250
- prefix: "",
251
- suffix: "",
252
- min: null,
253
- max: null,
254
- SetMaxOnOverflow: false,
255
- step: 1,
256
- inputType: "text",
257
- unmaskAsNumber: false,
258
- roundingFN: Math.round,
259
- inputmode: "decimal",
260
- shortcuts: {
261
- k: "1000",
262
- m: "1000000"
263
- },
264
- placeholder: "0",
265
- greedy: false,
266
- rightAlign: true,
267
- insertMode: true,
268
- autoUnmask: false,
269
- skipOptionalPartCharacter: "",
270
- usePrototypeDefinitions: false,
271
- stripLeadingZeroes: true,
272
- substituteRadixPoint: true,
273
- definitions: {
274
- 0: {
275
- validator: d
276
- },
277
- 1: {
278
- validator: d,
279
- definitionSymbol: "9"
280
- },
281
- 9: {
282
- validator: "[0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9]",
283
- definitionSymbol: "*"
284
- },
285
- "+": {
286
- validator: function(e3, t3, n3, i3, a2) {
287
- return a2.allowMinus && ("-" === e3 || e3 === a2.negationSymbol.front);
288
- }
289
- },
290
- "-": {
291
- validator: function(e3, t3, n3, i3, a2) {
292
- return a2.allowMinus && e3 === a2.negationSymbol.back;
293
- }
294
- }
295
- },
296
- preValidation: function(e3, t3, n3, i3, a2, r2, o2, l2) {
297
- var s2 = this;
298
- if (false !== a2.__financeInput && n3 === a2.radixPoint) return false;
299
- var c2 = e3.indexOf(a2.radixPoint), u2 = t3;
300
- if (t3 = (function(e4, t4, n4, i4, a3) {
301
- return a3._radixDance && a3.numericInput && t4 !== a3.negationSymbol.back && e4 <= n4 && (n4 > 0 || t4 == a3.radixPoint) && (void 0 === i4.validPositions[e4 - 1] || i4.validPositions[e4 - 1].input !== a3.negationSymbol.back) && (e4 -= 1), e4;
302
- })(t3, n3, c2, r2, a2), "-" === n3 || n3 === a2.negationSymbol.front) {
303
- if (true !== a2.allowMinus) return false;
304
- var d2 = false, h = p("+", r2), v = p("-", r2);
305
- return -1 !== h && (d2 = [h], -1 !== v && d2.push(v)), false !== d2 ? {
306
- remove: d2,
307
- caret: u2 - a2.negationSymbol.back.length
308
- } : {
309
- insert: [{
310
- pos: f.call(s2, "+", r2),
311
- c: a2.negationSymbol.front,
312
- fromIsValid: true
313
- }, {
314
- pos: f.call(s2, "-", r2),
315
- c: a2.negationSymbol.back,
316
- fromIsValid: void 0
317
- }],
318
- caret: u2 + a2.negationSymbol.back.length
319
- };
320
- }
321
- if (n3 === a2.groupSeparator) return {
322
- caret: u2
323
- };
324
- if (l2) return true;
325
- if (-1 !== c2 && true === a2._radixDance && false === i3 && n3 === a2.radixPoint && void 0 !== a2.digits && (isNaN(a2.digits) || parseInt(a2.digits) > 0) && c2 !== t3) {
326
- var m = f.call(s2, a2.radixPoint, r2);
327
- return r2.validPositions[m] && (r2.validPositions[m].generatedInput = r2.validPositions[m].generated || false), {
328
- caret: a2._radixDance && t3 === c2 - 1 ? c2 + 1 : c2
329
- };
330
- }
331
- if (false === a2.__financeInput) {
332
- if (i3) {
333
- if (a2.digitsOptional) return {
334
- rewritePosition: o2.end
335
- };
336
- if (!a2.digitsOptional) {
337
- if (o2.begin > c2 && o2.end <= c2) return n3 === a2.radixPoint ? {
338
- insert: {
339
- pos: c2 + 1,
340
- c: "0",
341
- fromIsValid: true
342
- },
343
- rewritePosition: c2
344
- } : {
345
- rewritePosition: c2 + 1
346
- };
347
- if (o2.begin < c2) return {
348
- rewritePosition: o2.begin - 1
349
- };
350
- }
351
- } else if (!a2.showMaskOnHover && !a2.showMaskOnFocus && !a2.digitsOptional && a2.digits > 0 && "" === this.__valueGet.call(this.el)) return {
352
- rewritePosition: c2
353
- };
354
- }
355
- return {
356
- rewritePosition: t3
357
- };
358
- },
359
- postValidation: function(e3, t3, n3, i3, a2, r2, o2, l2, c2) {
360
- if (false === i3) return i3;
361
- if (o2) return true;
362
- if (null !== a2.min || null !== a2.max) {
363
- var f2 = a2.onUnMask(e3.slice().reverse().join(""), void 0, s.extend({}, a2, {
364
- unmaskAsNumber: true
365
- }));
366
- if (null !== a2.min && f2 < a2.min && true !== c2 && (f2.toString().length > a2.min.toString().length || e3[0] === a2.radixPoint || f2 < 0)) return false;
367
- if (null !== a2.max && a2.max >= 0 && f2 > a2.max) return !!a2.SetMaxOnOverflow && {
368
- refreshFromBuffer: true,
369
- buffer: u(a2.max.toString().replace(".", a2.radixPoint).split(""), a2.digits, a2).reverse()
370
- };
371
- }
372
- return i3;
373
- },
374
- onUnMask: function(e3, t3, n3) {
375
- if ("" === t3 && true === n3.nullable) return t3;
376
- var i3 = e3.replace(n3.prefix, "");
377
- return i3 = (i3 = i3.replace(n3.suffix, "")).replace(new RegExp((0, a.escapeRegex)(n3.groupSeparator), "g"), ""), "" !== n3.placeholder.charAt(0) && (i3 = i3.replace(new RegExp(n3.placeholder.charAt(0), "g"), "0")), n3.unmaskAsNumber ? ("" !== n3.radixPoint && -1 !== i3.indexOf(n3.radixPoint) && (i3 = i3.replace(a.escapeRegex.call(this, n3.radixPoint), ".")), i3 = (i3 = i3.replace(new RegExp("^" + (0, a.escapeRegex)(n3.negationSymbol.front)), "-")).replace(new RegExp((0, a.escapeRegex)(n3.negationSymbol.back) + "$"), ""), Number(i3)) : i3;
378
- },
379
- isComplete: function(e3, t3) {
380
- var n3 = (t3.numericInput ? e3.slice().reverse() : e3).join("");
381
- return n3 = (n3 = (n3 = (n3 = (n3 = n3.replace(new RegExp("^" + (0, a.escapeRegex)(t3.negationSymbol.front)), "-")).replace(new RegExp((0, a.escapeRegex)(t3.negationSymbol.back) + "$"), "")).replace(t3.prefix, "")).replace(t3.suffix, "")).replace(new RegExp((0, a.escapeRegex)(t3.groupSeparator) + "([0-9]{3})", "g"), "$1"), "," === t3.radixPoint && (n3 = n3.replace((0, a.escapeRegex)(t3.radixPoint), ".")), isFinite(n3);
382
- },
383
- onBeforeMask: function(e3, t3) {
384
- e3 = null != e3 ? e3 : "";
385
- var n3 = t3.radixPoint || ",";
386
- isFinite(t3.digits) && (t3.digits = parseInt(t3.digits)), "number" != typeof e3 && "number" !== t3.inputType || "" === n3 || (e3 = e3.toString().replace(".", n3));
387
- var i3 = "-" === e3.charAt(0) || e3.charAt(0) === t3.negationSymbol.front, r2 = e3.split(n3), o2 = r2[0].replace(/[^\-0-9]/g, ""), l2 = r2.length > 1 ? r2[1].replace(/[^0-9]/g, "") : "", s2 = r2.length > 1;
388
- e3 = o2 + ("" !== l2 ? n3 + l2 : l2);
389
- var c2 = 0;
390
- if ("" !== n3 && (c2 = t3.digitsOptional ? t3.digits < l2.length ? t3.digits : l2.length : t3.digits, "" !== l2 || !t3.digitsOptional)) {
391
- var f2 = Math.pow(10, c2 || 1);
392
- e3 = e3.replace((0, a.escapeRegex)(n3), "."), isNaN(parseFloat(e3)) || (e3 = (t3.roundingFN(parseFloat(e3) * f2) / f2).toFixed(c2)), e3 = e3.toString().replace(".", n3);
393
- }
394
- if (0 === t3.digits && -1 !== e3.indexOf(n3) && (e3 = e3.substring(0, e3.indexOf(n3))), "" !== e3 && (null !== t3.min || null !== t3.max)) {
395
- var p2 = e3.toString().replace(n3, ".");
396
- null !== t3.min && p2 < t3.min ? e3 = t3.min.toString().replace(".", n3) : null !== t3.max && p2 > t3.max && (e3 = t3.max.toString().replace(".", n3));
397
- }
398
- return i3 && "-" !== e3.charAt(0) && (e3 = "-" + e3), u(e3.toString().split(""), c2, t3, s2).join("");
399
- },
400
- onBeforeWrite: function(e3, t3, n3, i3) {
401
- function r2(e4, t4) {
402
- if (false !== i3.__financeInput || t4) {
403
- var n4 = e4.indexOf(i3.radixPoint);
404
- -1 !== n4 && e4.splice(n4, 1);
405
- }
406
- if ("" !== i3.groupSeparator) for (; -1 !== (n4 = e4.indexOf(i3.groupSeparator)); ) e4.splice(n4, 1);
407
- return e4;
408
- }
409
- var o2, l2;
410
- if (i3.stripLeadingZeroes && (l2 = (function(e4, t4) {
411
- var n4 = new RegExp("(^" + ("" !== t4.negationSymbol.front ? (0, a.escapeRegex)(t4.negationSymbol.front) + "?" : "") + (0, a.escapeRegex)(t4.prefix) + ")(.*)(" + (0, a.escapeRegex)(t4.suffix) + ("" != t4.negationSymbol.back ? (0, a.escapeRegex)(t4.negationSymbol.back) + "?" : "") + "$)").exec(e4.slice().reverse().join("")), i4 = n4 ? n4[2] : "", r3 = false;
412
- return i4 && (i4 = i4.split(t4.radixPoint.charAt(0))[0], r3 = new RegExp("^[0" + t4.groupSeparator + "]*").exec(i4)), !(!r3 || !(r3[0].length > 1 || r3[0].length > 0 && r3[0].length < i4.length)) && r3;
413
- })(t3, i3))) for (var c2 = t3.join("").lastIndexOf(l2[0].split("").reverse().join("")) - (l2[0] == l2.input ? 0 : 1), f2 = l2[0] == l2.input ? 1 : 0, p2 = l2[0].length - f2; p2 > 0; p2--) this.maskset.validPositions.splice(c2 + p2, 1), delete t3[c2 + p2];
414
- if (e3) switch (e3.type) {
415
- case "blur":
416
- case "checkval":
417
- if (null !== i3.min || null !== i3.max) {
418
- var d2 = i3.onUnMask(t3.slice().reverse().join(""), void 0, s.extend({}, i3, {
419
- unmaskAsNumber: true
420
- }));
421
- if (null !== i3.min && d2 < i3.min && "" !== t3.join()) return {
422
- refreshFromBuffer: true,
423
- buffer: u(i3.min.toString().replace(".", i3.radixPoint).split(""), i3.digits, i3).reverse()
424
- };
425
- if (null !== i3.max && d2 > i3.max) return {
426
- refreshFromBuffer: true,
427
- buffer: u(i3.max.toString().replace(".", i3.radixPoint).split(""), i3.digits, i3).reverse()
428
- };
429
- }
430
- if (t3[t3.length - 1] === i3.negationSymbol.front) {
431
- var h = new RegExp("(^" + ("" != i3.negationSymbol.front ? (0, a.escapeRegex)(i3.negationSymbol.front) + "?" : "") + (0, a.escapeRegex)(i3.prefix) + ")(.*)(" + (0, a.escapeRegex)(i3.suffix) + ("" != i3.negationSymbol.back ? (0, a.escapeRegex)(i3.negationSymbol.back) + "?" : "") + "$)").exec(r2(t3.slice(), true).reverse().join(""));
432
- 0 == (h ? h[2] : "") && (o2 = {
433
- refreshFromBuffer: true,
434
- buffer: [0]
435
- });
436
- } else if ("" !== i3.radixPoint) {
437
- t3.indexOf(i3.radixPoint) === i3.suffix.length && (o2 && o2.buffer ? o2.buffer.splice(0, 1 + i3.suffix.length) : (t3.splice(0, 1 + i3.suffix.length), o2 = {
438
- refreshFromBuffer: true,
439
- buffer: r2(t3)
440
- }));
441
- }
442
- if (i3.enforceDigitsOnBlur) {
443
- var v = ((o2 = o2 || {}) && o2.buffer || t3).slice().reverse();
444
- o2.refreshFromBuffer = true, o2.buffer = u(v, i3.digits, i3, true).reverse();
445
- }
446
- }
447
- return o2;
448
- },
449
- onKeyDown: function(e3, t3, n3, i3) {
450
- var a2, r2 = s(this);
451
- if (3 != e3.location) {
452
- var l2, c2 = e3.key;
453
- if ((l2 = i3.shortcuts && i3.shortcuts[c2]) && l2.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(l2)), r2.trigger("setvalue"), false;
454
- }
455
- if (e3.ctrlKey) switch (e3.key) {
456
- case o.keys.ArrowUp:
457
- return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(i3.step)), r2.trigger("setvalue"), false;
458
- case o.keys.ArrowDown:
459
- return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(i3.step)), r2.trigger("setvalue"), false;
460
- }
461
- if (!e3.shiftKey && (e3.key === o.keys.Delete || e3.key === o.keys.Backspace || e3.key === o.keys.BACKSPACE_SAFARI) && n3.begin !== t3.length) {
462
- if (t3[e3.key === o.keys.Delete ? n3.begin - 1 : n3.end] === i3.negationSymbol.front) return a2 = t3.slice().reverse(), "" !== i3.negationSymbol.front && a2.shift(), "" !== i3.negationSymbol.back && a2.pop(), r2.trigger("setvalue", [a2.join(""), n3.begin]), false;
463
- if (true === i3._radixDance) {
464
- var f2, p2 = t3.indexOf(i3.radixPoint);
465
- if (i3.digitsOptional) {
466
- if (0 === p2) return (a2 = t3.slice().reverse()).pop(), r2.trigger("setvalue", [a2.join(""), n3.begin >= a2.length ? a2.length : n3.begin]), false;
467
- } else if (-1 !== p2 && (n3.begin < p2 || n3.end < p2 || e3.key === o.keys.Delete && (n3.begin === p2 || n3.begin - 1 === p2))) return n3.begin === n3.end && (e3.key === o.keys.Backspace || e3.key === o.keys.BACKSPACE_SAFARI ? n3.begin++ : e3.key === o.keys.Delete && n3.begin - 1 === p2 && (f2 = s.extend({}, n3), n3.begin--, n3.end--)), (a2 = t3.slice().reverse()).splice(a2.length - n3.begin, n3.begin - n3.end || 1), e3.key !== o.keys.Backspace && e3.key !== o.keys.BACKSPACE_SAFARI || a2.splice(a2.length - n3.end + 1, 0, "0"), a2 = u(a2, i3.digits, i3).join(""), f2 && (n3 = f2), r2.trigger("setvalue", [a2, n3.begin >= a2.length ? p2 + 1 : n3.begin]), false;
468
- }
469
- }
470
- }
471
- },
472
- currency: {
473
- prefix: "",
474
- groupSeparator: ",",
475
- alias: "numeric",
476
- digits: 2,
477
- digitsOptional: false
478
- },
479
- decimal: {
480
- alias: "numeric"
481
- },
482
- integer: {
483
- alias: "numeric",
484
- inputmode: "numeric",
485
- digits: 0
486
- },
487
- percentage: {
488
- alias: "numeric",
489
- min: 0,
490
- max: 100,
491
- suffix: " %",
492
- digits: 0,
493
- allowMinus: false
494
- },
495
- indianns: {
496
- alias: "numeric",
497
- _mask: function(e3) {
498
- return "(" + e3.groupSeparator + "99){*|1}(" + e3.groupSeparator + "999){1|1}";
499
- },
500
- groupSeparator: ",",
501
- radixPoint: ".",
502
- placeholder: "0",
503
- digits: 2,
504
- digitsOptional: false
505
- }
506
- });
507
- },
508
- 672: function(e2, t2) {
509
- function n2(e3) {
510
- return n2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
511
- return typeof e4;
512
- } : function(e4) {
513
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
514
- }, n2(e3);
515
- }
516
- Object.defineProperty(t2, "__esModule", {
517
- value: true
518
- }), t2.default = function e3() {
519
- var t3, i2, a, r, o, l, s = arguments[0] || {}, c = 1, u = arguments.length, f = false;
520
- "boolean" == typeof s && (f = s, s = arguments[c] || {}, c++);
521
- "object" !== n2(s) && "function" != typeof s && (s = {});
522
- for (; c < u; c++) if (null != (t3 = arguments[c])) for (i2 in t3) a = s[i2], s !== (r = t3[i2]) && (f && r && ("[object Object]" === Object.prototype.toString.call(r) || (o = Array.isArray(r))) ? (o ? (o = false, l = a && Array.isArray(a) ? a : []) : l = a && "[object Object]" === Object.prototype.toString.call(a) ? a : {}, s[i2] = e3(f, l, r)) : void 0 !== r && (s[i2] = r));
523
- return s;
524
- };
525
- },
526
- 1507: function(e2, t2, n2) {
527
- Object.defineProperty(t2, "__esModule", {
528
- value: true
529
- }), t2.HandleNativePlaceholder = function(e3, t3) {
530
- var n3 = e3 ? e3.inputmask : this;
531
- if (a.ie) {
532
- if (e3.inputmask._valueGet() !== t3 && (e3.placeholder !== t3 || "" === e3.placeholder)) {
533
- var i3 = s.getBuffer.call(n3).slice(), r2 = e3.inputmask._valueGet();
534
- if (r2 !== t3) {
535
- var o2 = s.getLastValidPosition.call(n3);
536
- -1 === o2 && r2 === s.getBufferTemplate.call(n3).join("") ? i3 = [] : -1 !== o2 && m.call(n3, i3), y(e3, i3);
537
- }
538
- }
539
- } else e3.placeholder !== t3 && (e3.placeholder = t3, "" === e3.placeholder && e3.removeAttribute("placeholder"));
540
- }, t2.applyInputValue = v, t2.checkVal = g, t2.clearOptionalTail = m, t2.unmaskedvalue = function(e3) {
541
- var t3 = e3 ? e3.inputmask : this, n3 = t3.opts, i3 = t3.maskset;
542
- if (e3) {
543
- if (void 0 === e3.inputmask) return e3.value;
544
- e3.inputmask && e3.inputmask.refreshValue && v(e3, e3.inputmask._valueGet(true));
545
- }
546
- for (var a2 = [], r2 = i3.validPositions, l2 = 0, c2 = r2.length; l2 < c2; l2++) r2[l2] && r2[l2].match && (1 != r2[l2].match.static || true !== n3.keepStatic && Array.isArray(i3.metadata) && true !== r2[l2].generatedInput) && a2.push(r2[l2].input);
547
- var u2 = 0 === a2.length ? "" : (t3.isRTL ? a2.reverse() : a2).join("");
548
- if ("function" == typeof n3.onUnMask) {
549
- var f2 = (t3.isRTL ? s.getBuffer.call(t3).slice().reverse() : s.getBuffer.call(t3)).join("");
550
- u2 = n3.onUnMask.call(t3, f2, u2, n3);
551
- }
552
- if (n3.outputMask && u2.length > 0) return o.default.format(u2, d(d({}, n3), {}, {
553
- mask: n3.outputMask,
554
- alias: null
555
- }));
556
- return u2;
557
- }, t2.writeBuffer = y;
558
- var i2, a = n2(4351), r = n2(6047), o = (i2 = n2(3978)) && i2.__esModule ? i2 : {
559
- default: i2
560
- }, l = n2(6032), s = n2(7539), c = n2(7687), u = n2(5895);
561
- function f(e3) {
562
- return f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
563
- return typeof e4;
564
- } : function(e4) {
565
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
566
- }, f(e3);
567
- }
568
- function p(e3, t3) {
569
- var n3 = Object.keys(e3);
570
- if (Object.getOwnPropertySymbols) {
571
- var i3 = Object.getOwnPropertySymbols(e3);
572
- t3 && (i3 = i3.filter(function(t4) {
573
- return Object.getOwnPropertyDescriptor(e3, t4).enumerable;
574
- })), n3.push.apply(n3, i3);
575
- }
576
- return n3;
577
- }
578
- function d(e3) {
579
- for (var t3 = 1; t3 < arguments.length; t3++) {
580
- var n3 = null != arguments[t3] ? arguments[t3] : {};
581
- t3 % 2 ? p(Object(n3), true).forEach(function(t4) {
582
- h(e3, t4, n3[t4]);
583
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(n3)) : p(Object(n3)).forEach(function(t4) {
584
- Object.defineProperty(e3, t4, Object.getOwnPropertyDescriptor(n3, t4));
585
- });
586
- }
587
- return e3;
588
- }
589
- function h(e3, t3, n3) {
590
- return (t3 = (function(e4) {
591
- var t4 = (function(e5, t5) {
592
- if ("object" != f(e5) || !e5) return e5;
593
- var n4 = e5[Symbol.toPrimitive];
594
- if (void 0 !== n4) {
595
- var i3 = n4.call(e5, t5);
596
- if ("object" != f(i3)) return i3;
597
- throw new TypeError("@@toPrimitive must return a primitive value.");
598
- }
599
- return ("string" === t5 ? String : Number)(e5);
600
- })(e4, "string");
601
- return "symbol" == f(t4) ? t4 : t4 + "";
602
- })(t3)) in e3 ? Object.defineProperty(e3, t3, {
603
- value: n3,
604
- enumerable: true,
605
- configurable: true,
606
- writable: true
607
- }) : e3[t3] = n3, e3;
608
- }
609
- function v(e3, t3, n3, i3) {
610
- var a2 = e3 ? e3.inputmask : this, r2 = a2.opts;
611
- e3.inputmask.refreshValue = false, true !== i3 && "function" == typeof r2.onBeforeMask && (t3 = r2.onBeforeMask.call(a2, t3, r2) || t3), g(e3, true, false, t3 = (t3 || "").toString().split(""), n3), a2.undoValue = a2._valueGet(true), (r2.clearMaskOnLostFocus || r2.clearIncomplete) && e3.inputmask._valueGet() === s.getBufferTemplate.call(a2).join("") && -1 === s.getLastValidPosition.call(a2) && e3.inputmask._valueSet("");
612
- }
613
- function m(e3) {
614
- e3.length = 0;
615
- for (var t3, n3 = u.getMaskTemplate.call(this, true, 0, true, void 0, true); void 0 !== (t3 = n3.shift()); ) e3.push(t3);
616
- return e3;
617
- }
618
- function g(e3, t3, n3, i3, a2) {
619
- var o2, l2 = e3 ? e3.inputmask : this, f2 = l2.maskset, p2 = l2.opts, d2 = l2.dependencyLib, h2 = i3.slice(), v2 = "", m2 = -1, g2 = p2.skipOptionalPartCharacter;
620
- p2.skipOptionalPartCharacter = "", s.resetMaskSet.call(l2, false), l2.clicked = 0, m2 = p2.radixPoint ? s.determineNewCaretPosition.call(l2, {
621
- begin: 0,
622
- end: 0
623
- }, false, false === p2.__financeInput ? "radixFocus" : void 0).begin : 0, f2.p = m2, l2.caretPos = {
624
- begin: m2
625
- };
626
- var b = [], k = l2.caretPos;
627
- if (h2.forEach(function(e4, t4) {
628
- if (void 0 !== e4) {
629
- var i4 = new d2.Event("_checkval");
630
- i4.key = e4, v2 += e4;
631
- var a3 = s.getLastValidPosition.call(l2, void 0, true);
632
- !(function(e5, t5) {
633
- for (var n4 = u.getMaskTemplate.call(l2, true, 0).slice(e5, s.seekNext.call(l2, e5, false, false)).join("").replace(/'/g, ""), i5 = n4.indexOf(t5); i5 > 0 && " " === n4[i5 - 1]; ) i5--;
634
- var a4 = 0 === i5 && !s.isMask.call(l2, e5) && (u.getTest.call(l2, e5).match.nativeDef === t5.charAt(0) || true === u.getTest.call(l2, e5).match.static && u.getTest.call(l2, e5).match.nativeDef === "'" + t5.charAt(0) || " " === u.getTest.call(l2, e5).match.nativeDef && (u.getTest.call(l2, e5 + 1).match.nativeDef === t5.charAt(0) || true === u.getTest.call(l2, e5 + 1).match.static && u.getTest.call(l2, e5 + 1).match.nativeDef === "'" + t5.charAt(0)));
635
- if (!a4 && i5 > 0 && !s.isMask.call(l2, e5, false, true)) {
636
- var r2 = s.seekNext.call(l2, e5);
637
- l2.caretPos.begin < r2 && (l2.caretPos = {
638
- begin: r2
639
- });
640
- }
641
- return a4;
642
- })(m2, v2) ? (o2 = r.EventHandlers.keypressEvent.call(l2, i4, true, false, n3, l2.caretPos.begin)) && (m2 = l2.caretPos.begin + 1, v2 = "") : o2 = true === u.getTest.call(l2, t4).match.static && r.EventHandlers.keypressEvent.call(l2, i4, true, false, n3, a3 + 1), o2 ? (void 0 !== o2.pos && f2.validPositions[o2.pos] && true === f2.validPositions[o2.pos].match.static && void 0 === f2.validPositions[o2.pos].alternation && (b.push(o2.pos), l2.isRTL || (o2.forwardPosition = o2.pos + 1)), y.call(l2, void 0, s.getBuffer.call(l2), o2.forwardPosition, i4, false), l2.caretPos = {
643
- begin: o2.forwardPosition,
644
- end: o2.forwardPosition
645
- }, k = l2.caretPos) : void 0 === f2.validPositions[t4] && h2[t4] === u.getPlaceholder.call(l2, t4) && s.isMask.call(l2, t4, true) ? l2.caretPos.begin++ : l2.caretPos = k;
646
- }
647
- }), b.length > 0) {
648
- var x, S, P = s.seekNext.call(l2, -1, void 0, false);
649
- if (!c.isComplete.call(l2, s.getBuffer.call(l2)) && b.length <= P || c.isComplete.call(l2, s.getBuffer.call(l2)) && b.length > 0 && b.length !== P && 0 === b[0]) {
650
- for (var O = P; void 0 !== (x = b.shift()); ) if (x < O) {
651
- var w = new d2.Event("_checkval");
652
- if ((S = f2.validPositions[x]).generatedInput = true, w.key = S.input, (o2 = r.EventHandlers.keypressEvent.call(l2, w, true, false, n3, O)) && void 0 !== o2.pos && o2.pos !== x && f2.validPositions[o2.pos] && true === f2.validPositions[o2.pos].match.static) b.push(o2.pos);
653
- else if (!o2) break;
654
- O++;
655
- }
656
- } else for (; x = b.pop(); ) (S = f2.validPositions[x]) && void 0 === f2.validPositions[x + 1] && delete f2.validPositions[x];
657
- }
658
- t3 && y.call(l2, e3, s.getBuffer.call(l2), o2 ? o2.forwardPosition : l2.caretPos.begin, a2 || new d2.Event("checkval"), a2 && ("input" === a2.type && l2.undoValue !== s.getBuffer.call(l2).join("") || "paste" === a2.type)), p2.skipOptionalPartCharacter = g2;
659
- }
660
- function y(e3, t3, n3, i3, a2) {
661
- var r2 = e3 ? e3.inputmask : this, o2 = r2.opts, u2 = r2.dependencyLib;
662
- if (i3 && "function" == typeof o2.onBeforeWrite) {
663
- var f2 = o2.onBeforeWrite.call(r2, i3, t3, n3, o2);
664
- if (f2) {
665
- if (f2.refreshFromBuffer) {
666
- var p2 = f2.refreshFromBuffer;
667
- c.refreshFromBuffer.call(r2, true === p2 ? p2 : p2.start, p2.end, f2.buffer || t3), t3 = s.getBuffer.call(r2, true);
668
- }
669
- void 0 !== n3 && (n3 = void 0 !== f2.caret ? f2.caret : n3);
670
- }
671
- }
672
- if (void 0 !== e3 && (e3.inputmask._valueSet(t3.join("")), void 0 === n3 || void 0 !== i3 && "blur" === i3.type || s.caret.call(r2, e3, n3, void 0, void 0, void 0 !== i3 && "keydown" === i3.type && (i3.key === l.keys.Delete || i3.key === l.keys.Backspace)), void 0 === e3.inputmask.writeBufferHook || e3.inputmask.writeBufferHook(n3), true === a2)) {
673
- var d2 = u2(e3), h2 = e3.inputmask._valueGet();
674
- e3.inputmask.skipInputEvent = true, d2.trigger("input"), setTimeout(function() {
675
- h2 === s.getBufferTemplate.call(r2).join("") ? d2.trigger("cleared") : true === c.isComplete.call(r2, t3) && d2.trigger("complete");
676
- }, 0);
677
- }
678
- }
679
- },
680
- 1669: function() {
681
- Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
682
- value: function(e2, t2) {
683
- if (null == this) throw new TypeError('"this" is null or not defined');
684
- var n2 = Object(this), i2 = n2.length >>> 0;
685
- if (0 === i2) return false;
686
- for (var a = 0 | t2, r = Math.max(a >= 0 ? a : i2 - Math.abs(a), 0); r < i2; ) {
687
- if (n2[r] === e2) return true;
688
- r++;
689
- }
690
- return false;
691
- }
692
- });
693
- },
694
- 1960: function() {
695
- var e2 = Function.bind.call(Function.call, Array.prototype.reduce), t2 = Function.bind.call(Function.call, Object.prototype.propertyIsEnumerable), n2 = Function.bind.call(Function.call, Array.prototype.concat), i2 = Object.keys;
696
- Object.entries || (Object.entries = function(a) {
697
- return e2(i2(a), function(e3, i3) {
698
- return n2(e3, "string" == typeof i3 && t2(a, i3) ? [[i3, a[i3]]] : []);
699
- }, []);
700
- });
701
- },
702
- 2088: function(e2, t2) {
703
- Object.defineProperty(t2, "__esModule", {
704
- value: true
705
- }), t2.default = function(e3, t3, n2) {
706
- if (void 0 === n2) return e3.__data ? e3.__data[t3] : null;
707
- e3.__data = e3.__data || {}, e3.__data[t3] = n2;
708
- };
709
- },
710
- 2952: function(e2, t2, n2) {
711
- var i2 = d(n2(6266)), a = d(n2(3978));
712
- function r(e3) {
713
- return r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
714
- return typeof e4;
715
- } : function(e4) {
716
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
717
- }, r(e3);
718
- }
719
- function o(e3, t3) {
720
- for (var n3 = 0; n3 < t3.length; n3++) {
721
- var i3 = t3[n3];
722
- i3.enumerable = i3.enumerable || false, i3.configurable = true, "value" in i3 && (i3.writable = true), Object.defineProperty(e3, l(i3.key), i3);
723
- }
724
- }
725
- function l(e3) {
726
- var t3 = (function(e4, t4) {
727
- if ("object" != r(e4) || !e4) return e4;
728
- var n3 = e4[Symbol.toPrimitive];
729
- if (void 0 !== n3) {
730
- var i3 = n3.call(e4, t4);
731
- if ("object" != r(i3)) return i3;
732
- throw new TypeError("@@toPrimitive must return a primitive value.");
733
- }
734
- return (String )(e4);
735
- })(e3, "string");
736
- return "symbol" == r(t3) ? t3 : t3 + "";
737
- }
738
- function s(e3, t3, n3) {
739
- return t3 = p(t3), (function(e4, t4) {
740
- if (t4 && ("object" == r(t4) || "function" == typeof t4)) return t4;
741
- if (void 0 !== t4) throw new TypeError("Derived constructors may only return object or undefined");
742
- return (function(e5) {
743
- if (void 0 === e5) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
744
- return e5;
745
- })(e4);
746
- })(e3, u() ? Reflect.construct(t3, [], p(e3).constructor) : t3.apply(e3, n3));
747
- }
748
- function c(e3) {
749
- var t3 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
750
- return c = function(e4) {
751
- if (null === e4 || !(function(e5) {
752
- try {
753
- return -1 !== Function.toString.call(e5).indexOf("[native code]");
754
- } catch (t4) {
755
- return "function" == typeof e5;
756
- }
757
- })(e4)) return e4;
758
- if ("function" != typeof e4) throw new TypeError("Super expression must either be null or a function");
759
- if (void 0 !== t3) {
760
- if (t3.has(e4)) return t3.get(e4);
761
- t3.set(e4, n3);
762
- }
763
- function n3() {
764
- return (function(e5, t4, n4) {
765
- if (u()) return Reflect.construct.apply(null, arguments);
766
- var i3 = [null];
767
- i3.push.apply(i3, t4);
768
- var a2 = new (e5.bind.apply(e5, i3))();
769
- return n4 && f(a2, n4.prototype), a2;
770
- })(e4, arguments, p(this).constructor);
771
- }
772
- return n3.prototype = Object.create(e4.prototype, {
773
- constructor: {
774
- value: n3,
775
- enumerable: false,
776
- writable: true,
777
- configurable: true
778
- }
779
- }), f(n3, e4);
780
- }, c(e3);
781
- }
782
- function u() {
783
- try {
784
- var e3 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
785
- }));
786
- } catch (e4) {
787
- }
788
- return (u = function() {
789
- return !!e3;
790
- })();
791
- }
792
- function f(e3, t3) {
793
- return f = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e4, t4) {
794
- return e4.__proto__ = t4, e4;
795
- }, f(e3, t3);
796
- }
797
- function p(e3) {
798
- return p = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e4) {
799
- return e4.__proto__ || Object.getPrototypeOf(e4);
800
- }, p(e3);
801
- }
802
- function d(e3) {
803
- return e3 && e3.__esModule ? e3 : {
804
- default: e3
805
- };
806
- }
807
- var h = i2.default.document;
808
- if (h && h.head && h.head.attachShadow && i2.default.customElements && void 0 === i2.default.customElements.get("input-mask")) {
809
- var v = (function(e3) {
810
- function t3() {
811
- var e4;
812
- !(function(e5, t4) {
813
- if (!(e5 instanceof t4)) throw new TypeError("Cannot call a class as a function");
814
- })(this, t3);
815
- var n4 = (e4 = s(this, t3)).getAttributeNames(), i4 = e4.attachShadow({
816
- mode: "closed"
817
- });
818
- for (var r3 in e4.input = h.createElement("input"), e4.input.type = "text", i4.appendChild(e4.input), n4) Object.prototype.hasOwnProperty.call(n4, r3) && e4.input.setAttribute(n4[r3], e4.getAttribute(n4[r3]));
819
- var o2 = new a.default();
820
- return o2.dataAttribute = "", o2.mask(e4.input), e4;
821
- }
822
- return (function(e4, t4) {
823
- if ("function" != typeof t4 && null !== t4) throw new TypeError("Super expression must either be null or a function");
824
- e4.prototype = Object.create(t4 && t4.prototype, {
825
- constructor: {
826
- value: e4,
827
- writable: true,
828
- configurable: true
829
- }
830
- }), Object.defineProperty(e4, "prototype", {
831
- writable: false
832
- }), t4 && f(e4, t4);
833
- })(t3, e3), n3 = t3, (i3 = [{
834
- key: "attributeChangedCallback",
835
- value: function(e4, t4, n4) {
836
- this.input.setAttribute(e4, n4);
837
- }
838
- }, {
839
- key: "value",
840
- get: function() {
841
- return this.input.value;
842
- },
843
- set: function(e4) {
844
- this.input.value = e4;
845
- }
846
- }]) && o(n3.prototype, i3), r2 && o(n3, r2), Object.defineProperty(n3, "prototype", {
847
- writable: false
848
- }), n3;
849
- var n3, i3, r2;
850
- })(c(HTMLElement));
851
- i2.default.customElements.define("input-mask", v);
852
- }
853
- },
854
- 3978: function(e2, t2, n2) {
855
- Object.defineProperty(t2, "__esModule", {
856
- value: true
857
- }), t2.default = void 0;
858
- var i2 = v(n2(7042)), a = v(n2(9472)), r = v(n2(7332)), o = n2(4136), l = v(n2(6266)), s = n2(1507), c = n2(4240), u = n2(4507), f = n2(7539), p = n2(7687), d = n2(5895);
859
- function h(e3) {
860
- return h = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
861
- return typeof e4;
862
- } : function(e4) {
863
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
864
- }, h(e3);
865
- }
866
- function v(e3) {
867
- return e3 && e3.__esModule ? e3 : {
868
- default: e3
869
- };
870
- }
871
- var m = l.default.document, g = "_inputmask_opts";
872
- function y(e3, t3, n3) {
873
- if (!(this instanceof y)) return new y(e3, t3, n3);
874
- this.dependencyLib = r.default, this.el = void 0, this.events = {}, this.maskset = void 0, true !== n3 && ("[object Object]" === Object.prototype.toString.call(e3) ? t3 = e3 : (t3 = t3 || {}, e3 && (t3.alias = e3)), this.opts = r.default.extend(true, {}, this.defaults, t3), this.noMasksCache = t3 && void 0 !== t3.definitions, this.userOptions = t3 || {}, b(this.opts.alias, t3, this.opts)), this.refreshValue = false, this.undoValue = void 0, this.$el = void 0, this.skipInputEvent = false, this.validationEvent = false, this.ignorable = false, this.maxLength, this.mouseEnter = false, this.clicked = 0, this.originalPlaceholder = void 0, this.isComposing = false, this.lastInputEvent = null, this.hasAlternator = false;
875
- }
876
- function b(e3, t3, n3) {
877
- var i3 = y.prototype.aliases[e3];
878
- return i3 ? (i3.alias && b(i3.alias, void 0, n3), r.default.extend(true, n3, i3), r.default.extend(true, n3, t3), true) : (null === n3.mask && (n3.mask = e3), false);
879
- }
880
- y.prototype = {
881
- dataAttribute: "data-inputmask",
882
- defaults: i2.default,
883
- definitions: a.default,
884
- aliases: {},
885
- masksCache: {},
886
- i18n: {},
887
- get isRTL() {
888
- return this.opts.isRTL || this.opts.numericInput;
889
- },
890
- mask: function(e3) {
891
- var t3 = this;
892
- return "string" == typeof e3 && (e3 = m.getElementById(e3) || m.querySelectorAll(e3)), (e3 = e3.nodeName ? [e3] : Array.isArray(e3) ? e3 : [].slice.call(e3)).forEach(function(e4, n3) {
893
- var i3 = r.default.extend(true, {}, t3.opts);
894
- if ((function(e5, t4, n4, i4) {
895
- function a3(t5, a4) {
896
- var r2 = "" === i4 ? t5 : i4 + "-" + t5;
897
- null !== (a4 = void 0 !== a4 ? a4 : e5.getAttribute(r2)) && ("string" == typeof a4 && (t5.startsWith("on") ? a4 = l.default[a4] : "false" === a4 ? a4 = false : "true" === a4 ? a4 = true : "mask" === t5 && (a4 = a4.replace(/\\\\/g, "\\"))), n4[t5] = a4);
898
- }
899
- if (true === t4.importDataAttributes) {
900
- var o2, s2, c2, u2, f2 = e5.getAttribute(i4);
901
- if (f2 && "" !== f2 && (f2 = f2.replace(/'/g, '"'), s2 = JSON.parse("{" + f2 + "}")), s2) {
902
- for (u2 in c2 = void 0, s2) if ("alias" === u2.toLowerCase()) {
903
- c2 = s2[u2];
904
- break;
905
- }
906
- }
907
- for (o2 in a3("alias", c2), n4.alias && b(n4.alias, n4, t4), t4) {
908
- if (s2) {
909
- for (u2 in c2 = void 0, s2) if (u2.toLowerCase() === o2.toLowerCase()) {
910
- c2 = s2[u2];
911
- break;
912
- }
913
- }
914
- a3(o2, c2);
915
- }
916
- }
917
- r.default.extend(true, t4, n4), ("rtl" === e5.dir || t4.rightAlign) && (e5.style.textAlign = "right");
918
- ("rtl" === e5.dir || t4.numericInput) && (e5.dir = "ltr", e5.removeAttribute("dir"), t4.isRTL = true);
919
- return Object.keys(n4).length;
920
- })(e4, i3, r.default.extend(true, {}, t3.userOptions), t3.dataAttribute)) {
921
- var a2 = (0, u.generateMaskSet)(i3, t3.noMasksCache);
922
- void 0 !== a2 && (void 0 !== e4.inputmask && (e4.inputmask.opts.autoUnmask = true, e4.inputmask.remove()), e4.inputmask = new y(void 0, void 0, true), e4.inputmask.opts = i3, e4.inputmask.noMasksCache = t3.noMasksCache, e4.inputmask.userOptions = r.default.extend(true, {}, t3.userOptions), e4.inputmask.el = e4, e4.inputmask.$el = (0, r.default)(e4), e4.inputmask.maskset = a2, r.default.data(e4, g, t3.userOptions), c.mask.call(e4.inputmask));
923
- }
924
- }), e3 && e3[0] && e3[0].inputmask || this;
925
- },
926
- option: function(e3, t3) {
927
- return "string" == typeof e3 ? this.opts[e3] : "object" === h(e3) ? (r.default.extend(this.userOptions, e3), this.el && true !== t3 && this.mask(this.el), this) : void 0;
928
- },
929
- unmaskedvalue: function(e3) {
930
- if (this.maskset = this.maskset || (0, u.generateMaskSet)(this.opts, this.noMasksCache), void 0 === this.el || void 0 !== e3) {
931
- var t3 = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e3, this.opts) || e3).split("");
932
- s.checkVal.call(this, void 0, false, false, t3), "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, f.getBuffer.call(this), 0, this.opts);
933
- }
934
- return s.unmaskedvalue.call(this, this.el);
935
- },
936
- remove: function() {
937
- if (this.el) {
938
- r.default.data(this.el, g, null);
939
- var e3 = this.opts.autoUnmask ? (0, s.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask);
940
- e3 !== f.getBufferTemplate.call(this).join("") ? this._valueSet(e3, this.opts.autoUnmask) : this._valueSet(""), o.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", {
941
- get: this.__valueGet,
942
- set: this.__valueSet,
943
- configurable: true
944
- }) : m.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet), this.el.__defineSetter__("value", this.__valueSet)), this.el.inputmask = void 0;
945
- }
946
- return this.el;
947
- },
948
- getemptymask: function() {
949
- return this.maskset = this.maskset || (0, u.generateMaskSet)(this.opts, this.noMasksCache), (this.isRTL ? f.getBufferTemplate.call(this).reverse() : f.getBufferTemplate.call(this)).join("");
950
- },
951
- hasMaskedValue: function() {
952
- return !this.opts.autoUnmask;
953
- },
954
- isComplete: function() {
955
- return this.maskset = this.maskset || (0, u.generateMaskSet)(this.opts, this.noMasksCache), p.isComplete.call(this, f.getBuffer.call(this));
956
- },
957
- getmetadata: function() {
958
- if (this.maskset = this.maskset || (0, u.generateMaskSet)(this.opts, this.noMasksCache), Array.isArray(this.maskset.metadata)) {
959
- var e3 = d.getMaskTemplate.call(this, true, 0, false).join("");
960
- return this.maskset.metadata.forEach(function(t3) {
961
- return t3.mask !== e3 || (e3 = t3, false);
962
- }), e3;
963
- }
964
- return this.maskset.metadata;
965
- },
966
- isValid: function(e3) {
967
- if (this.maskset = this.maskset || (0, u.generateMaskSet)(this.opts, this.noMasksCache), e3) {
968
- var t3 = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e3, this.opts) || e3).split("");
969
- s.checkVal.call(this, void 0, true, false, t3);
970
- }
971
- var n3 = s.clearOptionalTail.call(this, []), i3 = p.isComplete.call(this, n3), a2 = e3 === (this.isRTL ? n3.reverse().join("") : n3.join(""));
972
- return i3 && (void 0 === e3 || a2);
973
- },
974
- format: function(e3, t3) {
975
- this.maskset = this.maskset || (0, u.generateMaskSet)(this.opts, this.noMasksCache);
976
- var n3 = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e3, this.opts) || e3).split("");
977
- s.checkVal.call(this, void 0, true, false, n3);
978
- var i3 = this.isRTL ? f.getBuffer.call(this).slice().reverse().join("") : f.getBuffer.call(this).join("");
979
- return t3 ? {
980
- value: i3,
981
- metadata: this.getmetadata()
982
- } : i3;
983
- },
984
- setValue: function(e3) {
985
- this.el && (0, r.default)(this.el).trigger("setvalue", [e3]);
986
- },
987
- analyseMask: u.analyseMask
988
- }, y.extendDefaults = function(e3) {
989
- r.default.extend(true, y.prototype.defaults, e3);
990
- }, y.extendDefinitions = function(e3) {
991
- r.default.extend(true, y.prototype.definitions, e3);
992
- }, y.extendAliases = function(e3) {
993
- r.default.extend(true, y.prototype.aliases, e3);
994
- }, y.format = function(e3, t3, n3) {
995
- return y(t3).format(e3, n3);
996
- }, y.unmask = function(e3, t3) {
997
- return y(t3).unmaskedvalue(e3);
998
- }, y.isValid = function(e3, t3) {
999
- return y(t3).isValid(e3);
1000
- }, y.remove = function(e3) {
1001
- "string" == typeof e3 && (e3 = m.getElementById(e3) || m.querySelectorAll(e3)), e3 = e3.nodeName ? [e3] : e3;
1002
- for (var t3 = 0; t3 < e3.length; t3++) e3[t3].inputmask && e3[t3].inputmask.remove();
1003
- }, y.setValue = function(e3, t3) {
1004
- "string" == typeof e3 && (e3 = m.getElementById(e3) || m.querySelectorAll(e3)), (e3 = e3.nodeName ? [e3] : e3).forEach(function(e4) {
1005
- e4.inputmask ? e4.inputmask.setValue(t3) : (0, r.default)(e4).trigger("setvalue", [t3]);
1006
- });
1007
- }, y.dependencyLib = r.default, l.default.Inputmask = y;
1008
- t2.default = y;
1009
- },
1010
- 4136: function(e2, t2, n2) {
1011
- Object.defineProperty(t2, "__esModule", {
1012
- value: true
1013
- }), t2.EventRuler = void 0;
1014
- var i2, a = n2(1507), r = (i2 = n2(3978)) && i2.__esModule ? i2 : {
1015
- default: i2
1016
- }, o = n2(6032), l = n2(7539);
1017
- t2.EventRuler = {
1018
- on: function(e3, t3, n3) {
1019
- var i3 = e3.inputmask.dependencyLib, s = function(t4) {
1020
- t4.originalEvent && (t4 = t4.originalEvent || t4, arguments[0] = t4);
1021
- var s2, c = this, u = c.inputmask, f = u ? u.opts : void 0;
1022
- if (void 0 === u && "FORM" !== this.nodeName) {
1023
- var p = i3.data(c, "_inputmask_opts");
1024
- i3(c).off(), p && new r.default(p).mask(c);
1025
- } else {
1026
- if (["submit", "reset", "setvalue"].includes(t4.type) || "FORM" === this.nodeName || !(c.disabled || c.readOnly && !("keydown" === t4.type && t4.ctrlKey && t4.key === o.keys.c || false === f.tabThrough && t4.key === o.keys.Tab))) {
1027
- switch (t4.type) {
1028
- case "input":
1029
- if (true === u.skipInputEvent) return u.skipInputEvent = false, t4.preventDefault();
1030
- u.lastInputEvent = {
1031
- time: Date.now(),
1032
- data: t4.data
1033
- };
1034
- break;
1035
- case "keydown":
1036
- if (u.lastInputEvent && Date.now() - u.lastInputEvent.time < 10 && u.lastInputEvent.data === t4.key) return false;
1037
- break;
1038
- case "click":
1039
- case "focus":
1040
- return u.validationEvent ? (u.validationEvent = false, e3.blur(), (0, a.HandleNativePlaceholder)(e3, (u.isRTL ? l.getBufferTemplate.call(u).slice().reverse() : l.getBufferTemplate.call(u)).join("")), setTimeout(function() {
1041
- e3.focus();
1042
- }, f.validationEventTimeOut), false) : (s2 = arguments, void setTimeout(function() {
1043
- e3.inputmask && n3.apply(c, s2);
1044
- }, 0));
1045
- }
1046
- var d = n3.apply(c, arguments);
1047
- return false === d && (t4.preventDefault(), t4.stopPropagation()), d;
1048
- }
1049
- t4.preventDefault();
1050
- }
1051
- };
1052
- t3 = "".concat(t3, ".inputmask"), ["submit.inputmask", "reset.inputmask"].includes(t3) ? (s = s.bind(e3), null !== e3.form && i3(e3.form).on(t3, s)) : i3(e3).on(t3, s);
1053
- },
1054
- off: function(e3, t3) {
1055
- e3.inputmask && (0, e3.inputmask.dependencyLib)(e3).off(t3 || ".inputmask");
1056
- }
1057
- };
1058
- },
1059
- 4203: function(e2, t2, n2) {
1060
- var i2, a = n2(340), r = (i2 = n2(3978)) && i2.__esModule ? i2 : {
1061
- default: i2
1062
- }, o = n2(6032), l = n2(7539), s = n2(5895);
1063
- function c(e3, t3) {
1064
- return (function(e4) {
1065
- if (Array.isArray(e4)) return e4;
1066
- })(e3) || (function(e4, t4) {
1067
- var n3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
1068
- if (null != n3) {
1069
- var i3, a2, r2, o2, l2 = [], s2 = true, c2 = false;
1070
- try {
1071
- if (r2 = (n3 = n3.call(e4)).next, 0 === t4) ; else for (; !(s2 = (i3 = r2.call(n3)).done) && (l2.push(i3.value), l2.length !== t4); s2 = true) ;
1072
- } catch (e5) {
1073
- c2 = true, a2 = e5;
1074
- } finally {
1075
- try {
1076
- if (!s2 && null != n3.return && (o2 = n3.return(), Object(o2) !== o2)) return;
1077
- } finally {
1078
- if (c2) throw a2;
1079
- }
1080
- }
1081
- return l2;
1082
- }
1083
- })(e3, t3) || u(e3, t3) || (function() {
1084
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1085
- })();
1086
- }
1087
- function u(e3, t3) {
1088
- if (e3) {
1089
- if ("string" == typeof e3) return f(e3, t3);
1090
- var n3 = {}.toString.call(e3).slice(8, -1);
1091
- return "Object" === n3 && e3.constructor && (n3 = e3.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(e3) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? f(e3, t3) : void 0;
1092
- }
1093
- }
1094
- function f(e3, t3) {
1095
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
1096
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
1097
- return i3;
1098
- }
1099
- function p(e3) {
1100
- return p = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
1101
- return typeof e4;
1102
- } : function(e4) {
1103
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
1104
- }, p(e3);
1105
- }
1106
- function d(e3, t3) {
1107
- for (var n3 = 0; n3 < t3.length; n3++) {
1108
- var i3 = t3[n3];
1109
- i3.enumerable = i3.enumerable || false, i3.configurable = true, "value" in i3 && (i3.writable = true), Object.defineProperty(e3, h(i3.key), i3);
1110
- }
1111
- }
1112
- function h(e3) {
1113
- var t3 = (function(e4, t4) {
1114
- if ("object" != p(e4) || !e4) return e4;
1115
- var n3 = e4[Symbol.toPrimitive];
1116
- if (void 0 !== n3) {
1117
- var i3 = n3.call(e4, t4);
1118
- if ("object" != p(i3)) return i3;
1119
- throw new TypeError("@@toPrimitive must return a primitive value.");
1120
- }
1121
- return (String )(e4);
1122
- })(e3, "string");
1123
- return "symbol" == p(t3) ? t3 : t3 + "";
1124
- }
1125
- n2(7153);
1126
- var v = r.default.dependencyLib, m = (function() {
1127
- return (function(e3, t3, n3) {
1128
- return t3 && d(e3.prototype, t3), Object.defineProperty(e3, "prototype", {
1129
- writable: false
1130
- }), e3;
1131
- })(function e3(t3, n3, i3, a2) {
1132
- !(function(e4, t4) {
1133
- if (!(e4 instanceof t4)) throw new TypeError("Cannot call a class as a function");
1134
- })(this, e3), this.mask = t3, this.format = n3, this.opts = i3, this.inputmask = a2, this._date = new Date(1, 0, 1), this.initDateObject(t3, this.opts, this.inputmask);
1135
- }, [{
1136
- key: "date",
1137
- get: function() {
1138
- return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts, this.inputmask)), this._date;
1139
- }
1140
- }, {
1141
- key: "initDateObject",
1142
- value: function(e3, t3, n3) {
1143
- var i3, a2 = -1;
1144
- for (M(t3).lastIndex = 0; i3 = M(t3).exec(this.format); ) if (i3.index >= a2) {
1145
- var r2 = /\d+$/.exec(i3[0]), o2 = r2 ? i3[0][0] + "x" : i3[0], l2 = void 0;
1146
- if (void 0 !== e3) {
1147
- if (r2) {
1148
- var c2 = M(t3).lastIndex, u2 = D.call(n3, i3.index, t3, n3 && n3.maskset);
1149
- M(t3).lastIndex = c2, l2 = e3.slice(0, e3.indexOf(u2.nextMatch[0]));
1150
- } else {
1151
- for (var f2 = i3[0][0], p2 = i3.index; n3 && (t3.placeholder["".concat(i3.index, "'").concat(s.getTest.call(n3, p2).match.placeholder)] || s.getTest.call(n3, p2).match.placeholder) === f2; ) p2++;
1152
- a2 = p2;
1153
- var d2 = p2 - i3.index;
1154
- l2 = e3.slice(0, d2 || w(o2) && w(o2)[4] || o2.length);
1155
- }
1156
- e3 = e3.slice(l2.length);
1157
- }
1158
- Object.prototype.hasOwnProperty.call(k, o2) && this.setValue(this, l2, o2, w(o2)[2], w(o2)[1]);
1159
- }
1160
- }
1161
- }, {
1162
- key: "setValue",
1163
- value: function(e3, t3, n3, i3, a2) {
1164
- if (void 0 !== t3) switch (i3) {
1165
- case "ampm":
1166
- e3[i3] = t3, e3["raw" + i3] = t3.replace(/\s/g, "_");
1167
- break;
1168
- case "month":
1169
- if ("MMM" === n3 || "MMMM" === n3) {
1170
- e3[i3] = j("MMM" === n3 ? b.monthNames.slice(0, 12).findIndex(function(e4) {
1171
- return t3.toLowerCase() === e4.toLowerCase();
1172
- }) + 1 : b.monthNames.slice(12, 24).findIndex(function(e4) {
1173
- return t3.toLowerCase() === e4.toLowerCase();
1174
- }) + 1, 2), e3[i3] = "00" === e3[i3] ? "" : e3[i3].toString(), e3["raw" + i3] = e3[i3];
1175
- break;
1176
- }
1177
- default:
1178
- e3[i3] = t3.replace(/[^0-9]/g, "0"), e3["raw" + i3] = t3.replace(/\s/g, "_");
1179
- }
1180
- if (void 0 !== a2) {
1181
- var r2 = e3[i3];
1182
- ("day" === i3 && 29 === parseInt(r2) || "month" === i3 && 2 === parseInt(r2)) && (29 !== parseInt(e3.day) || 2 !== parseInt(e3.month) || "" !== e3.year && void 0 !== e3.year || e3._date.setFullYear(2012, 1, 29)), "day" === i3 && (g = true, 0 === parseInt(r2) && (r2 = 1)), "month" === i3 && (g = true), "year" === i3 && (g = true, r2.length < w(n3)[4] && (r2 = j(r2, w(n3)[4], true))), ("" !== r2 && !isNaN(r2) || "ampm" === i3) && a2.call(e3._date, r2);
1183
- }
1184
- }
1185
- }, {
1186
- key: "reset",
1187
- value: function() {
1188
- this._date = new Date(1, 0, 1);
1189
- }
1190
- }, {
1191
- key: "reInit",
1192
- value: function() {
1193
- this._date = void 0, this.date;
1194
- }
1195
- }]);
1196
- })(), g = false, y = (/* @__PURE__ */ new Date()).getFullYear(), b = r.default.prototype.i18n, k = {
1197
- d: ["[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate],
1198
- dd: ["0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
1199
- return j(Date.prototype.getDate.call(this), 2);
1200
- }],
1201
- ddd: [""],
1202
- dddd: [""],
1203
- M: ["[1-9]|1[012]", function(e3) {
1204
- var t3 = e3 ? parseInt(e3) : 0;
1205
- return t3 > 0 && t3--, Date.prototype.setMonth.call(this, t3);
1206
- }, "month", function() {
1207
- return Date.prototype.getMonth.call(this) + 1;
1208
- }],
1209
- MM: ["0[1-9]|1[012]", function(e3) {
1210
- var t3 = e3 ? parseInt(e3) : 0;
1211
- return t3 > 0 && t3--, Date.prototype.setMonth.call(this, t3);
1212
- }, "month", function() {
1213
- return j(Date.prototype.getMonth.call(this) + 1, 2);
1214
- }],
1215
- MMM: [b.monthNames.slice(0, 12).join("|"), function(e3) {
1216
- var t3 = b.monthNames.slice(0, 12).findIndex(function(t4) {
1217
- return e3.toLowerCase() === t4.toLowerCase();
1218
- });
1219
- return -1 !== t3 && Date.prototype.setMonth.call(this, t3);
1220
- }, "month", function() {
1221
- return b.monthNames.slice(0, 12)[Date.prototype.getMonth.call(this)];
1222
- }],
1223
- MMMM: [b.monthNames.slice(12, 24).join("|"), function(e3) {
1224
- var t3 = b.monthNames.slice(12, 24).findIndex(function(t4) {
1225
- return e3.toLowerCase() === t4.toLowerCase();
1226
- });
1227
- return -1 !== t3 && Date.prototype.setMonth.call(this, t3);
1228
- }, "month", function() {
1229
- return b.monthNames.slice(12, 24)[Date.prototype.getMonth.call(this)];
1230
- }],
1231
- yy: ["[0-9]{2}", function(e3) {
1232
- var t3 = (/* @__PURE__ */ new Date()).getFullYear().toString().slice(0, 2);
1233
- Date.prototype.setFullYear.call(this, "".concat(t3).concat(e3));
1234
- }, "year", function() {
1235
- return j(Date.prototype.getFullYear.call(this), 2);
1236
- }, 2],
1237
- yyyy: ["[0-9]{4}", Date.prototype.setFullYear, "year", function() {
1238
- return j(Date.prototype.getFullYear.call(this), 4);
1239
- }, 4],
1240
- h: ["[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours],
1241
- hh: ["0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
1242
- return j(Date.prototype.getHours.call(this), 2);
1243
- }],
1244
- hx: [function(e3) {
1245
- return "[0-9]{".concat(e3, "}");
1246
- }, Date.prototype.setHours, "hours", function(e3) {
1247
- return Date.prototype.getHours;
1248
- }],
1249
- H: ["1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours],
1250
- HH: ["0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() {
1251
- return j(Date.prototype.getHours.call(this), 2);
1252
- }],
1253
- Hx: [function(e3) {
1254
- return "[0-9]{".concat(e3, "}");
1255
- }, Date.prototype.setHours, "hours", function(e3) {
1256
- return function() {
1257
- return j(Date.prototype.getHours.call(this), e3);
1258
- };
1259
- }],
1260
- m: ["[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes],
1261
- mm: ["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
1262
- return j(Date.prototype.getMinutes.call(this), 2);
1263
- }],
1264
- s: ["[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds],
1265
- ss: ["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() {
1266
- return j(Date.prototype.getSeconds.call(this), 2);
1267
- }],
1268
- l: ["[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
1269
- return j(Date.prototype.getMilliseconds.call(this), 3);
1270
- }, 3],
1271
- L: ["[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() {
1272
- return j(Date.prototype.getMilliseconds.call(this), 2);
1273
- }, 2],
1274
- t: ["[ap]", P, "ampm", O, 1],
1275
- tt: ["[ap]m", P, "ampm", O, 2],
1276
- T: ["[AP]", P, "ampm", O, 1],
1277
- TT: ["[AP]M", P, "ampm", O, 2],
1278
- Z: [".*", void 0, "Z", function() {
1279
- var e3 = this.toString().match(/\((.+)\)/)[1];
1280
- e3.includes(" ") && (e3 = (e3 = e3.replace("-", " ").toUpperCase()).split(" ").map(function(e4) {
1281
- return c(e4, 1)[0];
1282
- }).join(""));
1283
- return e3;
1284
- }],
1285
- o: [""],
1286
- S: [""]
1287
- }, x = {
1288
- D: "d",
1289
- DD: "dd",
1290
- DDD: "ddd",
1291
- DDDD: "dddd",
1292
- YY: "yy",
1293
- YYYY: "yyyy",
1294
- sss: "L"
1295
- }, S = {
1296
- isoDate: "yyyy-MM-dd",
1297
- isoTime: "HH:mm:ss",
1298
- isoDateTime: "yyyy-MM-dd\\THH:mm:ss",
1299
- isoUtcDateTime: "UTC:yyyy-MM-dd\\THH:mm:ss\\Z"
1300
- };
1301
- function P(e3) {
1302
- var t3 = this.getHours();
1303
- e3.toLowerCase().includes("p") ? this.setHours(t3 + 12) : e3.toLowerCase().includes("a") && t3 >= 12 && this.setHours(t3 - 12);
1304
- }
1305
- function O() {
1306
- var e3 = this.getHours();
1307
- return (e3 = e3 || 12) >= 12 ? "PM" : "AM";
1308
- }
1309
- function w(e3) {
1310
- var t3 = x[e3] || e3, n3 = /\d+$/.exec(t3);
1311
- if (n3 && void 0 !== n3[0]) {
1312
- var i3 = k[t3[0] + "x"].slice("");
1313
- return i3[0] = i3[0](n3[0]), i3[3] = i3[3](n3[0]), i3;
1314
- }
1315
- if (k[t3]) return k[t3];
1316
- }
1317
- function M(e3) {
1318
- if (!e3.tokenizer) {
1319
- var t3, n3 = [], i3 = [], a2 = (function(e4, t4) {
1320
- var n4 = "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
1321
- if (!n4) {
1322
- if (Array.isArray(e4) || (n4 = u(e4)) || t4) {
1323
- n4 && (e4 = n4);
1324
- var i4 = 0, a3 = function() {
1325
- };
1326
- return {
1327
- s: a3,
1328
- n: function() {
1329
- return i4 >= e4.length ? {
1330
- done: true
1331
- } : {
1332
- done: false,
1333
- value: e4[i4++]
1334
- };
1335
- },
1336
- e: function(e5) {
1337
- throw e5;
1338
- },
1339
- f: a3
1340
- };
1341
- }
1342
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1343
- }
1344
- var r3, o3 = true, l2 = false;
1345
- return {
1346
- s: function() {
1347
- n4 = n4.call(e4);
1348
- },
1349
- n: function() {
1350
- var e5 = n4.next();
1351
- return o3 = e5.done, e5;
1352
- },
1353
- e: function(e5) {
1354
- l2 = true, r3 = e5;
1355
- },
1356
- f: function() {
1357
- try {
1358
- o3 || null == n4.return || n4.return();
1359
- } finally {
1360
- if (l2) throw r3;
1361
- }
1362
- }
1363
- };
1364
- })(Object.keys(k).concat(Object.keys(x)));
1365
- try {
1366
- for (a2.s(); !(t3 = a2.n()).done; ) {
1367
- var r2 = t3.value;
1368
- if (/\.*x$/.test(r2)) {
1369
- var o2 = r2[0] + "\\d+";
1370
- -1 === i3.indexOf(o2) && i3.push(o2);
1371
- } else -1 === n3.indexOf(r2[0]) && n3.push(r2[0]);
1372
- }
1373
- } catch (e4) {
1374
- a2.e(e4);
1375
- } finally {
1376
- a2.f();
1377
- }
1378
- e3.tokenizer = "(" + (i3.length > 0 ? i3.join("|") + "|" : "") + n3.join("+|") + "+)+?|.", e3.tokenizer = new RegExp(e3.tokenizer, "g");
1379
- }
1380
- return e3.tokenizer;
1381
- }
1382
- function _(e3, t3, n3) {
1383
- if (!g) return true;
1384
- if (void 0 === e3.rawday || !isFinite(e3.rawday) && new Date(e3.date.getFullYear(), isFinite(e3.rawmonth) ? e3.month : e3.date.getMonth() + 1, 0).getDate() >= e3.day || "29" == e3.day && (!isFinite(e3.rawyear) || void 0 === e3.rawyear || "" === e3.rawyear) || new Date(e3.date.getFullYear(), isFinite(e3.rawmonth) ? e3.month : e3.date.getMonth() + 1, 0).getDate() >= e3.day) return t3;
1385
- if ("29" == e3.day) {
1386
- var i3 = D.call(this, t3.pos, n3, this.maskset);
1387
- if (i3.targetMatch && ["yyyy", "YYYY"].includes(i3.targetMatch[0]) && t3.pos - i3.targetMatchIndex === 2) return t3.remove = t3.pos + 1, t3;
1388
- } else if (2 == e3.date.getMonth() && "30" == e3.day && void 0 !== t3.c) return e3.day = "03", e3.date.setDate(3), e3.date.setMonth(1), t3.insert = [{
1389
- pos: t3.pos,
1390
- c: "0"
1391
- }, {
1392
- pos: t3.pos + 1,
1393
- c: t3.c
1394
- }], t3.caret = l.seekNext.call(this, t3.pos + 1), t3;
1395
- return false;
1396
- }
1397
- function E(e3, t3, n3) {
1398
- var i3, r2, o2 = "", l2 = 0, s2 = false, c2 = {};
1399
- for (M(n3).lastIndex = 0; i3 = M(n3).exec(e3); ) if (i3[0] === n3.escapeChar) s2 = true;
1400
- else {
1401
- if (void 0 === t3) if (!s2 && (r2 = w(i3[0]))) o2 += "(" + r2[0] + ")", n3.placeholder && "" !== n3.placeholder ? (c2[l2] = n3.placeholder[i3.index % n3.placeholder.length], c2["".concat(i3.index, "'").concat(n3.placeholder[i3.index % n3.placeholder.length])] = i3[0].charAt(0)) : c2[l2] = i3[0].charAt(0);
1402
- else switch (i3[0]) {
1403
- case "[":
1404
- o2 += "(";
1405
- break;
1406
- case "]":
1407
- o2 += ")?";
1408
- break;
1409
- default:
1410
- o2 += (0, a.escapeRegex)(i3[0]), c2[l2] = i3[0].charAt(0);
1411
- }
1412
- else if (!s2 && (r2 = w(i3[0]))) if (r2[3]) o2 += r2[3].call(t3.date);
1413
- else r2[2] && void 0 !== t3["raw" + r2[2]] ? o2 += t3["raw" + r2[2]] : o2 += i3[0];
1414
- else o2 += i3[0];
1415
- l2++, s2 = false;
1416
- }
1417
- return void 0 === t3 && (n3.placeholder = c2), o2;
1418
- }
1419
- function j(e3, t3, n3) {
1420
- for (e3 = String(e3), t3 = t3 || 2; e3.length < t3; ) e3 = n3 ? e3 + "0" : "0" + e3;
1421
- return e3;
1422
- }
1423
- function T(e3, t3, n3) {
1424
- return "string" == typeof e3 ? new m(e3, t3, n3, this) : e3 && "object" === p(e3) && Object.prototype.hasOwnProperty.call(e3, "date") ? e3 : void 0;
1425
- }
1426
- function A(e3, t3) {
1427
- return E(t3.inputFormat, {
1428
- date: e3
1429
- }, t3);
1430
- }
1431
- function D(e3, t3, n3) {
1432
- var i3, a2, r2 = this, o2 = 0, l2 = 0;
1433
- for (M(t3).lastIndex = 0; a2 = M(t3).exec(t3.inputFormat); ) {
1434
- var c2 = /\d+$/.exec(a2[0]);
1435
- if (c2) l2 = parseInt(c2[0]);
1436
- else {
1437
- for (var u2 = a2[0][0], f2 = o2; r2 && (t3.placeholder["".concat(a2.index, "'").concat(s.getTest.call(r2, f2).match.placeholder)] || s.getTest.call(r2, f2).match.placeholder) === u2; ) f2++;
1438
- 0 === (l2 = f2 - o2) && (l2 = a2[0].length);
1439
- }
1440
- if ((o2 += l2) >= e3 + 1) {
1441
- var p2 = "";
1442
- if (n3 && n3.tests[e3]) {
1443
- var d2 = Object.keys(t3.placeholder).filter(function(t4) {
1444
- for (var i4 = a2.index - 1; i4 < o2; i4++) if (t4 === "".concat(i4, "'").concat(n3.tests[e3][0].match.placeholder)) return true;
1445
- return false;
1446
- });
1447
- p2 = d2.length > 0 ? t3.placeholder[d2[0]] : n3.tests[e3][0].match.placeholder;
1448
- }
1449
- if (-1 !== a2[0].indexOf(p2)) {
1450
- i3 = a2, a2 = M(t3).exec(t3.inputFormat);
1451
- break;
1452
- }
1453
- }
1454
- }
1455
- return {
1456
- targetMatchIndex: o2 - l2,
1457
- nextMatch: a2,
1458
- targetMatch: i3
1459
- };
1460
- }
1461
- r.default.extendAliases({
1462
- datetime: {
1463
- mask: function(e3) {
1464
- if (e3.numericInput = false, k.S = b.ordinalSuffix.join("|"), e3.inputFormat = S[e3.inputFormat] || e3.inputFormat, e3.repeat && (e3.repeat = parseInt(e3.repeat.toString()), e3.repeat > 0)) {
1465
- for (var t3 = "", n3 = 0; n3 < e3.repeat; n3++) t3 += e3.inputFormat;
1466
- e3.inputFormat = t3, e3.repeat = 0;
1467
- }
1468
- return e3.displayFormat = S[e3.displayFormat] || e3.displayFormat || e3.inputFormat, e3.outputFormat = S[e3.outputFormat] || e3.outputFormat || e3.inputFormat, e3.regex = E(e3.inputFormat, void 0, e3), e3.min = T(e3.min, e3.inputFormat, e3), e3.max = T(e3.max, e3.inputFormat, e3), null;
1469
- },
1470
- placeholder: "",
1471
- inputFormat: "isoDateTime",
1472
- displayFormat: null,
1473
- outputFormat: null,
1474
- min: null,
1475
- max: null,
1476
- skipOptionalPartCharacter: "",
1477
- preValidation: function(e3, t3, n3, i3, a2, r2, o2, l2) {
1478
- if (l2) return true;
1479
- if (isNaN(n3) && e3[t3] !== n3) {
1480
- var s2 = D.call(this, t3, a2, r2);
1481
- if (s2.nextMatch && s2.nextMatch[0] === n3 && s2.targetMatch[0].length > 1) {
1482
- var c2 = w(s2.targetMatch[0])[0];
1483
- if (new RegExp(c2).test("0" + e3[t3 - 1])) return e3[t3] = e3[t3 - 1], e3[t3 - 1] = "0", {
1484
- fuzzy: true,
1485
- buffer: e3,
1486
- refreshFromBuffer: {
1487
- start: t3 - 1,
1488
- end: t3 + 1
1489
- },
1490
- pos: t3 + 1
1491
- };
1492
- }
1493
- }
1494
- return true;
1495
- },
1496
- postValidation: function(e3, t3, n3, i3, a2, r2, o2, l2) {
1497
- var c2, u2, f2 = this;
1498
- if (o2) return true;
1499
- if (false === i3 && ((c2 = D.call(f2, t3 + 1, a2, r2)).targetMatch && c2.targetMatchIndex === t3 && c2.targetMatch[0].length > 1 && void 0 !== w(c2.targetMatch[0]) ? u2 = w(c2.targetMatch[0])[0] : (c2 = D.call(f2, t3 + 2, a2, r2)).targetMatch && c2.targetMatchIndex === t3 + 1 && c2.targetMatch[0].length > 1 && void 0 !== w(c2.targetMatch[0]) && (u2 = w(c2.targetMatch[0])), void 0 !== u2 && (t3 = c2.targetMatchIndex, void 0 !== r2.validPositions[t3 + 1] && new RegExp(u2).test(n3 + "0") ? (e3[t3] = n3, e3[t3 + 1] = "0", i3 = {
1500
- pos: t3 + 2,
1501
- caret: t3 + 1
1502
- }) : new RegExp(u2).test("0" + n3) && (e3[t3] = "0", e3[t3 + 1] = n3, i3 = {
1503
- pos: t3 + 2
1504
- })), false === i3)) return i3;
1505
- if (i3.fuzzy && (e3 = i3.buffer, t3 = i3.pos), (c2 = D.call(f2, t3, a2, r2)).targetMatch && c2.targetMatch[0] && void 0 !== w(c2.targetMatch[0])) {
1506
- var p2 = w(c2.targetMatch[0]);
1507
- u2 = p2[0];
1508
- var d2 = e3.slice(c2.targetMatchIndex, c2.targetMatchIndex + c2.targetMatch[0].length);
1509
- if (false === new RegExp(u2).test(d2.join("")) && 2 === c2.targetMatch[0].length && r2.validPositions[c2.targetMatchIndex] && r2.validPositions[c2.targetMatchIndex + 1] && (r2.validPositions[c2.targetMatchIndex + 1].input = "0"), "year" == p2[2]) for (var h2 = s.getMaskTemplate.call(f2, false, 1, void 0, true), v2 = t3 + 1; v2 < e3.length; v2++) e3[v2] = h2[v2], r2.validPositions.splice(t3 + 1, 1);
1510
- }
1511
- var m2 = i3, g2 = T.call(f2, e3.join(""), a2.inputFormat, a2);
1512
- return m2 && !isNaN(g2.date.getTime()) && (a2.prefillYear && (m2 = (function(e4, t4, n4) {
1513
- if (e4.year !== e4.rawyear) {
1514
- var i4 = y.toString(), a3 = e4.rawyear.replace(/[^0-9]/g, ""), r3 = i4.slice(0, a3.length), o3 = i4.slice(a3.length);
1515
- if (2 === a3.length && a3 === r3) {
1516
- var l3 = new Date(y, e4.month - 1, e4.day);
1517
- e4.day == l3.getDate() && (!n4.max || n4.max.date.getTime() >= l3.getTime()) && (e4.date.setFullYear(y), e4.year = i4, t4.insert = [{
1518
- pos: t4.pos + 1,
1519
- c: o3[0]
1520
- }, {
1521
- pos: t4.pos + 2,
1522
- c: o3[1]
1523
- }]);
1524
- }
1525
- }
1526
- return t4;
1527
- })(g2, m2, a2)), m2 = (function(e4, t4, n4, i4) {
1528
- if (!t4) return t4;
1529
- if (t4 && n4.min && !isNaN(n4.min.date.getTime())) {
1530
- var a3;
1531
- for (e4.reset(), M(n4).lastIndex = 0; a3 = M(n4).exec(n4.inputFormat); ) {
1532
- var r3;
1533
- if ((r3 = w(a3[0])) && r3[3]) {
1534
- for (var o3 = r3[1], l3 = e4[r3[2]], s2 = n4.min[r3[2]], c3 = n4.max ? n4.max[r3[2]] : s2 + 1, u3 = [], f3 = false, p3 = 0; p3 < s2.length; p3++) void 0 !== i4.validPositions[p3 + a3.index] || f3 ? (u3[p3] = l3[p3], f3 = f3 || l3[p3] > s2[p3]) : (p3 + a3.index == 0 && l3[p3] < s2[p3] ? (u3[p3] = l3[p3], f3 = true) : u3[p3] = s2[p3], "year" === r3[2] && l3.length - 1 == p3 && s2 != c3 && (u3 = (parseInt(u3.join("")) + 1).toString().split("")), "ampm" === r3[2] && s2 != c3 && n4.min.date.getTime() > e4.date.getTime() && (u3[p3] = c3[p3]));
1535
- o3.call(e4._date, u3.join(""));
1536
- }
1537
- }
1538
- t4 = n4.min.date.getTime() <= e4.date.getTime(), e4.reInit();
1539
- }
1540
- return t4 && n4.max && (isNaN(n4.max.date.getTime()) || (t4 = n4.max.date.getTime() >= e4.date.getTime())), t4;
1541
- })(g2, m2 = _.call(f2, g2, m2, a2), a2, r2)), void 0 !== t3 && m2 && i3.pos !== t3 ? {
1542
- buffer: E(a2.inputFormat, g2, a2).split(""),
1543
- refreshFromBuffer: {
1544
- start: t3,
1545
- end: i3.pos
1546
- },
1547
- pos: void 0 !== i3.caret ? i3.caret : i3.pos
1548
- } : m2;
1549
- },
1550
- onKeyDown: function(e3, t3, n3, i3) {
1551
- e3.ctrlKey && e3.key === o.keys.ArrowRight && (this.inputmask._valueSet(A(/* @__PURE__ */ new Date(), i3)), v(this).trigger("setvalue"));
1552
- },
1553
- onUnMask: function(e3, t3, n3) {
1554
- return t3 ? E(n3.outputFormat, T.call(this, e3, n3.inputFormat, n3), n3) : t3;
1555
- },
1556
- casing: function(e3, t3, n3, i3) {
1557
- if (0 == t3.nativeDef.indexOf("[ap]")) return e3.toLowerCase();
1558
- if (0 == t3.nativeDef.indexOf("[AP]")) return e3.toUpperCase();
1559
- var a2 = s.getTest.call(this, [n3 - 1]);
1560
- return 0 == a2.match.def.indexOf("[AP]") || 0 === n3 || a2 && a2.input === String.fromCharCode(o.keyCode.Space) || a2 && a2.match.def === String.fromCharCode(o.keyCode.Space) || t3.static && t3.def === t3.def.toUpperCase() ? e3.toUpperCase() : e3.toLowerCase();
1561
- },
1562
- onBeforeMask: function(e3, t3) {
1563
- return "[object Date]" === Object.prototype.toString.call(e3) && (e3 = A(e3, t3)), e3;
1564
- },
1565
- insertMode: false,
1566
- insertModeVisual: false,
1567
- shiftPositions: false,
1568
- keepStatic: false,
1569
- inputmode: "numeric",
1570
- prefillYear: true
1571
- }
1572
- });
1573
- },
1574
- 4240: function(e2, t2, n2) {
1575
- Object.defineProperty(t2, "__esModule", {
1576
- value: true
1577
- }), t2.mask = function() {
1578
- var e3 = this, t3 = this.opts, n3 = this.el, c = this.dependencyLib;
1579
- r.EventRuler.off(n3);
1580
- var u = (function(t4, n4) {
1581
- var i3 = t4.getAttribute("type"), a2 = "input" === t4.tagName.toLowerCase() && n4.supportsInputType.includes(i3) || t4.isContentEditable || "textarea" === t4.tagName.toLowerCase();
1582
- if (!a2) if ("input" === t4.tagName.toLowerCase()) {
1583
- var s2 = document.createElement("input");
1584
- s2.setAttribute("type", i3), a2 = "text" === s2.type, s2 = null;
1585
- } else a2 = "partial";
1586
- return false !== a2 ? (function(t5) {
1587
- var i4, a3;
1588
- function s3() {
1589
- return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== l.getLastValidPosition.call(e3) || true !== n4.nullable ? this.getRootNode().activeElement === this && n4.clearMaskOnLostFocus ? (e3.isRTL ? o.clearOptionalTail.call(e3, l.getBuffer.call(e3).slice()).reverse() : o.clearOptionalTail.call(e3, l.getBuffer.call(e3).slice())).join("") : i4.call(this) : "" : i4.call(this);
1590
- }
1591
- function u2(e4) {
1592
- a3.call(this, e4), this.inputmask && (0, o.applyInputValue)(this, e4);
1593
- }
1594
- if (!t5.inputmask.__valueGet) {
1595
- if (true !== n4.noValuePatching) {
1596
- if (Object.getOwnPropertyDescriptor) {
1597
- var f2 = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t5), "value") : void 0;
1598
- f2 && f2.get && f2.set ? (i4 = f2.get, a3 = f2.set, Object.defineProperty(t5, "value", {
1599
- get: s3,
1600
- set: u2,
1601
- configurable: true
1602
- })) : "input" !== t5.tagName.toLowerCase() && (i4 = function() {
1603
- return this.textContent;
1604
- }, a3 = function(e4) {
1605
- this.textContent = e4;
1606
- }, Object.defineProperty(t5, "value", {
1607
- get: s3,
1608
- set: u2,
1609
- configurable: true
1610
- }));
1611
- } else document.__lookupGetter__ && t5.__lookupGetter__("value") && (i4 = t5.__lookupGetter__("value"), a3 = t5.__lookupSetter__("value"), t5.__defineGetter__("value", s3), t5.__defineSetter__("value", u2));
1612
- t5.inputmask.__valueGet = i4, t5.inputmask.__valueSet = a3;
1613
- }
1614
- t5.inputmask._valueGet = function(t6) {
1615
- return e3.isRTL && true !== t6 ? i4.call(this.el).split("").reverse().join("") : i4.call(this.el);
1616
- }, t5.inputmask._valueSet = function(t6, n5) {
1617
- a3.call(this.el, null == t6 ? "" : true !== n5 && e3.isRTL ? t6.split("").reverse().join("") : t6);
1618
- }, void 0 === i4 && (i4 = function() {
1619
- return this.value;
1620
- }, a3 = function(e4) {
1621
- this.value = e4;
1622
- }, (function(t6) {
1623
- if (c.valHooks && (void 0 === c.valHooks[t6] || true !== c.valHooks[t6].inputmaskpatch)) {
1624
- var i5 = c.valHooks[t6] && c.valHooks[t6].get ? c.valHooks[t6].get : function(e4) {
1625
- return e4.value;
1626
- }, a4 = c.valHooks[t6] && c.valHooks[t6].set ? c.valHooks[t6].set : function(e4, t7) {
1627
- return e4.value = t7, e4;
1628
- };
1629
- c.valHooks[t6] = {
1630
- get: function(t7) {
1631
- if (t7.inputmask) {
1632
- if (t7.inputmask.opts.autoUnmask) return t7.inputmask.unmaskedvalue();
1633
- var a5 = i5(t7);
1634
- return -1 !== l.getLastValidPosition.call(e3, void 0, void 0, t7.inputmask.maskset.validPositions) || true !== n4.nullable ? a5 : "";
1635
- }
1636
- return i5(t7);
1637
- },
1638
- set: function(e4, t7) {
1639
- var n5 = a4(e4, t7);
1640
- return e4.inputmask && (0, o.applyInputValue)(e4, t7), n5;
1641
- },
1642
- inputmaskpatch: true
1643
- };
1644
- }
1645
- })(t5.type), (function(e4) {
1646
- r.EventRuler.on(e4, "mouseenter", function() {
1647
- var e5 = this, t6 = e5.inputmask._valueGet(true);
1648
- t6 != (e5.inputmask.isRTL ? l.getBuffer.call(e5.inputmask).slice().reverse() : l.getBuffer.call(e5.inputmask)).join("") && (0, o.applyInputValue)(e5, t6);
1649
- });
1650
- })(t5));
1651
- }
1652
- })(t4) : t4.inputmask = void 0, a2;
1653
- })(n3, t3);
1654
- if (false !== u) {
1655
- e3.originalPlaceholder = n3.placeholder, e3.maxLength = void 0 !== n3 ? n3.maxLength : void 0, -1 === e3.maxLength && (e3.maxLength = void 0), "inputMode" in n3 && null === n3.getAttribute("inputmode") && (n3.inputMode = t3.inputmode, n3.setAttribute("inputmode", t3.inputmode)), true === u && (t3.showMaskOnFocus = t3.showMaskOnFocus && -1 === ["cc-number", "cc-exp"].indexOf(n3.autocomplete), i2.iphone && (t3.insertModeVisual = false, n3.setAttribute("autocorrect", "off")), r.EventRuler.on(n3, "submit", a.EventHandlers.submitEvent), r.EventRuler.on(n3, "reset", a.EventHandlers.resetEvent), r.EventRuler.on(n3, "blur", a.EventHandlers.blurEvent), r.EventRuler.on(n3, "focus", a.EventHandlers.focusEvent), r.EventRuler.on(n3, "invalid", a.EventHandlers.invalidEvent), r.EventRuler.on(n3, "click", a.EventHandlers.clickEvent), r.EventRuler.on(n3, "mouseleave", a.EventHandlers.mouseleaveEvent), r.EventRuler.on(n3, "mouseenter", a.EventHandlers.mouseenterEvent), r.EventRuler.on(n3, "paste", a.EventHandlers.pasteEvent), r.EventRuler.on(n3, "cut", a.EventHandlers.cutEvent), r.EventRuler.on(n3, "complete", t3.oncomplete), r.EventRuler.on(n3, "incomplete", t3.onincomplete), r.EventRuler.on(n3, "cleared", t3.oncleared), true !== t3.inputEventOnly && r.EventRuler.on(n3, "keydown", a.EventHandlers.keyEvent), (i2.mobile || t3.inputEventOnly) && n3.removeAttribute("maxLength"), r.EventRuler.on(n3, "input", a.EventHandlers.inputFallBackEvent)), r.EventRuler.on(n3, "setvalue", a.EventHandlers.setValueEvent), void 0 === e3.applyMaskHook || e3.applyMaskHook(), l.getBufferTemplate.call(e3).join(""), e3.undoValue = e3._valueGet(true);
1656
- var f = n3.getRootNode().activeElement;
1657
- if ("" !== n3.inputmask._valueGet(true) || false === t3.clearMaskOnLostFocus || f === n3) {
1658
- (0, o.applyInputValue)(n3, n3.inputmask._valueGet(true));
1659
- var p = l.getBuffer.call(e3).slice();
1660
- false === s.isComplete.call(e3, p) && t3.clearIncomplete && l.resetMaskSet.call(e3, false), t3.clearMaskOnLostFocus && f !== n3 && (-1 === l.getLastValidPosition.call(e3) ? p = [] : o.clearOptionalTail.call(e3, p)), (false === t3.clearMaskOnLostFocus || t3.showMaskOnFocus && f === n3 || "" !== n3.inputmask._valueGet(true)) && (0, o.writeBuffer)(n3, p), f === n3 ? l.caret.call(e3, n3, l.seekNext.call(e3, l.getLastValidPosition.call(e3))) : l.caret.call(e3, n3, 0);
1661
- }
1662
- }
1663
- };
1664
- var i2 = n2(4351), a = n2(6047), r = n2(4136), o = n2(1507), l = n2(7539), s = n2(7687);
1665
- },
1666
- 4351: function(e2, t2, n2) {
1667
- Object.defineProperty(t2, "__esModule", {
1668
- value: true
1669
- }), t2.mobile = t2.iphone = t2.ie = void 0;
1670
- var i2, a = (i2 = n2(6266)) && i2.__esModule ? i2 : {
1671
- default: i2
1672
- };
1673
- var r = a.default.navigator && a.default.navigator.userAgent || "";
1674
- t2.ie = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, t2.mobile = a.default.navigator && a.default.navigator.userAgentData && a.default.navigator.userAgentData.mobile || a.default.navigator && a.default.navigator.maxTouchPoints || "ontouchstart" in a.default, t2.iphone = /iphone/i.test(r);
1675
- },
1676
- 4507: function(e2, t2, n2) {
1677
- Object.defineProperty(t2, "__esModule", {
1678
- value: true
1679
- }), t2.analyseMask = function(e3, t3, n3) {
1680
- var i3, a2, s2, c2, u, f, p = /(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g, d = /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g, h = new o.default(), v = [], m = [], g = false, y = false;
1681
- function b(e4, i4, a3) {
1682
- a3 = void 0 !== a3 ? a3 : e4.matches.length;
1683
- var o2 = e4.matches[a3 - 1], s3 = n3.casing ? "i" : "";
1684
- if (t3) 0 === i4.indexOf("[") || g && /\\d|\\s|\\w|\\p/i.test(i4) || "." === i4 ? (/\\p\{.*}/i.test(i4) && (s3 += "u"), e4.matches.splice(a3++, 0, {
1685
- fn: new RegExp(i4, s3),
1686
- static: false,
1687
- optionality: false,
1688
- newBlockMarker: void 0 === o2 ? "master" : o2.def !== i4,
1689
- casing: null,
1690
- def: i4,
1691
- placeholder: "object" === l(n3.placeholder) ? n3.placeholder[h.matches.length] : void 0,
1692
- nativeDef: i4
1693
- })) : (g && (i4 = i4[i4.length - 1]), i4.split("").forEach(function(t4, i5) {
1694
- o2 = e4.matches[a3 - 1], e4.matches.splice(a3++, 0, {
1695
- fn: /[a-z]/i.test(n3.staticDefinitionSymbol || t4) ? new RegExp("[" + (n3.staticDefinitionSymbol || t4) + "]", s3) : null,
1696
- static: true,
1697
- optionality: false,
1698
- newBlockMarker: void 0 === o2 ? "master" : o2.def !== t4 && true !== o2.static,
1699
- casing: null,
1700
- def: n3.staticDefinitionSymbol || t4,
1701
- placeholder: void 0 !== n3.staticDefinitionSymbol ? t4 : "object" === l(n3.placeholder) ? n3.placeholder[h.matches.length] : void 0,
1702
- nativeDef: (g ? "'" : "") + t4
1703
- });
1704
- })), g = false;
1705
- else {
1706
- var c3 = n3.definitions && n3.definitions[i4] || n3.usePrototypeDefinitions && r.default.prototype.definitions[i4];
1707
- c3 && !g ? ("string" == typeof c3.validator && /\\p\{.*}/i.test(c3.validator) && (s3 += "u"), e4.matches.splice(a3++, 0, {
1708
- fn: c3.validator ? "string" == typeof c3.validator ? new RegExp(c3.validator, s3) : new function() {
1709
- this.test = c3.validator;
1710
- }() : /./,
1711
- static: c3.static || false,
1712
- optionality: c3.optional || false,
1713
- defOptionality: c3.optional || false,
1714
- newBlockMarker: void 0 === o2 || c3.optional ? "master" : o2.def !== (c3.definitionSymbol || i4),
1715
- casing: c3.casing,
1716
- def: c3.definitionSymbol || i4,
1717
- placeholder: c3.placeholder,
1718
- nativeDef: i4,
1719
- generated: c3.generated
1720
- })) : (e4.matches.splice(a3++, 0, {
1721
- fn: /[a-z]/i.test(n3.staticDefinitionSymbol || i4) ? new RegExp("[" + (n3.staticDefinitionSymbol || i4) + "]", s3) : null,
1722
- static: true,
1723
- optionality: false,
1724
- newBlockMarker: void 0 === o2 ? "master" : o2.def !== i4 && true !== o2.static,
1725
- casing: null,
1726
- def: n3.staticDefinitionSymbol || i4,
1727
- placeholder: void 0 !== n3.staticDefinitionSymbol ? i4 : void 0,
1728
- nativeDef: (g ? "'" : "") + i4
1729
- }), g = false);
1730
- }
1731
- }
1732
- function k() {
1733
- if (v.length > 0) {
1734
- if (b(c2 = v[v.length - 1], a2), c2.isAlternator) {
1735
- u = v.pop();
1736
- for (var e4 = 0; e4 < u.matches.length; e4++) u.matches[e4].isGroup && (u.matches[e4].isGroup = false);
1737
- v.length > 0 ? (c2 = v[v.length - 1]).matches.push(u) : h.matches.push(u);
1738
- }
1739
- } else b(h, a2);
1740
- }
1741
- function x(e4) {
1742
- var t4 = new o.default(true);
1743
- return t4.openGroup = false, t4.matches = e4, t4;
1744
- }
1745
- function S() {
1746
- if ((s2 = v.pop()).openGroup = false, void 0 !== s2) if (v.length > 0) {
1747
- if ((c2 = v[v.length - 1]).matches.push(s2), c2.isAlternator) {
1748
- u = v.pop();
1749
- for (var e4 = 0; e4 < u.matches.length; e4++) u.matches[e4].isGroup = false, u.matches[e4].alternatorGroup = false;
1750
- v.length > 0 ? (c2 = v[v.length - 1]).matches.push(u) : h.matches.push(u);
1751
- }
1752
- } else h.matches.push(s2);
1753
- else k();
1754
- }
1755
- function P(e4) {
1756
- var t4 = e4.pop();
1757
- return t4.isQuantifier && (t4 = x([e4.pop(), t4])), t4;
1758
- }
1759
- t3 && (n3.optionalmarker[0] = void 0, n3.optionalmarker[1] = void 0);
1760
- for (; i3 = t3 ? d.exec(e3) : p.exec(e3); ) {
1761
- if (a2 = i3[0], t3) {
1762
- switch (a2.charAt(0)) {
1763
- case "?":
1764
- a2 = "{0,1}";
1765
- break;
1766
- case "+":
1767
- case "*":
1768
- a2 = "{" + a2 + "}";
1769
- break;
1770
- case "|":
1771
- if (0 === v.length) {
1772
- var O = x(h.matches);
1773
- O.openGroup = true, v.push(O), h.matches = [], y = true;
1774
- }
1775
- }
1776
- switch (a2) {
1777
- case "\\d":
1778
- a2 = "[0-9]";
1779
- break;
1780
- case "\\p":
1781
- a2 += d.exec(e3)[0], a2 += d.exec(e3)[0];
1782
- }
1783
- }
1784
- if (g) k();
1785
- else switch (a2.charAt(0)) {
1786
- case "$":
1787
- case "^":
1788
- t3 || k();
1789
- break;
1790
- case n3.escapeChar:
1791
- g = true, t3 && k();
1792
- break;
1793
- case n3.optionalmarker[1]:
1794
- case n3.groupmarker[1]:
1795
- S();
1796
- break;
1797
- case n3.optionalmarker[0]:
1798
- v.push(new o.default(false, true));
1799
- break;
1800
- case n3.groupmarker[0]:
1801
- v.push(new o.default(true));
1802
- break;
1803
- case n3.quantifiermarker[0]:
1804
- var w = new o.default(false, false, true), M = (a2 = a2.replace(/[{}?]/g, "")).split("|"), _ = M[0].split(","), E = isNaN(_[0]) ? _[0] : parseInt(_[0]), j = 1 === _.length ? E : isNaN(_[1]) ? _[1] : parseInt(_[1]), T = isNaN(M[1]) ? M[1] : parseInt(M[1]);
1805
- "*" !== E && "+" !== E || (E = "*" === j ? 0 : 1), w.quantifier = {
1806
- min: E,
1807
- max: j,
1808
- jit: T
1809
- };
1810
- var A = v.length > 0 ? v[v.length - 1].matches : h.matches;
1811
- (i3 = A.pop()).isGroup || (i3 = x([i3])), A.push(i3), A.push(w);
1812
- break;
1813
- case n3.alternatormarker:
1814
- if (v.length > 0) {
1815
- var D = (c2 = v[v.length - 1]).matches[c2.matches.length - 1];
1816
- f = c2.openGroup && (void 0 === D.matches || false === D.isGroup && false === D.isAlternator) ? v.pop() : P(c2.matches);
1817
- } else f = P(h.matches);
1818
- if (f.isAlternator) v.push(f);
1819
- else if (f.alternatorGroup ? (u = v.pop(), f.alternatorGroup = false) : u = new o.default(false, false, false, true), u.matches.push(f), v.push(u), f.openGroup) {
1820
- f.openGroup = false;
1821
- var C = new o.default(true);
1822
- C.alternatorGroup = true, v.push(C);
1823
- }
1824
- break;
1825
- default:
1826
- k();
1827
- }
1828
- }
1829
- y && S();
1830
- for (; v.length > 0; ) s2 = v.pop(), h.matches.push(s2);
1831
- h.matches.length > 0 && (!(function e4(i4) {
1832
- i4 && i4.matches && i4.matches.forEach(function(a3, r2) {
1833
- var o2 = i4.matches[r2 + 1];
1834
- (void 0 === o2 || void 0 === o2.matches || false === o2.isQuantifier) && a3 && a3.isGroup && (a3.isGroup = false, t3 || (b(a3, n3.groupmarker[0], 0), true !== a3.openGroup && b(a3, n3.groupmarker[1]))), e4(a3);
1835
- });
1836
- })(h), m.push(h));
1837
- (n3.numericInput || n3.isRTL) && (function e4(t4) {
1838
- function i4(e5) {
1839
- return e5 === n3.optionalmarker[0] ? e5 = n3.optionalmarker[1] : e5 === n3.optionalmarker[1] ? e5 = n3.optionalmarker[0] : e5 === n3.groupmarker[0] ? e5 = n3.groupmarker[1] : e5 === n3.groupmarker[1] && (e5 = n3.groupmarker[0]), e5;
1840
- }
1841
- for (var a3 in t4.matches = t4.matches.reverse(), t4.matches) if (Object.prototype.hasOwnProperty.call(t4.matches, a3)) {
1842
- var r2 = parseInt(a3);
1843
- if (t4.matches[a3].isQuantifier && t4.matches[r2 + 1] && t4.matches[r2 + 1].isGroup) {
1844
- var o2 = t4.matches[a3];
1845
- t4.matches.splice(a3, 1), t4.matches.splice(r2 + 1, 0, o2);
1846
- }
1847
- void 0 !== t4.matches[a3].matches ? t4.matches[a3] = e4(t4.matches[a3]) : t4.matches[a3] = i4(t4.matches[a3]);
1848
- }
1849
- return t4;
1850
- })(m[0]);
1851
- return m;
1852
- }, t2.generateMaskSet = function(e3, t3) {
1853
- var n3;
1854
- function o2(e4, t4) {
1855
- var n4 = t4.repeat, i3 = t4.groupmarker, r2 = t4.quantifiermarker, o3 = t4.keepStatic;
1856
- if (n4 > 0 || "*" === n4 || "+" === n4) {
1857
- var l2 = "*" === n4 ? 0 : "+" === n4 ? 1 : n4;
1858
- if (l2 !== n4) e4 = i3[0] + e4 + i3[1] + r2[0] + l2 + "," + n4 + r2[1];
1859
- else for (var c3 = e4, u2 = 1; u2 < l2; u2++) e4 += c3;
1860
- }
1861
- if (true === o3) {
1862
- var f = e4.match(new RegExp("(.)\\[([^\\]]*)\\]", "g"));
1863
- f && f.forEach(function(t5, n5) {
1864
- var i4, r3, o4 = t5.split("["), l3 = (r3 = 2, (function(e5) {
1865
- if (Array.isArray(e5)) return e5;
1866
- })(i4 = o4) || (function(e5, t6) {
1867
- var n6 = null == e5 ? null : "undefined" != typeof Symbol && e5[Symbol.iterator] || e5["@@iterator"];
1868
- if (null != n6) {
1869
- var i5, a2, r4, o5, l4 = [], s2 = true, c5 = false;
1870
- try {
1871
- if (r4 = (n6 = n6.call(e5)).next, 0 === t6) {
1872
- if (Object(n6) !== n6) return;
1873
- s2 = false;
1874
- } else for (; !(s2 = (i5 = r4.call(n6)).done) && (l4.push(i5.value), l4.length !== t6); s2 = true) ;
1875
- } catch (e6) {
1876
- c5 = true, a2 = e6;
1877
- } finally {
1878
- try {
1879
- if (!s2 && null != n6.return && (o5 = n6.return(), Object(o5) !== o5)) return;
1880
- } finally {
1881
- if (c5) throw a2;
1882
- }
1883
- }
1884
- return l4;
1885
- }
1886
- })(i4, r3) || (function(e5, t6) {
1887
- if (e5) {
1888
- if ("string" == typeof e5) return s(e5, t6);
1889
- var n6 = {}.toString.call(e5).slice(8, -1);
1890
- return "Object" === n6 && e5.constructor && (n6 = e5.constructor.name), "Map" === n6 || "Set" === n6 ? Array.from(e5) : "Arguments" === n6 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n6) ? s(e5, t6) : void 0;
1891
- }
1892
- })(i4, r3) || (function() {
1893
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1894
- })()), c4 = l3[0], u3 = l3[1];
1895
- u3 = u3.replace("]", ""), e4 = e4.replace(new RegExp("".concat((0, a.escapeRegex)(c4), "\\[").concat((0, a.escapeRegex)(u3), "\\]")), c4.charAt(0) === u3.charAt(0) ? "(".concat(c4, "|").concat(c4).concat(u3, ")") : "".concat(c4, "[").concat(u3, "]"));
1896
- });
1897
- }
1898
- return e4;
1899
- }
1900
- function c2(e4, n4, a2) {
1901
- var s2, c3, u2 = false;
1902
- return null !== e4 && "" !== e4 || ((u2 = null !== a2.regex) ? e4 = (e4 = a2.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (u2 = true, e4 = ".*")), 1 === e4.length && false === a2.greedy && 0 !== a2.repeat && (a2.placeholder = ""), e4 = o2(e4, a2), c3 = u2 ? "regex_" + a2.regex : a2.numericInput ? e4.split("").reverse().join("") : e4, null !== a2.keepStatic && (c3 = "ks_" + a2.keepStatic + c3), "object" === l(a2.placeholder) && (c3 = "ph_" + JSON.stringify(a2.placeholder) + c3), void 0 === r.default.prototype.masksCache[c3] || true === t3 ? (s2 = {
1903
- mask: e4,
1904
- maskToken: r.default.prototype.analyseMask(e4, u2, a2),
1905
- validPositions: [],
1906
- _buffer: void 0,
1907
- buffer: void 0,
1908
- tests: {},
1909
- excludes: {},
1910
- metadata: n4,
1911
- maskLength: void 0,
1912
- jitOffset: {}
1913
- }, true !== t3 && (r.default.prototype.masksCache[c3] = s2, s2 = i2.default.extend(true, {}, r.default.prototype.masksCache[c3]))) : s2 = i2.default.extend(true, {}, r.default.prototype.masksCache[c3]), s2;
1914
- }
1915
- "function" == typeof e3.mask && (e3.mask = e3.mask(e3));
1916
- if (Array.isArray(e3.mask)) {
1917
- if (e3.mask.length > 1) {
1918
- null === e3.keepStatic && (e3.keepStatic = true);
1919
- var u = e3.groupmarker[0];
1920
- return (e3.isRTL ? e3.mask.reverse() : e3.mask).forEach(function(t4) {
1921
- u.length > 1 && (u += e3.alternatormarker), void 0 !== t4.mask && "function" != typeof t4.mask ? u += t4.mask : u += t4;
1922
- }), c2(u += e3.groupmarker[1], e3.mask, e3);
1923
- }
1924
- e3.mask = e3.mask.pop();
1925
- }
1926
- n3 = e3.mask && void 0 !== e3.mask.mask && "function" != typeof e3.mask.mask ? c2(e3.mask.mask, e3.mask, e3) : c2(e3.mask, e3.mask, e3);
1927
- null === e3.keepStatic && (e3.keepStatic = false);
1928
- return n3;
1929
- };
1930
- var i2 = c(n2(7332)), a = n2(340), r = c(n2(3978)), o = c(n2(9439));
1931
- function l(e3) {
1932
- return l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
1933
- return typeof e4;
1934
- } : function(e4) {
1935
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
1936
- }, l(e3);
1937
- }
1938
- function s(e3, t3) {
1939
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
1940
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
1941
- return i3;
1942
- }
1943
- function c(e3) {
1944
- return e3 && e3.__esModule ? e3 : {
1945
- default: e3
1946
- };
1947
- }
1948
- },
1949
- 4829: function(e2, t2, n2) {
1950
- var i2, a = (i2 = n2(3978)) && i2.__esModule ? i2 : {
1951
- default: i2
1952
- }, r = n2(7539), o = n2(5895);
1953
- function l(e3) {
1954
- return (function(e4) {
1955
- if (Array.isArray(e4)) return s(e4);
1956
- })(e3) || (function(e4) {
1957
- if ("undefined" != typeof Symbol && null != e4[Symbol.iterator] || null != e4["@@iterator"]) return Array.from(e4);
1958
- })(e3) || (function(e4, t3) {
1959
- if (e4) {
1960
- if ("string" == typeof e4) return s(e4, t3);
1961
- var n3 = {}.toString.call(e4).slice(8, -1);
1962
- return "Object" === n3 && e4.constructor && (n3 = e4.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(e4) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? s(e4, t3) : void 0;
1963
- }
1964
- })(e3) || (function() {
1965
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1966
- })();
1967
- }
1968
- function s(e3, t3) {
1969
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
1970
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
1971
- return i3;
1972
- }
1973
- a.default.extendDefinitions({
1974
- A: {
1975
- validator: "[A-Za-z\u0410-\u044F\u0401\u0451\xC0-\xFF\xB5]",
1976
- casing: "upper"
1977
- },
1978
- "&": {
1979
- validator: "[0-9A-Za-z\u0410-\u044F\u0401\u0451\xC0-\xFF\xB5]",
1980
- casing: "upper"
1981
- },
1982
- "#": {
1983
- validator: "[0-9A-Fa-f]",
1984
- casing: "upper"
1985
- }
1986
- });
1987
- var c = /25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/;
1988
- function u(e3, t3, n3, i3, a2) {
1989
- if (n3 - 1 > -1 && "." !== t3.buffer[n3 - 1] ? (e3 = t3.buffer[n3 - 1] + e3, e3 = n3 - 2 > -1 && "." !== t3.buffer[n3 - 2] ? t3.buffer[n3 - 2] + e3 : "0" + e3) : e3 = "00" + e3, a2.greedy && parseInt(e3) > 255 && c.test("00" + e3.charAt(2))) {
1990
- var r2 = [].concat(l(t3.buffer.slice(0, n3)), [".", e3.charAt(2)]);
1991
- if (r2.join("").match(/\./g).length < 4) return {
1992
- refreshFromBuffer: true,
1993
- buffer: r2,
1994
- caret: n3 + 2
1995
- };
1996
- }
1997
- return c.test(e3);
1998
- }
1999
- a.default.extendAliases({
2000
- cssunit: {
2001
- regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"
2002
- },
2003
- url: {
2004
- regex: "(https?|ftp)://.*",
2005
- autoUnmask: false,
2006
- keepStatic: false,
2007
- tabThrough: true
2008
- },
2009
- ip: {
2010
- mask: "i{1,3}.j{1,3}.k{1,3}.l{1,3}",
2011
- definitions: {
2012
- i: {
2013
- validator: u
2014
- },
2015
- j: {
2016
- validator: u
2017
- },
2018
- k: {
2019
- validator: u
2020
- },
2021
- l: {
2022
- validator: u
2023
- }
2024
- },
2025
- onUnMask: function(e3, t3, n3) {
2026
- return e3;
2027
- },
2028
- inputmode: "decimal",
2029
- substitutes: {
2030
- ",": "."
2031
- }
2032
- },
2033
- email: {
2034
- mask: function(e3) {
2035
- var t3 = e3.separator, n3 = e3.quantifier, i3 = "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", a2 = i3;
2036
- if (t3) for (var r2 = 0; r2 < n3; r2++) a2 += "[".concat(t3).concat(i3, "]");
2037
- return a2;
2038
- },
2039
- greedy: false,
2040
- casing: "lower",
2041
- separator: null,
2042
- quantifier: 5,
2043
- skipOptionalPartCharacter: "",
2044
- onBeforePaste: function(e3, t3) {
2045
- return (e3 = e3.toLowerCase()).replace("mailto:", "");
2046
- },
2047
- definitions: {
2048
- "*": {
2049
- validator: "[0-9\uFF11-\uFF19A-Za-z\u0410-\u044F\u0401\u0451\xC0-\xFF\xB5!#$%&'*+/=?^_`{|}~-]"
2050
- },
2051
- "-": {
2052
- validator: "[0-9A-Za-z-]"
2053
- }
2054
- },
2055
- onUnMask: function(e3, t3, n3) {
2056
- return e3;
2057
- },
2058
- inputmode: "email"
2059
- },
2060
- mac: {
2061
- mask: "##:##:##:##:##:##"
2062
- },
2063
- vin: {
2064
- mask: "V{13}9{4}",
2065
- definitions: {
2066
- V: {
2067
- validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
2068
- casing: "upper"
2069
- }
2070
- },
2071
- clearIncomplete: true,
2072
- autoUnmask: true
2073
- },
2074
- ssn: {
2075
- mask: "999-99-9999",
2076
- postValidation: function(e3, t3, n3, i3, a2, l2, s2) {
2077
- var c2 = o.getMaskTemplate.call(this, true, r.getLastValidPosition.call(this), true, true);
2078
- return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(c2.join(""));
2079
- }
2080
- }
2081
- });
2082
- },
2083
- 5841: function(e2, t2, n2) {
2084
- Object.defineProperty(t2, "__esModule", {
2085
- value: true
2086
- }), t2.Event = void 0, t2.off = function(e3, t3) {
2087
- var n3, i3;
2088
- f(this[0]) && (n3 = (0, a.default)(this[0], "events"), i3 = this[0], "" !== (e3 = e3 || Object.keys(n3).join(" ")) && e3.split(" ").forEach(function(e4) {
2089
- var a2 = l(e4.split("."), 2);
2090
- (function(e5, i4) {
2091
- var a3, r2, o2 = [];
2092
- if (e5.length > 0) for (var l2 = i4 ? [i4] : Object.keys(n3[e5]), s2 = 0; s2 < l2.length; s2++) if (i4 = l2[s2], void 0 === t3) for (a3 = 0, r2 = (null === (c2 = n3[e5][i4]) || void 0 === c2 ? void 0 : c2.length) || 0; a3 < r2; a3++) {
2093
- var c2;
2094
- o2.push({
2095
- ev: e5,
2096
- namespace: i4,
2097
- handler: n3[e5][i4][a3]
2098
- });
2099
- }
2100
- else o2.push({
2101
- ev: e5,
2102
- namespace: i4,
2103
- handler: t3
2104
- });
2105
- else if (i4.length > 0) {
2106
- for (var u2 in n3) if (n3[u2][i4]) if (void 0 === t3) for (a3 = 0, r2 = n3[u2][i4].length; a3 < r2; a3++) o2.push({
2107
- ev: u2,
2108
- namespace: i4,
2109
- handler: n3[u2][i4][a3]
2110
- });
2111
- else o2.push({
2112
- ev: u2,
2113
- namespace: i4,
2114
- handler: t3
2115
- });
2116
- }
2117
- return o2;
2118
- })(a2[0], a2[1]).forEach(function(e5) {
2119
- var t4 = e5.ev, a3 = e5.handler;
2120
- !(function(e6, t5, a4) {
2121
- if (e6 in n3 == 1) if (i3.removeEventListener ? i3.removeEventListener(e6, a4, false) : i3.detachEvent && i3.detachEvent("on".concat(e6), a4), "global" === t5) for (var r2 in n3[e6]) n3[e6][r2].splice(n3[e6][r2].indexOf(a4), 1);
2122
- else n3[e6][t5].splice(n3[e6][t5].indexOf(a4), 1);
2123
- })(t4, e5.namespace, a3);
2124
- });
2125
- }));
2126
- return this;
2127
- }, t2.on = function(e3, t3) {
2128
- if (!this[0] || !f(this[0])) return this;
2129
- var n3 = this[0], i3 = (0, a.default)(n3, "events");
2130
- return e3.split(" ").forEach(function(e4) {
2131
- var a2 = l(e4.split("."), 2), r2 = a2[0], o2 = a2[1];
2132
- !(function(e5, a3) {
2133
- n3.addEventListener ? n3.addEventListener(e5, t3, false) : n3.attachEvent && n3.attachEvent("on".concat(e5), t3);
2134
- i3[e5] = i3[e5] || {}, i3[e5][a3] = i3[e5][a3] || [], i3[e5][a3].push(t3);
2135
- })(r2, void 0 === o2 ? "global" : o2);
2136
- }), this;
2137
- }, t2.trigger = function(e3) {
2138
- var t3 = arguments;
2139
- if (f(this[0])) for (var n3 = (0, a.default)(this[0], "events"), i3 = this[0], l2 = "string" == typeof e3 ? e3.split(" ") : [e3.type], s2 = 0; s2 < l2.length; s2++) {
2140
- var c2 = l2[s2].split("."), p2 = c2[0], d = c2[1] || "global";
2141
- if (void 0 !== u) {
2142
- var h = void 0, v = {
2143
- bubbles: true,
2144
- cancelable: true,
2145
- composed: true,
2146
- detail: arguments[1]
2147
- };
2148
- if (u.createEvent) {
2149
- try {
2150
- if ("input" === p2) v.inputType = "insertText", h = new InputEvent(p2, v);
2151
- else h = new CustomEvent(p2, v);
2152
- } catch (e4) {
2153
- (h = u.createEvent("CustomEvent")).initCustomEvent(p2, v.bubbles, v.cancelable, v.detail);
2154
- }
2155
- e3.type && (0, r.default)(h, e3), i3.dispatchEvent(h);
2156
- } else (h = u.createEventObject()).eventType = p2, h.detail = arguments[1], e3.type && (0, r.default)(h, e3), i3.fireEvent("on" + h.eventType, h);
2157
- } else if (void 0 !== n3[p2]) {
2158
- arguments[0] = arguments[0].type ? arguments[0] : o.default.Event(arguments[0]), arguments[0].detail = arguments.slice(1);
2159
- var m = n3[p2];
2160
- ("global" === d ? Object.values(m).flat() : m[d]).forEach(function(e4) {
2161
- return e4.apply(i3, t3);
2162
- });
2163
- }
2164
- }
2165
- return this;
2166
- };
2167
- var i2 = c(n2(6266)), a = c(n2(2088)), r = c(n2(672)), o = c(n2(7332));
2168
- function l(e3, t3) {
2169
- return (function(e4) {
2170
- if (Array.isArray(e4)) return e4;
2171
- })(e3) || (function(e4, t4) {
2172
- var n3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
2173
- if (null != n3) {
2174
- var i3, a2, r2, o2, l2 = [], s2 = true, c2 = false;
2175
- try {
2176
- if (r2 = (n3 = n3.call(e4)).next, 0 === t4) ; else for (; !(s2 = (i3 = r2.call(n3)).done) && (l2.push(i3.value), l2.length !== t4); s2 = true) ;
2177
- } catch (e5) {
2178
- c2 = true, a2 = e5;
2179
- } finally {
2180
- try {
2181
- if (!s2 && null != n3.return && (o2 = n3.return(), Object(o2) !== o2)) return;
2182
- } finally {
2183
- if (c2) throw a2;
2184
- }
2185
- }
2186
- return l2;
2187
- }
2188
- })(e3, t3) || (function(e4, t4) {
2189
- if (e4) {
2190
- if ("string" == typeof e4) return s(e4, t4);
2191
- var n3 = {}.toString.call(e4).slice(8, -1);
2192
- return "Object" === n3 && e4.constructor && (n3 = e4.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(e4) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? s(e4, t4) : void 0;
2193
- }
2194
- })(e3, t3) || (function() {
2195
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2196
- })();
2197
- }
2198
- function s(e3, t3) {
2199
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
2200
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
2201
- return i3;
2202
- }
2203
- function c(e3) {
2204
- return e3 && e3.__esModule ? e3 : {
2205
- default: e3
2206
- };
2207
- }
2208
- var u = i2.default.document;
2209
- function f(e3) {
2210
- return e3 instanceof Element && (0, a.default)(e3, "events");
2211
- }
2212
- var p = t2.Event = void 0;
2213
- "function" == typeof i2.default.CustomEvent ? t2.Event = p = i2.default.CustomEvent : i2.default.Event && u && u.createEvent ? (t2.Event = p = function(e3, t3) {
2214
- t3 = t3 || {
2215
- bubbles: false,
2216
- cancelable: false,
2217
- composed: true,
2218
- detail: void 0
2219
- };
2220
- var n3 = u.createEvent("CustomEvent");
2221
- return n3.initCustomEvent(e3, t3.bubbles, t3.cancelable, t3.detail), n3;
2222
- }, p.prototype = i2.default.Event.prototype) : "undefined" != typeof Event && (t2.Event = p = Event);
2223
- },
2224
- 5895: function(e2, t2, n2) {
2225
- Object.defineProperty(t2, "__esModule", {
2226
- value: true
2227
- }), t2.determineTestTemplate = d, t2.getDecisionTaker = u, t2.getMaskTemplate = function(e3, t3, n3, i3, a2) {
2228
- var r2 = this, o2 = this.opts, l2 = this.maskset, s2 = o2.greedy;
2229
- a2 && o2.greedy && (o2.greedy = false, r2.maskset.tests = {});
2230
- t3 = t3 || 0;
2231
- var c2, u2, h2, v2, g = [], y = 0;
2232
- do {
2233
- if (true === e3 && l2.validPositions[y]) u2 = (h2 = a2 && l2.validPositions[y].match.optionality && void 0 === l2.validPositions[y + 1] && (true === l2.validPositions[y].generatedInput || l2.validPositions[y].input == o2.skipOptionalPartCharacter && y > 0) ? d.call(r2, y, m.call(r2, y, c2, y - 1)) : l2.validPositions[y]).match, c2 = h2.locator.slice(), g.push(true === n3 ? h2.input : false === n3 ? u2.nativeDef : f.call(r2, y, u2));
2234
- else {
2235
- u2 = (h2 = p.call(r2, y, c2, y - 1)).match, c2 = h2.locator.slice();
2236
- var b = true !== i3 && (false !== o2.jitMasking ? o2.jitMasking : u2.jit);
2237
- (v2 = (v2 || l2.validPositions[y - 1]) && u2.static && u2.def !== o2.groupSeparator && null === u2.fn) || false === b || void 0 === b || "number" == typeof b && isFinite(b) && b > y ? g.push(false === n3 ? u2.nativeDef : f.call(r2, g.length, u2)) : v2 = false;
2238
- }
2239
- y++;
2240
- } while (true !== u2.static || "" !== u2.def || t3 > y);
2241
- "" === g[g.length - 1] && g.pop();
2242
- false === n3 && void 0 !== l2.maskLength || (l2.maskLength = y - 1);
2243
- return o2.greedy = s2, g;
2244
- }, t2.getPlaceholder = f, t2.getTest = h, t2.getTestTemplate = p, t2.getTests = m, t2.isSubsetOf = v;
2245
- var i2, a = (i2 = n2(3978)) && i2.__esModule ? i2 : {
2246
- default: i2
2247
- }, r = n2(7539);
2248
- function o(e3) {
2249
- return (function(e4) {
2250
- if (Array.isArray(e4)) return l(e4);
2251
- })(e3) || (function(e4) {
2252
- if ("undefined" != typeof Symbol && null != e4[Symbol.iterator] || null != e4["@@iterator"]) return Array.from(e4);
2253
- })(e3) || (function(e4, t3) {
2254
- if (e4) {
2255
- if ("string" == typeof e4) return l(e4, t3);
2256
- var n3 = {}.toString.call(e4).slice(8, -1);
2257
- return "Object" === n3 && e4.constructor && (n3 = e4.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(e4) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? l(e4, t3) : void 0;
2258
- }
2259
- })(e3) || (function() {
2260
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2261
- })();
2262
- }
2263
- function l(e3, t3) {
2264
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
2265
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
2266
- return i3;
2267
- }
2268
- function s(e3) {
2269
- return s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
2270
- return typeof e4;
2271
- } : function(e4) {
2272
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
2273
- }, s(e3);
2274
- }
2275
- function c(e3, t3) {
2276
- var n3 = (null != e3.alternation && e3.mloc["".concat(u(e3), ":").concat(e3.alternation)] || e3.locator).join("");
2277
- if ("" !== n3) for (n3 = n3.split(":")[0]; n3.length < t3; ) n3 += "0";
2278
- return n3;
2279
- }
2280
- function u(e3) {
2281
- var t3 = e3.locator[e3.alternation];
2282
- return "string" == typeof t3 && t3.length > 0 && (t3 = t3.split(",").sort(function(e4, t4) {
2283
- return e4 - t4;
2284
- })[0]), void 0 !== t3 ? t3.toString() : "";
2285
- }
2286
- function f(e3, t3, n3) {
2287
- var i3 = this, a2 = this.opts, o2 = this.maskset;
2288
- if (void 0 !== (t3 = t3 || h.call(i3, e3).match).placeholder || true === n3) {
2289
- if ("" !== t3.placeholder && true === t3.static && true !== t3.generated) {
2290
- var l2 = r.getLastValidPosition.call(i3, e3), c2 = r.seekNext.call(i3, l2);
2291
- return (n3 ? e3 <= c2 : e3 < c2) ? a2.staticDefinitionSymbol && t3.static ? t3.nativeDef : t3.def : "function" == typeof t3.placeholder ? t3.placeholder(a2) : t3.placeholder;
2292
- }
2293
- return "function" == typeof t3.placeholder ? t3.placeholder(a2) : t3.placeholder;
2294
- }
2295
- if (true === t3.static) {
2296
- if (e3 > -1 && void 0 === o2.validPositions[e3]) {
2297
- var u2, f2 = m.call(i3, e3), p2 = [];
2298
- if ("string" == typeof a2.placeholder && f2.length > 1 + ("" === f2[f2.length - 1].match.def ? 1 : 0)) {
2299
- for (var d2 = 0; d2 < f2.length; d2++) if ("" !== f2[d2].match.def && true !== f2[d2].match.optionality && true !== f2[d2].match.optionalQuantifier && (true === f2[d2].match.static || void 0 === u2 || false !== f2[d2].match.fn.test(u2.match.def, o2, e3, true, a2)) && (p2.push(f2[d2]), true === f2[d2].match.static && (u2 = f2[d2]), p2.length > 1 && /[0-9a-bA-Z]/.test(p2[0].match.def))) return a2.placeholder.charAt(e3 % a2.placeholder.length);
2300
- }
2301
- }
2302
- return t3.def;
2303
- }
2304
- return "object" === s(a2.placeholder) ? t3.def : a2.placeholder.charAt(e3 % a2.placeholder.length);
2305
- }
2306
- function p(e3, t3, n3) {
2307
- return this.maskset.validPositions[e3] || d.call(this, e3, m.call(this, e3, t3 ? t3.slice() : t3, n3));
2308
- }
2309
- function d(e3, t3) {
2310
- var n3 = this.opts, i3 = (function(e4, t4) {
2311
- var n4 = 0, i4 = false;
2312
- t4.forEach(function(e5) {
2313
- e5.match.optionality && (0 !== n4 && n4 !== e5.match.optionality && (i4 = true), (0 === n4 || n4 > e5.match.optionality) && (n4 = e5.match.optionality));
2314
- }), n4 && (0 == e4 || 1 == t4.length ? n4 = 0 : i4 || (n4 = 0));
2315
- return n4;
2316
- })(e3, t3);
2317
- e3 = e3 > 0 ? e3 - 1 : 0;
2318
- var a2, r2, l2, s2 = Math.max.apply(Math, o(t3.map(function(e4) {
2319
- return void 0 === e4.locator ? 0 : e4.locator.length;
2320
- }))), u2 = c(h.call(this, e3), s2), f2 = 0;
2321
- n3.greedy && t3.length > 1 && "" === t3[t3.length - 1].match.def && (f2 = 1);
2322
- for (var p2 = 0; p2 < t3.length - f2; p2++) {
2323
- var d2 = t3[p2];
2324
- a2 = c(d2, s2);
2325
- var v2 = Number(a2) - Number(u2);
2326
- (true !== d2.unMatchedAlternationStopped || t3.filter(function(e4) {
2327
- return true !== e4.unMatchedAlternationStopped;
2328
- }).length <= 1) && (void 0 === r2 || "" !== a2 && v2 < r2 || l2 && !n3.greedy && l2.match.optionality && l2.match.optionality - i3 > 0 && "master" === l2.match.newBlockMarker && (!d2.match.optionality || d2.match.optionality - i3 < 1 || !d2.match.newBlockMarker) || l2 && !n3.greedy && l2.match.optionalQuantifier && !d2.match.optionalQuantifier) && (r2 = v2, l2 = d2);
2329
- }
2330
- return l2;
2331
- }
2332
- function h(e3, t3) {
2333
- var n3 = this.maskset;
2334
- return n3.validPositions[e3] ? n3.validPositions[e3] : (t3 || m.call(this, e3))[0];
2335
- }
2336
- function v(e3, t3, n3) {
2337
- function i3(e4) {
2338
- for (var t4, n4 = [], i4 = -1, a2 = 0, r2 = e4.length; a2 < r2; a2++) if ("-" === e4.charAt(a2)) for (t4 = e4.charCodeAt(a2 + 1); ++i4 < t4; ) n4.push(String.fromCharCode(i4));
2339
- else i4 = e4.charCodeAt(a2), n4.push(e4.charAt(a2));
2340
- return n4.join("");
2341
- }
2342
- return e3.match.def === t3.match.nativeDef || !(!(n3.regex || e3.match.fn instanceof RegExp && t3.match.fn instanceof RegExp) || true === e3.match.static || true === t3.match.static) && ("." === t3.match.fn.source || -1 !== i3(t3.match.fn.source.replace(/[[\]/]/g, "")).indexOf(i3(e3.match.fn.source.replace(/[[\]/]/g, ""))));
2343
- }
2344
- function m(e3, t3, n3) {
2345
- var i3, r2, o2 = this, l2 = this.dependencyLib, s2 = this.maskset, c2 = this.opts, u2 = this.el, f2 = s2.maskToken, p2 = t3 ? n3 : 0, h2 = t3 ? t3.slice() : [0], m2 = [], g = false, y = t3 ? t3.join("") : "", b = false;
2346
- function k(t4, n4, r3, l3) {
2347
- function f3(r4, l4, d3) {
2348
- function h4(e4, t5) {
2349
- var n5 = 0 === t5.matches.indexOf(e4);
2350
- return n5 || t5.matches.every(function(i4, a2) {
2351
- return true === i4.isQuantifier ? n5 = h4(e4, t5.matches[a2 - 1]) : Object.prototype.hasOwnProperty.call(i4, "matches") && (n5 = h4(e4, i4)), !n5;
2352
- }), n5;
2353
- }
2354
- function P2(e4, t5, n5) {
2355
- var i4, a2, r5, o3, l5 = "".concat(t5, ":").concat(n5);
2356
- if ((s2.tests[e4] || s2.validPositions[e4]) && (s2.validPositions[e4] ? [s2.validPositions[e4]] : s2.tests[e4]).every(function(e5, s3) {
2357
- return e5.mloc[l5] ? (i4 = e5, false) : (Object.values(e5.mloc).filter(function(e6) {
2358
- return e6[n5] == t5;
2359
- }).every(function(t6) {
2360
- var n6 = t6.join("").split(":")[0];
2361
- for (r5 = r5 || n6; n6.length < r5.length; ) n6 += "0";
2362
- var l6 = Number(n6);
2363
- return (void 0 === i4 || l6 < a2) && (a2 = l6, i4 = e5, o3 = Object.entries(e5.mloc).find(function(e6) {
2364
- return e6[1].toString() === t6.toString();
2365
- })[0]), true;
2366
- }), true);
2367
- }), i4) {
2368
- void 0 === n5 && (l5 = "".concat(t5, ":").concat(i4.alternation));
2369
- var c3 = "".concat(i4.locator[i4.alternation], ":").concat(i4.alternation), u3 = i4.mloc[o3 || l5] || i4.mloc[c3] || i4.locator;
2370
- if (-1 !== u3[u3.length - 1].toString().indexOf(":")) u3.pop();
2371
- var f4 = parseInt(i4.alternation) + 1;
2372
- return u3.slice(f4);
2373
- }
2374
- return void 0 !== n5 ? P2(e4, t5) : void 0;
2375
- }
2376
- function O2(t5, n5) {
2377
- return true === t5.match.static && true !== n5.match.static && n5.match.fn.test(t5.match.def, s2, e3, false, c2, false);
2378
- }
2379
- function w2(e4, t5) {
2380
- var n5 = e4.alternation, i4 = void 0 === t5 || n5 <= t5.alternation && -1 === e4.locator[n5].toString().indexOf(t5.locator[n5]);
2381
- if (!i4 && n5 > t5.alternation) {
2382
- for (var a2 = 0; a2 < n5; a2++) if (e4.locator[a2] !== t5.locator[a2]) {
2383
- n5 = a2, i4 = true;
2384
- break;
2385
- }
2386
- }
2387
- return !!i4 && (function(n6) {
2388
- e4.mloc = e4.mloc || {};
2389
- var i5 = e4.locator[n6];
2390
- if (void 0 !== i5) {
2391
- if (void 0 === t5) "string" == typeof i5 && (i5 = i5.split(",")[0]), i5 = "".concat(i5, ":").concat(n6), void 0 === e4.mloc[i5] && (e4.mloc[i5] = e4.locator.slice(), e4.mloc[i5].push(":".concat(n6)));
2392
- else {
2393
- var a3 = 0;
2394
- for (var r5 in t5.mloc) if (void 0 === e4.mloc[r5]) e4.mloc[r5] = t5.mloc[r5];
2395
- else do {
2396
- if (void 0 === e4.mloc[r5 + a3]) {
2397
- e4.mloc[r5 + a3] = t5.mloc[r5];
2398
- break;
2399
- }
2400
- } while (void 0 !== e4.mloc[r5 + a3++]);
2401
- e4.locator = S(p2, [e4, t5]);
2402
- }
2403
- return e4.alternation > n6 && (e4.alternation = n6), true;
2404
- }
2405
- return e4.alternation = void 0, false;
2406
- })(n5);
2407
- }
2408
- if (p2 > e3 + c2._maxTestPos) throw new Error("Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ".concat(s2.mask));
2409
- if (p2 === e3 && void 0 === r4.matches) {
2410
- if (m2.push({
2411
- match: r4,
2412
- locator: l4.reverse(),
2413
- cd: y,
2414
- mloc: {}
2415
- }), !r4.optionality || void 0 !== d3 || !(c2.definitions && c2.definitions[r4.nativeDef] && c2.definitions[r4.nativeDef].optional || a.default.prototype.definitions[r4.nativeDef] && a.default.prototype.definitions[r4.nativeDef].optional)) return true;
2416
- g = true, p2 = e3;
2417
- } else if (void 0 !== r4.matches) {
2418
- if (r4.isGroup && d3 !== r4) return (function() {
2419
- if (r4 = f3(t4.matches[t4.matches.indexOf(r4) + 1], l4, d3)) return true;
2420
- })();
2421
- if (r4.isOptional) return (function() {
2422
- var t5 = r4, a2 = m2.length;
2423
- if (r4 = k(r4, n4, l4, d3), m2.length > 0) {
2424
- if (m2.forEach(function(e4, t6) {
2425
- t6 >= a2 && (e4.match.optionality = e4.match.optionality ? e4.match.optionality + 1 : 1);
2426
- }), i3 = m2[m2.length - 1].match, void 0 !== d3 || !h4(i3, t5)) return r4;
2427
- g = true, p2 = e3;
2428
- }
2429
- })();
2430
- if (r4.isAlternator) return (function() {
2431
- function i4(e4) {
2432
- for (var t5 = 0, n5 = 0; n5 < e4.length; n5++) {
2433
- var i5 = e4[n5];
2434
- i5.isQuantifier && !isNaN(i5.quantifier.max) ? t5 += i5.quantifier.max : t5++;
2435
- }
2436
- return t5;
2437
- }
2438
- function a2(e4) {
2439
- for (var t5, n5 = e4.matches[0].matches ? i4(e4.matches[0].matches) : 1, a3 = 0; a3 < e4.matches.length && n5 === (t5 = e4.matches[a3].matches ? i4(e4.matches[a3].matches) : 1); a3++) ;
2440
- return n5 !== t5;
2441
- }
2442
- o2.hasAlternator = true;
2443
- var h5, y2 = r4, k2 = [], x2 = m2.slice(), S2 = l4.length, M = n4.length > 0 ? n4.shift() : -1;
2444
- if (-1 === M || "string" == typeof M) {
2445
- var _, E = p2, j = n4.slice(), T = [];
2446
- if ("string" == typeof M) T = M.split(",");
2447
- else for (_ = 0; _ < y2.matches.length; _++) T.push(_.toString());
2448
- if (void 0 !== s2.excludes[e3]) {
2449
- for (var A = T.slice(), D = 0, C = s2.excludes[e3].length; D < C; D++) {
2450
- var B = s2.excludes[e3][D].toString().split(":");
2451
- l4.length == B[1] && T.splice(T.indexOf(B[0]), 1);
2452
- }
2453
- 0 === T.length && (delete s2.excludes[e3], T = A);
2454
- }
2455
- (true === c2.keepStatic || isFinite(parseInt(c2.keepStatic)) && E >= c2.keepStatic) && (T = T.slice(0, 1));
2456
- for (var I = 0; I < T.length; I++) {
2457
- _ = parseInt(T[I]), m2 = [], n4 = "string" == typeof M && P2(p2, _, S2) || j.slice();
2458
- var R = y2.matches[_];
2459
- if (R && f3(R, [_].concat(l4), d3)) r4 = true;
2460
- else if (b = a2(y2), R && R.matches && R.matches.length > y2.matches[0].matches.length) break;
2461
- h5 = m2.slice(), p2 = E, m2 = [];
2462
- for (var L = 0; L < h5.length; L++) {
2463
- var F = h5[L], N = false;
2464
- F.alternation = F.alternation || S2, w2(F);
2465
- for (var V = 0; V < k2.length; V++) {
2466
- var G = k2[V];
2467
- if ("string" != typeof M || void 0 !== F.alternation && -1 !== M.indexOf(F.locator[F.alternation].toString())) {
2468
- if (F.match.nativeDef === G.match.nativeDef) {
2469
- N = true, w2(G, F);
2470
- break;
2471
- }
2472
- if (v(F, G, c2)) {
2473
- w2(F, G) && (N = true, k2.splice(k2.indexOf(G), 0, F));
2474
- break;
2475
- }
2476
- if (v(G, F, c2)) {
2477
- w2(G, F);
2478
- break;
2479
- }
2480
- if (O2(F, G)) {
2481
- w2(F, G) && (N = true, k2.splice(k2.indexOf(G), 0, F));
2482
- break;
2483
- }
2484
- if (O2(G, F)) {
2485
- w2(G, F), G.match.optionality && void 0 === u2.inputmask.userOptions.keepStatic && (c2.keepStatic = E);
2486
- break;
2487
- }
2488
- }
2489
- }
2490
- N || k2.push(F);
2491
- }
2492
- }
2493
- m2 = x2.concat(k2), p2 = e3, g = m2.length > 0 && b, r4 = k2.length > 0 && !b, b && g && !r4 && m2.forEach(function(e4, t5) {
2494
- e4.unMatchedAlternationStopped = true;
2495
- }), n4 = j.slice();
2496
- } else r4 = f3(y2.matches[M] || t4.matches[M], [M].concat(l4), d3);
2497
- if (r4) return true;
2498
- })();
2499
- if (r4.isQuantifier && d3 !== t4.matches[t4.matches.indexOf(r4) - 1]) return (function() {
2500
- for (var a2, o3 = r4, u3 = false, d4 = function(n5) {
2501
- var a3 = t4.matches[t4.matches.indexOf(o3) - 1];
2502
- if (r4 = f3(a3, [n5].concat(l4), a3)) return m2.forEach(function(t5, l5) {
2503
- (i3 = x(a3, t5.match) ? t5.match : m2[m2.length - 1].match).optionalQuantifier = n5 >= o3.quantifier.min, i3.jit = (n5 + 1) * (a3.matches.indexOf(i3) + 1) > o3.quantifier.jit, i3.optionalQuantifier && h4(i3, a3) && (g = true, p2 = e3, c2.greedy && null == s2.validPositions[e3 - 1] && n5 > o3.quantifier.min && -1 != ["*", "+"].indexOf(o3.quantifier.max) && (m2.pop(), y = void 0), u3 = true, r4 = false), !u3 && i3.jit && (s2.jitOffset[e3] = a3.matches.length - a3.matches.indexOf(i3));
2504
- }), u3 ? 0 : {
2505
- v: true
2506
- };
2507
- }, v2 = n4.length > 0 ? n4.shift() : 0; v2 < (isNaN(o3.quantifier.max) ? v2 + 1 : o3.quantifier.max) && p2 <= e3 && 0 !== (a2 = d4(v2)); v2++) if (a2) return a2.v;
2508
- })();
2509
- if (r4 = k(r4, n4, l4, d3)) return true;
2510
- } else p2++;
2511
- }
2512
- for (var d2 = n4.length > 0 ? n4.shift() : 0; d2 < t4.matches.length; d2++) if (true !== t4.matches[d2].isQuantifier) {
2513
- var h3 = f3(t4.matches[d2], [d2].concat(r3), l3);
2514
- if (h3 && p2 === e3) return h3;
2515
- if (p2 > e3) break;
2516
- }
2517
- }
2518
- function x(e4, t4) {
2519
- var n4 = -1 != e4.matches.indexOf(t4);
2520
- return n4 || e4.matches.forEach(function(e5, i4) {
2521
- void 0 === e5.matches || n4 || (n4 = x(e5, t4));
2522
- }), n4;
2523
- }
2524
- function S(e4, t4) {
2525
- var n4 = [];
2526
- return Array.isArray(t4) || (t4 = [t4]), t4.length > 0 && (void 0 === t4[0].alternation || true === c2.keepStatic || isFinite(parseInt(c2.keepStatic)) && e4 >= c2.keepStatic ? 0 === (n4 = d.call(o2, e4, t4.slice()).locator.slice()).length && (n4 = t4[0].locator.slice()) : t4.forEach(function(e5) {
2527
- Object.values(e5.mloc).forEach(function(e6) {
2528
- e6.forEach(function(e7, t5) {
2529
- var i4 = n4[t5];
2530
- e7.toString().includes(":") || i4 && i4.toString().includes(":") || (void 0 === i4 ? n4[t5] = e7 : i4.toString().includes(e7) || (n4[t5] = n4[t5] + "," + e7));
2531
- });
2532
- });
2533
- })), n4;
2534
- }
2535
- if (e3 > -1) {
2536
- if (void 0 === t3) {
2537
- for (var P, O = e3 - 1; void 0 === (P = s2.validPositions[O] || s2.tests[O]) && O > -1; ) O--;
2538
- void 0 !== P && O > -1 && (h2 = S(O, P), y = h2.join(""), p2 = O);
2539
- }
2540
- if (s2.tests[e3] && s2.tests[e3][0].cd === y) return s2.tests[e3];
2541
- for (var w = h2.shift(); w < f2.length; w++) {
2542
- if (k(f2[w], h2, [w]) && p2 === e3 || p2 > e3) break;
2543
- }
2544
- }
2545
- return (0 === m2.length || g) && m2.push({
2546
- match: {
2547
- fn: null,
2548
- static: true,
2549
- optionality: false,
2550
- casing: null,
2551
- def: "",
2552
- placeholder: ""
2553
- },
2554
- locator: b && 0 === m2.filter(function(e4) {
2555
- return true !== e4.unMatchedAlternationStopped;
2556
- }).length ? [0] : [],
2557
- mloc: {},
2558
- cd: y
2559
- }), void 0 !== t3 && s2.tests[e3] ? r2 = l2.extend(true, [], m2) : (s2.tests[e3] = l2.extend(true, [], m2), r2 = s2.tests[e3]), m2.forEach(function(e4) {
2560
- e4.match.optionality = e4.match.defOptionality || false;
2561
- }), r2;
2562
- }
2563
- },
2564
- 6032: function(e2, t2) {
2565
- function n2(e3) {
2566
- return n2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e4) {
2567
- return typeof e4;
2568
- } : function(e4) {
2569
- return e4 && "function" == typeof Symbol && e4.constructor === Symbol && e4 !== Symbol.prototype ? "symbol" : typeof e4;
2570
- }, n2(e3);
2571
- }
2572
- function i2(e3, t3) {
2573
- return (function(e4) {
2574
- if (Array.isArray(e4)) return e4;
2575
- })(e3) || (function(e4, t4) {
2576
- var n3 = null == e4 ? null : "undefined" != typeof Symbol && e4[Symbol.iterator] || e4["@@iterator"];
2577
- if (null != n3) {
2578
- var i3, a2, r2, o2, l2 = [], s2 = true, c = false;
2579
- try {
2580
- if (r2 = (n3 = n3.call(e4)).next, 0 === t4) ; else for (; !(s2 = (i3 = r2.call(n3)).done) && (l2.push(i3.value), l2.length !== t4); s2 = true) ;
2581
- } catch (e5) {
2582
- c = true, a2 = e5;
2583
- } finally {
2584
- try {
2585
- if (!s2 && null != n3.return && (o2 = n3.return(), Object(o2) !== o2)) return;
2586
- } finally {
2587
- if (c) throw a2;
2588
- }
2589
- }
2590
- return l2;
2591
- }
2592
- })(e3, t3) || (function(e4, t4) {
2593
- if (e4) {
2594
- if ("string" == typeof e4) return a(e4, t4);
2595
- var n3 = {}.toString.call(e4).slice(8, -1);
2596
- return "Object" === n3 && e4.constructor && (n3 = e4.constructor.name), "Map" === n3 || "Set" === n3 ? Array.from(e4) : "Arguments" === n3 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3) ? a(e4, t4) : void 0;
2597
- }
2598
- })(e3, t3) || (function() {
2599
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2600
- })();
2601
- }
2602
- function a(e3, t3) {
2603
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
2604
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
2605
- return i3;
2606
- }
2607
- function r(e3, t3) {
2608
- var n3 = Object.keys(e3);
2609
- if (Object.getOwnPropertySymbols) {
2610
- var i3 = Object.getOwnPropertySymbols(e3);
2611
- t3 && (i3 = i3.filter(function(t4) {
2612
- return Object.getOwnPropertyDescriptor(e3, t4).enumerable;
2613
- })), n3.push.apply(n3, i3);
2614
- }
2615
- return n3;
2616
- }
2617
- function o(e3, t3, i3) {
2618
- return (t3 = (function(e4) {
2619
- var t4 = (function(e5, t5) {
2620
- if ("object" != n2(e5) || !e5) return e5;
2621
- var i4 = e5[Symbol.toPrimitive];
2622
- if (void 0 !== i4) {
2623
- var a2 = i4.call(e5, t5);
2624
- if ("object" != n2(a2)) return a2;
2625
- throw new TypeError("@@toPrimitive must return a primitive value.");
2626
- }
2627
- return ("string" === t5 ? String : Number)(e5);
2628
- })(e4, "string");
2629
- return "symbol" == n2(t4) ? t4 : t4 + "";
2630
- })(t3)) in e3 ? Object.defineProperty(e3, t3, {
2631
- value: i3,
2632
- enumerable: true,
2633
- configurable: true,
2634
- writable: true
2635
- }) : e3[t3] = i3, e3;
2636
- }
2637
- Object.defineProperty(t2, "__esModule", {
2638
- value: true
2639
- }), t2.keys = t2.keyCode = void 0, t2.toKey = function(e3, t3) {
2640
- return s[e3] || (t3 ? String.fromCharCode(e3) : String.fromCharCode(e3).toLowerCase());
2641
- }, t2.toKeyCode = function(e3) {
2642
- return l[e3];
2643
- };
2644
- var l = t2.keyCode = (function(e3) {
2645
- for (var t3 = 1; t3 < arguments.length; t3++) {
2646
- var n3 = null != arguments[t3] ? arguments[t3] : {};
2647
- t3 % 2 ? r(Object(n3), true).forEach(function(t4) {
2648
- o(e3, t4, n3[t4]);
2649
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e3, Object.getOwnPropertyDescriptors(n3)) : r(Object(n3)).forEach(function(t4) {
2650
- Object.defineProperty(e3, t4, Object.getOwnPropertyDescriptor(n3, t4));
2651
- });
2652
- }
2653
- return e3;
2654
- })({
2655
- c: 67,
2656
- x: 88,
2657
- z: 90,
2658
- BACKSPACE_SAFARI: 127,
2659
- Enter: 13,
2660
- Meta_LEFT: 91,
2661
- Meta_RIGHT: 92,
2662
- Space: 32
2663
- }, {
2664
- Alt: 18,
2665
- AltGraph: 18,
2666
- ArrowDown: 40,
2667
- ArrowLeft: 37,
2668
- ArrowRight: 39,
2669
- ArrowUp: 38,
2670
- Backspace: 8,
2671
- CapsLock: 20,
2672
- Control: 17,
2673
- ContextMenu: 93,
2674
- Dead: 221,
2675
- Delete: 46,
2676
- End: 35,
2677
- Escape: 27,
2678
- F1: 112,
2679
- F2: 113,
2680
- F3: 114,
2681
- F4: 115,
2682
- F5: 116,
2683
- F6: 117,
2684
- F7: 118,
2685
- F8: 119,
2686
- F9: 120,
2687
- F10: 121,
2688
- F11: 122,
2689
- F12: 123,
2690
- Home: 36,
2691
- Insert: 45,
2692
- NumLock: 144,
2693
- PageDown: 34,
2694
- PageUp: 33,
2695
- Pause: 19,
2696
- PrintScreen: 44,
2697
- Process: 229,
2698
- Shift: 16,
2699
- ScrollLock: 145,
2700
- Tab: 9,
2701
- Unidentified: 229
2702
- }), s = Object.entries(l).reduce(function(e3, t3) {
2703
- var n3 = i2(t3, 2), a2 = n3[0], r2 = n3[1];
2704
- return e3[r2] = void 0 === e3[r2] ? a2 : e3[r2], e3;
2705
- }, {});
2706
- t2.keys = Object.entries(l).reduce(function(e3, t3) {
2707
- var n3 = i2(t3, 2), a2 = n3[0];
2708
- n3[1];
2709
- return e3[a2] = "Space" === a2 ? " " : a2, e3;
2710
- }, {});
2711
- },
2712
- 6047: function(e2, t2, n2) {
2713
- Object.defineProperty(t2, "__esModule", {
2714
- value: true
2715
- }), t2.EventHandlers = void 0;
2716
- var i2, a = n2(4351), r = (i2 = n2(6266)) && i2.__esModule ? i2 : {
2717
- default: i2
2718
- }, o = n2(1507), l = n2(6032), s = n2(7539), c = n2(7687), u = n2(5895);
2719
- function f() {
2720
- var e3, t3, n3 = "function" == typeof Symbol ? Symbol : {}, i3 = n3.iterator || "@@iterator", a2 = n3.toStringTag || "@@toStringTag";
2721
- function r2(n4, i4, a3, r3) {
2722
- var s3 = i4 && i4.prototype instanceof l2 ? i4 : l2, c3 = Object.create(s3.prototype);
2723
- return p(c3, "_invoke", (function(n5, i5, a4) {
2724
- var r4, l3, s4, c4 = 0, u3 = a4 || [], f2 = false, p2 = {
2725
- p: 0,
2726
- n: 0,
2727
- v: e3,
2728
- a: d3,
2729
- f: d3.bind(e3, 4),
2730
- d: function(t4, n6) {
2731
- return r4 = t4, l3 = 0, s4 = e3, p2.n = n6, o2;
2732
- }
2733
- };
2734
- function d3(n6, i6) {
2735
- for (l3 = n6, s4 = i6, t3 = 0; !f2 && c4 && !a5 && t3 < u3.length; t3++) {
2736
- var a5, r5 = u3[t3], d4 = p2.p, h3 = r5[2];
2737
- n6 > 3 ? (a5 = h3 === i6) && (s4 = r5[(l3 = r5[4]) ? 5 : (l3 = 3, 3)], r5[4] = r5[5] = e3) : r5[0] <= d4 && ((a5 = n6 < 2 && d4 < r5[1]) ? (l3 = 0, p2.v = i6, p2.n = r5[1]) : d4 < h3 && (a5 = n6 < 3 || r5[0] > i6 || i6 > h3) && (r5[4] = n6, r5[5] = i6, p2.n = h3, l3 = 0));
2738
- }
2739
- if (a5 || n6 > 1) return o2;
2740
- throw f2 = true, i6;
2741
- }
2742
- return function(a5, u4, h3) {
2743
- if (c4 > 1) throw TypeError("Generator is already running");
2744
- for (f2 && 1 === u4 && d3(u4, h3), l3 = u4, s4 = h3; (t3 = l3 < 2 ? e3 : s4) || !f2; ) {
2745
- r4 || (l3 ? l3 < 3 ? (l3 > 1 && (p2.n = -1), d3(l3, s4)) : p2.n = s4 : p2.v = s4);
2746
- try {
2747
- if (c4 = 2, r4) {
2748
- if (l3 || (a5 = "next"), t3 = r4[a5]) {
2749
- if (!(t3 = t3.call(r4, s4))) throw TypeError("iterator result is not an object");
2750
- if (!t3.done) return t3;
2751
- s4 = t3.value, l3 < 2 && (l3 = 0);
2752
- } else 1 === l3 && (t3 = r4.return) && t3.call(r4), l3 < 2 && (s4 = TypeError("The iterator does not provide a '" + a5 + "' method"), l3 = 1);
2753
- r4 = e3;
2754
- } else if ((t3 = (f2 = p2.n < 0) ? s4 : n5.call(i5, p2)) !== o2) break;
2755
- } catch (t4) {
2756
- r4 = e3, l3 = 1, s4 = t4;
2757
- } finally {
2758
- c4 = 1;
2759
- }
2760
- }
2761
- return {
2762
- value: t3,
2763
- done: f2
2764
- };
2765
- };
2766
- })(n4, a3, r3), true), c3;
2767
- }
2768
- var o2 = {};
2769
- function l2() {
2770
- }
2771
- function s2() {
2772
- }
2773
- function c2() {
2774
- }
2775
- t3 = Object.getPrototypeOf;
2776
- var u2 = [][i3] ? t3(t3([][i3]())) : (p(t3 = {}, i3, function() {
2777
- return this;
2778
- }), t3), d2 = c2.prototype = l2.prototype = Object.create(u2);
2779
- function h2(e4) {
2780
- return Object.setPrototypeOf ? Object.setPrototypeOf(e4, c2) : (e4.__proto__ = c2, p(e4, a2, "GeneratorFunction")), e4.prototype = Object.create(d2), e4;
2781
- }
2782
- return s2.prototype = c2, p(d2, "constructor", c2), p(c2, "constructor", s2), s2.displayName = "GeneratorFunction", p(c2, a2, "GeneratorFunction"), p(d2), p(d2, a2, "Generator"), p(d2, i3, function() {
2783
- return this;
2784
- }), p(d2, "toString", function() {
2785
- return "[object Generator]";
2786
- }), (f = function() {
2787
- return {
2788
- w: r2,
2789
- m: h2
2790
- };
2791
- })();
2792
- }
2793
- function p(e3, t3, n3, i3) {
2794
- var a2 = Object.defineProperty;
2795
- try {
2796
- a2({}, "", {});
2797
- } catch (e4) {
2798
- a2 = 0;
2799
- }
2800
- p = function(e4, t4, n4, i4) {
2801
- function r2(t5, n5) {
2802
- p(e4, t5, function(e5) {
2803
- return this._invoke(t5, n5, e5);
2804
- });
2805
- }
2806
- t4 ? a2 ? a2(e4, t4, {
2807
- value: n4,
2808
- enumerable: !i4,
2809
- configurable: !i4,
2810
- writable: !i4
2811
- }) : e4[t4] = n4 : (r2("next", 0), r2("throw", 1), r2("return", 2));
2812
- }, p(e3, t3, n3, i3);
2813
- }
2814
- function d(e3, t3) {
2815
- var n3 = "undefined" != typeof Symbol && e3[Symbol.iterator] || e3["@@iterator"];
2816
- if (!n3) {
2817
- if (Array.isArray(e3) || (n3 = (function(e4, t4) {
2818
- if (e4) {
2819
- if ("string" == typeof e4) return h(e4, t4);
2820
- var n4 = {}.toString.call(e4).slice(8, -1);
2821
- return "Object" === n4 && e4.constructor && (n4 = e4.constructor.name), "Map" === n4 || "Set" === n4 ? Array.from(e4) : "Arguments" === n4 || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n4) ? h(e4, t4) : void 0;
2822
- }
2823
- })(e3)) || t3) {
2824
- n3 && (e3 = n3);
2825
- var i3 = 0, a2 = function() {
2826
- };
2827
- return {
2828
- s: a2,
2829
- n: function() {
2830
- return i3 >= e3.length ? {
2831
- done: true
2832
- } : {
2833
- done: false,
2834
- value: e3[i3++]
2835
- };
2836
- },
2837
- e: function(e4) {
2838
- throw e4;
2839
- },
2840
- f: a2
2841
- };
2842
- }
2843
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2844
- }
2845
- var r2, o2 = true, l2 = false;
2846
- return {
2847
- s: function() {
2848
- n3 = n3.call(e3);
2849
- },
2850
- n: function() {
2851
- var e4 = n3.next();
2852
- return o2 = e4.done, e4;
2853
- },
2854
- e: function(e4) {
2855
- l2 = true, r2 = e4;
2856
- },
2857
- f: function() {
2858
- try {
2859
- o2 || null == n3.return || n3.return();
2860
- } finally {
2861
- if (l2) throw r2;
2862
- }
2863
- }
2864
- };
2865
- }
2866
- function h(e3, t3) {
2867
- (null == t3 || t3 > e3.length) && (t3 = e3.length);
2868
- for (var n3 = 0, i3 = Array(t3); n3 < t3; n3++) i3[n3] = e3[n3];
2869
- return i3;
2870
- }
2871
- function v(e3, t3, n3, i3, a2, r2, o2) {
2872
- try {
2873
- var l2 = e3[r2](o2), s2 = l2.value;
2874
- } catch (e4) {
2875
- return void n3(e4);
2876
- }
2877
- l2.done ? t3(s2) : Promise.resolve(s2).then(i3, a2);
2878
- }
2879
- var m, g, y = t2.EventHandlers = {
2880
- keyEvent: function(e3, t3, n3, i3, r2) {
2881
- var f2 = this.inputmask, p2 = f2.opts, d2 = f2.dependencyLib, h2 = f2.maskset, v2 = this, m2 = d2(v2), g2 = e3.key, b = s.caret.call(f2, v2), k = p2.onKeyDown.call(this, e3, s.getBuffer.call(f2), b, p2);
2882
- if (void 0 !== k) return k;
2883
- if (g2 === l.keys.Backspace || g2 === l.keys.Delete || a.iphone && g2 === l.keys.BACKSPACE_SAFARI || e3.ctrlKey && g2 === l.keys.x && !("oncut" in v2)) e3.preventDefault(), c.handleRemove.call(f2, v2, g2, b), (0, o.writeBuffer)(v2, s.getBuffer.call(f2, true), h2.p, e3, v2.inputmask._valueGet() !== s.getBuffer.call(f2).join(""));
2884
- else if (g2 === l.keys.End || g2 === l.keys.PageDown) {
2885
- e3.preventDefault();
2886
- var x = s.seekNext.call(f2, s.getLastValidPosition.call(f2));
2887
- s.caret.call(f2, v2, e3.shiftKey ? b.begin : x, x, true);
2888
- } else g2 === l.keys.Home && !e3.shiftKey || g2 === l.keys.PageUp ? (e3.preventDefault(), s.caret.call(f2, v2, 0, e3.shiftKey ? b.begin : 0, true)) : p2.undoOnEscape && g2 === l.keys.Escape && true !== e3.altKey ? ((0, o.checkVal)(v2, true, false, f2.undoValue.split("")), m2.trigger("click")) : g2 !== l.keys.Insert || e3.shiftKey || e3.ctrlKey || void 0 !== f2.userOptions.insertMode ? true === p2.tabThrough && g2 === l.keys.Tab ? true === e3.shiftKey ? (b.end = s.seekPrevious.call(f2, b.end, true), true === u.getTest.call(f2, b.end - 1).match.static && b.end--, b.begin = s.seekPrevious.call(f2, b.end, true), b.begin >= 0 && b.end > 0 && (e3.preventDefault(), s.caret.call(f2, v2, b.begin, b.end))) : (b.begin = s.seekNext.call(f2, b.begin, true), b.end = s.seekNext.call(f2, b.begin, true), b.end < h2.maskLength && b.end--, b.begin <= h2.maskLength && (e3.preventDefault(), s.caret.call(f2, v2, b.begin, b.end))) : e3.shiftKey || (p2.insertModeVisual && false === p2.insertMode ? g2 === l.keys.ArrowRight ? setTimeout(function() {
2889
- var e4 = s.caret.call(f2, v2);
2890
- s.caret.call(f2, v2, e4.begin);
2891
- }, 0) : g2 === l.keys.ArrowLeft && setTimeout(function() {
2892
- var e4 = s.translatePosition.call(f2, v2.inputmask.caretPos.begin);
2893
- s.translatePosition.call(f2, v2.inputmask.caretPos.end);
2894
- f2.isRTL ? s.caret.call(f2, v2, e4 + (e4 === h2.maskLength ? 0 : 1)) : s.caret.call(f2, v2, e4 - (0 === e4 ? 0 : 1));
2895
- }, 0) : void 0 === f2.keyEventHook || f2.keyEventHook(e3)) : c.isSelection.call(f2, b) ? p2.insertMode = !p2.insertMode : (p2.insertMode = !p2.insertMode, s.caret.call(f2, v2, b.begin, b.begin));
2896
- return f2.isComposing = g2 === l.keys.Process || g2 === l.keys.Unidentified, f2.ignorable = void 0 === g2 || g2.length > 1, y.keypressEvent.call(f2, e3, t3, n3, i3, r2);
2897
- },
2898
- keypressEvent: function(e3, t3, n3, i3, a2) {
2899
- var r2 = this.inputmask || this, u2 = r2.opts, f2 = r2.dependencyLib, p2 = r2.maskset, d2 = r2.el, h2 = f2(d2), v2 = e3.key;
2900
- if (true === t3 || e3.ctrlKey && e3.altKey && !r2.ignorable || !(e3.ctrlKey || e3.metaKey || r2.ignorable)) {
2901
- if (v2) {
2902
- var m2, g2 = t3 ? {
2903
- begin: a2,
2904
- end: a2
2905
- } : s.caret.call(r2, d2);
2906
- t3 || (v2 = u2.substitutes[v2] || v2), p2.writeOutBuffer = true;
2907
- var y2 = c.isValid.call(r2, g2, v2, i3, void 0, void 0, void 0, t3);
2908
- if (false !== y2 && (s.resetMaskSet.call(r2, true), m2 = void 0 !== y2.caret ? y2.caret : s.seekNext.call(r2, y2.pos.begin ? y2.pos.begin : y2.pos), p2.p = m2), m2 = u2.numericInput && void 0 === y2.caret ? s.seekPrevious.call(r2, m2) : m2, false !== n3 && (setTimeout(function() {
2909
- u2.onKeyValidation.call(d2, v2, y2);
2910
- }, 0), p2.writeOutBuffer && false !== y2)) {
2911
- var b = s.getBuffer.call(r2);
2912
- (0, o.writeBuffer)(d2, b, m2, e3, true !== t3);
2913
- }
2914
- if (e3.preventDefault(), t3) return false !== y2 && (y2.forwardPosition = m2), y2;
2915
- }
2916
- } else v2 === l.keys.Enter && r2.undoValue !== r2._valueGet(true) && (r2.undoValue = r2._valueGet(true), setTimeout(function() {
2917
- h2.trigger("change");
2918
- }, 0));
2919
- },
2920
- pasteEvent: (m = f().m(function e3(t3) {
2921
- var n3, i3, a2, l2, c2, u2;
2922
- return f().w(function(e4) {
2923
- for (; ; ) switch (e4.n) {
2924
- case 0:
2925
- n3 = function(e5, n4, i4, a3, r2) {
2926
- var c3 = s.caret.call(e5, n4, void 0, void 0, true), u3 = i4.substr(0, c3.begin), f2 = i4.substr(c3.end, i4.length);
2927
- if (u3 == (e5.isRTL ? s.getBufferTemplate.call(e5).slice().reverse() : s.getBufferTemplate.call(e5)).slice(0, c3.begin).join("") && (u3 = ""), f2 == (e5.isRTL ? s.getBufferTemplate.call(e5).slice().reverse() : s.getBufferTemplate.call(e5)).slice(c3.end).join("") && (f2 = ""), a3 = u3 + a3 + f2, e5.isRTL && true !== l2.numericInput) {
2928
- a3 = a3.split("");
2929
- var p2, h2 = d(s.getBufferTemplate.call(e5));
2930
- try {
2931
- for (h2.s(); !(p2 = h2.n()).done; ) {
2932
- var v2 = p2.value;
2933
- a3[0] === v2 && a3.shift();
2934
- }
2935
- } catch (e6) {
2936
- h2.e(e6);
2937
- } finally {
2938
- h2.f();
2939
- }
2940
- a3 = a3.reverse().join("");
2941
- }
2942
- var m2 = a3;
2943
- if ("function" == typeof r2) {
2944
- if (false === (m2 = r2.call(e5, m2, l2))) return false;
2945
- m2 || (m2 = i4);
2946
- }
2947
- (0, o.checkVal)(n4, true, false, m2.toString().split(""), t3);
2948
- }, i3 = this, a2 = this.inputmask, l2 = a2.opts, c2 = a2._valueGet(true), a2.skipInputEvent = true, t3.clipboardData && t3.clipboardData.getData ? u2 = t3.clipboardData.getData("text/plain") : r.default.clipboardData && r.default.clipboardData.getData && (u2 = r.default.clipboardData.getData("Text")), n3(a2, i3, c2, u2, l2.onBeforePaste), t3.preventDefault();
2949
- case 1:
2950
- return e4.a(2);
2951
- }
2952
- }, e3, this);
2953
- }), g = function() {
2954
- var e3 = this, t3 = arguments;
2955
- return new Promise(function(n3, i3) {
2956
- var a2 = m.apply(e3, t3);
2957
- function r2(e4) {
2958
- v(a2, n3, i3, r2, o2, "next", e4);
2959
- }
2960
- function o2(e4) {
2961
- v(a2, n3, i3, r2, o2, "throw", e4);
2962
- }
2963
- r2(void 0);
2964
- });
2965
- }, function(e3) {
2966
- return g.apply(this, arguments);
2967
- }),
2968
- inputFallBackEvent: function(e3) {
2969
- var t3 = this.inputmask, n3 = t3.opts, i3 = t3.dependencyLib;
2970
- var r2, c2 = this, f2 = c2.inputmask._valueGet(true), p2 = (t3.isRTL ? s.getBuffer.call(t3).slice().reverse() : s.getBuffer.call(t3)).join(""), d2 = s.caret.call(t3, c2, void 0, void 0, true);
2971
- if (p2 !== f2) {
2972
- if (r2 = (function(e4, i4, a2) {
2973
- for (var r3, o2, l2, c3 = e4.substr(0, a2.begin).split(""), f3 = e4.substr(a2.begin).split(""), p3 = i4.substr(0, a2.begin).split(""), d3 = i4.substr(a2.begin).split(""), h3 = c3.length >= p3.length ? c3.length : p3.length, v2 = f3.length >= d3.length ? f3.length : d3.length, m2 = "", g2 = [], y2 = "~"; c3.length < h3; ) c3.push(y2);
2974
- for (; p3.length < h3; ) p3.push(y2);
2975
- for (; f3.length < v2; ) f3.unshift(y2);
2976
- for (; d3.length < v2; ) d3.unshift(y2);
2977
- var b = c3.concat(f3), k = p3.concat(d3);
2978
- for (o2 = 0, r3 = b.length; o2 < r3; o2++) switch (l2 = u.getPlaceholder.call(t3, s.translatePosition.call(t3, o2)), m2) {
2979
- case "insertText":
2980
- k[o2 - 1] === b[o2] && a2.begin == b.length - 1 && g2.push(b[o2]), o2 = r3;
2981
- break;
2982
- case "insertReplacementText":
2983
- case "deleteContentBackward":
2984
- b[o2] === y2 ? a2.end++ : o2 = r3;
2985
- break;
2986
- default:
2987
- b[o2] !== k[o2] && (b[o2 + 1] !== y2 && b[o2 + 1] !== l2 && void 0 !== b[o2 + 1] || (k[o2] !== l2 || k[o2 + 1] !== y2) && k[o2] !== y2 ? k[o2 + 1] === y2 && k[o2] === b[o2 + 1] ? (m2 = "insertText", g2.push(b[o2]), a2.begin--, a2.end--) : b[o2] !== l2 && b[o2] !== y2 && (b[o2 + 1] === y2 || k[o2] !== b[o2] && k[o2 + 1] === b[o2 + 1]) ? (m2 = "insertReplacementText", g2.push(b[o2]), a2.begin--) : b[o2] === y2 ? (m2 = "deleteContentBackward", (s.isMask.call(t3, s.translatePosition.call(t3, o2), true) || k[o2] === n3.radixPoint) && a2.end++) : o2 = r3 : (m2 = "insertText", g2.push(b[o2]), a2.begin--, a2.end--));
2988
- }
2989
- return {
2990
- action: m2,
2991
- data: g2,
2992
- caret: a2
2993
- };
2994
- })(f2, p2, d2), c2.getRootNode().activeElement !== c2 && c2.focus(), (0, o.writeBuffer)(c2, s.getBuffer.call(t3)), s.caret.call(t3, c2, d2.begin, d2.end, true), !a.mobile && t3.skipNextInsert && "insertText" === e3.inputType && "insertText" === r2.action && t3.isComposing) return false;
2995
- switch ("insertCompositionText" === e3.inputType && "insertText" === r2.action && t3.isComposing ? t3.skipNextInsert = true : t3.skipNextInsert = false, r2.action) {
2996
- case "insertText":
2997
- case "insertReplacementText":
2998
- r2.data.forEach(function(e4, n4) {
2999
- var a2 = new i3.Event("keypress");
3000
- a2.key = e4, t3.ignorable = false, y.keypressEvent.call(c2, a2);
3001
- }), setTimeout(function() {
3002
- t3.$el.trigger("keyup");
3003
- }, 0);
3004
- break;
3005
- case "deleteContentBackward":
3006
- var h2 = new i3.Event("keydown");
3007
- h2.key = l.keys.Backspace, y.keyEvent.call(c2, h2);
3008
- break;
3009
- default:
3010
- (0, o.applyInputValue)(c2, f2), s.caret.call(t3, c2, d2.begin, d2.end, true);
3011
- }
3012
- e3.preventDefault();
3013
- }
3014
- },
3015
- setValueEvent: function(e3) {
3016
- var t3 = this.inputmask, n3 = t3.dependencyLib, i3 = this, a2 = e3 && e3.detail ? e3.detail[0] : arguments[1];
3017
- void 0 === a2 && (a2 = i3.inputmask._valueGet(true)), (0, o.applyInputValue)(i3, a2, new n3.Event("input"), void 0 !== (e3 && e3.detail ? e3.detail[0] : arguments[1])), (e3.detail && void 0 !== e3.detail[1] || void 0 !== arguments[2]) && s.caret.call(t3, i3, e3.detail ? e3.detail[1] : arguments[2]);
3018
- },
3019
- focusEvent: function(e3) {
3020
- var t3 = this.inputmask, n3 = t3.opts, i3 = t3 && t3._valueGet();
3021
- n3.showMaskOnFocus && i3 !== s.getBuffer.call(t3).join("") && (0, o.writeBuffer)(this, s.getBuffer.call(t3), s.seekNext.call(t3, s.getLastValidPosition.call(t3))), true !== n3.positionCaretOnTab || false !== t3.mouseEnter || c.isComplete.call(t3, s.getBuffer.call(t3)) && -1 !== s.getLastValidPosition.call(t3) || y.clickEvent.apply(this, [e3, true]), t3.undoValue = t3 && t3._valueGet(true);
3022
- },
3023
- invalidEvent: function(e3) {
3024
- this.inputmask.validationEvent = true;
3025
- },
3026
- mouseleaveEvent: function() {
3027
- var e3 = this.inputmask, t3 = e3.opts, n3 = this;
3028
- e3.mouseEnter = false, t3.clearMaskOnLostFocus && n3.getRootNode().activeElement !== n3 && (0, o.HandleNativePlaceholder)(n3, e3.originalPlaceholder);
3029
- },
3030
- clickEvent: function(e3, t3) {
3031
- var n3 = this.inputmask;
3032
- n3.clicked++;
3033
- var i3 = this;
3034
- if (i3.getRootNode().activeElement === i3) {
3035
- var a2 = s.determineNewCaretPosition.call(n3, s.caret.call(n3, i3), t3);
3036
- void 0 !== a2 && s.caret.call(n3, i3, a2);
3037
- }
3038
- },
3039
- cutEvent: function(e3) {
3040
- var t3 = this.inputmask, n3 = t3.maskset, i3 = this, a2 = s.caret.call(t3, i3), u2 = t3.isRTL ? s.getBuffer.call(t3).slice(a2.end, a2.begin) : s.getBuffer.call(t3).slice(a2.begin, a2.end), f2 = t3.isRTL ? u2.reverse().join("") : u2.join("");
3041
- r.default.navigator && r.default.navigator.clipboard ? r.default.navigator.clipboard.writeText(f2) : r.default.clipboardData && r.default.clipboardData.getData && r.default.clipboardData.setData("Text", f2), c.handleRemove.call(t3, i3, l.keys.Delete, a2), (0, o.writeBuffer)(i3, s.getBuffer.call(t3), n3.p, e3, t3.undoValue !== t3._valueGet(true));
3042
- },
3043
- blurEvent: function(e3) {
3044
- var t3 = this.inputmask, n3 = t3.opts, i3 = t3.dependencyLib;
3045
- t3.clicked = 0;
3046
- var a2 = i3(this), r2 = this;
3047
- if (r2.inputmask) {
3048
- (0, o.HandleNativePlaceholder)(r2, t3.originalPlaceholder);
3049
- var l2 = r2.inputmask._valueGet(), u2 = s.getBuffer.call(t3).slice();
3050
- if ("" !== l2 && (n3.clearMaskOnLostFocus && (-1 === s.getLastValidPosition.call(t3) && l2 === s.getBufferTemplate.call(t3).join("") ? u2 = [] : o.clearOptionalTail.call(t3, u2)), false === c.isComplete.call(t3, u2) && (setTimeout(function() {
3051
- a2.trigger("incomplete");
3052
- }, 0), n3.clearIncomplete && (s.resetMaskSet.call(t3, false), u2 = n3.clearMaskOnLostFocus ? [] : s.getBufferTemplate.call(t3).slice())), (0, o.writeBuffer)(r2, u2, void 0, e3)), l2 = t3._valueGet(true), t3.undoValue !== l2) {
3053
- var f2 = (t3.isRTL ? s.getBufferTemplate.call(t3).slice().reverse() : s.getBufferTemplate.call(t3)).join("");
3054
- ("" !== l2 || t3.undoValue !== f2 || t3.undoValue === f2 && t3.maskset.validPositions.length > 0) && (t3.undoValue = l2, a2.trigger("change"));
3055
- }
3056
- }
3057
- },
3058
- mouseenterEvent: function() {
3059
- var e3 = this.inputmask, t3 = e3.opts.showMaskOnHover, n3 = this;
3060
- if (e3.mouseEnter = true, n3.getRootNode().activeElement !== n3) {
3061
- var i3 = (e3.isRTL ? s.getBufferTemplate.call(e3).slice().reverse() : s.getBufferTemplate.call(e3)).join("");
3062
- t3 && (0, o.HandleNativePlaceholder)(n3, i3);
3063
- }
3064
- },
3065
- submitEvent: function() {
3066
- var e3 = this.inputmask, t3 = e3.opts;
3067
- e3.undoValue !== e3._valueGet(true) && e3.$el.trigger("change"), -1 === s.getLastValidPosition.call(e3) && e3._valueGet && e3._valueGet() === s.getBufferTemplate.call(e3).join("") && e3._valueSet(""), t3.clearIncomplete && false === c.isComplete.call(e3, s.getBuffer.call(e3)) && e3._valueSet(""), t3.removeMaskOnSubmit && (e3._valueSet(e3.unmaskedvalue(), true), setTimeout(function() {
3068
- (0, o.writeBuffer)(e3.el, s.getBuffer.call(e3));
3069
- }, 0));
3070
- },
3071
- resetEvent: function() {
3072
- var e3 = this.inputmask;
3073
- e3.refreshValue = true, setTimeout(function() {
3074
- (0, o.applyInputValue)(e3.el, e3._valueGet(true));
3075
- }, 0);
3076
- }
3077
- };
3078
- },
3079
- 6266: function(e2, t2) {
3080
- Object.defineProperty(t2, "__esModule", {
3081
- value: true
3082
- }), t2.default = void 0;
3083
- var n2 = !("undefined" == typeof window || !window.document || !window.document.createElement);
3084
- t2.default = n2 ? window : {};
3085
- },
3086
- 7042: function(e2, t2) {
3087
- Object.defineProperty(t2, "__esModule", {
3088
- value: true
3089
- }), t2.default = void 0;
3090
- t2.default = {
3091
- _maxTestPos: 500,
3092
- placeholder: "_",
3093
- optionalmarker: ["[", "]"],
3094
- quantifiermarker: ["{", "}"],
3095
- groupmarker: ["(", ")"],
3096
- alternatormarker: "|",
3097
- escapeChar: "\\",
3098
- mask: null,
3099
- regex: null,
3100
- oncomplete: function() {
3101
- },
3102
- onincomplete: function() {
3103
- },
3104
- oncleared: function() {
3105
- },
3106
- repeat: 0,
3107
- greedy: false,
3108
- autoUnmask: false,
3109
- removeMaskOnSubmit: false,
3110
- clearMaskOnLostFocus: true,
3111
- insertMode: true,
3112
- insertModeVisual: true,
3113
- clearIncomplete: false,
3114
- alias: null,
3115
- onKeyDown: function() {
3116
- },
3117
- onBeforeMask: null,
3118
- onBeforePaste: function(e3, t3) {
3119
- return "function" == typeof t3.onBeforeMask ? t3.onBeforeMask.call(this, e3, t3) : e3;
3120
- },
3121
- onBeforeWrite: null,
3122
- onUnMask: null,
3123
- outputMask: null,
3124
- showMaskOnFocus: true,
3125
- showMaskOnHover: true,
3126
- onKeyValidation: function() {
3127
- },
3128
- skipOptionalPartCharacter: " ",
3129
- numericInput: false,
3130
- rightAlign: false,
3131
- undoOnEscape: true,
3132
- radixPoint: "",
3133
- _radixDance: false,
3134
- groupSeparator: "",
3135
- keepStatic: null,
3136
- positionCaretOnTab: true,
3137
- tabThrough: false,
3138
- supportsInputType: ["text", "tel", "url", "password", "search"],
3139
- isComplete: null,
3140
- preValidation: null,
3141
- postValidation: null,
3142
- staticDefinitionSymbol: void 0,
3143
- jitMasking: false,
3144
- nullable: true,
3145
- inputEventOnly: false,
3146
- noValuePatching: false,
3147
- positionCaretOnClick: "lvp",
3148
- casing: null,
3149
- inputmode: "text",
3150
- importDataAttributes: true,
3151
- shiftPositions: true,
3152
- usePrototypeDefinitions: true,
3153
- validationEventTimeOut: 3e3,
3154
- substitutes: {}
3155
- };
3156
- },
3157
- 7153: function(e2, t2, n2) {
3158
- var i2, a = (i2 = n2(3978)) && i2.__esModule ? i2 : {
3159
- default: i2
3160
- };
3161
- a.default.dependencyLib.extend(true, a.default.prototype.i18n, {
3162
- dayNames: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
3163
- monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
3164
- ordinalSuffix: ["st", "nd", "rd", "th"]
3165
- });
3166
- },
3167
- 7332: function(e2, t2, n2) {
3168
- Object.defineProperty(t2, "__esModule", {
3169
- value: true
3170
- }), t2.default = void 0;
3171
- var i2 = l(n2(6266)), a = l(n2(2088)), r = n2(5841), o = l(n2(672));
3172
- function l(e3) {
3173
- return e3 && e3.__esModule ? e3 : {
3174
- default: e3
3175
- };
3176
- }
3177
- var s = i2.default.document;
3178
- function c(e3) {
3179
- return e3 instanceof c ? e3 : this instanceof c ? void (null != e3 && e3 !== i2.default && (this[0] = e3.nodeName ? e3 : void 0 !== e3[0] && e3[0].nodeName ? e3[0] : s.querySelector(e3), void 0 !== this[0] && null !== this[0] && (0, a.default)(this[0], "events", (0, a.default)(this[0], "events") || {}))) : new c(e3);
3180
- }
3181
- c.prototype = {
3182
- on: r.on,
3183
- off: r.off,
3184
- trigger: r.trigger
3185
- }, c.extend = o.default, c.data = a.default, c.Event = r.Event;
3186
- t2.default = c;
3187
- },
3188
- 7539: function(e2, t2, n2) {
3189
- Object.defineProperty(t2, "__esModule", {
3190
- value: true
3191
- }), t2.caret = function(e3, t3, n3, i3, r2) {
3192
- var o2, l2 = this, s2 = this.opts;
3193
- if (void 0 === t3) return "selectionStart" in e3 && "selectionEnd" in e3 ? (t3 = e3.selectionStart, n3 = e3.selectionEnd) : a.default.getSelection ? (o2 = a.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e3 && o2.commonAncestorContainer !== e3 || (t3 = o2.startOffset, n3 = o2.endOffset) : document.selection && document.selection.createRange && (n3 = (t3 = 0 - (o2 = document.selection.createRange()).duplicate().moveStart("character", -e3.inputmask._valueGet().length)) + o2.text.length), {
3194
- begin: i3 ? t3 : f.call(l2, t3),
3195
- end: i3 ? n3 : f.call(l2, n3)
3196
- };
3197
- if (Array.isArray(t3) && (n3 = l2.isRTL ? t3[0] : t3[1], t3 = l2.isRTL ? t3[1] : t3[0]), void 0 !== t3.begin && (n3 = l2.isRTL ? t3.begin : t3.end, t3 = l2.isRTL ? t3.end : t3.begin), "number" == typeof t3) {
3198
- t3 = i3 ? t3 : f.call(l2, t3), n3 = "number" == typeof (n3 = i3 ? n3 : f.call(l2, n3)) ? n3 : t3;
3199
- var c2 = parseInt(((e3.ownerDocument.defaultView || a.default).getComputedStyle ? (e3.ownerDocument.defaultView || a.default).getComputedStyle(e3, null) : e3.currentStyle).fontSize) * n3;
3200
- if (e3.scrollLeft = c2 > e3.scrollWidth ? c2 : 0, e3.inputmask.caretPos = {
3201
- begin: t3,
3202
- end: n3
3203
- }, s2.insertModeVisual && false === s2.insertMode && t3 === n3 && (r2 || n3++), e3 === e3.getRootNode().activeElement) {
3204
- if ("setSelectionRange" in e3) e3.setSelectionRange(t3, n3);
3205
- else if (a.default.getSelection) {
3206
- if (o2 = document.createRange(), void 0 === e3.firstChild || null === e3.firstChild) {
3207
- var u2 = document.createTextNode("");
3208
- e3.appendChild(u2);
3209
- }
3210
- o2.setStart(e3.firstChild, t3 < e3.inputmask._valueGet().length ? t3 : e3.inputmask._valueGet().length), o2.setEnd(e3.firstChild, n3 < e3.inputmask._valueGet().length ? n3 : e3.inputmask._valueGet().length), o2.collapse(true);
3211
- var p = a.default.getSelection();
3212
- p.removeAllRanges(), p.addRange(o2);
3213
- } else e3.createTextRange && ((o2 = e3.createTextRange()).collapse(true), o2.moveEnd("character", n3), o2.moveStart("character", t3), o2.select());
3214
- void 0 === e3.inputmask.caretHook || e3.inputmask.caretHook.call(l2, {
3215
- begin: t3,
3216
- end: n3
3217
- });
3218
- }
3219
- }
3220
- }, t2.determineLastRequiredPosition = function(e3) {
3221
- var t3, n3, i3 = this, a2 = i3.maskset, l2 = i3.dependencyLib, c2 = s.call(i3), u2 = {}, f2 = a2.validPositions[c2], p = o.getMaskTemplate.call(i3, true, s.call(i3), true, true), d = p.length, h = void 0 !== f2 ? f2.locator.slice() : void 0;
3222
- for (t3 = c2 + 1; t3 < p.length; t3++) h = (n3 = o.getTestTemplate.call(i3, t3, h, t3 - 1)).locator.slice(), u2[t3] = l2.extend(true, {}, n3);
3223
- var v = f2 && void 0 !== f2.alternation ? f2.locator[f2.alternation] : void 0;
3224
- for (t3 = d - 1; t3 > c2 && (((n3 = u2[t3]).match.optionality || n3.match.optionalQuantifier && n3.match.newBlockMarker || v && (v !== u2[t3].locator[f2.alternation] && true !== n3.match.static || true === n3.match.static && n3.locator[f2.alternation] && r.checkAlternationMatch.call(i3, n3.locator[f2.alternation].toString().split(","), v.toString().split(",")) && "" !== o.getTests.call(i3, t3)[0].def)) && p[t3] === o.getPlaceholder.call(i3, t3, n3.match)); t3--) if (d--, n3.match.optionality) {
3225
- for (var m = t3; m > 0; ) {
3226
- var g = o.getTest.call(i3, m);
3227
- if ("master" === g.match.newBlockMarker || true === g.match.newBlockMarker) break;
3228
- m--;
3229
- }
3230
- if (void 0 !== a2.validPositions[m]) break;
3231
- }
3232
- t3 === c2 && (d = t3);
3233
- return e3 ? {
3234
- l: d,
3235
- def: u2[d] ? u2[d].match : void 0
3236
- } : d;
3237
- }, t2.determineNewCaretPosition = function(e3, t3, n3) {
3238
- var i3, a2, r2, f2 = this, p = f2.maskset, d = f2.opts;
3239
- t3 && (f2.isRTL ? e3.end = e3.begin : e3.begin = e3.end);
3240
- if (e3.begin === e3.end) {
3241
- switch (n3 = n3 || d.positionCaretOnClick) {
3242
- case "none":
3243
- break;
3244
- case "select":
3245
- e3 = {
3246
- begin: 0,
3247
- end: l.call(f2).length
3248
- };
3249
- break;
3250
- case "ignore":
3251
- e3.end = e3.begin = u.call(f2, s.call(f2));
3252
- break;
3253
- case "radixFocus":
3254
- if (f2.clicked > 1 && 0 === p.validPositions.length) break;
3255
- if ((function(e4) {
3256
- if ("" !== d.radixPoint && 0 !== d.digits) {
3257
- var t4 = p.validPositions;
3258
- if (void 0 === t4[e4] || void 0 === t4[e4].input) {
3259
- if (e4 < u.call(f2, -1)) return true;
3260
- var n4 = l.call(f2).indexOf(d.radixPoint);
3261
- if (-1 !== n4) {
3262
- for (var i4 = 0, a3 = t4.length; i4 < a3; i4++) if (t4[i4] && n4 < i4 && t4[i4].input !== o.getPlaceholder.call(f2, i4)) return false;
3263
- return true;
3264
- }
3265
- }
3266
- }
3267
- return false;
3268
- })(e3.begin)) {
3269
- var h = l.call(f2).join("").indexOf(d.radixPoint);
3270
- e3.end = e3.begin = d.numericInput ? u.call(f2, h) : h;
3271
- break;
3272
- }
3273
- default:
3274
- if (i3 = e3.begin, a2 = s.call(f2, i3, true), i3 <= (r2 = u.call(f2, -1 !== a2 || c.call(f2, 0) ? a2 : -1))) e3.end = e3.begin = c.call(f2, i3, false, true) ? i3 : u.call(f2, i3);
3275
- else {
3276
- var v = p.validPositions[a2], m = o.getTestTemplate.call(f2, r2, v ? v.match.locator : void 0, v), g = o.getPlaceholder.call(f2, r2, m.match);
3277
- if ("" !== g && l.call(f2)[r2] !== g && true !== m.match.optionalQuantifier && true !== m.match.newBlockMarker || !c.call(f2, r2, d.keepStatic, true) && m.match.def === g) {
3278
- var y = u.call(f2, r2);
3279
- (i3 >= y || i3 === r2) && (r2 = y);
3280
- }
3281
- e3.end = e3.begin = r2;
3282
- }
3283
- }
3284
- return e3;
3285
- }
3286
- }, t2.getBuffer = l, t2.getBufferTemplate = function() {
3287
- var e3 = this.maskset;
3288
- void 0 === e3._buffer && (e3._buffer = o.getMaskTemplate.call(this, false, 1), void 0 === e3.buffer && (e3.buffer = e3._buffer.slice()));
3289
- return e3._buffer;
3290
- }, t2.getLastValidPosition = s, t2.isMask = c, t2.resetMaskSet = function(e3) {
3291
- var t3 = this.maskset;
3292
- t3.buffer = void 0, true !== e3 && (t3.validPositions = [], t3.p = 0);
3293
- false === e3 && (t3.tests = {}, t3.jitOffset = {});
3294
- }, t2.seekNext = u, t2.seekPrevious = function(e3, t3) {
3295
- var n3 = this, i3 = e3 - 1;
3296
- if (e3 <= 0) return 0;
3297
- for (; i3 > 0 && (true === t3 && (true !== o.getTest.call(n3, i3).match.newBlockMarker || !c.call(n3, i3, void 0, true)) || true !== t3 && !c.call(n3, i3, void 0, true)); ) i3--;
3298
- return i3;
3299
- }, t2.translatePosition = f;
3300
- var i2, a = (i2 = n2(6266)) && i2.__esModule ? i2 : {
3301
- default: i2
3302
- }, r = n2(7687), o = n2(5895);
3303
- function l(e3) {
3304
- var t3 = this, n3 = t3.maskset;
3305
- return void 0 !== n3.buffer && true !== e3 || (n3.buffer = o.getMaskTemplate.call(t3, true, s.call(t3), true), void 0 === n3._buffer && (n3._buffer = n3.buffer.slice())), n3.buffer;
3306
- }
3307
- function s(e3, t3, n3) {
3308
- var i3 = this.maskset, a2 = -1, r2 = -1, o2 = n3 || i3.validPositions;
3309
- void 0 === e3 && (e3 = -1);
3310
- for (var l2 = 0, s2 = o2.length; l2 < s2; l2++) o2[l2] && (t3 || true !== o2[l2].generatedInput) && (l2 <= e3 && (a2 = l2), l2 >= e3 && (r2 = l2));
3311
- return -1 === a2 || a2 === e3 ? r2 : -1 === r2 || e3 - a2 < r2 - e3 ? a2 : r2;
3312
- }
3313
- function c(e3, t3, n3) {
3314
- var i3 = this, a2 = this.maskset, r2 = o.getTestTemplate.call(i3, e3).match;
3315
- if ("" === r2.def && (r2 = o.getTest.call(i3, e3).match), true !== r2.static) return r2.fn;
3316
- if (true === n3 && void 0 !== a2.validPositions[e3] && true !== a2.validPositions[e3].generatedInput) return true;
3317
- if (true !== t3 && e3 > -1) {
3318
- if (n3) {
3319
- var l2 = o.getTests.call(i3, e3);
3320
- return l2.length > 1 + ("" === l2[l2.length - 1].match.def ? 1 : 0);
3321
- }
3322
- var s2 = o.determineTestTemplate.call(i3, e3, o.getTests.call(i3, e3)), c2 = o.getPlaceholder.call(i3, e3, s2.match);
3323
- return s2.match.def !== c2;
3324
- }
3325
- return false;
3326
- }
3327
- function u(e3, t3, n3) {
3328
- var i3 = this;
3329
- void 0 === n3 && (n3 = true);
3330
- for (var a2 = e3 + 1; "" !== o.getTest.call(i3, a2).match.def && (true === t3 && (true !== o.getTest.call(i3, a2).match.newBlockMarker || !c.call(i3, a2, void 0, true)) || true !== t3 && !c.call(i3, a2, void 0, n3)); ) a2++;
3331
- return a2;
3332
- }
3333
- function f(e3) {
3334
- var t3 = this.opts, n3 = this.el;
3335
- return !this.isRTL || "number" != typeof e3 || t3.greedy && "" === t3.placeholder || !n3 || (e3 = this._valueGet().length - e3) < 0 && (e3 = 0), e3;
3336
- }
3337
- },
3338
- 7687: function(e2, t2, n2) {
3339
- Object.defineProperty(t2, "__esModule", {
3340
- value: true
3341
- }), t2.alternate = l, t2.checkAlternationMatch = function(e3, t3, n3) {
3342
- for (var i3, a2 = this.opts.greedy ? t3 : t3.slice(0, 1), r2 = false, o2 = void 0 !== n3 ? n3.split(",") : [], l2 = 0; l2 < o2.length; l2++) -1 !== (i3 = e3.indexOf(o2[l2])) && e3.splice(i3, 1);
3343
- for (var s2 = 0; s2 < e3.length; s2++) if (a2.includes(e3[s2])) {
3344
- r2 = true;
3345
- break;
3346
- }
3347
- return r2;
3348
- }, t2.handleRemove = function(e3, t3, n3, i3, s2) {
3349
- var c2 = this, u2 = this.maskset, f2 = this.opts;
3350
- if ((f2.numericInput || c2.isRTL) && (t3 === a.keys.Backspace ? t3 = a.keys.Delete : t3 === a.keys.Delete && (t3 = a.keys.Backspace), c2.isRTL)) {
3351
- var p2 = n3.end;
3352
- n3.end = n3.begin, n3.begin = p2;
3353
- }
3354
- var d2, h2 = r.getLastValidPosition.call(c2, void 0, true);
3355
- n3.end >= r.getBuffer.call(c2).length && h2 >= n3.end && (n3.end = h2 + 1);
3356
- t3 === a.keys.Backspace ? n3.end - n3.begin < 1 && (n3.begin = r.seekPrevious.call(c2, n3.begin)) : t3 === a.keys.Delete && n3.begin === n3.end && (n3.end = r.isMask.call(c2, n3.end, true, true) ? n3.end + 1 : r.seekNext.call(c2, n3.end) + 1);
3357
- false !== (d2 = v.call(c2, n3)) && ((true !== i3 && false !== f2.keepStatic || null !== f2.regex && -1 !== o.getTest.call(c2, n3.begin).match.def.indexOf("|")) && l.call(c2, true), true !== i3 && (u2.p = t3 === a.keys.Delete ? n3.begin + d2 : n3.begin, u2.p = r.determineNewCaretPosition.call(c2, {
3358
- begin: u2.p,
3359
- end: u2.p
3360
- }, false, false === f2.insertMode && t3 === a.keys.Backspace ? "none" : void 0).begin));
3361
- }, t2.isComplete = c, t2.isSelection = u, t2.isValid = f, t2.refreshFromBuffer = d, t2.revalidateMask = v;
3362
- var i2 = n2(6047), a = n2(6032), r = n2(7539), o = n2(5895);
3363
- function l(e3, t3, n3, i3, a2, s2) {
3364
- var u2 = this, p2 = this.dependencyLib, d2 = this.opts, h2 = u2.maskset;
3365
- if (!u2.hasAlternator) return false;
3366
- var v2, m, g, y, b, k, x, S, P, O, w, M = p2.extend(true, [], h2.validPositions), _ = p2.extend(true, {}, h2.tests), E = false, j = false, T = void 0 !== a2 ? a2 : r.getLastValidPosition.call(u2);
3367
- if (s2 && (O = s2.begin, w = s2.end, s2.begin > s2.end && (O = s2.end, w = s2.begin)), -1 === T && void 0 === a2) v2 = 0, m = (y = o.getTest.call(u2, v2)).alternation;
3368
- else for (; T >= 0; T--) if ((g = 0 === T ? o.getTest.call(u2, 0) : h2.validPositions[T]) && void 0 !== g.alternation) {
3369
- if (T <= (e3 || 0) && y && y.locator[g.alternation] !== g.locator[g.alternation]) break;
3370
- v2 = T, m = g.alternation, y = g;
3371
- }
3372
- if (void 0 !== m) {
3373
- x = parseInt(v2), h2.excludes[x] = h2.excludes[x] || [], true !== e3 && h2.excludes[x].push((0, o.getDecisionTaker)(y) + ":" + y.alternation);
3374
- var A = [], D = -1;
3375
- for (b = x; x < r.getLastValidPosition.call(u2, void 0, true) + 1; b++) -1 === D && e3 <= b && void 0 !== t3 && (A.push(t3), D = A.length - 1), (k = h2.validPositions[x]) && true !== k.generatedInput && (0 !== x || k.input !== d2.skipOptionalPartCharacter) && (void 0 === s2 || b < O || b >= w) && A.push(k.input), h2.validPositions.splice(x, 1);
3376
- for (-1 === D && void 0 !== t3 && (A.push(t3), D = A.length - 1); void 0 !== h2.excludes[x] && h2.excludes[x].length < 10; ) {
3377
- for (h2.tests = {}, r.resetMaskSet.call(u2, true), E = true, b = 0; b < A.length; b++) {
3378
- if (S = E.caret || 0 == d2.insertMode && null != S ? r.seekNext.call(u2, S) : r.getLastValidPosition.call(u2, void 0, true) + 1, P = A[b], !(E = f.call(u2, S, P, false, i3, true))) {
3379
- c.call(u2, r.getBuffer.call(u2)) && (E = j);
3380
- break;
3381
- }
3382
- b === D && (j = E), 1 == e3 && E && (j = {
3383
- caretPos: b
3384
- });
3385
- }
3386
- if (E) break;
3387
- if (r.resetMaskSet.call(u2), y = o.getTest.call(u2, x), h2.validPositions = p2.extend(true, [], M), h2.tests = p2.extend(true, {}, _), j = false, !h2.excludes[x]) {
3388
- j = l.call(u2, e3, t3, n3, i3, x - 1, s2);
3389
- break;
3390
- }
3391
- if (null != y.alternation) {
3392
- var C = (0, o.getDecisionTaker)(y);
3393
- if (-1 !== h2.excludes[x].indexOf(C + ":" + y.alternation)) {
3394
- j = l.call(u2, e3, t3, n3, i3, x - 1, s2);
3395
- break;
3396
- }
3397
- for (h2.excludes[x].push(C + ":" + y.alternation), b = x; b < r.getLastValidPosition.call(u2, void 0, true) + 1; b++) h2.validPositions.splice(x);
3398
- } else delete h2.excludes[x];
3399
- }
3400
- }
3401
- return j && false === d2.keepStatic || delete h2.excludes[x], j;
3402
- }
3403
- function s(e3, t3, n3) {
3404
- var i3 = this.opts, r2 = this.maskset;
3405
- switch (i3.casing || t3.casing) {
3406
- case "upper":
3407
- e3 = e3.toLocaleUpperCase();
3408
- break;
3409
- case "lower":
3410
- e3 = e3.toLocaleLowerCase();
3411
- break;
3412
- case "title":
3413
- var o2 = r2.validPositions[n3 - 1];
3414
- e3 = 0 === n3 || o2 && o2.input === String.fromCharCode(a.keyCode.Space) ? e3.toLocaleUpperCase() : e3.toLocaleLowerCase();
3415
- break;
3416
- default:
3417
- if ("function" == typeof i3.casing) {
3418
- var l2 = Array.prototype.slice.call(arguments);
3419
- l2.push(r2.validPositions), e3 = i3.casing.apply(this, l2);
3420
- }
3421
- }
3422
- return e3;
3423
- }
3424
- function c(e3) {
3425
- var t3 = this, n3 = this.opts, i3 = this.maskset;
3426
- if ("function" == typeof n3.isComplete) return n3.isComplete(e3, n3);
3427
- if ("*" !== n3.repeat) {
3428
- var a2 = false, l2 = r.determineLastRequiredPosition.call(t3, true), s2 = l2.l;
3429
- if (void 0 === l2.def || l2.def.newBlockMarker || l2.def.optionality || l2.def.optionalQuantifier) {
3430
- a2 = true;
3431
- for (var c2 = 0; c2 <= s2; c2++) {
3432
- var u2 = o.getTestTemplate.call(t3, c2).match;
3433
- if (true !== u2.static && void 0 === i3.validPositions[c2] && (false === u2.optionality || void 0 === u2.optionality || u2.optionality && 0 == u2.newBlockMarker) && (false === u2.optionalQuantifier || void 0 === u2.optionalQuantifier) || true === u2.static && "" != u2.def && e3[c2] !== o.getPlaceholder.call(t3, c2, u2)) {
3434
- a2 = false;
3435
- break;
3436
- }
3437
- }
3438
- }
3439
- return a2;
3440
- }
3441
- }
3442
- function u(e3) {
3443
- var t3 = this.opts.insertMode ? 0 : 1;
3444
- return this.isRTL ? e3.begin - e3.end > t3 : e3.end - e3.begin > t3;
3445
- }
3446
- function f(e3, t3, n3, i3, a2, c2, p2) {
3447
- var m = this, g = this.dependencyLib, y = this.opts, b = m.maskset;
3448
- n3 = true === n3;
3449
- var k = e3;
3450
- function x(e4) {
3451
- if (void 0 !== e4) {
3452
- if (void 0 !== e4.remove && (Array.isArray(e4.remove) || (e4.remove = [e4.remove]), e4.remove.sort(function(e5, t5) {
3453
- return m.isRTL ? e5.pos - t5.pos : t5.pos - e5.pos;
3454
- }).forEach(function(e5) {
3455
- v.call(m, {
3456
- begin: e5,
3457
- end: e5 + 1
3458
- });
3459
- }), e4.remove = void 0), void 0 !== e4.insert && (Array.isArray(e4.insert) || (e4.insert = [e4.insert]), e4.insert.sort(function(e5, t5) {
3460
- return m.isRTL ? t5.pos - e5.pos : e5.pos - t5.pos;
3461
- }).forEach(function(e5) {
3462
- "" !== e5.c && f.call(m, e5.pos, e5.c, void 0 === e5.strict || e5.strict, void 0 !== e5.fromIsValid ? e5.fromIsValid : i3);
3463
- }), e4.insert = void 0), e4.refreshFromBuffer && e4.buffer) {
3464
- var t4 = e4.refreshFromBuffer;
3465
- d.call(m, true === t4 ? t4 : t4.start, t4.end, e4.buffer), e4.refreshFromBuffer = void 0;
3466
- }
3467
- void 0 !== e4.rewritePosition && (k = e4.rewritePosition, e4 = true);
3468
- }
3469
- return e4;
3470
- }
3471
- function S(t4, n4, a3) {
3472
- var l2 = false;
3473
- return o.getTests.call(m, t4).every(function(c3, f2) {
3474
- var p3 = c3.match;
3475
- if (r.getBuffer.call(m, true), false !== (l2 = (!p3.jit || void 0 !== b.validPositions[r.seekPrevious.call(m, t4)]) && (null != p3.fn ? p3.fn.test(n4, b, t4, a3, y, u.call(m, e3)) : (n4 === p3.def || n4 === y.skipOptionalPartCharacter) && "" !== p3.def && {
3476
- c: o.getPlaceholder.call(m, t4, p3, true) || p3.def,
3477
- pos: t4
3478
- }))) {
3479
- var d2 = void 0 !== l2.c ? l2.c : n4, h2 = t4;
3480
- return d2 = d2 === y.skipOptionalPartCharacter && true === p3.static ? o.getPlaceholder.call(m, t4, p3, true) || p3.def : d2, true !== (l2 = x(l2)) && void 0 !== l2.pos && l2.pos !== t4 && (h2 = l2.pos), true !== l2 && void 0 === l2.pos && void 0 === l2.c ? false : (false === v.call(m, e3, g.extend({}, c3, {
3481
- input: s.call(m, d2, p3, h2)
3482
- }), i3, h2) && (l2 = false), false);
3483
- }
3484
- return true;
3485
- }), l2;
3486
- }
3487
- void 0 !== e3.begin && (k = m.isRTL ? e3.end : e3.begin);
3488
- var P = true, O = g.extend(true, [], b.validPositions);
3489
- if (false === y.keepStatic && void 0 !== b.excludes[k] && true !== a2 && true !== i3) for (var w = k; w < (m.isRTL ? e3.begin : e3.end); w++) void 0 !== b.excludes[w] && (b.excludes[w] = void 0, delete b.tests[w]);
3490
- if ("function" == typeof y.preValidation && true !== i3 && true !== c2 && (P = x(P = y.preValidation.call(m, r.getBuffer.call(m), k, t3, u.call(m, e3), y, b, e3, n3 || a2))), true === P) {
3491
- if (P = S(k, t3, n3), (!n3 || true === i3) && false === P && true !== c2) {
3492
- var M = b.validPositions[k];
3493
- if (!M || true !== M.match.static || M.match.def !== t3 && t3 !== y.skipOptionalPartCharacter) {
3494
- if (y.insertMode || void 0 === b.validPositions[r.seekNext.call(m, k)] || e3.end > k) {
3495
- var _ = false;
3496
- if (b.jitOffset[k] && void 0 === b.validPositions[r.seekNext.call(m, k)] && false !== (P = f.call(m, k + b.jitOffset[k], t3, true, true)) && (true !== a2 && (P.caret = k), _ = true), e3.end > k && (b.validPositions[k] = void 0), !_ && !r.isMask.call(m, k, y.keepStatic && 0 === k)) {
3497
- for (var E = k + 1, j = r.seekNext.call(m, k, false, 0 !== k); E <= j; E++) if (false !== (P = S(E, t3, n3))) {
3498
- P = h.call(m, k, void 0 !== P.pos ? P.pos : E) || P, k = E;
3499
- break;
3500
- }
3501
- }
3502
- }
3503
- } else P = {
3504
- caret: r.seekNext.call(m, k)
3505
- };
3506
- }
3507
- if (m.hasAlternator && true !== a2 && !n3 && (a2 = true, false === P ? (true === y.keepStatic || isFinite(parseInt(y.keepStatic)) && k >= y.keepStatic) && (P = l.call(m, k, t3, n3, i3, void 0, e3)) : true === P && (u.call(m, e3) && b.tests[k] && b.tests[k].length > 1 && y.keepStatic || true !== y.numericInput && b.tests[k] && b.tests[k].length > 1 && r.getLastValidPosition.call(m, void 0, true) > k) && (P = l.call(m, true) || P)), true === P && (P = {
3508
- pos: k
3509
- }), "function" == typeof y.postValidation && true !== i3 && true !== c2) {
3510
- var T = y.postValidation.call(m, r.getBuffer.call(m, true), void 0 !== e3.begin ? m.isRTL ? e3.end : e3.begin : e3, t3, P, y, b, n3, p2, a2);
3511
- void 0 !== T && (P = true === T ? P : T);
3512
- }
3513
- }
3514
- P && void 0 === P.pos && (P.pos = k), false === P || true === c2 ? (r.resetMaskSet.call(m, true), b.validPositions = g.extend(true, [], O)) : h.call(m, void 0, k, true);
3515
- var A = x(P);
3516
- void 0 !== m.maxLength && (r.getBuffer.call(m).length > m.maxLength && !i3 && (r.resetMaskSet.call(m, true), b.validPositions = g.extend(true, [], O), A = false));
3517
- return A;
3518
- }
3519
- function p(e3, t3, n3) {
3520
- for (var i3 = this.maskset, a2 = false, r2 = o.getTests.call(this, e3), l2 = 0; l2 < r2.length; l2++) {
3521
- if (r2[l2].match && (r2[l2].match.nativeDef === t3.match[n3.shiftPositions ? "def" : "nativeDef"] && (!n3.shiftPositions || !t3.match.static) || r2[l2].match.nativeDef === t3.match.nativeDef || n3.regex && !r2[l2].match.static && r2[l2].match.fn.test(t3.input, i3, e3, false, n3))) {
3522
- a2 = true;
3523
- break;
3524
- }
3525
- if (r2[l2].match && r2[l2].match.def === t3.match.nativeDef) {
3526
- a2 = void 0;
3527
- break;
3528
- }
3529
- }
3530
- return false === a2 && void 0 !== i3.jitOffset[e3] && (a2 = p.call(this, e3 + i3.jitOffset[e3], t3, n3)), a2;
3531
- }
3532
- function d(e3, t3, n3) {
3533
- var a2, o2, l2 = this, s2 = this.maskset, c2 = this.opts, u2 = this.dependencyLib, f2 = c2.skipOptionalPartCharacter, p2 = l2.isRTL ? n3.slice().reverse() : n3;
3534
- if (c2.skipOptionalPartCharacter = "", true === e3) r.resetMaskSet.call(l2, false), e3 = 0, t3 = n3.length, o2 = r.determineNewCaretPosition.call(l2, {
3535
- begin: 0,
3536
- end: 0
3537
- }, false).begin;
3538
- else {
3539
- for (a2 = e3; a2 < t3; a2++) delete s2.validPositions[a2];
3540
- o2 = e3;
3541
- }
3542
- var d2 = new u2.Event("keypress");
3543
- for (a2 = e3; a2 < t3; a2++) {
3544
- d2.key = p2[a2].toString(), l2.ignorable = false;
3545
- var h2 = i2.EventHandlers.keypressEvent.call(l2, d2, true, false, false, o2);
3546
- false !== h2 && void 0 !== h2 && (o2 = h2.forwardPosition);
3547
- }
3548
- c2.skipOptionalPartCharacter = f2;
3549
- }
3550
- function h(e3, t3, n3) {
3551
- var i3 = this, a2 = this.maskset, l2 = this.dependencyLib;
3552
- if (void 0 === e3) for (e3 = t3 - 1; e3 > 0 && !a2.validPositions[e3]; e3--) ;
3553
- for (var s2 = e3; s2 < t3; s2++) {
3554
- if (void 0 === a2.validPositions[s2] && !r.isMask.call(i3, s2, false)) {
3555
- if (0 == s2 ? o.getTest.call(i3, s2) : a2.validPositions[s2 - 1]) {
3556
- var c2 = o.getTests.call(i3, s2).slice();
3557
- "" === c2[c2.length - 1].match.def && c2.pop();
3558
- var u2, p2 = o.determineTestTemplate.call(i3, s2, c2);
3559
- if (p2 && (true !== p2.match.jit || "master" === p2.match.newBlockMarker && (u2 = a2.validPositions[s2 + 1]) && true === u2.match.optionalQuantifier) && ((p2 = l2.extend({}, p2, {
3560
- input: o.getPlaceholder.call(i3, s2, p2.match, true) || p2.match.def
3561
- })).generatedInput = true, v.call(i3, s2, p2, true), true !== n3)) {
3562
- var d2 = a2.validPositions[t3].input;
3563
- return a2.validPositions[t3] = void 0, f.call(i3, t3, d2, true, true);
3564
- }
3565
- }
3566
- }
3567
- }
3568
- }
3569
- function v(e3, t3, n3, i3) {
3570
- var a2 = this, l2 = this.maskset, s2 = this.opts, c2 = this.dependencyLib;
3571
- function d2(e4, t4, n4) {
3572
- var i4 = t4[e4];
3573
- if (void 0 !== i4 && true === i4.match.static && true !== i4.match.optionality && (void 0 === t4[0] || void 0 === t4[0].alternation)) {
3574
- var a3 = n4.begin <= e4 - 1 ? t4[e4 - 1] && true === t4[e4 - 1].match.static && t4[e4 - 1] : t4[e4 - 1], r2 = n4.end > e4 + 1 ? t4[e4 + 1] && true === t4[e4 + 1].match.static && t4[e4 + 1] : t4[e4 + 1];
3575
- return a3 && r2;
3576
- }
3577
- return false;
3578
- }
3579
- var h2 = 0, v2 = void 0 !== e3.begin ? e3.begin : e3, m = void 0 !== e3.end ? e3.end : e3, g = true;
3580
- if (e3.begin > e3.end && (v2 = e3.end, m = e3.begin), i3 = void 0 !== i3 ? i3 : v2, void 0 === n3 && (v2 !== m || s2.insertMode && void 0 !== l2.validPositions[i3] || void 0 === t3 || t3.match.optionalQuantifier || t3.match.optionality)) {
3581
- var y, b = c2.extend(true, [], l2.validPositions), k = r.getLastValidPosition.call(a2, void 0, true);
3582
- l2.p = v2;
3583
- var x = u.call(a2, e3) ? v2 : i3;
3584
- for (y = k; y >= x; y--) l2.validPositions.splice(y, 1), void 0 === t3 && delete l2.tests[y + 1];
3585
- var S, P, O = i3, w = O;
3586
- for (t3 && (l2.validPositions[i3] = c2.extend(true, {}, t3), w++, O++), null == b[m] && l2.jitOffset[m] && (m += l2.jitOffset[m] + 1), y = t3 ? m : m - 1; y <= k; y++) {
3587
- if (void 0 !== (S = b[y]) && true !== S.generatedInput && (y >= m || y >= v2 && d2(y, b, {
3588
- begin: v2,
3589
- end: m
3590
- }))) {
3591
- for (; "" !== o.getTest.call(a2, w).match.def; ) {
3592
- if (false !== (P = p.call(a2, w, S, s2)) || "+" === S.match.def) {
3593
- "+" === S.match.def && r.getBuffer.call(a2, true);
3594
- var M = f.call(a2, w, S.input, "+" !== S.match.def, true);
3595
- if (g = false !== M, O = (M.pos || w) + 1, !g && P) break;
3596
- } else g = false;
3597
- if (g) {
3598
- void 0 === t3 && S.match.static && y === e3.begin && h2++;
3599
- break;
3600
- }
3601
- if (!g && r.getBuffer.call(a2), w > l2.maskLength) break;
3602
- w++;
3603
- }
3604
- "" == o.getTest.call(a2, w).match.def && (g = false), w = O;
3605
- }
3606
- if (!g) break;
3607
- }
3608
- if (!g) return l2.validPositions = c2.extend(true, [], b), r.resetMaskSet.call(a2, true), false;
3609
- } else t3 && o.getTest.call(a2, i3).match.cd === t3.match.cd && (l2.validPositions[i3] = c2.extend(true, {}, t3));
3610
- return r.resetMaskSet.call(a2, true), h2;
3611
- }
3612
- },
3613
- 8145: function() {
3614
- function e2(t2) {
3615
- return e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
3616
- return typeof e3;
3617
- } : function(e3) {
3618
- return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
3619
- }, e2(t2);
3620
- }
3621
- "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === e2("test".__proto__) ? function(e3) {
3622
- return e3.__proto__;
3623
- } : function(e3) {
3624
- return e3.constructor.prototype;
3625
- });
3626
- },
3627
- 9439: function(e2, t2) {
3628
- Object.defineProperty(t2, "__esModule", {
3629
- value: true
3630
- }), t2.default = function(e3, t3, n2, i2) {
3631
- this.matches = [], this.openGroup = e3 || false, this.alternatorGroup = false, this.isGroup = e3 || false, this.isOptional = t3 || false, this.isQuantifier = n2 || false, this.isAlternator = i2 || false, this.quantifier = {
3632
- min: 1,
3633
- max: 1
3634
- };
3635
- };
3636
- },
3637
- 9472: function(e2, t2) {
3638
- Object.defineProperty(t2, "__esModule", {
3639
- value: true
3640
- }), t2.default = void 0;
3641
- t2.default = {
3642
- 9: {
3643
- validator: "\\p{N}",
3644
- definitionSymbol: "*"
3645
- },
3646
- a: {
3647
- validator: "\\p{L}",
3648
- definitionSymbol: "*"
3649
- },
3650
- "*": {
3651
- validator: "[\\p{L}\\p{N}]"
3652
- }
3653
- };
3654
- }
3655
- }, t = {};
3656
- function n(i2) {
3657
- var a = t[i2];
3658
- if (void 0 !== a) return a.exports;
3659
- var r = t[i2] = {
3660
- exports: {}
3661
- };
3662
- return e[i2](r, r.exports, n), r.exports;
3663
- }
3664
- var i = {};
3665
- return (function() {
3666
- var e2 = i;
3667
- Object.defineProperty(e2, "__esModule", {
3668
- value: true
3669
- }), e2.default = void 0, n(8145), n(1669), n(1960), n(493), n(472), n(4829), n(4203), n(546), n(2952);
3670
- var t2, a = (t2 = n(3978)) && t2.__esModule ? t2 : {
3671
- default: t2
3672
- };
3673
- e2.default = a.default;
3674
- })(), i;
3675
- })();
3676
- });
3677
- }
3678
- });
3679
-
3680
- // src/withHookFormMask.ts
3681
- var import_inputmask = __toESM(require_inputmask());
3682
-
3683
- // src/utils/flow.ts
3684
- function flow(...funcs) {
3685
- const { length } = funcs;
3686
- let index = length;
3687
- while (index > 0) {
3688
- index -= 1;
3689
- if (typeof funcs[index] !== "function") {
3690
- throw new TypeError("Expected a function");
4
+ function useMaskInput(props) {
5
+ const { mask, register, options } = props;
6
+ const ref = useRef(null);
7
+ const maskInput = useMemo(
8
+ () => isServer_default ? null : createMaskInstance(mask, options),
9
+ [mask, options]
10
+ );
11
+ const refCallback = useCallback((input) => {
12
+ if (!input) {
13
+ ref.current = null;
14
+ return;
3691
15
  }
3692
- }
3693
- return (...args) => {
3694
- let i = 0;
3695
- let result = length ? funcs[i].apply(this, args) : args[0];
3696
- while (i + 1 < length) {
3697
- i += 1;
3698
- result = funcs[i].call(this, result);
16
+ ref.current = resolveInputRef(input);
17
+ }, []);
18
+ useEffect(() => {
19
+ if (isServer_default || !ref.current) return;
20
+ if (!isHTMLElement(ref.current)) {
21
+ return;
3699
22
  }
3700
- return result;
3701
- };
3702
- }
3703
-
3704
- // src/utils/isServer.ts
3705
- var isServer = !(typeof window !== "undefined" && window.document?.createElement);
3706
- var isServer_default = isServer;
3707
-
3708
- // src/utils/getMaskOptions.ts
3709
- function getMaskOptions(mask, _options) {
3710
- const options = {
3711
- jitMasking: false,
3712
- ..._options
3713
- };
3714
- if (!mask) return options;
3715
- const masks = {
3716
- datetime: {
3717
- alias: "datetime",
3718
- ...options
3719
- },
3720
- email: {
3721
- alias: "email",
3722
- placeholder: "",
3723
- ...options
3724
- },
3725
- numeric: {
3726
- alias: "numeric",
3727
- placeholder: "",
3728
- ...options
3729
- },
3730
- currency: {
3731
- alias: "currency",
3732
- prefix: "$ ",
3733
- placeholder: "",
3734
- ...options
3735
- },
3736
- decimal: {
3737
- alias: "decimal",
3738
- placeholder: "",
3739
- ...options
3740
- },
3741
- integer: {
3742
- alias: "integer",
3743
- placeholder: "",
3744
- ...options
3745
- },
3746
- percentage: {
3747
- alias: "percentage",
3748
- placeholder: " %",
3749
- suffix: " %",
3750
- ...options
3751
- },
3752
- url: {
3753
- alias: "url",
3754
- placeholder: "https://",
3755
- ...options
3756
- },
3757
- ip: {
3758
- alias: "ip",
3759
- ...options
3760
- },
3761
- mac: {
3762
- alias: "mac",
3763
- ...options
3764
- },
3765
- ssn: {
3766
- alias: "ssn",
3767
- ...options
3768
- },
3769
- // alias for brazilians <3
3770
- // ty <3
3771
- "brl-currency": {
3772
- alias: "currency",
3773
- prefix: "R$ ",
3774
- placeholder: "0,00",
3775
- displayFormat: "currency",
3776
- radixPoint: ",",
3777
- autoUnmask: true,
3778
- ...options
3779
- },
3780
- cpf: {
3781
- mask: "999.999.999-99",
3782
- placeholder: "___.___.___-__",
3783
- ...options
3784
- },
3785
- cnpj: {
3786
- mask: ["A|9{2}.A|9{3}.A|9{3}/A|9{4}-9{2}"],
3787
- placeholder: "__.___.___/____-__",
3788
- ...options
23
+ const inputElement = findInputElement(ref.current);
24
+ if (maskInput && inputElement && isHTMLElement(inputElement)) {
25
+ maskInput.mask(inputElement);
3789
26
  }
3790
- };
3791
- if (typeof mask === "string" && masks[mask]) return masks[mask];
3792
- return {
3793
- mask,
3794
- ...options
3795
- };
3796
- }
3797
-
3798
- // src/utils/moduleInterop.ts
3799
- function interopDefaultSync(module) {
3800
- if (typeof module === "object" && module !== null) {
3801
- if ("default" in module) {
3802
- return module.default;
27
+ if (register && isHTMLElement(ref.current)) {
28
+ register(ref.current);
3803
29
  }
3804
- return module;
30
+ }, [mask, register, options, maskInput]);
31
+ if (isServer_default) {
32
+ return () => {
33
+ };
3805
34
  }
3806
- return module;
35
+ return refCallback;
3807
36
  }
3808
37
 
3809
- // src/withHookFormMask.ts
3810
- function withHookFormMask(register, mask, options) {
3811
- let newRef;
3812
- if (register) {
3813
- const { ref } = register;
3814
- const maskInput = interopDefaultSync(import_inputmask.default)(getMaskOptions(mask, options));
3815
- newRef = flow((_ref) => {
3816
- if (_ref) maskInput.mask(_ref);
38
+ // src/api/useHookFormMask.ts
39
+ function useHookFormMask(registerFn) {
40
+ return (fieldName, mask, options) => {
41
+ if (!registerFn) throw new Error("registerFn is required");
42
+ const registerReturn = registerFn(fieldName, options);
43
+ const { ref } = registerReturn;
44
+ const applyMaskToRef = (_ref) => {
45
+ if (_ref) applyMaskToElement(_ref, mask, options);
3817
46
  return _ref;
3818
- }, ref);
3819
- }
3820
- return {
3821
- ...register,
3822
- ref: newRef
47
+ };
48
+ const refWithMask = ref ? flow(applyMaskToRef, ref) : applyMaskToRef;
49
+ const result = {
50
+ ...registerReturn,
51
+ ref: refWithMask
52
+ };
53
+ Object.defineProperty(result, "prevRef", {
54
+ value: ref,
55
+ enumerable: false,
56
+ writable: true,
57
+ configurable: true
58
+ });
59
+ return result;
3823
60
  };
3824
61
  }
3825
62
 
3826
- // src/withMask.ts
3827
- var import_inputmask2 = __toESM(require_inputmask());
63
+ // src/api/withMask.ts
64
+ var import_inputmask = __toESM(require_inputmask(), 1);
3828
65
  function withMask(mask, options) {
3829
66
  return (input) => {
3830
67
  if (isServer_default || mask === null || !input) return;
3831
- const maskInput = interopDefaultSync(import_inputmask2.default)(getMaskOptions(mask, options));
68
+ const maskInput = interopDefaultSync(import_inputmask.default)(getMaskOptions(mask, options));
3832
69
  maskInput.mask(input);
3833
70
  };
3834
71
  }
3835
72
 
3836
- // src/useHookFormMask.ts
3837
- var import_inputmask3 = __toESM(require_inputmask());
3838
- function useHookFormMask(registerFn) {
3839
- return (fieldName, mask, options) => {
3840
- if (!registerFn) throw new Error("registerFn is required");
3841
- const { ref, ...restRegister } = registerFn(fieldName, options);
3842
- const maskInput = interopDefaultSync(import_inputmask3.default)(getMaskOptions(mask, options));
3843
- const newRef = flow((_ref) => {
3844
- if (_ref) {
3845
- const { nodeName } = _ref;
3846
- if (nodeName !== "INPUT") {
3847
- maskInput.mask(_ref.querySelector("input"));
3848
- } else {
3849
- maskInput.mask(_ref);
3850
- }
3851
- }
3852
- return _ref;
3853
- }, ref);
3854
- return {
3855
- ...restRegister,
3856
- ref: newRef
3857
- };
73
+ // src/api/withHookFormMask.ts
74
+ function withHookFormMask(register, mask, options) {
75
+ const { ref } = register;
76
+ const applyMaskToRef = (_ref) => {
77
+ if (_ref) applyMaskToElement(_ref, mask, options);
78
+ return _ref;
3858
79
  };
80
+ const refWithMask = ref === null ? null : ref ? flow(applyMaskToRef, ref) : null;
81
+ const result = {
82
+ ...register,
83
+ ref: refWithMask
84
+ };
85
+ Object.defineProperty(result, "prevRef", {
86
+ value: ref,
87
+ enumerable: false,
88
+ writable: true,
89
+ configurable: true
90
+ });
91
+ return result;
3859
92
  }
3860
93
 
3861
- // src/useMaskInput.ts
3862
- var import_inputmask4 = __toESM(require_inputmask());
3863
- function useInputMask(props) {
3864
- const { mask, register, options } = props;
3865
- const ref = useRef(null);
3866
- if (isServer_default) return ref;
3867
- useEffect(() => {
3868
- if (!isServer_default && ref.current) {
3869
- if (!ref.current) return;
3870
- const maskInput = interopDefaultSync(import_inputmask4.default)(getMaskOptions(mask, options));
3871
- maskInput.mask(ref.current);
3872
- if (register && ref.current) {
3873
- register(ref.current);
3874
- }
3875
- }
3876
- }, [mask, register, options]);
3877
- return ref;
3878
- }
3879
- /*! Bundled license information:
3880
-
3881
- inputmask/dist/inputmask.js:
3882
- (*!
3883
- * dist/inputmask
3884
- * https://github.com/RobinHerbots/Inputmask
3885
- * Copyright (c) 2010 - 2025 Robin Herbots
3886
- * Licensed under the MIT license
3887
- * Version: 5.0.10-beta.61
3888
- *)
3889
- (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *)
3890
- */
3891
-
3892
- export { useHookFormMask, useInputMask as useMaskInput, withHookFormMask, withMask };
94
+ export { useHookFormMask, useMaskInput, withHookFormMask, withMask };
3893
95
  //# sourceMappingURL=index.js.map
3894
96
  //# sourceMappingURL=index.js.map