use-mask-input 3.10.0 → 3.10.2
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.
- package/CHANGELOG.md +17 -1
- package/dist/antd.cjs +1 -65
- package/dist/antd.cjs.map +1 -1
- package/dist/antd.d.cts +12 -10
- package/dist/{antd.d.ts → antd.d.mts} +12 -10
- package/dist/antd.mjs +2 -0
- package/dist/antd.mjs.map +1 -0
- package/dist/index-BmKzoe0X.d.cts +836 -0
- package/dist/index-BmKzoe0X.d.mts +836 -0
- package/dist/index.cjs +1 -173
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -15
- package/dist/{index.d.ts → index.d.mts} +18 -15
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/withMask-VWeBqi_u.cjs +2 -0
- package/dist/withMask-VWeBqi_u.cjs.map +1 -0
- package/dist/withMask-jrErtLYS.mjs +2 -0
- package/dist/withMask-jrErtLYS.mjs.map +1 -0
- package/package.json +42 -22
- package/src/api/withMask.ts +1 -1
- package/src/core/inputmask.ts +10 -0
- package/src/core/maskEngine.ts +2 -2
- package/src/utils/maskHelpers.ts +5 -3
- package/dist/antd.js +0 -63
- package/dist/antd.js.map +0 -1
- package/dist/chunk-DTC7JTZP.cjs +0 -3925
- package/dist/chunk-DTC7JTZP.cjs.map +0 -1
- package/dist/chunk-TVCNC3TP.js +0 -3915
- package/dist/chunk-TVCNC3TP.js.map +0 -1
- package/dist/index-D8KkaDbQ.d.cts +0 -596
- package/dist/index-D8KkaDbQ.d.ts +0 -596
- package/dist/index.js +0 -165
- package/dist/index.js.map +0 -1
- package/src/antd/useHookFormMaskAntd.spec.ts +0 -181
- package/src/antd/useMaskInputAntd-server.spec.tsx +0 -37
- package/src/antd/useMaskInputAntd.spec.tsx +0 -131
- package/src/api/useHookFormMask.spec.ts +0 -259
- package/src/api/useMaskInput-server.spec.tsx +0 -30
- package/src/api/useMaskInput.spec.tsx +0 -238
- package/src/api/withHookFormMask.spec.ts +0 -179
- package/src/api/withMask.spec.ts +0 -137
- package/src/api/withTanStackFormMask.spec.ts +0 -76
- package/src/core/elementResolver.spec.ts +0 -175
- package/src/core/maskConfig.spec.ts +0 -208
- package/src/core/maskEngine.spec.ts +0 -114
- package/src/utils/flow.spec.ts +0 -57
- package/src/utils/isServer.spec.ts +0 -15
- package/src/utils/moduleInterop.spec.ts +0 -37
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){return typeof e==`object`&&!!e&&`nodeType`in e&&`querySelector`in e&&typeof e.querySelector==`function`}function t(t){if(!t||!e(t))return null;if(t.nodeName===`INPUT`||t.nodeName===`TEXTAREA`)return t;if(!(`querySelector`in t)||typeof t.querySelector!=`function`)return null;try{let n=t.querySelector(`input, textarea`);if(n&&e(n))return n}catch{return null}return null}function n(t){if(!t)return null;if(typeof t==`object`&&`current`in t){let n=t.current;return e(n)?n:null}return e(t)?t:null}var r={_maxTestPos:500,placeholder:`_`,optionalmarker:[`[`,`]`],quantifiermarker:[`{`,`}`],groupmarker:[`(`,`)`],alternatormarker:`|`,escapeChar:`\\`,mask:null,regex:null,oncomplete:()=>{},onincomplete:()=>{},oncleared:()=>{},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:()=>{},onBeforeMask:null,onBeforePaste:function(e,t){return typeof t.onBeforeMask==`function`?t.onBeforeMask.call(this,e,t):e},onBeforeWrite:null,onUnMask:null,outputMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:()=>{},skipOptionalPartCharacter:` `,numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:``,_radixDance:!1,groupSeparator:``,keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:[`text`,`tel`,`url`,`password`,`search`],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:`lvp`,casing:null,inputmode:`text`,importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}},i={9:{validator:`\\p{N}`,definitionSymbol:`*`},a:{validator:`\\p{L}`,definitionSymbol:`*`},"*":{validator:`[\\p{L}\\p{N}]`}},a=typeof window<`u`&&window.document&&window.document.createElement?window:{};function o(e,t,n){if(n===void 0)return e.__data?e.__data[t]:null;e.__data=e.__data||{},e.__data[t]=n}function s(){let e,t,n,r,i,a,o=arguments[0]||{},c=1,l=arguments.length,u=!1;for(typeof o==`boolean`&&(u=o,o=arguments[c]||{},c++),typeof o!=`object`&&typeof o!=`function`&&(o={});c<l;c++)if((e=arguments[c])!=null)for(t in e)n=o[t],r=e[t],o!==r&&(u&&r&&(Object.prototype.toString.call(r)===`[object Object]`||(i=Array.isArray(r)))?(i?(i=!1,a=n&&Array.isArray(n)?n:[]):a=n&&Object.prototype.toString.call(n)===`[object Object]`?n:{},o[t]=s(u,a,r)):r!==void 0&&(o[t]=r));return o}const c=a.document;function l(e){return e instanceof Element&&o(e,`events`)}let u;typeof a.CustomEvent==`function`?u=a.CustomEvent:a.Event&&c&&c.createEvent?(u=function(e,t){t||={bubbles:!1,cancelable:!1,composed:!0,detail:void 0};let n=c.createEvent(`CustomEvent`);return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n},u.prototype=a.Event.prototype):typeof Event<`u`&&(u=Event);function d(e,t){if(!this[0]||!l(this[0]))return this;let n=this[0],r=o(n,`events`),i=(e,i)=>{n.addEventListener?n.addEventListener(e,t,!1):n.attachEvent&&n.attachEvent(`on${e}`,t),r[e]=r[e]||{},r[e][i]=r[e][i]||[],r[e][i].push(t)};return e.split(` `).forEach(e=>{let[t,n=`global`]=e.split(`.`);i(t,n)}),this}function f(e,t){let n,r;function i(e,t,i){if(e in n)if(r.removeEventListener?r.removeEventListener(e,i,!1):r.detachEvent&&r.detachEvent(`on${e}`,i),t===`global`)for(let t in n[e])n[e][t].splice(n[e][t].indexOf(i),1);else n[e][t].splice(n[e][t].indexOf(i),1)}function a(e,r){let i=[],a,o;if(e.length>0){let s=r?[r]:Object.keys(n[e]);for(let c=0;c<s.length;c++)if(r=s[c],t===void 0)for(a=0,o=n[e][r]?.length||0;a<o;a++)i.push({ev:e,namespace:r,handler:n[e][r][a]});else i.push({ev:e,namespace:r,handler:t})}else if(r.length>0){for(let e in n)if(n[e][r])if(t===void 0)for(a=0,o=n[e][r].length;a<o;a++)i.push({ev:e,namespace:r,handler:n[e][r][a]});else i.push({ev:e,namespace:r,handler:t})}return i}return l(this[0])&&(n=o(this[0],`events`),r=this[0],e||=Object.keys(n).join(` `),e!==``&&e.split(` `).forEach(e=>{let[t,n]=e.split(`.`);a(t,n).forEach(({ev:e,handler:t,namespace:n})=>{i(e,n,t)})})),this}function p(e){if(l(this[0])){let t=o(this[0],`events`),n=this[0],r=typeof e==`string`?e.split(` `):[e.type];for(let i=0;i<r.length;i++){let a=r[i].split(`.`),o=a[0],l=a[1]||`global`;if(c!==void 0){let t,r={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(c.createEvent){try{switch(o){case`input`:r.inputType=`insertText`,t=new InputEvent(o,r);break;default:t=new CustomEvent(o,r)}}catch{t=c.createEvent(`CustomEvent`),t.initCustomEvent(o,r.bubbles,r.cancelable,r.detail)}e.type&&s(t,e),n.dispatchEvent(t)}else t=c.createEventObject(),t.eventType=o,t.detail=arguments[1],e.type&&s(t,e),n.fireEvent(`on`+t.eventType,t)}else if(t[o]!==void 0){arguments[0]=arguments[0].type?arguments[0]:h.Event(arguments[0]),arguments[0].detail=arguments.slice(1);let e=t[o];(l===`global`?Object.values(e).flat():e[l]).forEach(e=>e.apply(n,arguments))}}}return this}const m=a.document;function h(e){if(e instanceof h)return e;if(!(this instanceof h))return new h(e);e!=null&&e!==a&&(this[0]=e.nodeName?e:e[0]!==void 0&&e[0].nodeName?e[0]:m.querySelector(e),this[0]!==void 0&&this[0]!==null&&o(this[0],`events`,o(this[0],`events`)||{}))}h.prototype={on:d,off:f,trigger:p},h.extend=s,h.data=o,h.Event=u;const g=a.navigator&&a.navigator.userAgent||``,_=g.indexOf(`MSIE `)>0||g.indexOf(`Trident/`)>0,v=a.navigator&&a.navigator.userAgentData&&a.navigator.userAgentData.mobile||a.navigator&&a.navigator.maxTouchPoints||`ontouchstart`in a,y=/iphone/i.test(g),b={c:67,x:88,z:90,BACKSPACE_SAFARI:127,Enter:13,Meta_LEFT:91,Meta_RIGHT:92,Space:32,Alt:18,AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,CapsLock:20,Control:17,ContextMenu:93,Dead:221,Delete:46,End:35,Escape:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Home:36,Insert:45,NumLock:144,PageDown:34,PageUp:33,Pause:19,PrintScreen:44,Process:229,Shift:16,ScrollLock:145,Tab:9,Unidentified:229};Object.entries(b).reduce((e,[t,n])=>(e[n]=e[n]===void 0?t:e[n],e),{});const x=Object.entries(b).reduce((e,[t,n])=>(e[t]=t===`Space`?` `:t,e),{});function S(e,t){let n=(e.alternation==null?e.locator:e.mloc[`${C(e)}:${e.alternation}`]||e.locator).join(``);if(n!==``)for(n=n.split(`:`)[0];n.length<t;)n+=`0`;return n}function C(e){let t=e.locator[e.alternation];return typeof t==`string`&&t.length>0&&(t=t.split(`,`).sort((e,t)=>e-t)[0]),t===void 0?``:t.toString()}function w(e,t,n){let r=this,i=this.opts,a=this.maskset;if(t||=O.call(r,e).match,t.placeholder!==void 0||n===!0)if(t.placeholder!==``&&t.static===!0&&t.generated!==!0){let a=P.call(r,e),o=L.call(r,a);return(n?e<=o:e<o)?i.staticDefinitionSymbol&&t.static?t.nativeDef:t.def:typeof t.placeholder==`function`?t.placeholder(i):t.placeholder}else return typeof t.placeholder==`function`?t.placeholder(i):t.placeholder;else if(t.static===!0){if(e>-1&&a.validPositions[e]===void 0){let t=k.call(r,e),n=[],o;if(typeof i.placeholder==`string`&&t.length>1+ +(t[t.length-1].match.def===``)){for(let r=0;r<t.length;r++)if(t[r].match.def!==``&&t[r].match.optionality!==!0&&t[r].match.optionalQuantifier!==!0&&(t[r].match.static===!0||o===void 0||t[r].match.fn.test(o.match.def,a,e,!0,i)!==!1)&&(n.push(t[r]),t[r].match.static===!0&&(o=t[r]),n.length>1&&/[0-9a-bA-Z]/.test(n[0].match.def)))return i.placeholder.charAt(e%i.placeholder.length)}}return t.def}return typeof i.placeholder==`object`?t.def:i.placeholder.charAt(e%i.placeholder.length)}function T(e,t,n,r,i){let a=this,o=this.opts,s=this.maskset,c=o.greedy;i&&o.greedy&&(o.greedy=!1,a.maskset.tests={}),t||=0;let l=[],u,d=0,f,p,m;do{if(e===!0&&s.validPositions[d])p=i&&s.validPositions[d].match.optionality&&s.validPositions[d+1]===void 0&&(s.validPositions[d].generatedInput===!0||s.validPositions[d].input==o.skipOptionalPartCharacter&&d>0)?D.call(a,d,k.call(a,d,u,d-1)):s.validPositions[d],f=p.match,u=p.locator.slice(),l.push(n===!0?p.input:n===!1?f.nativeDef:w.call(a,d,f));else{p=E.call(a,d,u,d-1),f=p.match,u=p.locator.slice();let e=r===!0?!1:o.jitMasking===!1?f.jit:o.jitMasking;m=(m||s.validPositions[d-1])&&f.static&&f.def!==o.groupSeparator&&f.fn===null,m||e===!1||e===void 0||typeof e==`number`&&isFinite(e)&&e>d?l.push(n===!1?f.nativeDef:w.call(a,l.length,f)):m=!1}d++}while(f.static!==!0||f.def!==``||t>d);return l[l.length-1]===``&&l.pop(),(n!==!1||s.maskLength===void 0)&&(s.maskLength=d-1),o.greedy=c,l}function E(e,t,n){let r=this;return this.maskset.validPositions[e]||D.call(r,e,k.call(r,e,t&&t.slice(),n))}function D(e,t){let n=this,r=n.opts,i=ee(e,t);e=e>0?e-1:0;let a=Math.max(...t.map(e=>e.locator===void 0?0:e.locator.length)),o=S(O.call(n,e),a),s=0,c,l,u;r.greedy&&t.length>1&&t[t.length-1].match.def===``&&(s=1);for(let e=0;e<t.length-s;e++){let n=t[e];c=S(n,a);let s=Number(c)-Number(o);(n.unMatchedAlternationStopped!==!0||t.filter(e=>e.unMatchedAlternationStopped!==!0).length<=1)&&(l===void 0||c!==``&&s<l||u&&!r.greedy&&u.match.optionality&&u.match.optionality-i>0&&u.match.newBlockMarker===`master`&&(!n.match.optionality||n.match.optionality-i<1||!n.match.newBlockMarker)||u&&!r.greedy&&u.match.optionalQuantifier&&!n.match.optionalQuantifier)&&(l=s,u=n)}return u}function ee(e,t){let n=0,r=!1;return t.forEach(e=>{e.match.optionality&&(n!==0&&n!==e.match.optionality&&(r=!0),(n===0||n>e.match.optionality)&&(n=e.match.optionality))}),n&&(e==0||t.length==1?n=0:r||(n=0)),n}function O(e,t){let n=this,r=this.maskset;return r.validPositions[e]?r.validPositions[e]:(t||k.call(n,e))[0]}function te(e,t,n){function r(e){let t=[],n=-1,r;for(let i=0,a=e.length;i<a;i++)if(e.charAt(i)===`-`)for(r=e.charCodeAt(i+1);++n<r;)t.push(String.fromCharCode(n));else n=e.charCodeAt(i),t.push(e.charAt(i));return t.join(``)}return e.match.def===t.match.nativeDef?!0:(n.regex||e.match.fn instanceof RegExp&&t.match.fn instanceof RegExp)&&e.match.static!==!0&&t.match.static!==!0?t.match.fn.source===`.`?!0:r(t.match.fn.source.replace(/[[\]/]/g,``)).indexOf(r(e.match.fn.source.replace(/[[\]/]/g,``)))!==-1:!1}function k(e,t,n){let r=this,i=this.dependencyLib,a=this.maskset,o=this.opts,s=this.el,c=a.maskToken,l=t?n:0,u=t?t.slice():[0],d=[],f=!1,p,m=t?t.join(``):``,h=!1;function g(t,n,i,c){function u(i,c,y){function b(e,t){let n=t.matches.indexOf(e)===0;return n||t.matches.every(function(r,i){return r.isQuantifier===!0?n=b(e,t.matches[i-1]):Object.prototype.hasOwnProperty.call(r,`matches`)&&(n=b(e,r)),!n}),n}function x(e,t,n){let r,i,o,s,c=`${t}:${n}`;if((a.tests[e]||a.validPositions[e])&&(a.validPositions[e]?[a.validPositions[e]]:a.tests[e]).every(function(e,a){return e.mloc[c]?(r=e,!1):(Object.values(e.mloc).filter(e=>e[n]==t).every(t=>{let n=t.join(``).split(`:`)[0];for(o||=n;n.length<o.length;)n+=`0`;let a=Number(n);return(r===void 0||a<i)&&(i=a,r=e,s=Object.entries(e.mloc).find(e=>e[1].toString()===t.toString())[0]),!0}),!0)}),r){n===void 0&&(c=`${t}:${r.alternation}`);let e=`${r.locator[r.alternation]}:${r.alternation}`,i=r.mloc[s||c]||r.mloc[e]||r.locator;i[i.length-1].toString().indexOf(`:`)!==-1&&i.pop();let a=parseInt(r.alternation)+1;return i.slice(a)}else return n===void 0?void 0:x(e,t)}function S(t,n){return t.match.static===!0&&n.match.static!==!0?n.match.fn.test(t.match.def,a,e,!1,o,!1):!1}function C(e,t){function n(n){e.mloc=e.mloc||{};let r=e.locator[n];if(r===void 0)e.alternation=void 0;else{if(t===void 0)typeof r==`string`&&(r=r.split(`,`)[0]),r=`${r}:${n}`,e.mloc[r]===void 0&&(e.mloc[r]=e.locator.slice(),e.mloc[r].push(`:${n}`));else{let n=0;for(let r in t.mloc)if(e.mloc[r]===void 0)e.mloc[r]=t.mloc[r];else do if(e.mloc[r+n]===void 0){e.mloc[r+n]=t.mloc[r];break}while(e.mloc[r+ n++]!==void 0);e.locator=v(l,[e,t])}return e.alternation>n&&(e.alternation=n),!0}return!1}let r=e.alternation,i=t===void 0||r<=t.alternation&&e.locator[r].toString().indexOf(t.locator[r])===-1;if(!i&&r>t.alternation){for(let n=0;n<r;n++)if(e.locator[n]!==t.locator[n]){r=n,i=!0;break}}return i?n(r):!1}function w(){if(i=u(t.matches[t.matches.indexOf(i)+1],c,y),i)return!0}function T(){let t=i,r=d.length;if(i=g(i,n,c,y),d.length>0)if(d.forEach(function(e,t){t>=r&&(e.match.optionality=e.match.optionality?e.match.optionality+1:1)}),p=d[d.length-1].match,y===void 0&&b(p,t))f=!0,l=e;else return i}function E(){function p(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];r.isQuantifier&&!isNaN(r.quantifier.max)?t+=r.quantifier.max:t++}return t}function m(e){let t=e.matches[0].matches?p(e.matches[0].matches):1,n;for(let r=0;r<e.matches.length&&(n=e.matches[r].matches?p(e.matches[r].matches):1,t===n);r++);return t!==n}r.hasAlternator=!0;let g=i,_=[],v=d.slice(),b=c.length,w=n.length>0?n.shift():-1,T;if(w===-1||typeof w==`string`){let t=l,r=n.slice(),p=[],E;if(typeof w==`string`)p=w.split(`,`);else for(E=0;E<g.matches.length;E++)p.push(E.toString());if(a.excludes[e]!==void 0){let t=p.slice();for(let t=0,n=a.excludes[e].length;t<n;t++){let n=a.excludes[e][t].toString().split(`:`);c.length==n[1]&&p.splice(p.indexOf(n[0]),1)}p.length===0&&(delete a.excludes[e],p=t)}(o.keepStatic===!0||isFinite(parseInt(o.keepStatic))&&t>=o.keepStatic)&&(p=p.slice(0,1));for(let e=0;e<p.length;e++){E=parseInt(p[e]),d=[],n=typeof w==`string`&&x(l,E,b)||r.slice();let a=g.matches[E];if(a&&u(a,[E].concat(c),y))i=!0;else if(h=m(g),a&&a.matches&&a.matches.length>g.matches[0].matches.length)break;T=d.slice(),l=t,d=[];for(let e=0;e<T.length;e++){let n=T[e],r=!1;n.alternation=n.alternation||b,C(n);for(let e=0;e<_.length;e++){let i=_[e];if(typeof w!=`string`||n.alternation!==void 0&&w.indexOf(n.locator[n.alternation].toString())!==-1){if(n.match.nativeDef===i.match.nativeDef){r=!0,C(i,n);break}else if(te(n,i,o)){C(n,i)&&(r=!0,_.splice(_.indexOf(i),0,n));break}else if(te(i,n,o)){C(i,n);break}else if(S(n,i)){C(n,i)&&(r=!0,_.splice(_.indexOf(i),0,n));break}else if(S(i,n)){C(i,n),i.match.optionality&&s.inputmask.userOptions.keepStatic===void 0&&(o.keepStatic=t);break}}}r||_.push(n)}}d=v.concat(_),l=e,f=d.length>0&&h,i=_.length>0&&!h,h&&f&&!i&&d.forEach(function(e,t){e.unMatchedAlternationStopped=!0}),n=r.slice()}else i=u(g.matches[w]||t.matches[w],[w].concat(c),y);if(i)return!0}function D(){let r=i,s=!1;for(let h=n.length>0?n.shift():0;h<(isNaN(r.quantifier.max)?h+1:r.quantifier.max)&&l<=e;h++){let n=t.matches[t.matches.indexOf(r)-1];if(i=u(n,[h].concat(c),n),i){if(d.forEach(function(t,c){p=_(n,t.match)?t.match:d[d.length-1].match,p.optionalQuantifier=h>=r.quantifier.min,p.jit=(h+1)*(n.matches.indexOf(p)+1)>r.quantifier.jit,p.optionalQuantifier&&b(p,n)&&(f=!0,l=e,o.greedy&&a.validPositions[e-1]==null&&h>r.quantifier.min&&[`*`,`+`].indexOf(r.quantifier.max)!=-1&&(d.pop(),m=void 0),s=!0,i=!1),!s&&p.jit&&(a.jitOffset[e]=n.matches.length-n.matches.indexOf(p))}),s)break;return!0}}}if(l>e+o._maxTestPos)throw Error(`Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ${a.mask}`);if(l===e&&i.matches===void 0)if(d.push({match:i,locator:c.reverse(),cd:m,mloc:{}}),i.optionality&&y===void 0&&(o.definitions&&o.definitions[i.nativeDef]&&o.definitions[i.nativeDef].optional||J.prototype.definitions[i.nativeDef]&&J.prototype.definitions[i.nativeDef].optional))f=!0,l=e;else return!0;else if(i.matches!==void 0){if(i.isGroup&&y!==i)return w();if(i.isOptional)return T();if(i.isAlternator)return E();if(i.isQuantifier&&y!==t.matches[t.matches.indexOf(i)-1])return D();if(i=g(i,n,c,y),i)return!0}else l++}for(let r=n.length>0?n.shift():0;r<t.matches.length;r++)if(t.matches[r].isQuantifier!==!0){let n=u(t.matches[r],[r].concat(i),c);if(n&&l===e)return n;if(l>e)break}}function _(e,t){let n=e.matches.indexOf(t)!=-1;return n||e.matches.forEach((e,r)=>{e.matches!==void 0&&!n&&(n=_(e,t))}),n}function v(e,t){let n=[];return Array.isArray(t)||(t=[t]),t.length>0&&(t[0].alternation===void 0||o.keepStatic===!0||isFinite(parseInt(o.keepStatic))&&e>=o.keepStatic?(n=D.call(r,e,t.slice()).locator.slice(),n.length===0&&(n=t[0].locator.slice())):t.forEach(e=>{Object.values(e.mloc).forEach(e=>{e.forEach((e,t)=>{let r=n[t];e.toString().includes(`:`)||r&&r.toString().includes(`:`)||(r===void 0?n[t]=e:r.toString().includes(e)||(n[t]=n[t]+`,`+e))})})})),n}if(e>-1){if(t===void 0){let t=e-1,n;for(;(n=a.validPositions[t]||a.tests[t])===void 0&&t>-1;)t--;n!==void 0&&t>-1&&(u=v(t,n),m=u.join(``),l=t)}if(a.tests[e]&&a.tests[e][0].cd===m)return a.tests[e];for(let t=u.shift();t<c.length&&!(g(c[t],u,[t])&&l===e||l>e);t++);}(d.length===0||f)&&d.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:``,placeholder:``},locator:h&&d.filter(e=>e.unMatchedAlternationStopped!==!0).length===0?[0]:[],mloc:{},cd:m});let y;return t!==void 0&&a.tests[e]?y=i.extend(!0,[],d):(a.tests[e]=i.extend(!0,[],d),y=a.tests[e]),d.forEach(e=>{e.match.optionality=e.match.defOptionality||!1}),y}function ne(e,t,n,r,i,a){let o=this,s=this.dependencyLib,c=this.opts,l=o.maskset;if(!o.hasAlternator)return!1;let u=s.extend(!0,[],l.validPositions),d=s.extend(!0,{},l.tests),f,p,m=!1,h=!1,g,_,v,y,b,x=i===void 0?P.call(o):i,S,w,T,E;if(a&&(T=a.begin,E=a.end,a.begin>a.end&&(T=a.end,E=a.begin)),x===-1&&i===void 0)f=0,_=O.call(o,f),p=_.alternation;else for(;x>=0;x--)if(g=x===0?O.call(o,0):l.validPositions[x],g&&g.alternation!==void 0){if(x<=(e||0)&&_&&_.locator[g.alternation]!==g.locator[g.alternation])break;f=x,p=g.alternation,_=g}if(p!==void 0){b=parseInt(f),l.excludes[b]=l.excludes[b]||[],e!==!0&&l.excludes[b].push(C(_)+`:`+_.alternation);let i=[],p=-1;for(v=b;b<P.call(o,void 0,!0)+1;v++)p===-1&&e<=v&&t!==void 0&&(i.push(t),p=i.length-1),y=l.validPositions[b],y&&y.generatedInput!==!0&&(b!==0||y.input!==c.skipOptionalPartCharacter)&&(a===void 0||v<T||v>=E)&&i.push(y.input),l.validPositions.splice(b,1);for(p===-1&&t!==void 0&&(i.push(t),p=i.length-1);l.excludes[b]!==void 0&&l.excludes[b].length<10;){for(l.tests={},I.call(o,!0),m=!0,v=0;v<i.length;v++){if(S=m.caret||c.insertMode==0&&S!=null?L.call(o,S):P.call(o,void 0,!0)+1,w=i[v],!(m=se.call(o,S,w,!1,r,!0))){A.call(o,M.call(o))&&(m=h);break}v===p&&(h=m),e==1&&m&&(h={caretPos:v})}if(m)break;if(I.call(o),_=O.call(o,b),l.validPositions=s.extend(!0,[],u),l.tests=s.extend(!0,{},d),h=!1,l.excludes[b])if(_.alternation!=null){let i=C(_);if(l.excludes[b].indexOf(i+`:`+_.alternation)!==-1){h=ne.call(o,e,t,n,r,b-1,a);break}for(l.excludes[b].push(i+`:`+_.alternation),v=b;v<P.call(o,void 0,!0)+1;v++)l.validPositions.splice(b)}else delete l.excludes[b];else{h=ne.call(o,e,t,n,r,b-1,a);break}}}return(!h||c.keepStatic!==!1)&&delete l.excludes[b],h}function re(e,t,n){let r=this.opts,i=this.maskset;switch(r.casing||t.casing){case`upper`:e=e.toLocaleUpperCase();break;case`lower`:e=e.toLocaleLowerCase();break;case`title`:var a=i.validPositions[n-1];e=n===0||a&&a.input===String.fromCharCode(b.Space)?e.toLocaleUpperCase():e.toLocaleLowerCase();break;default:if(typeof r.casing==`function`){let t=Array.prototype.slice.call(arguments);t.push(i.validPositions),e=r.casing.apply(this,t)}}return e}function ie(e,t,n){let r=this.opts.greedy?t:t.slice(0,1),i=!1,a=n===void 0?[]:n.split(`,`),o;for(let t=0;t<a.length;t++)(o=e.indexOf(a[t]))!==-1&&e.splice(o,1);for(let t=0;t<e.length;t++)if(r.includes(e[t])){i=!0;break}return i}function ae(e,t,n,r,i){let a=this,o=this.maskset,s=this.opts;if((s.numericInput||a.isRTL)&&(t===x.Backspace?t=x.Delete:t===x.Delete&&(t=x.Backspace),a.isRTL)){let e=n.end;n.end=n.begin,n.begin=e}let c=P.call(a,void 0,!0);n.end>=M.call(a).length&&c>=n.end&&(n.end=c+1),t===x.Backspace?n.end-n.begin<1&&(n.begin=me.call(a,n.begin)):t===x.Delete&&n.begin===n.end&&(n.end=F.call(a,n.end,!0,!0)?n.end+1:L.call(a,n.end)+1);let l;(l=de.call(a,n))!==!1&&((r!==!0&&s.keepStatic!==!1||s.regex!==null&&O.call(a,n.begin).match.def.indexOf(`|`)!==-1)&&ne.call(a,!0),r!==!0&&(o.p=t===x.Delete?n.begin+l:n.begin,o.p=pe.call(a,{begin:o.p,end:o.p},!1,s.insertMode===!1&&t===x.Backspace?`none`:void 0).begin))}function A(e){let t=this,n=this.opts,r=this.maskset;if(typeof n.isComplete==`function`)return n.isComplete(e,n);if(n.repeat===`*`)return;let i=!1,a=fe.call(t,!0),o=a.l;if(a.def===void 0||a.def.newBlockMarker||a.def.optionality||a.def.optionalQuantifier){i=!0;for(let n=0;n<=o;n++){let a=E.call(t,n).match;if(a.static!==!0&&r.validPositions[n]===void 0&&(a.optionality===!1||a.optionality===void 0||a.optionality&&a.newBlockMarker==0)&&(a.optionalQuantifier===!1||a.optionalQuantifier===void 0)||a.static===!0&&a.def!=``&&e[n]!==w.call(t,n,a)){i=!1;break}}}return i}function oe(e){let t=this,n=+!this.opts.insertMode;return t.isRTL?e.begin-e.end>n:e.end-e.begin>n}function se(e,t,n,r,i,a,o){let s=this,c=this.dependencyLib,l=this.opts,u=s.maskset;n=n===!0;let d=e;e.begin!==void 0&&(d=s.isRTL?e.end:e.begin);function f(e){if(e!==void 0){if(e.remove!==void 0&&(Array.isArray(e.remove)||(e.remove=[e.remove]),e.remove.sort(function(e,t){return s.isRTL?e.pos-t.pos:t.pos-e.pos}).forEach(function(e){de.call(s,{begin:e,end:e+1})}),e.remove=void 0),e.insert!==void 0&&(Array.isArray(e.insert)||(e.insert=[e.insert]),e.insert.sort(function(e,t){return s.isRTL?t.pos-e.pos:e.pos-t.pos}).forEach(function(e){e.c!==``&&se.call(s,e.pos,e.c,e.strict===void 0?!0:e.strict,e.fromIsValid===void 0?r:e.fromIsValid)}),e.insert=void 0),e.refreshFromBuffer&&e.buffer){let t=e.refreshFromBuffer;le.call(s,t===!0?t:t.start,t.end,e.buffer),e.refreshFromBuffer=void 0}e.rewritePosition!==void 0&&(d=e.rewritePosition,e=!0)}return e}function p(t,n,i){let a=!1;return k.call(s,t).every(function(o,d){let p=o.match;if(M.call(s,!0),a=p.jit&&u.validPositions[me.call(s,t)]===void 0?!1:p.fn==null?(n===p.def||n===l.skipOptionalPartCharacter)&&p.def!==``?{c:w.call(s,t,p,!0)||p.def,pos:t}:!1:p.fn.test(n,u,t,i,l,oe.call(s,e)),a!==!1){let i=a.c===void 0?n:a.c,u=t;return i=i===l.skipOptionalPartCharacter&&p.static===!0?w.call(s,t,p,!0)||p.def:i,a=f(a),a!==!0&&a.pos!==void 0&&a.pos!==t&&(u=a.pos),a!==!0&&a.pos===void 0&&a.c===void 0||de.call(s,e,c.extend({},o,{input:re.call(s,i,p,u)}),r,u)===!1&&(a=!1),!1}return!0}),a}let m=!0,h=c.extend(!0,[],u.validPositions);if(l.keepStatic===!1&&u.excludes[d]!==void 0&&i!==!0&&r!==!0)for(let t=d;t<(s.isRTL?e.begin:e.end);t++)u.excludes[t]!==void 0&&(u.excludes[t]=void 0,delete u.tests[t]);if(typeof l.preValidation==`function`&&r!==!0&&a!==!0&&(m=l.preValidation.call(s,M.call(s),d,t,oe.call(s,e),l,u,e,n||i),m=f(m)),m===!0){if(m=p(d,t,n),(!n||r===!0)&&m===!1&&a!==!0){let r=u.validPositions[d];if(r&&r.match.static===!0&&(r.match.def===t||t===l.skipOptionalPartCharacter))m={caret:L.call(s,d)};else if(l.insertMode||u.validPositions[L.call(s,d)]===void 0||e.end>d){let r=!1;if(u.jitOffset[d]&&u.validPositions[L.call(s,d)]===void 0&&(m=se.call(s,d+u.jitOffset[d],t,!0,!0),m!==!1&&(i!==!0&&(m.caret=d),r=!0)),e.end>d&&(u.validPositions[d]=void 0),!r&&!F.call(s,d,l.keepStatic&&d===0)){for(let e=d+1,r=L.call(s,d,!1,d!==0);e<=r;e++)if(m=p(e,t,n),m!==!1){m=ue.call(s,d,m.pos===void 0?e:m.pos)||m,d=e;break}}}}if(s.hasAlternator&&i!==!0&&!n&&(i=!0,m===!1?(l.keepStatic===!0||isFinite(parseInt(l.keepStatic))&&d>=l.keepStatic)&&(m=ne.call(s,d,t,n,r,void 0,e)):m===!0&&(oe.call(s,e)&&u.tests[d]&&u.tests[d].length>1&&l.keepStatic||l.numericInput!==!0&&u.tests[d]&&u.tests[d].length>1&&P.call(s,void 0,!0)>d)&&(m=ne.call(s,!0)||m)),m===!0&&(m={pos:d}),typeof l.postValidation==`function`&&r!==!0&&a!==!0){let r=l.postValidation.call(s,M.call(s,!0),e.begin===void 0?e:s.isRTL?e.end:e.begin,t,m,l,u,n,o,i);r!==void 0&&(m=r===!0?m:r)}}m&&m.pos===void 0&&(m.pos=d),m===!1||a===!0?(I.call(s,!0),u.validPositions=c.extend(!0,[],h)):ue.call(s,void 0,d,!0);let g=f(m);return s.maxLength!==void 0&&M.call(s).length>s.maxLength&&!r&&(I.call(s,!0),u.validPositions=c.extend(!0,[],h),g=!1),g}function ce(e,t,n){let r=this,i=this.maskset,a=!1,o=k.call(r,e);for(let r=0;r<o.length;r++)if(o[r].match&&(o[r].match.nativeDef===t.match[n.shiftPositions?`def`:`nativeDef`]&&(!n.shiftPositions||!t.match.static)||o[r].match.nativeDef===t.match.nativeDef||n.regex&&!o[r].match.static&&o[r].match.fn.test(t.input,i,e,!1,n))){a=!0;break}else if(o[r].match&&o[r].match.def===t.match.nativeDef){a=void 0;break}return a===!1&&i.jitOffset[e]!==void 0&&(a=ce.call(r,e+i.jitOffset[e],t,n)),a}function le(e,t,n){let r=this,i=this.maskset,a=this.opts,o=this.dependencyLib,s,c,l=a.skipOptionalPartCharacter,u=r.isRTL?n.slice().reverse():n;if(a.skipOptionalPartCharacter=``,e===!0)I.call(r,!1),e=0,t=n.length,c=pe.call(r,{begin:0,end:0},!1).begin;else{for(s=e;s<t;s++)delete i.validPositions[s];c=e}let d=new o.Event(`keypress`);for(s=e;s<t;s++){d.key=u[s].toString(),r.ignorable=!1;let e=z.keypressEvent.call(r,d,!0,!1,!1,c);e!==!1&&e!==void 0&&(c=e.forwardPosition)}a.skipOptionalPartCharacter=l}function ue(e,t,n){let r=this,i=this.maskset,a=this.dependencyLib;if(e===void 0)for(e=t-1;e>0&&!i.validPositions[e];e--);for(let c=e;c<t;c++)if(i.validPositions[c]===void 0&&!F.call(r,c,!1)&&(c==0?O.call(r,c):i.validPositions[c-1])){let e=k.call(r,c).slice();e[e.length-1].match.def===``&&e.pop();var o=D.call(r,c,e),s;if(o&&(o.match.jit!==!0||o.match.newBlockMarker===`master`&&(s=i.validPositions[c+1])&&s.match.optionalQuantifier===!0)&&(o=a.extend({},o,{input:w.call(r,c,o.match,!0)||o.match.def}),o.generatedInput=!0,de.call(r,c,o,!0),n!==!0)){let e=i.validPositions[t].input;return i.validPositions[t]=void 0,se.call(r,t,e,!0,!0)}}}function de(e,t,n,r){let i=this,a=this.maskset,o=this.opts,s=this.dependencyLib;function c(e,t,n){let r=t[e];if(r!==void 0&&r.match.static===!0&&r.match.optionality!==!0&&(t[0]===void 0||t[0].alternation===void 0)){let r=n.begin<=e-1?t[e-1]&&t[e-1].match.static===!0&&t[e-1]:t[e-1],i=n.end>e+1?t[e+1]&&t[e+1].match.static===!0&&t[e+1]:t[e+1];return r&&i}return!1}let l=0,u=e.begin===void 0?e:e.begin,d=e.end===void 0?e:e.end,f=!0;if(e.begin>e.end&&(u=e.end,d=e.begin),r=r===void 0?u:r,n===void 0&&(u!==d||o.insertMode&&a.validPositions[r]!==void 0||t===void 0||t.match.optionalQuantifier||t.match.optionality)){let n=s.extend(!0,[],a.validPositions),p=P.call(i,void 0,!0),m;a.p=u;let h=oe.call(i,e)?u:r;for(m=p;m>=h;m--)a.validPositions.splice(m,1),t===void 0&&delete a.tests[m+1];let g=r,_=g,v,y,b;for(t&&(a.validPositions[r]=s.extend(!0,{},t),_++,g++),n[d]==null&&a.jitOffset[d]&&(d+=a.jitOffset[d]+1),m=t?d:d-1;m<=p;m++){if((v=n[m])!==void 0&&v.generatedInput!==!0&&(m>=d||m>=u&&c(m,n,{begin:u,end:d}))){for(;b=O.call(i,_),b.match.def!==``;){if((y=ce.call(i,_,v,o))!==!1||v.match.def===`+`){v.match.def===`+`&&M.call(i,!0);let e=se.call(i,_,v.input,v.match.def!==`+`,!0);if(f=e!==!1,g=(e.pos||_)+1,!f&&y)break}else f=!1;if(f){t===void 0&&v.match.static&&m===e.begin&&l++;break}if(!f&&M.call(i),_>a.maskLength)break;_++}O.call(i,_).match.def==``&&(f=!1),_=g}if(!f)break}if(!f)return a.validPositions=s.extend(!0,[],n),I.call(i,!0),!1}else t&&O.call(i,r).match.cd===t.match.cd&&(a.validPositions[r]=s.extend(!0,{},t));return I.call(i,!0),l}function j(e,t,n,r,i){let o=this,s=this.opts,c;if(t!==void 0){if(Array.isArray(t)&&(n=o.isRTL?t[0]:t[1],t=o.isRTL?t[1]:t[0]),t.begin!==void 0&&(n=o.isRTL?t.begin:t.end,t=o.isRTL?t.end:t.begin),typeof t==`number`){t=r?t:R.call(o,t),n=r?n:R.call(o,n),n=typeof n==`number`?n:t;let l=parseInt(((e.ownerDocument.defaultView||a).getComputedStyle?(e.ownerDocument.defaultView||a).getComputedStyle(e,null):e.currentStyle).fontSize)*n;if(e.scrollLeft=l>e.scrollWidth?l:0,e.inputmask.caretPos={begin:t,end:n},s.insertModeVisual&&s.insertMode===!1&&t===n&&(i||n++),e===e.getRootNode().activeElement){if(`setSelectionRange`in e)e.setSelectionRange(t,n);else if(a.getSelection){if(c=document.createRange(),e.firstChild===void 0||e.firstChild===null){let t=document.createTextNode(``);e.appendChild(t)}c.setStart(e.firstChild,t<e.inputmask._valueGet().length?t:e.inputmask._valueGet().length),c.setEnd(e.firstChild,n<e.inputmask._valueGet().length?n:e.inputmask._valueGet().length),c.collapse(!0);let r=a.getSelection();r.removeAllRanges(),r.addRange(c)}else e.createTextRange&&(c=e.createTextRange(),c.collapse(!0),c.moveEnd(`character`,n),c.moveStart(`character`,t),c.select());e.inputmask.caretHook===void 0||e.inputmask.caretHook.call(o,{begin:t,end:n})}}}else return`selectionStart`in e&&`selectionEnd`in e?(t=e.selectionStart,n=e.selectionEnd):a.getSelection?(c=a.getSelection().getRangeAt(0),(c.commonAncestorContainer.parentNode===e||c.commonAncestorContainer===e)&&(t=c.startOffset,n=c.endOffset)):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),t=0-c.duplicate().moveStart(`character`,-e.inputmask._valueGet().length),n=t+c.text.length),{begin:r?t:R.call(o,t),end:r?n:R.call(o,n)}}function fe(e){let t=this,{maskset:n,dependencyLib:r}=t,i=P.call(t),a={},o=n.validPositions[i],s=T.call(t,!0,P.call(t),!0,!0),c=s.length,l,u=o===void 0?void 0:o.locator.slice(),d;for(l=i+1;l<s.length;l++)d=E.call(t,l,u,l-1),u=d.locator.slice(),a[l]=r.extend(!0,{},d);let f=o&&o.alternation!==void 0?o.locator[o.alternation]:void 0;for(l=c-1;l>i&&(d=a[l],(d.match.optionality||d.match.optionalQuantifier&&d.match.newBlockMarker||f&&(f!==a[l].locator[o.alternation]&&d.match.static!==!0||d.match.static===!0&&d.locator[o.alternation]&&ie.call(t,d.locator[o.alternation].toString().split(`,`),f.toString().split(`,`))&&k.call(t,l)[0].def!==``))&&s[l]===w.call(t,l,d.match));l--)if(c--,d.match.optionality){let e=l;for(;e>0;){let n=O.call(t,e);if(n.match.newBlockMarker===`master`||n.match.newBlockMarker===!0)break;e--}if(n.validPositions[e]!==void 0)break}return l===i&&(c=l),e?{l:c,def:a[c]?a[c].match:void 0}:c}function pe(e,t,n){let r=this,{maskset:i,opts:a}=r,o,s,c;function l(e){if(a.radixPoint!==``&&a.digits!==0){let t=i.validPositions;if(t[e]===void 0||t[e].input===void 0){if(e<L.call(r,-1))return!0;let n=M.call(r).indexOf(a.radixPoint);if(n!==-1){for(let e=0,i=t.length;e<i;e++)if(t[e]&&n<e&&t[e].input!==w.call(r,e))return!1;return!0}}}return!1}if(t&&(r.isRTL?e.end=e.begin:e.begin=e.end),e.begin===e.end){switch(n||=a.positionCaretOnClick,n){case`none`:break;case`select`:e={begin:0,end:M.call(r).length};break;case`ignore`:e.end=e.begin=L.call(r,P.call(r));break;case`radixFocus`:if(r.clicked>1&&i.validPositions.length===0)break;if(l(e.begin)){let t=M.call(r).join(``).indexOf(a.radixPoint);e.end=e.begin=a.numericInput?L.call(r,t):t;break}default:if(o=e.begin,s=P.call(r,o,!0),c=L.call(r,s===-1&&!F.call(r,0)?-1:s),o<=c)e.end=e.begin=F.call(r,o,!1,!0)?o:L.call(r,o);else{let t=i.validPositions[s],n=E.call(r,c,t?t.match.locator:void 0,t),l=w.call(r,c,n.match);if(l!==``&&M.call(r)[c]!==l&&n.match.optionalQuantifier!==!0&&n.match.newBlockMarker!==!0||!F.call(r,c,a.keepStatic,!0)&&n.match.def===l){let e=L.call(r,c);(o>=e||o===c)&&(c=e)}e.end=e.begin=c}}return e}}function M(e){let t=this,{maskset:n}=t;return(n.buffer===void 0||e===!0)&&(n.buffer=T.call(t,!0,P.call(t),!0),n._buffer===void 0&&(n._buffer=n.buffer.slice())),n.buffer}function N(){let e=this,t=this.maskset;return t._buffer===void 0&&(t._buffer=T.call(e,!1,1),t.buffer===void 0&&(t.buffer=t._buffer.slice())),t._buffer}function P(e,t,n){let r=this.maskset,i=-1,a=-1,o=n||r.validPositions;e===void 0&&(e=-1);for(let n=0,r=o.length;n<r;n++)o[n]&&(t||o[n].generatedInput!==!0)&&(n<=e&&(i=n),n>=e&&(a=n));return i===-1||i===e?a:a===-1||e-i<a-e?i:a}function F(e,t,n){let r=this,i=this.maskset,a=E.call(r,e).match;if(a.def===``&&(a=O.call(r,e).match),a.static!==!0)return a.fn;if(n===!0&&i.validPositions[e]!==void 0&&i.validPositions[e].generatedInput!==!0)return!0;if(t!==!0&&e>-1){if(n){let t=k.call(r,e);return t.length>1+ +(t[t.length-1].match.def===``)}let t=D.call(r,e,k.call(r,e)),i=w.call(r,e,t.match);return t.match.def!==i}return!1}function I(e){let t=this.maskset;t.buffer=void 0,e!==!0&&(t.validPositions=[],t.p=0),e===!1&&(t.tests={},t.jitOffset={})}function L(e,t,n){let r=this;n===void 0&&(n=!0);let i=e+1;for(;O.call(r,i).match.def!==``&&(t===!0&&(O.call(r,i).match.newBlockMarker!==!0||!F.call(r,i,void 0,!0))||t!==!0&&!F.call(r,i,void 0,n));)i++;return i}function me(e,t){let n=this,r=e-1;if(e<=0)return 0;for(;r>0&&(t===!0&&(O.call(n,r).match.newBlockMarker!==!0||!F.call(n,r,void 0,!0))||t!==!0&&!F.call(n,r,void 0,!0));)r--;return r}function R(e){let t=this,n=this.opts,r=this.el;return t.isRTL&&typeof e==`number`&&(!n.greedy||n.placeholder!==``)&&r&&(e=t._valueGet().length-e,e<0&&(e=0)),e}const z={keyEvent:function(e,t,n,r,i){let a=this.inputmask,o=a.opts,s=a.dependencyLib,c=a.maskset,l=this,u=s(l),d=e.key,f=j.call(a,l),p=o.onKeyDown.call(this,e,M.call(a),f,o);if(p!==void 0)return p;if(d===x.Backspace||d===x.Delete||y&&d===x.BACKSPACE_SAFARI||e.ctrlKey&&d===x.x&&!(`oncut`in l))e.preventDefault(),ae.call(a,l,d,f),H(l,M.call(a,!0),c.p,e,l.inputmask._valueGet()!==M.call(a).join(``));else if(d===x.End||d===x.PageDown){e.preventDefault();let t=L.call(a,P.call(a));j.call(a,l,e.shiftKey?f.begin:t,t,!0)}else d===x.Home&&!e.shiftKey||d===x.PageUp?(e.preventDefault(),j.call(a,l,0,e.shiftKey?f.begin:0,!0)):o.undoOnEscape&&d===x.Escape&&e.altKey!==!0?(he(l,!0,!1,a.undoValue.split(``)),u.trigger(`click`)):d===x.Insert&&!(e.shiftKey||e.ctrlKey)&&a.userOptions.insertMode===void 0?oe.call(a,f)?o.insertMode=!o.insertMode:(o.insertMode=!o.insertMode,j.call(a,l,f.begin,f.begin)):o.tabThrough===!0&&d===x.Tab?e.shiftKey===!0?(f.end=me.call(a,f.end,!0),O.call(a,f.end-1).match.static===!0&&f.end--,f.begin=me.call(a,f.end,!0),f.begin>=0&&f.end>0&&(e.preventDefault(),j.call(a,l,f.begin,f.end))):(f.begin=L.call(a,f.begin,!0),f.end=L.call(a,f.begin,!0),f.end<c.maskLength&&f.end--,f.begin<=c.maskLength&&(e.preventDefault(),j.call(a,l,f.begin,f.end))):e.shiftKey||(o.insertModeVisual&&o.insertMode===!1?d===x.ArrowRight?setTimeout(function(){let e=j.call(a,l);j.call(a,l,e.begin)},0):d===x.ArrowLeft&&setTimeout(function(){let e={begin:R.call(a,l.inputmask.caretPos.begin),end:R.call(a,l.inputmask.caretPos.end)};a.isRTL?j.call(a,l,e.begin+(e.begin===c.maskLength?0:1)):j.call(a,l,e.begin-(e.begin===0?0:1))},0):a.keyEventHook===void 0||a.keyEventHook(e));return a.isComposing=d===x.Process||d===x.Unidentified,a.ignorable=d===void 0||d.length>1,z.keypressEvent.call(a,e,t,n,r,i)},keypressEvent:function(e,t,n,r,i){let a=this.inputmask||this,o=a.opts,s=a.dependencyLib,c=a.maskset,l=a.el,u=s(l),d=e.key;if(t!==!0&&!(e.ctrlKey&&e.altKey&&!a.ignorable)&&(e.ctrlKey||e.metaKey||a.ignorable))d===x.Enter&&a.undoValue!==a._valueGet(!0)&&(a.undoValue=a._valueGet(!0),setTimeout(function(){u.trigger(`change`)},0));else if(d){let s=t?{begin:i,end:i}:j.call(a,l),u;t||(d=o.substitutes[d]||d),c.writeOutBuffer=!0;let f=se.call(a,s,d,r,void 0,void 0,void 0,t);if(f!==!1&&(I.call(a,!0),u=f.caret===void 0?L.call(a,f.pos.begin?f.pos.begin:f.pos):f.caret,c.p=u),u=o.numericInput&&f.caret===void 0?me.call(a,u):u,n!==!1&&(setTimeout(function(){o.onKeyValidation.call(l,d,f)},0),c.writeOutBuffer&&f!==!1&&H(l,M.call(a),u,e,t!==!0)),e.preventDefault(),t)return f!==!1&&(f.forwardPosition=u),f}},pasteEvent:async function(e){function t(t,n,r,a,o){let s=j.call(t,n,void 0,void 0,!0),c=r.substr(0,s.begin),l=r.substr(s.end,r.length);if(c==(t.isRTL?N.call(t).slice().reverse():N.call(t)).slice(0,s.begin).join(``)&&(c=``),l==(t.isRTL?N.call(t).slice().reverse():N.call(t)).slice(s.end).join(``)&&(l=``),a=c+a+l,t.isRTL&&i.numericInput!==!0){a=a.split(``);for(let e of N.call(t))a[0]===e&&a.shift();a=a.reverse().join(``)}let u=a;if(typeof o==`function`){if(u=o.call(t,u,i),u===!1)return!1;u||=r}he(n,!0,!1,u.toString().split(``),e)}let n=this,r=this.inputmask,i=r.opts,o=r._valueGet(!0),s;r.skipInputEvent=!0,e.clipboardData&&e.clipboardData.getData?s=e.clipboardData.getData(`text/plain`):a.clipboardData&&a.clipboardData.getData&&(s=a.clipboardData.getData(`Text`)),t(r,n,o,s,i.onBeforePaste),e.preventDefault()},inputFallBackEvent:function(e){let t=this.inputmask,n=t.opts,r=t.dependencyLib;function i(e,r,i){let a=e.substr(0,i.begin).split(``),o=e.substr(i.begin).split(``),s=r.substr(0,i.begin).split(``),c=r.substr(i.begin).split(``),l=a.length>=s.length?a.length:s.length,u=o.length>=c.length?o.length:c.length,d,f,p=``,m=[],h;for(;a.length<l;)a.push(`~`);for(;s.length<l;)s.push(`~`);for(;o.length<u;)o.unshift(`~`);for(;c.length<u;)c.unshift(`~`);let g=a.concat(o),_=s.concat(c);for(f=0,d=g.length;f<d;f++)switch(h=w.call(t,R.call(t,f)),p){case`insertText`:_[f-1]===g[f]&&i.begin==g.length-1&&m.push(g[f]),f=d;break;case`insertReplacementText`:g[f]===`~`?i.end++:f=d;break;case`deleteContentBackward`:g[f]===`~`?i.end++:f=d;break;default:g[f]!==_[f]&&((g[f+1]===`~`||g[f+1]===h||g[f+1]===void 0)&&(_[f]===h&&_[f+1]===`~`||_[f]===`~`)||_[f+1]===`~`&&_[f]===g[f+1]?(p=`insertText`,m.push(g[f]),i.begin--,i.end--):g[f]!==h&&g[f]!==`~`&&(g[f+1]===`~`||_[f]!==g[f]&&_[f+1]===g[f+1])?(p=`insertReplacementText`,m.push(g[f]),i.begin--):g[f]===`~`?(p=`deleteContentBackward`,(F.call(t,R.call(t,f),!0)||_[f]===n.radixPoint)&&i.end++):f=d);break}return{action:p,data:m,caret:i}}let a=this,o=a.inputmask._valueGet(!0),s=(t.isRTL?M.call(t).slice().reverse():M.call(t)).join(``),c=j.call(t,a,void 0,void 0,!0),l;if(s!==o){if(l=i(o,s,c),a.getRootNode().activeElement!==a&&a.focus(),H(a,M.call(t)),j.call(t,a,c.begin,c.end,!0),!v&&t.skipNextInsert&&e.inputType===`insertText`&&l.action===`insertText`&&t.isComposing)return!1;switch(e.inputType===`insertCompositionText`&&l.action===`insertText`&&t.isComposing?t.skipNextInsert=!0:t.skipNextInsert=!1,l.action){case`insertText`:case`insertReplacementText`:l.data.forEach(function(e,n){let i=new r.Event(`keypress`);i.key=e,t.ignorable=!1,z.keypressEvent.call(a,i)}),setTimeout(function(){t.$el.trigger(`keyup`)},0);break;case`deleteContentBackward`:var u=new r.Event(`keydown`);u.key=x.Backspace,z.keyEvent.call(a,u);break;default:B(a,o),j.call(t,a,c.begin,c.end,!0);break}e.preventDefault()}},setValueEvent:function(e){let t=this.inputmask,n=t.dependencyLib,r=this,i=e&&e.detail?e.detail[0]:arguments[1];i===void 0&&(i=r.inputmask._valueGet(!0)),B(r,i,new n.Event(`input`),(e&&e.detail?e.detail[0]:arguments[1])!==void 0),(e.detail&&e.detail[1]!==void 0||arguments[2]!==void 0)&&j.call(t,r,e.detail?e.detail[1]:arguments[2])},focusEvent:function(e){let t=this.inputmask,n=t.opts,r=this,i=t&&t._valueGet();n.showMaskOnFocus&&i!==M.call(t).join(``)&&H(r,M.call(t),L.call(t,P.call(t))),n.positionCaretOnTab===!0&&t.mouseEnter===!1&&(!A.call(t,M.call(t))||P.call(t)===-1)&&z.clickEvent.apply(r,[e,!0]),t.undoValue=t&&t._valueGet(!0)},invalidEvent:function(e){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){let e=this.inputmask,t=e.opts,n=this;e.mouseEnter=!1,t.clearMaskOnLostFocus&&n.getRootNode().activeElement!==n&&ge(n,e.originalPlaceholder)},clickEvent:function(e,t){let n=this.inputmask;n.clicked++;let r=this;if(r.getRootNode().activeElement===r){let e=pe.call(n,j.call(n,r),t);e!==void 0&&j.call(n,r,e)}},cutEvent:function(e){let t=this.inputmask,n=t.maskset,r=this,i=j.call(t,r),o=t.isRTL?M.call(t).slice(i.end,i.begin):M.call(t).slice(i.begin,i.end),s=t.isRTL?o.reverse().join(``):o.join(``);a.navigator&&a.navigator.clipboard?a.navigator.clipboard.writeText(s):a.clipboardData&&a.clipboardData.getData&&a.clipboardData.setData(`Text`,s),ae.call(t,r,x.Delete,i),H(r,M.call(t),n.p,e,t.undoValue!==t._valueGet(!0))},blurEvent:function(e){let t=this.inputmask,n=t.opts,r=t.dependencyLib;t.clicked=0;let i=r(this),a=this;if(a.inputmask){ge(a,t.originalPlaceholder);let r=a.inputmask._valueGet(),o=M.call(t).slice();if(r!==``&&(n.clearMaskOnLostFocus&&(P.call(t)===-1&&r===N.call(t).join(``)?o=[]:V.call(t,o)),A.call(t,o)===!1&&(setTimeout(function(){i.trigger(`incomplete`)},0),n.clearIncomplete&&(I.call(t,!1),o=n.clearMaskOnLostFocus?[]:N.call(t).slice())),H(a,o,void 0,e)),r=t._valueGet(!0),t.undoValue!==r){let e=(t.isRTL?N.call(t).slice().reverse():N.call(t)).join(``);(r!==``||t.undoValue!==e||t.undoValue===e&&t.maskset.validPositions.length>0)&&(t.undoValue=r,i.trigger(`change`))}}},mouseenterEvent:function(){let e=this.inputmask,{showMaskOnHover:t}=e.opts,n=this;if(e.mouseEnter=!0,n.getRootNode().activeElement!==n){let r=(e.isRTL?N.call(e).slice().reverse():N.call(e)).join(``);t&&ge(n,r)}},submitEvent:function(){let e=this.inputmask,t=e.opts;e.undoValue!==e._valueGet(!0)&&e.$el.trigger(`change`),P.call(e)===-1&&e._valueGet&&e._valueGet()===N.call(e).join(``)&&e._valueSet(``),t.clearIncomplete&&A.call(e,M.call(e))===!1&&e._valueSet(``),t.removeMaskOnSubmit&&(e._valueSet(e.unmaskedvalue(),!0),setTimeout(function(){H(e.el,M.call(e))},0))},resetEvent:function(){let e=this.inputmask;e.refreshValue=!0,setTimeout(function(){B(e.el,e._valueGet(!0))},0)}};function B(e,t,n,r){let i=e?e.inputmask:this,a=i.opts;e.inputmask.refreshValue=!1,r!==!0&&typeof a.onBeforeMask==`function`&&(t=a.onBeforeMask.call(i,t,a)||t),t=(t||``).toString().split(``),he(e,!0,!1,t,n),i.undoValue=i._valueGet(!0),(a.clearMaskOnLostFocus||a.clearIncomplete)&&e.inputmask._valueGet()===N.call(i).join(``)&&P.call(i)===-1&&e.inputmask._valueSet(``)}function V(e){let t=this;e.length=0;let n=T.call(t,!0,0,!0,void 0,!0),r;for(;(r=n.shift())!==void 0;)e.push(r);return e}function he(e,t,n,r,i){let a=e?e.inputmask:this,o=a.maskset,s=a.opts,c=a.dependencyLib,l=r.slice(),u=``,d=-1,f,p=s.skipOptionalPartCharacter;s.skipOptionalPartCharacter=``;function m(e,t){let n=T.call(a,!0,0).slice(e,L.call(a,e,!1,!1)).join(``).replace(/'/g,``),r=n.indexOf(t);for(;r>0&&n[r-1]===` `;)r--;let i=r===0&&!F.call(a,e)&&(O.call(a,e).match.nativeDef===t.charAt(0)||O.call(a,e).match.static===!0&&O.call(a,e).match.nativeDef===`'`+t.charAt(0)||O.call(a,e).match.nativeDef===` `&&(O.call(a,e+1).match.nativeDef===t.charAt(0)||O.call(a,e+1).match.static===!0&&O.call(a,e+1).match.nativeDef===`'`+t.charAt(0)));if(!i&&r>0&&!F.call(a,e,!1,!0)){let t=L.call(a,e);a.caretPos.begin<t&&(a.caretPos={begin:t})}return i}I.call(a,!1),a.clicked=0,d=s.radixPoint?pe.call(a,{begin:0,end:0},!1,s.__financeInput===!1?`radixFocus`:void 0).begin:0,o.p=d,a.caretPos={begin:d};let h=[],g=a.caretPos;if(l.forEach(function(e,t){if(e!==void 0){let r=new c.Event(`_checkval`);r.key=e,u+=e;let i=P.call(a,void 0,!0);m(d,u)?f=O.call(a,t).match.static===!0?z.keypressEvent.call(a,r,!0,!1,n,i+1):!1:(f=z.keypressEvent.call(a,r,!0,!1,n,a.caretPos.begin),f&&(d=a.caretPos.begin+1,u=``)),f?(f.pos!==void 0&&o.validPositions[f.pos]&&o.validPositions[f.pos].match.static===!0&&o.validPositions[f.pos].alternation===void 0&&(h.push(f.pos),a.isRTL||(f.forwardPosition=f.pos+1)),H.call(a,void 0,M.call(a),f.forwardPosition,r,!1),a.caretPos={begin:f.forwardPosition,end:f.forwardPosition},g=a.caretPos):o.validPositions[t]===void 0&&l[t]===w.call(a,t)&&F.call(a,t,!0)?a.caretPos.begin++:a.caretPos=g}}),h.length>0){let e,t,r=L.call(a,-1,void 0,!1);if(!A.call(a,M.call(a))&&h.length<=r||A.call(a,M.call(a))&&h.length>0&&h.length!==r&&h[0]===0){let i=r;for(;(e=h.shift())!==void 0;)if(e<i){let r=new c.Event(`_checkval`);if(t=o.validPositions[e],t.generatedInput=!0,r.key=t.input,f=z.keypressEvent.call(a,r,!0,!1,n,i),f&&f.pos!==void 0&&f.pos!==e&&o.validPositions[f.pos]&&o.validPositions[f.pos].match.static===!0)h.push(f.pos);else if(!f)break;i++}}else for(;e=h.pop();)t=o.validPositions[e],t&&o.validPositions[e+1]===void 0&&delete o.validPositions[e]}t&&H.call(a,e,M.call(a),f?f.forwardPosition:a.caretPos.begin,i||new c.Event(`checkval`),i&&(i.type===`input`&&a.undoValue!==M.call(a).join(``)||i.type===`paste`)),s.skipOptionalPartCharacter=p}function ge(e,t){let n=e?e.inputmask:this;if(_){if(e.inputmask._valueGet()!==t&&(e.placeholder!==t||e.placeholder===``)){let r=M.call(n).slice(),i=e.inputmask._valueGet();if(i!==t){let t=P.call(n);t===-1&&i===N.call(n).join(``)?r=[]:t!==-1&&V.call(n,r),H(e,r)}}}else e.placeholder!==t&&(e.placeholder=t,e.placeholder===``&&e.removeAttribute(`placeholder`))}function _e(e){let t=e?e.inputmask:this,n=t.opts,r=t.maskset;if(e){if(e.inputmask===void 0)return e.value;e.inputmask&&e.inputmask.refreshValue&&B(e,e.inputmask._valueGet(!0))}let i=[],a=r.validPositions;for(let e=0,t=a.length;e<t;e++)a[e]&&a[e].match&&(a[e].match.static!=1||n.keepStatic!==!0&&Array.isArray(r.metadata)&&a[e].generatedInput!==!0)&&i.push(a[e].input);let o=i.length===0?``:(t.isRTL?i.reverse():i).join(``);if(typeof n.onUnMask==`function`){let e=(t.isRTL?M.call(t).slice().reverse():M.call(t)).join(``);o=n.onUnMask.call(t,e,o,n)}return n.outputMask&&o.length>0?J.format(o,{...n,mask:n.outputMask,alias:null}):o}function H(e,t,n,r,i){let a=e?e.inputmask:this,o=a.opts,s=a.dependencyLib;if(r&&typeof o.onBeforeWrite==`function`){let e=o.onBeforeWrite.call(a,r,t,n,o);if(e){if(e.refreshFromBuffer){let n=e.refreshFromBuffer;le.call(a,n===!0?n:n.start,n.end,e.buffer||t),t=M.call(a,!0)}n!==void 0&&(n=e.caret===void 0?n:e.caret)}}if(e!==void 0&&(e.inputmask._valueSet(t.join(``)),n!==void 0&&(r===void 0||r.type!==`blur`)&&j.call(a,e,n,void 0,void 0,r!==void 0&&r.type===`keydown`&&(r.key===x.Delete||r.key===x.Backspace)),e.inputmask.writeBufferHook===void 0||e.inputmask.writeBufferHook(n),i===!0)){let n=s(e),r=e.inputmask._valueGet();e.inputmask.skipInputEvent=!0,n.trigger(`input`),setTimeout(function(){r===N.call(a).join(``)?n.trigger(`cleared`):A.call(a,t)===!0&&n.trigger(`complete`)},0)}}const U={on:function(e,t,n){let r=e.inputmask.dependencyLib,i=function(t){t.originalEvent&&(t=t.originalEvent||t,arguments[0]=t);let i=this,a=i.inputmask,o=a?a.opts:void 0,s;if(a===void 0&&this.nodeName!==`FORM`){let e=r.data(i,`_inputmask_opts`);r(i).off(),e&&new J(e).mask(i)}else if(![`submit`,`reset`,`setvalue`].includes(t.type)&&this.nodeName!==`FORM`&&(i.disabled||i.readOnly&&!(t.type===`keydown`&&t.ctrlKey&&t.key===x.c||o.tabThrough===!1&&t.key===x.Tab)))t.preventDefault();else{switch(t.type){case`input`:if(a.skipInputEvent===!0)return a.skipInputEvent=!1,t.preventDefault();a.lastInputEvent={time:Date.now(),data:t.data};break;case`keydown`:if(a.lastInputEvent&&Date.now()-a.lastInputEvent.time<10&&a.lastInputEvent.data===t.key)return!1;break;case`click`:case`focus`:if(a.validationEvent)return a.validationEvent=!1,e.blur(),ge(e,(a.isRTL?N.call(a).slice().reverse():N.call(a)).join(``)),setTimeout(function(){e.focus()},o.validationEventTimeOut),!1;s=arguments,setTimeout(function(){e.inputmask&&n.apply(i,s)},0);return}let r=n.apply(i,arguments);return r===!1&&(t.preventDefault(),t.stopPropagation()),r}};t=`${t}.inputmask`,[`submit.inputmask`,`reset.inputmask`].includes(t)?(i=i.bind(e),e.form!==null&&r(e.form).on(t,i)):r(e).on(t,i)},off:function(e,t){if(e.inputmask){let n=e.inputmask.dependencyLib;n(e).off(t||`.inputmask`)}}};function ve(){let e=this,t=this.opts,n=this.el,r=this.dependencyLib;function i(t,n){function i(t){let i,a;function o(t){if(r.valHooks&&(r.valHooks[t]===void 0||r.valHooks[t].inputmaskpatch!==!0)){let i=r.valHooks[t]&&r.valHooks[t].get?r.valHooks[t].get:function(e){return e.value},a=r.valHooks[t]&&r.valHooks[t].set?r.valHooks[t].set:function(e,t){return e.value=t,e};r.valHooks[t]={get:function(t){if(t.inputmask){if(t.inputmask.opts.autoUnmask)return t.inputmask.unmaskedvalue();{let r=i(t);return P.call(e,void 0,void 0,t.inputmask.maskset.validPositions)!==-1||n.nullable!==!0?r:``}}else return i(t)},set:function(e,t){let n=a(e,t);return e.inputmask&&B(e,t),n},inputmaskpatch:!0}}}function s(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():P.call(e)!==-1||n.nullable!==!0?this.getRootNode().activeElement===this&&n.clearMaskOnLostFocus?(e.isRTL?V.call(e,M.call(e).slice()).reverse():V.call(e,M.call(e).slice())).join(``):i.call(this):``:i.call(this)}function c(e){a.call(this,e),this.inputmask&&B(this,e)}function l(e){U.on(e,`mouseenter`,function(){let e=this,t=e.inputmask._valueGet(!0);t!=(e.inputmask.isRTL?M.call(e.inputmask).slice().reverse():M.call(e.inputmask)).join(``)&&B(e,t)})}if(!t.inputmask.__valueGet){if(n.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){let e=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),`value`):void 0;e&&e.get&&e.set?(i=e.get,a=e.set,Object.defineProperty(t,"value",{get:s,set:c,configurable:!0})):t.tagName.toLowerCase()!==`input`&&(i=function(){return this.textContent},a=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:s,set:c,configurable:!0}))}else document.__lookupGetter__&&t.__lookupGetter__(`value`)&&(i=t.__lookupGetter__(`value`),a=t.__lookupSetter__(`value`),t.__defineGetter__(`value`,s),t.__defineSetter__(`value`,c));t.inputmask.__valueGet=i,t.inputmask.__valueSet=a}t.inputmask._valueGet=function(t){return e.isRTL&&t!==!0?i.call(this.el).split(``).reverse().join(``):i.call(this.el)},t.inputmask._valueSet=function(t,n){a.call(this.el,t==null?``:n!==!0&&e.isRTL?t.split(``).reverse().join(``):t)},i===void 0&&(i=function(){return this.value},a=function(e){this.value=e},o(t.type),l(t))}}let a=t.getAttribute(`type`),o=t.tagName.toLowerCase()===`input`&&n.supportsInputType.includes(a)||t.isContentEditable||t.tagName.toLowerCase()===`textarea`;if(!o)if(t.tagName.toLowerCase()===`input`){let e=document.createElement(`input`);e.setAttribute(`type`,a),o=e.type===`text`,e=null}else o=`partial`;return o===!1?t.inputmask=void 0:i(t),o}U.off(n);let a=i(n,t);if(a!==!1){e.originalPlaceholder=n.placeholder,e.maxLength=n===void 0?void 0:n.maxLength,e.maxLength===-1&&(e.maxLength=void 0),`inputMode`in n&&n.getAttribute(`inputmode`)===null&&(n.inputMode=t.inputmode,n.setAttribute(`inputmode`,t.inputmode)),a===!0&&(t.showMaskOnFocus=t.showMaskOnFocus&&[`cc-number`,`cc-exp`].indexOf(n.autocomplete)===-1,y&&(t.insertModeVisual=!1,n.setAttribute(`autocorrect`,`off`)),U.on(n,`submit`,z.submitEvent),U.on(n,`reset`,z.resetEvent),U.on(n,`blur`,z.blurEvent),U.on(n,`focus`,z.focusEvent),U.on(n,`invalid`,z.invalidEvent),U.on(n,`click`,z.clickEvent),U.on(n,`mouseleave`,z.mouseleaveEvent),U.on(n,`mouseenter`,z.mouseenterEvent),U.on(n,`paste`,z.pasteEvent),U.on(n,`cut`,z.cutEvent),U.on(n,`complete`,t.oncomplete),U.on(n,`incomplete`,t.onincomplete),U.on(n,`cleared`,t.oncleared),t.inputEventOnly!==!0&&U.on(n,`keydown`,z.keyEvent),(v||t.inputEventOnly)&&n.removeAttribute(`maxLength`),U.on(n,`input`,z.inputFallBackEvent)),U.on(n,`setvalue`,z.setValueEvent),e.applyMaskHook===void 0||e.applyMaskHook(),N.call(e).join(``),e.undoValue=e._valueGet(!0);let r=n.getRootNode().activeElement;if(n.inputmask._valueGet(!0)!==``||t.clearMaskOnLostFocus===!1||r===n){B(n,n.inputmask._valueGet(!0));let i=M.call(e).slice();A.call(e,i)===!1&&t.clearIncomplete&&I.call(e,!1),t.clearMaskOnLostFocus&&r!==n&&(P.call(e)===-1?i=[]:V.call(e,i)),(t.clearMaskOnLostFocus===!1||t.showMaskOnFocus&&r===n||n.inputmask._valueGet(!0)!==``)&&H(n,i),r===n?j.call(e,n,L.call(e,P.call(e))):j.call(e,n,0)}}}const ye=RegExp(`(\\`+[`/`,`.`,`*`,`+`,`?`,`|`,`(`,`)`,`[`,`]`,`{`,`}`,`\\`,`$`,`^`].join(`|\\`)+`)`,`gim`);function W(e){return e.replace(ye,`\\$1`)}function G(e,t,n,r){this.matches=[],this.openGroup=e||!1,this.alternatorGroup=!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=n||!1,this.isAlternator=r||!1,this.quantifier={min:1,max:1}}function K(e,t){let n;function r(e,{repeat:t,groupmarker:n,quantifiermarker:r,keepStatic:i}){if(t>0||t===`*`||t===`+`){let i=t===`*`?0:t===`+`?1:t;if(i!==t)e=n[0]+e+n[1]+r[0]+i+`,`+t+r[1];else{let t=e;for(let n=1;n<i;n++)e+=t}}if(i===!0){let t=e.match(RegExp(`(.)\\[([^\\]]*)\\]`,`g`));t&&t.forEach((t,n)=>{let[r,i]=t.split(`[`);i=i.replace(`]`,``),e=e.replace(RegExp(`${W(r)}\\[${W(i)}\\]`),r.charAt(0)===i.charAt(0)?`(${r}|${r}${i})`:`${r}[${i}]`)})}return e}function i(e,n,i){let a=!1;(e===null||e===``)&&(a=i.regex!==null,a?(e=i.regex,e=e.replace(/^(\^)(.*)(\$)$/,`$2`)):(a=!0,e=`.*`)),e.length===1&&i.greedy===!1&&i.repeat!==0&&(i.placeholder=``),e=r(e,i);let o,s;return s=a?`regex_`+i.regex:i.numericInput?e.split(``).reverse().join(``):e,i.keepStatic!==null&&(s=`ks_`+i.keepStatic+s),typeof i.placeholder==`object`&&(s=`ph_`+JSON.stringify(i.placeholder)+s),J.prototype.masksCache[s]===void 0||t===!0?(o={mask:e,maskToken:J.prototype.analyseMask(e,a,i),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:n,maskLength:void 0,jitOffset:{}},t!==!0&&(J.prototype.masksCache[s]=o,o=h.extend(!0,{},J.prototype.masksCache[s]))):o=h.extend(!0,{},J.prototype.masksCache[s]),o}if(typeof e.mask==`function`&&(e.mask=e.mask(e)),Array.isArray(e.mask))if(e.mask.length>1){e.keepStatic===null&&(e.keepStatic=!0);let t=e.groupmarker[0];return(e.isRTL?e.mask.reverse():e.mask).forEach(function(n){t.length>1&&(t+=e.alternatormarker),n.mask!==void 0&&typeof n.mask!=`function`?t+=n.mask:t+=n}),t+=e.groupmarker[1],i(t,e.mask,e)}else e.mask=e.mask.pop();return n=e.mask&&e.mask.mask!==void 0&&typeof e.mask.mask!=`function`?i(e.mask.mask,e.mask,e):i(e.mask,e.mask,e),e.keepStatic===null&&(e.keepStatic=!1),n}function be(e,t,n){let r=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,i=/\[\^?]?(?:[^\\\]]+|\\[\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,a=new G,o=[],s=[],c=!1,l,u,d,f,p,m,h=!1;function g(e,r,i){i=i===void 0?e.matches.length:i;let o=e.matches[i-1],s=n.casing?`i`:``;if(t)r.indexOf(`[`)===0||c&&/\\d|\\s|\\w|\\p/i.test(r)||r===`.`?(/\\p\{.*}/i.test(r)&&(s+=`u`),e.matches.splice(i++,0,{fn:new RegExp(r,s),static:!1,optionality:!1,newBlockMarker:o===void 0?`master`:o.def!==r,casing:null,def:r,placeholder:typeof n.placeholder==`object`?n.placeholder[a.matches.length]:void 0,nativeDef:r})):(c&&(r=r[r.length-1]),r.split(``).forEach(function(t,r){o=e.matches[i-1],e.matches.splice(i++,0,{fn:/[a-z]/i.test(n.staticDefinitionSymbol||t)?RegExp(`[`+(n.staticDefinitionSymbol||t)+`]`,s):null,static:!0,optionality:!1,newBlockMarker:o===void 0?`master`:o.def!==t&&o.static!==!0,casing:null,def:n.staticDefinitionSymbol||t,placeholder:n.staticDefinitionSymbol===void 0?typeof n.placeholder==`object`?n.placeholder[a.matches.length]:void 0:t,nativeDef:(c?`'`:``)+t})})),c=!1;else{let t=n.definitions&&n.definitions[r]||n.usePrototypeDefinitions&&J.prototype.definitions[r];t&&!c?(typeof t.validator==`string`&&/\\p\{.*}/i.test(t.validator)&&(s+=`u`),e.matches.splice(i++,0,{fn:t.validator?typeof t.validator==`string`?new RegExp(t.validator,s):new(function(){this.test=t.validator}):/./,static:t.static||!1,optionality:t.optional||!1,defOptionality:t.optional||!1,newBlockMarker:o===void 0||t.optional?`master`:o.def!==(t.definitionSymbol||r),casing:t.casing,def:t.definitionSymbol||r,placeholder:t.placeholder,nativeDef:r,generated:t.generated})):(e.matches.splice(i++,0,{fn:/[a-z]/i.test(n.staticDefinitionSymbol||r)?RegExp(`[`+(n.staticDefinitionSymbol||r)+`]`,s):null,static:!0,optionality:!1,newBlockMarker:o===void 0?`master`:o.def!==r&&o.static!==!0,casing:null,def:n.staticDefinitionSymbol||r,placeholder:n.staticDefinitionSymbol===void 0?void 0:r,nativeDef:(c?`'`:``)+r}),c=!1)}}function _(e){e&&e.matches&&e.matches.forEach(function(r,i){let a=e.matches[i+1];(a===void 0||a.matches===void 0||a.isQuantifier===!1)&&r&&r.isGroup&&(r.isGroup=!1,t||(g(r,n.groupmarker[0],0),r.openGroup!==!0&&g(r,n.groupmarker[1]))),_(r)})}function v(){if(o.length>0){if(f=o[o.length-1],g(f,u),f.isAlternator){p=o.pop();for(let e=0;e<p.matches.length;e++)p.matches[e].isGroup&&(p.matches[e].isGroup=!1);o.length>0?(f=o[o.length-1],f.matches.push(p)):a.matches.push(p)}}else g(a,u)}function y(e){function t(e){return e===n.optionalmarker[0]?e=n.optionalmarker[1]:e===n.optionalmarker[1]?e=n.optionalmarker[0]:e===n.groupmarker[0]?e=n.groupmarker[1]:e===n.groupmarker[1]&&(e=n.groupmarker[0]),e}e.matches=e.matches.reverse();for(let n in e.matches)if(Object.prototype.hasOwnProperty.call(e.matches,n)){let r=parseInt(n);if(e.matches[n].isQuantifier&&e.matches[r+1]&&e.matches[r+1].isGroup){let t=e.matches[n];e.matches.splice(n,1),e.matches.splice(r+1,0,t)}e.matches[n].matches===void 0?e.matches[n]=t(e.matches[n]):e.matches[n]=y(e.matches[n])}return e}function b(e){let t=new G(!0);return t.openGroup=!1,t.matches=e,t}function x(){if(d=o.pop(),d.openGroup=!1,d!==void 0)if(o.length>0){if(f=o[o.length-1],f.matches.push(d),f.isAlternator){p=o.pop();for(let e=0;e<p.matches.length;e++)p.matches[e].isGroup=!1,p.matches[e].alternatorGroup=!1;o.length>0?(f=o[o.length-1],f.matches.push(p)):a.matches.push(p)}}else a.matches.push(d);else v()}function S(e){let t=e.pop();return t.isQuantifier&&(t=b([e.pop(),t])),t}for(t&&(n.optionalmarker[0]=void 0,n.optionalmarker[1]=void 0);l=t?i.exec(e):r.exec(e);){if(u=l[0],t){switch(u.charAt(0)){case`?`:u=`{0,1}`;break;case`+`:case`*`:u=`{`+u+`}`;break;case`|`:if(o.length===0){let e=b(a.matches);e.openGroup=!0,o.push(e),a.matches=[],h=!0}break}switch(u){case`\\d`:u=`[0-9]`;break;case`\\p`:u+=i.exec(e)[0],u+=i.exec(e)[0];break;case`(?:`:case`(?=`:case`(?!`:case`(?<=`:case`(?<!`:break}}if(c){v();continue}switch(u.charAt(0)){case`$`:case`^`:t||v();break;case n.escapeChar:c=!0,t&&v();break;case n.optionalmarker[1]:case n.groupmarker[1]:x();break;case n.optionalmarker[0]:o.push(new G(!1,!0));break;case n.groupmarker[0]:o.push(new G(!0));break;case n.quantifiermarker[0]:{let e=new G(!1,!1,!0);u=u.replace(/[{}?]/g,``);let t=u.split(`|`),n=t[0].split(`,`),r=isNaN(n[0])?n[0]:parseInt(n[0]),i=n.length===1?r:isNaN(n[1])?n[1]:parseInt(n[1]),s=isNaN(t[1])?t[1]:parseInt(t[1]);(r===`*`||r===`+`)&&(r=i===`*`?0:1),e.quantifier={min:r,max:i,jit:s};let c=o.length>0?o[o.length-1].matches:a.matches;l=c.pop(),l.isGroup||(l=b([l])),c.push(l),c.push(e)}break;case n.alternatormarker:if(o.length>0){f=o[o.length-1];let e=f.matches[f.matches.length-1];m=f.openGroup&&(e.matches===void 0||e.isGroup===!1&&e.isAlternator===!1)?o.pop():S(f.matches)}else m=S(a.matches);if(m.isAlternator)o.push(m);else if(m.alternatorGroup?(p=o.pop(),m.alternatorGroup=!1):p=new G(!1,!1,!1,!0),p.matches.push(m),o.push(p),m.openGroup){m.openGroup=!1;let e=new G(!0);e.alternatorGroup=!0,o.push(e)}break;default:v()}}for(h&&x();o.length>0;)d=o.pop(),a.matches.push(d);return a.matches.length>0&&(_(a),s.push(a)),(n.numericInput||n.isRTL)&&y(s[0]),s}const q=a.document,xe=`_inputmask_opts`;function J(e,t,n){if(!(this instanceof J))return new J(e,t,n);this.dependencyLib=h,this.el=void 0,this.events={},this.maskset=void 0,n!==!0&&(Object.prototype.toString.call(e)===`[object Object]`?t=e:(t||={},e&&(t.alias=e)),this.opts=h.extend(!0,{},this.defaults,t),this.noMasksCache=t&&t.definitions!==void 0,this.userOptions=t||{},Se(this.opts.alias,t,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.lastInputEvent=null,this.hasAlternator=!1}J.prototype={dataAttribute:`data-inputmask`,defaults:r,definitions:i,aliases:{},masksCache:{},i18n:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(e){let t=this;return typeof e==`string`&&(e=q.getElementById(e)||q.querySelectorAll(e)),e=e.nodeName?[e]:Array.isArray(e)?e:[].slice.call(e),e.forEach(function(e,n){let r=h.extend(!0,{},t.opts);if(Ce(e,r,h.extend(!0,{},t.userOptions),t.dataAttribute)){let n=K(r,t.noMasksCache);n!==void 0&&(e.inputmask!==void 0&&(e.inputmask.opts.autoUnmask=!0,e.inputmask.remove()),e.inputmask=new J(void 0,void 0,!0),e.inputmask.opts=r,e.inputmask.noMasksCache=t.noMasksCache,e.inputmask.userOptions=h.extend(!0,{},t.userOptions),e.inputmask.el=e,e.inputmask.$el=h(e),e.inputmask.maskset=n,h.data(e,xe,t.userOptions),ve.call(e.inputmask))}}),e&&e[0]&&e[0].inputmask||this},option:function(e,t){if(typeof e==`string`)return this.opts[e];if(typeof e==`object`)return h.extend(this.userOptions,e),this.el&&t!==!0&&this.mask(this.el),this},unmaskedvalue:function(e){if(this.maskset=this.maskset||K(this.opts,this.noMasksCache),this.el===void 0||e!==void 0){let t=(typeof this.opts.onBeforeMask==`function`&&this.opts.onBeforeMask.call(this,e,this.opts)||e).split(``);he.call(this,void 0,!1,!1,t),typeof this.opts.onBeforeWrite==`function`&&this.opts.onBeforeWrite.call(this,void 0,M.call(this),0,this.opts)}return _e.call(this,this.el)},remove:function(){if(this.el){h.data(this.el,xe,null);let e=this.opts.autoUnmask?_e(this.el):this._valueGet(this.opts.autoUnmask);e===N.call(this).join(``)?this._valueSet(``):this._valueSet(e,this.opts.autoUnmask),U.off(this.el);let t;Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?(t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),`value`),t&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0})):q.__lookupGetter__&&this.el.__lookupGetter__(`value`)&&this.__valueGet&&(this.el.__defineGetter__(`value`,this.__valueGet),this.el.__defineSetter__(`value`,this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||K(this.opts,this.noMasksCache),(this.isRTL?N.call(this).reverse():N.call(this)).join(``)},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||K(this.opts,this.noMasksCache),A.call(this,M.call(this))},getmetadata:function(){if(this.maskset=this.maskset||K(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){let e=T.call(this,!0,0,!1).join(``);return this.maskset.metadata.forEach(function(t){return t.mask===e?(e=t,!1):!0}),e}return this.maskset.metadata},isValid:function(e){if(this.maskset=this.maskset||K(this.opts,this.noMasksCache),e){let t=(typeof this.opts.onBeforeMask==`function`&&this.opts.onBeforeMask.call(this,e,this.opts)||e).split(``);he.call(this,void 0,!0,!1,t)}let t=V.call(this,[]),n=A.call(this,t),r=e===(this.isRTL?t.reverse().join(``):t.join(``));return n&&(e===void 0||r)},format:function(e,t){this.maskset=this.maskset||K(this.opts,this.noMasksCache);let n=(typeof this.opts.onBeforeMask==`function`&&this.opts.onBeforeMask.call(this,e,this.opts)||e).split(``);he.call(this,void 0,!0,!1,n);let r=this.isRTL?M.call(this).slice().reverse().join(``):M.call(this).join(``);return t?{value:r,metadata:this.getmetadata()}:r},setValue:function(e){this.el&&h(this.el).trigger(`setvalue`,[e])},analyseMask:be};function Se(e,t,n){let r=J.prototype.aliases[e];return r?(r.alias&&Se(r.alias,void 0,n),h.extend(!0,n,r),h.extend(!0,n,t),!0):(n.mask===null&&(n.mask=e),!1)}function Ce(e,t,n,r){function i(t,i){let o=r===``?t:r+`-`+t;i=i===void 0?e.getAttribute(o):i,i!==null&&(typeof i==`string`&&(t.startsWith(`on`)?i=a[i]:i===`false`?i=!1:i===`true`?i=!0:t===`mask`&&(i=i.replace(/\\\\/g,`\\`))),n[t]=i)}if(t.importDataAttributes===!0){let a=e.getAttribute(r),o,s,c,l;if(a&&a!==``&&(a=a.replace(/'/g,`"`),s=JSON.parse(`{`+a+`}`)),s){for(l in c=void 0,s)if(l.toLowerCase()===`alias`){c=s[l];break}}for(o in i(`alias`,c),n.alias&&Se(n.alias,n,t),t){if(s){for(l in c=void 0,s)if(l.toLowerCase()===o.toLowerCase()){c=s[l];break}}i(o,c)}}return h.extend(!0,t,n),(e.dir===`rtl`||t.rightAlign)&&(e.style.textAlign=`right`),(e.dir===`rtl`||t.numericInput)&&(e.dir=`ltr`,e.removeAttribute(`dir`),t.isRTL=!0),Object.keys(n).length}J.extendDefaults=function(e){h.extend(!0,J.prototype.defaults,e)},J.extendDefinitions=function(e){h.extend(!0,J.prototype.definitions,e)},J.extendAliases=function(e){h.extend(!0,J.prototype.aliases,e)},J.format=function(e,t,n){return J(t).format(e,n)},J.unmask=function(e,t){return J(t).unmaskedvalue(e)},J.isValid=function(e,t){return J(t).isValid(e)},J.remove=function(e){typeof e==`string`&&(e=q.getElementById(e)||q.querySelectorAll(e)),e=e.nodeName?[e]:e;for(let t=0;t<e.length;t++)e[t].inputmask&&e[t].inputmask.remove()},J.setValue=function(e,t){typeof e==`string`&&(e=q.getElementById(e)||q.querySelectorAll(e)),e=e.nodeName?[e]:e,e.forEach(function(e){e.inputmask?e.inputmask.setValue(t):h(e).trigger(`setvalue`,[t])})},J.dependencyLib=h,a.Inputmask=J,J.extendDefinitions({A:{validator:`[A-Za-zА-яЁёÀ-ÿµ]`,casing:`upper`},"&":{validator:`[0-9A-Za-zА-яЁёÀ-ÿµ]`,casing:`upper`},"#":{validator:`[0-9A-Fa-f]`,casing:`upper`}});const we=/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/;function Te(e,t,n,r,i){if(n-1>-1&&t.buffer[n-1]!==`.`?(e=t.buffer[n-1]+e,e=n-2>-1&&t.buffer[n-2]!==`.`?t.buffer[n-2]+e:`0`+e):e=`00`+e,i.greedy&&parseInt(e)>255&&we.test(`00`+e.charAt(2))){let r=[...t.buffer.slice(0,n),`.`,e.charAt(2)];if(r.join(``).match(/\./g).length<4)return{refreshFromBuffer:!0,buffer:r,caret:n+2}}return we.test(e)}J.extendAliases({cssunit:{regex:`[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)`},url:{regex:`(https?|ftp)://.*`,autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:`i{1,3}.j{1,3}.k{1,3}.l{1,3}`,definitions:{i:{validator:Te},j:{validator:Te},k:{validator:Te},l:{validator:Te}},onUnMask:function(e,t,n){return e},inputmode:`decimal`,substitutes:{",":`.`}},email:{mask:function({separator:e,quantifier:t}){let n=`*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]`,r=n;if(e)for(let i=0;i<t;i++)r+=`[${e}${n}]`;return r},greedy:!1,casing:`lower`,separator:null,quantifier:5,skipOptionalPartCharacter:``,onBeforePaste:function(e,t){return e=e.toLowerCase(),e.replace(`mailto:`,``)},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:`[0-9A-Za-z-]`}},onUnMask:function(e,t,n){return e},inputmode:`email`},mac:{mask:`##:##:##:##:##:##`},vin:{mask:`V{13}9{4}`,definitions:{V:{validator:`[A-HJ-NPR-Za-hj-npr-z\\d]`,casing:`upper`}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:`999-99-9999`,postValidation:function(e,t,n,r,i,a,o){let s=T.call(this,!0,P.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(s.join(``))}}}),J.dependencyLib.extend(!0,J.prototype.i18n,{dayNames:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],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`],ordinalSuffix:[`st`,`nd`,`rd`,`th`]});const Ee=J.dependencyLib;var De=class{constructor(e,t,n,r){this.mask=e,this.format=t,this.opts=n,this.inputmask=r,this._date=new Date(1,0,1),this.initDateObject(e,this.opts,this.inputmask)}get date(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date}initDateObject(e,t,n){let r,i=-1;for(Z(t).lastIndex=0;r=Z(t).exec(this.format);)if(r.index>=i){let a=/\d+$/.exec(r[0]),o=a?r[0][0]+`x`:r[0],s;if(e!==void 0){if(a){let i=Z(t).lastIndex,a=He.call(n,r.index,t,n&&n.maskset);Z(t).lastIndex=i,s=e.slice(0,e.indexOf(a.nextMatch[0]))}else{let a=r[0][0],c=r.index;for(;n&&(t.placeholder[`${r.index}'${O.call(n,c).match.placeholder}`]||O.call(n,c).match.placeholder)===a;)c++;i=c;let l=c-r.index;s=e.slice(0,l||X(o)&&X(o)[4]||o.length)}e=e.slice(s.length)}Object.prototype.hasOwnProperty.call(Ae,o)&&this.setValue(this,s,o,X(o)[2],X(o)[1])}}setValue(e,t,n,r,i){if(t!==void 0)switch(r){case`ampm`:e[r]=t,e[`raw`+r]=t.replace(/\s/g,`_`);break;case`month`:if(n===`MMM`||n===`MMMM`){n===`MMM`?e[r]=Q(Y.monthNames.slice(0,12).findIndex(e=>t.toLowerCase()===e.toLowerCase())+1,2):e[r]=Q(Y.monthNames.slice(12,24).findIndex(e=>t.toLowerCase()===e.toLowerCase())+1,2),e[r]=e[r]===`00`?``:e[r].toString(),e[`raw`+r]=e[r];break}default:e[r]=t.replace(/[^0-9]/g,`0`),e[`raw`+r]=t.replace(/\s/g,`_`)}if(i!==void 0){let t=e[r];(r===`day`&&parseInt(t)===29||r===`month`&&parseInt(t)===2)&&parseInt(e.day)===29&&parseInt(e.month)===2&&(e.year===``||e.year===void 0)&&e._date.setFullYear(2012,1,29),r===`day`&&(Oe=!0,parseInt(t)===0&&(t=1)),r===`month`&&(Oe=!0),r===`year`&&(Oe=!0,t.length<X(n)[4]&&(t=Q(t,X(n)[4],!0))),(t!==``&&!isNaN(t)||r===`ampm`)&&i.call(e._date,t)}}reset(){this._date=new Date(1,0,1)}reInit(){this._date=void 0,this.date}};let Oe=!1;const ke=new Date().getFullYear(),Y=J.prototype.i18n,Ae={d:[`[1-9]|[12][0-9]|3[01]`,Date.prototype.setDate,`day`,Date.prototype.getDate],dd:[`0[1-9]|[12][0-9]|3[01]`,Date.prototype.setDate,`day`,function(){return Q(Date.prototype.getDate.call(this),2)}],ddd:[``],dddd:[``],M:[`[1-9]|1[012]`,function(e){let t=e?parseInt(e):0;return t>0&&t--,Date.prototype.setMonth.call(this,t)},`month`,function(){return Date.prototype.getMonth.call(this)+1}],MM:[`0[1-9]|1[012]`,function(e){let t=e?parseInt(e):0;return t>0&&t--,Date.prototype.setMonth.call(this,t)},`month`,function(){return Q(Date.prototype.getMonth.call(this)+1,2)}],MMM:[Y.monthNames.slice(0,12).join(`|`),function(e){let t=Y.monthNames.slice(0,12).findIndex(t=>e.toLowerCase()===t.toLowerCase());return t===-1?!1:Date.prototype.setMonth.call(this,t)},`month`,function(){return Y.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],MMMM:[Y.monthNames.slice(12,24).join(`|`),function(e){let t=Y.monthNames.slice(12,24).findIndex(t=>e.toLowerCase()===t.toLowerCase());return t===-1?!1:Date.prototype.setMonth.call(this,t)},`month`,function(){return Y.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:[`[0-9]{2}`,function(e){let t=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,`${t}${e}`)},`year`,function(){return Q(Date.prototype.getFullYear.call(this),2)},2],yyyy:[`[0-9]{4}`,Date.prototype.setFullYear,`year`,function(){return Q(Date.prototype.getFullYear.call(this),4)},4],h:[`[1-9]|1[0-2]`,Date.prototype.setHours,`hours`,Date.prototype.getHours],hh:[`0[1-9]|1[0-2]`,Date.prototype.setHours,`hours`,function(){return Q(Date.prototype.getHours.call(this),2)}],hx:[function(e){return`[0-9]{${e}}`},Date.prototype.setHours,`hours`,function(e){return Date.prototype.getHours}],H:[`1?[0-9]|2[0-3]`,Date.prototype.setHours,`hours`,Date.prototype.getHours],HH:[`0[0-9]|1[0-9]|2[0-3]`,Date.prototype.setHours,`hours`,function(){return Q(Date.prototype.getHours.call(this),2)}],Hx:[function(e){return`[0-9]{${e}}`},Date.prototype.setHours,`hours`,function(e){return function(){return Q(Date.prototype.getHours.call(this),e)}}],m:[`[1-5]?[0-9]`,Date.prototype.setMinutes,`minutes`,Date.prototype.getMinutes],mm:[`0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]`,Date.prototype.setMinutes,`minutes`,function(){return Q(Date.prototype.getMinutes.call(this),2)}],s:[`[1-5]?[0-9]`,Date.prototype.setSeconds,`seconds`,Date.prototype.getSeconds],ss:[`0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]`,Date.prototype.setSeconds,`seconds`,function(){return Q(Date.prototype.getSeconds.call(this),2)}],l:[`[0-9]{3}`,Date.prototype.setMilliseconds,`milliseconds`,function(){return Q(Date.prototype.getMilliseconds.call(this),3)},3],L:[`[0-9]{2}`,Date.prototype.setMilliseconds,`milliseconds`,function(){return Q(Date.prototype.getMilliseconds.call(this),2)},2],t:[`[ap]`,Ne,`ampm`,Pe,1],tt:[`[ap]m`,Ne,`ampm`,Pe,2],T:[`[AP]`,Ne,`ampm`,Pe,1],TT:[`[AP]M`,Ne,`ampm`,Pe,2],Z:[`.*`,void 0,`Z`,Fe],o:[``],S:[``]},je={D:`d`,DD:`dd`,DDD:`ddd`,DDDD:`dddd`,YY:`yy`,YYYY:`yyyy`,sss:`L`},Me={isoDate:`yyyy-MM-dd`,isoTime:`HH:mm:ss`,isoDateTime:`yyyy-MM-dd\\THH:mm:ss`,isoUtcDateTime:`UTC:yyyy-MM-dd\\THH:mm:ss\\Z`};function Ne(e){let t=this.getHours();e.toLowerCase().includes(`p`)?this.setHours(t+12):e.toLowerCase().includes(`a`)&&t>=12&&this.setHours(t-12)}function Pe(){let e=this.getHours();return e||=12,e>=12?`PM`:`AM`}function Fe(){let{1:e}=this.toString().match(/\((.+)\)/);return e.includes(` `)&&(e=e.replace(`-`,` `).toUpperCase(),e=e.split(` `).map(([e])=>e).join(``)),e}function X(e){let t=je[e]||e,n=/\d+$/.exec(t);if(n&&n[0]!==void 0){let e=Ae[t[0]+`x`].slice(``);return e[0]=e[0](n[0]),e[3]=e[3](n[0]),e}else if(Ae[t])return Ae[t]}function Z(e){if(!e.tokenizer){let t=[],n=[],r=Object.keys(Ae).concat(Object.keys(je));for(let e of r)if(/\.*x$/.test(e)){let t=e[0]+`\\d+`;n.indexOf(t)===-1&&n.push(t)}else t.indexOf(e[0])===-1&&t.push(e[0]);e.tokenizer=`(`+(n.length>0?n.join(`|`)+`|`:``)+t.join(`+|`)+`+)+?|.`,e.tokenizer=new RegExp(e.tokenizer,`g`)}return e.tokenizer}function Ie(e,t,n){if(e.year!==e.rawyear){let r=ke.toString(),i=e.rawyear.replace(/[^0-9]/g,``),a=r.slice(0,i.length),o=r.slice(i.length);if(i.length===2&&i===a){let i=new Date(ke,e.month-1,e.day);e.day==i.getDate()&&(!n.max||n.max.date.getTime()>=i.getTime())&&(e.date.setFullYear(ke),e.year=r,t.insert=[{pos:t.pos+1,c:o[0]},{pos:t.pos+2,c:o[1]}])}}return t}function Le(e,t,n){let r=this;if(!Oe)return!0;if(e.rawday===void 0||!isFinite(e.rawday)&&new Date(e.date.getFullYear(),isFinite(e.rawmonth)?e.month:e.date.getMonth()+1,0).getDate()>=e.day||e.day==`29`&&(!isFinite(e.rawyear)||e.rawyear===void 0||e.rawyear===``)||new Date(e.date.getFullYear(),isFinite(e.rawmonth)?e.month:e.date.getMonth()+1,0).getDate()>=e.day)return t;if(e.day==`29`){let e=He.call(r,t.pos,n,r.maskset);if(e.targetMatch&&[`yyyy`,`YYYY`].includes(e.targetMatch[0])&&t.pos-e.targetMatchIndex===2)return t.remove=t.pos+1,t}else if(e.date.getMonth()==2&&e.day==`30`&&t.c!==void 0)return e.day=`03`,e.date.setDate(3),e.date.setMonth(1),t.insert=[{pos:t.pos,c:`0`},{pos:t.pos+1,c:t.c}],t.caret=L.call(this,t.pos+1),t;return!1}function Re(e,t,n,r,i){if(!t)return t;if(t&&n.min&&!isNaN(n.min.date.getTime())){let i;for(e.reset(),Z(n).lastIndex=0;i=Z(n).exec(n.inputFormat);){var a;if((a=X(i[0]))&&a[3]){let t=a[1],o=e[a[2]],s=n.min[a[2]],c=n.max?n.max[a[2]]:s+1,l=[],u=!1;for(let t=0;t<s.length;t++)r.validPositions[t+i.index]===void 0&&!u?(t+i.index==0&&o[t]<s[t]?(l[t]=o[t],u=!0):l[t]=s[t],a[2]===`year`&&o.length-1==t&&s!=c&&(l=(parseInt(l.join(``))+1).toString().split(``)),a[2]===`ampm`&&s!=c&&n.min.date.getTime()>e.date.getTime()&&(l[t]=c[t])):(l[t]=o[t],u||=o[t]>s[t]);t.call(e._date,l.join(``))}}t=n.min.date.getTime()<=e.date.getTime(),e.reInit()}return t&&n.max&&(isNaN(n.max.date.getTime())||(t=n.max.date.getTime()>=e.date.getTime())),t}function ze(e,t,n){let r=``,i,a,o=0,s=!1,c={};for(Z(n).lastIndex=0;i=Z(n).exec(e);)if(i[0]===n.escapeChar)s=!0;else{if(t===void 0)if(!s&&(a=X(i[0])))r+=`(`+a[0]+`)`,n.placeholder&&n.placeholder!==``?(c[o]=n.placeholder[i.index%n.placeholder.length],c[`${i.index}'${n.placeholder[i.index%n.placeholder.length]}`]=i[0].charAt(0)):c[o]=i[0].charAt(0);else switch(i[0]){case`[`:r+=`(`;break;case`]`:r+=`)?`;break;default:r+=W(i[0]),c[o]=i[0].charAt(0)}else if(!s&&(a=X(i[0])))if(a[3]){let e=a[3];r+=e.call(t.date)}else a[2]&&t[`raw`+a[2]]!==void 0?r+=t[`raw`+a[2]]:r+=i[0];else r+=i[0];o++,s=!1}return t===void 0&&(n.placeholder=c),r}function Q(e,t,n){for(e=String(e),t||=2;e.length<t;)e=n?e+`0`:`0`+e;return e}function Be(e,t,n){let r=this;if(typeof e==`string`)return new De(e,t,n,r);if(e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`date`))return e}function Ve(e,t){return ze(t.inputFormat,{date:e},t)}function He(e,t,n){let r=this,i=0,a,o,s=0;for(Z(t).lastIndex=0;o=Z(t).exec(t.inputFormat);){let c=/\d+$/.exec(o[0]);if(c)s=parseInt(c[0]);else{let e=o[0][0],n=i;for(;r&&(t.placeholder[`${o.index}'${O.call(r,n).match.placeholder}`]||O.call(r,n).match.placeholder)===e;)n++;s=n-i,s===0&&(s=o[0].length)}if(i+=s,i>=e+1){let r=``;if(n&&n.tests[e]){let a=Object.keys(t.placeholder).filter(t=>{for(let r=o.index-1;r<i;r++)if(t===`${r}'${n.tests[e][0].match.placeholder}`)return!0;return!1});r=a.length>0?t.placeholder[a[0]]:n.tests[e][0].match.placeholder}if(o[0].indexOf(r)!==-1){a=o,o=Z(t).exec(t.inputFormat);break}}}return{targetMatchIndex:i-s,nextMatch:o,targetMatch:a}}J.extendAliases({datetime:{mask:function(e){if(e.numericInput=!1,Ae.S=Y.ordinalSuffix.join(`|`),e.inputFormat=Me[e.inputFormat]||e.inputFormat,e.repeat&&(e.repeat=parseInt(e.repeat.toString()),e.repeat>0)){let t=``;for(let n=0;n<e.repeat;n++)t+=e.inputFormat;e.inputFormat=t,e.repeat=0}return e.displayFormat=Me[e.displayFormat]||e.displayFormat||e.inputFormat,e.outputFormat=Me[e.outputFormat]||e.outputFormat||e.inputFormat,e.regex=ze(e.inputFormat,void 0,e),e.min=Be(e.min,e.inputFormat,e),e.max=Be(e.max,e.inputFormat,e),null},placeholder:``,inputFormat:`isoDateTime`,displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:``,preValidation:function(e,t,n,r,i,a,o,s){let c=this;if(s)return!0;if(isNaN(n)&&e[t]!==n){let r=He.call(c,t,i,a);if(r.nextMatch&&r.nextMatch[0]===n&&r.targetMatch[0].length>1){let n=X(r.targetMatch[0])[0];if(new RegExp(n).test(`0`+e[t-1]))return e[t]=e[t-1],e[t-1]=`0`,{fuzzy:!0,buffer:e,refreshFromBuffer:{start:t-1,end:t+1},pos:t+1}}}return!0},postValidation:function(e,t,n,r,i,a,o,s){let c=this;if(o)return!0;let l,u;if(r===!1&&(l=He.call(c,t+1,i,a),l.targetMatch&&l.targetMatchIndex===t&&l.targetMatch[0].length>1&&X(l.targetMatch[0])!==void 0?u=X(l.targetMatch[0])[0]:(l=He.call(c,t+2,i,a),l.targetMatch&&l.targetMatchIndex===t+1&&l.targetMatch[0].length>1&&X(l.targetMatch[0])!==void 0&&(u=X(l.targetMatch[0]))),u!==void 0&&(t=l.targetMatchIndex,a.validPositions[t+1]!==void 0&&new RegExp(u).test(n+`0`)?(e[t]=n,e[t+1]=`0`,r={pos:t+2,caret:t+1}):new RegExp(u).test(`0`+n)&&(e[t]=`0`,e[t+1]=n,r={pos:t+2})),r===!1))return r;if(r.fuzzy&&(e=r.buffer,t=r.pos),l=He.call(c,t,i,a),l.targetMatch&&l.targetMatch[0]&&X(l.targetMatch[0])!==void 0){let n=X(l.targetMatch[0]);u=n[0];let r=e.slice(l.targetMatchIndex,l.targetMatchIndex+l.targetMatch[0].length);if(new RegExp(u).test(r.join(``))===!1&&l.targetMatch[0].length===2&&a.validPositions[l.targetMatchIndex]&&a.validPositions[l.targetMatchIndex+1]&&(a.validPositions[l.targetMatchIndex+1].input=`0`),n[2]==`year`){let n=T.call(c,!1,1,void 0,!0);for(let r=t+1;r<e.length;r++)e[r]=n[r],a.validPositions.splice(t+1,1)}}let d=r,f=Be.call(c,e.join(``),i.inputFormat,i);return d&&!isNaN(f.date.getTime())&&(i.prefillYear&&(d=Ie(f,d,i)),d=Le.call(c,f,d,i),d=Re(f,d,i,a,s)),t!==void 0&&d&&r.pos!==t?{buffer:ze(i.inputFormat,f,i).split(``),refreshFromBuffer:{start:t,end:r.pos},pos:r.caret===void 0?r.pos:r.caret}:d},onKeyDown:function(e,t,n,r){let i=this;e.ctrlKey&&e.key===x.ArrowRight&&(i.inputmask._valueSet(Ve(new Date,r)),Ee(i).trigger(`setvalue`))},onUnMask:function(e,t,n){let r=this;return t&&ze(n.outputFormat,Be.call(r,e,n.inputFormat,n),n)},casing:function(e,t,n,r){if(t.nativeDef.indexOf(`[ap]`)==0)return e.toLowerCase();if(t.nativeDef.indexOf(`[AP]`)==0)return e.toUpperCase();let i=O.call(this,[n-1]);return i.match.def.indexOf(`[AP]`)==0||n===0||i&&i.input===String.fromCharCode(b.Space)||i&&i.match.def===String.fromCharCode(b.Space)||t.static&&t.def===t.def.toUpperCase()?e.toUpperCase():e.toLowerCase()},onBeforeMask:function(e,t){return Object.prototype.toString.call(e)===`[object Date]`&&(e=Ve(e,t)),e},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:`numeric`,prefillYear:!0}});const Ue=J.dependencyLib;function We(e,t){let n=``;for(let r=0;r<e.length;r++)J.prototype.definitions[e.charAt(r)]||t.definitions[e.charAt(r)]||t.optionalmarker[0]===e.charAt(r)||t.optionalmarker[1]===e.charAt(r)||t.quantifiermarker[0]===e.charAt(r)||t.quantifiermarker[1]===e.charAt(r)||t.groupmarker[0]===e.charAt(r)||t.groupmarker[1]===e.charAt(r)||t.alternatormarker===e.charAt(r)?n+=`\\`+e.charAt(r):n+=e.charAt(r);return n}function $(e,t,n,r){if(e.length>0&&t>0&&(!n.digitsOptional||r)){var i=e.indexOf(n.radixPoint),a=!1;n.negationSymbol.back===e[e.length-1]&&(a=!0,e.length--),i===-1&&(e.push(n.radixPoint),i=e.length-1);for(let n=1;n<=t;n++)isFinite(e[i+n])||(e[i+n]=`0`)}return a&&e.push(n.negationSymbol.back),e}function Ge(e,t){let n=0;e===`+`&&(n=L.call(this,t.validPositions.length-1));for(let r in t.tests)if(r=parseInt(r),r>=n){for(let n=0,i=t.tests[r].length;n<i;n++)if((t.validPositions[r]===void 0||e===`-`)&&t.tests[r][n].match.def===e)return r+ +(t.validPositions[r]!==void 0&&e!==`-`)}return n}function Ke(e,t){let n=-1;for(let r=0,i=t.validPositions.length;r<i;r++){let i=t.validPositions[r];if(i&&i.match.def===e){n=r;break}}return n}function qe(e){e.parseMinMaxOptions===void 0&&(e.min!==null&&(e.min=e.min.toString().replace(new RegExp(W(e.groupSeparator),`g`),``),e.radixPoint===`,`&&(e.min=e.min.replace(e.radixPoint,`.`)),e.min=isFinite(e.min)?parseFloat(e.min):NaN,isNaN(e.min)&&(e.min=Number.MIN_VALUE)),e.max!==null&&(e.max=e.max.toString().replace(new RegExp(W(e.groupSeparator),`g`),``),e.radixPoint===`,`&&(e.max=e.max.replace(e.radixPoint,`.`)),e.max=isFinite(e.max)?parseFloat(e.max):NaN,isNaN(e.max)&&(e.max=Number.MAX_VALUE)),e.parseMinMaxOptions=`done`)}function Je(e){e.repeat=0,e.groupSeparator===e.radixPoint&&e.digits&&e.digits!==`0`&&(e.radixPoint===`.`?e.groupSeparator=`,`:e.radixPoint===`,`?e.groupSeparator=`.`:e.groupSeparator=``),e.groupSeparator===` `&&(e.skipOptionalPartCharacter=void 0),e.placeholder.length>1&&(e.placeholder=e.placeholder.charAt(0)),e.positionCaretOnClick===`radixFocus`&&e.placeholder===``&&(e.positionCaretOnClick=`lvp`);let t=`0`,n=e.radixPoint;e.numericInput===!0&&e.__financeInput===void 0?(t=`1`,e.positionCaretOnClick=e.positionCaretOnClick===`radixFocus`?`lvp`:e.positionCaretOnClick,e.digitsOptional=!1,isNaN(e.digits)&&(e.digits=e.digits.indexOf(`,`)===-1?2:e.digits.split(`,`)[0]),e._radixDance=!1,n=e.radixPoint===`,`?`?`:`!`,e.radixPoint!==``&&e.definitions[n]===void 0&&(e.definitions[n]={},e.definitions[n].validator=`[`+e.radixPoint+`]`,e.definitions[n].placeholder=e.radixPoint,e.definitions[n].static=!0,e.definitions[n].generated=!0)):(e.__financeInput=!1,e.numericInput=!0);let r=`[+]`,i;if(r+=We(e.prefix,e),e.groupSeparator===``?r+=`9{+}`:(e.definitions[e.groupSeparator]===void 0&&(e.definitions[e.groupSeparator]={},e.definitions[e.groupSeparator].validator=`[`+e.groupSeparator+`]`,e.definitions[e.groupSeparator].placeholder=e.groupSeparator,e.definitions[e.groupSeparator].static=!0,e.definitions[e.groupSeparator].generated=!0),r+=e._mask(e)),e.digits!==void 0&&e.digits!==0){let a=e.digits.toString().split(`,`);isFinite(a[0])&&a[1]&&isFinite(a[1])?r+=n+t+`{`+e.digits+`}`:(isNaN(e.digits)||parseInt(e.digits)>0)&&(e.digitsOptional||e.jitMasking?(i=r+n+t+`{0,`+e.digits+`}`,e.keepStatic=!0):r+=n+t+`{`+e.digits+`}`)}else e.inputmode=`numeric`;return r+=We(e.suffix,e),r+=`[-]`,i&&(r=[i+We(e.suffix,e)+`[-]`,r]),e.greedy=!1,qe(e),e.radixPoint!==``&&e.substituteRadixPoint&&(e.substitutes[e.radixPoint==`.`?`,`:`.`]=e.radixPoint),r}function Ye(e,t,n,r,i){return i._radixDance&&i.numericInput&&t!==i.negationSymbol.back&&e<=n&&(n>0||t==i.radixPoint)&&(r.validPositions[e-1]===void 0||r.validPositions[e-1].input!==i.negationSymbol.back)&&--e,e}function Xe(e,t,n,r,i){let a=t.buffer?t.buffer.indexOf(i.radixPoint):-1,o=(a!==-1||r&&i.jitMasking)&&new RegExp(i.definitions[9].validator).test(e);return!r&&i._radixDance&&a!==-1&&o&&t.validPositions[a]==null?{insert:{pos:a===n?a+1:a,c:i.radixPoint},pos:n}:o}function Ze(e,t){let n=RegExp(`(^`+(t.negationSymbol.front===``?``:W(t.negationSymbol.front)+`?`)+W(t.prefix)+`)(.*)(`+W(t.suffix)+(t.negationSymbol.back==``?``:W(t.negationSymbol.back)+`?`)+`$)`).exec(e.slice().reverse().join(``)),r=n?n[2]:``,i=!1;return r&&(r=r.split(t.radixPoint.charAt(0))[0],i=RegExp(`^[0`+t.groupSeparator+`]*`).exec(r)),i&&(i[0].length>1||i[0].length>0&&i[0].length<r.length)?i:!1}J.extendAliases({numeric:{mask:Je,_mask:function(e){return`(`+e.groupSeparator+`999){+|1}`},digits:`*`,digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:`.`,positionCaretOnClick:`radixFocus`,_radixDance:!0,groupSeparator:``,allowMinus:!0,negationSymbol:{front:`-`,back:``},prefix:``,suffix:``,min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:`text`,unmaskAsNumber:!1,roundingFN:Math.round,inputmode:`decimal`,shortcuts:{k:`1000`,m:`1000000`},placeholder:`0`,greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:``,usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:Xe},1:{validator:Xe,definitionSymbol:`9`},9:{validator:`[0-90-9٠-٩۰-۹]`,definitionSymbol:`*`},"+":{validator:function(e,t,n,r,i){return i.allowMinus&&(e===`-`||e===i.negationSymbol.front)}},"-":{validator:function(e,t,n,r,i){return i.allowMinus&&e===i.negationSymbol.back}}},preValidation:function(e,t,n,r,i,a,o,s){let c=this;if(i.__financeInput!==!1&&n===i.radixPoint)return!1;let l=e.indexOf(i.radixPoint),u=t;if(t=Ye(t,n,l,a,i),n===`-`||n===i.negationSymbol.front){if(i.allowMinus!==!0)return!1;let e=!1,t=Ke(`+`,a),n=Ke(`-`,a);return t!==-1&&(e=[t],n!==-1&&e.push(n)),e===!1?{insert:[{pos:Ge.call(c,`+`,a),c:i.negationSymbol.front,fromIsValid:!0},{pos:Ge.call(c,`-`,a),c:i.negationSymbol.back,fromIsValid:void 0}],caret:u+i.negationSymbol.back.length}:{remove:e,caret:u-i.negationSymbol.back.length}}if(n===i.groupSeparator)return{caret:u};if(s)return!0;if(l!==-1&&i._radixDance===!0&&r===!1&&n===i.radixPoint&&i.digits!==void 0&&(isNaN(i.digits)||parseInt(i.digits)>0)&&l!==t){let e=Ge.call(c,i.radixPoint,a);return a.validPositions[e]&&(a.validPositions[e].generatedInput=a.validPositions[e].generated||!1),{caret:i._radixDance&&t===l-1?l+1:l}}if(i.__financeInput===!1){if(r){if(i.digitsOptional)return{rewritePosition:o.end};if(!i.digitsOptional){if(o.begin>l&&o.end<=l)return n===i.radixPoint?{insert:{pos:l+1,c:`0`,fromIsValid:!0},rewritePosition:l}:{rewritePosition:l+1};if(o.begin<l)return{rewritePosition:o.begin-1}}}else if(!i.showMaskOnHover&&!i.showMaskOnFocus&&!i.digitsOptional&&i.digits>0&&this.__valueGet.call(this.el)===``)return{rewritePosition:l}}return{rewritePosition:t}},postValidation:function(e,t,n,r,i,a,o,s,c){if(r===!1)return r;if(o)return!0;if(i.min!==null||i.max!==null){let t=i.onUnMask(e.slice().reverse().join(``),void 0,Ue.extend({},i,{unmaskAsNumber:!0}));if(i.min!==null&&t<i.min&&c!==!0&&(t.toString().length>i.min.toString().length||e[0]===i.radixPoint||t<0))return!1;if(i.max!==null&&i.max>=0&&t>i.max)return i.SetMaxOnOverflow?{refreshFromBuffer:!0,buffer:$(i.max.toString().replace(`.`,i.radixPoint).split(``),i.digits,i).reverse()}:!1}return r},onUnMask:function(e,t,n){if(t===``&&n.nullable===!0)return t;let r=e.replace(n.prefix,``);return r=r.replace(n.suffix,``),r=r.replace(new RegExp(W(n.groupSeparator),`g`),``),n.placeholder.charAt(0)!==``&&(r=r.replace(new RegExp(n.placeholder.charAt(0),`g`),`0`)),n.unmaskAsNumber?(n.radixPoint!==``&&r.indexOf(n.radixPoint)!==-1&&(r=r.replace(W.call(this,n.radixPoint),`.`)),r=r.replace(RegExp(`^`+W(n.negationSymbol.front)),`-`),r=r.replace(RegExp(W(n.negationSymbol.back)+`$`),``),Number(r)):r},isComplete:function(e,t){let n=(t.numericInput?e.slice().reverse():e).join(``);return n=n.replace(RegExp(`^`+W(t.negationSymbol.front)),`-`),n=n.replace(RegExp(W(t.negationSymbol.back)+`$`),``),n=n.replace(t.prefix,``),n=n.replace(t.suffix,``),n=n.replace(RegExp(W(t.groupSeparator)+`([0-9]{3})`,`g`),`$1`),t.radixPoint===`,`&&(n=n.replace(W(t.radixPoint),`.`)),isFinite(n)},onBeforeMask:function(e,t){e??=``;let n=t.radixPoint||`,`;isFinite(t.digits)&&(t.digits=parseInt(t.digits)),(typeof e==`number`||t.inputType===`number`)&&n!==``&&(e=e.toString().replace(`.`,n));let r=e.charAt(0)===`-`||e.charAt(0)===t.negationSymbol.front,i=e.split(n),a=i[0].replace(/[^\-0-9]/g,``),o=i.length>1?i[1].replace(/[^0-9]/g,``):``,s=i.length>1;e=a+(o===``?o:n+o);let c=0;if(n!==``&&(c=t.digitsOptional?t.digits<o.length?t.digits:o.length:t.digits,o!==``||!t.digitsOptional)){let r=10**(c||1);e=e.replace(W(n),`.`),isNaN(parseFloat(e))||(e=(t.roundingFN(parseFloat(e)*r)/r).toFixed(c)),e=e.toString().replace(`.`,n)}if(t.digits===0&&e.indexOf(n)!==-1&&(e=e.substring(0,e.indexOf(n))),e!==``&&(t.min!==null||t.max!==null)){let r=e.toString().replace(n,`.`);t.min!==null&&r<t.min?e=t.min.toString().replace(`.`,n):t.max!==null&&r>t.max&&(e=t.max.toString().replace(`.`,n))}return r&&e.charAt(0)!==`-`&&(e=`-`+e),$(e.toString().split(``),c,t,s).join(``)},onBeforeWrite:function(e,t,n,r){function i(e,t){if(r.__financeInput!==!1||t){var n=e.indexOf(r.radixPoint);n!==-1&&e.splice(n,1)}if(r.groupSeparator!==``)for(;(n=e.indexOf(r.groupSeparator))!==-1;)e.splice(n,1);return e}let a,o;if(r.stripLeadingZeroes&&(o=Ze(t,r))){let e=t.join(``).lastIndexOf(o[0].split(``).reverse().join(``))-(o[0]==o.input?0:1),n=+(o[0]==o.input);for(let r=o[0].length-n;r>0;r--)this.maskset.validPositions.splice(e+r,1),delete t[e+r]}if(e)switch(e.type){case`blur`:case`checkval`:if(r.min!==null||r.max!==null){let e=r.onUnMask(t.slice().reverse().join(``),void 0,Ue.extend({},r,{unmaskAsNumber:!0}));if(r.min!==null&&e<r.min&&t.join()!==``)return{refreshFromBuffer:!0,buffer:$(r.min.toString().replace(`.`,r.radixPoint).split(``),r.digits,r).reverse()};if(r.max!==null&&e>r.max)return{refreshFromBuffer:!0,buffer:$(r.max.toString().replace(`.`,r.radixPoint).split(``),r.digits,r).reverse()}}if(t[t.length-1]===r.negationSymbol.front){let e=RegExp(`(^`+(r.negationSymbol.front==``?``:W(r.negationSymbol.front)+`?`)+W(r.prefix)+`)(.*)(`+W(r.suffix)+(r.negationSymbol.back==``?``:W(r.negationSymbol.back)+`?`)+`$)`).exec(i(t.slice(),!0).reverse().join(``));(e?e[2]:``)==0&&(a={refreshFromBuffer:!0,buffer:[0]})}else r.radixPoint!==``&&t.indexOf(r.radixPoint)===r.suffix.length&&(a&&a.buffer?a.buffer.splice(0,1+r.suffix.length):(t.splice(0,1+r.suffix.length),a={refreshFromBuffer:!0,buffer:i(t)}));if(r.enforceDigitsOnBlur){a||={};let e=(a&&a.buffer||t).slice().reverse();a.refreshFromBuffer=!0,a.buffer=$(e,r.digits,r,!0).reverse()}}return a},onKeyDown:function(e,t,n,r){let i=Ue(this),a;if(e.location!=3){let t,n=e.key;if((t=r.shortcuts&&r.shortcuts[n])&&t.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(t)),i.trigger(`setvalue`),!1}if(e.ctrlKey)switch(e.key){case x.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(r.step)),i.trigger(`setvalue`),!1;case x.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(r.step)),i.trigger(`setvalue`),!1}if(!e.shiftKey&&(e.key===x.Delete||e.key===x.Backspace||e.key===x.BACKSPACE_SAFARI)&&n.begin!==t.length){if(t[e.key===x.Delete?n.begin-1:n.end]===r.negationSymbol.front)return a=t.slice().reverse(),r.negationSymbol.front!==``&&a.shift(),r.negationSymbol.back!==``&&a.pop(),i.trigger(`setvalue`,[a.join(``),n.begin]),!1;if(r._radixDance===!0){let o=t.indexOf(r.radixPoint);if(!r.digitsOptional){if(o!==-1&&(n.begin<o||n.end<o||e.key===x.Delete&&(n.begin===o||n.begin-1===o))){let s;return n.begin===n.end&&(e.key===x.Backspace||e.key===x.BACKSPACE_SAFARI?n.begin++:e.key===x.Delete&&n.begin-1===o&&(s=Ue.extend({},n),n.begin--,n.end--)),a=t.slice().reverse(),a.splice(a.length-n.begin,n.begin-n.end||1),(e.key===x.Backspace||e.key===x.BACKSPACE_SAFARI)&&a.splice(a.length-n.end+1,0,`0`),a=$(a,r.digits,r).join(``),s&&(n=s),i.trigger(`setvalue`,[a,n.begin>=a.length?o+1:n.begin]),!1}}else if(o===0)return a=t.slice().reverse(),a.pop(),i.trigger(`setvalue`,[a.join(``),n.begin>=a.length?a.length:n.begin]),!1}}}},currency:{prefix:``,groupSeparator:`,`,alias:`numeric`,digits:2,digitsOptional:!1},decimal:{alias:`numeric`},integer:{alias:`numeric`,inputmode:`numeric`,digits:0},percentage:{alias:`numeric`,min:0,max:100,suffix:` %`,digits:0,allowMinus:!1},indianns:{alias:`numeric`,_mask:function(e){return`(`+e.groupSeparator+`99){*|1}(`+e.groupSeparator+`999){1|1}`},groupSeparator:`,`,radixPoint:`.`,placeholder:`0`,digits:2,digitsOptional:!1}});var Qe=J;const $e={datetime:{alias:`datetime`},email:{alias:`email`,placeholder:``},numeric:{alias:`numeric`,placeholder:``},currency:{alias:`currency`,prefix:`$ `,placeholder:``},decimal:{alias:`decimal`,placeholder:``},integer:{alias:`integer`,placeholder:``},percentage:{alias:`percentage`,placeholder:` %`,suffix:` %`},url:{alias:`url`,placeholder:`https://`},ip:{alias:`ip`},mac:{alias:`mac`},ssn:{alias:`ssn`},"brl-currency":{alias:`currency`,prefix:`R$ `,placeholder:`0,00`,displayFormat:`currency`,radixPoint:`,`,groupSeparator:`.`,autoUnmask:!0},cpf:{mask:`999.999.999-99`,placeholder:`___.___.___-__`},cnpj:{mask:[`A|9{2}.A|9{3}.A|9{3}/A|9{4}-9{2}`],placeholder:`__.___.___/____-__`},"br-bank-account":{mask:[`9{4,10}[-]9`,`999999[-][9]`,`[999]9{7,8}[-]9`,`[9999]9{8}[-]9`],placeholder:``,greedy:!1},"br-bank-agency":{mask:`9{1,5}[-][9]`,placeholder:``}};function et(e,t){let n={jitMasking:!1,...t};return e?typeof e==`string`&&$e[e]?{...$e[e],...n}:{mask:e,...n}:n}function tt(...e){let{length:t}=e,n=t;for(;n>0;)if(--n,typeof e[n]!=`function`)throw TypeError(`Expected a function`);return(...n)=>{let r=0,i=t?e[r].apply(void 0,n):n[0];for(;r+1<t;)r+=1,i=e[r].call(void 0,i);return i}}const nt=!(typeof window<`u`&&window.document?.createElement);function rt(e){return typeof e==`object`&&e&&`default`in e?e.default:e}function it(e,t){return`${e}:${Array.isArray(t)?t.join(`,`):String(t)}`}function at(e,t){Object.defineProperty(e,"prevRef",{value:t,enumerable:!1,writable:!0,configurable:!0})}function ot(e){let r=n(e);return r?t(r)||r:null}function st(e){let t=ot(e);if(!t)return``;let{inputmask:n}=t;return n&&typeof n.unmaskedvalue==`function`?n.unmaskedvalue():`value`in t?t.value:``}function ct(e,t){return Object.defineProperty(e,"unmaskedValue",{value:t,enumerable:!1,writable:!0,configurable:!0}),e}function lt(e,t){return rt(Qe)(et(e,t))}function ut(e,t,n){if(!e)return;let r=lt(t,n),i=e.nodeName===`INPUT`?e:e.querySelector(`input`);i?r.mask(i):r.mask(e)}const dt=new Map;function ft(e,t){if(!t){let t=it(``,e);if(dt.has(t))return dt.get(t)}let n=null,r=(r=>{nt||e===null||!r||(n=r,rt(Qe)(et(e,t)).mask(r))});if(!t){let t=it(``,e);dt.set(t,r)}return ct(r,()=>st(n))}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return ft}});
|
|
2
|
+
//# sourceMappingURL=withMask-VWeBqi_u.cjs.map
|