use-mask-input 3.0.5 → 3.1.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 (67) hide show
  1. package/dist/index.cjs +177 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.ts +34 -3
  4. package/dist/index.js +172 -0
  5. package/dist/index.js.map +1 -0
  6. package/package.json +43 -51
  7. package/src/index.tsx +3 -2
  8. package/src/types.ts +6 -0
  9. package/src/useMaskInput.ts +12 -9
  10. package/src/utils.spec.ts +13 -0
  11. package/src/utils.ts +27 -0
  12. package/src/withHookFormMask.ts +9 -16
  13. package/src/withMask.ts +5 -6
  14. package/dist/example/App.example.d.ts +0 -3
  15. package/dist/example/index.d.ts +0 -1
  16. package/dist/index.modern.js +0 -2
  17. package/dist/index.modern.js.map +0 -1
  18. package/dist/index.module.js +0 -2
  19. package/dist/index.module.js.map +0 -1
  20. package/dist/index.umd.js +0 -2
  21. package/dist/index.umd.js.map +0 -1
  22. package/dist/useMaskInput.d.ts +0 -9
  23. package/dist/withHookFormMask.d.ts +0 -16
  24. package/dist/withMask.d.ts +0 -3
  25. package/node_modules/inputmask/LICENSE.txt +0 -7
  26. package/node_modules/inputmask/README.md +0 -1279
  27. package/node_modules/inputmask/bundle.js +0 -6
  28. package/node_modules/inputmask/dist/bindings/inputmask.binding.js +0 -26
  29. package/node_modules/inputmask/dist/inputmask.es6.js +0 -5
  30. package/node_modules/inputmask/dist/inputmask.js +0 -3031
  31. package/node_modules/inputmask/dist/inputmask.min.js +0 -8
  32. package/node_modules/inputmask/dist/jquery.inputmask.js +0 -2985
  33. package/node_modules/inputmask/dist/jquery.inputmask.min.js +0 -8
  34. package/node_modules/inputmask/lib/bindings/inputmask.binding.js +0 -26
  35. package/node_modules/inputmask/lib/bindings/inputmask.es6.js +0 -5
  36. package/node_modules/inputmask/lib/canUseDOM.js +0 -7
  37. package/node_modules/inputmask/lib/defaults.js +0 -101
  38. package/node_modules/inputmask/lib/definitions.js +0 -13
  39. package/node_modules/inputmask/lib/dependencyLibs/data.js +0 -8
  40. package/node_modules/inputmask/lib/dependencyLibs/events.js +0 -199
  41. package/node_modules/inputmask/lib/dependencyLibs/extend.js +0 -58
  42. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.jquery.js +0 -13
  43. package/node_modules/inputmask/lib/dependencyLibs/inputmask.dependencyLib.js +0 -41
  44. package/node_modules/inputmask/lib/environment.js +0 -9
  45. package/node_modules/inputmask/lib/escapeRegex.js +0 -4
  46. package/node_modules/inputmask/lib/eventhandlers.js +0 -513
  47. package/node_modules/inputmask/lib/eventruler.js +0 -124
  48. package/node_modules/inputmask/lib/extensions/inputmask.date.extensions.js +0 -588
  49. package/node_modules/inputmask/lib/extensions/inputmask.extensions.js +0 -133
  50. package/node_modules/inputmask/lib/extensions/inputmask.numeric.extensions.js +0 -631
  51. package/node_modules/inputmask/lib/global/window.js +0 -3
  52. package/node_modules/inputmask/lib/inputHandling.js +0 -252
  53. package/node_modules/inputmask/lib/inputmask.js +0 -355
  54. package/node_modules/inputmask/lib/inputmaskElement.js +0 -33
  55. package/node_modules/inputmask/lib/jquery.inputmask.js +0 -81
  56. package/node_modules/inputmask/lib/keycode.json +0 -25
  57. package/node_modules/inputmask/lib/mask-lexer.js +0 -467
  58. package/node_modules/inputmask/lib/mask.js +0 -244
  59. package/node_modules/inputmask/lib/masktoken.js +0 -13
  60. package/node_modules/inputmask/lib/polyfills/Array.includes.js +0 -48
  61. package/node_modules/inputmask/lib/polyfills/Object.getPrototypeOf.js +0 -7
  62. package/node_modules/inputmask/lib/positioning.js +0 -348
  63. package/node_modules/inputmask/lib/validation-tests.js +0 -597
  64. package/node_modules/inputmask/lib/validation.js +0 -664
  65. package/node_modules/inputmask/package.json +0 -60
  66. package/src/example/App.example.tsx +0 -68
  67. package/src/example/index.tsx +0 -5
