@tabler/core 1.0.0-beta18 → 1.0.0-beta19
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/dist/css/demo.css +2 -2
- package/dist/css/demo.min.css +2 -2
- package/dist/css/demo.rtl.css +2 -2
- package/dist/css/demo.rtl.min.css +2 -2
- package/dist/css/tabler-flags.css +2 -2
- package/dist/css/tabler-flags.min.css +2 -2
- package/dist/css/tabler-flags.rtl.css +2 -2
- package/dist/css/tabler-flags.rtl.min.css +2 -2
- package/dist/css/tabler-payments.css +2 -2
- package/dist/css/tabler-payments.min.css +2 -2
- package/dist/css/tabler-payments.rtl.css +2 -2
- package/dist/css/tabler-payments.rtl.min.css +2 -2
- package/dist/css/tabler-social.css +2 -2
- package/dist/css/tabler-social.min.css +2 -2
- package/dist/css/tabler-social.rtl.css +2 -2
- package/dist/css/tabler-social.rtl.min.css +2 -2
- package/dist/css/tabler-vendors.css +19 -2
- package/dist/css/tabler-vendors.min.css +3 -3
- package/dist/css/tabler-vendors.rtl.css +19 -2
- package/dist/css/tabler-vendors.rtl.min.css +3 -3
- package/dist/css/tabler.css +36 -31
- package/dist/css/tabler.min.css +4 -4
- package/dist/css/tabler.rtl.css +36 -31
- package/dist/css/tabler.rtl.min.css +4 -4
- package/dist/js/demo-theme.js +2 -2
- package/dist/js/demo-theme.min.js +2 -2
- package/dist/js/demo.js +2 -2
- package/dist/js/demo.min.js +2 -2
- package/dist/js/tabler.esm.js +2 -2
- package/dist/js/tabler.esm.min.js +3 -3
- package/dist/js/tabler.js +2 -2
- package/dist/js/tabler.min.js +4 -4
- package/dist/libs/star-rating.js/dist/star-rating.cjs.js +481 -0
- package/dist/libs/star-rating.js/dist/star-rating.css +220 -0
- package/dist/libs/star-rating.js/dist/star-rating.esm.js +479 -0
- package/dist/libs/star-rating.js/dist/star-rating.esm.min.js +1 -0
- package/dist/libs/star-rating.js/dist/star-rating.js +491 -0
- package/dist/libs/star-rating.js/dist/star-rating.min.css +8 -0
- package/dist/libs/star-rating.js/dist/star-rating.min.js +8 -0
- package/package.json +9 -3
- package/src/scss/_variables.scss +1 -1
- package/src/scss/layout/_navbar.scss +1 -70
- package/src/scss/tabler-vendors.scss +1 -0
- package/src/scss/ui/_grid.scss +2 -2
- package/src/scss/ui/_tables.scss +12 -11
- package/src/scss/vendor/_stars-rating.scss +20 -0
package/dist/js/demo-theme.js
CHANGED
package/dist/js/demo.js
CHANGED
package/dist/js/demo.min.js
CHANGED
package/dist/js/tabler.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Tabler v1.0.0-
|
|
3
|
-
* @version 1.0.0-
|
|
2
|
+
* Tabler v1.0.0-beta19 (https://tabler.io)
|
|
3
|
+
* @version 1.0.0-beta19
|
|
4
4
|
* @link https://tabler.io
|
|
5
5
|
* Copyright 2018-2023 The Tabler Authors
|
|
6
6
|
* Copyright 2018-2023 codecalm.net Paweł Kuna
|
|
7
7
|
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
|
8
8
|
*/
|
|
9
|
-
var e=new Map;function t(t){var s=e.get(t);s&&s.destroy()}function o(t){var s=e.get(t);s&&s.update()}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,s){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var s,i=null,n=window.getComputedStyle(t),r=(s=t.value,function(){o({testForHeightReduction:""===s||!t.value.startsWith(s),restoreTextAlign:null}),s=t.value}),a=function(s){t.removeEventListener("autosize:destroy",a),t.removeEventListener("autosize:update",l),t.removeEventListener("input",r),window.removeEventListener("resize",l),Object.keys(s).forEach((function(e){return t.style[e]=s[e]})),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a),t.addEventListener("autosize:update",l),t.addEventListener("input",r),window.addEventListener("resize",l),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:a,update:l}),l()}function o(e){var s,r,a=e.restoreTextAlign,l=void 0===a?null:a,u=e.testForHeightReduction,c=void 0===u||u,h=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),c&&(s=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],s=e[1];t.style.scrollBehavior="auto",t.scrollTop=s,t.style.scrollBehavior=null}))}}(t),t.style.height=""),r="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&r>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),r=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=r+"px",l&&(t.style.textAlign=l),s&&s(),i!==r&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=r),h!==n.overflow&&!l)){var d=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===d?"end":"start"),o({restoreTextAlign:d,testForHeightReduction:!0})}}function l(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r,elements=document.querySelectorAll('[data-bs-toggle="autosize"]');function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var s,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)s=r[i],t.indexOf(s)>=0||(n[s]=e[s]);return n}function IMask(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new IMask.InputMask(e,t)}elements.length&&elements.forEach((function(e){n(e)}));class ChangeDetails{constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}function isString(e){return"string"==typeof e||e instanceof String}IMask.ChangeDetails=ChangeDetails;const DIRECTION={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function forceDirection(e){switch(e){case DIRECTION.LEFT:return DIRECTION.FORCE_LEFT;case DIRECTION.RIGHT:return DIRECTION.FORCE_RIGHT;default:return e}}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function normalizePrepare(e){return Array.isArray(e)?e:[e,new ChangeDetails]}function objectIncludes(e,t){if(t===e)return!0;var s,i=Array.isArray(t),n=Array.isArray(e);if(i&&n){if(t.length!=e.length)return!1;for(s=0;s<t.length;s++)if(!objectIncludes(t[s],e[s]))return!1;return!0}if(i!=n)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){var r=t instanceof Date,a=e instanceof Date;if(r&&a)return t.getTime()==e.getTime();if(r!=a)return!1;var o=t instanceof RegExp,l=e instanceof RegExp;if(o&&l)return t.toString()==e.toString();if(o!=l)return!1;var u=Object.keys(t);for(s=0;s<u.length;s++)if(!Object.prototype.hasOwnProperty.call(e,u[s]))return!1;for(s=0;s<u.length;s++)if(!objectIncludes(e[u[s]],t[u[s]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class ActionDetails{constructor(e,t,s,i){for(this.value=e,this.cursorPos=t,this.oldValue=s,this.oldSelection=i;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?DIRECTION.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?DIRECTION.LEFT:DIRECTION.RIGHT}}class ContinuousTailDetails{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2?arguments[2]:void 0;this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Masked{constructor(e){this._value="",this._update(Object.assign({},Masked.DEFAULTS,e)),this.isInitialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e)}resolve(e){return this.reset(),this.append(e,{input:!0},""),this.doCommit(),this.value}get unmaskedValue(){return this.value}set unmaskedValue(e){this.reset(),this.append(e,{},""),this.doCommit()}get typedValue(){return this.doParse(this.value)}set typedValue(e){this.value=this.doFormat(e)}get rawInputValue(){return this.extractInput(0,this.value.length,{raw:!0})}set rawInputValue(e){this.reset(),this.append(e,{raw:!0},""),this.doCommit()}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return Math.min(this.value.length,t-e)}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(e,t)}extractTail(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new ContinuousTailDetails(this.extractInput(e,t),e)}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}_appendCharRaw(e){return e?(this._value+=e,new ChangeDetails({inserted:e,rawInserted:e})):new ChangeDetails}_appendChar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const i=this.state;let n;if([e,n]=normalizePrepare(this.doPrepare(e,t)),n=n.aggregate(this._appendCharRaw(e,t)),n.inserted){let e,r=!1!==this.doValidate(t);if(r&&null!=s){const t=this.state;!0===this.overwrite&&(e=s.state,s.unshift(this.value.length-n.tailShift));let i=this.appendTail(s);r=i.rawInserted===s.toString(),r&&i.inserted||"shift"!==this.overwrite||(this.state=t,e=s.state,s.shift(),i=this.appendTail(s),r=i.rawInserted===s.toString()),r&&i.inserted&&(this.state=t)}r||(n=new ChangeDetails,this.state=i,s&&e&&(s.state=e))}return n}_appendPlaceholder(){return new ChangeDetails}_appendEager(){return new ChangeDetails}append(e,t,s){if(!isString(e))throw new Error("value should be string");const i=new ChangeDetails,n=isString(s)?new ContinuousTailDetails(String(s)):s;null!=t&&t.tail&&(t._beforeTailState=this.state);for(let s=0;s<e.length;++s){const r=this._appendChar(e[s],t,n);if(!r.rawInserted&&!this.doSkipInvalid(e[s],t,n))break;i.aggregate(r)}return null!=n&&(i.tailShift+=this.appendTail(n).tailShift),(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&i.aggregate(this._appendEager()),i}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,e)+this.value.slice(t),new ChangeDetails}withValueRefresh(e){if(this._refreshing||!this.isInitialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&0===s.indexOf(this.value)&&this.append(s.slice(this.value.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this.isInitialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e){return this.skipInvalid}doPrepare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(e,this,t):e}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}doFormat(e){return this.format?this.format(e,this):e}doParse(e){return this.parse?this.parse(e,this):e}splice(e,t,s,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{input:!0};const r=e+t,a=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=forceDirection(i),l=this.extractInput(0,r,{raw:!0}));let u=e;const c=new ChangeDetails;if(i!==DIRECTION.NONE&&(u=this.nearestInputPos(e,t>1&&0!==e&&!o?DIRECTION.NONE:i),c.tailShift=u-e),c.aggregate(this.remove(u)),o&&i!==DIRECTION.NONE&&l===this.rawInputValue)if(i===DIRECTION.FORCE_LEFT){let e;for(;l===this.rawInputValue&&(e=this.value.length);)c.aggregate(new ChangeDetails({tailShift:-1})).aggregate(this.remove(e-1))}else i===DIRECTION.FORCE_RIGHT&&a.unshift();return c.aggregate(this.append(s,n,a))}maskEquals(e){return this.mask===e}typedValueEquals(e){const t=this.typedValue;return e===t||Masked.EMPTY_VALUES.includes(e)&&Masked.EMPTY_VALUES.includes(t)||this.doFormat(e)===this.doFormat(this.typedValue)}}function maskedClass(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?IMask.MaskedRegExp:isString(e)?IMask.MaskedPattern:e instanceof Date||e===Date?IMask.MaskedDate:e instanceof Number||"number"==typeof e||e===Number?IMask.MaskedNumber:Array.isArray(e)||e===Array?IMask.MaskedDynamic:IMask.Masked&&e.prototype instanceof IMask.Masked?e:e instanceof IMask.Masked?e.constructor:e instanceof Function?IMask.MaskedFunction:(console.warn("Mask not found for mask",e),IMask.Masked)}function createMask(e){if(IMask.Masked&&e instanceof IMask.Masked)return e;const t=(e=Object.assign({},e)).mask;if(IMask.Masked&&t instanceof IMask.Masked)return t;const s=maskedClass(t);if(!s)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new s(e)}Masked.DEFAULTS={format:String,parse:e=>e,skipInvalid:!0},Masked.EMPTY_VALUES=[void 0,null,""],IMask.Masked=Masked,IMask.createMask=createMask;const _excluded$4=["parent","isOptional","placeholderChar","displayChar","lazy","eager"],DEFAULT_INPUT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class PatternInputDefinition{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a}=e,o=_objectWithoutPropertiesLoose(e,_excluded$4);this.masked=createMask(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new ChangeDetails}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isFilled)return new ChangeDetails;const s=this.masked.state,i=this.masked._appendChar(e,t);return i.inserted&&!1===this.doValidate(t)&&(i.inserted=i.rawInserted="",this.masked.state=s),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(){return this.masked.append(...arguments)}_appendPlaceholder(){const e=new ChangeDetails;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new ChangeDetails}extractTail(){return this.masked.extractTail(...arguments)}appendTail(){return this.masked.appendTail(...arguments)}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(e,t,s)}nearestInputPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DIRECTION.NONE;const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return this.isComplete?i:0;case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:return this.isComplete?i:s;case DIRECTION.NONE:default:return i}}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(e,t).length}doValidate(){return this.masked.doValidate(...arguments)&&(!this.parent||this.parent.doValidate(...arguments))}doCommit(){this.masked.doCommit()}get state(){return{masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}}class PatternFixedDefinition{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new ChangeDetails}nearestInputPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DIRECTION.NONE;const s=this._value.length;switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return 0;case DIRECTION.NONE:case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:default:return s}}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._isRawInput?t-e:0}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new ChangeDetails;if(this.isFilled)return s;const i=!0===this.eager||"append"===this.eager,n=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!i)&&!t.tail;return n&&(s.rawInserted=this.char),this._value=s.inserted=this.char,this._isRawInput=n&&(t.raw||t.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ChangeDetails;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return arguments.length>1&&void 0!==arguments[1]||this.value.length,new ContinuousTailDetails("")}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_isRawInput:this._isRawInput}}set state(e){Object.assign(this,e)}}const _excluded$3=["chunks"];class ChunksTailDetails{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;isString(e)&&(e=new ContinuousTailDetails(String(e)));const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof ContinuousTailDetails)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof ChunksTailDetails){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof IMask.MaskedPattern)){return new ContinuousTailDetails(this.toString()).appendTo(e)}const t=new ChangeDetails;for(let s=0;s<this.chunks.length&&!t.skip;++s){const i=this.chunks[s],n=e._mapPosToBlock(e.value.length),r=i.stop;let a;if(null!=r&&(!n||n.index<=r)){if(i instanceof ChunksTailDetails||e._stops.indexOf(r)>=0){const s=e._appendPlaceholder(r);t.aggregate(s)}a=i instanceof ChunksTailDetails&&e._blocks[r]}if(a){const s=a.appendTail(i);s.skip=!1,t.aggregate(s),e._value+=s.inserted;const n=i.toString().slice(s.rawInserted.length);n&&t.aggregate(e.append(n,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t}=e,s=_objectWithoutPropertiesLoose(e,_excluded$3);Object.assign(this,s),this.chunks=t.map((e=>{const t="chunks"in e?new ChunksTailDetails:new ContinuousTailDetails;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let s=0;for(;s<this.chunks.length;){const e=this.chunks[s],i=e.unshift(t);if(e.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class PatternCursor{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return this.state=e,e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.value.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null===(t=this.block)||void 0===t?void 0:t.value.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}}class MaskedRegExp extends Masked{_update(e){e.mask&&(e.validate=t=>t.search(e.mask)>=0),super._update(e)}}IMask.MaskedRegExp=MaskedRegExp;const _excluded$2=["_blocks"];class MaskedPattern extends Masked{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.definitions=Object.assign({},DEFAULT_INPUT_DEFINITIONS,e.definitions),super(Object.assign({},MaskedPattern.DEFAULTS,e))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};let t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){var n,r;if(this.blocks){const e=t.slice(a),s=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));s.sort(((e,t)=>t.length-e.length));const i=s[0];if(i){const e=createMask(Object.assign({parent:this,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite},this.blocks[i]));e&&(this._blocks.push(e),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let o=t[a],l=o in e;if(o===MaskedPattern.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){s=!s;continue}if("["===o||"]"===o){i=!i;continue}if(o===MaskedPattern.ESCAPE_CHAR){if(++a,o=t[a],!o)break;l=!1}const u=null===(n=e[o])||void 0===n||!n.mask||(null===(r=e[o])||void 0===r?void 0:r.mask.prototype)instanceof IMask.Masked?{mask:e[o]}:e[o],c=l?new PatternInputDefinition(Object.assign({parent:this,isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},u)):new PatternFixedDefinition({char:o,eager:this.eager,isUnmasking:s});this._blocks.push(c)}}get state(){return Object.assign({},super.state,{_blocks:this._blocks.map((e=>e.state))})}set state(e){const{_blocks:t}=e,s=_objectWithoutPropertiesLoose(e,_excluded$2);this._blocks.forEach(((e,s)=>e.state=t[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){super.unmaskedValue=e}get value(){return this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){super.value=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new ChangeDetails;let s=null===(e=this._mapPosToBlock(this.value.length))||void 0===e?void 0:e.index;if(null==s)return t;this._blocks[s].isFilled&&++s;for(let e=s;e<this._blocks.length;++e){const s=this._blocks[e]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this._mapPosToBlock(this.value.length),i=new ChangeDetails;if(!s)return i;for(let a=s.index;;++a){var n,r;const s=this._blocks[a];if(!s)break;const o=s._appendChar(e,Object.assign({},t,{_beforeTailState:null===(n=t._beforeTailState)||void 0===n||null===(r=n._blocks)||void 0===r?void 0:r[a]})),l=o.skip;if(i.aggregate(o),l||o.rawInserted)break}return i}extractTail(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;const s=new ChunksTailDetails;return e===t||this._forEachBlocksInRange(e,t,((e,t,i,n)=>{const r=e.extractTail(i,n);r.stop=this._findStopBefore(t),r.from=this._blockStartPos(t),r instanceof ChunksTailDetails&&(r.blockIndex=t),s.extend(r)})),s}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return"";let i="";return this._forEachBlocksInRange(e,t,((e,t,n,r)=>{i+=e.extractInput(n,r,s)})),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){const t=new ChangeDetails;if(this.lazy&&null==e)return t;const s=this._mapPosToBlock(this.value.length);if(!s)return t;const i=s.index,n=null!=e?e:this._blocks.length;return this._blocks.slice(i,n).forEach((s=>{if(!s.lazy||null!=e){const e=null!=s._blocks?[s._blocks.length]:[],i=s._appendPlaceholder(...e);this._value+=i.inserted,t.aggregate(i)}})),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],n=t.length;if(t+=i.value,e<=t.length)return{index:s,offset:e-n}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.value.length),0)}_forEachBlocksInRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2?arguments[2]:void 0;const i=this._mapPosToBlock(e);if(i){const e=this._mapPosToBlock(t),n=e&&i.index===e.index,r=i.offset,a=e&&n?e.offset:this._blocks[i.index].value.length;if(s(this._blocks[i.index],i.index,r,a),e&&!n){for(let t=i.index+1;t<e.index;++t)s(this._blocks[t],t,0,this._blocks[t].value.length);s(this._blocks[e.index],e.index,0,e.offset)}}}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s.aggregate(e.remove(i,n))})),s}nearestInputPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DIRECTION.NONE;if(!this._blocks.length)return 0;const s=new PatternCursor(this,e);if(t===DIRECTION.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.value.length);if(t===DIRECTION.LEFT||t===DIRECTION.FORCE_LEFT){if(t===DIRECTION.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===DIRECTION.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e)return s.pos;if(s.popState(),s.ok&&s.pos<=e)return s.pos;s.popState()}return s.ok?s.pos:t===DIRECTION.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===DIRECTION.RIGHT||t===DIRECTION.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===DIRECTION.FORCE_RIGHT?this.value.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,DIRECTION.LEFT)))):e}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=0;return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s+=e.totalInputPositions(i,n)})),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}}MaskedPattern.DEFAULTS={lazy:!0,placeholderChar:"_"},MaskedPattern.STOP_CHAR="`",MaskedPattern.ESCAPE_CHAR="\\",MaskedPattern.InputDefinition=PatternInputDefinition,MaskedPattern.FixedDefinition=PatternFixedDefinition,IMask.MaskedPattern=MaskedPattern;class MaskedRange extends MaskedPattern{get _matchFrom(){return this.maxLength-String(this.from).length}_update(e){e=Object.assign({to:this.to||0,from:this.from||0,maxLength:this.maxLength||0},e);let t=String(e.to).length;null!=e.maxLength&&(t=Math.max(t,e.maxLength)),e.maxLength=t;const s=String(e.from).padStart(t,"0"),i=String(e.to).padStart(t,"0");let n=0;for(;n<i.length&&i[n]===s[n];)++n;e.mask=i.slice(0,n).replace(/0/g,"\\0")+"0".repeat(t-n),super._update(e)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",s="";const[,i,n]=e.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(t="0".repeat(i.length)+n,s="9".repeat(i.length)+n),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepare(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if([e,t]=normalizePrepare(super.doPrepare(e.replace(/\D/g,""),s)),!this.autofix||!e)return e;const i=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0");let r=this.value+e;if(r.length>this.maxLength)return"";const[a,o]=this.boundaries(r);return Number(o)<this.from?i[r.length-1]:Number(a)>this.to?"pad"===this.autofix&&r.length<this.maxLength?["",t.aggregate(this.append(i[r.length-1]+e,s))]:n[r.length-1]:e}doValidate(){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[t,s]=this.boundaries(e);return this.from<=Number(s)&&Number(t)<=this.to&&super.doValidate(...arguments)}}IMask.MaskedRange=MaskedRange;class MaskedDate extends MaskedPattern{constructor(e){super(Object.assign({},MaskedDate.DEFAULTS,e))}_update(e){e.mask===Date&&delete e.mask,e.pattern&&(e.mask=e.pattern);const t=e.blocks;e.blocks=Object.assign({},MaskedDate.GET_DEFAULT_BLOCKS()),e.min&&(e.blocks.Y.from=e.min.getFullYear()),e.max&&(e.blocks.Y.to=e.max.getFullYear()),e.min&&e.max&&e.blocks.Y.from===e.blocks.Y.to&&(e.blocks.m.from=e.min.getMonth()+1,e.blocks.m.to=e.max.getMonth()+1,e.blocks.m.from===e.blocks.m.to&&(e.blocks.d.from=e.min.getDate(),e.blocks.d.to=e.max.getDate())),Object.assign(e.blocks,this.blocks,t),Object.keys(e.blocks).forEach((t=>{const s=e.blocks[t];!("autofix"in s)&&"autofix"in e&&(s.autofix=e.autofix)})),super._update(e)}doValidate(){const e=this.date;return super.doValidate(...arguments)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}MaskedDate.DEFAULTS={pattern:"d{.}`m{.}`Y",format:e=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:e=>{const[t,s,i]=e.split(".");return new Date(i,s-1,t)}},MaskedDate.GET_DEFAULT_BLOCKS=()=>({d:{mask:MaskedRange,from:1,to:31,maxLength:2},m:{mask:MaskedRange,from:1,to:12,maxLength:2},Y:{mask:MaskedRange,from:1900,to:9999}}),IMask.MaskedDate=MaskedDate;class MaskElement{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch(e){}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch(e){}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch(e){}}_unsafeSelect(e,t){}get isActive(){return!1}bindEvents(e){}unbindEvents(){}}IMask.MaskElement=MaskElement;class HTMLMaskElement extends MaskElement{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,t,s;return null!==(e=null===(t=(s=this.input).getRootNode)||void 0===t?void 0:t.call(s))&&void 0!==e?e:document}get isActive(){return this.input===this.rootElement.activeElement}get _unsafeSelectionStart(){return this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}bindEvents(e){Object.keys(e).forEach((t=>this._toggleEventHandler(HTMLMaskElement.EVENTS_MAP[t],e[t])))}unbindEvents(){Object.keys(this._handlers).forEach((e=>this._toggleEventHandler(e)))}_toggleEventHandler(e,t){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),t&&(this.input.addEventListener(e,t),this._handlers[e]=t)}}HTMLMaskElement.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},IMask.HTMLMaskElement=HTMLMaskElement;class HTMLContenteditableMaskElement extends HTMLMaskElement{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,n=i.getSelection&&i.getSelection();n&&(n.removeAllRanges(),n.addRange(s))}get value(){return this.input.textContent}set value(e){this.input.textContent=e}}IMask.HTMLContenteditableMaskElement=HTMLContenteditableMaskElement;const _excluded$1=["mask"];class InputMask{constructor(e,t){this.el=e instanceof MaskElement?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new HTMLContenteditableMaskElement(e):new HTMLMaskElement(e),this.masked=createMask(t),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}get mask(){return this.masked.mask}maskEquals(e){var t;return null==e||(null===(t=this.masked)||void 0===t?void 0:t.maskEquals(e))}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof IMask.Masked)&&this.masked.constructor===maskedClass(e))return void this.masked.updateOptions({mask:e});const t=createMask({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];const n=this._listeners[e];n&&n.forEach((e=>e(...s)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,t=this.masked.value,s=this.displayValue,i=this.unmaskedValue!==e||this.value!==t;this._unmaskedValue=e,this._value=t,this.el.value!==s&&(this.el.value=s),i&&this._fireChangeEvents()}updateOptions(e){const{mask:t}=e,s=_objectWithoutPropertiesLoose(e,_excluded$1),i=!this.maskEquals(t),n=!objectIncludes(this.masked,s);i&&(this.mask=t),n&&this.masked.updateOptions(s),(i||n)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,DIRECTION.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const t=new ActionDetails(this.el.value,this.cursorPos,this.displayValue,this._selection),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=s===this.masked.rawInputValue?t.removeDirection:DIRECTION.NONE;let r=this.masked.nearestInputPos(t.startChangePos+i,n);n!==DIRECTION.NONE&&(r=this.masked.nearestInputPos(r,DIRECTION.NONE)),this.updateControl(),this.updateCursor(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}IMask.InputMask=InputMask;class MaskedEnum extends MaskedPattern{_update(e){e.enum&&(e.mask="*".repeat(e.enum[0].length)),super._update(e)}doValidate(){return this.enum.some((e=>e.indexOf(this.unmaskedValue)>=0))&&super.doValidate(...arguments)}}IMask.MaskedEnum=MaskedEnum;class MaskedNumber extends Masked{constructor(e){super(Object.assign({},MaskedNumber.DEFAULTS,e))}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){let e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"(".concat(escapeRegExp(this.radix),"\\d{0,").concat(this.scale,"})?"):"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("[".concat(this.mapToRadix.map(escapeRegExp).join(""),"]"),"g"),this._thousandsSeparatorRegExp=new RegExp(escapeRegExp(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e);const[s,i]=normalizePrepare(super.doPrepare(e,t));return e&&!s&&(i.skip=!0),[s,i]}_separatorsCount(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2?arguments[2]:void 0;return[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return super._appendCharRaw(e,t);const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const n=super._appendCharRaw(e,t);this._value=this._insertThousandsSeparators(this._value);const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(r);return n.tailShift+=(a-i)*this.thousandsSeparator.length,n.skip=!n.rawInserted&&e===this.thousandsSeparator,n}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),n=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const r=this._separatorsCountFromSlice(s);return new ChangeDetails({tailShift:(r-n)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case DIRECTION.NONE:case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===DIRECTION.FORCE_LEFT)return s}break}case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doValidate(e){let t=Boolean(this._removeThousandsSeparators(this.value).match(this._numberRegExp));if(t){const e=this.number;t=t&&!isNaN(e)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)}return t&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.doFormat(t));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,s,i)=>t+i)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const i=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===MaskedNumber.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,MaskedNumber.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.doParse(this.unmaskedValue)}set typedValue(e){this.rawInputValue=this.doFormat(e).replace(MaskedNumber.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}typedValueEquals(e){return(super.typedValueEquals(e)||MaskedNumber.EMPTY_VALUES.includes(e)&&MaskedNumber.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}MaskedNumber.UNMASKED_RADIX=".",MaskedNumber.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:[MaskedNumber.UNMASKED_RADIX],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},MaskedNumber.EMPTY_VALUES=[...Masked.EMPTY_VALUES,0],IMask.MaskedNumber=MaskedNumber;class MaskedFunction extends Masked{_update(e){e.mask&&(e.validate=e.mask),super._update(e)}}IMask.MaskedFunction=MaskedFunction;const _excluded=["compiledMasks","currentMaskRef","currentMask"],_excluded2=["mask"];class MaskedDynamic extends Masked{constructor(e){super(Object.assign({},MaskedDynamic.DEFAULTS,e)),this.currentMask=null}_update(e){super._update(e),"mask"in e&&(this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>createMask(e))):[])}_appendCharRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,n=this.rawInputValue,r=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:n,a=n.slice(r.length),o=this.currentMask,l=new ChangeDetails,u=null==o?void 0:o.state;if(this.currentMask=this.doDispatch(e,Object.assign({},t),s),this.currentMask)if(this.currentMask!==o){if(this.currentMask.reset(),r){const e=this.currentMask.append(r,{raw:!0});l.tailShift=e.inserted.length-i.length}a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=u;return l}_appendPlaceholder(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new ChangeDetails;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return Object.assign({},e,{_beforeTailState:(null===(t=e._beforeTailState)||void 0===t?void 0:t.currentMaskRef)===this.currentMask&&(null===(s=e._beforeTailState)||void 0===s?void 0:s.currentMask)||e._beforeTailState})}doDispatch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[s,i]=normalizePrepare(super.doPrepare(e,t));if(this.currentMask){let e;[s,e]=normalizePrepare(super.doPrepare(s,this.currentMaskFlags(t))),i=i.aggregate(e)}return[s,i]}reset(){var e;null===(e=this.currentMask)||void 0===e||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.currentMask?this.currentMask.value:""}set value(e){super.value=e}get unmaskedValue(){return this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.currentMask?this.currentMask.typedValue:""}set typedValue(e){let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null===(e=this.currentMask)||void 0===e?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null===(e=this.currentMask)||void 0===e?void 0:e.isFilled)}remove(){const e=new ChangeDetails;return this.currentMask&&e.aggregate(this.currentMask.remove(...arguments)).aggregate(this._applyDispatch()),e}get state(){var e;return Object.assign({},super.state,{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null===(e=this.currentMask)||void 0===e?void 0:e.state})}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i}=e,n=_objectWithoutPropertiesLoose(e,_excluded);this.compiledMasks.forEach(((e,s)=>e.state=t[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=n}extractInput(){return this.currentMask?this.currentMask.extractInput(...arguments):""}extractTail(){return this.currentMask?this.currentMask.extractTail(...arguments):super.extractTail(...arguments)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(){return this.currentMask?this.currentMask.nearestInputPos(...arguments):super.nearestInputPos(...arguments)}get overwrite(){return this.currentMask?this.currentMask.overwrite:super.overwrite}set overwrite(e){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}get eager(){return this.currentMask?this.currentMask.eager:super.eager}set eager(e){console.warn('"eager" option is not available in dynamic mask, use this option in siblings')}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:super.skipInvalid}set skipInvalid(e){(this.isInitialized||e!==Masked.DEFAULTS.skipInvalid)&&console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings')}maskEquals(e){return Array.isArray(e)&&this.compiledMasks.every(((t,s)=>{if(!e[s])return;const i=e[s],{mask:n}=i;return objectIncludes(t,_objectWithoutPropertiesLoose(i,_excluded2))&&t.maskEquals(n)}))}typedValueEquals(e){var t;return Boolean(null===(t=this.currentMask)||void 0===t?void 0:t.typedValueEquals(e))}}MaskedDynamic.DEFAULTS={dispatch:(e,t,s,i)=>{if(!t.compiledMasks.length)return;const n=t.rawInputValue,r=t.compiledMasks.map(((r,a)=>{const o=t.currentMask===r,l=o?r.value.length:r.nearestInputPos(r.value.length,DIRECTION.FORCE_LEFT);return r.rawInputValue!==n?(r.reset(),r.append(n,{raw:!0})):o||r.remove(l),r.append(e,t.currentMaskFlags(s)),r.appendTail(i),{index:a,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(l,r.nearestInputPos(r.value.length,DIRECTION.FORCE_LEFT)))}}));return r.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[r[0].index]}},IMask.MaskedDynamic=MaskedDynamic;const PIPE_TYPE={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function createPipe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PIPE_TYPE.MASKED,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:PIPE_TYPE.MASKED;const i=createMask(e);return e=>i.runIsolated((i=>(i[t]=e,i[s])))}function pipe(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];return createPipe(...s)(e)}IMask.PIPE_TYPE=PIPE_TYPE,IMask.createPipe=createPipe,IMask.pipe=pipe;try{globalThis.IMask=IMask}catch(e){}var maskElementList=[].slice.call(document.querySelectorAll("[data-mask]"));maskElementList.map((function(e){return new IMask(e,{mask:e.dataset.mask,lazy:"true"===e.dataset["mask-visible"]})}));var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},n=t.elements[e];isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,s),Object.keys(i).forEach((function(e){var t=i[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:s[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,s){void 0===t&&(t=!1),void 0===s&&(s=!1);var i=e.getBoundingClientRect(),n=1,r=1;t&&isHTMLElement(e)&&(n=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var a=(isElement$1(e)?getWindow(e):window).visualViewport,o=!isLayoutViewport()&&s,l=(i.left+(o&&a?a.offsetLeft:0))/n,u=(i.top+(o&&a?a.offsetTop:0))/r,c=i.width/n,h=i.height/r;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l,x:l,y:u}}function getLayoutRect(e){var t=getBoundingClientRect(e),s=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-s)<=1&&(s=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:i}}function contains(e,t){var s=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(s&&isShadowRoot(s)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var s=getParentNode(e);for(isShadowRoot(s)&&(s=s.host);isHTMLElement(s)&&["html","body"].indexOf(getNodeName(s))<0;){var i=getComputedStyle$1(s);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return s;s=s.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),s=getTrueOffsetParent(e);s&&isTableElement(s)&&"static"===getComputedStyle$1(s).position;)s=getTrueOffsetParent(s);return s&&("html"===getNodeName(s)||"body"===getNodeName(s)&&"static"===getComputedStyle$1(s).position)?t:s||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,s){return max(e,min(t,s))}function withinMaxClamp(e,t,s){var i=within(e,t,s);return i>s?s:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,s){return t[s]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,s=e.state,i=e.name,n=e.options,r=s.elements.arrow,a=s.modifiersData.popperOffsets,o=getBasePlacement(s.placement),l=getMainAxisFromPlacement(o),u=[left,right].indexOf(o)>=0?"height":"width";if(r&&a){var c=toPaddingObject(n.padding,s),h=getLayoutRect(r),d="y"===l?top:left,p="y"===l?bottom:right,g=s.rects.reference[u]+s.rects.reference[l]-a[l]-s.rects.popper[u],f=a[l]-s.rects.reference[l],E=getOffsetParent(r),_=E?"y"===l?E.clientHeight||0:E.clientWidth||0:0,m=g/2-f/2,v=c[d],T=_-h[u]-c[p],A=_/2-h[u]/2+m,b=within(v,A,T),C=l;s.modifiersData[i]=((t={})[C]=b,t.centerOffset=b-A,t)}}function effect$1(e){var t=e.state,s=e.options.element,i=void 0===s?"[data-popper-arrow]":s;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var s=e.x,i=e.y,n=t.devicePixelRatio||1;return{x:round(s*n)/n||0,y:round(i*n)/n||0}}function mapToStyles(e){var t,s=e.popper,i=e.popperRect,n=e.placement,r=e.variation,a=e.offsets,o=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,h=e.isFixed,d=a.x,p=void 0===d?0:d,g=a.y,f=void 0===g?0:g,E="function"==typeof c?c({x:p,y:f}):{x:p,y:f};p=E.x,f=E.y;var _=a.hasOwnProperty("x"),m=a.hasOwnProperty("y"),v=left,T=top,A=window;if(u){var b=getOffsetParent(s),C="clientHeight",S="clientWidth";if(b===getWindow(s)&&"static"!==getComputedStyle$1(b=getDocumentElement(s)).position&&"absolute"===o&&(C="scrollHeight",S="scrollWidth"),n===top||(n===left||n===right)&&r===end)T=bottom,f-=(h&&b===A&&A.visualViewport?A.visualViewport.height:b[C])-i.height,f*=l?1:-1;if(n===left||(n===top||n===bottom)&&r===end)v=right,p-=(h&&b===A&&A.visualViewport?A.visualViewport.width:b[S])-i.width,p*=l?1:-1}var D,k=Object.assign({position:o},u&&unsetSides),N=!0===c?roundOffsetsByDPR({x:p,y:f},getWindow(s)):{x:p,y:f};return p=N.x,f=N.y,l?Object.assign({},k,((D={})[T]=m?"0":"",D[v]=_?"0":"",D.transform=(A.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",D)):Object.assign({},k,((t={})[T]=m?f+"px":"",t[v]=_?p+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,s=e.options,i=s.gpuAcceleration,n=void 0===i||i,r=s.adaptive,a=void 0===r||r,o=s.roundOffsets,l=void 0===o||o,u={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,s=e.instance,i=e.options,n=i.scroll,r=void 0===n||n,a=i.resize,o=void 0===a||a,l=getWindow(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&u.forEach((function(e){e.addEventListener("scroll",s.update,passive)})),o&&l.addEventListener("resize",s.update,passive),function(){r&&u.forEach((function(e){e.removeEventListener("scroll",s.update,passive)})),o&&l.removeEventListener("resize",s.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var s=getWindow(e),i=getDocumentElement(e),n=s.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=isLayoutViewport();(u||!u&&"fixed"===t)&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,s=getDocumentElement(e),i=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=max(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=max(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+getWindowScrollBarX(e),l=-i.scrollTop;return"rtl"===getComputedStyle$1(n||s).direction&&(o+=max(s.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function isScrollParent(e){var t=getComputedStyle$1(e),s=t.overflow,i=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var s;void 0===t&&(t=[]);var i=getScrollParent(e),n=i===(null==(s=e.ownerDocument)?void 0:s.body),r=getWindow(i),a=n?[r].concat(r.visualViewport||[],isScrollParent(i)?i:[]):i,o=t.concat(a);return n?o:o.concat(listScrollParents(getParentNode(a)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var s=getBoundingClientRect(e,!1,"fixed"===t);return s.top=s.top+e.clientTop,s.left=s.left+e.clientLeft,s.bottom=s.top+e.clientHeight,s.right=s.left+e.clientWidth,s.width=e.clientWidth,s.height=e.clientHeight,s.x=s.left,s.y=s.top,s}function getClientRectFromMixedType(e,t,s){return t===viewport?rectToClientRect(getViewportRect(e,s)):isElement$1(t)?getInnerBoundingClientRect(t,s):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),s=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(s)?t.filter((function(e){return isElement$1(e)&&contains(e,s)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,s,i){var n="clippingParents"===t?getClippingParents(e):[].concat(t),r=[].concat(n,[s]),a=r[0],o=r.reduce((function(t,s){var n=getClientRectFromMixedType(e,s,i);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromMixedType(e,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function computeOffsets(e){var t,s=e.reference,i=e.element,n=e.placement,r=n?getBasePlacement(n):null,a=n?getVariation(n):null,o=s.x+s.width/2-i.width/2,l=s.y+s.height/2-i.height/2;switch(r){case top:t={x:o,y:s.y-i.height};break;case bottom:t={x:o,y:s.y+s.height};break;case right:t={x:s.x+s.width,y:l};break;case left:t={x:s.x-i.width,y:l};break;default:t={x:s.x,y:s.y}}var u=r?getMainAxisFromPlacement(r):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case start:t[u]=t[u]-(s[c]/2-i[c]/2);break;case end:t[u]=t[u]+(s[c]/2-i[c]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=void 0===i?e.placement:i,r=s.strategy,a=void 0===r?e.strategy:r,o=s.boundary,l=void 0===o?clippingParents:o,u=s.rootBoundary,c=void 0===u?viewport:u,h=s.elementContext,d=void 0===h?popper:h,p=s.altBoundary,g=void 0!==p&&p,f=s.padding,E=void 0===f?0:f,_=mergePaddingObject("number"!=typeof E?E:expandToHashMap(E,basePlacements)),m=d===popper?reference:popper,v=e.rects.popper,T=e.elements[g?m:d],A=getClippingRect(isElement$1(T)?T:T.contextElement||getDocumentElement(e.elements.popper),l,c,a),b=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:b,element:v,strategy:"absolute",placement:n}),S=rectToClientRect(Object.assign({},v,C)),D=d===popper?S:b,k={top:A.top-D.top+_.top,bottom:D.bottom-A.bottom+_.bottom,left:A.left-D.left+_.left,right:D.right-A.right+_.right},N=e.modifiersData.offset;if(d===popper&&N){var O=N[n];Object.keys(k).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,s=[top,bottom].indexOf(e)>=0?"y":"x";k[e]+=O[s]*t}))}return k}function computeAutoPlacement(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=s.boundary,r=s.rootBoundary,a=s.padding,o=s.flipVariations,l=s.allowedAutoPlacements,u=void 0===l?placements:l,c=getVariation(i),h=c?o?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===c})):basePlacements,d=h.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=h);var p=d.reduce((function(t,s){return t[s]=detectOverflow(e,{placement:s,boundary:n,rootBoundary:r,padding:a})[getBasePlacement(s)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,s=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0===a||a,l=s.fallbackPlacements,u=s.padding,c=s.boundary,h=s.rootBoundary,d=s.altBoundary,p=s.flipVariations,g=void 0===p||p,f=s.allowedAutoPlacements,E=t.options.placement,_=getBasePlacement(E),m=l||(_===E||!g?[getOppositePlacement(E)]:getExpandedFallbackPlacements(E)),v=[E].concat(m).reduce((function(e,s){return e.concat(getBasePlacement(s)===auto?computeAutoPlacement(t,{placement:s,boundary:c,rootBoundary:h,padding:u,flipVariations:g,allowedAutoPlacements:f}):s)}),[]),T=t.rects.reference,A=t.rects.popper,b=new Map,C=!0,S=v[0],D=0;D<v.length;D++){var k=v[D],N=getBasePlacement(k),O=getVariation(k)===start,y=[top,bottom].indexOf(N)>=0,w=y?"width":"height",I=detectOverflow(t,{placement:k,boundary:c,rootBoundary:h,altBoundary:d,padding:u}),M=y?O?right:left:O?bottom:top;T[w]>A[w]&&(M=getOppositePlacement(M));var L=getOppositePlacement(M),R=[];if(r&&R.push(I[N]<=0),o&&R.push(I[M]<=0,I[L]<=0),R.every((function(e){return e}))){S=k,C=!1;break}b.set(k,R)}if(C)for(var P=function(e){var t=v.find((function(t){var s=b.get(t);if(s)return s.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},$=g?3:1;$>0;$--){if("break"===P($))break}t.placement!==S&&(t.modifiersData[i]._skip=!0,t.placement=S,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,s){return void 0===s&&(s={x:0,y:0}),{top:e.top-t.height-s.y,right:e.right-t.width+s.x,bottom:e.bottom-t.height+s.y,left:e.left-t.width-s.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,s=e.name,i=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,a=detectOverflow(t,{elementContext:"reference"}),o=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(a,i),u=getSideOffsets(o,n,r),c=isAnySideFullyClipped(l),h=isAnySideFullyClipped(u);t.modifiersData[s]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,s){var i=getBasePlacement(e),n=[left,top].indexOf(i)>=0?-1:1,r="function"==typeof s?s(Object.assign({},t,{placement:e})):s,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[left,right].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function offset(e){var t=e.state,s=e.options,i=e.name,n=s.offset,r=void 0===n?[0,0]:n,a=placements.reduce((function(e,s){return e[s]=distanceAndSkiddingToXY(s,t.rects,r),e}),{}),o=a[t.placement],l=o.x,u=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=a}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,s=e.name;t.modifiersData[s]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,s=e.options,i=e.name,n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0!==a&&a,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,h=s.padding,d=s.tether,p=void 0===d||d,g=s.tetherOffset,f=void 0===g?0:g,E=detectOverflow(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:c}),_=getBasePlacement(t.placement),m=getVariation(t.placement),v=!m,T=getMainAxisFromPlacement(_),A=getAltAxis(T),b=t.modifiersData.popperOffsets,C=t.rects.reference,S=t.rects.popper,D="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,k="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(b){if(r){var y,w="y"===T?top:left,I="y"===T?bottom:right,M="y"===T?"height":"width",L=b[T],R=L+E[w],P=L-E[I],$=p?-S[M]/2:0,F=m===start?C[M]:S[M],x=m===start?-S[M]:-C[M],V=t.elements.arrow,H=p&&V?getLayoutRect(V):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),W=B[w],K=B[I],j=within(0,C[M],H[M]),Y=v?C[M]/2-$-j-W-k.mainAxis:F-j-W-k.mainAxis,U=v?-C[M]/2+$+j+K+k.mainAxis:x+j+K+k.mainAxis,G=t.elements.arrow&&getOffsetParent(t.elements.arrow),z=G?"y"===T?G.clientTop||0:G.clientLeft||0:0,q=null!=(y=null==N?void 0:N[T])?y:0,X=L+U-q,Q=within(p?min(R,L+Y-q-z):R,L,p?max(P,X):P);b[T]=Q,O[T]=Q-L}if(o){var Z,J="x"===T?top:left,ee="x"===T?bottom:right,te=b[A],se="y"===A?"height":"width",ie=te+E[J],ne=te-E[ee],re=-1!==[top,left].indexOf(_),ae=null!=(Z=null==N?void 0:N[A])?Z:0,oe=re?ie:te-C[se]-S[se]-ae+k.altAxis,le=re?te+C[se]+S[se]-ae-k.altAxis:ne,ue=p&&re?withinMaxClamp(oe,te,le):within(p?oe:ie,te,p?le:ne);b[A]=ue,O[A]=ue-te}t.modifiersData[i]=O}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),s=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==s||1!==i}function getCompositeRect(e,t,s){void 0===s&&(s=!1);var i=isHTMLElement(t),n=isHTMLElement(t)&&isElementScaled(t),r=getDocumentElement(t),a=getBoundingClientRect(e,n,s),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&(("body"!==getNodeName(t)||isScrollParent(r))&&(o=getNodeScroll(t)),isHTMLElement(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=getWindowScrollBarX(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function order(e){var t=new Map,s=new Set,i=[];function n(e){s.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!s.has(e)){var i=t.get(e);i&&n(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){s.has(e.name)||n(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,s){return e.concat(t.filter((function(e){return e.phase===s})))}),[])}function debounce(e){var t;return function(){return t||(t=new Promise((function(s){Promise.resolve().then((function(){t=void 0,s(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var s=e[t.name];return e[t.name]=s?Object.assign({},s,t,{options:Object.assign({},s.options,t.options),data:Object.assign({},s.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,s=t.defaultModifiers,i=void 0===s?[]:s,n=t.defaultOptions,r=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,s){void 0===s&&(s=r);var n={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],o=!1,l={state:n,setOptions:function(s){var o="function"==typeof s?s(n.options):s;u(),n.options=Object.assign({},r,n.options,o),n.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var c=orderModifiers(mergeByName([].concat(i,n.options.modifiers)));return n.orderedModifiers=c.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,s=e.options,i=void 0===s?{}:s,r=e.effect;if("function"==typeof r){var o=r({state:n,name:t,instance:l,options:i}),u=function(){};a.push(o||u)}})),l.update()},forceUpdate:function(){if(!o){var e=n.elements,t=e.reference,s=e.popper;if(areValidElements(t,s)){n.rects={reference:getCompositeRect(t,getOffsetParent(s),"fixed"===n.options.strategy),popper:getLayoutRect(s)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var r=n.orderedModifiers[i],a=r.fn,u=r.options,c=void 0===u?{}:u,h=r.name;"function"==typeof a&&(n=a({state:n,options:c,name:h,instance:l})||n)}else n.reset=!1,i=-1}}},update:debounce((function(){return new Promise((function(e){l.forceUpdate(),e(n)}))})),destroy:function(){u(),o=!0}};if(!areValidElements(e,t))return l;function u(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(s).then((function(e){!o&&s.onFirstUpdate&&s.onFirstUpdate(e)})),l}}var createPopper$2=popperGenerator(),defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1],createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1}),defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),Popper=Object.freeze({__proto__:null,popperGenerator:popperGenerator,detectOverflow:detectOverflow,createPopperBase:createPopper$2,createPopper:createPopper,createPopperLite:createPopper$1,top:top,bottom:bottom,right:right,left:left,auto:auto,basePlacements:basePlacements,start:start,end:end,clippingParents:clippingParents,viewport:viewport,popper:popper,reference:reference,variationPlacements:variationPlacements,placements:placements,beforeRead:beforeRead,read:read,afterRead:afterRead,beforeMain:beforeMain,main:main,afterMain:afterMain,beforeWrite:beforeWrite,write:write,afterWrite:afterWrite,modifierPhases:modifierPhases,applyStyles:applyStyles$1,arrow:arrow$1,computeStyles:computeStyles$1,eventListeners:eventListeners,flip:flip$1,hide:hide$1,offset:offset$1,popperOffsets:popperOffsets$1,preventOverflow:preventOverflow$1});
|
|
9
|
+
var e=new Map;function t(t){var s=e.get(t);s&&s.destroy()}function o(t){var s=e.get(t);s&&s.update()}var r=null;"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,s){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var s,i=null,n=window.getComputedStyle(t),r=(s=t.value,function(){o({testForHeightReduction:""===s||!t.value.startsWith(s),restoreTextAlign:null}),s=t.value}),a=function(s){t.removeEventListener("autosize:destroy",a),t.removeEventListener("autosize:update",l),t.removeEventListener("input",r),window.removeEventListener("resize",l),Object.keys(s).forEach((function(e){return t.style[e]=s[e]})),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",a),t.addEventListener("autosize:update",l),t.addEventListener("input",r),window.addEventListener("resize",l),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:a,update:l}),l()}function o(e){var s,r,a=e.restoreTextAlign,l=void 0===a?null:a,u=e.testForHeightReduction,c=void 0===u||u,h=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),c&&(s=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach((function(e){var t=e[0],s=e[1];t.style.scrollBehavior="auto",t.scrollTop=s,t.style.scrollBehavior=null}))}}(t),t.style.height=""),r="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&r>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),r=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=r+"px",l&&(t.style.textAlign=l),s&&s(),i!==r&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=r),h!==n.overflow&&!l)){var d=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===d?"end":"start"),o({restoreTextAlign:d,testForHeightReduction:!0})}}function l(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e});var n=r,elements=document.querySelectorAll('[data-bs-toggle="autosize"]');function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var s,i,n={},r=Object.keys(e);for(i=0;i<r.length;i++)s=r[i],t.indexOf(s)>=0||(n[s]=e[s]);return n}function IMask(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new IMask.InputMask(e,t)}elements.length&&elements.forEach((function(e){n(e)}));class ChangeDetails{constructor(e){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},e)}aggregate(e){return this.rawInserted+=e.rawInserted,this.skip=this.skip||e.skip,this.inserted+=e.inserted,this.tailShift+=e.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}function isString(e){return"string"==typeof e||e instanceof String}IMask.ChangeDetails=ChangeDetails;const DIRECTION={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function forceDirection(e){switch(e){case DIRECTION.LEFT:return DIRECTION.FORCE_LEFT;case DIRECTION.RIGHT:return DIRECTION.FORCE_RIGHT;default:return e}}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function normalizePrepare(e){return Array.isArray(e)?e:[e,new ChangeDetails]}function objectIncludes(e,t){if(t===e)return!0;var s,i=Array.isArray(t),n=Array.isArray(e);if(i&&n){if(t.length!=e.length)return!1;for(s=0;s<t.length;s++)if(!objectIncludes(t[s],e[s]))return!1;return!0}if(i!=n)return!1;if(t&&e&&"object"==typeof t&&"object"==typeof e){var r=t instanceof Date,a=e instanceof Date;if(r&&a)return t.getTime()==e.getTime();if(r!=a)return!1;var o=t instanceof RegExp,l=e instanceof RegExp;if(o&&l)return t.toString()==e.toString();if(o!=l)return!1;var u=Object.keys(t);for(s=0;s<u.length;s++)if(!Object.prototype.hasOwnProperty.call(e,u[s]))return!1;for(s=0;s<u.length;s++)if(!objectIncludes(e[u[s]],t[u[s]]))return!1;return!0}return!(!t||!e||"function"!=typeof t||"function"!=typeof e)&&t.toString()===e.toString()}class ActionDetails{constructor(e,t,s,i){for(this.value=e,this.cursorPos=t,this.oldValue=s,this.oldSelection=i;this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?DIRECTION.NONE:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?DIRECTION.LEFT:DIRECTION.RIGHT}}class ContinuousTailDetails{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2?arguments[2]:void 0;this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Masked{constructor(e){this._value="",this._update(Object.assign({},Masked.DEFAULTS,e)),this.isInitialized=!0}updateOptions(e){Object.keys(e).length&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e)}resolve(e){return this.reset(),this.append(e,{input:!0},""),this.doCommit(),this.value}get unmaskedValue(){return this.value}set unmaskedValue(e){this.reset(),this.append(e,{},""),this.doCommit()}get typedValue(){return this.doParse(this.value)}set typedValue(e){this.value=this.doFormat(e)}get rawInputValue(){return this.extractInput(0,this.value.length,{raw:!0})}set rawInputValue(e){this.reset(),this.append(e,{raw:!0},""),this.doCommit()}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return Math.min(this.value.length,t-e)}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(e,t)}extractTail(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return new ContinuousTailDetails(this.extractInput(e,t),e)}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}_appendCharRaw(e){return e?(this._value+=e,new ChangeDetails({inserted:e,rawInserted:e})):new ChangeDetails}_appendChar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const i=this.state;let n;if([e,n]=normalizePrepare(this.doPrepare(e,t)),n=n.aggregate(this._appendCharRaw(e,t)),n.inserted){let e,r=!1!==this.doValidate(t);if(r&&null!=s){const t=this.state;!0===this.overwrite&&(e=s.state,s.unshift(this.value.length-n.tailShift));let i=this.appendTail(s);r=i.rawInserted===s.toString(),r&&i.inserted||"shift"!==this.overwrite||(this.state=t,e=s.state,s.shift(),i=this.appendTail(s),r=i.rawInserted===s.toString()),r&&i.inserted&&(this.state=t)}r||(n=new ChangeDetails,this.state=i,s&&e&&(s.state=e))}return n}_appendPlaceholder(){return new ChangeDetails}_appendEager(){return new ChangeDetails}append(e,t,s){if(!isString(e))throw new Error("value should be string");const i=new ChangeDetails,n=isString(s)?new ContinuousTailDetails(String(s)):s;null!=t&&t.tail&&(t._beforeTailState=this.state);for(let s=0;s<e.length;++s){const r=this._appendChar(e[s],t,n);if(!r.rawInserted&&!this.doSkipInvalid(e[s],t,n))break;i.aggregate(r)}return null!=n&&(i.tailShift+=this.appendTail(n).tailShift),(!0===this.eager||"append"===this.eager)&&null!=t&&t.input&&e&&i.aggregate(this._appendEager()),i}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this._value=this.value.slice(0,e)+this.value.slice(t),new ChangeDetails}withValueRefresh(e){if(this._refreshing||!this.isInitialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,i=e();return this.rawInputValue=t,this.value&&this.value!==s&&0===s.indexOf(this.value)&&this.append(s.slice(this.value.length),{},""),delete this._refreshing,i}runIsolated(e){if(this._isolated||!this.isInitialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e){return this.skipInvalid}doPrepare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.prepare?this.prepare(e,this,t):e}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}doFormat(e){return this.format?this.format(e,this):e}doParse(e){return this.parse?this.parse(e,this):e}splice(e,t,s,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{input:!0};const r=e+t,a=this.extractTail(r),o=!0===this.eager||"remove"===this.eager;let l;o&&(i=forceDirection(i),l=this.extractInput(0,r,{raw:!0}));let u=e;const c=new ChangeDetails;if(i!==DIRECTION.NONE&&(u=this.nearestInputPos(e,t>1&&0!==e&&!o?DIRECTION.NONE:i),c.tailShift=u-e),c.aggregate(this.remove(u)),o&&i!==DIRECTION.NONE&&l===this.rawInputValue)if(i===DIRECTION.FORCE_LEFT){let e;for(;l===this.rawInputValue&&(e=this.value.length);)c.aggregate(new ChangeDetails({tailShift:-1})).aggregate(this.remove(e-1))}else i===DIRECTION.FORCE_RIGHT&&a.unshift();return c.aggregate(this.append(s,n,a))}maskEquals(e){return this.mask===e}typedValueEquals(e){const t=this.typedValue;return e===t||Masked.EMPTY_VALUES.includes(e)&&Masked.EMPTY_VALUES.includes(t)||this.doFormat(e)===this.doFormat(this.typedValue)}}function maskedClass(e){if(null==e)throw new Error("mask property should be defined");return e instanceof RegExp?IMask.MaskedRegExp:isString(e)?IMask.MaskedPattern:e instanceof Date||e===Date?IMask.MaskedDate:e instanceof Number||"number"==typeof e||e===Number?IMask.MaskedNumber:Array.isArray(e)||e===Array?IMask.MaskedDynamic:IMask.Masked&&e.prototype instanceof IMask.Masked?e:e instanceof IMask.Masked?e.constructor:e instanceof Function?IMask.MaskedFunction:(console.warn("Mask not found for mask",e),IMask.Masked)}function createMask(e){if(IMask.Masked&&e instanceof IMask.Masked)return e;const t=(e=Object.assign({},e)).mask;if(IMask.Masked&&t instanceof IMask.Masked)return t;const s=maskedClass(t);if(!s)throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask.");return new s(e)}Masked.DEFAULTS={format:String,parse:e=>e,skipInvalid:!0},Masked.EMPTY_VALUES=[void 0,null,""],IMask.Masked=Masked,IMask.createMask=createMask;const _excluded$4=["parent","isOptional","placeholderChar","displayChar","lazy","eager"],DEFAULT_INPUT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class PatternInputDefinition{constructor(e){const{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a}=e,o=_objectWithoutPropertiesLoose(e,_excluded$4);this.masked=createMask(o),Object.assign(this,{parent:t,isOptional:s,placeholderChar:i,displayChar:n,lazy:r,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return 0===e&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new ChangeDetails}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isFilled)return new ChangeDetails;const s=this.masked.state,i=this.masked._appendChar(e,t);return i.inserted&&!1===this.doValidate(t)&&(i.inserted=i.rawInserted="",this.masked.state=s),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(){return this.masked.append(...arguments)}_appendPlaceholder(){const e=new ChangeDetails;return this.isFilled||this.isOptional||(this.isFilled=!0,e.inserted=this.placeholderChar),e}_appendEager(){return new ChangeDetails}extractTail(){return this.masked.extractTail(...arguments)}appendTail(){return this.masked.appendTail(...arguments)}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2?arguments[2]:void 0;return this.masked.extractInput(e,t,s)}nearestInputPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DIRECTION.NONE;const s=this.value.length,i=Math.min(Math.max(e,0),s);switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return this.isComplete?i:0;case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:return this.isComplete?i:s;default:return i}}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;return this.value.slice(e,t).length}doValidate(){return this.masked.doValidate(...arguments)&&(!this.parent||this.parent.doValidate(...arguments))}doCommit(){this.masked.doCommit()}get state(){return{masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}}class PatternFixedDefinition{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new ChangeDetails}nearestInputPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DIRECTION.NONE;const s=this._value.length;switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return 0;default:return s}}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return this._isRawInput?t-e:0}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._value.length;return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=new ChangeDetails;if(this.isFilled)return s;const i=!0===this.eager||"append"===this.eager,n=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!i)&&!t.tail;return n&&(s.rawInserted=this.char),this._value=s.inserted=this.char,this._isRawInput=n&&(t.raw||t.input),s}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new ChangeDetails;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return arguments.length>1&&void 0!==arguments[1]||this.value.length,new ContinuousTailDetails("")}appendTail(e){return isString(e)&&(e=new ContinuousTailDetails(String(e))),e.appendTo(this)}append(e,t,s){const i=this._appendChar(e[0],t);return null!=s&&(i.tailShift+=this.appendTail(s).tailShift),i}doCommit(){}get state(){return{_value:this._value,_isRawInput:this._isRawInput}}set state(e){Object.assign(this,e)}}const _excluded$3=["chunks"];class ChunksTailDetails{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;isString(e)&&(e=new ContinuousTailDetails(String(e)));const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||null==e.stop)&&e.from===t.from+t.toString().length;if(e instanceof ContinuousTailDetails)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof ChunksTailDetails){if(null==e.stop){let t;for(;e.chunks.length&&null==e.chunks[0].stop;)t=e.chunks.shift(),t.from+=e.from,this.extend(t)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof IMask.MaskedPattern)){return new ContinuousTailDetails(this.toString()).appendTo(e)}const t=new ChangeDetails;for(let s=0;s<this.chunks.length&&!t.skip;++s){const i=this.chunks[s],n=e._mapPosToBlock(e.value.length),r=i.stop;let a;if(null!=r&&(!n||n.index<=r)){if(i instanceof ChunksTailDetails||e._stops.indexOf(r)>=0){const s=e._appendPlaceholder(r);t.aggregate(s)}a=i instanceof ChunksTailDetails&&e._blocks[r]}if(a){const s=a.appendTail(i);s.skip=!1,t.aggregate(s),e._value+=s.inserted;const n=i.toString().slice(s.rawInserted.length);n&&t.aggregate(e.append(n,{tail:!0}))}else t.aggregate(e.append(i.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map((e=>e.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t}=e,s=_objectWithoutPropertiesLoose(e,_excluded$3);Object.assign(this,s),this.chunks=t.map((e=>{const t="chunks"in e?new ChunksTailDetails:new ContinuousTailDetails;return t.state=e,t}))}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";const t=null!=e?e-this.from:e;let s=0;for(;s<this.chunks.length;){const e=this.chunks[s],i=e.unshift(t);if(e.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class PatternCursor{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:i}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=i,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return this.state=e,e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.value.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null===(t=this.block)||void 0===t?void 0:t.value.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_LEFT),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.LEFT),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.FORCE_RIGHT),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,DIRECTION.NONE),!0}))}}class MaskedRegExp extends Masked{_update(e){e.mask&&(e.validate=t=>t.search(e.mask)>=0),super._update(e)}}IMask.MaskedRegExp=MaskedRegExp;const _excluded$2=["_blocks"];class MaskedPattern extends Masked{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.definitions=Object.assign({},DEFAULT_INPUT_DEFINITIONS,e.definitions),super(Object.assign({},MaskedPattern.DEFAULTS,e))}_update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this._stops=[],this._maskedBlocks={};let t=this.mask;if(!t||!e)return;let s=!1,i=!1;for(let a=0;a<t.length;++a){var n,r;if(this.blocks){const e=t.slice(a),s=Object.keys(this.blocks).filter((t=>0===e.indexOf(t)));s.sort(((e,t)=>t.length-e.length));const i=s[0];if(i){const e=createMask(Object.assign({parent:this,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite},this.blocks[i]));e&&(this._blocks.push(e),this._maskedBlocks[i]||(this._maskedBlocks[i]=[]),this._maskedBlocks[i].push(this._blocks.length-1)),a+=i.length-1;continue}}let o=t[a],l=o in e;if(o===MaskedPattern.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===o||"}"===o){s=!s;continue}if("["===o||"]"===o){i=!i;continue}if(o===MaskedPattern.ESCAPE_CHAR){if(++a,o=t[a],!o)break;l=!1}const u=null===(n=e[o])||void 0===n||!n.mask||(null===(r=e[o])||void 0===r?void 0:r.mask.prototype)instanceof IMask.Masked?{mask:e[o]}:e[o],c=l?new PatternInputDefinition(Object.assign({parent:this,isOptional:i,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar},u)):new PatternFixedDefinition({char:o,eager:this.eager,isUnmasking:s});this._blocks.push(c)}}get state(){return Object.assign({},super.state,{_blocks:this._blocks.map((e=>e.state))})}set state(e){const{_blocks:t}=e,s=_objectWithoutPropertiesLoose(e,_excluded$2);this._blocks.forEach(((e,s)=>e.state=t[s])),super.state=s}reset(){super.reset(),this._blocks.forEach((e=>e.reset()))}get isComplete(){return this._blocks.every((e=>e.isComplete))}get isFilled(){return this._blocks.every((e=>e.isFilled))}get isFixed(){return this._blocks.every((e=>e.isFixed))}get isOptional(){return this._blocks.every((e=>e.isOptional))}doCommit(){this._blocks.forEach((e=>e.doCommit())),super.doCommit()}get unmaskedValue(){return this._blocks.reduce(((e,t)=>e+t.unmaskedValue),"")}set unmaskedValue(e){super.unmaskedValue=e}get value(){return this._blocks.reduce(((e,t)=>e+t.value),"")}set value(e){super.value=e}get displayValue(){return this._blocks.reduce(((e,t)=>e+t.displayValue),"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new ChangeDetails;let s=null===(e=this._mapPosToBlock(this.value.length))||void 0===e?void 0:e.index;if(null==s)return t;this._blocks[s].isFilled&&++s;for(let e=s;e<this._blocks.length;++e){const s=this._blocks[e]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this._mapPosToBlock(this.value.length),i=new ChangeDetails;if(!s)return i;for(let a=s.index;;++a){var n,r;const s=this._blocks[a];if(!s)break;const o=s._appendChar(e,Object.assign({},t,{_beforeTailState:null===(n=t._beforeTailState)||void 0===n||null===(r=n._blocks)||void 0===r?void 0:r[a]})),l=o.skip;if(i.aggregate(o),l||o.rawInserted)break}return i}extractTail(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;const s=new ChunksTailDetails;return e===t||this._forEachBlocksInRange(e,t,((e,t,i,n)=>{const r=e.extractTail(i,n);r.stop=this._findStopBefore(t),r.from=this._blockStartPos(t),r instanceof ChunksTailDetails&&(r.blockIndex=t),s.extend(r)})),s}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e===t)return"";let i="";return this._forEachBlocksInRange(e,t,((e,t,n,r)=>{i+=e.extractInput(n,r,s)})),i}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const i=this._stops[s];if(!(i<=e))break;t=i}return t}_appendPlaceholder(e){const t=new ChangeDetails;if(this.lazy&&null==e)return t;const s=this._mapPosToBlock(this.value.length);if(!s)return t;const i=s.index,n=null!=e?e:this._blocks.length;return this._blocks.slice(i,n).forEach((s=>{if(!s.lazy||null!=e){const e=null!=s._blocks?[s._blocks.length]:[],i=s._appendPlaceholder(...e);this._value+=i.inserted,t.aggregate(i)}})),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const i=this._blocks[s],n=t.length;if(t+=i.value,e<=t.length)return{index:s,offset:e-n}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce(((e,t)=>e+t.value.length),0)}_forEachBlocksInRange(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2?arguments[2]:void 0;const i=this._mapPosToBlock(e);if(i){const e=this._mapPosToBlock(t),n=e&&i.index===e.index,r=i.offset,a=e&&n?e.offset:this._blocks[i.index].value.length;if(s(this._blocks[i.index],i.index,r,a),e&&!n){for(let t=i.index+1;t<e.index;++t)s(this._blocks[t],t,0,this._blocks[t].value.length);s(this._blocks[e.index],e.index,0,e.offset)}}}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s.aggregate(e.remove(i,n))})),s}nearestInputPos(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:DIRECTION.NONE;if(!this._blocks.length)return 0;const s=new PatternCursor(this,e);if(t===DIRECTION.NONE)return s.pushRightBeforeInput()?s.pos:(s.popState(),s.pushLeftBeforeInput()?s.pos:this.value.length);if(t===DIRECTION.LEFT||t===DIRECTION.FORCE_LEFT){if(t===DIRECTION.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===DIRECTION.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e)return s.pos;if(s.popState(),s.ok&&s.pos<=e)return s.pos;s.popState()}return s.ok?s.pos:t===DIRECTION.FORCE_LEFT?0:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:0))}return t===DIRECTION.RIGHT||t===DIRECTION.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===DIRECTION.FORCE_RIGHT?this.value.length:(s.popState(),s.ok?s.pos:(s.popState(),s.ok?s.pos:this.nearestInputPos(e,DIRECTION.LEFT)))):e}totalInputPositions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=0;return this._forEachBlocksInRange(e,t,((e,t,i,n)=>{s+=e.totalInputPositions(i,n)})),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map((e=>this._blocks[e])):[]}}MaskedPattern.DEFAULTS={lazy:!0,placeholderChar:"_"},MaskedPattern.STOP_CHAR="`",MaskedPattern.ESCAPE_CHAR="\\",MaskedPattern.InputDefinition=PatternInputDefinition,MaskedPattern.FixedDefinition=PatternFixedDefinition,IMask.MaskedPattern=MaskedPattern;class MaskedRange extends MaskedPattern{get _matchFrom(){return this.maxLength-String(this.from).length}_update(e){e=Object.assign({to:this.to||0,from:this.from||0,maxLength:this.maxLength||0},e);let t=String(e.to).length;null!=e.maxLength&&(t=Math.max(t,e.maxLength)),e.maxLength=t;const s=String(e.from).padStart(t,"0"),i=String(e.to).padStart(t,"0");let n=0;for(;n<i.length&&i[n]===s[n];)++n;e.mask=i.slice(0,n).replace(/0/g,"\\0")+"0".repeat(t-n),super._update(e)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(e){let t="",s="";const[,i,n]=e.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(t="0".repeat(i.length)+n,s="9".repeat(i.length)+n),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepare(e){let t,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if([e,t]=normalizePrepare(super.doPrepare(e.replace(/\D/g,""),s)),!this.autofix||!e)return e;const i=String(this.from).padStart(this.maxLength,"0"),n=String(this.to).padStart(this.maxLength,"0");let r=this.value+e;if(r.length>this.maxLength)return"";const[a,o]=this.boundaries(r);return Number(o)<this.from?i[r.length-1]:Number(a)>this.to?"pad"===this.autofix&&r.length<this.maxLength?["",t.aggregate(this.append(i[r.length-1]+e,s))]:n[r.length-1]:e}doValidate(){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[t,s]=this.boundaries(e);return this.from<=Number(s)&&Number(t)<=this.to&&super.doValidate(...arguments)}}IMask.MaskedRange=MaskedRange;class MaskedDate extends MaskedPattern{constructor(e){super(Object.assign({},MaskedDate.DEFAULTS,e))}_update(e){e.mask===Date&&delete e.mask,e.pattern&&(e.mask=e.pattern);const t=e.blocks;e.blocks=Object.assign({},MaskedDate.GET_DEFAULT_BLOCKS()),e.min&&(e.blocks.Y.from=e.min.getFullYear()),e.max&&(e.blocks.Y.to=e.max.getFullYear()),e.min&&e.max&&e.blocks.Y.from===e.blocks.Y.to&&(e.blocks.m.from=e.min.getMonth()+1,e.blocks.m.to=e.max.getMonth()+1,e.blocks.m.from===e.blocks.m.to&&(e.blocks.d.from=e.min.getDate(),e.blocks.d.to=e.max.getDate())),Object.assign(e.blocks,this.blocks,t),Object.keys(e.blocks).forEach((t=>{const s=e.blocks[t];!("autofix"in s)&&"autofix"in e&&(s.autofix=e.autofix)})),super._update(e)}doValidate(){const e=this.date;return super.doValidate(...arguments)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}}MaskedDate.DEFAULTS={pattern:"d{.}`m{.}`Y",format:e=>{if(!e)return"";return[String(e.getDate()).padStart(2,"0"),String(e.getMonth()+1).padStart(2,"0"),e.getFullYear()].join(".")},parse:e=>{const[t,s,i]=e.split(".");return new Date(i,s-1,t)}},MaskedDate.GET_DEFAULT_BLOCKS=()=>({d:{mask:MaskedRange,from:1,to:31,maxLength:2},m:{mask:MaskedRange,from:1,to:12,maxLength:2},Y:{mask:MaskedRange,from:1900,to:9999}}),IMask.MaskedDate=MaskedDate;class MaskElement{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch(e){}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch(e){}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch(e){}}_unsafeSelect(e,t){}get isActive(){return!1}bindEvents(e){}unbindEvents(){}}IMask.MaskElement=MaskElement;class HTMLMaskElement extends MaskElement{constructor(e){super(),this.input=e,this._handlers={}}get rootElement(){var e,t,s;return null!==(e=null===(t=(s=this.input).getRootNode)||void 0===t?void 0:t.call(s))&&void 0!==e?e:document}get isActive(){return this.input===this.rootElement.activeElement}get _unsafeSelectionStart(){return this.input.selectionStart}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}bindEvents(e){Object.keys(e).forEach((t=>this._toggleEventHandler(HTMLMaskElement.EVENTS_MAP[t],e[t])))}unbindEvents(){Object.keys(this._handlers).forEach((e=>this._toggleEventHandler(e)))}_toggleEventHandler(e,t){this._handlers[e]&&(this.input.removeEventListener(e,this._handlers[e]),delete this._handlers[e]),t&&(this.input.addEventListener(e,t),this._handlers[e]=t)}}HTMLMaskElement.EVENTS_MAP={selectionChange:"keydown",input:"input",drop:"drop",click:"click",focus:"focus",commit:"blur"},IMask.HTMLMaskElement=HTMLMaskElement;class HTMLContenteditableMaskElement extends HTMLMaskElement{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s<i?s:i}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,i=t&&t.focusOffset;return null==i||null==s||s>i?s:i}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const i=this.rootElement,n=i.getSelection&&i.getSelection();n&&(n.removeAllRanges(),n.addRange(s))}get value(){return this.input.textContent}set value(e){this.input.textContent=e}}IMask.HTMLContenteditableMaskElement=HTMLContenteditableMaskElement;const _excluded$1=["mask"];class InputMask{constructor(e,t){this.el=e instanceof MaskElement?e:e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?new HTMLContenteditableMaskElement(e):new HTMLMaskElement(e),this.masked=createMask(t),this._listeners={},this._value="",this._unmaskedValue="",this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}get mask(){return this.masked.mask}maskEquals(e){var t;return null==e||(null===(t=this.masked)||void 0===t?void 0:t.maskEquals(e))}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof IMask.Masked)&&this.masked.constructor===maskedClass(e))return void this.masked.updateOptions({mask:e});const t=createMask({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl(),this.alignCursor())}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl(),this.alignCursor())}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];const n=this._listeners[e];n&&n.forEach((e=>e(...s)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value}updateControl(){const e=this.masked.unmaskedValue,t=this.masked.value,s=this.displayValue,i=this.unmaskedValue!==e||this.value!==t;this._unmaskedValue=e,this._value=t,this.el.value!==s&&(this.el.value=s),i&&this._fireChangeEvents()}updateOptions(e){const{mask:t}=e,s=_objectWithoutPropertiesLoose(e,_excluded$1),i=!this.maskEquals(t),n=!objectIncludes(this.masked,s);i&&(this.mask=t),n&&this.masked.updateOptions(s),(i||n)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,DIRECTION.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){if(this._inputEvent=e,this._abortUpdateCursor(),!this._selection)return this.updateValue();const t=new ActionDetails(this.el.value,this.cursorPos,this.displayValue,this._selection),s=this.masked.rawInputValue,i=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=s===this.masked.rawInputValue?t.removeDirection:DIRECTION.NONE;let r=this.masked.nearestInputPos(t.startChangePos+i,n);n!==DIRECTION.NONE&&(r=this.masked.nearestInputPos(r,DIRECTION.NONE)),this.updateControl(),this.updateCursor(r),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}IMask.InputMask=InputMask;class MaskedEnum extends MaskedPattern{_update(e){e.enum&&(e.mask="*".repeat(e.enum[0].length)),super._update(e)}doValidate(){return this.enum.some((e=>e.indexOf(this.unmaskedValue)>=0))&&super.doValidate(...arguments)}}IMask.MaskedEnum=MaskedEnum;class MaskedNumber extends Masked{constructor(e){super(Object.assign({},MaskedNumber.DEFAULTS,e))}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){let e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"(".concat(escapeRegExp(this.radix),"\\d{0,").concat(this.scale,"})?"):"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("[".concat(this.mapToRadix.map(escapeRegExp).join(""),"]"),"g"),this._thousandsSeparatorRegExp=new RegExp(escapeRegExp(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e);const[s,i]=normalizePrepare(super.doPrepare(e,t));return e&&!s&&(i.skip=!0),[s,i]}_separatorsCount(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=0;for(let i=0;i<e;++i)this._value.indexOf(this.thousandsSeparator,i)===i&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._value;return this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length,s=arguments.length>2?arguments[2]:void 0;return[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.thousandsSeparator)return super._appendCharRaw(e,t);const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,i=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const n=super._appendCharRaw(e,t);this._value=this._insertThousandsSeparators(this._value);const r=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,a=this._separatorsCountFromSlice(r);return n.tailShift+=(a-i)*this.thousandsSeparator.length,n.skip=!n.rawInserted&&e===this.thousandsSeparator,n}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const i=this._findSeparatorAround(t);return i>=0&&(t=i+this.thousandsSeparator.length),[e,t]}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.value.length;[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),i=this.value.slice(t),n=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+i));const r=this._separatorsCountFromSlice(s);return new ChangeDetails({tailShift:(r-n)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case DIRECTION.NONE:case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const i=s+this.thousandsSeparator.length;if(e<i||this.value.length<=i||t===DIRECTION.FORCE_LEFT)return s}break}case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:{const t=this._findSeparatorAround(e);if(t>=0)return t+this.thousandsSeparator.length}}return e}doValidate(e){let t=Boolean(this._removeThousandsSeparators(this.value).match(this._numberRegExp));if(t){const e=this.number;t=t&&!isNaN(e)&&(null==this.min||this.min>=0||this.min<=this.number)&&(null==this.max||this.max<=0||this.number<=this.max)}return t&&super.doValidate(e)}doCommit(){if(this.value){const e=this.number;let t=e;null!=this.min&&(t=Math.max(t,this.min)),null!=this.max&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.doFormat(t));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,((e,t,s,i)=>t+i)),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const i=0===this.scale&&e!==this.thousandsSeparator&&(e===this.radix||e===MaskedNumber.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!i}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,MaskedNumber.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.doParse(this.unmaskedValue)}set typedValue(e){this.rawInputValue=this.doFormat(e).replace(MaskedNumber.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.signed||null!=this.min&&this.min<0||null!=this.max&&this.max<0}typedValueEquals(e){return(super.typedValueEquals(e)||MaskedNumber.EMPTY_VALUES.includes(e)&&MaskedNumber.EMPTY_VALUES.includes(this.typedValue))&&!(0===e&&""===this.value)}}MaskedNumber.UNMASKED_RADIX=".",MaskedNumber.DEFAULTS={radix:",",thousandsSeparator:"",mapToRadix:[MaskedNumber.UNMASKED_RADIX],scale:2,signed:!1,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:e=>e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},MaskedNumber.EMPTY_VALUES=[...Masked.EMPTY_VALUES,0],IMask.MaskedNumber=MaskedNumber;class MaskedFunction extends Masked{_update(e){e.mask&&(e.validate=e.mask),super._update(e)}}IMask.MaskedFunction=MaskedFunction;const _excluded=["compiledMasks","currentMaskRef","currentMask"],_excluded2=["mask"];class MaskedDynamic extends Masked{constructor(e){super(Object.assign({},MaskedDynamic.DEFAULTS,e)),this.currentMask=null}_update(e){super._update(e),"mask"in e&&(this.compiledMasks=Array.isArray(e.mask)?e.mask.map((e=>createMask(e))):[])}_appendCharRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=t.tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value,n=this.rawInputValue,r=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:n,a=n.slice(r.length),o=this.currentMask,l=new ChangeDetails,u=null==o?void 0:o.state;if(this.currentMask=this.doDispatch(e,Object.assign({},t),s),this.currentMask)if(this.currentMask!==o){if(this.currentMask.reset(),r){const e=this.currentMask.append(r,{raw:!0});l.tailShift=e.inserted.length-i.length}a&&(l.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)}else this.currentMask.state=u;return l}_appendPlaceholder(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch(...arguments);return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new ChangeDetails;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return Object.assign({},e,{_beforeTailState:(null===(t=e._beforeTailState)||void 0===t?void 0:t.currentMaskRef)===this.currentMask&&(null===(s=e._beforeTailState)||void 0===s?void 0:s.currentMask)||e._beforeTailState})}doDispatch(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[s,i]=normalizePrepare(super.doPrepare(e,t));if(this.currentMask){let e;[s,e]=normalizePrepare(super.doPrepare(s,this.currentMaskFlags(t))),i=i.aggregate(e)}return[s,i]}reset(){var e;null===(e=this.currentMask)||void 0===e||e.reset(),this.compiledMasks.forEach((e=>e.reset()))}get value(){return this.currentMask?this.currentMask.value:""}set value(e){super.value=e}get unmaskedValue(){return this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.currentMask?this.currentMask.typedValue:""}set typedValue(e){let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null===(e=this.currentMask)||void 0===e?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null===(e=this.currentMask)||void 0===e?void 0:e.isFilled)}remove(){const e=new ChangeDetails;return this.currentMask&&e.aggregate(this.currentMask.remove(...arguments)).aggregate(this._applyDispatch()),e}get state(){var e;return Object.assign({},super.state,{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((e=>e.state)),currentMaskRef:this.currentMask,currentMask:null===(e=this.currentMask)||void 0===e?void 0:e.state})}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:i}=e,n=_objectWithoutPropertiesLoose(e,_excluded);this.compiledMasks.forEach(((e,s)=>e.state=t[s])),null!=s&&(this.currentMask=s,this.currentMask.state=i),super.state=n}extractInput(){return this.currentMask?this.currentMask.extractInput(...arguments):""}extractTail(){return this.currentMask?this.currentMask.extractTail(...arguments):super.extractTail(...arguments)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(){return this.currentMask?this.currentMask.nearestInputPos(...arguments):super.nearestInputPos(...arguments)}get overwrite(){return this.currentMask?this.currentMask.overwrite:super.overwrite}set overwrite(e){console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings')}get eager(){return this.currentMask?this.currentMask.eager:super.eager}set eager(e){console.warn('"eager" option is not available in dynamic mask, use this option in siblings')}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:super.skipInvalid}set skipInvalid(e){(this.isInitialized||e!==Masked.DEFAULTS.skipInvalid)&&console.warn('"skipInvalid" option is not available in dynamic mask, use this option in siblings')}maskEquals(e){return Array.isArray(e)&&this.compiledMasks.every(((t,s)=>{if(!e[s])return;const i=e[s],{mask:n}=i;return objectIncludes(t,_objectWithoutPropertiesLoose(i,_excluded2))&&t.maskEquals(n)}))}typedValueEquals(e){var t;return Boolean(null===(t=this.currentMask)||void 0===t?void 0:t.typedValueEquals(e))}}MaskedDynamic.DEFAULTS={dispatch:(e,t,s,i)=>{if(!t.compiledMasks.length)return;const n=t.rawInputValue,r=t.compiledMasks.map(((r,a)=>{const o=t.currentMask===r,l=o?r.value.length:r.nearestInputPos(r.value.length,DIRECTION.FORCE_LEFT);return r.rawInputValue!==n?(r.reset(),r.append(n,{raw:!0})):o||r.remove(l),r.append(e,t.currentMaskFlags(s)),r.appendTail(i),{index:a,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(l,r.nearestInputPos(r.value.length,DIRECTION.FORCE_LEFT)))}}));return r.sort(((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions)),t.compiledMasks[r[0].index]}},IMask.MaskedDynamic=MaskedDynamic;const PIPE_TYPE={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function createPipe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PIPE_TYPE.MASKED,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:PIPE_TYPE.MASKED;const i=createMask(e);return e=>i.runIsolated((i=>(i[t]=e,i[s])))}function pipe(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];return createPipe(...s)(e)}IMask.PIPE_TYPE=PIPE_TYPE,IMask.createPipe=createPipe,IMask.pipe=pipe;try{globalThis.IMask=IMask}catch(e){}var maskElementList=[].slice.call(document.querySelectorAll("[data-mask]"));maskElementList.map((function(e){return new IMask(e,{mask:e.dataset.mask,lazy:"true"===e.dataset["mask-visible"]})}));var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$1(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var s=t.styles[e]||{},i=t.attributes[e]||{},n=t.elements[e];isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,s),Object.keys(i).forEach((function(e){var t=i[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],n=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:s[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,r),Object.keys(n).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,s){void 0===t&&(t=!1),void 0===s&&(s=!1);var i=e.getBoundingClientRect(),n=1,r=1;t&&isHTMLElement(e)&&(n=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,r=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var a=(isElement$1(e)?getWindow(e):window).visualViewport,o=!isLayoutViewport()&&s,l=(i.left+(o&&a?a.offsetLeft:0))/n,u=(i.top+(o&&a?a.offsetTop:0))/r,c=i.width/n,h=i.height/r;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l,x:l,y:u}}function getLayoutRect(e){var t=getBoundingClientRect(e),s=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-s)<=1&&(s=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:s,height:i}}function contains(e,t){var s=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(s&&isShadowRoot(s)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement$1(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var s=getParentNode(e);for(isShadowRoot(s)&&(s=s.host);isHTMLElement(s)&&["html","body"].indexOf(getNodeName(s))<0;){var i=getComputedStyle$1(s);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return s;s=s.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),s=getTrueOffsetParent(e);s&&isTableElement(s)&&"static"===getComputedStyle$1(s).position;)s=getTrueOffsetParent(s);return s&&("html"===getNodeName(s)||"body"===getNodeName(s)&&"static"===getComputedStyle$1(s).position)?t:s||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,s){return max(e,min(t,s))}function withinMaxClamp(e,t,s){var i=within(e,t,s);return i>s?s:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,s){return t[s]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,s=e.state,i=e.name,n=e.options,r=s.elements.arrow,a=s.modifiersData.popperOffsets,o=getBasePlacement(s.placement),l=getMainAxisFromPlacement(o),u=[left,right].indexOf(o)>=0?"height":"width";if(r&&a){var c=toPaddingObject(n.padding,s),h=getLayoutRect(r),d="y"===l?top:left,p="y"===l?bottom:right,g=s.rects.reference[u]+s.rects.reference[l]-a[l]-s.rects.popper[u],f=a[l]-s.rects.reference[l],E=getOffsetParent(r),_=E?"y"===l?E.clientHeight||0:E.clientWidth||0:0,m=g/2-f/2,v=c[d],T=_-h[u]-c[p],A=_/2-h[u]/2+m,b=within(v,A,T),C=l;s.modifiersData[i]=((t={})[C]=b,t.centerOffset=b-A,t)}}function effect$1(e){var t=e.state,s=e.options.element,i=void 0===s?"[data-popper-arrow]":s;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var s=e.x,i=e.y,n=t.devicePixelRatio||1;return{x:round(s*n)/n||0,y:round(i*n)/n||0}}function mapToStyles(e){var t,s=e.popper,i=e.popperRect,n=e.placement,r=e.variation,a=e.offsets,o=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,h=e.isFixed,d=a.x,p=void 0===d?0:d,g=a.y,f=void 0===g?0:g,E="function"==typeof c?c({x:p,y:f}):{x:p,y:f};p=E.x,f=E.y;var _=a.hasOwnProperty("x"),m=a.hasOwnProperty("y"),v=left,T=top,A=window;if(u){var b=getOffsetParent(s),C="clientHeight",S="clientWidth";if(b===getWindow(s)&&"static"!==getComputedStyle$1(b=getDocumentElement(s)).position&&"absolute"===o&&(C="scrollHeight",S="scrollWidth"),n===top||(n===left||n===right)&&r===end)T=bottom,f-=(h&&b===A&&A.visualViewport?A.visualViewport.height:b[C])-i.height,f*=l?1:-1;if(n===left||(n===top||n===bottom)&&r===end)v=right,p-=(h&&b===A&&A.visualViewport?A.visualViewport.width:b[S])-i.width,p*=l?1:-1}var D,k=Object.assign({position:o},u&&unsetSides),N=!0===c?roundOffsetsByDPR({x:p,y:f},getWindow(s)):{x:p,y:f};return p=N.x,f=N.y,l?Object.assign({},k,((D={})[T]=m?"0":"",D[v]=_?"0":"",D.transform=(A.devicePixelRatio||1)<=1?"translate("+p+"px, "+f+"px)":"translate3d("+p+"px, "+f+"px, 0)",D)):Object.assign({},k,((t={})[T]=m?f+"px":"",t[v]=_?p+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,s=e.options,i=s.gpuAcceleration,n=void 0===i||i,r=s.adaptive,a=void 0===r||r,o=s.roundOffsets,l=void 0===o||o,u={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,s=e.instance,i=e.options,n=i.scroll,r=void 0===n||n,a=i.resize,o=void 0===a||a,l=getWindow(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return r&&u.forEach((function(e){e.addEventListener("scroll",s.update,passive)})),o&&l.addEventListener("resize",s.update,passive),function(){r&&u.forEach((function(e){e.removeEventListener("scroll",s.update,passive)})),o&&l.removeEventListener("resize",s.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var s=getWindow(e),i=getDocumentElement(e),n=s.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=isLayoutViewport();(u||!u&&"fixed"===t)&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+getWindowScrollBarX(e),y:l}}function getDocumentRect(e){var t,s=getDocumentElement(e),i=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,r=max(s.scrollWidth,s.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=max(s.scrollHeight,s.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+getWindowScrollBarX(e),l=-i.scrollTop;return"rtl"===getComputedStyle$1(n||s).direction&&(o+=max(s.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function isScrollParent(e){var t=getComputedStyle$1(e),s=t.overflow,i=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(s+n+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var s;void 0===t&&(t=[]);var i=getScrollParent(e),n=i===(null==(s=e.ownerDocument)?void 0:s.body),r=getWindow(i),a=n?[r].concat(r.visualViewport||[],isScrollParent(i)?i:[]):i,o=t.concat(a);return n?o:o.concat(listScrollParents(getParentNode(a)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var s=getBoundingClientRect(e,!1,"fixed"===t);return s.top=s.top+e.clientTop,s.left=s.left+e.clientLeft,s.bottom=s.top+e.clientHeight,s.right=s.left+e.clientWidth,s.width=e.clientWidth,s.height=e.clientHeight,s.x=s.left,s.y=s.top,s}function getClientRectFromMixedType(e,t,s){return t===viewport?rectToClientRect(getViewportRect(e,s)):isElement$1(t)?getInnerBoundingClientRect(t,s):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),s=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement$1(s)?t.filter((function(e){return isElement$1(e)&&contains(e,s)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,s,i){var n="clippingParents"===t?getClippingParents(e):[].concat(t),r=[].concat(n,[s]),a=r[0],o=r.reduce((function(t,s){var n=getClientRectFromMixedType(e,s,i);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromMixedType(e,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function computeOffsets(e){var t,s=e.reference,i=e.element,n=e.placement,r=n?getBasePlacement(n):null,a=n?getVariation(n):null,o=s.x+s.width/2-i.width/2,l=s.y+s.height/2-i.height/2;switch(r){case top:t={x:o,y:s.y-i.height};break;case bottom:t={x:o,y:s.y+s.height};break;case right:t={x:s.x+s.width,y:l};break;case left:t={x:s.x-i.width,y:l};break;default:t={x:s.x,y:s.y}}var u=r?getMainAxisFromPlacement(r):null;if(null!=u){var c="y"===u?"height":"width";switch(a){case start:t[u]=t[u]-(s[c]/2-i[c]/2);break;case end:t[u]=t[u]+(s[c]/2-i[c]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=void 0===i?e.placement:i,r=s.strategy,a=void 0===r?e.strategy:r,o=s.boundary,l=void 0===o?clippingParents:o,u=s.rootBoundary,c=void 0===u?viewport:u,h=s.elementContext,d=void 0===h?popper:h,p=s.altBoundary,g=void 0!==p&&p,f=s.padding,E=void 0===f?0:f,_=mergePaddingObject("number"!=typeof E?E:expandToHashMap(E,basePlacements)),m=d===popper?reference:popper,v=e.rects.popper,T=e.elements[g?m:d],A=getClippingRect(isElement$1(T)?T:T.contextElement||getDocumentElement(e.elements.popper),l,c,a),b=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:b,element:v,strategy:"absolute",placement:n}),S=rectToClientRect(Object.assign({},v,C)),D=d===popper?S:b,k={top:A.top-D.top+_.top,bottom:D.bottom-A.bottom+_.bottom,left:A.left-D.left+_.left,right:D.right-A.right+_.right},N=e.modifiersData.offset;if(d===popper&&N){var O=N[n];Object.keys(k).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,s=[top,bottom].indexOf(e)>=0?"y":"x";k[e]+=O[s]*t}))}return k}function computeAutoPlacement(e,t){void 0===t&&(t={});var s=t,i=s.placement,n=s.boundary,r=s.rootBoundary,a=s.padding,o=s.flipVariations,l=s.allowedAutoPlacements,u=void 0===l?placements:l,c=getVariation(i),h=c?o?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===c})):basePlacements,d=h.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=h);var p=d.reduce((function(t,s){return t[s]=detectOverflow(e,{placement:s,boundary:n,rootBoundary:r,padding:a})[getBasePlacement(s)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,s=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0===a||a,l=s.fallbackPlacements,u=s.padding,c=s.boundary,h=s.rootBoundary,d=s.altBoundary,p=s.flipVariations,g=void 0===p||p,f=s.allowedAutoPlacements,E=t.options.placement,_=getBasePlacement(E),m=l||(_===E||!g?[getOppositePlacement(E)]:getExpandedFallbackPlacements(E)),v=[E].concat(m).reduce((function(e,s){return e.concat(getBasePlacement(s)===auto?computeAutoPlacement(t,{placement:s,boundary:c,rootBoundary:h,padding:u,flipVariations:g,allowedAutoPlacements:f}):s)}),[]),T=t.rects.reference,A=t.rects.popper,b=new Map,C=!0,S=v[0],D=0;D<v.length;D++){var k=v[D],N=getBasePlacement(k),O=getVariation(k)===start,y=[top,bottom].indexOf(N)>=0,w=y?"width":"height",I=detectOverflow(t,{placement:k,boundary:c,rootBoundary:h,altBoundary:d,padding:u}),M=y?O?right:left:O?bottom:top;T[w]>A[w]&&(M=getOppositePlacement(M));var L=getOppositePlacement(M),R=[];if(r&&R.push(I[N]<=0),o&&R.push(I[M]<=0,I[L]<=0),R.every((function(e){return e}))){S=k,C=!1;break}b.set(k,R)}if(C)for(var P=function(e){var t=v.find((function(t){var s=b.get(t);if(s)return s.slice(0,e).every((function(e){return e}))}));if(t)return S=t,"break"},$=g?3:1;$>0;$--){if("break"===P($))break}t.placement!==S&&(t.modifiersData[i]._skip=!0,t.placement=S,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,s){return void 0===s&&(s={x:0,y:0}),{top:e.top-t.height-s.y,right:e.right-t.width+s.x,bottom:e.bottom-t.height+s.y,left:e.left-t.width-s.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,s=e.name,i=t.rects.reference,n=t.rects.popper,r=t.modifiersData.preventOverflow,a=detectOverflow(t,{elementContext:"reference"}),o=detectOverflow(t,{altBoundary:!0}),l=getSideOffsets(a,i),u=getSideOffsets(o,n,r),c=isAnySideFullyClipped(l),h=isAnySideFullyClipped(u);t.modifiersData[s]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,s){var i=getBasePlacement(e),n=[left,top].indexOf(i)>=0?-1:1,r="function"==typeof s?s(Object.assign({},t,{placement:e})):s,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[left,right].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function offset(e){var t=e.state,s=e.options,i=e.name,n=s.offset,r=void 0===n?[0,0]:n,a=placements.reduce((function(e,s){return e[s]=distanceAndSkiddingToXY(s,t.rects,r),e}),{}),o=a[t.placement],l=o.x,u=o.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[i]=a}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,s=e.name;t.modifiersData[s]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,s=e.options,i=e.name,n=s.mainAxis,r=void 0===n||n,a=s.altAxis,o=void 0!==a&&a,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,h=s.padding,d=s.tether,p=void 0===d||d,g=s.tetherOffset,f=void 0===g?0:g,E=detectOverflow(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:c}),_=getBasePlacement(t.placement),m=getVariation(t.placement),v=!m,T=getMainAxisFromPlacement(_),A=getAltAxis(T),b=t.modifiersData.popperOffsets,C=t.rects.reference,S=t.rects.popper,D="function"==typeof f?f(Object.assign({},t.rects,{placement:t.placement})):f,k="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),N=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(b){if(r){var y,w="y"===T?top:left,I="y"===T?bottom:right,M="y"===T?"height":"width",L=b[T],R=L+E[w],P=L-E[I],$=p?-S[M]/2:0,F=m===start?C[M]:S[M],x=m===start?-S[M]:-C[M],V=t.elements.arrow,H=p&&V?getLayoutRect(V):{width:0,height:0},B=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),W=B[w],K=B[I],j=within(0,C[M],H[M]),Y=v?C[M]/2-$-j-W-k.mainAxis:F-j-W-k.mainAxis,U=v?-C[M]/2+$+j+K+k.mainAxis:x+j+K+k.mainAxis,G=t.elements.arrow&&getOffsetParent(t.elements.arrow),z=G?"y"===T?G.clientTop||0:G.clientLeft||0:0,q=null!=(y=null==N?void 0:N[T])?y:0,X=L+U-q,Q=within(p?min(R,L+Y-q-z):R,L,p?max(P,X):P);b[T]=Q,O[T]=Q-L}if(o){var Z,J="x"===T?top:left,ee="x"===T?bottom:right,te=b[A],se="y"===A?"height":"width",ie=te+E[J],ne=te-E[ee],re=-1!==[top,left].indexOf(_),ae=null!=(Z=null==N?void 0:N[A])?Z:0,oe=re?ie:te-C[se]-S[se]-ae+k.altAxis,le=re?te+C[se]+S[se]-ae-k.altAxis:ne,ue=p&&re?withinMaxClamp(oe,te,le):within(p?oe:ie,te,p?le:ne);b[A]=ue,O[A]=ue-te}t.modifiersData[i]=O}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),s=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==s||1!==i}function getCompositeRect(e,t,s){void 0===s&&(s=!1);var i=isHTMLElement(t),n=isHTMLElement(t)&&isElementScaled(t),r=getDocumentElement(t),a=getBoundingClientRect(e,n,s),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!s)&&(("body"!==getNodeName(t)||isScrollParent(r))&&(o=getNodeScroll(t)),isHTMLElement(t)?((l=getBoundingClientRect(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):r&&(l.x=getWindowScrollBarX(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function order(e){var t=new Map,s=new Set,i=[];function n(e){s.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!s.has(e)){var i=t.get(e);i&&n(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){s.has(e.name)||n(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,s){return e.concat(t.filter((function(e){return e.phase===s})))}),[])}function debounce(e){var t;return function(){return t||(t=new Promise((function(s){Promise.resolve().then((function(){t=void 0,s(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var s=e[t.name];return e[t.name]=s?Object.assign({},s,t,{options:Object.assign({},s.options,t.options),data:Object.assign({},s.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,s=t.defaultModifiers,i=void 0===s?[]:s,n=t.defaultOptions,r=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,s){void 0===s&&(s=r);var n={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,r),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],o=!1,l={state:n,setOptions:function(s){var o="function"==typeof s?s(n.options):s;u(),n.options=Object.assign({},r,n.options,o),n.scrollParents={reference:isElement$1(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var c=orderModifiers(mergeByName([].concat(i,n.options.modifiers)));return n.orderedModifiers=c.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,s=e.options,i=void 0===s?{}:s,r=e.effect;if("function"==typeof r){var o=r({state:n,name:t,instance:l,options:i}),u=function(){};a.push(o||u)}})),l.update()},forceUpdate:function(){if(!o){var e=n.elements,t=e.reference,s=e.popper;if(areValidElements(t,s)){n.rects={reference:getCompositeRect(t,getOffsetParent(s),"fixed"===n.options.strategy),popper:getLayoutRect(s)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var r=n.orderedModifiers[i],a=r.fn,u=r.options,c=void 0===u?{}:u,h=r.name;"function"==typeof a&&(n=a({state:n,options:c,name:h,instance:l})||n)}else n.reset=!1,i=-1}}},update:debounce((function(){return new Promise((function(e){l.forceUpdate(),e(n)}))})),destroy:function(){u(),o=!0}};if(!areValidElements(e,t))return l;function u(){a.forEach((function(e){return e()})),a=[]}return l.setOptions(s).then((function(e){!o&&s.onFirstUpdate&&s.onFirstUpdate(e)})),l}}var createPopper$2=popperGenerator(),defaultModifiers$1=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1],createPopper$1=popperGenerator({defaultModifiers:defaultModifiers$1}),defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),Popper=Object.freeze({__proto__:null,popperGenerator:popperGenerator,detectOverflow:detectOverflow,createPopperBase:createPopper$2,createPopper:createPopper,createPopperLite:createPopper$1,top:top,bottom:bottom,right:right,left:left,auto:auto,basePlacements:basePlacements,start:start,end:end,clippingParents:clippingParents,viewport:viewport,popper:popper,reference:reference,variationPlacements:variationPlacements,placements:placements,beforeRead:beforeRead,read:read,afterRead:afterRead,beforeMain:beforeMain,main:main,afterMain:afterMain,beforeWrite:beforeWrite,write:write,afterWrite:afterWrite,modifierPhases:modifierPhases,applyStyles:applyStyles$1,arrow:arrow$1,computeStyles:computeStyles$1,eventListeners:eventListeners,flip:flip$1,hide:hide$1,offset:offset$1,popperOffsets:popperOffsets$1,preventOverflow:preventOverflow$1});
|
|
10
10
|
/*!
|
|
11
11
|
* Bootstrap v5.3.0-alpha3 (https://getbootstrap.com/)
|
|
12
12
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
package/dist/js/tabler.js
CHANGED