@@ -1,2985 +0,0 @@
1
- /*!
2
- * dist/jquery.inputmask
3
- * https://github.com/RobinHerbots/Inputmask
4
- * Copyright (c) 2010 - 2021 Robin Herbots
5
- * Licensed under the MIT license
6
- * Version: 5.0.7
7
- */
8
- !function(e, t) {
9
- if ("object" == typeof exports && "object" == typeof module) module.exports = t(require("jquery")); else if ("function" == typeof define && define.amd) define([ "jquery" ], t); else {
10
- var i = "object" == typeof exports ? t(require("jquery")) : t(e.jQuery);
11
- for (var a in i) ("object" == typeof exports ? exports : e)[a] = i[a];
12
- }
13
- }(self, (function(e) {
14
- return function() {
15
- "use strict";
16
- var t = {
17
- 3046: function(e, t, i) {
18
- var a;
19
- Object.defineProperty(t, "__esModule", {
20
- value: !0
21
- }), t.default = void 0, i(3851), i(219), i(207), i(5296);
22
- var n = ((a = i(2394)) && a.__esModule ? a : {
23
- default: a
24
- }).default;
25
- t.default = n;
26
- },
27
- 8741: function(e, t) {
28
- Object.defineProperty(t, "__esModule", {
29
- value: !0
30
- }), t.default = void 0;
31
- var i = !("undefined" == typeof window || !window.document || !window.document.createElement);
32
- t.default = i;
33
- },
34
- 3976: function(e, t, i) {
35
- Object.defineProperty(t, "__esModule", {
36
- value: !0
37
- }), t.default = void 0;
38
- var a, n = (a = i(5581)) && a.__esModule ? a : {
39
- default: a
40
- };
41
- var r = {
42
- _maxTestPos: 500,
43
- placeholder: "_",
44
- optionalmarker: [ "[", "]" ],
45
- quantifiermarker: [ "{", "}" ],
46
- groupmarker: [ "(", ")" ],
47
- alternatormarker: "|",
48
- escapeChar: "\\",
49
- mask: null,
50
- regex: null,
51
- oncomplete: function() {},
52
- onincomplete: function() {},
53
- oncleared: function() {},
54
- repeat: 0,
55
- greedy: !1,
56
- autoUnmask: !1,
57
- removeMaskOnSubmit: !1,
58
- clearMaskOnLostFocus: !0,
59
- insertMode: !0,
60
- insertModeVisual: !0,
61
- clearIncomplete: !1,
62
- alias: null,
63
- onKeyDown: function() {},
64
- onBeforeMask: null,
65
- onBeforePaste: function(e, t) {
66
- return "function" == typeof t.onBeforeMask ? t.onBeforeMask.call(this, e, t) : e;
67
- },
68
- onBeforeWrite: null,
69
- onUnMask: null,
70
- showMaskOnFocus: !0,
71
- showMaskOnHover: !0,
72
- onKeyValidation: function() {},
73
- skipOptionalPartCharacter: " ",
74
- numericInput: !1,
75
- rightAlign: !1,
76
- undoOnEscape: !0,
77
- radixPoint: "",
78
- _radixDance: !1,
79
- groupSeparator: "",
80
- keepStatic: null,
81
- positionCaretOnTab: !0,
82
- tabThrough: !1,
83
- supportsInputType: [ "text", "tel", "url", "password", "search" ],
84
- ignorables: [ n.default.BACKSPACE, n.default.TAB, n.default["PAUSE/BREAK"], n.default.ESCAPE, n.default.PAGE_UP, n.default.PAGE_DOWN, n.default.END, n.default.HOME, n.default.LEFT, n.default.UP, n.default.RIGHT, n.default.DOWN, n.default.INSERT, n.default.DELETE, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 0, 229 ],
85
- isComplete: null,
86
- preValidation: null,
87
- postValidation: null,
88
- staticDefinitionSymbol: void 0,
89
- jitMasking: !1,
90
- nullable: !0,
91
- inputEventOnly: !1,
92
- noValuePatching: !1,
93
- positionCaretOnClick: "lvp",
94
- casing: null,
95
- inputmode: "text",
96
- importDataAttributes: !0,
97
- shiftPositions: !0,
98
- usePrototypeDefinitions: !0,
99
- validationEventTimeOut: 3e3,
100
- substitutes: {}
101
- };
102
- t.default = r;
103
- },
104
- 7392: function(e, t) {
105
- Object.defineProperty(t, "__esModule", {
106
- value: !0
107
- }), t.default = void 0;
108
- t.default = {
109
- 9: {
110
- validator: "[0-9\uff10-\uff19]",
111
- definitionSymbol: "*"
112
- },
113
- a: {
114
- validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
115
- definitionSymbol: "*"
116
- },
117
- "*": {
118
- validator: "[0-9\uff10-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]"
119
- }
120
- };
121
- },
122
- 3287: function(e, t, i) {
123
- Object.defineProperty(t, "__esModule", {
124
- value: !0
125
- }), t.default = void 0;
126
- var a, n = (a = i(2047)) && a.__esModule ? a : {
127
- default: a
128
- };
129
- if (void 0 === n.default) throw "jQuery not loaded!";
130
- var r = n.default;
131
- t.default = r;
132
- },
133
- 9845: function(e, t, i) {
134
- Object.defineProperty(t, "__esModule", {
135
- value: !0
136
- }), t.ua = t.mobile = t.iphone = t.iemobile = t.ie = void 0;
137
- var a, n = (a = i(9380)) && a.__esModule ? a : {
138
- default: a
139
- };
140
- var r = n.default.navigator && n.default.navigator.userAgent || "", o = r.indexOf("MSIE ") > 0 || r.indexOf("Trident/") > 0, s = "ontouchstart" in n.default, l = /iemobile/i.test(r), u = /iphone/i.test(r) && !l;
141
- t.iphone = u, t.iemobile = l, t.mobile = s, t.ie = o, t.ua = r;
142
- },
143
- 7184: function(e, t) {
144
- Object.defineProperty(t, "__esModule", {
145
- value: !0
146
- }), t.default = function(e) {
147
- return e.replace(i, "\\$1");
148
- };
149
- var i = new RegExp("(\\" + [ "/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^" ].join("|\\") + ")", "gim");
150
- },
151
- 6030: function(e, t, i) {
152
- Object.defineProperty(t, "__esModule", {
153
- value: !0
154
- }), t.EventHandlers = void 0;
155
- var a, n = i(8711), r = (a = i(5581)) && a.__esModule ? a : {
156
- default: a
157
- }, o = i(9845), s = i(7215), l = i(7760), u = i(4713);
158
- function c(e, t) {
159
- var i = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
160
- if (!i) {
161
- if (Array.isArray(e) || (i = function(e, t) {
162
- if (!e) return;
163
- if ("string" == typeof e) return f(e, t);
164
- var i = Object.prototype.toString.call(e).slice(8, -1);
165
- "Object" === i && e.constructor && (i = e.constructor.name);
166
- if ("Map" === i || "Set" === i) return Array.from(e);
167
- if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return f(e, t);
168
- }(e)) || t && e && "number" == typeof e.length) {
169
- i && (e = i);
170
- var a = 0, n = function() {};
171
- return {
172
- s: n,
173
- n: function() {
174
- return a >= e.length ? {
175
- done: !0
176
- } : {
177
- done: !1,
178
- value: e[a++]
179
- };
180
- },
181
- e: function(e) {
182
- throw e;
183
- },
184
- f: n
185
- };
186
- }
187
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
188
- }
189
- var r, o = !0, s = !1;
190
- return {
191
- s: function() {
192
- i = i.call(e);
193
- },
194
- n: function() {
195
- var e = i.next();
196
- return o = e.done, e;
197
- },
198
- e: function(e) {
199
- s = !0, r = e;
200
- },
201
- f: function() {
202
- try {
203
- o || null == i.return || i.return();
204
- } finally {
205
- if (s) throw r;
206
- }
207
- }
208
- };
209
- }
210
- function f(e, t) {
211
- (null == t || t > e.length) && (t = e.length);
212
- for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i];
213
- return a;
214
- }
215
- var d = {
216
- keydownEvent: function(e) {
217
- var t = this.inputmask, i = t.opts, a = t.dependencyLib, c = t.maskset, f = this, d = a(f), p = e.keyCode, h = n.caret.call(t, f), m = i.onKeyDown.call(this, e, n.getBuffer.call(t), h, i);
218
- if (void 0 !== m) return m;
219
- if (p === r.default.BACKSPACE || p === r.default.DELETE || o.iphone && p === r.default.BACKSPACE_SAFARI || e.ctrlKey && p === r.default.X && !("oncut" in f)) e.preventDefault(),
220
- s.handleRemove.call(t, f, p, h), (0, l.writeBuffer)(f, n.getBuffer.call(t, !0), c.p, e, f.inputmask._valueGet() !== n.getBuffer.call(t).join("")); else if (p === r.default.END || p === r.default.PAGE_DOWN) {
221
- e.preventDefault();
222
- var v = n.seekNext.call(t, n.getLastValidPosition.call(t));
223
- n.caret.call(t, f, e.shiftKey ? h.begin : v, v, !0);
224
- } else p === r.default.HOME && !e.shiftKey || p === r.default.PAGE_UP ? (e.preventDefault(),
225
- n.caret.call(t, f, 0, e.shiftKey ? h.begin : 0, !0)) : i.undoOnEscape && p === r.default.ESCAPE && !0 !== e.altKey ? ((0,
226
- l.checkVal)(f, !0, !1, t.undoValue.split("")), d.trigger("click")) : p !== r.default.INSERT || e.shiftKey || e.ctrlKey || void 0 !== t.userOptions.insertMode ? !0 === i.tabThrough && p === r.default.TAB ? !0 === e.shiftKey ? (h.end = n.seekPrevious.call(t, h.end, !0),
227
- !0 === u.getTest.call(t, h.end - 1).match.static && h.end--, h.begin = n.seekPrevious.call(t, h.end, !0),
228
- h.begin >= 0 && h.end > 0 && (e.preventDefault(), n.caret.call(t, f, h.begin, h.end))) : (h.begin = n.seekNext.call(t, h.begin, !0),
229
- h.end = n.seekNext.call(t, h.begin, !0), h.end < c.maskLength && h.end--, h.begin <= c.maskLength && (e.preventDefault(),
230
- n.caret.call(t, f, h.begin, h.end))) : e.shiftKey || i.insertModeVisual && !1 === i.insertMode && (p === r.default.RIGHT ? setTimeout((function() {
231
- var e = n.caret.call(t, f);
232
- n.caret.call(t, f, e.begin);
233
- }), 0) : p === r.default.LEFT && setTimeout((function() {
234
- var e = n.translatePosition.call(t, f.inputmask.caretPos.begin);
235
- n.translatePosition.call(t, f.inputmask.caretPos.end);
236
- t.isRTL ? n.caret.call(t, f, e + (e === c.maskLength ? 0 : 1)) : n.caret.call(t, f, e - (0 === e ? 0 : 1));
237
- }), 0)) : s.isSelection.call(t, h) ? i.insertMode = !i.insertMode : (i.insertMode = !i.insertMode,
238
- n.caret.call(t, f, h.begin, h.begin));
239
- t.ignorable = i.ignorables.includes(p);
240
- },
241
- keypressEvent: function(e, t, i, a, o) {
242
- var u = this.inputmask || this, c = u.opts, f = u.dependencyLib, d = u.maskset, p = u.el, h = f(p), m = e.keyCode;
243
- if (!(!0 === t || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || u.ignorable)) return m === r.default.ENTER && u.undoValue !== u._valueGet(!0) && (u.undoValue = u._valueGet(!0),
244
- setTimeout((function() {
245
- h.trigger("change");
246
- }), 0)), u.skipInputEvent = !0, !0;
247
- if (m) {
248
- 44 !== m && 46 !== m || 3 !== e.location || "" === c.radixPoint || (m = c.radixPoint.charCodeAt(0));
249
- var v, g = t ? {
250
- begin: o,
251
- end: o
252
- } : n.caret.call(u, p), k = String.fromCharCode(m);
253
- k = c.substitutes[k] || k, d.writeOutBuffer = !0;
254
- var y = s.isValid.call(u, g, k, a, void 0, void 0, void 0, t);
255
- if (!1 !== y && (n.resetMaskSet.call(u, !0), v = void 0 !== y.caret ? y.caret : n.seekNext.call(u, y.pos.begin ? y.pos.begin : y.pos),
256
- d.p = v), v = c.numericInput && void 0 === y.caret ? n.seekPrevious.call(u, v) : v,
257
- !1 !== i && (setTimeout((function() {
258
- c.onKeyValidation.call(p, m, y);
259
- }), 0), d.writeOutBuffer && !1 !== y)) {
260
- var b = n.getBuffer.call(u);
261
- (0, l.writeBuffer)(p, b, v, e, !0 !== t);
262
- }
263
- if (e.preventDefault(), t) return !1 !== y && (y.forwardPosition = v), y;
264
- }
265
- },
266
- keyupEvent: function(e) {
267
- var t = this.inputmask;
268
- !t.isComposing || e.keyCode !== r.default.KEY_229 && e.keyCode !== r.default.ENTER || t.$el.trigger("input");
269
- },
270
- pasteEvent: function(e) {
271
- var t, i = this.inputmask, a = i.opts, r = i._valueGet(!0), o = n.caret.call(i, this);
272
- i.isRTL && (t = o.end, o.end = n.translatePosition.call(i, o.begin), o.begin = n.translatePosition.call(i, t));
273
- var s = r.substr(0, o.begin), u = r.substr(o.end, r.length);
274
- if (s == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(0, o.begin).join("") && (s = ""),
275
- u == (i.isRTL ? n.getBufferTemplate.call(i).slice().reverse() : n.getBufferTemplate.call(i)).slice(o.end).join("") && (u = ""),
276
- window.clipboardData && window.clipboardData.getData) r = s + window.clipboardData.getData("Text") + u; else {
277
- if (!e.clipboardData || !e.clipboardData.getData) return !0;
278
- r = s + e.clipboardData.getData("text/plain") + u;
279
- }
280
- var f = r;
281
- if (i.isRTL) {
282
- f = f.split("");
283
- var d, p = c(n.getBufferTemplate.call(i));
284
- try {
285
- for (p.s(); !(d = p.n()).done; ) {
286
- var h = d.value;
287
- f[0] === h && f.shift();
288
- }
289
- } catch (e) {
290
- p.e(e);
291
- } finally {
292
- p.f();
293
- }
294
- f = f.join("");
295
- }
296
- if ("function" == typeof a.onBeforePaste) {
297
- if (!1 === (f = a.onBeforePaste.call(i, f, a))) return !1;
298
- f || (f = r);
299
- }
300
- (0, l.checkVal)(this, !0, !1, f.toString().split(""), e), e.preventDefault();
301
- },
302
- inputFallBackEvent: function(e) {
303
- var t = this.inputmask, i = t.opts, a = t.dependencyLib;
304
- var s = this, c = s.inputmask._valueGet(!0), f = (t.isRTL ? n.getBuffer.call(t).slice().reverse() : n.getBuffer.call(t)).join(""), p = n.caret.call(t, s, void 0, void 0, !0);
305
- if (f !== c) {
306
- c = function(e, i, a) {
307
- if (o.iemobile) {
308
- var r = i.replace(n.getBuffer.call(t).join(""), "");
309
- if (1 === r.length) {
310
- var s = i.split("");
311
- s.splice(a.begin, 0, r), i = s.join("");
312
- }
313
- }
314
- return i;
315
- }(0, c, p);
316
- var h = function(e, a, r) {
317
- for (var o, s, l, c = e.substr(0, r.begin).split(""), f = e.substr(r.begin).split(""), d = a.substr(0, r.begin).split(""), p = a.substr(r.begin).split(""), h = c.length >= d.length ? c.length : d.length, m = f.length >= p.length ? f.length : p.length, v = "", g = [], k = "~"; c.length < h; ) c.push(k);
318
- for (;d.length < h; ) d.push(k);
319
- for (;f.length < m; ) f.unshift(k);
320
- for (;p.length < m; ) p.unshift(k);
321
- var y = c.concat(f), b = d.concat(p);
322
- for (s = 0, o = y.length; s < o; s++) switch (l = u.getPlaceholder.call(t, n.translatePosition.call(t, s)),
323
- v) {
324
- case "insertText":
325
- b[s - 1] === y[s] && r.begin == y.length - 1 && g.push(y[s]), s = o;
326
- break;
327
-
328
- case "insertReplacementText":
329
- case "deleteContentBackward":
330
- y[s] === k ? r.end++ : s = o;
331
- break;
332
-
333
- default:
334
- y[s] !== b[s] && (y[s + 1] !== k && y[s + 1] !== l && void 0 !== y[s + 1] || (b[s] !== l || b[s + 1] !== k) && b[s] !== k ? b[s + 1] === k && b[s] === y[s + 1] ? (v = "insertText",
335
- g.push(y[s]), r.begin--, r.end--) : y[s] !== l && y[s] !== k && (y[s + 1] === k || b[s] !== y[s] && b[s + 1] === y[s + 1]) ? (v = "insertReplacementText",
336
- g.push(y[s]), r.begin--) : y[s] === k ? (v = "deleteContentBackward", (n.isMask.call(t, n.translatePosition.call(t, s), !0) || b[s] === i.radixPoint) && r.end++) : s = o : (v = "insertText",
337
- g.push(y[s]), r.begin--, r.end--));
338
- }
339
- return {
340
- action: v,
341
- data: g,
342
- caret: r
343
- };
344
- }(c, f, p);
345
- switch ((s.inputmask.shadowRoot || s.ownerDocument).activeElement !== s && s.focus(),
346
- (0, l.writeBuffer)(s, n.getBuffer.call(t)), n.caret.call(t, s, p.begin, p.end, !0),
347
- h.action) {
348
- case "insertText":
349
- case "insertReplacementText":
350
- h.data.forEach((function(e, i) {
351
- var n = new a.Event("keypress");
352
- n.keyCode = e.charCodeAt(0), t.ignorable = !1, d.keypressEvent.call(s, n);
353
- })), setTimeout((function() {
354
- t.$el.trigger("keyup");
355
- }), 0);
356
- break;
357
-
358
- case "deleteContentBackward":
359
- var m = new a.Event("keydown");
360
- m.keyCode = r.default.BACKSPACE, d.keydownEvent.call(s, m);
361
- break;
362
-
363
- default:
364
- (0, l.applyInputValue)(s, c);
365
- }
366
- e.preventDefault();
367
- }
368
- },
369
- compositionendEvent: function(e) {
370
- var t = this.inputmask;
371
- t.isComposing = !1, t.$el.trigger("input");
372
- },
373
- setValueEvent: function(e) {
374
- var t = this.inputmask, i = this, a = e && e.detail ? e.detail[0] : arguments[1];
375
- void 0 === a && (a = i.inputmask._valueGet(!0)), (0, l.applyInputValue)(i, a), (e.detail && void 0 !== e.detail[1] || void 0 !== arguments[2]) && n.caret.call(t, i, e.detail ? e.detail[1] : arguments[2]);
376
- },
377
- focusEvent: function(e) {
378
- var t = this.inputmask, i = t.opts, a = this, r = a.inputmask._valueGet();
379
- i.showMaskOnFocus && r !== n.getBuffer.call(t).join("") && (0, l.writeBuffer)(a, n.getBuffer.call(t), n.seekNext.call(t, n.getLastValidPosition.call(t))),
380
- !0 !== i.positionCaretOnTab || !1 !== t.mouseEnter || s.isComplete.call(t, n.getBuffer.call(t)) && -1 !== n.getLastValidPosition.call(t) || d.clickEvent.apply(a, [ e, !0 ]),
381
- t.undoValue = t._valueGet(!0);
382
- },
383
- invalidEvent: function(e) {
384
- this.inputmask.validationEvent = !0;
385
- },
386
- mouseleaveEvent: function() {
387
- var e = this.inputmask, t = e.opts, i = this;
388
- e.mouseEnter = !1, t.clearMaskOnLostFocus && (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i && (0,
389
- l.HandleNativePlaceholder)(i, e.originalPlaceholder);
390
- },
391
- clickEvent: function(e, t) {
392
- var i = this.inputmask, a = this;
393
- if ((a.inputmask.shadowRoot || a.ownerDocument).activeElement === a) {
394
- var r = n.determineNewCaretPosition.call(i, n.caret.call(i, a), t);
395
- void 0 !== r && n.caret.call(i, a, r);
396
- }
397
- },
398
- cutEvent: function(e) {
399
- var t = this.inputmask, i = t.maskset, a = this, o = n.caret.call(t, a), u = t.isRTL ? n.getBuffer.call(t).slice(o.end, o.begin) : n.getBuffer.call(t).slice(o.begin, o.end), c = t.isRTL ? u.reverse().join("") : u.join("");
400
- window.navigator.clipboard ? window.navigator.clipboard.writeText(c) : window.clipboardData && window.clipboardData.getData && window.clipboardData.setData("Text", c),
401
- s.handleRemove.call(t, a, r.default.DELETE, o), (0, l.writeBuffer)(a, n.getBuffer.call(t), i.p, e, t.undoValue !== t._valueGet(!0));
402
- },
403
- blurEvent: function(e) {
404
- var t = this.inputmask, i = t.opts, a = (0, t.dependencyLib)(this), r = this;
405
- if (r.inputmask) {
406
- (0, l.HandleNativePlaceholder)(r, t.originalPlaceholder);
407
- var o = r.inputmask._valueGet(), u = n.getBuffer.call(t).slice();
408
- "" !== o && (i.clearMaskOnLostFocus && (-1 === n.getLastValidPosition.call(t) && o === n.getBufferTemplate.call(t).join("") ? u = [] : l.clearOptionalTail.call(t, u)),
409
- !1 === s.isComplete.call(t, u) && (setTimeout((function() {
410
- a.trigger("incomplete");
411
- }), 0), i.clearIncomplete && (n.resetMaskSet.call(t), u = i.clearMaskOnLostFocus ? [] : n.getBufferTemplate.call(t).slice())),
412
- (0, l.writeBuffer)(r, u, void 0, e)), t.undoValue !== t._valueGet(!0) && (t.undoValue = t._valueGet(!0),
413
- a.trigger("change"));
414
- }
415
- },
416
- mouseenterEvent: function() {
417
- var e = this.inputmask, t = e.opts, i = this;
418
- if (e.mouseEnter = !0, (i.inputmask.shadowRoot || i.ownerDocument).activeElement !== i) {
419
- var a = (e.isRTL ? n.getBufferTemplate.call(e).slice().reverse() : n.getBufferTemplate.call(e)).join("");
420
- e.placeholder !== a && i.placeholder !== e.originalPlaceholder && (e.originalPlaceholder = i.placeholder),
421
- t.showMaskOnHover && (0, l.HandleNativePlaceholder)(i, a);
422
- }
423
- },
424
- submitEvent: function() {
425
- var e = this.inputmask, t = e.opts;
426
- e.undoValue !== e._valueGet(!0) && e.$el.trigger("change"), -1 === n.getLastValidPosition.call(e) && e._valueGet && e._valueGet() === n.getBufferTemplate.call(e).join("") && e._valueSet(""),
427
- t.clearIncomplete && !1 === s.isComplete.call(e, n.getBuffer.call(e)) && e._valueSet(""),
428
- t.removeMaskOnSubmit && (e._valueSet(e.unmaskedvalue(), !0), setTimeout((function() {
429
- (0, l.writeBuffer)(e.el, n.getBuffer.call(e));
430
- }), 0));
431
- },
432
- resetEvent: function() {
433
- var e = this.inputmask;
434
- e.refreshValue = !0, setTimeout((function() {
435
- (0, l.applyInputValue)(e.el, e._valueGet(!0));
436
- }), 0);
437
- }
438
- };
439
- t.EventHandlers = d;
440
- },
441
- 9716: function(e, t, i) {
442
- Object.defineProperty(t, "__esModule", {
443
- value: !0
444
- }), t.EventRuler = void 0;
445
- var a = s(i(2394)), n = s(i(5581)), r = i(8711), o = i(7760);
446
- function s(e) {
447
- return e && e.__esModule ? e : {
448
- default: e
449
- };
450
- }
451
- var l = {
452
- on: function(e, t, i) {
453
- var s = e.inputmask.dependencyLib, l = function(t) {
454
- t.originalEvent && (t = t.originalEvent || t, arguments[0] = t);
455
- var l, u = this, c = u.inputmask, f = c ? c.opts : void 0;
456
- if (void 0 === c && "FORM" !== this.nodeName) {
457
- var d = s.data(u, "_inputmask_opts");
458
- s(u).off(), d && new a.default(d).mask(u);
459
- } else {
460
- if ([ "submit", "reset", "setvalue" ].includes(t.type) || "FORM" === this.nodeName || !(u.disabled || u.readOnly && !("keydown" === t.type && t.ctrlKey && 67 === t.keyCode || !1 === f.tabThrough && t.keyCode === n.default.TAB))) {
461
- switch (t.type) {
462
- case "input":
463
- if (!0 === c.skipInputEvent || t.inputType && "insertCompositionText" === t.inputType) return c.skipInputEvent = !1,
464
- t.preventDefault();
465
- break;
466
-
467
- case "keydown":
468
- c.skipKeyPressEvent = !1, c.skipInputEvent = c.isComposing = t.keyCode === n.default.KEY_229;
469
- break;
470
-
471
- case "keyup":
472
- case "compositionend":
473
- c.isComposing && (c.skipInputEvent = !1);
474
- break;
475
-
476
- case "keypress":
477
- if (!0 === c.skipKeyPressEvent) return t.preventDefault();
478
- c.skipKeyPressEvent = !0;
479
- break;
480
-
481
- case "click":
482
- case "focus":
483
- return c.validationEvent ? (c.validationEvent = !1, e.blur(), (0, o.HandleNativePlaceholder)(e, (c.isRTL ? r.getBufferTemplate.call(c).slice().reverse() : r.getBufferTemplate.call(c)).join("")),
484
- setTimeout((function() {
485
- e.focus();
486
- }), f.validationEventTimeOut), !1) : (l = arguments, setTimeout((function() {
487
- e.inputmask && i.apply(u, l);
488
- }), 0), !1);
489
- }
490
- var p = i.apply(u, arguments);
491
- return !1 === p && (t.preventDefault(), t.stopPropagation()), p;
492
- }
493
- t.preventDefault();
494
- }
495
- };
496
- [ "submit", "reset" ].includes(t) ? (l = l.bind(e), null !== e.form && s(e.form).on(t, l)) : s(e).on(t, l),
497
- e.inputmask.events[t] = e.inputmask.events[t] || [], e.inputmask.events[t].push(l);
498
- },
499
- off: function(e, t) {
500
- if (e.inputmask && e.inputmask.events) {
501
- var i = e.inputmask.dependencyLib, a = e.inputmask.events;
502
- for (var n in t && ((a = [])[t] = e.inputmask.events[t]), a) {
503
- for (var r = a[n]; r.length > 0; ) {
504
- var o = r.pop();
505
- [ "submit", "reset" ].includes(n) ? null !== e.form && i(e.form).off(n, o) : i(e).off(n, o);
506
- }
507
- delete e.inputmask.events[n];
508
- }
509
- }
510
- }
511
- };
512
- t.EventRuler = l;
513
- },
514
- 219: function(e, t, i) {
515
- var a = d(i(2394)), n = d(i(5581)), r = d(i(7184)), o = i(8711), s = i(4713);
516
- function l(e) {
517
- return l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
518
- return typeof e;
519
- } : function(e) {
520
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
521
- }, l(e);
522
- }
523
- function u(e, t) {
524
- return function(e) {
525
- if (Array.isArray(e)) return e;
526
- }(e) || function(e, t) {
527
- var i = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
528
- if (null == i) return;
529
- var a, n, r = [], o = !0, s = !1;
530
- try {
531
- for (i = i.call(e); !(o = (a = i.next()).done) && (r.push(a.value), !t || r.length !== t); o = !0) ;
532
- } catch (e) {
533
- s = !0, n = e;
534
- } finally {
535
- try {
536
- o || null == i.return || i.return();
537
- } finally {
538
- if (s) throw n;
539
- }
540
- }
541
- return r;
542
- }(e, t) || function(e, t) {
543
- if (!e) return;
544
- if ("string" == typeof e) return c(e, t);
545
- var i = Object.prototype.toString.call(e).slice(8, -1);
546
- "Object" === i && e.constructor && (i = e.constructor.name);
547
- if ("Map" === i || "Set" === i) return Array.from(e);
548
- if ("Arguments" === i || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)) return c(e, t);
549
- }(e, t) || function() {
550
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
551
- }();
552
- }
553
- function c(e, t) {
554
- (null == t || t > e.length) && (t = e.length);
555
- for (var i = 0, a = new Array(t); i < t; i++) a[i] = e[i];
556
- return a;
557
- }
558
- function f(e, t) {
559
- for (var i = 0; i < t.length; i++) {
560
- var a = t[i];
561
- a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0),
562
- Object.defineProperty(e, a.key, a);
563
- }
564
- }
565
- function d(e) {
566
- return e && e.__esModule ? e : {
567
- default: e
568
- };
569
- }
570
- var p = a.default.dependencyLib, h = function() {
571
- function e(t, i, a) {
572
- !function(e, t) {
573
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
574
- }(this, e), this.mask = t, this.format = i, this.opts = a, this._date = new Date(1, 0, 1),
575
- this.initDateObject(t, this.opts);
576
- }
577
- var t, i, a;
578
- return t = e, (i = [ {
579
- key: "date",
580
- get: function() {
581
- return void 0 === this._date && (this._date = new Date(1, 0, 1), this.initDateObject(void 0, this.opts)),
582
- this._date;
583
- }
584
- }, {
585
- key: "initDateObject",
586
- value: function(e, t) {
587
- var i;
588
- for (P(t).lastIndex = 0; i = P(t).exec(this.format); ) {
589
- var a = new RegExp("\\d+$").exec(i[0]), n = a ? i[0][0] + "x" : i[0], r = void 0;
590
- if (void 0 !== e) {
591
- if (a) {
592
- var o = P(t).lastIndex, s = O(i.index, t);
593
- P(t).lastIndex = o, r = e.slice(0, e.indexOf(s.nextMatch[0]));
594
- } else r = e.slice(0, n.length);
595
- e = e.slice(r.length);
596
- }
597
- Object.prototype.hasOwnProperty.call(g, n) && this.setValue(this, r, n, g[n][2], g[n][1]);
598
- }
599
- }
600
- }, {
601
- key: "setValue",
602
- value: function(e, t, i, a, n) {
603
- if (void 0 !== t && (e[a] = "ampm" === a ? t : t.replace(/[^0-9]/g, "0"), e["raw" + a] = t.replace(/\s/g, "_")),
604
- void 0 !== n) {
605
- var r = e[a];
606
- ("day" === a && 29 === parseInt(r) || "month" === a && 2 === parseInt(r)) && (29 !== parseInt(e.day) || 2 !== parseInt(e.month) || "" !== e.year && void 0 !== e.year || e._date.setFullYear(2012, 1, 29)),
607
- "day" === a && (v = !0, 0 === parseInt(r) && (r = 1)), "month" === a && (v = !0),
608
- "year" === a && (v = !0, r.length < 4 && (r = w(r, 4, !0))), "" === r || isNaN(r) || n.call(e._date, r),
609
- "ampm" === a && n.call(e._date, r);
610
- }
611
- }
612
- }, {
613
- key: "reset",
614
- value: function() {
615
- this._date = new Date(1, 0, 1);
616
- }
617
- }, {
618
- key: "reInit",
619
- value: function() {
620
- this._date = void 0, this.date;
621
- }
622
- } ]) && f(t.prototype, i), a && f(t, a), Object.defineProperty(t, "prototype", {
623
- writable: !1
624
- }), e;
625
- }(), m = (new Date).getFullYear(), v = !1, g = {
626
- d: [ "[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", Date.prototype.getDate ],
627
- dd: [ "0[1-9]|[12][0-9]|3[01]", Date.prototype.setDate, "day", function() {
628
- return w(Date.prototype.getDate.call(this), 2);
629
- } ],
630
- ddd: [ "" ],
631
- dddd: [ "" ],
632
- m: [ "[1-9]|1[012]", function(e) {
633
- var t = e ? parseInt(e) : 0;
634
- return t > 0 && t--, Date.prototype.setMonth.call(this, t);
635
- }, "month", function() {
636
- return Date.prototype.getMonth.call(this) + 1;
637
- } ],
638
- mm: [ "0[1-9]|1[012]", function(e) {
639
- var t = e ? parseInt(e) : 0;
640
- return t > 0 && t--, Date.prototype.setMonth.call(this, t);
641
- }, "month", function() {
642
- return w(Date.prototype.getMonth.call(this) + 1, 2);
643
- } ],
644
- mmm: [ "" ],
645
- mmmm: [ "" ],
646
- yy: [ "[0-9]{2}", Date.prototype.setFullYear, "year", function() {
647
- return w(Date.prototype.getFullYear.call(this), 2);
648
- } ],
649
- yyyy: [ "[0-9]{4}", Date.prototype.setFullYear, "year", function() {
650
- return w(Date.prototype.getFullYear.call(this), 4);
651
- } ],
652
- h: [ "[1-9]|1[0-2]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
653
- hh: [ "0[1-9]|1[0-2]", Date.prototype.setHours, "hours", function() {
654
- return w(Date.prototype.getHours.call(this), 2);
655
- } ],
656
- hx: [ function(e) {
657
- return "[0-9]{".concat(e, "}");
658
- }, Date.prototype.setHours, "hours", function(e) {
659
- return Date.prototype.getHours;
660
- } ],
661
- H: [ "1?[0-9]|2[0-3]", Date.prototype.setHours, "hours", Date.prototype.getHours ],
662
- HH: [ "0[0-9]|1[0-9]|2[0-3]", Date.prototype.setHours, "hours", function() {
663
- return w(Date.prototype.getHours.call(this), 2);
664
- } ],
665
- Hx: [ function(e) {
666
- return "[0-9]{".concat(e, "}");
667
- }, Date.prototype.setHours, "hours", function(e) {
668
- return function() {
669
- return w(Date.prototype.getHours.call(this), e);
670
- };
671
- } ],
672
- M: [ "[1-5]?[0-9]", Date.prototype.setMinutes, "minutes", Date.prototype.getMinutes ],
673
- MM: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setMinutes, "minutes", function() {
674
- return w(Date.prototype.getMinutes.call(this), 2);
675
- } ],
676
- s: [ "[1-5]?[0-9]", Date.prototype.setSeconds, "seconds", Date.prototype.getSeconds ],
677
- ss: [ "0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]", Date.prototype.setSeconds, "seconds", function() {
678
- return w(Date.prototype.getSeconds.call(this), 2);
679
- } ],
680
- l: [ "[0-9]{3}", Date.prototype.setMilliseconds, "milliseconds", function() {
681
- return w(Date.prototype.getMilliseconds.call(this), 3);
682
- } ],
683
- L: [ "[0-9]{2}", Date.prototype.setMilliseconds, "milliseconds", function() {
684
- return w(Date.prototype.getMilliseconds.call(this), 2);
685
- } ],
686
- t: [ "[ap]", y, "ampm", b, 1 ],
687
- tt: [ "[ap]m", y, "ampm", b, 2 ],
688
- T: [ "[AP]", y, "ampm", b, 1 ],
689
- TT: [ "[AP]M", y, "ampm", b, 2 ],
690
- Z: [ ".*", void 0, "Z", function() {
691
- var e = this.toString().match(/\((.+)\)/)[1];
692
- e.includes(" ") && (e = (e = e.replace("-", " ").toUpperCase()).split(" ").map((function(e) {
693
- return u(e, 1)[0];
694
- })).join(""));
695
- return e;
696
- } ],
697
- o: [ "" ],
698
- S: [ "" ]
699
- }, k = {
700
- isoDate: "yyyy-mm-dd",
701
- isoTime: "HH:MM:ss",
702
- isoDateTime: "yyyy-mm-dd'T'HH:MM:ss",
703
- isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"
704
- };
705
- function y(e) {
706
- var t = this.getHours();
707
- e.toLowerCase().includes("p") ? this.setHours(t + 12) : e.toLowerCase().includes("a") && t >= 12 && this.setHours(t - 12);
708
- }
709
- function b() {
710
- var e = this.getHours();
711
- return (e = e || 12) >= 12 ? "PM" : "AM";
712
- }
713
- function x(e) {
714
- var t = new RegExp("\\d+$").exec(e[0]);
715
- if (t && void 0 !== t[0]) {
716
- var i = g[e[0][0] + "x"].slice("");
717
- return i[0] = i[0](t[0]), i[3] = i[3](t[0]), i;
718
- }
719
- if (g[e[0]]) return g[e[0]];
720
- }
721
- function P(e) {
722
- if (!e.tokenizer) {
723
- var t = [], i = [];
724
- for (var a in g) if (/\.*x$/.test(a)) {
725
- var n = a[0] + "\\d+";
726
- -1 === i.indexOf(n) && i.push(n);
727
- } else -1 === t.indexOf(a[0]) && t.push(a[0]);
728
- e.tokenizer = "(" + (i.length > 0 ? i.join("|") + "|" : "") + t.join("+|") + ")+?|.",
729
- e.tokenizer = new RegExp(e.tokenizer, "g");
730
- }
731
- return e.tokenizer;
732
- }
733
- function E(e, t, i) {
734
- if (!v) return !0;
735
- if (void 0 === e.rawday || !isFinite(e.rawday) && new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day || "29" == e.day && (!isFinite(e.rawyear) || void 0 === e.rawyear || "" === e.rawyear) || new Date(e.date.getFullYear(), isFinite(e.rawmonth) ? e.month : e.date.getMonth() + 1, 0).getDate() >= e.day) return t;
736
- if ("29" == e.day) {
737
- var a = O(t.pos, i);
738
- if ("yyyy" === a.targetMatch[0] && t.pos - a.targetMatchIndex == 2) return t.remove = t.pos + 1,
739
- t;
740
- } else if ("02" == e.month && "30" == e.day && void 0 !== t.c) return e.day = "03",
741
- e.date.setDate(3), e.date.setMonth(1), t.insert = [ {
742
- pos: t.pos,
743
- c: "0"
744
- }, {
745
- pos: t.pos + 1,
746
- c: t.c
747
- } ], t.caret = o.seekNext.call(this, t.pos + 1), t;
748
- return !1;
749
- }
750
- function S(e, t, i, a) {
751
- var n, o, s = "";
752
- for (P(i).lastIndex = 0; n = P(i).exec(e); ) {
753
- if (void 0 === t) if (o = x(n)) s += "(" + o[0] + ")"; else switch (n[0]) {
754
- case "[":
755
- s += "(";
756
- break;
757
-
758
- case "]":
759
- s += ")?";
760
- break;
761
-
762
- default:
763
- s += (0, r.default)(n[0]);
764
- } else if (o = x(n)) if (!0 !== a && o[3]) s += o[3].call(t.date); else o[2] ? s += t["raw" + o[2]] : s += n[0]; else s += n[0];
765
- }
766
- return s;
767
- }
768
- function w(e, t, i) {
769
- for (e = String(e), t = t || 2; e.length < t; ) e = i ? e + "0" : "0" + e;
770
- return e;
771
- }
772
- function _(e, t, i) {
773
- return "string" == typeof e ? new h(e, t, i) : e && "object" === l(e) && Object.prototype.hasOwnProperty.call(e, "date") ? e : void 0;
774
- }
775
- function M(e, t) {
776
- return S(t.inputFormat, {
777
- date: e
778
- }, t);
779
- }
780
- function O(e, t) {
781
- var i, a, n = 0, r = 0;
782
- for (P(t).lastIndex = 0; a = P(t).exec(t.inputFormat); ) {
783
- var o = new RegExp("\\d+$").exec(a[0]);
784
- if ((n += r = o ? parseInt(o[0]) : a[0].length) >= e + 1) {
785
- i = a, a = P(t).exec(t.inputFormat);
786
- break;
787
- }
788
- }
789
- return {
790
- targetMatchIndex: n - r,
791
- nextMatch: a,
792
- targetMatch: i
793
- };
794
- }
795
- a.default.extendAliases({
796
- datetime: {
797
- mask: function(e) {
798
- return e.numericInput = !1, g.S = e.i18n.ordinalSuffix.join("|"), e.inputFormat = k[e.inputFormat] || e.inputFormat,
799
- e.displayFormat = k[e.displayFormat] || e.displayFormat || e.inputFormat, e.outputFormat = k[e.outputFormat] || e.outputFormat || e.inputFormat,
800
- e.placeholder = "" !== e.placeholder ? e.placeholder : e.inputFormat.replace(/[[\]]/, ""),
801
- e.regex = S(e.inputFormat, void 0, e), e.min = _(e.min, e.inputFormat, e), e.max = _(e.max, e.inputFormat, e),
802
- null;
803
- },
804
- placeholder: "",
805
- inputFormat: "isoDateTime",
806
- displayFormat: null,
807
- outputFormat: null,
808
- min: null,
809
- max: null,
810
- skipOptionalPartCharacter: "",
811
- i18n: {
812
- dayNames: [ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ],
813
- 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" ],
814
- ordinalSuffix: [ "st", "nd", "rd", "th" ]
815
- },
816
- preValidation: function(e, t, i, a, n, r, o, s) {
817
- if (s) return !0;
818
- if (isNaN(i) && e[t] !== i) {
819
- var l = O(t, n);
820
- if (l.nextMatch && l.nextMatch[0] === i && l.targetMatch[0].length > 1) {
821
- var u = g[l.targetMatch[0]][0];
822
- if (new RegExp(u).test("0" + e[t - 1])) return e[t] = e[t - 1], e[t - 1] = "0",
823
- {
824
- fuzzy: !0,
825
- buffer: e,
826
- refreshFromBuffer: {
827
- start: t - 1,
828
- end: t + 1
829
- },
830
- pos: t + 1
831
- };
832
- }
833
- }
834
- return !0;
835
- },
836
- postValidation: function(e, t, i, a, n, r, o, l) {
837
- var u, c;
838
- if (o) return !0;
839
- if (!1 === a && (((u = O(t + 1, n)).targetMatch && u.targetMatchIndex === t && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]] || (u = O(t + 2, n)).targetMatch && u.targetMatchIndex === t + 1 && u.targetMatch[0].length > 1 && void 0 !== g[u.targetMatch[0]]) && (c = g[u.targetMatch[0]][0]),
840
- void 0 !== c && (void 0 !== r.validPositions[t + 1] && new RegExp(c).test(i + "0") ? (e[t] = i,
841
- e[t + 1] = "0", a = {
842
- pos: t + 2,
843
- caret: t
844
- }) : new RegExp(c).test("0" + i) && (e[t] = "0", e[t + 1] = i, a = {
845
- pos: t + 2
846
- })), !1 === a)) return a;
847
- if (a.fuzzy && (e = a.buffer, t = a.pos), (u = O(t, n)).targetMatch && u.targetMatch[0] && void 0 !== g[u.targetMatch[0]]) {
848
- var f = g[u.targetMatch[0]];
849
- c = f[0];
850
- var d = e.slice(u.targetMatchIndex, u.targetMatchIndex + u.targetMatch[0].length);
851
- if (!1 === new RegExp(c).test(d.join("")) && 2 === u.targetMatch[0].length && r.validPositions[u.targetMatchIndex] && r.validPositions[u.targetMatchIndex + 1] && (r.validPositions[u.targetMatchIndex + 1].input = "0"),
852
- "year" == f[2]) for (var p = s.getMaskTemplate.call(this, !1, 1, void 0, !0), h = t + 1; h < e.length; h++) e[h] = p[h],
853
- delete r.validPositions[h];
854
- }
855
- var v = a, k = _(e.join(""), n.inputFormat, n);
856
- return v && k.date.getTime() == k.date.getTime() && (n.prefillYear && (v = function(e, t, i) {
857
- if (e.year !== e.rawyear) {
858
- var a = m.toString(), n = e.rawyear.replace(/[^0-9]/g, ""), r = a.slice(0, n.length), o = a.slice(n.length);
859
- if (2 === n.length && n === r) {
860
- var s = new Date(m, e.month - 1, e.day);
861
- e.day == s.getDate() && (!i.max || i.max.date.getTime() >= s.getTime()) && (e.date.setFullYear(m),
862
- e.year = a, t.insert = [ {
863
- pos: t.pos + 1,
864
- c: o[0]
865
- }, {
866
- pos: t.pos + 2,
867
- c: o[1]
868
- } ]);
869
- }
870
- }
871
- return t;
872
- }(k, v, n)), v = function(e, t, i, a, n) {
873
- if (!t) return t;
874
- if (t && i.min && i.min.date.getTime() == i.min.date.getTime()) {
875
- var r;
876
- for (e.reset(), P(i).lastIndex = 0; r = P(i).exec(i.inputFormat); ) {
877
- var o;
878
- if ((o = x(r)) && o[3]) {
879
- for (var s = o[1], l = e[o[2]], u = i.min[o[2]], c = i.max ? i.max[o[2]] : u, f = [], d = !1, p = 0; p < u.length; p++) void 0 !== a.validPositions[p + r.index] || d ? (f[p] = l[p],
880
- d = d || l[p] > u[p]) : (f[p] = u[p], "year" === o[2] && l.length - 1 == p && u != c && (f = (parseInt(f.join("")) + 1).toString().split("")),
881
- "ampm" === o[2] && u != c && i.min.date.getTime() > e.date.getTime() && (f[p] = c[p]));
882
- s.call(e._date, f.join(""));
883
- }
884
- }
885
- t = i.min.date.getTime() <= e.date.getTime(), e.reInit();
886
- }
887
- return t && i.max && i.max.date.getTime() == i.max.date.getTime() && (t = i.max.date.getTime() >= e.date.getTime()),
888
- t;
889
- }(k, v = E.call(this, k, v, n), n, r)), void 0 !== t && v && a.pos !== t ? {
890
- buffer: S(n.inputFormat, k, n).split(""),
891
- refreshFromBuffer: {
892
- start: t,
893
- end: a.pos
894
- },
895
- pos: a.caret || a.pos
896
- } : v;
897
- },
898
- onKeyDown: function(e, t, i, a) {
899
- e.ctrlKey && e.keyCode === n.default.RIGHT && (this.inputmask._valueSet(M(new Date, a)),
900
- p(this).trigger("setvalue"));
901
- },
902
- onUnMask: function(e, t, i) {
903
- return t ? S(i.outputFormat, _(e, i.inputFormat, i), i, !0) : t;
904
- },
905
- casing: function(e, t, i, a) {
906
- return 0 == t.nativeDef.indexOf("[ap]") ? e.toLowerCase() : 0 == t.nativeDef.indexOf("[AP]") ? e.toUpperCase() : e;
907
- },
908
- onBeforeMask: function(e, t) {
909
- return "[object Date]" === Object.prototype.toString.call(e) && (e = M(e, t)), e;
910
- },
911
- insertMode: !1,
912
- shiftPositions: !1,
913
- keepStatic: !1,
914
- inputmode: "numeric",
915
- prefillYear: !0
916
- }
917
- });
918
- },
919
- 3851: function(e, t, i) {
920
- var a, n = (a = i(2394)) && a.__esModule ? a : {
921
- default: a
922
- }, r = i(8711), o = i(4713);
923
- n.default.extendDefinitions({
924
- A: {
925
- validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
926
- casing: "upper"
927
- },
928
- "&": {
929
- validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
930
- casing: "upper"
931
- },
932
- "#": {
933
- validator: "[0-9A-Fa-f]",
934
- casing: "upper"
935
- }
936
- });
937
- var s = new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]");
938
- function l(e, t, i, a, n) {
939
- return i - 1 > -1 && "." !== t.buffer[i - 1] ? (e = t.buffer[i - 1] + e, e = i - 2 > -1 && "." !== t.buffer[i - 2] ? t.buffer[i - 2] + e : "0" + e) : e = "00" + e,
940
- s.test(e);
941
- }
942
- n.default.extendAliases({
943
- cssunit: {
944
- regex: "[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"
945
- },
946
- url: {
947
- regex: "(https?|ftp)://.*",
948
- autoUnmask: !1,
949
- keepStatic: !1,
950
- tabThrough: !0
951
- },
952
- ip: {
953
- mask: "i{1,3}.j{1,3}.k{1,3}.l{1,3}",
954
- definitions: {
955
- i: {
956
- validator: l
957
- },
958
- j: {
959
- validator: l
960
- },
961
- k: {
962
- validator: l
963
- },
964
- l: {
965
- validator: l
966
- }
967
- },
968
- onUnMask: function(e, t, i) {
969
- return e;
970
- },
971
- inputmode: "decimal",
972
- substitutes: {
973
- ",": "."
974
- }
975
- },
976
- email: {
977
- mask: function(e) {
978
- var t = "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]", i = t;
979
- if (e.separator) for (var a = 0; a < e.quantifier; a++) i += "[".concat(e.separator).concat(t, "]");
980
- return i;
981
- },
982
- greedy: !1,
983
- casing: "lower",
984
- separator: null,
985
- quantifier: 5,
986
- skipOptionalPartCharacter: "",
987
- onBeforePaste: function(e, t) {
988
- return (e = e.toLowerCase()).replace("mailto:", "");
989
- },
990
- definitions: {
991
- "*": {
992
- validator: "[0-9\uff11-\uff19A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5!#$%&'*+/=?^_`{|}~-]"
993
- },
994
- "-": {
995
- validator: "[0-9A-Za-z-]"
996
- }
997
- },
998
- onUnMask: function(e, t, i) {
999
- return e;
1000
- },
1001
- inputmode: "email"
1002
- },
1003
- mac: {
1004
- mask: "##:##:##:##:##:##"
1005
- },
1006
- vin: {
1007
- mask: "V{13}9{4}",
1008
- definitions: {
1009
- V: {
1010
- validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
1011
- casing: "upper"
1012
- }
1013
- },
1014
- clearIncomplete: !0,
1015
- autoUnmask: !0
1016
- },
1017
- ssn: {
1018
- mask: "999-99-9999",
1019
- postValidation: function(e, t, i, a, n, s, l) {
1020
- var u = o.getMaskTemplate.call(this, !0, r.getLastValidPosition.call(this), !0, !0);
1021
- return /^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(u.join(""));
1022
- }
1023
- }
1024
- });
1025
- },
1026
- 207: function(e, t, i) {
1027
- var a = s(i(2394)), n = s(i(5581)), r = s(i(7184)), o = i(8711);
1028
- function s(e) {
1029
- return e && e.__esModule ? e : {
1030
- default: e
1031
- };
1032
- }
1033
- var l = a.default.dependencyLib;
1034
- function u(e, t) {
1035
- for (var i = "", n = 0; n < e.length; n++) a.default.prototype.definitions[e.charAt(n)] || t.definitions[e.charAt(n)] || t.optionalmarker[0] === e.charAt(n) || t.optionalmarker[1] === e.charAt(n) || t.quantifiermarker[0] === e.charAt(n) || t.quantifiermarker[1] === e.charAt(n) || t.groupmarker[0] === e.charAt(n) || t.groupmarker[1] === e.charAt(n) || t.alternatormarker === e.charAt(n) ? i += "\\" + e.charAt(n) : i += e.charAt(n);
1036
- return i;
1037
- }
1038
- function c(e, t, i, a) {
1039
- if (e.length > 0 && t > 0 && (!i.digitsOptional || a)) {
1040
- var n = e.indexOf(i.radixPoint), r = !1;
1041
- i.negationSymbol.back === e[e.length - 1] && (r = !0, e.length--), -1 === n && (e.push(i.radixPoint),
1042
- n = e.length - 1);
1043
- for (var o = 1; o <= t; o++) isFinite(e[n + o]) || (e[n + o] = "0");
1044
- }
1045
- return r && e.push(i.negationSymbol.back), e;
1046
- }
1047
- function f(e, t) {
1048
- var i = 0;
1049
- if ("+" === e) {
1050
- for (i in t.validPositions) ;
1051
- i = o.seekNext.call(this, parseInt(i));
1052
- }
1053
- for (var a in t.tests) if ((a = parseInt(a)) >= i) for (var n = 0, r = t.tests[a].length; n < r; n++) if ((void 0 === t.validPositions[a] || "-" === e) && t.tests[a][n].match.def === e) return a + (void 0 !== t.validPositions[a] && "-" !== e ? 1 : 0);
1054
- return i;
1055
- }
1056
- function d(e, t) {
1057
- var i = -1;
1058
- for (var a in t.validPositions) {
1059
- var n = t.validPositions[a];
1060
- if (n && n.match.def === e) {
1061
- i = parseInt(a);
1062
- break;
1063
- }
1064
- }
1065
- return i;
1066
- }
1067
- function p(e, t, i, a, n) {
1068
- var r = t.buffer ? t.buffer.indexOf(n.radixPoint) : -1, o = (-1 !== r || a && n.jitMasking) && new RegExp(n.definitions[9].validator).test(e);
1069
- return n._radixDance && -1 !== r && o && null == t.validPositions[r] ? {
1070
- insert: {
1071
- pos: r === i ? r + 1 : r,
1072
- c: n.radixPoint
1073
- },
1074
- pos: i
1075
- } : o;
1076
- }
1077
- a.default.extendAliases({
1078
- numeric: {
1079
- mask: function(e) {
1080
- e.repeat = 0, e.groupSeparator === e.radixPoint && e.digits && "0" !== e.digits && ("." === e.radixPoint ? e.groupSeparator = "," : "," === e.radixPoint ? e.groupSeparator = "." : e.groupSeparator = ""),
1081
- " " === e.groupSeparator && (e.skipOptionalPartCharacter = void 0), e.placeholder.length > 1 && (e.placeholder = e.placeholder.charAt(0)),
1082
- "radixFocus" === e.positionCaretOnClick && "" === e.placeholder && (e.positionCaretOnClick = "lvp");
1083
- var t = "0", i = e.radixPoint;
1084
- !0 === e.numericInput && void 0 === e.__financeInput ? (t = "1", e.positionCaretOnClick = "radixFocus" === e.positionCaretOnClick ? "lvp" : e.positionCaretOnClick,
1085
- e.digitsOptional = !1, isNaN(e.digits) && (e.digits = 2), e._radixDance = !1, i = "," === e.radixPoint ? "?" : "!",
1086
- "" !== e.radixPoint && void 0 === e.definitions[i] && (e.definitions[i] = {}, e.definitions[i].validator = "[" + e.radixPoint + "]",
1087
- e.definitions[i].placeholder = e.radixPoint, e.definitions[i].static = !0, e.definitions[i].generated = !0)) : (e.__financeInput = !1,
1088
- e.numericInput = !0);
1089
- var a, n = "[+]";
1090
- if (n += u(e.prefix, e), "" !== e.groupSeparator ? (void 0 === e.definitions[e.groupSeparator] && (e.definitions[e.groupSeparator] = {},
1091
- e.definitions[e.groupSeparator].validator = "[" + e.groupSeparator + "]", e.definitions[e.groupSeparator].placeholder = e.groupSeparator,
1092
- e.definitions[e.groupSeparator].static = !0, e.definitions[e.groupSeparator].generated = !0),
1093
- n += e._mask(e)) : n += "9{+}", void 0 !== e.digits && 0 !== e.digits) {
1094
- var o = e.digits.toString().split(",");
1095
- isFinite(o[0]) && o[1] && isFinite(o[1]) ? n += i + t + "{" + e.digits + "}" : (isNaN(e.digits) || parseInt(e.digits) > 0) && (e.digitsOptional || e.jitMasking ? (a = n + i + t + "{0," + e.digits + "}",
1096
- e.keepStatic = !0) : n += i + t + "{" + e.digits + "}");
1097
- } else e.inputmode = "numeric";
1098
- return n += u(e.suffix, e), n += "[-]", a && (n = [ a + u(e.suffix, e) + "[-]", n ]),
1099
- e.greedy = !1, function(e) {
1100
- void 0 === e.parseMinMaxOptions && (null !== e.min && (e.min = e.min.toString().replace(new RegExp((0,
1101
- r.default)(e.groupSeparator), "g"), ""), "," === e.radixPoint && (e.min = e.min.replace(e.radixPoint, ".")),
1102
- e.min = isFinite(e.min) ? parseFloat(e.min) : NaN, isNaN(e.min) && (e.min = Number.MIN_VALUE)),
1103
- null !== e.max && (e.max = e.max.toString().replace(new RegExp((0, r.default)(e.groupSeparator), "g"), ""),
1104
- "," === e.radixPoint && (e.max = e.max.replace(e.radixPoint, ".")), e.max = isFinite(e.max) ? parseFloat(e.max) : NaN,
1105
- isNaN(e.max) && (e.max = Number.MAX_VALUE)), e.parseMinMaxOptions = "done");
1106
- }(e), "" !== e.radixPoint && (e.substitutes["." == e.radixPoint ? "," : "."] = e.radixPoint),
1107
- n;
1108
- },
1109
- _mask: function(e) {
1110
- return "(" + e.groupSeparator + "999){+|1}";
1111
- },
1112
- digits: "*",
1113
- digitsOptional: !0,
1114
- enforceDigitsOnBlur: !1,
1115
- radixPoint: ".",
1116
- positionCaretOnClick: "radixFocus",
1117
- _radixDance: !0,
1118
- groupSeparator: "",
1119
- allowMinus: !0,
1120
- negationSymbol: {
1121
- front: "-",
1122
- back: ""
1123
- },
1124
- prefix: "",
1125
- suffix: "",
1126
- min: null,
1127
- max: null,
1128
- SetMaxOnOverflow: !1,
1129
- step: 1,
1130
- inputType: "text",
1131
- unmaskAsNumber: !1,
1132
- roundingFN: Math.round,
1133
- inputmode: "decimal",
1134
- shortcuts: {
1135
- k: "1000",
1136
- m: "1000000"
1137
- },
1138
- placeholder: "0",
1139
- greedy: !1,
1140
- rightAlign: !0,
1141
- insertMode: !0,
1142
- autoUnmask: !1,
1143
- skipOptionalPartCharacter: "",
1144
- usePrototypeDefinitions: !1,
1145
- stripLeadingZeroes: !0,
1146
- definitions: {
1147
- 0: {
1148
- validator: p
1149
- },
1150
- 1: {
1151
- validator: p,
1152
- definitionSymbol: "9"
1153
- },
1154
- 9: {
1155
- validator: "[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]",
1156
- definitionSymbol: "*"
1157
- },
1158
- "+": {
1159
- validator: function(e, t, i, a, n) {
1160
- return n.allowMinus && ("-" === e || e === n.negationSymbol.front);
1161
- }
1162
- },
1163
- "-": {
1164
- validator: function(e, t, i, a, n) {
1165
- return n.allowMinus && e === n.negationSymbol.back;
1166
- }
1167
- }
1168
- },
1169
- preValidation: function(e, t, i, a, n, r, o, s) {
1170
- if (!1 !== n.__financeInput && i === n.radixPoint) return !1;
1171
- var l = e.indexOf(n.radixPoint), u = t;
1172
- if (t = function(e, t, i, a, n) {
1173
- return n._radixDance && n.numericInput && t !== n.negationSymbol.back && e <= i && (i > 0 || t == n.radixPoint) && (void 0 === a.validPositions[e - 1] || a.validPositions[e - 1].input !== n.negationSymbol.back) && (e -= 1),
1174
- e;
1175
- }(t, i, l, r, n), "-" === i || i === n.negationSymbol.front) {
1176
- if (!0 !== n.allowMinus) return !1;
1177
- var c = !1, p = d("+", r), h = d("-", r);
1178
- return -1 !== p && (c = [ p, h ]), !1 !== c ? {
1179
- remove: c,
1180
- caret: u - n.negationSymbol.back.length
1181
- } : {
1182
- insert: [ {
1183
- pos: f.call(this, "+", r),
1184
- c: n.negationSymbol.front,
1185
- fromIsValid: !0
1186
- }, {
1187
- pos: f.call(this, "-", r),
1188
- c: n.negationSymbol.back,
1189
- fromIsValid: void 0
1190
- } ],
1191
- caret: u + n.negationSymbol.back.length
1192
- };
1193
- }
1194
- if (i === n.groupSeparator) return {
1195
- caret: u
1196
- };
1197
- if (s) return !0;
1198
- if (-1 !== l && !0 === n._radixDance && !1 === a && i === n.radixPoint && void 0 !== n.digits && (isNaN(n.digits) || parseInt(n.digits) > 0) && l !== t) return {
1199
- caret: n._radixDance && t === l - 1 ? l + 1 : l
1200
- };
1201
- if (!1 === n.__financeInput) if (a) {
1202
- if (n.digitsOptional) return {
1203
- rewritePosition: o.end
1204
- };
1205
- if (!n.digitsOptional) {
1206
- if (o.begin > l && o.end <= l) return i === n.radixPoint ? {
1207
- insert: {
1208
- pos: l + 1,
1209
- c: "0",
1210
- fromIsValid: !0
1211
- },
1212
- rewritePosition: l
1213
- } : {
1214
- rewritePosition: l + 1
1215
- };
1216
- if (o.begin < l) return {
1217
- rewritePosition: o.begin - 1
1218
- };
1219
- }
1220
- } else if (!n.showMaskOnHover && !n.showMaskOnFocus && !n.digitsOptional && n.digits > 0 && "" === this.__valueGet.call(this.el)) return {
1221
- rewritePosition: l
1222
- };
1223
- return {
1224
- rewritePosition: t
1225
- };
1226
- },
1227
- postValidation: function(e, t, i, a, n, r, o) {
1228
- if (!1 === a) return a;
1229
- if (o) return !0;
1230
- if (null !== n.min || null !== n.max) {
1231
- var s = n.onUnMask(e.slice().reverse().join(""), void 0, l.extend({}, n, {
1232
- unmaskAsNumber: !0
1233
- }));
1234
- if (null !== n.min && s < n.min && (s.toString().length > n.min.toString().length || s < 0)) return !1;
1235
- if (null !== n.max && s > n.max) return !!n.SetMaxOnOverflow && {
1236
- refreshFromBuffer: !0,
1237
- buffer: c(n.max.toString().replace(".", n.radixPoint).split(""), n.digits, n).reverse()
1238
- };
1239
- }
1240
- return a;
1241
- },
1242
- onUnMask: function(e, t, i) {
1243
- if ("" === t && !0 === i.nullable) return t;
1244
- var a = e.replace(i.prefix, "");
1245
- return a = (a = a.replace(i.suffix, "")).replace(new RegExp((0, r.default)(i.groupSeparator), "g"), ""),
1246
- "" !== i.placeholder.charAt(0) && (a = a.replace(new RegExp(i.placeholder.charAt(0), "g"), "0")),
1247
- i.unmaskAsNumber ? ("" !== i.radixPoint && -1 !== a.indexOf(i.radixPoint) && (a = a.replace(r.default.call(this, i.radixPoint), ".")),
1248
- a = (a = a.replace(new RegExp("^" + (0, r.default)(i.negationSymbol.front)), "-")).replace(new RegExp((0,
1249
- r.default)(i.negationSymbol.back) + "$"), ""), Number(a)) : a;
1250
- },
1251
- isComplete: function(e, t) {
1252
- var i = (t.numericInput ? e.slice().reverse() : e).join("");
1253
- return i = (i = (i = (i = (i = i.replace(new RegExp("^" + (0, r.default)(t.negationSymbol.front)), "-")).replace(new RegExp((0,
1254
- r.default)(t.negationSymbol.back) + "$"), "")).replace(t.prefix, "")).replace(t.suffix, "")).replace(new RegExp((0,
1255
- r.default)(t.groupSeparator) + "([0-9]{3})", "g"), "$1"), "," === t.radixPoint && (i = i.replace((0,
1256
- r.default)(t.radixPoint), ".")), isFinite(i);
1257
- },
1258
- onBeforeMask: function(e, t) {
1259
- var i = t.radixPoint || ",";
1260
- isFinite(t.digits) && (t.digits = parseInt(t.digits)), "number" != typeof e && "number" !== t.inputType || "" === i || (e = e.toString().replace(".", i));
1261
- var a = "-" === e.charAt(0) || e.charAt(0) === t.negationSymbol.front, n = e.split(i), o = n[0].replace(/[^\-0-9]/g, ""), s = n.length > 1 ? n[1].replace(/[^0-9]/g, "") : "", l = n.length > 1;
1262
- e = o + ("" !== s ? i + s : s);
1263
- var u = 0;
1264
- if ("" !== i && (u = t.digitsOptional ? t.digits < s.length ? t.digits : s.length : t.digits,
1265
- "" !== s || !t.digitsOptional)) {
1266
- var f = Math.pow(10, u || 1);
1267
- e = e.replace((0, r.default)(i), "."), isNaN(parseFloat(e)) || (e = (t.roundingFN(parseFloat(e) * f) / f).toFixed(u)),
1268
- e = e.toString().replace(".", i);
1269
- }
1270
- if (0 === t.digits && -1 !== e.indexOf(i) && (e = e.substring(0, e.indexOf(i))),
1271
- null !== t.min || null !== t.max) {
1272
- var d = e.toString().replace(i, ".");
1273
- null !== t.min && d < t.min ? e = t.min.toString().replace(".", i) : null !== t.max && d > t.max && (e = t.max.toString().replace(".", i));
1274
- }
1275
- return a && "-" !== e.charAt(0) && (e = "-" + e), c(e.toString().split(""), u, t, l).join("");
1276
- },
1277
- onBeforeWrite: function(e, t, i, a) {
1278
- function n(e, t) {
1279
- if (!1 !== a.__financeInput || t) {
1280
- var i = e.indexOf(a.radixPoint);
1281
- -1 !== i && e.splice(i, 1);
1282
- }
1283
- if ("" !== a.groupSeparator) for (;-1 !== (i = e.indexOf(a.groupSeparator)); ) e.splice(i, 1);
1284
- return e;
1285
- }
1286
- var o, s;
1287
- if (a.stripLeadingZeroes && (s = function(e, t) {
1288
- var i = new RegExp("(^" + ("" !== t.negationSymbol.front ? (0, r.default)(t.negationSymbol.front) + "?" : "") + (0,
1289
- r.default)(t.prefix) + ")(.*)(" + (0, r.default)(t.suffix) + ("" != t.negationSymbol.back ? (0,
1290
- r.default)(t.negationSymbol.back) + "?" : "") + "$)").exec(e.slice().reverse().join("")), a = i ? i[2] : "", n = !1;
1291
- return a && (a = a.split(t.radixPoint.charAt(0))[0], n = new RegExp("^[0" + t.groupSeparator + "]*").exec(a)),
1292
- !(!n || !(n[0].length > 1 || n[0].length > 0 && n[0].length < a.length)) && n;
1293
- }(t, a))) for (var u = t.join("").lastIndexOf(s[0].split("").reverse().join("")) - (s[0] == s.input ? 0 : 1), f = s[0] == s.input ? 1 : 0, d = s[0].length - f; d > 0; d--) delete this.maskset.validPositions[u + d],
1294
- delete t[u + d];
1295
- if (e) switch (e.type) {
1296
- case "blur":
1297
- case "checkval":
1298
- if (null !== a.min) {
1299
- var p = a.onUnMask(t.slice().reverse().join(""), void 0, l.extend({}, a, {
1300
- unmaskAsNumber: !0
1301
- }));
1302
- if (null !== a.min && p < a.min) return {
1303
- refreshFromBuffer: !0,
1304
- buffer: c(a.min.toString().replace(".", a.radixPoint).split(""), a.digits, a).reverse()
1305
- };
1306
- }
1307
- if (t[t.length - 1] === a.negationSymbol.front) {
1308
- var h = new RegExp("(^" + ("" != a.negationSymbol.front ? (0, r.default)(a.negationSymbol.front) + "?" : "") + (0,
1309
- r.default)(a.prefix) + ")(.*)(" + (0, r.default)(a.suffix) + ("" != a.negationSymbol.back ? (0,
1310
- r.default)(a.negationSymbol.back) + "?" : "") + "$)").exec(n(t.slice(), !0).reverse().join(""));
1311
- 0 == (h ? h[2] : "") && (o = {
1312
- refreshFromBuffer: !0,
1313
- buffer: [ 0 ]
1314
- });
1315
- } else if ("" !== a.radixPoint) {
1316
- t.indexOf(a.radixPoint) === a.suffix.length && (o && o.buffer ? o.buffer.splice(0, 1 + a.suffix.length) : (t.splice(0, 1 + a.suffix.length),
1317
- o = {
1318
- refreshFromBuffer: !0,
1319
- buffer: n(t)
1320
- }));
1321
- }
1322
- if (a.enforceDigitsOnBlur) {
1323
- var m = (o = o || {}) && o.buffer || t.slice().reverse();
1324
- o.refreshFromBuffer = !0, o.buffer = c(m, a.digits, a, !0).reverse();
1325
- }
1326
- }
1327
- return o;
1328
- },
1329
- onKeyDown: function(e, t, i, a) {
1330
- var r, o, s = l(this), u = String.fromCharCode(e.keyCode).toLowerCase();
1331
- if ((o = a.shortcuts && a.shortcuts[u]) && o.length > 1) return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) * parseInt(o)),
1332
- s.trigger("setvalue"), !1;
1333
- if (e.ctrlKey) switch (e.keyCode) {
1334
- case n.default.UP:
1335
- return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) + parseInt(a.step)),
1336
- s.trigger("setvalue"), !1;
1337
-
1338
- case n.default.DOWN:
1339
- return this.inputmask.__valueSet.call(this, parseFloat(this.inputmask.unmaskedvalue()) - parseInt(a.step)),
1340
- s.trigger("setvalue"), !1;
1341
- }
1342
- if (!e.shiftKey && (e.keyCode === n.default.DELETE || e.keyCode === n.default.BACKSPACE || e.keyCode === n.default.BACKSPACE_SAFARI) && i.begin !== t.length) {
1343
- if (t[e.keyCode === n.default.DELETE ? i.begin - 1 : i.end] === a.negationSymbol.front) return r = t.slice().reverse(),
1344
- "" !== a.negationSymbol.front && r.shift(), "" !== a.negationSymbol.back && r.pop(),
1345
- s.trigger("setvalue", [ r.join(""), i.begin ]), !1;
1346
- if (!0 === a._radixDance) {
1347
- var f = t.indexOf(a.radixPoint);
1348
- if (a.digitsOptional) {
1349
- if (0 === f) return (r = t.slice().reverse()).pop(), s.trigger("setvalue", [ r.join(""), i.begin >= r.length ? r.length : i.begin ]),
1350
- !1;
1351
- } else if (-1 !== f && (i.begin < f || i.end < f || e.keyCode === n.default.DELETE && i.begin === f)) return i.begin !== i.end || e.keyCode !== n.default.BACKSPACE && e.keyCode !== n.default.BACKSPACE_SAFARI || i.begin++,
1352
- (r = t.slice().reverse()).splice(r.length - i.begin, i.begin - i.end + 1), r = c(r, a.digits, a).join(""),
1353
- s.trigger("setvalue", [ r, i.begin >= r.length ? f + 1 : i.begin ]), !1;
1354
- }
1355
- }
1356
- }
1357
- },
1358
- currency: {
1359
- prefix: "",
1360
- groupSeparator: ",",
1361
- alias: "numeric",
1362
- digits: 2,
1363
- digitsOptional: !1
1364
- },
1365
- decimal: {
1366
- alias: "numeric"
1367
- },
1368
- integer: {
1369
- alias: "numeric",
1370
- inputmode: "numeric",
1371
- digits: 0
1372
- },
1373
- percentage: {
1374
- alias: "numeric",
1375
- min: 0,
1376
- max: 100,
1377
- suffix: " %",
1378
- digits: 0,
1379
- allowMinus: !1
1380
- },
1381
- indianns: {
1382
- alias: "numeric",
1383
- _mask: function(e) {
1384
- return "(" + e.groupSeparator + "99){*|1}(" + e.groupSeparator + "999){1|1}";
1385
- },
1386
- groupSeparator: ",",
1387
- radixPoint: ".",
1388
- placeholder: "0",
1389
- digits: 2,
1390
- digitsOptional: !1
1391
- }
1392
- });
1393
- },
1394
- 9380: function(e, t, i) {
1395
- var a;
1396
- Object.defineProperty(t, "__esModule", {
1397
- value: !0
1398
- }), t.default = void 0;
1399
- var n = ((a = i(8741)) && a.__esModule ? a : {
1400
- default: a
1401
- }).default ? window : {};
1402
- t.default = n;
1403
- },
1404
- 7760: function(e, t, i) {
1405
- Object.defineProperty(t, "__esModule", {
1406
- value: !0
1407
- }), t.HandleNativePlaceholder = function(e, t) {
1408
- var i = e ? e.inputmask : this;
1409
- if (l.ie) {
1410
- if (e.inputmask._valueGet() !== t && (e.placeholder !== t || "" === e.placeholder)) {
1411
- var a = o.getBuffer.call(i).slice(), n = e.inputmask._valueGet();
1412
- if (n !== t) {
1413
- var r = o.getLastValidPosition.call(i);
1414
- -1 === r && n === o.getBufferTemplate.call(i).join("") ? a = [] : -1 !== r && f.call(i, a),
1415
- p(e, a);
1416
- }
1417
- }
1418
- } else e.placeholder !== t && (e.placeholder = t, "" === e.placeholder && e.removeAttribute("placeholder"));
1419
- }, t.applyInputValue = c, t.checkVal = d, t.clearOptionalTail = f, t.unmaskedvalue = function(e) {
1420
- var t = e ? e.inputmask : this, i = t.opts, a = t.maskset;
1421
- if (e) {
1422
- if (void 0 === e.inputmask) return e.value;
1423
- e.inputmask && e.inputmask.refreshValue && c(e, e.inputmask._valueGet(!0));
1424
- }
1425
- var n = [], r = a.validPositions;
1426
- for (var s in r) r[s] && r[s].match && (1 != r[s].match.static || Array.isArray(a.metadata) && !0 !== r[s].generatedInput) && n.push(r[s].input);
1427
- var l = 0 === n.length ? "" : (t.isRTL ? n.reverse() : n).join("");
1428
- if ("function" == typeof i.onUnMask) {
1429
- var u = (t.isRTL ? o.getBuffer.call(t).slice().reverse() : o.getBuffer.call(t)).join("");
1430
- l = i.onUnMask.call(t, u, l, i);
1431
- }
1432
- return l;
1433
- }, t.writeBuffer = p;
1434
- var a, n = (a = i(5581)) && a.__esModule ? a : {
1435
- default: a
1436
- }, r = i(4713), o = i(8711), s = i(7215), l = i(9845), u = i(6030);
1437
- function c(e, t) {
1438
- var i = e ? e.inputmask : this, a = i.opts;
1439
- e.inputmask.refreshValue = !1, "function" == typeof a.onBeforeMask && (t = a.onBeforeMask.call(i, t, a) || t),
1440
- d(e, !0, !1, t = t.toString().split("")), i.undoValue = i._valueGet(!0), (a.clearMaskOnLostFocus || a.clearIncomplete) && e.inputmask._valueGet() === o.getBufferTemplate.call(i).join("") && -1 === o.getLastValidPosition.call(i) && e.inputmask._valueSet("");
1441
- }
1442
- function f(e) {
1443
- e.length = 0;
1444
- for (var t, i = r.getMaskTemplate.call(this, !0, 0, !0, void 0, !0); void 0 !== (t = i.shift()); ) e.push(t);
1445
- return e;
1446
- }
1447
- function d(e, t, i, a, n) {
1448
- var l = e ? e.inputmask : this, c = l.maskset, f = l.opts, d = l.dependencyLib, h = a.slice(), m = "", v = -1, g = void 0, k = f.skipOptionalPartCharacter;
1449
- f.skipOptionalPartCharacter = "", o.resetMaskSet.call(l), c.tests = {}, v = f.radixPoint ? o.determineNewCaretPosition.call(l, {
1450
- begin: 0,
1451
- end: 0
1452
- }, !1, !1 === f.__financeInput ? "radixFocus" : void 0).begin : 0, c.p = v, l.caretPos = {
1453
- begin: v
1454
- };
1455
- var y = [], b = l.caretPos;
1456
- if (h.forEach((function(e, t) {
1457
- if (void 0 !== e) {
1458
- var a = new d.Event("_checkval");
1459
- a.keyCode = e.toString().charCodeAt(0), m += e;
1460
- var n = o.getLastValidPosition.call(l, void 0, !0);
1461
- !function(e, t) {
1462
- for (var i = r.getMaskTemplate.call(l, !0, 0).slice(e, o.seekNext.call(l, e, !1, !1)).join("").replace(/'/g, ""), a = i.indexOf(t); a > 0 && " " === i[a - 1]; ) a--;
1463
- var n = 0 === a && !o.isMask.call(l, e) && (r.getTest.call(l, e).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(l, e).match.static && r.getTest.call(l, e).match.nativeDef === "'" + t.charAt(0) || " " === r.getTest.call(l, e).match.nativeDef && (r.getTest.call(l, e + 1).match.nativeDef === t.charAt(0) || !0 === r.getTest.call(l, e + 1).match.static && r.getTest.call(l, e + 1).match.nativeDef === "'" + t.charAt(0)));
1464
- if (!n && a > 0 && !o.isMask.call(l, e, !1, !0)) {
1465
- var s = o.seekNext.call(l, e);
1466
- l.caretPos.begin < s && (l.caretPos = {
1467
- begin: s
1468
- });
1469
- }
1470
- return n;
1471
- }(v, m) ? (g = u.EventHandlers.keypressEvent.call(l, a, !0, !1, i, l.caretPos.begin)) && (v = l.caretPos.begin + 1,
1472
- m = "") : g = u.EventHandlers.keypressEvent.call(l, a, !0, !1, i, n + 1), g ? (void 0 !== g.pos && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static && void 0 === c.validPositions[g.pos].alternation && (y.push(g.pos),
1473
- l.isRTL || (g.forwardPosition = g.pos + 1)), p.call(l, void 0, o.getBuffer.call(l), g.forwardPosition, a, !1),
1474
- l.caretPos = {
1475
- begin: g.forwardPosition,
1476
- end: g.forwardPosition
1477
- }, b = l.caretPos) : void 0 === c.validPositions[t] && h[t] === r.getPlaceholder.call(l, t) && o.isMask.call(l, t, !0) ? l.caretPos.begin++ : l.caretPos = b;
1478
- }
1479
- })), y.length > 0) {
1480
- var x, P, E = o.seekNext.call(l, -1, void 0, !1);
1481
- if (!s.isComplete.call(l, o.getBuffer.call(l)) && y.length <= E || s.isComplete.call(l, o.getBuffer.call(l)) && y.length > 0 && y.length !== E && 0 === y[0]) for (var S = E; void 0 !== (x = y.shift()); ) {
1482
- var w = new d.Event("_checkval");
1483
- if ((P = c.validPositions[x]).generatedInput = !0, w.keyCode = P.input.charCodeAt(0),
1484
- (g = u.EventHandlers.keypressEvent.call(l, w, !0, !1, i, S)) && void 0 !== g.pos && g.pos !== x && c.validPositions[g.pos] && !0 === c.validPositions[g.pos].match.static) y.push(g.pos); else if (!g) break;
1485
- S++;
1486
- }
1487
- }
1488
- t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type && l.undoValue !== o.getBuffer.call(l).join("") || "paste" === n.type)),
1489
- f.skipOptionalPartCharacter = k;
1490
- }
1491
- function p(e, t, i, a, r) {
1492
- var l = e ? e.inputmask : this, u = l.opts, c = l.dependencyLib;
1493
- if (a && "function" == typeof u.onBeforeWrite) {
1494
- var f = u.onBeforeWrite.call(l, a, t, i, u);
1495
- if (f) {
1496
- if (f.refreshFromBuffer) {
1497
- var d = f.refreshFromBuffer;
1498
- s.refreshFromBuffer.call(l, !0 === d ? d : d.start, d.end, f.buffer || t), t = o.getBuffer.call(l, !0);
1499
- }
1500
- void 0 !== i && (i = void 0 !== f.caret ? f.caret : i);
1501
- }
1502
- }
1503
- if (void 0 !== e && (e.inputmask._valueSet(t.join("")), void 0 === i || void 0 !== a && "blur" === a.type || o.caret.call(l, e, i, void 0, void 0, void 0 !== a && "keydown" === a.type && (a.keyCode === n.default.DELETE || a.keyCode === n.default.BACKSPACE)),
1504
- !0 === r)) {
1505
- var p = c(e), h = e.inputmask._valueGet();
1506
- e.inputmask.skipInputEvent = !0, p.trigger("input"), setTimeout((function() {
1507
- h === o.getBufferTemplate.call(l).join("") ? p.trigger("cleared") : !0 === s.isComplete.call(l, t) && p.trigger("complete");
1508
- }), 0);
1509
- }
1510
- }
1511
- },
1512
- 2394: function(e, t, i) {
1513
- Object.defineProperty(t, "__esModule", {
1514
- value: !0
1515
- }), t.default = void 0, i(7149), i(3194);
1516
- var a = i(157), n = v(i(3287)), r = v(i(9380)), o = i(2391), s = i(4713), l = i(8711), u = i(7215), c = i(7760), f = i(9716), d = v(i(7392)), p = v(i(3976)), h = v(i(8741));
1517
- function m(e) {
1518
- return m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1519
- return typeof e;
1520
- } : function(e) {
1521
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1522
- }, m(e);
1523
- }
1524
- function v(e) {
1525
- return e && e.__esModule ? e : {
1526
- default: e
1527
- };
1528
- }
1529
- var g = r.default.document, k = "_inputmask_opts";
1530
- function y(e, t, i) {
1531
- if (h.default) {
1532
- if (!(this instanceof y)) return new y(e, t, i);
1533
- this.dependencyLib = n.default, this.el = void 0, this.events = {}, this.maskset = void 0,
1534
- !0 !== i && ("[object Object]" === Object.prototype.toString.call(e) ? t = e : (t = t || {},
1535
- e && (t.alias = e)), this.opts = n.default.extend(!0, {}, this.defaults, t), this.noMasksCache = t && void 0 !== t.definitions,
1536
- this.userOptions = t || {}, b(this.opts.alias, t, this.opts)), this.refreshValue = !1,
1537
- this.undoValue = void 0, this.$el = void 0, this.skipKeyPressEvent = !1, this.skipInputEvent = !1,
1538
- this.validationEvent = !1, this.ignorable = !1, this.maxLength, this.mouseEnter = !1,
1539
- this.originalPlaceholder = void 0, this.isComposing = !1;
1540
- }
1541
- }
1542
- function b(e, t, i) {
1543
- var a = y.prototype.aliases[e];
1544
- return a ? (a.alias && b(a.alias, void 0, i), n.default.extend(!0, i, a), n.default.extend(!0, i, t),
1545
- !0) : (null === i.mask && (i.mask = e), !1);
1546
- }
1547
- y.prototype = {
1548
- dataAttribute: "data-inputmask",
1549
- defaults: p.default,
1550
- definitions: d.default,
1551
- aliases: {},
1552
- masksCache: {},
1553
- get isRTL() {
1554
- return this.opts.isRTL || this.opts.numericInput;
1555
- },
1556
- mask: function(e) {
1557
- var t = this;
1558
- return "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)),
1559
- (e = e.nodeName ? [ e ] : Array.isArray(e) ? e : Array.from(e)).forEach((function(e, i) {
1560
- var s = n.default.extend(!0, {}, t.opts);
1561
- if (function(e, t, i, a) {
1562
- function o(t, n) {
1563
- var o = "" === a ? t : a + "-" + t;
1564
- null !== (n = void 0 !== n ? n : e.getAttribute(o)) && ("string" == typeof n && (0 === t.indexOf("on") ? n = r.default[n] : "false" === n ? n = !1 : "true" === n && (n = !0)),
1565
- i[t] = n);
1566
- }
1567
- if (!0 === t.importDataAttributes) {
1568
- var s, l, u, c, f = e.getAttribute(a);
1569
- if (f && "" !== f && (f = f.replace(/'/g, '"'), l = JSON.parse("{" + f + "}")),
1570
- l) for (c in u = void 0, l) if ("alias" === c.toLowerCase()) {
1571
- u = l[c];
1572
- break;
1573
- }
1574
- for (s in o("alias", u), i.alias && b(i.alias, i, t), t) {
1575
- if (l) for (c in u = void 0, l) if (c.toLowerCase() === s.toLowerCase()) {
1576
- u = l[c];
1577
- break;
1578
- }
1579
- o(s, u);
1580
- }
1581
- }
1582
- n.default.extend(!0, t, i), ("rtl" === e.dir || t.rightAlign) && (e.style.textAlign = "right");
1583
- ("rtl" === e.dir || t.numericInput) && (e.dir = "ltr", e.removeAttribute("dir"),
1584
- t.isRTL = !0);
1585
- return Object.keys(i).length;
1586
- }(e, s, n.default.extend(!0, {}, t.userOptions), t.dataAttribute)) {
1587
- var l = (0, o.generateMaskSet)(s, t.noMasksCache);
1588
- void 0 !== l && (void 0 !== e.inputmask && (e.inputmask.opts.autoUnmask = !0, e.inputmask.remove()),
1589
- e.inputmask = new y(void 0, void 0, !0), e.inputmask.opts = s, e.inputmask.noMasksCache = t.noMasksCache,
1590
- e.inputmask.userOptions = n.default.extend(!0, {}, t.userOptions), e.inputmask.el = e,
1591
- e.inputmask.$el = (0, n.default)(e), e.inputmask.maskset = l, n.default.data(e, k, t.userOptions),
1592
- a.mask.call(e.inputmask));
1593
- }
1594
- })), e && e[0] && e[0].inputmask || this;
1595
- },
1596
- option: function(e, t) {
1597
- return "string" == typeof e ? this.opts[e] : "object" === m(e) ? (n.default.extend(this.userOptions, e),
1598
- this.el && !0 !== t && this.mask(this.el), this) : void 0;
1599
- },
1600
- unmaskedvalue: function(e) {
1601
- if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1602
- void 0 === this.el || void 0 !== e) {
1603
- var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
1604
- c.checkVal.call(this, void 0, !1, !1, t), "function" == typeof this.opts.onBeforeWrite && this.opts.onBeforeWrite.call(this, void 0, l.getBuffer.call(this), 0, this.opts);
1605
- }
1606
- return c.unmaskedvalue.call(this, this.el);
1607
- },
1608
- remove: function() {
1609
- if (this.el) {
1610
- n.default.data(this.el, k, null);
1611
- var e = this.opts.autoUnmask ? (0, c.unmaskedvalue)(this.el) : this._valueGet(this.opts.autoUnmask);
1612
- e !== l.getBufferTemplate.call(this).join("") ? this._valueSet(e, this.opts.autoUnmask) : this._valueSet(""),
1613
- f.EventRuler.off(this.el), Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el), "value") && this.__valueGet && Object.defineProperty(this.el, "value", {
1614
- get: this.__valueGet,
1615
- set: this.__valueSet,
1616
- configurable: !0
1617
- }) : g.__lookupGetter__ && this.el.__lookupGetter__("value") && this.__valueGet && (this.el.__defineGetter__("value", this.__valueGet),
1618
- this.el.__defineSetter__("value", this.__valueSet)), this.el.inputmask = void 0;
1619
- }
1620
- return this.el;
1621
- },
1622
- getemptymask: function() {
1623
- return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1624
- l.getBufferTemplate.call(this).join("");
1625
- },
1626
- hasMaskedValue: function() {
1627
- return !this.opts.autoUnmask;
1628
- },
1629
- isComplete: function() {
1630
- return this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1631
- u.isComplete.call(this, l.getBuffer.call(this));
1632
- },
1633
- getmetadata: function() {
1634
- if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1635
- Array.isArray(this.maskset.metadata)) {
1636
- var e = s.getMaskTemplate.call(this, !0, 0, !1).join("");
1637
- return this.maskset.metadata.forEach((function(t) {
1638
- return t.mask !== e || (e = t, !1);
1639
- })), e;
1640
- }
1641
- return this.maskset.metadata;
1642
- },
1643
- isValid: function(e) {
1644
- if (this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache),
1645
- e) {
1646
- var t = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
1647
- c.checkVal.call(this, void 0, !0, !1, t);
1648
- } else e = this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join("");
1649
- for (var i = l.getBuffer.call(this), a = l.determineLastRequiredPosition.call(this), n = i.length - 1; n > a && !l.isMask.call(this, n); n--) ;
1650
- return i.splice(a, n + 1 - a), u.isComplete.call(this, i) && e === (this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join(""));
1651
- },
1652
- format: function(e, t) {
1653
- this.maskset = this.maskset || (0, o.generateMaskSet)(this.opts, this.noMasksCache);
1654
- var i = ("function" == typeof this.opts.onBeforeMask && this.opts.onBeforeMask.call(this, e, this.opts) || e).split("");
1655
- c.checkVal.call(this, void 0, !0, !1, i);
1656
- var a = this.isRTL ? l.getBuffer.call(this).slice().reverse().join("") : l.getBuffer.call(this).join("");
1657
- return t ? {
1658
- value: a,
1659
- metadata: this.getmetadata()
1660
- } : a;
1661
- },
1662
- setValue: function(e) {
1663
- this.el && (0, n.default)(this.el).trigger("setvalue", [ e ]);
1664
- },
1665
- analyseMask: o.analyseMask
1666
- }, y.extendDefaults = function(e) {
1667
- n.default.extend(!0, y.prototype.defaults, e);
1668
- }, y.extendDefinitions = function(e) {
1669
- n.default.extend(!0, y.prototype.definitions, e);
1670
- }, y.extendAliases = function(e) {
1671
- n.default.extend(!0, y.prototype.aliases, e);
1672
- }, y.format = function(e, t, i) {
1673
- return y(t).format(e, i);
1674
- }, y.unmask = function(e, t) {
1675
- return y(t).unmaskedvalue(e);
1676
- }, y.isValid = function(e, t) {
1677
- return y(t).isValid(e);
1678
- }, y.remove = function(e) {
1679
- "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
1680
- e.inputmask && e.inputmask.remove();
1681
- }));
1682
- }, y.setValue = function(e, t) {
1683
- "string" == typeof e && (e = g.getElementById(e) || g.querySelectorAll(e)), (e = e.nodeName ? [ e ] : e).forEach((function(e) {
1684
- e.inputmask ? e.inputmask.setValue(t) : (0, n.default)(e).trigger("setvalue", [ t ]);
1685
- }));
1686
- }, y.dependencyLib = n.default, r.default.Inputmask = y;
1687
- var x = y;
1688
- t.default = x;
1689
- },
1690
- 5296: function(e, t, i) {
1691
- function a(e) {
1692
- return a = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1693
- return typeof e;
1694
- } : function(e) {
1695
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1696
- }, a(e);
1697
- }
1698
- var n = h(i(9380)), r = h(i(2394)), o = h(i(8741));
1699
- function s(e, t) {
1700
- for (var i = 0; i < t.length; i++) {
1701
- var a = t[i];
1702
- a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0),
1703
- Object.defineProperty(e, a.key, a);
1704
- }
1705
- }
1706
- function l(e, t) {
1707
- if (t && ("object" === a(t) || "function" == typeof t)) return t;
1708
- if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
1709
- return function(e) {
1710
- if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1711
- return e;
1712
- }(e);
1713
- }
1714
- function u(e) {
1715
- var t = "function" == typeof Map ? new Map : void 0;
1716
- return u = function(e) {
1717
- if (null === e || (i = e, -1 === Function.toString.call(i).indexOf("[native code]"))) return e;
1718
- var i;
1719
- if ("function" != typeof e) throw new TypeError("Super expression must either be null or a function");
1720
- if (void 0 !== t) {
1721
- if (t.has(e)) return t.get(e);
1722
- t.set(e, a);
1723
- }
1724
- function a() {
1725
- return c(e, arguments, p(this).constructor);
1726
- }
1727
- return a.prototype = Object.create(e.prototype, {
1728
- constructor: {
1729
- value: a,
1730
- enumerable: !1,
1731
- writable: !0,
1732
- configurable: !0
1733
- }
1734
- }), d(a, e);
1735
- }, u(e);
1736
- }
1737
- function c(e, t, i) {
1738
- return c = f() ? Reflect.construct : function(e, t, i) {
1739
- var a = [ null ];
1740
- a.push.apply(a, t);
1741
- var n = new (Function.bind.apply(e, a));
1742
- return i && d(n, i.prototype), n;
1743
- }, c.apply(null, arguments);
1744
- }
1745
- function f() {
1746
- if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
1747
- if (Reflect.construct.sham) return !1;
1748
- if ("function" == typeof Proxy) return !0;
1749
- try {
1750
- return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {}))),
1751
- !0;
1752
- } catch (e) {
1753
- return !1;
1754
- }
1755
- }
1756
- function d(e, t) {
1757
- return d = Object.setPrototypeOf || function(e, t) {
1758
- return e.__proto__ = t, e;
1759
- }, d(e, t);
1760
- }
1761
- function p(e) {
1762
- return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
1763
- return e.__proto__ || Object.getPrototypeOf(e);
1764
- }, p(e);
1765
- }
1766
- function h(e) {
1767
- return e && e.__esModule ? e : {
1768
- default: e
1769
- };
1770
- }
1771
- var m = n.default.document;
1772
- if (o.default && m && m.head && m.head.attachShadow && n.default.customElements && void 0 === n.default.customElements.get("input-mask")) {
1773
- var v = function(e) {
1774
- !function(e, t) {
1775
- if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
1776
- Object.defineProperty(e, "prototype", {
1777
- value: Object.create(t && t.prototype, {
1778
- constructor: {
1779
- value: e,
1780
- writable: !0,
1781
- configurable: !0
1782
- }
1783
- }),
1784
- writable: !1
1785
- }), t && d(e, t);
1786
- }(c, e);
1787
- var t, i, a, n, o, u = (t = c, i = f(), function() {
1788
- var e, a = p(t);
1789
- if (i) {
1790
- var n = p(this).constructor;
1791
- e = Reflect.construct(a, arguments, n);
1792
- } else e = a.apply(this, arguments);
1793
- return l(this, e);
1794
- });
1795
- function c() {
1796
- var e;
1797
- !function(e, t) {
1798
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
1799
- }(this, c);
1800
- var t = (e = u.call(this)).getAttributeNames(), i = e.attachShadow({
1801
- mode: "closed"
1802
- }), a = m.createElement("input");
1803
- for (var n in a.type = "text", i.appendChild(a), t) Object.prototype.hasOwnProperty.call(t, n) && a.setAttribute(t[n], e.getAttribute(t[n]));
1804
- var o = new r.default;
1805
- return o.dataAttribute = "", o.mask(a), a.inputmask.shadowRoot = i, e;
1806
- }
1807
- return a = c, n && s(a.prototype, n), o && s(a, o), Object.defineProperty(a, "prototype", {
1808
- writable: !1
1809
- }), a;
1810
- }(u(HTMLElement));
1811
- n.default.customElements.define("input-mask", v);
1812
- }
1813
- },
1814
- 443: function(e, t, i) {
1815
- var a = o(i(2047)), n = o(i(2394));
1816
- function r(e) {
1817
- return r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
1818
- return typeof e;
1819
- } : function(e) {
1820
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1821
- }, r(e);
1822
- }
1823
- function o(e) {
1824
- return e && e.__esModule ? e : {
1825
- default: e
1826
- };
1827
- }
1828
- void 0 === a.default.fn.inputmask && (a.default.fn.inputmask = function(e, t) {
1829
- var i, o = this[0];
1830
- if (void 0 === t && (t = {}), "string" == typeof e) switch (e) {
1831
- case "unmaskedvalue":
1832
- return o && o.inputmask ? o.inputmask.unmaskedvalue() : (0, a.default)(o).val();
1833
-
1834
- case "remove":
1835
- return this.each((function() {
1836
- this.inputmask && this.inputmask.remove();
1837
- }));
1838
-
1839
- case "getemptymask":
1840
- return o && o.inputmask ? o.inputmask.getemptymask() : "";
1841
-
1842
- case "hasMaskedValue":
1843
- return !(!o || !o.inputmask) && o.inputmask.hasMaskedValue();
1844
-
1845
- case "isComplete":
1846
- return !o || !o.inputmask || o.inputmask.isComplete();
1847
-
1848
- case "getmetadata":
1849
- return o && o.inputmask ? o.inputmask.getmetadata() : void 0;
1850
-
1851
- case "setvalue":
1852
- n.default.setValue(o, t);
1853
- break;
1854
-
1855
- case "option":
1856
- if ("string" != typeof t) return this.each((function() {
1857
- if (void 0 !== this.inputmask) return this.inputmask.option(t);
1858
- }));
1859
- if (o && void 0 !== o.inputmask) return o.inputmask.option(t);
1860
- break;
1861
-
1862
- default:
1863
- return t.alias = e, i = new n.default(t), this.each((function() {
1864
- i.mask(this);
1865
- }));
1866
- } else {
1867
- if (Array.isArray(e)) return t.alias = e, i = new n.default(t), this.each((function() {
1868
- i.mask(this);
1869
- }));
1870
- if ("object" == r(e)) return i = new n.default(e), void 0 === e.mask && void 0 === e.alias ? this.each((function() {
1871
- if (void 0 !== this.inputmask) return this.inputmask.option(e);
1872
- i.mask(this);
1873
- })) : this.each((function() {
1874
- i.mask(this);
1875
- }));
1876
- if (void 0 === e) return this.each((function() {
1877
- (i = new n.default(t)).mask(this);
1878
- }));
1879
- }
1880
- });
1881
- },
1882
- 2391: function(e, t, i) {
1883
- Object.defineProperty(t, "__esModule", {
1884
- value: !0
1885
- }), t.analyseMask = function(e, t, i) {
1886
- var a, o, s, l, u, c, f = /(?:[?*+]|\{[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, p = !1, h = new n.default, m = [], v = [], g = !1;
1887
- function k(e, a, n) {
1888
- n = void 0 !== n ? n : e.matches.length;
1889
- var o = e.matches[n - 1];
1890
- if (t) 0 === a.indexOf("[") || p && /\\d|\\s|\\w/i.test(a) || "." === a ? e.matches.splice(n++, 0, {
1891
- fn: new RegExp(a, i.casing ? "i" : ""),
1892
- static: !1,
1893
- optionality: !1,
1894
- newBlockMarker: void 0 === o ? "master" : o.def !== a,
1895
- casing: null,
1896
- def: a,
1897
- placeholder: void 0,
1898
- nativeDef: a
1899
- }) : (p && (a = a[a.length - 1]), a.split("").forEach((function(t, a) {
1900
- o = e.matches[n - 1], e.matches.splice(n++, 0, {
1901
- fn: /[a-z]/i.test(i.staticDefinitionSymbol || t) ? new RegExp("[" + (i.staticDefinitionSymbol || t) + "]", i.casing ? "i" : "") : null,
1902
- static: !0,
1903
- optionality: !1,
1904
- newBlockMarker: void 0 === o ? "master" : o.def !== t && !0 !== o.static,
1905
- casing: null,
1906
- def: i.staticDefinitionSymbol || t,
1907
- placeholder: void 0 !== i.staticDefinitionSymbol ? t : void 0,
1908
- nativeDef: (p ? "'" : "") + t
1909
- });
1910
- }))), p = !1; else {
1911
- var s = i.definitions && i.definitions[a] || i.usePrototypeDefinitions && r.default.prototype.definitions[a];
1912
- s && !p ? e.matches.splice(n++, 0, {
1913
- fn: s.validator ? "string" == typeof s.validator ? new RegExp(s.validator, i.casing ? "i" : "") : new function() {
1914
- this.test = s.validator;
1915
- } : new RegExp("."),
1916
- static: s.static || !1,
1917
- optionality: s.optional || !1,
1918
- newBlockMarker: void 0 === o || s.optional ? "master" : o.def !== (s.definitionSymbol || a),
1919
- casing: s.casing,
1920
- def: s.definitionSymbol || a,
1921
- placeholder: s.placeholder,
1922
- nativeDef: a,
1923
- generated: s.generated
1924
- }) : (e.matches.splice(n++, 0, {
1925
- fn: /[a-z]/i.test(i.staticDefinitionSymbol || a) ? new RegExp("[" + (i.staticDefinitionSymbol || a) + "]", i.casing ? "i" : "") : null,
1926
- static: !0,
1927
- optionality: !1,
1928
- newBlockMarker: void 0 === o ? "master" : o.def !== a && !0 !== o.static,
1929
- casing: null,
1930
- def: i.staticDefinitionSymbol || a,
1931
- placeholder: void 0 !== i.staticDefinitionSymbol ? a : void 0,
1932
- nativeDef: (p ? "'" : "") + a
1933
- }), p = !1);
1934
- }
1935
- }
1936
- function y() {
1937
- if (m.length > 0) {
1938
- if (k(l = m[m.length - 1], o), l.isAlternator) {
1939
- u = m.pop();
1940
- for (var e = 0; e < u.matches.length; e++) u.matches[e].isGroup && (u.matches[e].isGroup = !1);
1941
- m.length > 0 ? (l = m[m.length - 1]).matches.push(u) : h.matches.push(u);
1942
- }
1943
- } else k(h, o);
1944
- }
1945
- function b(e) {
1946
- var t = new n.default(!0);
1947
- return t.openGroup = !1, t.matches = e, t;
1948
- }
1949
- function x() {
1950
- if ((s = m.pop()).openGroup = !1, void 0 !== s) if (m.length > 0) {
1951
- if ((l = m[m.length - 1]).matches.push(s), l.isAlternator) {
1952
- for (var e = (u = m.pop()).matches[0].matches ? u.matches[0].matches.length : 1, t = 0; t < u.matches.length; t++) u.matches[t].isGroup = !1,
1953
- u.matches[t].alternatorGroup = !1, null === i.keepStatic && e < (u.matches[t].matches ? u.matches[t].matches.length : 1) && (i.keepStatic = !0),
1954
- e = u.matches[t].matches ? u.matches[t].matches.length : 1;
1955
- m.length > 0 ? (l = m[m.length - 1]).matches.push(u) : h.matches.push(u);
1956
- }
1957
- } else h.matches.push(s); else y();
1958
- }
1959
- function P(e) {
1960
- var t = e.pop();
1961
- return t.isQuantifier && (t = b([ e.pop(), t ])), t;
1962
- }
1963
- t && (i.optionalmarker[0] = void 0, i.optionalmarker[1] = void 0);
1964
- for (;a = t ? d.exec(e) : f.exec(e); ) {
1965
- if (o = a[0], t) {
1966
- switch (o.charAt(0)) {
1967
- case "?":
1968
- o = "{0,1}";
1969
- break;
1970
-
1971
- case "+":
1972
- case "*":
1973
- o = "{" + o + "}";
1974
- break;
1975
-
1976
- case "|":
1977
- if (0 === m.length) {
1978
- var E = b(h.matches);
1979
- E.openGroup = !0, m.push(E), h.matches = [], g = !0;
1980
- }
1981
- }
1982
- if ("\\d" === o) o = "[0-9]";
1983
- }
1984
- if (p) y(); else switch (o.charAt(0)) {
1985
- case "$":
1986
- case "^":
1987
- t || y();
1988
- break;
1989
-
1990
- case i.escapeChar:
1991
- p = !0, t && y();
1992
- break;
1993
-
1994
- case i.optionalmarker[1]:
1995
- case i.groupmarker[1]:
1996
- x();
1997
- break;
1998
-
1999
- case i.optionalmarker[0]:
2000
- m.push(new n.default(!1, !0));
2001
- break;
2002
-
2003
- case i.groupmarker[0]:
2004
- m.push(new n.default(!0));
2005
- break;
2006
-
2007
- case i.quantifiermarker[0]:
2008
- var S = new n.default(!1, !1, !0), w = (o = o.replace(/[{}?]/g, "")).split("|"), _ = w[0].split(","), M = isNaN(_[0]) ? _[0] : parseInt(_[0]), O = 1 === _.length ? M : isNaN(_[1]) ? _[1] : parseInt(_[1]), T = isNaN(w[1]) ? w[1] : parseInt(w[1]);
2009
- "*" !== M && "+" !== M || (M = "*" === O ? 0 : 1), S.quantifier = {
2010
- min: M,
2011
- max: O,
2012
- jit: T
2013
- };
2014
- var A = m.length > 0 ? m[m.length - 1].matches : h.matches;
2015
- if ((a = A.pop()).isAlternator) {
2016
- A.push(a), A = a.matches;
2017
- var C = new n.default(!0), D = A.pop();
2018
- A.push(C), A = C.matches, a = D;
2019
- }
2020
- a.isGroup || (a = b([ a ])), A.push(a), A.push(S);
2021
- break;
2022
-
2023
- case i.alternatormarker:
2024
- if (m.length > 0) {
2025
- var j = (l = m[m.length - 1]).matches[l.matches.length - 1];
2026
- c = l.openGroup && (void 0 === j.matches || !1 === j.isGroup && !1 === j.isAlternator) ? m.pop() : P(l.matches);
2027
- } else c = P(h.matches);
2028
- if (c.isAlternator) m.push(c); else if (c.alternatorGroup ? (u = m.pop(), c.alternatorGroup = !1) : u = new n.default(!1, !1, !1, !0),
2029
- u.matches.push(c), m.push(u), c.openGroup) {
2030
- c.openGroup = !1;
2031
- var B = new n.default(!0);
2032
- B.alternatorGroup = !0, m.push(B);
2033
- }
2034
- break;
2035
-
2036
- default:
2037
- y();
2038
- }
2039
- }
2040
- g && x();
2041
- for (;m.length > 0; ) s = m.pop(), h.matches.push(s);
2042
- h.matches.length > 0 && (!function e(a) {
2043
- a && a.matches && a.matches.forEach((function(n, r) {
2044
- var o = a.matches[r + 1];
2045
- (void 0 === o || void 0 === o.matches || !1 === o.isQuantifier) && n && n.isGroup && (n.isGroup = !1,
2046
- t || (k(n, i.groupmarker[0], 0), !0 !== n.openGroup && k(n, i.groupmarker[1]))),
2047
- e(n);
2048
- }));
2049
- }(h), v.push(h));
2050
- (i.numericInput || i.isRTL) && function e(t) {
2051
- for (var a in t.matches = t.matches.reverse(), t.matches) if (Object.prototype.hasOwnProperty.call(t.matches, a)) {
2052
- var n = parseInt(a);
2053
- if (t.matches[a].isQuantifier && t.matches[n + 1] && t.matches[n + 1].isGroup) {
2054
- var r = t.matches[a];
2055
- t.matches.splice(a, 1), t.matches.splice(n + 1, 0, r);
2056
- }
2057
- void 0 !== t.matches[a].matches ? t.matches[a] = e(t.matches[a]) : t.matches[a] = ((o = t.matches[a]) === i.optionalmarker[0] ? o = i.optionalmarker[1] : o === i.optionalmarker[1] ? o = i.optionalmarker[0] : o === i.groupmarker[0] ? o = i.groupmarker[1] : o === i.groupmarker[1] && (o = i.groupmarker[0]),
2058
- o);
2059
- }
2060
- var o;
2061
- return t;
2062
- }(v[0]);
2063
- return v;
2064
- }, t.generateMaskSet = function(e, t) {
2065
- var i;
2066
- function n(e, i, n) {
2067
- var o, s, l = !1;
2068
- if (null !== e && "" !== e || ((l = null !== n.regex) ? e = (e = n.regex).replace(/^(\^)(.*)(\$)$/, "$2") : (l = !0,
2069
- e = ".*")), 1 === e.length && !1 === n.greedy && 0 !== n.repeat && (n.placeholder = ""),
2070
- n.repeat > 0 || "*" === n.repeat || "+" === n.repeat) {
2071
- var u = "*" === n.repeat ? 0 : "+" === n.repeat ? 1 : n.repeat;
2072
- e = n.groupmarker[0] + e + n.groupmarker[1] + n.quantifiermarker[0] + u + "," + n.repeat + n.quantifiermarker[1];
2073
- }
2074
- return s = l ? "regex_" + n.regex : n.numericInput ? e.split("").reverse().join("") : e,
2075
- null !== n.keepStatic && (s = "ks_" + n.keepStatic + s), void 0 === r.default.prototype.masksCache[s] || !0 === t ? (o = {
2076
- mask: e,
2077
- maskToken: r.default.prototype.analyseMask(e, l, n),
2078
- validPositions: {},
2079
- _buffer: void 0,
2080
- buffer: void 0,
2081
- tests: {},
2082
- excludes: {},
2083
- metadata: i,
2084
- maskLength: void 0,
2085
- jitOffset: {}
2086
- }, !0 !== t && (r.default.prototype.masksCache[s] = o, o = a.default.extend(!0, {}, r.default.prototype.masksCache[s]))) : o = a.default.extend(!0, {}, r.default.prototype.masksCache[s]),
2087
- o;
2088
- }
2089
- "function" == typeof e.mask && (e.mask = e.mask(e));
2090
- if (Array.isArray(e.mask)) {
2091
- if (e.mask.length > 1) {
2092
- null === e.keepStatic && (e.keepStatic = !0);
2093
- var o = e.groupmarker[0];
2094
- return (e.isRTL ? e.mask.reverse() : e.mask).forEach((function(t) {
2095
- o.length > 1 && (o += e.alternatormarker), void 0 !== t.mask && "function" != typeof t.mask ? o += t.mask : o += t;
2096
- })), n(o += e.groupmarker[1], e.mask, e);
2097
- }
2098
- e.mask = e.mask.pop();
2099
- }
2100
- i = e.mask && void 0 !== e.mask.mask && "function" != typeof e.mask.mask ? n(e.mask.mask, e.mask, e) : n(e.mask, e.mask, e);
2101
- null === e.keepStatic && (e.keepStatic = !1);
2102
- return i;
2103
- };
2104
- var a = o(i(3287)), n = o(i(9695)), r = o(i(2394));
2105
- function o(e) {
2106
- return e && e.__esModule ? e : {
2107
- default: e
2108
- };
2109
- }
2110
- },
2111
- 157: function(e, t, i) {
2112
- Object.defineProperty(t, "__esModule", {
2113
- value: !0
2114
- }), t.mask = function() {
2115
- var e = this, t = this.opts, i = this.el, a = this.dependencyLib;
2116
- s.EventRuler.off(i);
2117
- var f = function(t, i) {
2118
- "textarea" !== t.tagName.toLowerCase() && i.ignorables.push(n.default.ENTER);
2119
- var l = t.getAttribute("type"), u = "input" === t.tagName.toLowerCase() && i.supportsInputType.includes(l) || t.isContentEditable || "textarea" === t.tagName.toLowerCase();
2120
- if (!u) if ("input" === t.tagName.toLowerCase()) {
2121
- var c = document.createElement("input");
2122
- c.setAttribute("type", l), u = "text" === c.type, c = null;
2123
- } else u = "partial";
2124
- return !1 !== u ? function(t) {
2125
- var n, l;
2126
- function u() {
2127
- return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== r.getLastValidPosition.call(e) || !0 !== i.nullable ? (this.inputmask.shadowRoot || this.ownerDocument).activeElement === this && i.clearMaskOnLostFocus ? (e.isRTL ? o.clearOptionalTail.call(e, r.getBuffer.call(e).slice()).reverse() : o.clearOptionalTail.call(e, r.getBuffer.call(e).slice())).join("") : n.call(this) : "" : n.call(this);
2128
- }
2129
- function c(e) {
2130
- l.call(this, e), this.inputmask && (0, o.applyInputValue)(this, e);
2131
- }
2132
- if (!t.inputmask.__valueGet) {
2133
- if (!0 !== i.noValuePatching) {
2134
- if (Object.getOwnPropertyDescriptor) {
2135
- var f = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t), "value") : void 0;
2136
- f && f.get && f.set ? (n = f.get, l = f.set, Object.defineProperty(t, "value", {
2137
- get: u,
2138
- set: c,
2139
- configurable: !0
2140
- })) : "input" !== t.tagName.toLowerCase() && (n = function() {
2141
- return this.textContent;
2142
- }, l = function(e) {
2143
- this.textContent = e;
2144
- }, Object.defineProperty(t, "value", {
2145
- get: u,
2146
- set: c,
2147
- configurable: !0
2148
- }));
2149
- } else document.__lookupGetter__ && t.__lookupGetter__("value") && (n = t.__lookupGetter__("value"),
2150
- l = t.__lookupSetter__("value"), t.__defineGetter__("value", u), t.__defineSetter__("value", c));
2151
- t.inputmask.__valueGet = n, t.inputmask.__valueSet = l;
2152
- }
2153
- t.inputmask._valueGet = function(t) {
2154
- return e.isRTL && !0 !== t ? n.call(this.el).split("").reverse().join("") : n.call(this.el);
2155
- }, t.inputmask._valueSet = function(t, i) {
2156
- l.call(this.el, null == t ? "" : !0 !== i && e.isRTL ? t.split("").reverse().join("") : t);
2157
- }, void 0 === n && (n = function() {
2158
- return this.value;
2159
- }, l = function(e) {
2160
- this.value = e;
2161
- }, function(t) {
2162
- if (a.valHooks && (void 0 === a.valHooks[t] || !0 !== a.valHooks[t].inputmaskpatch)) {
2163
- var n = a.valHooks[t] && a.valHooks[t].get ? a.valHooks[t].get : function(e) {
2164
- return e.value;
2165
- }, s = a.valHooks[t] && a.valHooks[t].set ? a.valHooks[t].set : function(e, t) {
2166
- return e.value = t, e;
2167
- };
2168
- a.valHooks[t] = {
2169
- get: function(t) {
2170
- if (t.inputmask) {
2171
- if (t.inputmask.opts.autoUnmask) return t.inputmask.unmaskedvalue();
2172
- var a = n(t);
2173
- return -1 !== r.getLastValidPosition.call(e, void 0, void 0, t.inputmask.maskset.validPositions) || !0 !== i.nullable ? a : "";
2174
- }
2175
- return n(t);
2176
- },
2177
- set: function(e, t) {
2178
- var i = s(e, t);
2179
- return e.inputmask && (0, o.applyInputValue)(e, t), i;
2180
- },
2181
- inputmaskpatch: !0
2182
- };
2183
- }
2184
- }(t.type), function(t) {
2185
- s.EventRuler.on(t, "mouseenter", (function() {
2186
- var t = this.inputmask._valueGet(!0);
2187
- t !== (e.isRTL ? r.getBuffer.call(e).reverse() : r.getBuffer.call(e)).join("") && (0,
2188
- o.applyInputValue)(this, t);
2189
- }));
2190
- }(t));
2191
- }
2192
- }(t) : t.inputmask = void 0, u;
2193
- }(i, t);
2194
- if (!1 !== f) {
2195
- e.originalPlaceholder = i.placeholder, e.maxLength = void 0 !== i ? i.maxLength : void 0,
2196
- -1 === e.maxLength && (e.maxLength = void 0), "inputMode" in i && null === i.getAttribute("inputmode") && (i.inputMode = t.inputmode,
2197
- i.setAttribute("inputmode", t.inputmode)), !0 === f && (t.showMaskOnFocus = t.showMaskOnFocus && -1 === [ "cc-number", "cc-exp" ].indexOf(i.autocomplete),
2198
- l.iphone && (t.insertModeVisual = !1), s.EventRuler.on(i, "submit", c.EventHandlers.submitEvent),
2199
- s.EventRuler.on(i, "reset", c.EventHandlers.resetEvent), s.EventRuler.on(i, "blur", c.EventHandlers.blurEvent),
2200
- s.EventRuler.on(i, "focus", c.EventHandlers.focusEvent), s.EventRuler.on(i, "invalid", c.EventHandlers.invalidEvent),
2201
- s.EventRuler.on(i, "click", c.EventHandlers.clickEvent), s.EventRuler.on(i, "mouseleave", c.EventHandlers.mouseleaveEvent),
2202
- s.EventRuler.on(i, "mouseenter", c.EventHandlers.mouseenterEvent), s.EventRuler.on(i, "paste", c.EventHandlers.pasteEvent),
2203
- s.EventRuler.on(i, "cut", c.EventHandlers.cutEvent), s.EventRuler.on(i, "complete", t.oncomplete),
2204
- s.EventRuler.on(i, "incomplete", t.onincomplete), s.EventRuler.on(i, "cleared", t.oncleared),
2205
- !0 !== t.inputEventOnly && (s.EventRuler.on(i, "keydown", c.EventHandlers.keydownEvent),
2206
- s.EventRuler.on(i, "keypress", c.EventHandlers.keypressEvent), s.EventRuler.on(i, "keyup", c.EventHandlers.keyupEvent)),
2207
- (l.mobile || t.inputEventOnly) && i.removeAttribute("maxLength"), s.EventRuler.on(i, "input", c.EventHandlers.inputFallBackEvent),
2208
- s.EventRuler.on(i, "compositionend", c.EventHandlers.compositionendEvent)), s.EventRuler.on(i, "setvalue", c.EventHandlers.setValueEvent),
2209
- r.getBufferTemplate.call(e).join(""), e.undoValue = e._valueGet(!0);
2210
- var d = (i.inputmask.shadowRoot || i.ownerDocument).activeElement;
2211
- if ("" !== i.inputmask._valueGet(!0) || !1 === t.clearMaskOnLostFocus || d === i) {
2212
- (0, o.applyInputValue)(i, i.inputmask._valueGet(!0), t);
2213
- var p = r.getBuffer.call(e).slice();
2214
- !1 === u.isComplete.call(e, p) && t.clearIncomplete && r.resetMaskSet.call(e), t.clearMaskOnLostFocus && d !== i && (-1 === r.getLastValidPosition.call(e) ? p = [] : o.clearOptionalTail.call(e, p)),
2215
- (!1 === t.clearMaskOnLostFocus || t.showMaskOnFocus && d === i || "" !== i.inputmask._valueGet(!0)) && (0,
2216
- o.writeBuffer)(i, p), d === i && r.caret.call(e, i, r.seekNext.call(e, r.getLastValidPosition.call(e)));
2217
- }
2218
- }
2219
- };
2220
- var a, n = (a = i(5581)) && a.__esModule ? a : {
2221
- default: a
2222
- }, r = i(8711), o = i(7760), s = i(9716), l = i(9845), u = i(7215), c = i(6030);
2223
- },
2224
- 9695: function(e, t) {
2225
- Object.defineProperty(t, "__esModule", {
2226
- value: !0
2227
- }), t.default = function(e, t, i, a) {
2228
- this.matches = [], this.openGroup = e || !1, this.alternatorGroup = !1, this.isGroup = e || !1,
2229
- this.isOptional = t || !1, this.isQuantifier = i || !1, this.isAlternator = a || !1,
2230
- this.quantifier = {
2231
- min: 1,
2232
- max: 1
2233
- };
2234
- };
2235
- },
2236
- 3194: function() {
2237
- Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
2238
- value: function(e, t) {
2239
- if (null == this) throw new TypeError('"this" is null or not defined');
2240
- var i = Object(this), a = i.length >>> 0;
2241
- if (0 === a) return !1;
2242
- for (var n = 0 | t, r = Math.max(n >= 0 ? n : a - Math.abs(n), 0); r < a; ) {
2243
- if (i[r] === e) return !0;
2244
- r++;
2245
- }
2246
- return !1;
2247
- }
2248
- });
2249
- },
2250
- 7149: function() {
2251
- function e(t) {
2252
- return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
2253
- return typeof e;
2254
- } : function(e) {
2255
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2256
- }, e(t);
2257
- }
2258
- "function" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === e("test".__proto__) ? function(e) {
2259
- return e.__proto__;
2260
- } : function(e) {
2261
- return e.constructor.prototype;
2262
- });
2263
- },
2264
- 8711: function(e, t, i) {
2265
- Object.defineProperty(t, "__esModule", {
2266
- value: !0
2267
- }), t.caret = function(e, t, i, a, n) {
2268
- var r, o = this, s = this.opts;
2269
- if (void 0 === t) return "selectionStart" in e && "selectionEnd" in e ? (t = e.selectionStart,
2270
- i = e.selectionEnd) : window.getSelection ? (r = window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode !== e && r.commonAncestorContainer !== e || (t = r.startOffset,
2271
- i = r.endOffset) : document.selection && document.selection.createRange && (r = document.selection.createRange(),
2272
- t = 0 - r.duplicate().moveStart("character", -e.inputmask._valueGet().length), i = t + r.text.length),
2273
- {
2274
- begin: a ? t : u.call(o, t),
2275
- end: a ? i : u.call(o, i)
2276
- };
2277
- if (Array.isArray(t) && (i = o.isRTL ? t[0] : t[1], t = o.isRTL ? t[1] : t[0]),
2278
- void 0 !== t.begin && (i = o.isRTL ? t.begin : t.end, t = o.isRTL ? t.end : t.begin),
2279
- "number" == typeof t) {
2280
- t = a ? t : u.call(o, t), i = "number" == typeof (i = a ? i : u.call(o, i)) ? i : t;
2281
- var l = parseInt(((e.ownerDocument.defaultView || window).getComputedStyle ? (e.ownerDocument.defaultView || window).getComputedStyle(e, null) : e.currentStyle).fontSize) * i;
2282
- if (e.scrollLeft = l > e.scrollWidth ? l : 0, e.inputmask.caretPos = {
2283
- begin: t,
2284
- end: i
2285
- }, s.insertModeVisual && !1 === s.insertMode && t === i && (n || i++), e === (e.inputmask.shadowRoot || e.ownerDocument).activeElement) if ("setSelectionRange" in e) e.setSelectionRange(t, i); else if (window.getSelection) {
2286
- if (r = document.createRange(), void 0 === e.firstChild || null === e.firstChild) {
2287
- var c = document.createTextNode("");
2288
- e.appendChild(c);
2289
- }
2290
- r.setStart(e.firstChild, t < e.inputmask._valueGet().length ? t : e.inputmask._valueGet().length),
2291
- r.setEnd(e.firstChild, i < e.inputmask._valueGet().length ? i : e.inputmask._valueGet().length),
2292
- r.collapse(!0);
2293
- var f = window.getSelection();
2294
- f.removeAllRanges(), f.addRange(r);
2295
- } else e.createTextRange && ((r = e.createTextRange()).collapse(!0), r.moveEnd("character", i),
2296
- r.moveStart("character", t), r.select());
2297
- }
2298
- }, t.determineLastRequiredPosition = function(e) {
2299
- var t, i, r = this, s = this.maskset, l = this.dependencyLib, u = a.getMaskTemplate.call(r, !0, o.call(r), !0, !0), c = u.length, f = o.call(r), d = {}, p = s.validPositions[f], h = void 0 !== p ? p.locator.slice() : void 0;
2300
- for (t = f + 1; t < u.length; t++) i = a.getTestTemplate.call(r, t, h, t - 1), h = i.locator.slice(),
2301
- d[t] = l.extend(!0, {}, i);
2302
- var m = p && void 0 !== p.alternation ? p.locator[p.alternation] : void 0;
2303
- for (t = c - 1; t > f && (((i = d[t]).match.optionality || i.match.optionalQuantifier && i.match.newBlockMarker || m && (m !== d[t].locator[p.alternation] && 1 != i.match.static || !0 === i.match.static && i.locator[p.alternation] && n.checkAlternationMatch.call(r, i.locator[p.alternation].toString().split(","), m.toString().split(",")) && "" !== a.getTests.call(r, t)[0].def)) && u[t] === a.getPlaceholder.call(r, t, i.match)); t--) c--;
2304
- return e ? {
2305
- l: c,
2306
- def: d[c] ? d[c].match : void 0
2307
- } : c;
2308
- }, t.determineNewCaretPosition = function(e, t, i) {
2309
- var n = this, u = this.maskset, c = this.opts;
2310
- t && (n.isRTL ? e.end = e.begin : e.begin = e.end);
2311
- if (e.begin === e.end) {
2312
- switch (i = i || c.positionCaretOnClick) {
2313
- case "none":
2314
- break;
2315
-
2316
- case "select":
2317
- e = {
2318
- begin: 0,
2319
- end: r.call(n).length
2320
- };
2321
- break;
2322
-
2323
- case "ignore":
2324
- e.end = e.begin = l.call(n, o.call(n));
2325
- break;
2326
-
2327
- case "radixFocus":
2328
- if (function(e) {
2329
- if ("" !== c.radixPoint && 0 !== c.digits) {
2330
- var t = u.validPositions;
2331
- if (void 0 === t[e] || t[e].input === a.getPlaceholder.call(n, e)) {
2332
- if (e < l.call(n, -1)) return !0;
2333
- var i = r.call(n).indexOf(c.radixPoint);
2334
- if (-1 !== i) {
2335
- for (var o in t) if (t[o] && i < o && t[o].input !== a.getPlaceholder.call(n, o)) return !1;
2336
- return !0;
2337
- }
2338
- }
2339
- }
2340
- return !1;
2341
- }(e.begin)) {
2342
- var f = r.call(n).join("").indexOf(c.radixPoint);
2343
- e.end = e.begin = c.numericInput ? l.call(n, f) : f;
2344
- break;
2345
- }
2346
-
2347
- default:
2348
- var d = e.begin, p = o.call(n, d, !0), h = l.call(n, -1 !== p || s.call(n, 0) ? p : -1);
2349
- if (d <= h) e.end = e.begin = s.call(n, d, !1, !0) ? d : l.call(n, d); else {
2350
- var m = u.validPositions[p], v = a.getTestTemplate.call(n, h, m ? m.match.locator : void 0, m), g = a.getPlaceholder.call(n, h, v.match);
2351
- if ("" !== g && r.call(n)[h] !== g && !0 !== v.match.optionalQuantifier && !0 !== v.match.newBlockMarker || !s.call(n, h, c.keepStatic, !0) && v.match.def === g) {
2352
- var k = l.call(n, h);
2353
- (d >= k || d === h) && (h = k);
2354
- }
2355
- e.end = e.begin = h;
2356
- }
2357
- }
2358
- return e;
2359
- }
2360
- }, t.getBuffer = r, t.getBufferTemplate = function() {
2361
- var e = this.maskset;
2362
- void 0 === e._buffer && (e._buffer = a.getMaskTemplate.call(this, !1, 1), void 0 === e.buffer && (e.buffer = e._buffer.slice()));
2363
- return e._buffer;
2364
- }, t.getLastValidPosition = o, t.isMask = s, t.resetMaskSet = function(e) {
2365
- var t = this.maskset;
2366
- t.buffer = void 0, !0 !== e && (t.validPositions = {}, t.p = 0);
2367
- }, t.seekNext = l, t.seekPrevious = function(e, t) {
2368
- var i = this, n = e - 1;
2369
- if (e <= 0) return 0;
2370
- for (;n > 0 && (!0 === t && (!0 !== a.getTest.call(i, n).match.newBlockMarker || !s.call(i, n, void 0, !0)) || !0 !== t && !s.call(i, n, void 0, !0)); ) n--;
2371
- return n;
2372
- }, t.translatePosition = u;
2373
- var a = i(4713), n = i(7215);
2374
- function r(e) {
2375
- var t = this.maskset;
2376
- return void 0 !== t.buffer && !0 !== e || (t.buffer = a.getMaskTemplate.call(this, !0, o.call(this), !0),
2377
- void 0 === t._buffer && (t._buffer = t.buffer.slice())), t.buffer;
2378
- }
2379
- function o(e, t, i) {
2380
- var a = this.maskset, n = -1, r = -1, o = i || a.validPositions;
2381
- for (var s in void 0 === e && (e = -1), o) {
2382
- var l = parseInt(s);
2383
- o[l] && (t || !0 !== o[l].generatedInput) && (l <= e && (n = l), l >= e && (r = l));
2384
- }
2385
- return -1 === n || n == e ? r : -1 == r || e - n < r - e ? n : r;
2386
- }
2387
- function s(e, t, i) {
2388
- var n = this, r = this.maskset, o = a.getTestTemplate.call(n, e).match;
2389
- if ("" === o.def && (o = a.getTest.call(n, e).match), !0 !== o.static) return o.fn;
2390
- if (!0 === i && void 0 !== r.validPositions[e] && !0 !== r.validPositions[e].generatedInput) return !0;
2391
- if (!0 !== t && e > -1) {
2392
- if (i) {
2393
- var s = a.getTests.call(n, e);
2394
- return s.length > 1 + ("" === s[s.length - 1].match.def ? 1 : 0);
2395
- }
2396
- var l = a.determineTestTemplate.call(n, e, a.getTests.call(n, e)), u = a.getPlaceholder.call(n, e, l.match);
2397
- return l.match.def !== u;
2398
- }
2399
- return !1;
2400
- }
2401
- function l(e, t, i) {
2402
- var n = this;
2403
- void 0 === i && (i = !0);
2404
- for (var r = e + 1; "" !== a.getTest.call(n, r).match.def && (!0 === t && (!0 !== a.getTest.call(n, r).match.newBlockMarker || !s.call(n, r, void 0, !0)) || !0 !== t && !s.call(n, r, void 0, i)); ) r++;
2405
- return r;
2406
- }
2407
- function u(e) {
2408
- var t = this.opts, i = this.el;
2409
- return !this.isRTL || "number" != typeof e || t.greedy && "" === t.placeholder || !i || (e = Math.abs(this._valueGet().length - e)),
2410
- e;
2411
- }
2412
- },
2413
- 4713: function(e, t, i) {
2414
- Object.defineProperty(t, "__esModule", {
2415
- value: !0
2416
- }), t.determineTestTemplate = u, t.getDecisionTaker = o, t.getMaskTemplate = function(e, t, i, a, n) {
2417
- var r = this, o = this.opts, c = this.maskset, f = o.greedy;
2418
- n && o.greedy && (o.greedy = !1, r.maskset.tests = {});
2419
- t = t || 0;
2420
- var p, h, m, v, g = [], k = 0;
2421
- do {
2422
- if (!0 === e && c.validPositions[k]) m = n && c.validPositions[k].match.optionality && void 0 === c.validPositions[k + 1] && (!0 === c.validPositions[k].generatedInput || c.validPositions[k].input == o.skipOptionalPartCharacter && k > 0) ? u.call(r, k, d.call(r, k, p, k - 1)) : c.validPositions[k],
2423
- h = m.match, p = m.locator.slice(), g.push(!0 === i ? m.input : !1 === i ? h.nativeDef : s.call(r, k, h)); else {
2424
- m = l.call(r, k, p, k - 1), h = m.match, p = m.locator.slice();
2425
- var y = !0 !== a && (!1 !== o.jitMasking ? o.jitMasking : h.jit);
2426
- (v = (v && h.static && h.def !== o.groupSeparator && null === h.fn || c.validPositions[k - 1] && h.static && h.def !== o.groupSeparator && null === h.fn) && c.tests[k] && 1 === c.tests[k].length) || !1 === y || void 0 === y || "number" == typeof y && isFinite(y) && y > k ? g.push(!1 === i ? h.nativeDef : s.call(r, k, h)) : v = !1;
2427
- }
2428
- k++;
2429
- } while (!0 !== h.static || "" !== h.def || t > k);
2430
- "" === g[g.length - 1] && g.pop();
2431
- !1 === i && void 0 !== c.maskLength || (c.maskLength = k - 1);
2432
- return o.greedy = f, g;
2433
- }, t.getPlaceholder = s, t.getTest = c, t.getTestTemplate = l, t.getTests = d, t.isSubsetOf = f;
2434
- var a, n = (a = i(2394)) && a.__esModule ? a : {
2435
- default: a
2436
- };
2437
- function r(e, t) {
2438
- var i = (null != e.alternation ? e.mloc[o(e)] : e.locator).join("");
2439
- if ("" !== i) for (;i.length < t; ) i += "0";
2440
- return i;
2441
- }
2442
- function o(e) {
2443
- var t = e.locator[e.alternation];
2444
- return "string" == typeof t && t.length > 0 && (t = t.split(",")[0]), void 0 !== t ? t.toString() : "";
2445
- }
2446
- function s(e, t, i) {
2447
- var a = this.opts, n = this.maskset;
2448
- if (void 0 !== (t = t || c.call(this, e).match).placeholder || !0 === i) return "function" == typeof t.placeholder ? t.placeholder(a) : t.placeholder;
2449
- if (!0 === t.static) {
2450
- if (e > -1 && void 0 === n.validPositions[e]) {
2451
- var r, o = d.call(this, e), s = [];
2452
- if (o.length > 1 + ("" === o[o.length - 1].match.def ? 1 : 0)) for (var l = 0; l < o.length; l++) if ("" !== o[l].match.def && !0 !== o[l].match.optionality && !0 !== o[l].match.optionalQuantifier && (!0 === o[l].match.static || void 0 === r || !1 !== o[l].match.fn.test(r.match.def, n, e, !0, a)) && (s.push(o[l]),
2453
- !0 === o[l].match.static && (r = o[l]), s.length > 1 && /[0-9a-bA-Z]/.test(s[0].match.def))) return a.placeholder.charAt(e % a.placeholder.length);
2454
- }
2455
- return t.def;
2456
- }
2457
- return a.placeholder.charAt(e % a.placeholder.length);
2458
- }
2459
- function l(e, t, i) {
2460
- return this.maskset.validPositions[e] || u.call(this, e, d.call(this, e, t ? t.slice() : t, i));
2461
- }
2462
- function u(e, t) {
2463
- var i = this.opts, a = function(e, t) {
2464
- var i = 0, a = !1;
2465
- t.forEach((function(e) {
2466
- e.match.optionality && (0 !== i && i !== e.match.optionality && (a = !0), (0 === i || i > e.match.optionality) && (i = e.match.optionality));
2467
- })), i && (0 == e || 1 == t.length ? i = 0 : a || (i = 0));
2468
- return i;
2469
- }(e, t);
2470
- e = e > 0 ? e - 1 : 0;
2471
- var n, o, s, l = r(c.call(this, e));
2472
- i.greedy && t.length > 1 && "" === t[t.length - 1].match.def && t.pop();
2473
- for (var u = 0; u < t.length; u++) {
2474
- var f = t[u];
2475
- n = r(f, l.length);
2476
- var d = Math.abs(n - l);
2477
- (void 0 === o || "" !== n && d < o || s && !i.greedy && s.match.optionality && s.match.optionality - a > 0 && "master" === s.match.newBlockMarker && (!f.match.optionality || f.match.optionality - a < 1 || !f.match.newBlockMarker) || s && !i.greedy && s.match.optionalQuantifier && !f.match.optionalQuantifier) && (o = d,
2478
- s = f);
2479
- }
2480
- return s;
2481
- }
2482
- function c(e, t) {
2483
- var i = this.maskset;
2484
- return i.validPositions[e] ? i.validPositions[e] : (t || d.call(this, e))[0];
2485
- }
2486
- function f(e, t, i) {
2487
- function a(e) {
2488
- for (var t, i = [], a = -1, n = 0, r = e.length; n < r; n++) if ("-" === e.charAt(n)) for (t = e.charCodeAt(n + 1); ++a < t; ) i.push(String.fromCharCode(a)); else a = e.charCodeAt(n),
2489
- i.push(e.charAt(n));
2490
- return i.join("");
2491
- }
2492
- return e.match.def === t.match.nativeDef || !(!(i.regex || e.match.fn instanceof RegExp && t.match.fn instanceof RegExp) || !0 === e.match.static || !0 === t.match.static) && -1 !== a(t.match.fn.toString().replace(/[[\]/]/g, "")).indexOf(a(e.match.fn.toString().replace(/[[\]/]/g, "")));
2493
- }
2494
- function d(e, t, i) {
2495
- var a, r, o = this, s = this.dependencyLib, l = this.maskset, c = this.opts, d = this.el, p = l.maskToken, h = t ? i : 0, m = t ? t.slice() : [ 0 ], v = [], g = !1, k = t ? t.join("") : "";
2496
- function y(t, i, r, o) {
2497
- function s(r, o, u) {
2498
- function p(e, t) {
2499
- var i = 0 === t.matches.indexOf(e);
2500
- return i || t.matches.every((function(a, n) {
2501
- return !0 === a.isQuantifier ? i = p(e, t.matches[n - 1]) : Object.prototype.hasOwnProperty.call(a, "matches") && (i = p(e, a)),
2502
- !i;
2503
- })), i;
2504
- }
2505
- function m(e, t, i) {
2506
- var a, n;
2507
- if ((l.tests[e] || l.validPositions[e]) && (l.tests[e] || [ l.validPositions[e] ]).every((function(e, r) {
2508
- if (e.mloc[t]) return a = e, !1;
2509
- var o = void 0 !== i ? i : e.alternation, s = void 0 !== e.locator[o] ? e.locator[o].toString().indexOf(t) : -1;
2510
- return (void 0 === n || s < n) && -1 !== s && (a = e, n = s), !0;
2511
- })), a) {
2512
- var r = a.locator[a.alternation];
2513
- return (a.mloc[t] || a.mloc[r] || a.locator).slice((void 0 !== i ? i : a.alternation) + 1);
2514
- }
2515
- return void 0 !== i ? m(e, t) : void 0;
2516
- }
2517
- function b(e, t) {
2518
- var i = e.alternation, a = void 0 === t || i === t.alternation && -1 === e.locator[i].toString().indexOf(t.locator[i]);
2519
- if (!a && i > t.alternation) for (var n = t.alternation; n < i; n++) if (e.locator[n] !== t.locator[n]) {
2520
- i = n, a = !0;
2521
- break;
2522
- }
2523
- if (a) {
2524
- e.mloc = e.mloc || {};
2525
- var r = e.locator[i];
2526
- if (void 0 !== r) {
2527
- if ("string" == typeof r && (r = r.split(",")[0]), void 0 === e.mloc[r] && (e.mloc[r] = e.locator.slice()),
2528
- void 0 !== t) {
2529
- for (var o in t.mloc) "string" == typeof o && (o = o.split(",")[0]), void 0 === e.mloc[o] && (e.mloc[o] = t.mloc[o]);
2530
- e.locator[i] = Object.keys(e.mloc).join(",");
2531
- }
2532
- return !0;
2533
- }
2534
- e.alternation = void 0;
2535
- }
2536
- return !1;
2537
- }
2538
- function x(e, t) {
2539
- if (e.locator.length !== t.locator.length) return !1;
2540
- for (var i = e.alternation + 1; i < e.locator.length; i++) if (e.locator[i] !== t.locator[i]) return !1;
2541
- return !0;
2542
- }
2543
- if (h > e + c._maxTestPos) throw "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. " + l.mask;
2544
- if (h === e && void 0 === r.matches) {
2545
- if (v.push({
2546
- match: r,
2547
- locator: o.reverse(),
2548
- cd: k,
2549
- mloc: {}
2550
- }), !r.optionality || void 0 !== u || !(c.definitions && c.definitions[r.nativeDef] && c.definitions[r.nativeDef].optional || n.default.prototype.definitions[r.nativeDef] && n.default.prototype.definitions[r.nativeDef].optional)) return !0;
2551
- g = !0, h = e;
2552
- } else if (void 0 !== r.matches) {
2553
- if (r.isGroup && u !== r) {
2554
- if (r = s(t.matches[t.matches.indexOf(r) + 1], o, u)) return !0;
2555
- } else if (r.isOptional) {
2556
- var P = r, E = v.length;
2557
- if (r = y(r, i, o, u)) {
2558
- if (v.forEach((function(e, t) {
2559
- t >= E && (e.match.optionality = e.match.optionality ? e.match.optionality + 1 : 1);
2560
- })), a = v[v.length - 1].match, void 0 !== u || !p(a, P)) return !0;
2561
- g = !0, h = e;
2562
- }
2563
- } else if (r.isAlternator) {
2564
- var S, w = r, _ = [], M = v.slice(), O = o.length, T = !1, A = i.length > 0 ? i.shift() : -1;
2565
- if (-1 === A || "string" == typeof A) {
2566
- var C, D = h, j = i.slice(), B = [];
2567
- if ("string" == typeof A) B = A.split(","); else for (C = 0; C < w.matches.length; C++) B.push(C.toString());
2568
- if (void 0 !== l.excludes[e]) {
2569
- for (var R = B.slice(), L = 0, I = l.excludes[e].length; L < I; L++) {
2570
- var F = l.excludes[e][L].toString().split(":");
2571
- o.length == F[1] && B.splice(B.indexOf(F[0]), 1);
2572
- }
2573
- 0 === B.length && (delete l.excludes[e], B = R);
2574
- }
2575
- (!0 === c.keepStatic || isFinite(parseInt(c.keepStatic)) && D >= c.keepStatic) && (B = B.slice(0, 1));
2576
- for (var N = 0; N < B.length; N++) {
2577
- C = parseInt(B[N]), v = [], i = "string" == typeof A && m(h, C, O) || j.slice();
2578
- var V = w.matches[C];
2579
- if (V && s(V, [ C ].concat(o), u)) r = !0; else if (0 === N && (T = !0), V && V.matches && V.matches.length > w.matches[0].matches.length) break;
2580
- S = v.slice(), h = D, v = [];
2581
- for (var G = 0; G < S.length; G++) {
2582
- var H = S[G], K = !1;
2583
- H.match.jit = H.match.jit || T, H.alternation = H.alternation || O, b(H);
2584
- for (var U = 0; U < _.length; U++) {
2585
- var $ = _[U];
2586
- if ("string" != typeof A || void 0 !== H.alternation && B.includes(H.locator[H.alternation].toString())) {
2587
- if (H.match.nativeDef === $.match.nativeDef) {
2588
- K = !0, b($, H);
2589
- break;
2590
- }
2591
- if (f(H, $, c)) {
2592
- b(H, $) && (K = !0, _.splice(_.indexOf($), 0, H));
2593
- break;
2594
- }
2595
- if (f($, H, c)) {
2596
- b($, H);
2597
- break;
2598
- }
2599
- if (Z = $, !0 === (W = H).match.static && !0 !== Z.match.static && Z.match.fn.test(W.match.def, l, e, !1, c, !1)) {
2600
- x(H, $) || void 0 !== d.inputmask.userOptions.keepStatic ? b(H, $) && (K = !0, _.splice(_.indexOf($), 0, H)) : c.keepStatic = !0;
2601
- break;
2602
- }
2603
- }
2604
- }
2605
- K || _.push(H);
2606
- }
2607
- }
2608
- v = M.concat(_), h = e, g = v.length > 0, r = _.length > 0, i = j.slice();
2609
- } else r = s(w.matches[A] || t.matches[A], [ A ].concat(o), u);
2610
- if (r) return !0;
2611
- } else if (r.isQuantifier && u !== t.matches[t.matches.indexOf(r) - 1]) for (var q = r, z = i.length > 0 ? i.shift() : 0; z < (isNaN(q.quantifier.max) ? z + 1 : q.quantifier.max) && h <= e; z++) {
2612
- var Q = t.matches[t.matches.indexOf(q) - 1];
2613
- if (r = s(Q, [ z ].concat(o), Q)) {
2614
- if ((a = v[v.length - 1].match).optionalQuantifier = z >= q.quantifier.min, a.jit = (z + 1) * (Q.matches.indexOf(a) + 1) > q.quantifier.jit,
2615
- a.optionalQuantifier && p(a, Q)) {
2616
- g = !0, h = e;
2617
- break;
2618
- }
2619
- return a.jit && (l.jitOffset[e] = Q.matches.length - Q.matches.indexOf(a)), !0;
2620
- }
2621
- } else if (r = y(r, i, o, u)) return !0;
2622
- } else h++;
2623
- var W, Z;
2624
- }
2625
- for (var u = i.length > 0 ? i.shift() : 0; u < t.matches.length; u++) if (!0 !== t.matches[u].isQuantifier) {
2626
- var p = s(t.matches[u], [ u ].concat(r), o);
2627
- if (p && h === e) return p;
2628
- if (h > e) break;
2629
- }
2630
- }
2631
- if (e > -1) {
2632
- if (void 0 === t) {
2633
- for (var b, x = e - 1; void 0 === (b = l.validPositions[x] || l.tests[x]) && x > -1; ) x--;
2634
- void 0 !== b && x > -1 && (m = function(e, t) {
2635
- var i, a = [];
2636
- return Array.isArray(t) || (t = [ t ]), t.length > 0 && (void 0 === t[0].alternation || !0 === c.keepStatic ? 0 === (a = u.call(o, e, t.slice()).locator.slice()).length && (a = t[0].locator.slice()) : t.forEach((function(e) {
2637
- "" !== e.def && (0 === a.length ? (i = e.alternation, a = e.locator.slice()) : e.locator[i] && -1 === a[i].toString().indexOf(e.locator[i]) && (a[i] += "," + e.locator[i]));
2638
- }))), a;
2639
- }(x, b), k = m.join(""), h = x);
2640
- }
2641
- if (l.tests[e] && l.tests[e][0].cd === k) return l.tests[e];
2642
- for (var P = m.shift(); P < p.length; P++) {
2643
- if (y(p[P], m, [ P ]) && h === e || h > e) break;
2644
- }
2645
- }
2646
- return (0 === v.length || g) && v.push({
2647
- match: {
2648
- fn: null,
2649
- static: !0,
2650
- optionality: !1,
2651
- casing: null,
2652
- def: "",
2653
- placeholder: ""
2654
- },
2655
- locator: [],
2656
- mloc: {},
2657
- cd: k
2658
- }), void 0 !== t && l.tests[e] ? r = s.extend(!0, [], v) : (l.tests[e] = s.extend(!0, [], v),
2659
- r = l.tests[e]), v.forEach((function(e) {
2660
- e.match.optionality = !1;
2661
- })), r;
2662
- }
2663
- },
2664
- 7215: function(e, t, i) {
2665
- Object.defineProperty(t, "__esModule", {
2666
- value: !0
2667
- }), t.alternate = l, t.checkAlternationMatch = function(e, t, i) {
2668
- for (var a, n = this.opts.greedy ? t : t.slice(0, 1), r = !1, o = void 0 !== i ? i.split(",") : [], s = 0; s < o.length; s++) -1 !== (a = e.indexOf(o[s])) && e.splice(a, 1);
2669
- for (var l = 0; l < e.length; l++) if (n.includes(e[l])) {
2670
- r = !0;
2671
- break;
2672
- }
2673
- return r;
2674
- }, t.handleRemove = function(e, t, i, a, s) {
2675
- var u = this, c = this.maskset, f = this.opts;
2676
- if ((f.numericInput || u.isRTL) && (t === r.default.BACKSPACE ? t = r.default.DELETE : t === r.default.DELETE && (t = r.default.BACKSPACE),
2677
- u.isRTL)) {
2678
- var d = i.end;
2679
- i.end = i.begin, i.begin = d;
2680
- }
2681
- var p, h = o.getLastValidPosition.call(u, void 0, !0);
2682
- i.end >= o.getBuffer.call(u).length && h >= i.end && (i.end = h + 1);
2683
- t === r.default.BACKSPACE ? i.end - i.begin < 1 && (i.begin = o.seekPrevious.call(u, i.begin)) : t === r.default.DELETE && i.begin === i.end && (i.end = o.isMask.call(u, i.end, !0, !0) ? i.end + 1 : o.seekNext.call(u, i.end) + 1);
2684
- if (!1 !== (p = v.call(u, i))) {
2685
- if (!0 !== a && !1 !== f.keepStatic || null !== f.regex && -1 !== n.getTest.call(u, i.begin).match.def.indexOf("|")) {
2686
- var m = l.call(u, !0);
2687
- if (m) {
2688
- var g = void 0 !== m.caret ? m.caret : m.pos ? o.seekNext.call(u, m.pos.begin ? m.pos.begin : m.pos) : o.getLastValidPosition.call(u, -1, !0);
2689
- (t !== r.default.DELETE || i.begin > g) && i.begin;
2690
- }
2691
- }
2692
- !0 !== a && (c.p = t === r.default.DELETE ? i.begin + p : i.begin, c.p = o.determineNewCaretPosition.call(u, {
2693
- begin: c.p,
2694
- end: c.p
2695
- }, !1, !1 === f.insertMode && t === r.default.BACKSPACE ? "none" : void 0).begin);
2696
- }
2697
- }, t.isComplete = c, t.isSelection = f, t.isValid = d, t.refreshFromBuffer = h,
2698
- t.revalidateMask = v;
2699
- var a, n = i(4713), r = (a = i(5581)) && a.__esModule ? a : {
2700
- default: a
2701
- }, o = i(8711), s = i(6030);
2702
- function l(e, t, i, a, r, s) {
2703
- var u, c, f, p, h, m, v, g, k, y, b, x = this, P = this.dependencyLib, E = this.opts, S = x.maskset, w = P.extend(!0, {}, S.validPositions), _ = P.extend(!0, {}, S.tests), M = !1, O = !1, T = void 0 !== r ? r : o.getLastValidPosition.call(x);
2704
- if (s && (y = s.begin, b = s.end, s.begin > s.end && (y = s.end, b = s.begin)),
2705
- -1 === T && void 0 === r) u = 0, c = (p = n.getTest.call(x, u)).alternation; else for (;T >= 0; T--) if ((f = S.validPositions[T]) && void 0 !== f.alternation) {
2706
- if (p && p.locator[f.alternation] !== f.locator[f.alternation]) break;
2707
- u = T, c = S.validPositions[u].alternation, p = f;
2708
- }
2709
- if (void 0 !== c) {
2710
- v = parseInt(u), S.excludes[v] = S.excludes[v] || [], !0 !== e && S.excludes[v].push((0,
2711
- n.getDecisionTaker)(p) + ":" + p.alternation);
2712
- var A = [], C = -1;
2713
- for (h = v; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) -1 === C && e <= h && void 0 !== t && (A.push(t),
2714
- C = A.length - 1), (m = S.validPositions[h]) && !0 !== m.generatedInput && (void 0 === s || h < y || h >= b) && A.push(m.input),
2715
- delete S.validPositions[h];
2716
- for (-1 === C && void 0 !== t && (A.push(t), C = A.length - 1); void 0 !== S.excludes[v] && S.excludes[v].length < 10; ) {
2717
- for (S.tests = {}, o.resetMaskSet.call(x, !0), M = !0, h = 0; h < A.length && (g = M.caret || o.getLastValidPosition.call(x, void 0, !0) + 1,
2718
- k = A[h], M = d.call(x, g, k, !1, a, !0)); h++) h === C && (O = M), 1 == e && M && (O = {
2719
- caretPos: h
2720
- });
2721
- if (M) break;
2722
- if (o.resetMaskSet.call(x), p = n.getTest.call(x, v), S.validPositions = P.extend(!0, {}, w),
2723
- S.tests = P.extend(!0, {}, _), !S.excludes[v]) {
2724
- O = l.call(x, e, t, i, a, v - 1, s);
2725
- break;
2726
- }
2727
- var D = (0, n.getDecisionTaker)(p);
2728
- if (-1 !== S.excludes[v].indexOf(D + ":" + p.alternation)) {
2729
- O = l.call(x, e, t, i, a, v - 1, s);
2730
- break;
2731
- }
2732
- for (S.excludes[v].push(D + ":" + p.alternation), h = v; h < o.getLastValidPosition.call(x, void 0, !0) + 1; h++) delete S.validPositions[h];
2733
- }
2734
- }
2735
- return O && !1 === E.keepStatic || delete S.excludes[v], O;
2736
- }
2737
- function u(e, t, i) {
2738
- var a = this.opts, n = this.maskset;
2739
- switch (a.casing || t.casing) {
2740
- case "upper":
2741
- e = e.toUpperCase();
2742
- break;
2743
-
2744
- case "lower":
2745
- e = e.toLowerCase();
2746
- break;
2747
-
2748
- case "title":
2749
- var o = n.validPositions[i - 1];
2750
- e = 0 === i || o && o.input === String.fromCharCode(r.default.SPACE) ? e.toUpperCase() : e.toLowerCase();
2751
- break;
2752
-
2753
- default:
2754
- if ("function" == typeof a.casing) {
2755
- var s = Array.prototype.slice.call(arguments);
2756
- s.push(n.validPositions), e = a.casing.apply(this, s);
2757
- }
2758
- }
2759
- return e;
2760
- }
2761
- function c(e) {
2762
- var t = this, i = this.opts, a = this.maskset;
2763
- if ("function" == typeof i.isComplete) return i.isComplete(e, i);
2764
- if ("*" !== i.repeat) {
2765
- var r = !1, s = o.determineLastRequiredPosition.call(t, !0), l = o.seekPrevious.call(t, s.l);
2766
- if (void 0 === s.def || s.def.newBlockMarker || s.def.optionality || s.def.optionalQuantifier) {
2767
- r = !0;
2768
- for (var u = 0; u <= l; u++) {
2769
- var c = n.getTestTemplate.call(t, u).match;
2770
- if (!0 !== c.static && void 0 === a.validPositions[u] && !0 !== c.optionality && !0 !== c.optionalQuantifier || !0 === c.static && e[u] !== n.getPlaceholder.call(t, u, c)) {
2771
- r = !1;
2772
- break;
2773
- }
2774
- }
2775
- }
2776
- return r;
2777
- }
2778
- }
2779
- function f(e) {
2780
- var t = this.opts.insertMode ? 0 : 1;
2781
- return this.isRTL ? e.begin - e.end > t : e.end - e.begin > t;
2782
- }
2783
- function d(e, t, i, a, r, s, p) {
2784
- var g = this, k = this.dependencyLib, y = this.opts, b = g.maskset;
2785
- i = !0 === i;
2786
- var x = e;
2787
- function P(e) {
2788
- if (void 0 !== e) {
2789
- if (void 0 !== e.remove && (Array.isArray(e.remove) || (e.remove = [ e.remove ]),
2790
- e.remove.sort((function(e, t) {
2791
- return t.pos - e.pos;
2792
- })).forEach((function(e) {
2793
- v.call(g, {
2794
- begin: e,
2795
- end: e + 1
2796
- });
2797
- })), e.remove = void 0), void 0 !== e.insert && (Array.isArray(e.insert) || (e.insert = [ e.insert ]),
2798
- e.insert.sort((function(e, t) {
2799
- return e.pos - t.pos;
2800
- })).forEach((function(e) {
2801
- "" !== e.c && d.call(g, e.pos, e.c, void 0 === e.strict || e.strict, void 0 !== e.fromIsValid ? e.fromIsValid : a);
2802
- })), e.insert = void 0), e.refreshFromBuffer && e.buffer) {
2803
- var t = e.refreshFromBuffer;
2804
- h.call(g, !0 === t ? t : t.start, t.end, e.buffer), e.refreshFromBuffer = void 0;
2805
- }
2806
- void 0 !== e.rewritePosition && (x = e.rewritePosition, e = !0);
2807
- }
2808
- return e;
2809
- }
2810
- function E(t, i, r) {
2811
- var s = !1;
2812
- return n.getTests.call(g, t).every((function(l, c) {
2813
- var d = l.match;
2814
- if (o.getBuffer.call(g, !0), !1 !== (s = (!d.jit || void 0 !== b.validPositions[o.seekPrevious.call(g, t)]) && (null != d.fn ? d.fn.test(i, b, t, r, y, f.call(g, e)) : (i === d.def || i === y.skipOptionalPartCharacter) && "" !== d.def && {
2815
- c: n.getPlaceholder.call(g, t, d, !0) || d.def,
2816
- pos: t
2817
- }))) {
2818
- var p = void 0 !== s.c ? s.c : i, h = t;
2819
- return p = p === y.skipOptionalPartCharacter && !0 === d.static ? n.getPlaceholder.call(g, t, d, !0) || d.def : p,
2820
- !0 !== (s = P(s)) && void 0 !== s.pos && s.pos !== t && (h = s.pos), !0 !== s && void 0 === s.pos && void 0 === s.c ? !1 : (!1 === v.call(g, e, k.extend({}, l, {
2821
- input: u.call(g, p, d, h)
2822
- }), a, h) && (s = !1), !1);
2823
- }
2824
- return !0;
2825
- })), s;
2826
- }
2827
- void 0 !== e.begin && (x = g.isRTL ? e.end : e.begin);
2828
- var S = !0, w = k.extend(!0, {}, b.validPositions);
2829
- if (!1 === y.keepStatic && void 0 !== b.excludes[x] && !0 !== r && !0 !== a) for (var _ = x; _ < (g.isRTL ? e.begin : e.end); _++) void 0 !== b.excludes[_] && (b.excludes[_] = void 0,
2830
- delete b.tests[_]);
2831
- if ("function" == typeof y.preValidation && !0 !== a && !0 !== s && (S = P(S = y.preValidation.call(g, o.getBuffer.call(g), x, t, f.call(g, e), y, b, e, i || r))),
2832
- !0 === S) {
2833
- if (S = E(x, t, i), (!i || !0 === a) && !1 === S && !0 !== s) {
2834
- var M = b.validPositions[x];
2835
- if (!M || !0 !== M.match.static || M.match.def !== t && t !== y.skipOptionalPartCharacter) {
2836
- if (y.insertMode || void 0 === b.validPositions[o.seekNext.call(g, x)] || e.end > x) {
2837
- var O = !1;
2838
- if (b.jitOffset[x] && void 0 === b.validPositions[o.seekNext.call(g, x)] && !1 !== (S = d.call(g, x + b.jitOffset[x], t, !0, !0)) && (!0 !== r && (S.caret = x),
2839
- O = !0), e.end > x && (b.validPositions[x] = void 0), !O && !o.isMask.call(g, x, y.keepStatic && 0 === x)) for (var T = x + 1, A = o.seekNext.call(g, x, !1, 0 !== x); T <= A; T++) if (!1 !== (S = E(T, t, i))) {
2840
- S = m.call(g, x, void 0 !== S.pos ? S.pos : T) || S, x = T;
2841
- break;
2842
- }
2843
- }
2844
- } else S = {
2845
- caret: o.seekNext.call(g, x)
2846
- };
2847
- }
2848
- !1 !== S || !y.keepStatic || !c.call(g, o.getBuffer.call(g)) && 0 !== x || i || !0 === r ? f.call(g, e) && b.tests[x] && b.tests[x].length > 1 && y.keepStatic && !i && !0 !== r && (S = l.call(g, !0)) : S = l.call(g, x, t, i, a, void 0, e),
2849
- !0 === S && (S = {
2850
- pos: x
2851
- });
2852
- }
2853
- if ("function" == typeof y.postValidation && !0 !== a && !0 !== s) {
2854
- var C = y.postValidation.call(g, o.getBuffer.call(g, !0), void 0 !== e.begin ? g.isRTL ? e.end : e.begin : e, t, S, y, b, i, p);
2855
- void 0 !== C && (S = !0 === C ? S : C);
2856
- }
2857
- S && void 0 === S.pos && (S.pos = x), !1 === S || !0 === s ? (o.resetMaskSet.call(g, !0),
2858
- b.validPositions = k.extend(!0, {}, w)) : m.call(g, void 0, x, !0);
2859
- var D = P(S);
2860
- void 0 !== g.maxLength && (o.getBuffer.call(g).length > g.maxLength && !a && (o.resetMaskSet.call(g, !0),
2861
- b.validPositions = k.extend(!0, {}, w), D = !1));
2862
- return D;
2863
- }
2864
- function p(e, t, i) {
2865
- for (var a = this.maskset, r = !1, o = n.getTests.call(this, e), s = 0; s < o.length; s++) {
2866
- if (o[s].match && (o[s].match.nativeDef === t.match[i.shiftPositions ? "def" : "nativeDef"] && (!i.shiftPositions || !t.match.static) || o[s].match.nativeDef === t.match.nativeDef || i.regex && !o[s].match.static && o[s].match.fn.test(t.input))) {
2867
- r = !0;
2868
- break;
2869
- }
2870
- if (o[s].match && o[s].match.def === t.match.nativeDef) {
2871
- r = void 0;
2872
- break;
2873
- }
2874
- }
2875
- return !1 === r && void 0 !== a.jitOffset[e] && (r = p.call(this, e + a.jitOffset[e], t, i)),
2876
- r;
2877
- }
2878
- function h(e, t, i) {
2879
- var a, n, r = this, l = this.maskset, u = this.opts, c = this.dependencyLib, f = u.skipOptionalPartCharacter, d = r.isRTL ? i.slice().reverse() : i;
2880
- if (u.skipOptionalPartCharacter = "", !0 === e) o.resetMaskSet.call(r), l.tests = {},
2881
- e = 0, t = i.length, n = o.determineNewCaretPosition.call(r, {
2882
- begin: 0,
2883
- end: 0
2884
- }, !1).begin; else {
2885
- for (a = e; a < t; a++) delete l.validPositions[a];
2886
- n = e;
2887
- }
2888
- var p = new c.Event("keypress");
2889
- for (a = e; a < t; a++) {
2890
- p.keyCode = d[a].toString().charCodeAt(0), r.ignorable = !1;
2891
- var h = s.EventHandlers.keypressEvent.call(r, p, !0, !1, !1, n);
2892
- !1 !== h && void 0 !== h && (n = h.forwardPosition);
2893
- }
2894
- u.skipOptionalPartCharacter = f;
2895
- }
2896
- function m(e, t, i) {
2897
- var a = this, r = this.maskset, s = this.dependencyLib;
2898
- if (void 0 === e) for (e = t - 1; e > 0 && !r.validPositions[e]; e--) ;
2899
- for (var l = e; l < t; l++) {
2900
- if (void 0 === r.validPositions[l] && !o.isMask.call(a, l, !1)) if (0 == l ? n.getTest.call(a, l) : r.validPositions[l - 1]) {
2901
- var u = n.getTests.call(a, l).slice();
2902
- "" === u[u.length - 1].match.def && u.pop();
2903
- var c, f = n.determineTestTemplate.call(a, l, u);
2904
- if (f && (!0 !== f.match.jit || "master" === f.match.newBlockMarker && (c = r.validPositions[l + 1]) && !0 === c.match.optionalQuantifier) && ((f = s.extend({}, f, {
2905
- input: n.getPlaceholder.call(a, l, f.match, !0) || f.match.def
2906
- })).generatedInput = !0, v.call(a, l, f, !0), !0 !== i)) {
2907
- var p = r.validPositions[t].input;
2908
- return r.validPositions[t] = void 0, d.call(a, t, p, !0, !0);
2909
- }
2910
- }
2911
- }
2912
- }
2913
- function v(e, t, i, a) {
2914
- var r = this, s = this.maskset, l = this.opts, u = this.dependencyLib;
2915
- function c(e, t, i) {
2916
- var a = t[e];
2917
- if (void 0 !== a && !0 === a.match.static && !0 !== a.match.optionality && (void 0 === t[0] || void 0 === t[0].alternation)) {
2918
- var n = i.begin <= e - 1 ? t[e - 1] && !0 === t[e - 1].match.static && t[e - 1] : t[e - 1], r = i.end > e + 1 ? t[e + 1] && !0 === t[e + 1].match.static && t[e + 1] : t[e + 1];
2919
- return n && r;
2920
- }
2921
- return !1;
2922
- }
2923
- var f = 0, h = void 0 !== e.begin ? e.begin : e, m = void 0 !== e.end ? e.end : e, v = !0;
2924
- if (e.begin > e.end && (h = e.end, m = e.begin), a = void 0 !== a ? a : h, h !== m || l.insertMode && void 0 !== s.validPositions[a] && void 0 === i || void 0 === t || t.match.optionalQuantifier || t.match.optionality) {
2925
- var g, k = u.extend(!0, {}, s.validPositions), y = o.getLastValidPosition.call(r, void 0, !0);
2926
- for (s.p = h, g = y; g >= h; g--) delete s.validPositions[g], void 0 === t && delete s.tests[g + 1];
2927
- var b, x, P = a, E = P;
2928
- for (t && (s.validPositions[a] = u.extend(!0, {}, t), E++, P++), g = t ? m : m - 1; g <= y; g++) {
2929
- if (void 0 !== (b = k[g]) && !0 !== b.generatedInput && (g >= m || g >= h && c(g, k, {
2930
- begin: h,
2931
- end: m
2932
- }))) {
2933
- for (;"" !== n.getTest.call(r, E).match.def; ) {
2934
- if (!1 !== (x = p.call(r, E, b, l)) || "+" === b.match.def) {
2935
- "+" === b.match.def && o.getBuffer.call(r, !0);
2936
- var S = d.call(r, E, b.input, "+" !== b.match.def, !0);
2937
- if (v = !1 !== S, P = (S.pos || E) + 1, !v && x) break;
2938
- } else v = !1;
2939
- if (v) {
2940
- void 0 === t && b.match.static && g === e.begin && f++;
2941
- break;
2942
- }
2943
- if (!v && o.getBuffer.call(r), E > s.maskLength) break;
2944
- E++;
2945
- }
2946
- "" == n.getTest.call(r, E).match.def && (v = !1), E = P;
2947
- }
2948
- if (!v) break;
2949
- }
2950
- if (!v) return s.validPositions = u.extend(!0, {}, k), o.resetMaskSet.call(r, !0),
2951
- !1;
2952
- } else t && n.getTest.call(r, a).match.cd === t.match.cd && (s.validPositions[a] = u.extend(!0, {}, t));
2953
- return o.resetMaskSet.call(r, !0), f;
2954
- }
2955
- },
2956
- 2047: function(t) {
2957
- t.exports = e;
2958
- },
2959
- 5581: function(e) {
2960
- e.exports = JSON.parse('{"BACKSPACE":8,"BACKSPACE_SAFARI":127,"DELETE":46,"DOWN":40,"END":35,"ENTER":13,"ESCAPE":27,"HOME":36,"INSERT":45,"LEFT":37,"PAGE_DOWN":34,"PAGE_UP":33,"RIGHT":39,"SPACE":32,"TAB":9,"UP":38,"X":88,"Z":90,"CONTROL":17,"PAUSE/BREAK":19,"WINDOWS_LEFT":91,"WINDOWS_RIGHT":92,"KEY_229":229}');
2961
- }
2962
- }, i = {};
2963
- function a(e) {
2964
- var n = i[e];
2965
- if (void 0 !== n) return n.exports;
2966
- var r = i[e] = {
2967
- exports: {}
2968
- };
2969
- return t[e](r, r.exports, a), r.exports;
2970
- }
2971
- var n = {};
2972
- return function() {
2973
- var e = n;
2974
- Object.defineProperty(e, "__esModule", {
2975
- value: !0
2976
- }), e.default = void 0;
2977
- var t, i = (t = a(3046)) && t.__esModule ? t : {
2978
- default: t
2979
- };
2980
- a(443);
2981
- var r = i.default;
2982
- e.default = r;
2983
- }(), n;
2984
- }();
2985
- }));